diff --git a/assets/AnimatedWave-DOvVQHan.js b/assets/AnimatedWave-CMIzOsja.js similarity index 56% rename from assets/AnimatedWave-DOvVQHan.js rename to assets/AnimatedWave-CMIzOsja.js index 56f9d1026d5ea5de54fb14010753e27861526681..f23b827fe01494877065ca76cba0b43789a6e1a3 100644 --- a/assets/AnimatedWave-DOvVQHan.js +++ b/assets/AnimatedWave-CMIzOsja.js @@ -1,3 +1,3 @@ -import{b as e}from"./Basic-6PI1-eSd.js";import{F as t,U as n,V as r,Y as i,a6 as a,aE as o,aI as s,aL as c,aO as l,aQ as u,aS as d,at as f,cY as p,cZ as m,d0 as h,d2 as g,d3 as _,d4 as v,d6 as y,d7 as b,d8 as x,d9 as S,dD as C,dE as w,dF as T,dG as E,da as D,db as O,df as k,dg as A,dk as j,dl as M,do as N,dp as P,dy as F,t as I,v as L,y as ee,z as R}from"./index-BOKBAzT0.js";import{b as z}from"./HeaderLink-DoEHmasi.js";const B={},V={class:`cross-background-container`};function H(e,t){return v(),O(`div`,V,[j(e.$slots,`default`,{},void 0,!0)])}var U=o(B,[[`render`,H],[`__scopeId`,`data-v-455eb62c`]]);const W={"mb-1":``,"w-full":``,"gap-2":``},G={"w-full":``};var K=x({__name:`Header`,setup(e){return(e,t)=>(v(),O(`header`,W,[k(`div`,G,[h(z)]),h(F(s),{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:D(()=>t[0]||=[k(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),q=K,te=`/assets/worker-Bv82ofgX.js`;const J=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),Y=e=>{let t=typeof e;return t===`object`?e===null?`null`:e?.constructor?.name??`object`:t},X=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 ${Y(e)}.`)},Z=e=>{let t=X(e),n=``,r,i=t.length;for(r=2;r>2],n+=J[(t[r-2]&3)<<4|t[r-1]>>4],n+=J[(t[r-1]&15)<<2|t[r]>>6],n+=J[t[r]&63];return r===i+1&&(n+=J[t[r-2]>>2],n+=J[(t[r-2]&3)<<4],n+=`==`),r===i&&(n+=J[t[r-2]>>2],n+=J[(t[r-2]&3)<<4|t[r-1]>>4],n+=J[(t[r-1]&15)<<2],n+=`=`),n};function Q(e,t,n){for(let r=0;r{b().then(()=>{s.update(),u.value=s.height.value})}),m(async()=>{b().then(()=>{s.update(),u.value=s.height.value})}),(e,r)=>{let a=_(`auto-animate`);return v(),O(`div`,re,[r[2]||=k(`div`,{"flex-1":``},null,-1),M((v(),O(`div`,{ref_key:`chatHistoryRef`,ref:t,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[r[1]||=k(`div`,{"flex-1":``},null,-1),(v(!0),O(N,null,A(F(i),(e,t)=>(v(),O(`div`,{key:t,"mb-2":``},[e.role===`error`?(v(),O(`div`,ie,[k(`div`,ae,[k(`div`,oe,[k(`div`,se,[k(`span`,ce,w(F(n)(`stage.chat.message.character-name.core-system`)),1)]),r[0]||=k(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),F(o)&&t===F(i).length-1?(v(),O(`div`,le)):(v(),O(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base {if(!e||!e.trim())return;let t=b.getProviderConfig(x.value);await U(e,{chatProvider:b.getProviderInstance(x.value),model:E.value,providerConfig:t})}});async function X(){if(!(!o.value.trim()||_.value))try{let e=b.getProviderConfig(x.value);await U(o.value,{chatProvider:b.getProviderInstance(x.value),model:E.value,providerConfig:e})}catch(e){G.value.pop(),G.value.push({role:`error`,content:e.message})}}let{destroy:Z,start:Q}=n(H,{onSpeechStart:()=>{s.value=!0},onVADMisfire:()=>{s.value=!1},onSpeechEnd:e=>{s.value=!1,$(e.buffer)},auto:!1});async function $(e){await K.resume();let t=await ne(e,K.sampleRate);J({type:`generate`,data:{audio:t,language:`en`}})}async function re(e){let t=e.target,n=P.value.find(e=>e.deviceId===t.value);if(!n){B.value=void 0;return}B.value=n}return g(V,async e=>{e===`false`&&(Z(),Y())}),g(d,async e=>{e&&await z()}),y(()=>{Q()}),W(async()=>{o.value=``}),(t,n)=>(v(),O(`div`,Ce,[k(`fieldset`,we,[k(`label`,{class:T([l.value===`chat`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,l.value===`chat`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":F(j)}]),flex:`~ row`,checked:l.value===`chat`,"aria-checked":l.value===`chat`,border:`solid 2 primary-100 dark: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-lg":``,"px-2":``},[M(k(`input`,{"onUpdate:modelValue":n[0]||=e=>l.value=e,type:`radio`,name:`tab`,value:`chat`,hidden:``},null,512),[[p,l.value]]),n[5]||=k(`div`,{"i-solar:dialog-2-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),k(`div`,Ee,[k(`span`,De,w(F(q)(`stage.chat.tabs.chat`)),1)])],10,Te)]),k(`div`,Oe,[k(`div`,ke,[h(Se,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`o.value=e,placeholder:F(q)(`stage.message`),text:`primary-500 hover:primary-600 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-400 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500`,bg:`primary-200/20 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:T({"transition-colors-none placeholder:transition-colors-none":F(j)}),onSubmit:X,onCompositionstart:n[2]||=e=>_.value=!0,onCompositionend:n[3]||=e=>_.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])]),k(`div`,je,[k(`div`,Me,[h(F(f),null,{default:D(()=>[d.value?(v(),O(`fieldset`,Ne,[(v(!0),O(N,null,A(F(P),(e,t)=>(v(),O(`label`,{key:t,class:`[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900`},[k(`input`,{type:`radio`,name:`audioInput`,value:e.deviceId,hidden:``,onChange:re},null,40,Pe),k(`div`,Fe,[k(`div`,Ie,[e.deviceId===F(H)?(v(),O(`div`,Le)):S(``,!0)]),k(`span`,{"inline-block":``,class:T([e.deviceId===F(H)?`cyan-400 dark:text-white`:`cyan-400/50 dark:text-white/50`]),transition:`all duration-250 ease-in-out`},w(e.label),3)])]))),128))])):S(``,!0)]),_:1}),k(`label`,{bg:`complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700`,transition:`all duration-250 ease-in-out`,class:T({"transition-colors-none":F(j)}),text:`complementary-400`,"h-fit":``,flex:``,"cursor-pointer":``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-full":``,"px-4":``,"py-2":``},[M(k(`input`,{"onUpdate:modelValue":n[4]||=e=>d.value=e,type:`checkbox`,hidden:``},null,512),[[m,d.value]]),n[6]||=k(`div`,{"i-solar:microphone-2-bold-duotone":``},null,-1),k(`div`,null,[s.value?(v(),O(`span`,ze,`Listening...`)):(v(),O(`span`,Re,w(F(q)(`settings.microphone`)),1))])],2)])])]))}}),Ve=Be;const He={py:`1`,flex:`~ col`,rounded:`lg`,"overflow-hidden":``},Ue={key:0,flex:``,mr:`12`},We={flex:`~ col`,shadow:`md violet-200/20 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset {b().then(()=>{o.update(),s.value=o.height.value})}),p(async()=>{b().then(()=>{o.update(),s.value=o.height.value})}),(e,r)=>{let a=_(`auto-animate`);return v(),O(`div`,He,[r[2]||=k(`div`,{"flex-1":``},null,-1),M((v(),O(`div`,{ref_key:`chatHistoryRef`,ref:t,"h-full":``,"w-full":``,"max-h":`40%`,flex:`~ col`,"overflow-scroll":``,class:`chat-history`},[r[1]||=k(`div`,{"flex-1":``},null,-1),(v(!0),O(N,null,A(F(i),(e,t)=>(v(),O(`div`,{key:t,"mb-2":``},[e.role===`error`?(v(),O(`div`,Ue,[k(`div`,We,[k(`div`,Ge,[k(`div`,Ke,[k(`span`,qe,w(F(n)(`stage.chat.message.character-name.core-system`)),1)]),r[0]||=k(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),e.content?(v(),O(`div`,{key:0,class:`markdown-content`,text:`base {i.value=!0},onVADMisfire:()=>{i.value=!1},onSpeechEnd:e=>{i.value=!1,A(e)},auto:!1});function A(e){alert(`Transcription is not implemented yet`)}return g(d,async e=>{e===`false`&&E()}),_(async()=>{r.value=``}),y(()=>{D()}),(t,n)=>(v(),O(`div`,ct,[h(st,{absolute:``,"left-0":``,"top-0":``,transform:`translate-y-[-100%]`,h:`80dvh`,"w-full":``}),k(`div`,lt,[h(F(e),{modelValue:r.value,"onUpdate:modelValue":n[0]||=e=>r.value=e,placeholder:F(x)(`stage.message`),border:`solid 2 primary-50 dark:primary-950/10`,text:`primary-500 hover:primary-600 dark:primary-100 dark:hover:primary-200 placeholder:primary-400 placeholder:hover:primary-500 placeholder:dark:primary-300 placeholder:dark:hover:primary-400`,bg:`primary-50/80 dark:primary-950/80`,"max-h":`[10lh]`,"min-h":`[calc(1lh+4px+4px)]`,"w-full":``,"resize-none":``,"overflow-y-scroll":``,rounded:`[1lh]`,"px-4":``,"py-0.5":``,"outline-none":``,"backdrop-blur-md":``,"scrollbar-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:T([F(p)?`transition-colors-none placeholder:transition-colors-none`:``]),"default-height":`1lh`,onSubmit:w,onCompositionstart:n[1]||=e=>o.value=!0,onCompositionend:n[2]||=e=>o.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),r.value.trim()||o.value?(v(),O(`button`,{key:0,w:`[calc(1lh+4px+4px)]`,h:`[calc(1lh+4px+4px)]`,"aspect-square":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-full":``,"outline-none":``,"backdrop-blur-md":``,text:`primary-500 hover:primary-600 dark:primary-100 dark:hover:primary-200 placeholder:primary-400 placeholder:hover:primary-500 placeholder:dark:primary-300 placeholder:dark:hover:primary-400`,bg:`primary-50/80 dark:primary-950/80`,onClick:w},n[3]||=[k(`div`,{"i-solar:arrow-up-outline":``},null,-1)])):S(``,!0)])]))}}),dt=ut;const ft={class:`relative`},pt={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var mt=x({__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=C(t.height),r=C(t.amplitude),i=C(t.waveLength),a=C(t.fillColor),o=C(t.direction),s=C(t.movementDirection);function c(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 l=P(()=>n.value+r.value*2),u=P(()=>{let e=` +import{b as e}from"./Basic-1H4d_HIg.js";import{C as t,R as n,S as r,V as i,a3 as a,aE as o,aI as s,aL as c,aN as l,aP as u,a_ as d,ar as f,cV as p,cW as m,d1 as h,d2 as g,d3 as _,d4 as v,d5 as y,d6 as b,dA as x,dG as S,dH as C,dI as w,da as T,db as E,df as D,dg as O,dj as k,dk as A,do as j,dq as M,dr as N,ds as P,dv as F,q as I,s as L,v as ee,w as R}from"./index-K-hxNScn.js";import{b as z}from"./HeaderLink-DJwpVSTp.js";const B={},V={class:`cross-background-container`};function H(e,t){return P(),b(`div`,V,[D(e.$slots,`default`,{},void 0,!0)])}var U=o(B,[[`render`,H],[`__scopeId`,`data-v-455eb62c`]]);const W={"mb-1":``,"w-full":``,"gap-2":``},G={"w-full":``};var K=_({__name:`Header`,setup(e){return(e,t)=>(P(),b(`header`,W,[T(`div`,G,[j(z)]),j(F(s),{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:y(()=>t[0]||=[T(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),q=K,te=`/assets/worker-Bv82ofgX.js`;const J=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),Y=e=>{let t=typeof e;return t===`object`?e===null?`null`:e?.constructor?.name??`object`:t},X=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 ${Y(e)}.`)},Z=e=>{let t=X(e),n=``,r,i=t.length;for(r=2;r>2],n+=J[(t[r-2]&3)<<4|t[r-1]>>4],n+=J[(t[r-1]&15)<<2|t[r]>>6],n+=J[t[r]&63];return r===i+1&&(n+=J[t[r-2]>>2],n+=J[(t[r-2]&3)<<4],n+=`==`),r===i&&(n+=J[t[r-2]>>2],n+=J[(t[r-2]&3)<<4|t[r-1]>>4],n+=J[(t[r-1]&15)<<2],n+=`=`),n};function Q(e,t,n){for(let r=0;r{g().then(()=>{s.update(),l.value=s.height.value})}),m(async()=>{g().then(()=>{s.update(),l.value=s.height.value})}),(e,r)=>{let a=N(`auto-animate`);return P(),b(`div`,re,[r[2]||=T(`div`,{"flex-1":``},null,-1),O((P(),b(`div`,{ref_key:`chatHistoryRef`,ref:t,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[r[1]||=T(`div`,{"flex-1":``},null,-1),(P(!0),b(k,null,E(F(i),(e,t)=>(P(),b(`div`,{key:t,"mb-2":``},[e.role===`error`?(P(),b(`div`,ie,[T(`div`,ae,[T(`div`,oe,[T(`div`,se,[T(`span`,ce,S(F(n)(`stage.chat.message.character-name.core-system`)),1)]),r[0]||=T(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),F(o)&&t===F(i).length-1?(P(),b(`div`,le)):(P(),b(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base {if(!e||!e.trim())return;let t=_.getProviderConfig(w.value);await U(e,{chatProvider:_.getProviderInstance(w.value),model:D.value,providerConfig:t})}});async function X(){if(!(!o.value.trim()||g.value))try{let e=_.getProviderConfig(w.value);await U(o.value,{chatProvider:_.getProviderInstance(w.value),model:D.value,providerConfig:e})}catch(e){G.value.pop(),G.value.push({role:`error`,content:e.message})}}let{destroy:Z,start:Q}=n(H,{onSpeechStart:()=>{s.value=!0},onVADMisfire:()=>{s.value=!1},onSpeechEnd:e=>{s.value=!1,$(e.buffer)},auto:!1});async function $(e){await K.resume();let t=await ne(e,K.sampleRate);J({type:`generate`,data:{audio:t,language:`en`}})}async function re(e){let t=e.target,n=N.value.find(e=>e.deviceId===t.value);if(!n){B.value=void 0;return}B.value=n}return M(V,async e=>{e===`false`&&(Z(),Y())}),M(d,async e=>{e&&await z()}),h(()=>{Q()}),W(async()=>{o.value=``}),(t,n)=>(P(),b(`div`,Ce,[T(`fieldset`,we,[T(`label`,{class:C([u.value===`chat`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,u.value===`chat`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":F(A)}]),flex:`~ row`,checked:u.value===`chat`,"aria-checked":u.value===`chat`,border:`solid 2 primary-100 dark: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-lg":``,"px-2":``},[O(T(`input`,{"onUpdate:modelValue":n[0]||=e=>u.value=e,type:`radio`,name:`tab`,value:`chat`,hidden:``},null,512),[[p,u.value]]),n[5]||=T(`div`,{"i-solar:dialog-2-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),T(`div`,Ee,[T(`span`,De,S(F(q)(`stage.chat.tabs.chat`)),1)])],10,Te)]),T(`div`,Oe,[T(`div`,ke,[j(Se,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`o.value=e,placeholder:F(q)(`stage.message`),text:`primary-500 hover:primary-600 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-400 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500`,bg:`primary-200/20 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:C({"transition-colors-none placeholder:transition-colors-none":F(A)}),onSubmit:X,onCompositionstart:n[2]||=e=>g.value=!0,onCompositionend:n[3]||=e=>g.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])]),T(`div`,je,[T(`div`,Me,[j(F(f),null,{default:y(()=>[d.value?(P(),b(`fieldset`,Ne,[(P(!0),b(k,null,E(F(N),(e,t)=>(P(),b(`label`,{key:t,class:`[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900`},[T(`input`,{type:`radio`,name:`audioInput`,value:e.deviceId,hidden:``,onChange:re},null,40,Pe),T(`div`,Fe,[T(`div`,Ie,[e.deviceId===F(H)?(P(),b(`div`,Le)):v(``,!0)]),T(`span`,{"inline-block":``,class:C([e.deviceId===F(H)?`cyan-400 dark:text-white`:`cyan-400/50 dark:text-white/50`]),transition:`all duration-250 ease-in-out`},S(e.label),3)])]))),128))])):v(``,!0)]),_:1}),T(`label`,{bg:`complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700`,transition:`all duration-250 ease-in-out`,class:C({"transition-colors-none":F(A)}),text:`complementary-400`,"h-fit":``,flex:``,"cursor-pointer":``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-full":``,"px-4":``,"py-2":``},[O(T(`input`,{"onUpdate:modelValue":n[4]||=e=>d.value=e,type:`checkbox`,hidden:``},null,512),[[m,d.value]]),n[6]||=T(`div`,{"i-solar:microphone-2-bold-duotone":``},null,-1),T(`div`,null,[s.value?(P(),b(`span`,ze,`Listening...`)):(P(),b(`span`,Re,S(F(q)(`settings.microphone`)),1))])],2)])])]))}}),Ve=Be;const He={py:`1`,flex:`~ col`,rounded:`lg`,"overflow-hidden":``},Ue={key:0,flex:``,mr:`12`},We={flex:`~ col`,shadow:`md violet-200/20 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset {g().then(()=>{o.update(),s.value=o.height.value})}),p(async()=>{g().then(()=>{o.update(),s.value=o.height.value})}),(e,r)=>{let a=N(`auto-animate`);return P(),b(`div`,He,[r[2]||=T(`div`,{"flex-1":``},null,-1),O((P(),b(`div`,{ref_key:`chatHistoryRef`,ref:t,"h-full":``,"w-full":``,"max-h":`40%`,flex:`~ col`,"overflow-scroll":``,class:`chat-history`},[r[1]||=T(`div`,{"flex-1":``},null,-1),(P(!0),b(k,null,E(F(i),(e,t)=>(P(),b(`div`,{key:t,"mb-2":``},[e.role===`error`?(P(),b(`div`,Ue,[T(`div`,We,[T(`div`,Ge,[T(`div`,Ke,[T(`span`,qe,S(F(n)(`stage.chat.message.character-name.core-system`)),1)]),r[0]||=T(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),e.content?(P(),b(`div`,{key:0,class:`markdown-content`,text:`base {i.value=!0},onVADMisfire:()=>{i.value=!1},onSpeechEnd:e=>{i.value=!1,D(e)},auto:!1});function D(e){alert(`Transcription is not implemented yet`)}return M(d,async e=>{e===`false`&&w()}),g(async()=>{r.value=``}),h(()=>{E()}),(t,n)=>(P(),b(`div`,ct,[j(st,{absolute:``,"left-0":``,"top-0":``,transform:`translate-y-[-100%]`,h:`80dvh`,"w-full":``}),T(`div`,lt,[j(F(e),{modelValue:r.value,"onUpdate:modelValue":n[0]||=e=>r.value=e,placeholder:F(y)(`stage.message`),border:`solid 2 primary-50 dark:primary-950/10`,text:`primary-500 hover:primary-600 dark:primary-100 dark:hover:primary-200 placeholder:primary-400 placeholder:hover:primary-500 placeholder:dark:primary-300 placeholder:dark:hover:primary-400`,bg:`primary-50/80 dark:primary-950/80`,"max-h":`[10lh]`,"min-h":`[calc(1lh+4px+4px)]`,"w-full":``,"resize-none":``,"overflow-y-scroll":``,rounded:`[1lh]`,"px-4":``,"py-0.5":``,"outline-none":``,"backdrop-blur-md":``,"scrollbar-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:C([F(p)?`transition-colors-none placeholder:transition-colors-none`:``]),"default-height":`1lh`,onSubmit:S,onCompositionstart:n[1]||=e=>o.value=!0,onCompositionend:n[2]||=e=>o.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),r.value.trim()||o.value?(P(),b(`button`,{key:0,w:`[calc(1lh+4px+4px)]`,h:`[calc(1lh+4px+4px)]`,"aspect-square":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-full":``,"outline-none":``,"backdrop-blur-md":``,text:`primary-500 hover:primary-600 dark:primary-100 dark:hover:primary-200 placeholder:primary-400 placeholder:hover:primary-500 placeholder:dark:primary-300 placeholder:dark:hover:primary-400`,bg:`primary-50/80 dark:primary-950/80`,onClick:S},n[3]||=[T(`div`,{"i-solar:arrow-up-outline":``},null,-1)])):v(``,!0)])]))}}),dt=ut;const ft={class:`relative`},pt={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var mt=_({__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=x(t.height),r=x(t.amplitude),i=x(t.waveLength),a=x(t.fillColor),o=x(t.direction),s=x(t.movementDirection);function c(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 l=A(()=>n.value+r.value*2),u=A(()=>{let e=` - `;return`url(data:image/svg+xml;base64,${btoa(e)})`});return g(()=>[t.height,t.amplitude,t.waveLength,t.fillColor,t.direction,t.movementDirection],()=>{n.value=t.height,r.value=t.amplitude,i.value=t.waveLength,a.value=t.fillColor,o.value=t.direction,s.value=t.movementDirection},{immediate:!0}),(e,t)=>(v(),O(`div`,ft,[j(e.$slots,`default`,{},void 0,!0),k(`div`,pt,[k(`div`,{class:`colored-area wave`,style:E({background:a.value,height:`${l.value}px`,maskImage:u.value,WebkitMaskImage:u.value,"--wave-translate":`${-i.value}px`,"--animation-duration":`${i.value/e.animationSpeed}s`,"animation-direction":s.value===`left`?`normal`:`reverse`})},null,4)])]))}}),ht=o(mt,[[`__scopeId`,`data-v-33a54ad1`]]);export{ht as b,dt as c,Ve as d,q as e,U as f}; \ No newline at end of file + `;return`url(data:image/svg+xml;base64,${btoa(e)})`});return M(()=>[t.height,t.amplitude,t.waveLength,t.fillColor,t.direction,t.movementDirection],()=>{n.value=t.height,r.value=t.amplitude,i.value=t.waveLength,a.value=t.fillColor,o.value=t.direction,s.value=t.movementDirection},{immediate:!0}),(e,t)=>(P(),b(`div`,ft,[D(e.$slots,`default`,{},void 0,!0),T(`div`,pt,[T(`div`,{class:`colored-area wave`,style:w({background:a.value,height:`${l.value}px`,maskImage:u.value,WebkitMaskImage:u.value,"--wave-translate":`${-i.value}px`,"--animation-duration":`${i.value/e.animationSpeed}s`,"animation-direction":s.value===`left`?`normal`:`reverse`})},null,4)])]))}}),ht=o(mt,[[`__scopeId`,`data-v-33a54ad1`]]);export{ht as b,dt as c,Ve as d,q as e,U as f}; \ No newline at end of file diff --git a/assets/Basic-1H4d_HIg.js b/assets/Basic-1H4d_HIg.js new file mode 100644 index 0000000000000000000000000000000000000000..40ff350688239264c7466a295e17fd3bf05f1ce3 --- /dev/null +++ b/assets/Basic-1H4d_HIg.js @@ -0,0 +1 @@ +import{cZ as e,d3 as t,d6 as n,d9 as r,dA as i,dI as a,de as o,dg as s,dq as c,ds as l}from"./index-K-hxNScn.js";var u=t({__name:`Basic`,props:r({defaultHeight:{}},{modelValue:{default:``},modelModifiers:{}}),emits:r([`submit`],[`update:modelValue`]),setup(t,{emit:r}){let u=t,d=r,f=o(t,`modelValue`),p=i(),m=i(`auto`);function h(e){e.code===`Enter`&&!e.shiftKey&&(e.preventDefault(),d(`submit`,f.value))}return c(f,()=>{m.value=`auto`,requestAnimationFrame(()=>{if(p.value){if(f.value===``){m.value=u.defaultHeight||`fit-content`;return}m.value=`${p.value.scrollHeight}px`}})},{immediate:!0}),(t,r)=>s((l(),n(`textarea`,{ref_key:`textareaRef`,ref:p,"onUpdate:modelValue":r[0]||=e=>f.value=e,style:a({height:m.value}),onKeydown:h},null,36)),[[e,f.value]])}}),d=u;export{d as b}; \ No newline at end of file diff --git a/assets/Basic-6PI1-eSd.js b/assets/Basic-6PI1-eSd.js deleted file mode 100644 index 5653ab9ec0fedadcf84959d5fadc7b55184dc7a6..0000000000000000000000000000000000000000 --- a/assets/Basic-6PI1-eSd.js +++ /dev/null @@ -1 +0,0 @@ -import{cU as e,d2 as t,d4 as n,d8 as r,dD as i,dG as a,db as o,de as s,dj as c,dl as l}from"./index-BOKBAzT0.js";var u=r({__name:`Basic`,props:s({defaultHeight:{}},{modelValue:{default:``},modelModifiers:{}}),emits:s([`submit`],[`update:modelValue`]),setup(r,{emit:s}){let u=r,d=s,f=c(r,`modelValue`),p=i(),m=i(`auto`);function h(e){e.code===`Enter`&&!e.shiftKey&&(e.preventDefault(),d(`submit`,f.value))}return t(f,()=>{m.value=`auto`,requestAnimationFrame(()=>{if(p.value){if(f.value===``){m.value=u.defaultHeight||`fit-content`;return}m.value=`${p.value.scrollHeight}px`}})},{immediate:!0}),(t,r)=>l((n(),o(`textarea`,{ref_key:`textareaRef`,ref:p,"onUpdate:modelValue":r[0]||=e=>f.value=e,style:a({height:m.value}),onKeydown:h},null,36)),[[e,f.value]])}}),d=u;export{d as b}; \ No newline at end of file diff --git a/assets/CardCreate-BjA7840r.js b/assets/CardCreate-CAbaTC1Z.js similarity index 54% rename from assets/CardCreate-BjA7840r.js rename to assets/CardCreate-CAbaTC1Z.js index fdccc0ef19ca4ab703709a81f5713df19638164a..3ed864ac59fb5143f6e395835c8c7421e1556dd4 100644 --- a/assets/CardCreate-BjA7840r.js +++ b/assets/CardCreate-CAbaTC1Z.js @@ -1 +1 @@ -import{a6 as e,d4 as t,d8 as n,dE as r,db as i,df as a,dy as o}from"./index-BOKBAzT0.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}=e();return(e,n)=>(t(),i(`div`,s,[n[0]||=a(`div`,{"i-solar:add-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),a(`p`,c,r(o(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as b}; \ No newline at end of file +import{a3 as e,d3 as t,d6 as n,dG as r,da as i,ds as a,dv as o}from"./index-K-hxNScn.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=t({__name:`CardCreate`,setup(t){let{t:l}=e();return(e,t)=>(a(),n(`div`,s,[t[0]||=i(`div`,{"i-solar:add-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),i(`p`,c,r(o(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as b}; \ No newline at end of file diff --git a/assets/CardCreate-CEdooQmC.js b/assets/CardCreate-CEdooQmC.js new file mode 100644 index 0000000000000000000000000000000000000000..3dd05d8abd312fb64a5bf032f3a1385385bbd833 --- /dev/null +++ b/assets/CardCreate-CEdooQmC.js @@ -0,0 +1 @@ +import{b as e}from"./CardCreate-CAbaTC1Z.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreate-DrdA498D.js b/assets/CardCreate-DrdA498D.js deleted file mode 100644 index f82171f02402fdd50401c94e2b189af5c72a80b2..0000000000000000000000000000000000000000 --- a/assets/CardCreate-DrdA498D.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./CardCreate-BjA7840r.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-Bazp-7BG.js b/assets/CardCreationDialog-Bazp-7BG.js deleted file mode 100644 index 47e055017057b394db9e02f2dadea6bd40539028..0000000000000000000000000000000000000000 --- a/assets/CardCreationDialog-Bazp-7BG.js +++ /dev/null @@ -1,3 +0,0 @@ -import{a6 as e,aE as t,ac as n,an as r,ar as i,d0 as a,d4 as o,d5 as s,d8 as c,d9 as l,dB as u,dD as d,dE as f,dF as p,dH as m,dL as h,da as g,db as _,de as v,df as y,dg as ee,di as te,dj as ne,do as b,dp as x,dv as S,dy as C,e as w,f as T,h as E,j as D,n as re,w as ie}from"./index-BOKBAzT0.js";var O=m((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n}),k=m((exports,t)=>{var n=O();t.exports=n}),A=m((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n}),j=m((exports,t)=>{var n=A();t.exports=n}),M=m((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n}),N=m((exports,t)=>{var n=String.prototype.trim;t.exports=n}),P=m((exports,t)=>{var n=N(),r=` - \r -\f\v            \u2028\u2029   `,i=`᠎`;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a}),F=m((exports,t)=>{var n=j(),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}),I=m((exports,t)=>{var n=N();function r(e){return n.call(e)}t.exports=r}),L=m((exports,t)=>{var n=M(),r=P(),i=F(),a=I(),o;o=n&&r()?a:i,t.exports=o}),R=m((exports,t)=>{var n=k(),r=j(),i=L(),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}),z=m((exports,t)=>{var n=R();t.exports=n}),B=h(z());const V={class:`w-full flex flex-col gap-5`},H={class:`mt-4`},U={class:`border-b border-neutral-200 dark:border-neutral-700`},W={class:`flex justify-center -mb-px sm:justify-start space-x-1`},G=[`onClick`],K={class:`flex items-center gap-1`},ae={key:0,class:`w-full rounded-xl bg-red900`},oe={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=c({__name:`CardCreationDialog`,props:v({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:v([`update:modelValue`],[`update:modelValue`]),setup(t,{emit:c}){let m=c,h=ne(t,`modelValue`),{t:v}=e(),O=ie(),k=d(``),A=[{id:`identity`,label:v(`settings.pages.card.creation.identity`),icon:`i-solar:emoji-funny-square-bold-duotone`},{id:`behavior`,label:v(`settings.pages.card.creation.behavior`),icon:`i-solar:chat-round-line-bold-duotone`},{id:`settings`,label:v(`settings.pages.card.creation.settings`),icon:`i-solar:settings-bold-duotone`}],j=x({get:()=>A.find(e=>e.id===k.value)?k.value:A[0]?.id||``,set:e=>{k.value=e}}),M=d(!1),N=d(``);function P(e){let t=S(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 M.value=!0,N.value=v(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return M.value=!0,N.value=v(`settings.pages.card.creation.errors.systemprompt`),!1;else return M.value=!0,N.value=v(`settings.pages.card.creation.errors.scenario`),!1;else return M.value=!0,N.value=v(`settings.pages.card.creation.errors.personality`),!1;else return M.value=!0,N.value=v(`settings.pages.card.creation.errors.description`),!1;else return M.value=!0,N.value=v(`settings.pages.card.creation.errors.version`),!1;else return M.value=!0,N.value=v(`settings.pages.card.creation.errors.name`),!1;return M.value=!1,O.addCard(t),h.value=!1,!0}let F=d({name:v(`settings.pages.card.creation.defaults.name`),nickname:void 0,version:`1.0`,description:``,notes:void 0,personality:v(`settings.pages.card.creation.defaults.personality`),scenario:v(`settings.pages.card.creation.defaults.scenario`),systemPrompt:v(`settings.pages.card.creation.defaults.systemprompt`),postHistoryInstructions:v(`settings.pages.card.creation.defaults.posthistoryinstructions`),greetings:[],messageExample:[]});function I(e,t){return x({get:()=>F.value[e]??``,set:n=>{let r=n.trim();F.value[e]=r.length>0?t?t(r):r:``}})}let L=I(`name`,e=>(0,B.default)(e)),R=I(`nickname`),z=I(`description`),q=I(`notes`),J=I(`personality`),Y=I(`scenario`),X=x({get:()=>F.value.greetings??[],set:e=>{F.value.greetings=e||[]}}),Z=I(`version`),Q=I(`systemPrompt`),$=I(`postHistoryInstructions`);return(e,t)=>(o(),te(C(T),{open:h.value,"onUpdate:open":t[12]||=e=>m(`update:modelValue`,e)},{default:g(()=>[a(C(w),null,{default:g(()=>[a(C(re),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),a(C(E),{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:g(()=>[y(`div`,V,[a(C(D),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:g(()=>[s(f(C(v)(`settings.pages.card.create_card`)),1)]),_:1}),y(`div`,H,[y(`div`,U,[y(`div`,W,[(o(),_(b,null,ee(A,e=>y(`button`,{key:e.id,class:p([`px-4 py-2 text-sm font-medium`,[j.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=>j.value=e.id},[y(`div`,K,[y(`div`,{class:p(e.icon)},null,2),s(` `+f(e.label),1)])],10,G)),64))])])]),M.value?(o(),_(`div`,ae,[y(`p`,oe,f(N.value),1)])):l(``,!0),j.value===`identity`?(o(),_(`div`,se,[y(`p`,ce,f(C(v)(`settings.pages.card.creation.fields_info.subtitle`)),1),y(`div`,le,[a(C(i),{modelValue:C(L),"onUpdate:modelValue":t[0]||=e=>u(L)?L.value=e:null,label:C(v)(`settings.pages.card.creation.name`),description:C(v)(`settings.pages.card.creation.fields_info.name`),required:!0},null,8,[`modelValue`,`label`,`description`]),a(C(i),{modelValue:C(R),"onUpdate:modelValue":t[1]||=e=>u(R)?R.value=e:null,label:C(v)(`settings.pages.card.creation.nickname`),description:C(v)(`settings.pages.card.creation.fields_info.nickname`)},null,8,[`modelValue`,`label`,`description`]),a(C(i),{modelValue:C(z),"onUpdate:modelValue":t[2]||=e=>u(z)?z.value=e:null,label:C(v)(`settings.pages.card.creation.description`),"single-line":!1,required:!0,description:C(v)(`settings.pages.card.creation.fields_info.description`)},null,8,[`modelValue`,`label`,`description`]),a(C(i),{modelValue:C(q),"onUpdate:modelValue":t[3]||=e=>u(q)?q.value=e:null,label:C(v)(`settings.pages.card.creator_notes`),"single-line":!1,description:C(v)(`settings.pages.card.creation.fields_info.notes`)},null,8,[`modelValue`,`label`,`description`])])])):j.value===`behavior`?(o(),_(`div`,ue,[y(`div`,de,[a(C(i),{modelValue:C(J),"onUpdate:modelValue":t[4]||=e=>u(J)?J.value=e:null,label:C(v)(`settings.pages.card.personality`),"single-line":!1,required:!0,description:C(v)(`settings.pages.card.creation.fields_info.personality`)},null,8,[`modelValue`,`label`,`description`]),a(C(i),{modelValue:C(Y),"onUpdate:modelValue":t[5]||=e=>u(Y)?Y.value=e:null,label:C(v)(`settings.pages.card.scenario`),"single-line":!1,required:!0,description:C(v)(`settings.pages.card.creation.fields_info.scenario`)},null,8,[`modelValue`,`label`,`description`]),a(C(r),{modelValue:X.value,"onUpdate:modelValue":t[6]||=e=>X.value=e,label:C(v)(`settings.pages.card.creation.greetings`),description:C(v)(`settings.pages.card.creation.fields_info.greetings`)},null,8,[`modelValue`,`label`,`description`])])])):j.value===`settings`?(o(),_(`div`,fe,[y(`div`,pe,[a(C(i),{modelValue:C(Q),"onUpdate:modelValue":t[7]||=e=>u(Q)?Q.value=e:null,label:C(v)(`settings.pages.card.systemprompt`),"single-line":!1,required:!0,description:C(v)(`settings.pages.card.creation.fields_info.systemprompt`)},null,8,[`modelValue`,`label`,`description`]),a(C(i),{modelValue:C($),"onUpdate:modelValue":t[8]||=e=>u($)?$.value=e:null,label:C(v)(`settings.pages.card.posthistoryinstructions`),"single-line":!1,required:!0,description:C(v)(`settings.pages.card.creation.fields_info.posthistoryinstructions`)},null,8,[`modelValue`,`label`,`description`]),a(C(i),{modelValue:C(Z),"onUpdate:modelValue":t[9]||=e=>u(Z)?Z.value=e:null,label:C(v)(`settings.pages.card.creation.version`),required:!0,description:C(v)(`settings.pages.card.creation.fields_info.version`)},null,8,[`modelValue`,`label`,`description`])])])):l(``,!0),y(`div`,me,[a(C(n),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:C(v)(`settings.pages.card.cancel`),disabled:!1,onClick:t[10]||=e=>h.value=!1},null,8,[`label`]),a(C(n),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:C(v)(`settings.pages.card.creation.create`),disabled:!1,onClick:t[11]||=e=>P(F.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),J=t(q,[[`__scopeId`,`data-v-c19882e9`]]);export{J as b}; \ No newline at end of file diff --git a/assets/CardCreationDialog-Bz0WGMbk.js b/assets/CardCreationDialog-Bz0WGMbk.js deleted file mode 100644 index 2f9477fbd2d012ef51e060d34ece4799dca8e4c3..0000000000000000000000000000000000000000 --- a/assets/CardCreationDialog-Bz0WGMbk.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./CardCreationDialog-Bazp-7BG.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-Dfq3gfrr.js b/assets/CardCreationDialog-Dfq3gfrr.js new file mode 100644 index 0000000000000000000000000000000000000000..e8a3bf009f6099945017c35ec8bae5e50e303478 --- /dev/null +++ b/assets/CardCreationDialog-Dfq3gfrr.js @@ -0,0 +1 @@ +import{b as e}from"./CardCreationDialog-DtkXvIwx.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-DtkXvIwx.js b/assets/CardCreationDialog-DtkXvIwx.js new file mode 100644 index 0000000000000000000000000000000000000000..58dd012c6e37dc1b8d40cd4c9d37098ac9ebd109 --- /dev/null +++ b/assets/CardCreationDialog-DtkXvIwx.js @@ -0,0 +1,3 @@ +import{a3 as e,a9 as t,aE as n,ak as r,ao as i,d as a,d0 as o,d3 as s,d4 as c,d5 as l,d6 as u,d9 as d,dA as f,dF as ee,dG as p,dH as m,dJ as h,dN as g,da as _,db as te,dd as ne,de as v,dj as re,dk as y,do as b,ds as x,dv as S,dy as C,e as w,g as T,i as E,m as D,t as O}from"./index-K-hxNScn.js";var k=h((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n}),A=h((exports,t)=>{var n=k();t.exports=n}),j=h((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n}),M=h((exports,t)=>{var n=j();t.exports=n}),N=h((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n}),P=h((exports,t)=>{var n=String.prototype.trim;t.exports=n}),F=h((exports,t)=>{var n=P(),r=` + \r +\f\v            \u2028\u2029   `,i=`᠎`;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a}),I=h((exports,t)=>{var n=M(),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}),L=h((exports,t)=>{var n=P();function r(e){return n.call(e)}t.exports=r}),R=h((exports,t)=>{var n=N(),r=F(),i=I(),a=L(),o;o=n&&r()?a:i,t.exports=o}),z=h((exports,t)=>{var n=A(),r=M(),i=R(),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}),B=h((exports,t)=>{var n=z();t.exports=n}),V=g(B());const H={class:`w-full flex flex-col gap-5`},U={class:`mt-4`},W={class:`border-b border-neutral-200 dark:border-neutral-700`},G={class:`flex justify-center -mb-px sm:justify-start space-x-1`},K=[`onClick`],ie={class:`flex items-center gap-1`},ae={key:0,class:`w-full rounded-xl bg-red900`},oe={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=s({__name:`CardCreationDialog`,props:d({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:d([`update:modelValue`],[`update:modelValue`]),setup(n,{emit:s}){let d=s,h=v(n,`modelValue`),{t:g}=e(),k=O(),A=f(``),j=[{id:`identity`,label:g(`settings.pages.card.creation.identity`),icon:`i-solar:emoji-funny-square-bold-duotone`},{id:`behavior`,label:g(`settings.pages.card.creation.behavior`),icon:`i-solar:chat-round-line-bold-duotone`},{id:`settings`,label:g(`settings.pages.card.creation.settings`),icon:`i-solar:settings-bold-duotone`}],M=y({get:()=>j.find(e=>e.id===A.value)?A.value:j[0]?.id||``,set:e=>{A.value=e}}),N=f(!1),P=f(``);function F(e){let t=ee(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 N.value=!0,P.value=g(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return N.value=!0,P.value=g(`settings.pages.card.creation.errors.systemprompt`),!1;else return N.value=!0,P.value=g(`settings.pages.card.creation.errors.scenario`),!1;else return N.value=!0,P.value=g(`settings.pages.card.creation.errors.personality`),!1;else return N.value=!0,P.value=g(`settings.pages.card.creation.errors.description`),!1;else return N.value=!0,P.value=g(`settings.pages.card.creation.errors.version`),!1;else return N.value=!0,P.value=g(`settings.pages.card.creation.errors.name`),!1;return N.value=!1,k.addCard(t),h.value=!1,!0}let I=f({name:g(`settings.pages.card.creation.defaults.name`),nickname:void 0,version:`1.0`,description:``,notes:void 0,personality:g(`settings.pages.card.creation.defaults.personality`),scenario:g(`settings.pages.card.creation.defaults.scenario`),systemPrompt:g(`settings.pages.card.creation.defaults.systemprompt`),postHistoryInstructions:g(`settings.pages.card.creation.defaults.posthistoryinstructions`),greetings:[],messageExample:[]});function L(e,t){return y({get:()=>I.value[e]??``,set:n=>{let r=n.trim();I.value[e]=r.length>0?t?t(r):r:``}})}let R=L(`name`,e=>(0,V.default)(e)),z=L(`nickname`),B=L(`description`),q=L(`notes`),J=L(`personality`),Y=L(`scenario`),X=y({get:()=>I.value.greetings??[],set:e=>{I.value.greetings=e||[]}}),Z=L(`version`),Q=L(`systemPrompt`),$=L(`postHistoryInstructions`);return(e,n)=>(x(),ne(S(w),{open:h.value,"onUpdate:open":n[12]||=e=>d(`update:modelValue`,e)},{default:l(()=>[b(S(a),null,{default:l(()=>[b(S(D),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),b(S(T),{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:l(()=>[_(`div`,H,[b(S(E),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:l(()=>[o(p(S(g)(`settings.pages.card.create_card`)),1)]),_:1}),_(`div`,U,[_(`div`,W,[_(`div`,G,[(x(),u(re,null,te(j,e=>_(`button`,{key:e.id,class:m([`px-4 py-2 text-sm font-medium`,[M.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=>M.value=e.id},[_(`div`,ie,[_(`div`,{class:m(e.icon)},null,2),o(` `+p(e.label),1)])],10,K)),64))])])]),N.value?(x(),u(`div`,ae,[_(`p`,oe,p(P.value),1)])):c(``,!0),M.value===`identity`?(x(),u(`div`,se,[_(`p`,ce,p(S(g)(`settings.pages.card.creation.fields_info.subtitle`)),1),_(`div`,le,[b(S(i),{modelValue:S(R),"onUpdate:modelValue":n[0]||=e=>C(R)?R.value=e:null,label:S(g)(`settings.pages.card.creation.name`),description:S(g)(`settings.pages.card.creation.fields_info.name`),required:!0},null,8,[`modelValue`,`label`,`description`]),b(S(i),{modelValue:S(z),"onUpdate:modelValue":n[1]||=e=>C(z)?z.value=e:null,label:S(g)(`settings.pages.card.creation.nickname`),description:S(g)(`settings.pages.card.creation.fields_info.nickname`)},null,8,[`modelValue`,`label`,`description`]),b(S(i),{modelValue:S(B),"onUpdate:modelValue":n[2]||=e=>C(B)?B.value=e:null,label:S(g)(`settings.pages.card.creation.description`),"single-line":!1,required:!0,description:S(g)(`settings.pages.card.creation.fields_info.description`)},null,8,[`modelValue`,`label`,`description`]),b(S(i),{modelValue:S(q),"onUpdate:modelValue":n[3]||=e=>C(q)?q.value=e:null,label:S(g)(`settings.pages.card.creator_notes`),"single-line":!1,description:S(g)(`settings.pages.card.creation.fields_info.notes`)},null,8,[`modelValue`,`label`,`description`])])])):M.value===`behavior`?(x(),u(`div`,ue,[_(`div`,de,[b(S(i),{modelValue:S(J),"onUpdate:modelValue":n[4]||=e=>C(J)?J.value=e:null,label:S(g)(`settings.pages.card.personality`),"single-line":!1,required:!0,description:S(g)(`settings.pages.card.creation.fields_info.personality`)},null,8,[`modelValue`,`label`,`description`]),b(S(i),{modelValue:S(Y),"onUpdate:modelValue":n[5]||=e=>C(Y)?Y.value=e:null,label:S(g)(`settings.pages.card.scenario`),"single-line":!1,required:!0,description:S(g)(`settings.pages.card.creation.fields_info.scenario`)},null,8,[`modelValue`,`label`,`description`]),b(S(r),{modelValue:X.value,"onUpdate:modelValue":n[6]||=e=>X.value=e,label:S(g)(`settings.pages.card.creation.greetings`),description:S(g)(`settings.pages.card.creation.fields_info.greetings`)},null,8,[`modelValue`,`label`,`description`])])])):M.value===`settings`?(x(),u(`div`,fe,[_(`div`,pe,[b(S(i),{modelValue:S(Q),"onUpdate:modelValue":n[7]||=e=>C(Q)?Q.value=e:null,label:S(g)(`settings.pages.card.systemprompt`),"single-line":!1,required:!0,description:S(g)(`settings.pages.card.creation.fields_info.systemprompt`)},null,8,[`modelValue`,`label`,`description`]),b(S(i),{modelValue:S($),"onUpdate:modelValue":n[8]||=e=>C($)?$.value=e:null,label:S(g)(`settings.pages.card.posthistoryinstructions`),"single-line":!1,required:!0,description:S(g)(`settings.pages.card.creation.fields_info.posthistoryinstructions`)},null,8,[`modelValue`,`label`,`description`]),b(S(i),{modelValue:S(Z),"onUpdate:modelValue":n[9]||=e=>C(Z)?Z.value=e:null,label:S(g)(`settings.pages.card.creation.version`),required:!0,description:S(g)(`settings.pages.card.creation.fields_info.version`)},null,8,[`modelValue`,`label`,`description`])])])):c(``,!0),_(`div`,me,[b(S(t),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:S(g)(`settings.pages.card.cancel`),disabled:!1,onClick:n[10]||=e=>h.value=!1},null,8,[`label`]),b(S(t),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:S(g)(`settings.pages.card.creation.create`),disabled:!1,onClick:n[11]||=e=>F(I.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),J=n(q,[[`__scopeId`,`data-v-c19882e9`]]);export{J as b}; \ No newline at end of file diff --git a/assets/CardDetailDialog-B5sM5zj1.js b/assets/CardDetailDialog-B5sM5zj1.js new file mode 100644 index 0000000000000000000000000000000000000000..5a2b0ca0f8f11c23ecbf7e7385364ca112233206 --- /dev/null +++ b/assets/CardDetailDialog-B5sM5zj1.js @@ -0,0 +1 @@ +import{a3 as e,a9 as t,aL as n,d as ee,d0 as r,d3 as i,d4 as a,d5 as o,d6 as s,dA as c,dG as l,dH as u,da as d,db as f,dj as p,dk as m,do as h,ds as g,dv as _,e as te,g as ne,i as v,m as re,t as ie}from"./index-K-hxNScn.js";import{b as ae}from"./DeleteCardDialog-82b70cIC.js";const oe={key:0,class:`w-full flex flex-col gap-5`},se={flex:`~ col`,"gap-3":``},ce={flex:`~ row`,"items-center":``,"justify-between":``},le={flex:`~ row`,"items-center":``,"gap-2":``},ue={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`},de={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},fe={"font-medium":``},pe={flex:`~ row`,"gap-2":``},me={class:`mt-4`},he={class:`border-b border-neutral-200 dark:border-neutral-700`},ge={class:`flex justify-center -mb-px sm:justify-start space-x-1`},y=[`onClick`],b={class:`flex items-center gap-1`},x={key:0},S=[`innerHTML`],C={key:1},w=[`innerHTML`],T={key:2},E={flex:`~ col`,"max-h-60":``,"gap-4":``,"overflow-auto":``,"pr-1":``,"sm:max-h-80":``},D={key:0,flex:`~ col`,"gap-2":``},O={"text-lg":``,"text-neutral-500":``,"font-medium":``,"dark:text-neutral-400":``},k=[`innerHTML`],A={key:3},j={grid:`~ cols-1 sm:cols-3`,"gap-4":``},M={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`},N={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},P={truncate:``,"font-medium":``},F={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`},I={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=i({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:{}},emits:[`update:modelValue`],setup(i,{emit:R}){let z=i,B=R,{t:V}=e(),H=ie(),{removeCard:xe}=H,{activeCardId:U}=n(H),W=m(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=m(()=>{if(!W.value||!W.value.extensions?.airi?.modules)return{consciousness:``,speech:``,voice:``};let e=W.value.extensions.airi.modules;return{consciousness:e.consciousness?.model||``,speech:e.speech?.model||``,voice:e.speech?.voice_id||``}}),K=m(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=m(()=>z.cardId===U.value),J=c(!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=c(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=c(``),Q=m(()=>{let e=[];return W.value?.description&&e.push({id:`description`,label:V(`settings.pages.card.description_label`),icon:`i-solar:document-text-linear`}),W.value?.notes&&e.push({id:`notes`,label:V(`settings.pages.card.creator_notes`),icon:`i-solar:notes-linear`}),Object.values(K.value).some(e=>!!e)&&e.push({id:`character`,label:V(`settings.pages.card.character`),icon:`i-solar:user-rounded-linear`}),e.push({id:`modules`,label:V(`settings.pages.card.modules`),icon:`i-solar:tuning-square-linear`}),e}),$=m({get:()=>Q.value.find(e=>e.id===Z.value)?Z.value:Q.value[0]?.id||``,set:e=>{Z.value=e}});return(e,n)=>(g(),s(p,null,[h(_(te),{open:e.modelValue,"onUpdate:open":n[0]||=e=>B(`update:modelValue`,e)},{default:o(()=>[h(_(ee),null,{default:o(()=>[h(_(re),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),h(_(ne),{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:o(()=>[W.value?(g(),s(`div`,oe,[d(`div`,se,[d(`div`,ce,[d(`div`,null,[d(`div`,le,[h(_(v),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:o(()=>[r(l(W.value.name),1)]),_:1}),q.value?(g(),s(`div`,ue,[n[3]||=d(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),r(` `+l(_(V)(`settings.pages.card.active_badge`)),1)])):a(``,!0)]),d(`div`,de,[r(` v`+l(W.value.version)+` `,1),W.value.creator?(g(),s(p,{key:0},[r(` · `+l(_(V)(`settings.pages.card.created_by`))+` `,1),d(`span`,fe,l(W.value.creator),1)],64)):a(``,!0)])]),d(`div`,pe,[h(_(t),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?_(V)(`settings.pages.card.active`):_(V)(`settings.pages.card.activate`),disabled:q.value,class:u({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),d(`div`,me,[d(`div`,he,[d(`div`,ge,[(g(!0),s(p,null,f(Q.value,e=>(g(),s(`button`,{key:e.id,class:u([`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},[d(`div`,b,[d(`div`,{class:u(e.icon)},null,2),r(` `+l(e.label),1)])],10,y))),128))])])]),$.value===`notes`&&W.value.notes?(g(),s(`div`,x,[d(`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,S)])):a(``,!0),$.value===`description`&&W.value.description?(g(),s(`div`,C,[d(`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,w)])):a(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(g(),s(`div`,T,[d(`div`,E,[(g(!0),s(p,null,f(K.value,(e,t)=>(g(),s(p,{key:t},[e?(g(),s(`div`,D,[d(`h2`,O,l(_(V)(`settings.pages.card.${t.toLowerCase()}`)),1),d(`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(e)},null,8,k)])):a(``,!0)],64))),128))])])):a(``,!0),$.value===`modules`?(g(),s(`div`,A,[d(`div`,j,[d(`div`,M,[d(`span`,N,[n[4]||=d(`div`,{"i-lucide:ghost":``},null,-1),r(` `+l(_(V)(`settings.pages.card.consciousness.model`)),1)]),d(`div`,P,l(G.value.consciousness??`default`),1)]),d(`div`,F,[d(`span`,I,[n[5]||=d(`div`,{"i-lucide:mic":``},null,-1),r(` `+l(_(V)(`settings.pages.card.speech.model`)),1)]),d(`div`,L,l(G.value.speech??`default`),1)]),d(`div`,_e,[d(`span`,ve,[n[6]||=d(`div`,{"i-lucide:music":``},null,-1),r(` `+l(_(V)(`settings.pages.card.speech.voice`)),1)]),d(`div`,ye,l(G.value.voice??`default`),1)])])])):a(``,!0)])])):(g(),s(`div`,be,[n[7]||=d(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),r(` `+l(_(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),h(ae,{modelValue:X.value,"onUpdate:modelValue":n[1]||=e=>X.value=e,"card-name":W.value?.name,onConfirm:Ce,onCancel:n[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64))}}),z=R;export{z as b}; \ No newline at end of file diff --git a/assets/CardDetailDialog-CJ2uO9ec.js b/assets/CardDetailDialog-CJ2uO9ec.js deleted file mode 100644 index 84506ff6c1f17836324c57149821674d52ee865f..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-CJ2uO9ec.js +++ /dev/null @@ -1 +0,0 @@ -import{a6 as e,aL as t,ac as ee,d0 as n,d4 as r,d5 as i,d8 as a,d9 as o,dD as s,dE as c,dF as l,da as u,db as d,df as f,dg as p,do as m,dp as h,dy as g,e as te,f as ne,h as _,j as v,n as re,w as ie}from"./index-BOKBAzT0.js";import{b as ae}from"./DeleteCardDialog-DWd1lG7D.js";const oe={key:0,class:`w-full flex flex-col gap-5`},se={flex:`~ col`,"gap-3":``},ce={flex:`~ row`,"items-center":``,"justify-between":``},le={flex:`~ row`,"items-center":``,"gap-2":``},ue={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`},de={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},fe={"font-medium":``},pe={flex:`~ row`,"gap-2":``},me={class:`mt-4`},he={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`},L={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},ge={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=a({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:{}},emits:[`update:modelValue`],setup(a,{emit:R}){let z=a,B=R,{t:V}=e(),H=ie(),{removeCard:xe}=H,{activeCardId:U}=t(H),W=h(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=h(()=>{if(!W.value||!W.value.extensions?.airi?.modules)return{consciousness:``,speech:``,voice:``};let e=W.value.extensions.airi.modules;return{consciousness:e.consciousness?.model||``,speech:e.speech?.model||``,voice:e.speech?.voice_id||``}}),K=h(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=h(()=>z.cardId===U.value),J=s(!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=s(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=s(``),Q=h(()=>{let e=[];return W.value?.description&&e.push({id:`description`,label:V(`settings.pages.card.description_label`),icon:`i-solar:document-text-linear`}),W.value?.notes&&e.push({id:`notes`,label:V(`settings.pages.card.creator_notes`),icon:`i-solar:notes-linear`}),Object.values(K.value).some(e=>!!e)&&e.push({id:`character`,label:V(`settings.pages.card.character`),icon:`i-solar:user-rounded-linear`}),e.push({id:`modules`,label:V(`settings.pages.card.modules`),icon:`i-solar:tuning-square-linear`}),e}),$=h({get:()=>Q.value.find(e=>e.id===Z.value)?Z.value:Q.value[0]?.id||``,set:e=>{Z.value=e}});return(e,t)=>(r(),d(m,null,[n(g(ne),{open:e.modelValue,"onUpdate:open":t[0]||=e=>B(`update:modelValue`,e)},{default:u(()=>[n(g(te),null,{default:u(()=>[n(g(re),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),n(g(_),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:u(()=>[W.value?(r(),d(`div`,oe,[f(`div`,se,[f(`div`,ce,[f(`div`,null,[f(`div`,le,[n(g(v),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:u(()=>[i(c(W.value.name),1)]),_:1}),q.value?(r(),d(`div`,ue,[t[3]||=f(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),i(` `+c(g(V)(`settings.pages.card.active_badge`)),1)])):o(``,!0)]),f(`div`,de,[i(` v`+c(W.value.version)+` `,1),W.value.creator?(r(),d(m,{key:0},[i(` · `+c(g(V)(`settings.pages.card.created_by`))+` `,1),f(`span`,fe,c(W.value.creator),1)],64)):o(``,!0)])]),f(`div`,pe,[n(g(ee),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?g(V)(`settings.pages.card.active`):g(V)(`settings.pages.card.activate`),disabled:q.value,class:l({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),f(`div`,me,[f(`div`,he,[f(`div`,y,[(r(!0),d(m,null,p(Q.value,e=>(r(),d(`button`,{key:e.id,class:l([`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},[f(`div`,x,[f(`div`,{class:l(e.icon)},null,2),i(` `+c(e.label),1)])],10,b))),128))])])]),$.value===`notes`&&W.value.notes?(r(),d(`div`,S,[f(`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)])):o(``,!0),$.value===`description`&&W.value.description?(r(),d(`div`,w,[f(`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)])):o(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(r(),d(`div`,E,[f(`div`,D,[(r(!0),d(m,null,p(K.value,(e,t)=>(r(),d(m,{key:t},[e?(r(),d(`div`,O,[f(`h2`,k,c(g(V)(`settings.pages.card.${t.toLowerCase()}`)),1),f(`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(e)},null,8,A)])):o(``,!0)],64))),128))])])):o(``,!0),$.value===`modules`?(r(),d(`div`,j,[f(`div`,M,[f(`div`,N,[f(`span`,P,[t[4]||=f(`div`,{"i-lucide:ghost":``},null,-1),i(` `+c(g(V)(`settings.pages.card.consciousness.model`)),1)]),f(`div`,F,c(G.value.consciousness??`default`),1)]),f(`div`,I,[f(`span`,L,[t[5]||=f(`div`,{"i-lucide:mic":``},null,-1),i(` `+c(g(V)(`settings.pages.card.speech.model`)),1)]),f(`div`,ge,c(G.value.speech??`default`),1)]),f(`div`,_e,[f(`span`,ve,[t[6]||=f(`div`,{"i-lucide:music":``},null,-1),i(` `+c(g(V)(`settings.pages.card.speech.voice`)),1)]),f(`div`,ye,c(G.value.voice??`default`),1)])])])):o(``,!0)])])):(r(),d(`div`,be,[t[7]||=f(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),i(` `+c(g(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),n(ae,{modelValue:X.value,"onUpdate:modelValue":t[1]||=e=>X.value=e,"card-name":W.value?.name,onConfirm:Ce,onCancel:t[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64))}}),z=R;export{z as b}; \ No newline at end of file diff --git a/assets/CardDetailDialog-CidehlMa.js b/assets/CardDetailDialog-CidehlMa.js new file mode 100644 index 0000000000000000000000000000000000000000..dd618bde52f2e650e47787b26eb00755d510b0de --- /dev/null +++ b/assets/CardDetailDialog-CidehlMa.js @@ -0,0 +1 @@ +import"./DeleteCardDialog-82b70cIC.js";import{b as e}from"./CardDetailDialog-B5sM5zj1.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardDetailDialog-DErJoDp8.js b/assets/CardDetailDialog-DErJoDp8.js deleted file mode 100644 index 6f1e39dd4fd4c8651d7a8d9887efc74c35d72e49..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-DErJoDp8.js +++ /dev/null @@ -1 +0,0 @@ -import"./DeleteCardDialog-DWd1lG7D.js";import{b as e}from"./CardDetailDialog-CJ2uO9ec.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardListItem-0f3nWl-J.js b/assets/CardListItem-0f3nWl-J.js deleted file mode 100644 index 91575a1b20456abeb8a7b89d5afd5a4fe743aba0..0000000000000000000000000000000000000000 --- a/assets/CardListItem-0f3nWl-J.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./CardListItem-BkR5V785.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardListItem-Bj3hdPXC.js b/assets/CardListItem-Bj3hdPXC.js new file mode 100644 index 0000000000000000000000000000000000000000..4835a76898b31360f4ee67d3ee865d247fbb4b77 --- /dev/null +++ b/assets/CardListItem-Bj3hdPXC.js @@ -0,0 +1 @@ +import{b as e}from"./CardListItem-DTzfNndg.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardListItem-BkR5V785.js b/assets/CardListItem-DTzfNndg.js similarity index 67% rename from assets/CardListItem-BkR5V785.js rename to assets/CardListItem-DTzfNndg.js index e82d7a9326eb620958a0ca82b4cc4e013084e5fc..f25a7314f5075d3633c9eaf4359a5075250c07a2 100644 --- a/assets/CardListItem-BkR5V785.js +++ b/assets/CardListItem-DTzfNndg.js @@ -1 +1 @@ -import{a9 as e,cX as t,d4 as n,d8 as r,d9 as i,dE as a,dF as o,da as s,db as c,df as l,di as u,dy as d}from"./index-BOKBAzT0.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=r({__name:`CardListItem`,props:{id:{},name:{},description:{},isActive:{type:Boolean},isSelected:{type:Boolean},version:{},consciousnessModel:{},voiceModel:{}},emits:[`select`,`activate`,`delete`],setup(r,{emit:C}){let w=C;return(r,C)=>(n(),u(d(e),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:o([r.isSelected?`border-2 border-primary-400 dark:border-primary-600`:`border-2 border-neutral-100 dark:border-neutral-800/25`]),bg:`neutral-200/50 dark:neutral-800/50`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,transition:`all ease-in-out duration-400`,before:`content-empty absolute inset-0 z-0 w-25% h-full transition-all duration-400 ease-in-out bg-gradient-to-r from-primary-500/0 to-primary-500/0 dark:from-primary-400/0 dark:to-primary-400/0 mask-image-[linear-gradient(120deg,white_100%)] opacity-0`,hover:`before:opacity-100 before:bg-gradient-to-r before:from-primary-500/20 before:via-primary-500/10 before:to-transparent before:dark:from-primary-400/20 before:dark:via-primary-400/10 before:dark:to-transparent`,onClick:C[2]||=e=>w(`select`)},{default:s(()=>[l(`div`,f,[l(`div`,p,[l(`h3`,m,a(r.name),1),r.isActive?(n(),c(`div`,h,C[3]||=[l(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)])):i(``,!0)]),r.description?(n(),c(`p`,g,a(r.description),1)):i(``,!0),l(`div`,_,[l(`div`,null,`v`+a(r.version),1),l(`div`,v,[l(`div`,y,[C[4]||=l(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),l(`span`,null,a(r.consciousnessModel),1)]),l(`div`,b,[C[5]||=l(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),l(`span`,null,a(r.voiceModel),1)])])])]),l(`div`,x,[l(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:r.isActive,onClick:C[0]||=t(e=>w(`activate`),[`stop`])},[l(`div`,{class:o([r.isActive?`i-solar:check-circle-bold-duotone text-primary-500 dark:text-primary-400`:`i-solar:play-circle-broken text-neutral-500 dark:text-neutral-400`])},null,2)],8,S),r.id===`default`?i(``,!0):(n(),c(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:C[1]||=t(e=>w(`delete`),[`stop`])},C[6]||=[l(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]))])]),_:1},8,[`class`]))}}),w=C;export{w as b}; \ No newline at end of file +import{a6 as e,c$ as t,d3 as n,d4 as r,d5 as i,d6 as a,dG as o,dH as s,da as c,dd as l,ds as u,dv as d}from"./index-K-hxNScn.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=n({__name:`CardListItem`,props:{id:{},name:{},description:{},isActive:{type:Boolean},isSelected:{type:Boolean},version:{},consciousnessModel:{},voiceModel:{}},emits:[`select`,`activate`,`delete`],setup(n,{emit:C}){let w=C;return(n,C)=>(u(),l(d(e),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:s([n.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:C[2]||=e=>w(`select`)},{default:i(()=>[c(`div`,f,[c(`div`,p,[c(`h3`,m,o(n.name),1),n.isActive?(u(),a(`div`,h,C[3]||=[c(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)])):r(``,!0)]),n.description?(u(),a(`p`,g,o(n.description),1)):r(``,!0),c(`div`,_,[c(`div`,null,`v`+o(n.version),1),c(`div`,v,[c(`div`,y,[C[4]||=c(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),c(`span`,null,o(n.consciousnessModel),1)]),c(`div`,b,[C[5]||=c(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),c(`span`,null,o(n.voiceModel),1)])])])]),c(`div`,x,[c(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:n.isActive,onClick:C[0]||=t(e=>w(`activate`),[`stop`])},[c(`div`,{class:s([n.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),n.id===`default`?r(``,!0):(u(),a(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:C[1]||=t(e=>w(`delete`),[`stop`])},C[6]||=[c(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]))])]),_:1},8,[`class`]))}}),w=C;export{w as b}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-82b70cIC.js b/assets/DeleteCardDialog-82b70cIC.js new file mode 100644 index 0000000000000000000000000000000000000000..2e208de1a0df3efc4d64341926636b86bfa4c7e0 --- /dev/null +++ b/assets/DeleteCardDialog-82b70cIC.js @@ -0,0 +1 @@ +import{a3 as e,a9 as t,c as n,d0 as r,d3 as i,d5 as a,dG as o,da as s,dd as c,do as l,ds as u,dv as d,f,h as p,j as m,k as h,l as g,n as _,o as v}from"./index-K-hxNScn.js";const y={class:`flex flex-row justify-end gap-3`};var b=i({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:{}},emits:[`update:modelValue`,`confirm`,`cancel`],setup(i,{emit:b}){let x=b,{t:S}=e();function C(){x(`update:modelValue`,!1),x(`cancel`)}function w(){x(`update:modelValue`,!1),x(`confirm`)}return(e,i)=>(u(),c(d(_),{open:e.modelValue,"onUpdate:open":i[0]||=e=>x(`update:modelValue`,e)},{default:a(()=>[l(d(p),null,{default:a(()=>[l(d(n),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),l(d(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:a(()=>[l(d(m),{class:`mb-4 text-xl font-normal`},{default:a(()=>[r(o(d(S)(`settings.pages.card.delete_card`)),1)]),_:1}),l(d(g),{class:`mb-6`},{default:a(()=>[r(o(d(S)(`settings.pages.card.delete_confirmation`))+` `,1),s(`b`,null,`"`+o(e.cardName||``)+`"`,1)]),_:1}),s(`div`,y,[l(d(f),{"as-child":``},{default:a(()=>[l(d(t),{variant:`secondary`,label:d(S)(`settings.pages.card.cancel`),onClick:C},null,8,[`label`])]),_:1}),l(d(v),{"as-child":``},{default:a(()=>[l(d(t),{variant:`danger`,label:d(S)(`settings.pages.card.delete`),onClick:w},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),x=b;export{x as b}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-Ba7jKdc6.js b/assets/DeleteCardDialog-Ba7jKdc6.js deleted file mode 100644 index ef29ec49e4812f94115b2bdc377c1f01ba743361..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-Ba7jKdc6.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./DeleteCardDialog-DWd1lG7D.js";export{e as default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-CTir2p4h.js b/assets/DeleteCardDialog-CTir2p4h.js new file mode 100644 index 0000000000000000000000000000000000000000..407be38c6b04d0960ad7a77ec8dbafbf0889c0e3 --- /dev/null +++ b/assets/DeleteCardDialog-CTir2p4h.js @@ -0,0 +1 @@ +import{b as e}from"./DeleteCardDialog-82b70cIC.js";export{e as default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-DWd1lG7D.js b/assets/DeleteCardDialog-DWd1lG7D.js deleted file mode 100644 index 1db36a49fcbad1b57cf9f130c7e2081506a2594a..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-DWd1lG7D.js +++ /dev/null @@ -1 +0,0 @@ -import{a6 as e,ac as t,d as n,d0 as r,d4 as i,d5 as a,d8 as o,dE as s,da as c,df as l,di as u,dy as d,g as f,i as p,k as m,l as h,m as g,o as _,p as v}from"./index-BOKBAzT0.js";const y={class:`flex flex-row justify-end gap-3`};var b=o({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:{}},emits:[`update:modelValue`,`confirm`,`cancel`],setup(o,{emit:b}){let x=b,{t:S}=e();function C(){x(`update:modelValue`,!1),x(`cancel`)}function w(){x(`update:modelValue`,!1),x(`confirm`)}return(e,o)=>(i(),u(d(_),{open:e.modelValue,"onUpdate:open":o[0]||=e=>x(`update:modelValue`,e)},{default:c(()=>[r(d(p),null,{default:c(()=>[r(d(n),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),r(d(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:c(()=>[r(d(m),{class:`mb-4 text-xl font-normal`},{default:c(()=>[a(s(d(S)(`settings.pages.card.delete_card`)),1)]),_:1}),r(d(g),{class:`mb-6`},{default:c(()=>[a(s(d(S)(`settings.pages.card.delete_confirmation`))+` `,1),l(`b`,null,`"`+s(e.cardName||``)+`"`,1)]),_:1}),l(`div`,y,[r(d(f),{"as-child":``},{default:c(()=>[r(d(t),{variant:`secondary`,label:d(S)(`settings.pages.card.cancel`),onClick:C},null,8,[`label`])]),_:1}),r(d(v),{"as-child":``},{default:c(()=>[r(d(t),{variant:`danger`,label:d(S)(`settings.pages.card.delete`),onClick:w},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),x=b;export{x as b}; \ No newline at end of file diff --git a/assets/HeaderLink-DJwpVSTp.js b/assets/HeaderLink-DJwpVSTp.js new file mode 100644 index 0000000000000000000000000000000000000000..9c45fa6b744fbd45cfad988a5dd33918d0de04bf --- /dev/null +++ b/assets/HeaderLink-DJwpVSTp.js @@ -0,0 +1 @@ +import{aE as e,aI as t,aR as n,d3 as r,d5 as i,d6 as a,da as o,dd as s,ds as c,dv as l}from"./index-K-hxNScn.js";var u=`/assets/logo-dark-B0bvNYTh.svg`,d=`/assets/logo-B2aCU-bH.svg`;const f=[`src`],p=[`src`];var m=r({__name:`HeaderLink`,setup(e){let r=n();return(e,n)=>(c(),s(l(t),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:i(()=>[l(r)?(c(),a(`img`,{key:0,src:l(u),"h-8":``,"w-8":``,class:`theme-colored`},null,8,f)):(c(),a(`img`,{key:1,src:l(d),"h-8":``,"w-8":``,class:`theme-colored`},null,8,p)),n[0]||=o(`div`,{"translate-y":`[2px]`,"font-semibold":``,"font-quicksand":``},[o(`span`,null,`AIRI`)],-1)]),_:1,__:[0]}))}}),h=e(m,[[`__scopeId`,`data-v-2542c9d9`]]);export{h as b}; \ No newline at end of file diff --git a/assets/HeaderLink-DoEHmasi.js b/assets/HeaderLink-DoEHmasi.js deleted file mode 100644 index 80e723e0e4e65582020f9951870041d1f13932cf..0000000000000000000000000000000000000000 --- a/assets/HeaderLink-DoEHmasi.js +++ /dev/null @@ -1 +0,0 @@ -import{aE as e,aI as t,aU as n,d4 as r,d8 as i,da as a,db as o,df as s,di as c,dy as l}from"./index-BOKBAzT0.js";var u=`/assets/logo-dark-B0bvNYTh.svg`,d=`/assets/logo-B2aCU-bH.svg`;const f=[`src`],p=[`src`];var m=i({__name:`HeaderLink`,setup(e){let i=n();return(e,n)=>(r(),c(l(t),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:a(()=>[l(i)?(r(),o(`img`,{key:0,src:l(u),"h-8":``,"w-8":``,class:`theme-colored`},null,8,f)):(r(),o(`img`,{key:1,src:l(d),"h-8":``,"w-8":``,class:`theme-colored`},null,8,p)),n[0]||=s(`div`,{"translate-y":`[2px]`,"font-semibold":``,"font-quicksand":``},[s(`span`,null,`AIRI`)],-1)]),_:1,__:[0]}))}}),h=e(m,[[`__scopeId`,`data-v-2542c9d9`]]);export{h as b}; \ No newline at end of file diff --git a/assets/IconAnimation-CJRikR53.js b/assets/IconAnimation-CJRikR53.js deleted file mode 100644 index a2bfd2d37949a5dbc8b97736431943282b5909f3..0000000000000000000000000000000000000000 --- a/assets/IconAnimation-CJRikR53.js +++ /dev/null @@ -1 +0,0 @@ -import{d2 as e,d4 as t,d8 as n,dD as r,dF as i,dG as a,db as o,df as s,dp as c}from"./index-BOKBAzT0.js";var l=n({__name:`IconAnimation`,props:{icon:{},iconSize:{},position:{},duration:{},started:{type:Boolean},textColor:{},isReverse:{type:Boolean},zIndex:{}},emits:[`animationEnded`],setup(n,{emit:l}){let u=n,d=l,f=r(!1);e(()=>u.started,e=>{e&&requestAnimationFrame(()=>{f.value=!0})});let p=c(()=>({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=r([]),h=r(!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,n)=>(t(),o(`div`,{"pointer-events-none":``,fixed:``,w:`100dvw`,h:`100dvh`,style:a({zIndex:h.value?e.zIndex:void 0})},[s(`div`,{fixed:``,"inset-0":``,"bg-primary-500":``,"transition-opacity":``,"ease-linear":``,style:a({opacity:p.value.opacity,transitionDuration:`${e.duration}ms`})},null,4),s(`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:`${e.duration}ms`}),class:i([p.value.textColor,u.icon,{"transition-all":f.value}]),onTransitionend:g},null,38)],4))}}),u=l;export{u as b}; \ No newline at end of file diff --git a/assets/IconAnimation-DBKHapUf.js b/assets/IconAnimation-DBKHapUf.js new file mode 100644 index 0000000000000000000000000000000000000000..600ccbeca811787a98f650fc55a426056dab3811 --- /dev/null +++ b/assets/IconAnimation-DBKHapUf.js @@ -0,0 +1 @@ +import{d3 as e,d6 as t,dA as n,dH as r,dI as i,da as a,dk as o,dq as s,ds as c}from"./index-K-hxNScn.js";var l=e({__name:`IconAnimation`,props:{icon:{},iconSize:{},position:{},duration:{},started:{type:Boolean},textColor:{},isReverse:{type:Boolean},zIndex:{}},emits:[`animationEnded`],setup(e,{emit:l}){let u=e,d=l,f=n(!1);s(()=>u.started,e=>{e&&requestAnimationFrame(()=>{f.value=!0})});let p=o(()=>({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=n([]),h=n(!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,n)=>(c(),t(`div`,{"pointer-events-none":``,fixed:``,w:`100dvw`,h:`100dvh`,style:i({zIndex:h.value?e.zIndex:void 0})},[a(`div`,{fixed:``,"inset-0":``,"bg-primary-500":``,"transition-opacity":``,"ease-linear":``,style:i({opacity:p.value.opacity,transitionDuration:`${e.duration}ms`})},null,4),a(`div`,{fixed:``,"inset-0":``,"ease-in-out":``,style:i({width:`${p.value.size}rem`,height:`${p.value.size}rem`,transform:`translate(${p.value.position})`,transitionDuration:`${e.duration}ms`}),class:r([p.value.textColor,u.icon,{"transition-all":f.value}]),onTransitionend:g},null,38)],4))}}),u=l;export{u as b}; \ No newline at end of file diff --git a/assets/InputFile-BBWEWJbr.js b/assets/InputFile-BBWEWJbr.js deleted file mode 100644 index f2ae02b8d5d8ed0b5abcd1d30d4b20e7222f1627..0000000000000000000000000000000000000000 --- a/assets/InputFile-BBWEWJbr.js +++ /dev/null @@ -1 +0,0 @@ -import{aZ as e,d4 as t,d8 as n,dD as r,dF as i,db as a,de as o,df as s,dj as c,dk as l,dy as u}from"./index-BOKBAzT0.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:o({accept:{},multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let o=c(n,`modelValue`),m=r(),h=r(!1),g=e(h,150);function _(e){let t=e.target;t.files&&t.files.length>0&&(m.value=t.files[0]),o.value=Array.from(t.files||[]),h.value=!1}return(e,n)=>(t(),a(`label`,{relative:``,class:i([`min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6`,[u(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`,u(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:n[0]||=e=>h.value=!0,onDragleave:n[1]||=e=>h.value=!1},[s(`input`,{type:`file`,accept:e.accept,multiple:e.multiple,"cursor-pointer":``,class:`absolute inset-0 h-full w-full opacity-0`,onChange:_},null,40,d),l(e.$slots,`default`,{isDragging:u(g),firstFile:m.value,files:o.value},()=>[s(`div`,{class:i([`flex flex-col items-center`,[u(g)?`text-primary-500 dark:text-primary-400`:`text-neutral-400 dark:text-neutral-500`]])},[n[2]||=s(`div`,{"i-solar:upload-square-line-duotone":``,"mb-2":``,"text-5xl":``},null,-1),n[3]||=s(`p`,{"font-medium":``,text:`center lg`},` Upload `,-1),u(g)?(t(),a(`p`,f,` Release to upload `)):(t(),a(`p`,p,` Click or drag and drop a file here `))],2)])],34))}}),h=m;export{h as b}; \ No newline at end of file diff --git a/assets/InputFile-CrE3SFMy.js b/assets/InputFile-CrE3SFMy.js new file mode 100644 index 0000000000000000000000000000000000000000..eafd8d4e7640a9ac5f38d88562b61e1cb62b196c --- /dev/null +++ b/assets/InputFile-CrE3SFMy.js @@ -0,0 +1 @@ +import{b3 as e,d3 as t,d6 as n,d9 as r,dA as i,dH as a,da as o,de as s,df as c,ds as l,dv as u}from"./index-K-hxNScn.js";const d=[`accept`,`multiple`],f={key:0,text:`center`,"text-sm":``},p={key:1,text:`center`,"text-sm":``};var m=t({__name:`InputFile`,props:r({accept:{},multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(t){let r=s(t,`modelValue`),m=i(),h=i(!1),g=e(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(e,t)=>(l(),n(`label`,{relative:``,class:a([`min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6`,[u(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`,u(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:t[0]||=e=>h.value=!0,onDragleave:t[1]||=e=>h.value=!1},[o(`input`,{type:`file`,accept:e.accept,multiple:e.multiple,"cursor-pointer":``,class:`absolute inset-0 h-full w-full opacity-0`,onChange:_},null,40,d),c(e.$slots,`default`,{isDragging:u(g),firstFile:m.value,files:r.value},()=>[o(`div`,{class:a([`flex flex-col items-center`,[u(g)?`text-primary-500 dark:text-primary-400`:`text-neutral-400 dark:text-neutral-500`]])},[t[2]||=o(`div`,{"i-solar:upload-square-line-duotone":``,"mb-2":``,"text-5xl":``},null,-1),t[3]||=o(`p`,{"font-medium":``,text:`center lg`},` Upload `,-1),u(g)?(l(),n(`p`,f,` Release to upload `)):(l(),n(`p`,p,` Click or drag and drop a file here `))],2)])],34))}}),h=m;export{h as b}; \ No newline at end of file diff --git a/assets/Scenes-B8GWuxOy.js b/assets/Scenes-B8GWuxOy.js deleted file mode 100644 index b91d1c84d96e610572687964535f656548bf0bad..0000000000000000000000000000000000000000 --- a/assets/Scenes-B8GWuxOy.js +++ /dev/null @@ -1,3753 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-Dcc0vk0T.js","assets/index-BOKBAzT0.js","assets/index-CsNim-Yi.css","assets/default-node-C2t2tqcG.js","assets/import-url-browser-CXhM7gkL.js","assets/import-url-browser-VKajNDYM.js","assets/duckdb-mvp-CIsUbAtz.js","assets/import-url-node-DcfQpSzu.js"])))=>i.map(i=>d[i]); -import{G as e,H as t,I as n,J as r,K as i,L as a,M as o,N as s,O as c,P as l,Q as u,R as d,S as f,T as p,Y as m,Z as h,_ as g,a6 as _,aA as v,aB as y,aK as b,aL as x,aM as S,aT as C,aU as w,ab as T,aj as E,at as D,ax as O,ay as ee,az as te,b$ as ne,b0 as k,b1 as A,b2 as re,b3 as j,b4 as ie,b5 as ae,b6 as oe,b7 as se,b8 as M,b9 as ce,bA as N,bB as le,bC as ue,bD as de,bE as fe,bF as pe,bG as me,bH as he,bI as ge,bJ as _e,bK as ve,bL as ye,bM as be,bN as xe,bO as Se,bP as Ce,bQ as we,bR as Te,bS as Ee,bT as De,bU as Oe,bV as ke,bW as Ae,bX as je,bY as Me,bZ as Ne,b_ as Pe,ba as Fe,bb as Ie,bc as Le,bd as Re,be as ze,bf as Be,bg as Ve,bh as He,bi as Ue,bj as We,bk as Ge,bl as Ke,bm as qe,bn as Je,bo as Ye,bp as Xe,bq as Ze,br as Qe,bs as $e,bt as et,bu as tt,bv as nt,bw as rt,bx as it,by as at,bz as ot,c$ as st,c0 as ct,c1 as lt,c2 as ut,c3 as dt,c4 as ft,c5 as pt,c6 as mt,c7 as ht,c8 as gt,c9 as _t,cA as vt,cB as yt,cC as bt,cD as xt,cE as St,cF as Ct,cG as wt,cH as Tt,cI as Et,cJ as P,cK as Dt,cL as Ot,cM as kt,cN as At,cO as jt,cP as Mt,cQ as Nt,cR as Pt,cS as Ft,cW as It,cZ as Lt,c_ as Rt,ca as zt,cb as Bt,cc as Vt,cd as Ht,ce as Ut,cf as Wt,cg as Gt,ch as Kt,ci as qt,cj as Jt,ck as Yt,cl as Xt,cm as Zt,cn as F,co as Qt,cp as $t,cq as en,cr as tn,cs as nn,ct as rn,cu as an,cv as on,cw as sn,cx as cn,cy as ln,cz as un,d0 as dn,d1 as fn,d2 as I,d4 as L,d6 as pn,d7 as mn,d8 as R,d9 as hn,dA as gn,dB as _n,dC as vn,dD as z,dE as yn,dF as bn,dG as xn,dH as Sn,dI as Cn,dJ as wn,dL as Tn,da as En,db as B,dc as Dn,dd as On,df as V,dg as kn,dh as An,di as jn,dk as Mn,dl as Nn,dm as Pn,do as Fn,dp as In,dq as Ln,dr as H,ds as Rn,dt as zn,du as Bn,dv as Vn,dw as Hn,dx as Un,dy as U,dz as Wn,q as Gn,r as Kn,t as qn,u as Jn,v as Yn,x as Xn,z as Zn}from"./index-BOKBAzT0.js";import{b as Qn}from"./import-url-browser-VKajNDYM.js";var $n=R({__name:`Range`,props:{modelValue:{},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=z(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=In(()=>s(a(n.modelValue,n.min,n.max),n.step)),l=In(()=>{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 On(()=>{window.removeEventListener(`mousemove`,d),window.removeEventListener(`mouseup`,p)}),(e,t)=>(L(),B(`span`,{ref_key:`sliderRef`,ref:i,class:bn([`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},[V(`span`,{style:xn(l.value),bg:`[#cabeff] dark:[#4e34b9]`,relative:``,block:``,"rounded-sm":``,h:`[14px]`},null,4),V(`span`,{role:`slider`,class:`slider-thumb`,style:xn({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))}}),er=$n,tr;(function(e){e[e.WEBGL_LEGACY=0]=`WEBGL_LEGACY`,e[e.WEBGL=1]=`WEBGL`,e[e.WEBGL2=2]=`WEBGL2`})(tr||={});var nr;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.WEBGL=1]=`WEBGL`,e[e.CANVAS=2]=`CANVAS`})(nr||={});var rr;(function(e){e[e.COLOR=16384]=`COLOR`,e[e.DEPTH=256]=`DEPTH`,e[e.STENCIL=1024]=`STENCIL`})(rr||={});var ir;(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`})(ir||={});var ar;(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`})(ar||={});var W;(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`})(W||={});var or;(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`})(or||={});var sr;(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`})(sr||={});var cr;(function(e){e[e.FLOAT=0]=`FLOAT`,e[e.INT=1]=`INT`,e[e.UINT=2]=`UINT`})(cr||={});var lr;(function(e){e[e.NEAREST=0]=`NEAREST`,e[e.LINEAR=1]=`LINEAR`})(lr||={});var ur;(function(e){e[e.CLAMP=33071]=`CLAMP`,e[e.REPEAT=10497]=`REPEAT`,e[e.MIRRORED_REPEAT=33648]=`MIRRORED_REPEAT`})(ur||={});var dr;(function(e){e[e.OFF=0]=`OFF`,e[e.POW2=1]=`POW2`,e[e.ON=2]=`ON`,e[e.ON_MANUAL=3]=`ON_MANUAL`})(dr||={});var fr;(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`})(fr||={});var pr;(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`})(pr||={});var mr;(function(e){e[e.AUTO=0]=`AUTO`,e[e.MANUAL=1]=`MANUAL`})(mr||={});var hr;(function(e){e.LOW=`lowp`,e.MEDIUM=`mediump`,e.HIGH=`highp`})(hr||={});var gr;(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`})(gr||={});var _r;(function(e){e[e.RED=1]=`RED`,e[e.GREEN=2]=`GREEN`,e[e.BLUE=4]=`BLUE`,e[e.ALPHA=8]=`ALPHA`})(_r||={});var vr;(function(e){e[e.NONE=0]=`NONE`,e[e.LOW=2]=`LOW`,e[e.MEDIUM=4]=`MEDIUM`,e[e.HIGH=8]=`HIGH`})(vr||={});var yr;(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`})(yr||={});var br={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)}},xr=/iPhone/i,Sr=/iPod/i,Cr=/iPad/i,wr=/\biOS-universal(?:.+)Mac\b/i,Tr=/\bAndroid(?:.+)Mobile\b/i,Er=/Android/i,Dr=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Or=/Silk/i,kr=/Windows Phone/i,Ar=/\bWindows(?:.+)ARM\b/i,jr=/BlackBerry/i,Mr=/BB10/i,Nr=/Opera Mini/i,Pr=/\b(CriOS|Chrome)(?:.+)Mobile/i,Fr=/Mobile(?:.+)Firefox\b/i,Ir=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function Lr(e){return function(t){return t.test(e)}}function Rr(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=Lr(n),a={apple:{phone:i(xr)&&!i(kr),ipod:i(Sr),tablet:!i(xr)&&(i(Cr)||Ir(t))&&!i(kr),universal:i(wr),device:(i(xr)||i(Sr)||i(Cr)||i(wr)||Ir(t))&&!i(kr)},amazon:{phone:i(Dr),tablet:!i(Dr)&&i(Or),device:i(Dr)||i(Or)},android:{phone:!i(kr)&&i(Dr)||!i(kr)&&i(Tr),tablet:!i(kr)&&!i(Dr)&&!i(Tr)&&(i(Or)||i(Er)),device:!i(kr)&&(i(Dr)||i(Or)||i(Tr)||i(Er))||i(/\bokhttp\b/i)},windows:{phone:i(kr),tablet:i(Ar),device:i(kr)||i(Ar)},other:{blackberry:i(jr),blackberry10:i(Mr),opera:i(Nr),firefox:i(Fr),chrome:i(Pr),device:i(jr)||i(Mr)||i(Nr)||i(Fr)||i(Pr)},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 zr=Rr(globalThis.navigator);function Br(){return!zr.apple.device}function Vr(e){var t=!0;if(zr.tablet||zr.phone){if(zr.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(zr.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 G={ADAPTER:br,MIPMAP_TEXTURES:dr.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:vr.NONE,SPRITE_MAX_TEXTURES:Vr(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:mr.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:ur.CLAMP,SCALE_MODE:lr.LINEAR,PRECISION_VERTEX:hr.HIGH,PRECISION_FRAGMENT:zr.apple.device?hr.HIGH:hr.MEDIUM,CAN_UPLOAD_SAME_BUFFER:Br(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Hr=Sn((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===A(e,t,n,r)>0)for(a=t;a=t;a-=r)o=te(a,e[a],e[a+1],o);return o&&S(o,o.next)&&(ne(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(ne(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),ne(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),ne(r),ne(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=ee(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 ee(e,t){var n=new k(e.i,e.x,e.y),r=new k(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 te(e,t,n,r){var i=new k(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 ne(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 k(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(A(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}}),Wr=Sn((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 ee(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function te(e,t){return e+22+75*(e<26)-((t!=0)<<5)}function ne(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 k(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=ee(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=ne(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 A(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(te(_+E%T,0))),f=x(E/T);y.push(S(te(f,0))),a=ne(n,C,r==i),n=0,++r}++n,++t}return y.join(``)}function re(e){return E(e,function(e){return g.test(e)?k(e.slice(4).toLowerCase()):e})}function j(e){return E(e,function(e){return _.test(e)?`xn--`+A(e):e})}if(o={version:`1.4.1`,ucs2:{decode:D,encode:O},decode:k,encode:A,toASCII:j,toUnicode:re},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})(exports)}),Gr=Sn((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)}),Kr=Sn((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}}),qr=Sn((exports,t)=>{var n=Kr(),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=Gr(),r=qr(),i=Kr(),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,ee=!1;(D=D.get(m))!==void 0&&!ee;){var te=D.get(t);if(O+=1,te!==void 0){if(te===O)throw RangeError(`Cyclic object value`);ee=!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 ne=C?i:g(i,f.encoder,w,`key`,x);return[S(ne)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var k=[];if(E===void 0)return k;var A;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),A=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))A=_;else{var re=Object.keys(E);A=v?re.sort(v):re}var j=h?String(i).replace(/\./g,`%2E`):String(i),ie=o&&s(E)&&E.length===1?j+`[]`:j;if(c&&s(E)&&E.length===0)return ie+`[]`;for(var ae=0;ae0?b+y:``}}),Yr=Sn((exports,t)=>{var n=qr(),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=Jr(),r=Yr(),i=Kr();t.exports={formats:i,parse:r,stringify:n}}),Zr=Sn(exports=>{var t=Wr();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},_=Xr();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?re+=`x`:re+=A[j];if(!re.match(f)){var ae=ne.slice(0,E),oe=ne.slice(E+1),se=A.match(p);se&&(ae.push(se[1]),oe.unshift(se[2])),oe.length&&(b=`/`+oe.join(`.`)+b),this.hostname=ae.join(`.`);break}}}this.hostname.length>d?this.hostname=``:this.hostname=this.hostname.toLowerCase(),te||(this.hostname=t.toASCII(this.hostname));var M=this.port?`:`+this.port:``,ce=this.hostname||``;this.host=ce+M,this.href+=this.host,te&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),b[0]!==`/`&&(b=`/`+b))}if(!m[C])for(var E=0,k=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 ee=S[0]===``||S[0]&&S[0].charAt(0)===`/`;if(C){r.hostname=ee?``: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&&!ee&&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.format=y}),Qr=Tn(Hr(),1),$r=Tn(Ur(),1),ei=Tn(Zr(),1),ti={parse:ei.parse,format:ei.format,resolve:ei.resolve};G.RETINA_PREFIX=/@([0-9\.]+)x/,G.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var ni=!1,ri=`6.5.10`;function ii(e){var t;if(!ni){if(G.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf(`chrome`)>-1){var n=[` - %c %c %c PixiJS `+ri+` - ✰ `+e+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ - -`,`background: #ff66a5; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`color: #ff66a5; background: #030307; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`background: #ffc3dc; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`];(t=globalThis.console).log.apply(t,n)}else globalThis.console&&globalThis.console.log(`PixiJS `+ri+` - `+e+` - http://www.pixijs.com/`);ni=!0}}var ai;function oi(){return ai===void 0&&(ai=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:G.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!G.ADAPTER.getWebGLRenderingContext())return!1;var t=G.ADAPTER.createCanvas(),n=t.getContext(`webgl`,e)||t.getContext(`experimental-webgl`,e),r=!!(n&&n.getContextAttributes().stencil);if(n){var i=n.getExtension(`WEBGL_lose_context`);i&&i.loseContext()}return n=null,r}catch{return!1}}()),ai}function si(e,t){return t===void 0&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(e&255)/255,t}function ci(e){var t=e.toString(16);return t=`000000`.substring(0,6-t.length)+t,`#`+t}function li(e){return(e[0]*255<<16)+(e[1]*255<<8)+(e[2]*255|0)}function ui(){for(var e=[],t=[],n=0;n<32;n++)e[n]=n,t[n]=n;e[ir.NORMAL_NPM]=ir.NORMAL,e[ir.ADD_NPM]=ir.ADD,e[ir.SCREEN_NPM]=ir.SCREEN,t[ir.NORMAL]=ir.NORMAL_NPM,t[ir.ADD]=ir.ADD_NPM,t[ir.SCREEN]=ir.SCREEN_NPM;var r=[];return r.push(t),r.push(e),r}var di=ui();function fi(e,t){if(t===1)return(t*255<<24)+e;if(t===0)return 0;var n=e>>16&255,r=e>>8&255,i=e&255;return n=n*t+.5|0,r=r*t+.5|0,i=i*t+.5|0,(t*255<<24)+(n<<16)+(r<<8)+i}function pi(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?`Float32Array`:e instanceof Uint32Array?`Uint32Array`:`Int32Array`;if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return`Uint16Array`}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return`Uint8Array`;return null}function mi(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function hi(e){return!(e&e-1)&&!!e}function gi(e){var t=(e>65535?1:0)<<4;e>>>=t;var n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function _i(e,t,n){var r=e.length,i;if(!(t>=r||n===0)){n=t+n>r?r-t:n;var a=r-n;for(i=t;i8)throw Error(`max arguments reached`);var c=this,l=c.name,u=c.items;this._aliasCount++;for(var d=0,f=u.length;d0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},e.prototype.add=function(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this},e.prototype.remove=function(e){var t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this},e.prototype.contains=function(e){return this.items.indexOf(e)!==-1},e.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(e.prototype,`empty`,{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`name`,{get:function(){return this._name},enumerable:!1,configurable:!0}),e}();Object.defineProperties(Ni.prototype,{dispatch:{value:Ni.prototype.emit},run:{value:Ni.prototype.emit}}),G.TARGET_FPMS=.06;var Pi;(function(e){e[e.INTERACTION=50]=`INTERACTION`,e[e.HIGH=25]=`HIGH`,e[e.NORMAL=0]=`NORMAL`,e[e.LOW=-25]=`LOW`,e[e.UTILITY=-50]=`UTILITY`})(Pi||={});var Fi=function(){function e(e,t,n,r){t===void 0&&(t=null),n===void 0&&(n=0),r===void 0&&(r=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=n,this.once=r}return e.prototype.match=function(e,t){return t===void 0&&(t=null),this.fn===e&&this.context===t},e.prototype.emit=function(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));var t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t},e.prototype.connect=function(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this},e.prototype.destroy=function(e){e===void 0&&(e=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var t=this.next;return this.next=e?null:t,this.previous=null,t},e}(),Ii=function(){function e(){var e=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Fi(null,null,1/0),this.deltaMS=1/G.TARGET_FPMS,this.elapsedMS=1/G.TARGET_FPMS,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&e._requestId===null&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return e.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(e,t,n){return n===void 0&&(n=Pi.NORMAL),this._addListener(new Fi(e,t,n))},e.prototype.addOnce=function(e,t,n){return n===void 0&&(n=Pi.NORMAL),this._addListener(new Fi(e,t,n,!0))},e.prototype._addListener=function(e){var t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this},e.prototype.remove=function(e,t){for(var n=this._head.next;n;)n=n.match(e,t)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,`count`,{get:function(){if(!this._head)return 0;for(var e=0,t=this._head;t=t.next;)e++;return e},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(e){e===void 0&&(e=performance.now());var t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){var n=e-this._lastFrame|0;if(n=this.x&&e=this.y&&te.right?e.right:this.right;if(r<=n)return!1;var i=this.ye.bottom?e.bottom:this.bottom;return a>i}var o=this.left,s=this.right,c=this.top,l=this.bottom;if(s<=o||l<=c)return!1;var u=Ui[0].set(e.left,e.top),d=Ui[1].set(e.left,e.bottom),f=Ui[2].set(e.right,e.top),p=Ui[3].set(e.right,e.bottom);if(f.x<=u.x||d.y<=u.y)return!1;var m=Math.sign(t.a*t.d-t.b*t.c);if(m===0||(t.apply(u,u),t.apply(d,d),t.apply(f,f),t.apply(p,p),Math.max(u.x,d.x,f.x,p.x)<=o||Math.min(u.x,d.x,f.x,p.x)>=s||Math.max(u.y,d.y,f.y,p.y)<=c||Math.min(u.y,d.y,f.y,p.y)>=l))return!1;var h=m*(d.y-u.y),g=m*(u.x-d.x),_=h*o+g*c,v=h*s+g*c,y=h*o+g*l,b=h*s+g*l;if(Math.max(_,v,y,b)<=h*u.x+g*u.y||Math.min(_,v,y,b)>=h*p.x+g*p.y)return!1;var x=m*(u.y-f.y),S=m*(f.x-u.x),C=x*o+S*c,w=x*s+S*c,T=x*o+S*l,E=x*s+S*l;return!(Math.max(C,w,T,E)<=x*u.x+S*u.y||Math.min(C,w,T,E)>=x*p.x+S*p.y)},e.prototype.pad=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this},e.prototype.fit=function(e){var t=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),r=Math.max(this.y,e.y),i=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(n-t,0),this.y=r,this.height=Math.max(i-r,0),this},e.prototype.ceil=function(e,t){e===void 0&&(e=1),t===void 0&&(t=.001);var n=Math.ceil((this.x+this.width-t)*e)/e,r=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=n-this.x,this.height=r-this.y,this},e.prototype.enlarge=function(e){var t=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),r=Math.min(this.y,e.y),i=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=n-t,this.y=r,this.height=i-r,this},e.prototype.toString=function(){return`[@pixi/math:Rectangle x=`+this.x+` y=`+this.y+` width=`+this.width+` height=`+this.height+`]`},e}(),Gi=function(){function e(e,t,n){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),this.x=e,this.y=t,this.radius=n,this.type=Vi.CIRC}return e.prototype.clone=function(){return new e(this.x,this.y,this.radius)},e.prototype.contains=function(e,t){if(this.radius<=0)return!1;var n=this.radius*this.radius,r=this.x-e,i=this.y-t;return r*=r,i*=i,r+i<=n},e.prototype.getBounds=function(){return new Wi(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)},e.prototype.toString=function(){return`[@pixi/math:Circle x=`+this.x+` y=`+this.y+` radius=`+this.radius+`]`},e}(),Ki=function(){function e(e,t,n,r){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),this.x=e,this.y=t,this.width=n,this.height=r,this.type=Vi.ELIP}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var n=(e-this.x)/this.width,r=(t-this.y)/this.height;return n*=n,r*=r,n+r<=1},e.prototype.getBounds=function(){return new Wi(this.x-this.width,this.y-this.height,this.width,this.height)},e.prototype.toString=function(){return`[@pixi/math:Ellipse x=`+this.x+` y=`+this.y+` width=`+this.width+` height=`+this.height+`]`},e}(),qi=function(){function e(){for(var e=arguments,t=[],n=0;nt!=l>t&&e<(c-o)*((t-s)/(l-s))+o;u&&(n=!n)}return n},e.prototype.toString=function(){return`[@pixi/math:Polygon`+(`closeStroke=`+this.closeStroke)+(`points=`+this.points.reduce(function(e,t){return e+`, `+t},``)+`]`)},e}(),Ji=function(){function e(e,t,n,r,i){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=20),this.x=e,this.y=t,this.width=n,this.height=r,this.radius=i,this.type=Vi.RREC}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height,this.radius)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){var n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+n&&t<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;var r=e-(this.x+n),i=t-(this.y+n),a=n*n;if(r*r+i*i<=a||(r=e-(this.x+this.width-n),r*r+i*i<=a)||(i=t-(this.y+this.height-n),r*r+i*i<=a)||(r=e-(this.x+n),r*r+i*i<=a))return!0}return!1},e.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=`+this.x+` y=`+this.y+(`width=`+this.width+` height=`+this.height+` radius=`+this.radius+`]`)},e}(),Yi=function(){function e(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0),this._x=n,this._y=r,this.cb=e,this.scope=t}return e.prototype.clone=function(t,n){return t===void 0&&(t=this.cb),n===void 0&&(n=this.scope),new e(t,n,this._x,this._y)},e.prototype.set=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this},e.prototype.copyFrom=function(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},e.prototype.copyTo=function(e){return e.set(this._x,this._y),e},e.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},e.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=`+this.scope+`]`},Object.defineProperty(e.prototype,`x`,{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`y`,{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),e}(),Xi=function(){function e(e,t,n,r,i,a){e===void 0&&(e=1),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=1),i===void 0&&(i=0),a===void 0&&(a=0),this.array=null,this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=a}return e.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},e.prototype.set=function(e,t,n,r,i,a){return this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=a,this},e.prototype.toArray=function(e,t){this.array||=new Float32Array(9);var n=t||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},e.prototype.apply=function(e,t){t||=new Hi;var n=e.x,r=e.y;return t.x=this.a*n+this.c*r+this.tx,t.y=this.b*n+this.d*r+this.ty,t},e.prototype.applyInverse=function(e,t){t||=new Hi;var n=1/(this.a*this.d+this.c*-this.b),r=e.x,i=e.y;return t.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,t.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,t},e.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},e.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},e.prototype.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this.a,i=this.c,a=this.tx;return this.a=r*t-this.b*n,this.b=r*n+this.b*t,this.c=i*t-this.d*n,this.d=i*n+this.d*t,this.tx=a*t-this.ty*n,this.ty=a*n+this.ty*t,this},e.prototype.append=function(e){var t=this.a,n=this.b,r=this.c,i=this.d;return this.a=e.a*t+e.b*r,this.b=e.a*n+e.b*i,this.c=e.c*t+e.d*r,this.d=e.c*n+e.d*i,this.tx=e.tx*t+e.ty*r+this.tx,this.ty=e.tx*n+e.ty*i+this.ty,this},e.prototype.setTransform=function(e,t,n,r,i,a,o,s,c){return this.a=Math.cos(o+c)*i,this.b=Math.sin(o+c)*i,this.c=-Math.sin(o-s)*a,this.d=Math.cos(o-s)*a,this.tx=e-(n*this.a+r*this.c),this.ty=t-(n*this.b+r*this.d),this},e.prototype.prepend=function(e){var t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){var n=this.a,r=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this},e.prototype.decompose=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=e.pivot,o=-Math.atan2(-r,i),s=Math.atan2(n,t),c=Math.abs(o+s);return c<1e-5||Math.abs(Ri-c)<1e-5?(e.rotation=s,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=s),e.scale.x=Math.sqrt(t*t+n*n),e.scale.y=Math.sqrt(r*r+i*i),e.position.x=this.tx+(a.x*t+a.y*r),e.position.y=this.ty+(a.x*n+a.y*i),e},e.prototype.invert=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.tx,a=e*r-t*n;return this.a=r/a,this.b=-t/a,this.c=-n/a,this.d=e/a,this.tx=(n*this.ty-r*i)/a,this.ty=-(e*this.ty-t*i)/a,this},e.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},e.prototype.clone=function(){var t=new e;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},e.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},e.prototype.toString=function(){return`[@pixi/math:Matrix a=`+this.a+` b=`+this.b+` c=`+this.c+` d=`+this.d+` tx=`+this.tx+` ty=`+this.ty+`]`},Object.defineProperty(e,`IDENTITY`,{get:function(){return new e},enumerable:!1,configurable:!0}),Object.defineProperty(e,`TEMP_MATRIX`,{get:function(){return new e},enumerable:!1,configurable:!0}),e}(),Zi=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Qi=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],$i=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],ea=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],ta=[],na=[],ra=Math.sign;function ia(){for(var e=0;e<16;e++){var t=[];ta.push(t);for(var n=0;n<16;n++)for(var r=ra(Zi[e]*Zi[n]+$i[e]*Qi[n]),i=ra(Qi[e]*Zi[n]+ea[e]*Qi[n]),a=ra(Zi[e]*$i[n]+$i[e]*ea[n]),o=ra(Qi[e]*$i[n]+ea[e]*ea[n]),s=0;s<16;s++)if(Zi[s]===r&&Qi[s]===i&&$i[s]===a&&ea[s]===o){t.push(s);break}}for(var e=0;e<16;e++){var c=new Xi;c.set(Zi[e],Qi[e],$i[e],ea[e],0,0),na.push(c)}}ia();var aa={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(e){return Zi[e]},uY:function(e){return Qi[e]},vX:function(e){return $i[e]},vY:function(e){return ea[e]},inv:function(e){return e&8?e&15:-e&7},add:function(e,t){return ta[e][t]},sub:function(e,t){return ta[e][aa.inv(t)]},rotate180:function(e){return e^4},isVertical:function(e){return(e&3)==2},byDirection:function(e,t){return Math.abs(e)*2<=Math.abs(t)?t>=0?aa.S:aa.N:Math.abs(t)*2<=Math.abs(e)?e>0?aa.E:aa.W:t>0?e>0?aa.SE:aa.SW:e>0?aa.NE:aa.NW},matrixAppendRotationInv:function(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=na[aa.inv(t)];i.tx=n,i.ty=r,e.append(i)}},oa=function(){function e(){this.worldTransform=new Xi,this.localTransform=new Xi,this.position=new Yi(this.onChange,this,0,0),this.scale=new Yi(this.onChange,this,1,1),this.pivot=new Yi(this.onChange,this,0,0),this.skew=new Yi(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},e.prototype.toString=function(){return`[@pixi/math:Transform `+(`position=(`+this.position.x+`, `+this.position.y+`) `)+(`rotation=`+this.rotation+` `)+(`scale=(`+this.scale.x+`, `+this.scale.y+`) `)+(`skew=(`+this.skew.x+`, `+this.skew.y+`) `)+`]`},e.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(e){var t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}},e.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},Object.defineProperty(e.prototype,`rotation`,{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())},enumerable:!1,configurable:!0}),e.IDENTITY=new e,e}();G.PREFER_ENV=zr.any?tr.WEBGL:tr.WEBGL2,G.STRICT_TEXTURE_CACHE=!1;var sa=[];function ca(e,t){if(!e)return null;var n=``;if(typeof e==`string`){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);r&&(n=r[1].toLowerCase())}for(var i=sa.length-1;i>=0;--i){var a=sa[i];if(a.test&&a.test(e,n))return new a(e,t)}throw Error(`Unrecognized source type to auto-detect Resource`)} -/*! ***************************************************************************** - -Copyright (c) Microsoft Corporation. - - - -Permission to use, copy, modify, and/or distribute this software for any - -purpose with or without fee is hereby granted. - - - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - -PERFORMANCE OF THIS SOFTWARE. - -***************************************************************************** */ -var la=function(e,t){return la=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},la(e,t)};function ua(e,t){la(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var da=function(){return da=Object.assign||function(e){for(var t=arguments,n,r=1,i=arguments.length;r0&&l>0,r.textureCacheIds=[],r.destroyed=!1,r.resource=null,r._batchEnabled=0,r._batchLocation=0,r.parentTextureArray=null,r.setResource(t),r}return Object.defineProperty(t.prototype,`realWidth`,{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`realHeight`,{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`mipmap`,{get:function(){return this._mipmap},set:function(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scaleMode`,{get:function(){return this._scaleMode},set:function(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`wrapMode`,{get:function(){return this._wrapMode},set:function(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(e,t){var n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this},t.prototype.setSize=function(e,t,n){return n||=this.resolution,this.setRealSize(e*n,t*n,n)},t.prototype.setRealSize=function(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this},t.prototype._refreshPOT=function(){this.isPowerOfTwo=hi(this.realWidth)&&hi(this.realHeight)},t.prototype.setResolution=function(e){var t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit(`update`,this)),this._refreshPOT(),this)},t.prototype.setResource=function(e){if(this.resource===e)return this;if(this.resource)throw Error(`Resource can be set only once`);return e.bind(this),this.resource=e,this},t.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit(`update`,this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit(`loaded`,this),this.emit(`update`,this))},t.prototype.onError=function(e){this.emit(`error`,this,e)},t.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete wi[this.cacheId],delete Ci[this.cacheId],this.cacheId=null),this.dispose(),t.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},t.prototype.dispose=function(){this.emit(`dispose`,this)},t.prototype.castToBaseTexture=function(){return this},t.from=function(e,n,r){r===void 0&&(r=G.STRICT_TEXTURE_CACHE);var i=typeof e==`string`,a=null;if(i)a=e;else{if(!e._pixiId){var o=n&&n.pixiIdPrefix||`pixiid`;e._pixiId=o+`_`+yi()}a=e._pixiId}var s=wi[a];if(i&&r&&!s)throw Error(`The cacheId "`+a+`" does not exist in BaseTextureCache.`);return s||(s=new t(e,n),s.cacheId=a,t.addToCache(s,a)),s},t.fromBuffer=function(e,n,r,i){e||=new Float32Array(n*r*4);var a=new ma(e,{width:n,height:r}),o=e instanceof Float32Array?sr.FLOAT:sr.UNSIGNED_BYTE;return new t(a,Object.assign({},ha,i||{width:n,height:r,type:o}))},t.addToCache=function(e,t){t&&(e.textureCacheIds.indexOf(t)===-1&&e.textureCacheIds.push(t),wi[t]&&console.warn(`BaseTexture added to the cache with an id [`+t+`] that already had an entry`),wi[t]=e)},t.removeFromCache=function(e){if(typeof e==`string`){var t=wi[e];if(t){var n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete wi[e],t}}else if(e&&e.textureCacheIds){for(var r=0;r0)if(e.resource)this.addResourceAt(e.resource,t);else throw Error(`CubeResource does not support copying of renderTexture.`);else e.target=or.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this},t.prototype.upload=function(e,n,r){for(var i=this.itemDirtyIds,a=0;a)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(ya),wa=function(e){ua(t,e);function t(n,r){var i=this;if(r||={},!(n instanceof HTMLVideoElement)){var a=document.createElement(`video`);a.setAttribute(`preload`,`auto`),a.setAttribute(`webkit-playsinline`,``),a.setAttribute(`playsinline`,``),typeof n==`string`&&(n=[n]);var o=n[0].src||n[0];ya.crossOrigin(a,o,r.crossorigin);for(var s=0;s2},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Ii.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Ii.shared.remove(this.update,this),this._isConnectedToTicker=!1)},t.prototype._onCanPlay=function(){var e=this.source;e.removeEventListener(`canplay`,this._onCanPlay),e.removeEventListener(`canplaythrough`,this._onCanPlay);var t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&(Ii.shared.remove(this.update,this),this._isConnectedToTicker=!1);var t=this.source;t&&(t.removeEventListener(`error`,this._onError,!0),t.pause(),t.src=``,t.load()),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,`autoUpdate`,{get:function(){return this._autoUpdate},set:function(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Ii.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Ii.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`updateFPS`,{get:function(){return this._updateFPS},set:function(e){e!==this._updateFPS&&(this._updateFPS=e)},enumerable:!1,configurable:!0}),t.test=function(e,n){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||t.TYPES.indexOf(n)>-1},t.TYPES=[`mp4`,`m4v`,`webm`,`ogg`,`ogv`,`h264`,`avi`,`mov`],t.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`},t}(ya),Ta=function(e){ua(t,e);function t(t){return e.call(this,t)||this}return t.test=function(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<`u`&&e instanceof ImageBitmap},t}(ya);sa.push(Sa,Ta,ba,wa,Ca,ma,xa,va);var Ea={__proto__:null,Resource:pa,BaseImageResource:ya,INSTALLED:sa,autoDetectResource:ca,AbstractMultiResource:_a,ArrayResource:va,BufferResource:ma,CanvasResource:ba,CubeResource:xa,ImageResource:Sa,SVGResource:Ca,VideoResource:wa,ImageBitmapResource:Ta},Da=function(e){ua(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.upload=function(e,t,n){var r=e.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===fr.UNPACK);var i=t.realWidth,a=t.realHeight;return n.width===i&&n.height===a?r.texSubImage2D(t.target,0,0,0,i,a,t.format,n.type,this.data):(n.width=i,n.height=a,r.texImage2D(t.target,0,n.internalFormat,i,a,0,t.format,n.type,this.data)),!0},t}(ma),Oa=function(){function e(e,t){this.width=Math.round(e||100),this.height=Math.round(t||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Ni(`disposeFramebuffer`),this.multisample=vr.NONE}return Object.defineProperty(e.prototype,`colorTexture`,{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(e,t){return e===void 0&&(e=0),this.colorTextures[e]=t||new ga(null,{scaleMode:lr.NEAREST,resolution:1,mipmap:dr.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(e){return this.depthTexture=e||new ga(new Da(null,{width:this.width,height:this.height}),{scaleMode:lr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:dr.OFF,format:W.DEPTH_COMPONENT,type:sr.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(e,t){if(e=Math.round(e),t=Math.round(t),!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&t.textureCacheIds.splice(n,1),delete Ci[e],t}}else if(e&&e.textureCacheIds){for(var r=0;rthis.baseTexture.width,o=n+i>this.baseTexture.height;if(a||o){var s=a&&o?`and`:`or`,c=`X: `+t+` + `+r+` = `+(t+r)+` > `+this.baseTexture.width,l=`Y: `+n+` + `+i+` = `+(n+i)+` > `+this.baseTexture.height;throw Error(`Texture Error: frame does not fit inside the base Texture dimensions: `+(c+` `+s+` `+l))}this.valid=r&&i&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`rotate`,{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`width`,{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),t.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(t,`EMPTY`,{get:function(){return t._EMPTY||(t._EMPTY=new t(new ga),Ma(t._EMPTY),Ma(t._EMPTY.baseTexture)),t._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(t,`WHITE`,{get:function(){if(!t._WHITE){var e=G.ADAPTER.createCanvas(16,16),n=e.getContext(`2d`);e.width=16,e.height=16,n.fillStyle=`white`,n.fillRect(0,0,16,16),t._WHITE=new t(ga.from(e)),Ma(t._WHITE),Ma(t._WHITE.baseTexture)}return t._WHITE},enumerable:!1,configurable:!0}),t}(Qr.default),Pa=function(e){ua(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.valid=!0,r.filterFrame=null,r.filterPoolKey=null,r.updateUvs(),r}return Object.defineProperty(t.prototype,`framebuffer`,{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`multisample`,{get:function(){return this.framebuffer.multisample},set:function(e){this.framebuffer.multisample=e},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t,n){n===void 0&&(n=!0);var r=this.baseTexture.resolution,i=Math.round(e*r)/r,a=Math.round(t*r)/r;this.valid=i>0&&a>0,this._frame.width=this.orig.width=i,this._frame.height=this.orig.height=a,n&&this.baseTexture.resize(i,a),this.updateUvs()},t.prototype.setResolution=function(e){var t=this.baseTexture;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))},t.create=function(e){for(var n=arguments,r=[],i=1;i>>0,r>1&&(i+=r*4294967296)):i=r>1?-r:-1,this.texturePool[i]||(this.texturePool[i]=[]);var a=this.texturePool[i].pop();return a||=this.createTexture(e,t,r),a.filterPoolKey=i,a.setResolution(n),a},e.prototype.getFilterTexture=function(e,t,n){var r=this.getOptimalTexture(e.width,e.height,t||e.resolution,n||vr.NONE);return r.filterFrame=e.filterFrame,r},e.prototype.returnTexture=function(e){var t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)},e.prototype.returnFilterTexture=function(e){this.returnTexture(e)},e.prototype.clear=function(e){if(e=e!==!1,e)for(var t in this.texturePool){var n=this.texturePool[t];if(n)for(var r=0;r0&&e.height>0,this.texturePool){if(!(Number(t)<0))continue;var n=this.texturePool[t];if(n)for(var r=0;r1){for(var l=0;l1&&(u=this.getOptimalFilterTexture(l.width,l.height,t.resolution),u.filterFrame=l.filterFrame),n[d].apply(this,l,u,pr.CLEAR,t);var f=l;l=u,u=f}n[d].apply(this,l,c.renderTexture,pr.BLEND,t),d>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(l),this.returnFilterTexture(u)}t.clear(),this.statePool.push(t)},e.prototype.bindAndClear=function(e,t){t===void 0&&(t=pr.CLEAR);var n=this.renderer,r=n.renderTexture,i=n.state;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e&&e.filterFrame){var a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,r.bind(e,e.filterFrame,a)}else e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame):r.bind(e);var o=i.stateId&1||this.forceClear;(t===pr.CLEAR||t===pr.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)},e.prototype.applyFilter=function(e,t,n,r){var i=this.renderer;i.state.set(e.state),this.bindAndClear(n,r),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,i.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),i.geometry.bind(this.quadUv),i.geometry.draw(ar.TRIANGLES)):(i.geometry.bind(this.quad),i.geometry.draw(ar.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(e,t){var n=this.activeState,r=n.sourceFrame,i=n.destinationFrame,a=t._texture.orig,o=e.set(i.width,0,0,i.height,r.x,r.y),s=t.worldTransform.copyTo(Xi.TEMP_MATRIX);return s.invert(),o.prepend(s),o.scale(1/a.width,1/a.height),o.translate(t.anchor.x,t.anchor.y),o},e.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(e,t,n,r){return n===void 0&&(n=1),r===void 0&&(r=vr.NONE),this.texturePool.getOptimalTexture(e,t,n,r)},e.prototype.getFilterTexture=function(e,t,n){if(typeof e==`number`){var r=e;e=t,t=r}e||=this.activeState.renderTexture;var i=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,n||vr.NONE);return i.filterFrame=e.filterFrame,i},e.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e.prototype.transformAABB=function(e,t){var n=Xa[0],r=Xa[1],i=Xa[2],a=Xa[3];n.set(t.left,t.top),r.set(t.left,t.bottom),i.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(n,n),e.apply(r,r),e.apply(i,i),e.apply(a,a);var o=Math.min(n.x,r.x,i.x,a.x),s=Math.min(n.y,r.y,i.y,a.y),c=Math.max(n.x,r.x,i.x,a.x),l=Math.max(n.y,r.y,i.y,a.y);t.x=o,t.y=s,t.width=c-o,t.height=l-s},e.prototype.roundFrame=function(e,t,n,r,i){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(i){var a=i.a,o=i.b,s=i.c,c=i.d;if((Math.abs(o)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(c)>1e-4))return}i=i?Za.copyFrom(i):Za.identity(),i.translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.transformAABB(i,e),e.ceil(t),this.transformAABB(i.invert(),e)}},e}(),$a=function(){function e(e){this.renderer=e}return e.prototype.flush=function(){},e.prototype.destroy=function(){this.renderer=null},e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.render=function(e){},e}(),eo=function(){function e(e){this.renderer=e,this.emptyRenderer=new $a(e),this.currentRenderer=this.emptyRenderer}return e.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(e,t){for(var n=this.renderer.texture.boundTextures,r=t-1;r>=0;--r)e[r]=n[r]||null,e[r]&&(e[r]._batchLocation=r)},e.prototype.boundArray=function(e,t,n,r){for(var i=e.elements,a=e.ids,o=e.count,s=0,c=0;c=0&&u=tr.WEBGL2&&(n=e.getContext(`webgl2`,t)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext(`webgl`,t)||e.getContext(`experimental-webgl`,t),!n)throw Error(`This browser does not support WebGL. Try using the canvas renderer`);return this.gl=n,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var e=this.gl,t={loseContext:e.getExtension(`WEBGL_lose_context`),anisotropicFiltering:e.getExtension(`EXT_texture_filter_anisotropic`),floatTextureLinear:e.getExtension(`OES_texture_float_linear`),s3tc:e.getExtension(`WEBGL_compressed_texture_s3tc`),s3tc_sRGB:e.getExtension(`WEBGL_compressed_texture_s3tc_srgb`),etc:e.getExtension(`WEBGL_compressed_texture_etc`),etc1:e.getExtension(`WEBGL_compressed_texture_etc1`),pvrtc:e.getExtension(`WEBGL_compressed_texture_pvrtc`)||e.getExtension(`WEBKIT_WEBGL_compressed_texture_pvrtc`),atc:e.getExtension(`WEBGL_compressed_texture_atc`),astc:e.getExtension(`WEBGL_compressed_texture_astc`)};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension(`WEBGL_draw_buffers`),depthTexture:e.getExtension(`WEBGL_depth_texture`),vertexArrayObject:e.getExtension(`OES_vertex_array_object`)||e.getExtension(`MOZ_OES_vertex_array_object`)||e.getExtension(`WEBKIT_OES_vertex_array_object`),uint32ElementIndex:e.getExtension(`OES_element_index_uint`),floatTexture:e.getExtension(`OES_texture_float`),floatTextureLinear:e.getExtension(`OES_texture_float_linear`),textureHalfFloat:e.getExtension(`OES_texture_half_float`),textureHalfFloatLinear:e.getExtension(`OES_texture_half_float_linear`)}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension(`EXT_color_buffer_float`)})},e.prototype.handleContextLost=function(e){var t=this;e.preventDefault(),setTimeout(function(){t.gl.isContextLost()&&t.extensions.loseContext&&t.extensions.loseContext.restoreContext()},0)},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener(`webglcontextlost`,this.handleContextLost),e.removeEventListener(`webglcontextrestored`,this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(e){var t=e.getContextAttributes(),n=`WebGL2RenderingContext`in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),t&&!t.stencil&&console.warn(`Provided WebGL context does not have a stencil buffer, masks may not render correctly`);var r=n||!!e.getExtension(`OES_element_index_uint`);this.supports.uint32Indices=r,r||console.warn(`Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly`)},e}(),ro=function(){function e(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=vr.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return e}(),io=new Wi,ao=function(){function e(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new Oa(10,10),this.msaaSamples=null}return e.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Wi,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var t=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;G.PREFER_ENV===tr.WEBGL_LEGACY&&(t=null,n=null),t?e.drawBuffers=function(e){return t.drawBuffersWEBGL(e)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},e.prototype.bind=function(e,t,n){n===void 0&&(n=0);var r=this.gl;if(e){var i=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,i.mipLevel=n),i.dirtyId!==e.dirtyId&&(i.dirtyId=e.dirtyId,i.dirtyFormat===e.dirtyFormat?i.dirtySize!==e.dirtySize&&(i.dirtySize=e.dirtySize,this.resizeFramebuffer(e)):(i.dirtyFormat=e.dirtyFormat,i.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)));for(var a=0;a>n,c=t.height>>n,l=s/t.width;this.setViewport(t.x*l,t.y*l,s,c)}else{var s=e.width>>n,c=e.height>>n;this.setViewport(0,0,s,c)}}else this.current&&(this.current=null,r.bindFramebuffer(r.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(e,t,n,r){var i=this.viewport;e=Math.round(e),t=Math.round(t),n=Math.round(n),r=Math.round(r),(i.width!==n||i.height!==r||i.x!==e||i.y!==t)&&(i.x=e,i.y=t,i.width=n,i.height=r,this.gl.viewport(e,t,n,r))},Object.defineProperty(e.prototype,`size`,{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),e.prototype.clear=function(e,t,n,r,i){i===void 0&&(i=rr.COLOR|rr.DEPTH);var a=this.gl;a.clearColor(e,t,n,r),a.clear(i)},e.prototype.initFramebuffer=function(e){var t=this.gl,n=new ro(t.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n},e.prototype.resizeFramebuffer=function(e){var t=this.gl,n=e.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,n.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.RGBA8,e.width,e.height)),n.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,n.stencil),n.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.DEPTH24_STENCIL8,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height));var r=e.colorTextures,i=r.length;t.drawBuffers||(i=Math.min(i,1));for(var a=0;a1&&this.canMultisampleFramebuffer(e)?(r.msaaBuffer=r.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.RGBA8,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,r.msaaBuffer)):r.msaaBuffer&&(n.deleteRenderbuffer(r.msaaBuffer),r.msaaBuffer=null,r.blitFramebuffer&&(r.blitFramebuffer.dispose(),r.blitFramebuffer=null));for(var o=[],s=0;s1&&n.drawBuffers(o),e.depthTexture){var u=this.writeDepthTexture;if(u){var d=e.depthTexture;this.renderer.texture.bind(d,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,t)}}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(r.stencil=r.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,r.stencil)):r.stencil&&(n.deleteRenderbuffer(r.stencil),r.stencil=null)},e.prototype.canMultisampleFramebuffer=function(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture},e.prototype.detectSamples=function(e){var t=this.msaaSamples,n=vr.NONE;if(e<=1||t===null)return n;for(var r=0;r=0&&this.managedFramebuffers.splice(i,1),e.disposeRunner.remove(this),t||(r.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&r.deleteRenderbuffer(n.msaaBuffer),n.stencil&&r.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},e.prototype.disposeAll=function(e){var t=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=tr.WEBGL2&&(t=e.getContext(`webgl2`,{})),t||(t=e.getContext(`webgl`,{})||e.getContext(`experimental-webgl`,{}),t?t.getExtension(`WEBGL_draw_buffers`):t=null),go=t}return go}var vo;function yo(){if(!vo){vo=hr.MEDIUM;var e=_o();if(e&&e.getShaderPrecisionFormat){var t=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);vo=t.precision?hr.HIGH:hr.MEDIUM}}return vo}function bo(e,t,n){if(e.substring(0,9)!==`precision`){var r=t;return t===hr.HIGH&&n!==hr.HIGH&&(r=hr.MEDIUM),`precision `+r+` float; -`+e}else if(n!==hr.HIGH&&e.substring(0,15)===`precision highp`)return e.replace(`precision highp`,`precision mediump`);return e}var xo={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function So(e){return xo[e]}var Co=null,wo={FLOAT:`float`,FLOAT_VEC2:`vec2`,FLOAT_VEC3:`vec3`,FLOAT_VEC4:`vec4`,INT:`int`,INT_VEC2:`ivec2`,INT_VEC3:`ivec3`,INT_VEC4:`ivec4`,UNSIGNED_INT:`uint`,UNSIGNED_INT_VEC2:`uvec2`,UNSIGNED_INT_VEC3:`uvec3`,UNSIGNED_INT_VEC4:`uvec4`,BOOL:`bool`,BOOL_VEC2:`bvec2`,BOOL_VEC3:`bvec3`,BOOL_VEC4:`bvec4`,FLOAT_MAT2:`mat2`,FLOAT_MAT3:`mat3`,FLOAT_MAT4:`mat4`,SAMPLER_2D:`sampler2D`,INT_SAMPLER_2D:`sampler2D`,UNSIGNED_INT_SAMPLER_2D:`sampler2D`,SAMPLER_CUBE:`samplerCube`,INT_SAMPLER_CUBE:`samplerCube`,UNSIGNED_INT_SAMPLER_CUBE:`samplerCube`,SAMPLER_2D_ARRAY:`sampler2DArray`,INT_SAMPLER_2D_ARRAY:`sampler2DArray`,UNSIGNED_INT_SAMPLER_2D_ARRAY:`sampler2DArray`};function To(e,t){if(!Co){var n=Object.keys(wo);Co={};for(var r=0;r0&&(t+=` -else `),n0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==t&&this.renderer.gl.colorMask((n&1)!=0,(n&2)!=0,(n&4)!=0,(n&8)!=0)},e.prototype.destroy=function(){this.renderer=null},e}(),rs=function(){function e(e){this.renderer=e,this.maskStack=[],this.glConst=0}return e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(e){var t=this.renderer.gl,n=this.getStackLength();this.maskStack=e;var r=this.getStackLength();r!==n&&(r===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){this.renderer=null,this.maskStack=null},e}(),os=new Xi,ss=[],cs=function(e){ua(t,e);function t(t){var n=e.call(this,t)||this;return n.glConst=G.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,n}return t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0},t.prototype.calcScissorRect=function(e){var t;if(!e._scissorRectLocal){var n=e._scissorRect,r=e.maskObject,i=this.renderer,a=i.renderTexture,o=r.getBounds(!0,(t=ss.pop())??new Wi);this.roundFrameToPixels(o,a.current?a.current.resolution:i.resolution,a.sourceFrame,a.destinationFrame,i.projection.transform),n&&o.fit(n),e._scissorRectLocal=o}},t.isMatrixRotated=function(e){if(!e)return!1;var t=e.a,n=e.b,r=e.c,i=e.d;return(Math.abs(n)>1e-4||Math.abs(r)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)},t.prototype.testScissor=function(e){var n=e.maskObject;if(!n.isFastRect||!n.isFastRect()||t.isMatrixRotated(n.worldTransform)||t.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);var r=e._scissorRectLocal;return r.width>0&&r.height>0},t.prototype.roundFrameToPixels=function(e,n,r,i,a){t.isMatrixRotated(a)||(a=a?os.copyFrom(a):os.identity(),a.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.renderer.filter.transformAABB(a,e),e.fit(i),e.x=Math.round(e.x*n),e.y=Math.round(e.y*n),e.width=Math.round(e.width*n),e.height=Math.round(e.height*n))},t.prototype.push=function(e){e._scissorRectLocal||this.calcScissorRect(e);var t=this.renderer.gl;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;e&&ss.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)},t.prototype._useCurrent=function(){var e=this.maskStack[this.maskStack.length-1]._scissorRect,t;t=this.renderer.renderTexture.current?e.y:this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)},t}(rs),ls=function(e){ua(t,e);function t(t){var n=e.call(this,t)||this;return n.glConst=G.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,n}return t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0},t.prototype.push=function(e){var t=e.maskObject,n=this.renderer.gl,r=e._stencilCounter;r===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),e._stencilCounter++;var i=e._colorMask;i!==0&&(e._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,r,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(e._colorMask=i,n.colorMask((i&1)!=0,(i&2)!=0,(i&4)!=0,(i&8)!=0)),this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{var n=this.maskStack.length===0?null:this.maskStack[this.maskStack.length-1],r=n?n._colorMask:15;r!==0&&(n._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,r!==0&&(n._colorMask=r,t.colorMask((r&1)!=0,(r&2)!=0,(r&4)!=0,(r&8)!=0)),this._useCurrent()}},t.prototype._useCurrent=function(){var e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},t}(rs),us=function(){function e(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Xi,this.transform=null}return e.prototype.update=function(e,t,n,r){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,r),this.transform&&this.projectionMatrix.append(this.transform);var i=this.renderer;i.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,i.globalUniforms.update(),i.shader.shader&&i.shader.syncUniformGroup(i.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(e,t,n,r){var i=this.projectionMatrix,a=r?-1:1;i.identity(),i.a=1/t.width*2,i.d=a*(1/t.height*2),i.tx=-1-t.x*i.a,i.ty=-a-t.y*i.d},e.prototype.setTransform=function(e){},e.prototype.destroy=function(){this.renderer=null},e}(),ds=new Wi,fs=new Wi,ps=function(){function e(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Wi,this.destinationFrame=new Wi,this.viewportFrame=new Wi}return e.prototype.bind=function(e,t,n){e===void 0&&(e=null);var r=this.renderer;this.current=e;var i,a,o;e?(i=e.baseTexture,o=i.resolution,t||(ds.width=e.frame.width,ds.height=e.frame.height,t=ds),n||(fs.x=e.frame.x,fs.y=e.frame.y,fs.width=t.width,fs.height=t.height,n=fs),a=i.framebuffer):(o=r.resolution,t||(ds.width=r.screen.width,ds.height=r.screen.height,t=ds),n||(n=ds,n.width=t.width,n.height=t.height));var s=this.viewportFrame;s.x=n.x*o,s.y=n.y*o,s.width=n.width*o,s.height=n.height*o,e||(s.y=r.view.height-(s.y+s.height)),s.ceil(),this.renderer.framebuffer.bind(a,s),this.renderer.projection.update(n,t,o,!a),e?this.renderer.mask.setMaskStack(i.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(n)},e.prototype.clear=function(e,t){this.current?e||=this.current.baseTexture.clearColor:e||=this.clearColor;var n=this.destinationFrame,r=this.current?this.current.baseTexture:this.renderer.screen,i=n.width!==r.width||n.height!==r.height;if(i){var a=this.viewportFrame,o=a.x,s=a.y,c=a.width,l=a.height;o=Math.round(o),s=Math.round(s),c=Math.round(c),l=Math.round(l),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(o,s,c,l)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],t),i&&this.renderer.scissor.pop()},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e.prototype.destroy=function(){this.renderer=null},e}();function ms(e,t,n,r,i){n.buffer.update(i)}var hs={float:` - data[offset] = v; - `,vec2:` - data[offset] = v[0]; - data[offset+1] = v[1]; - `,vec3:` - data[offset] = v[0]; - data[offset+1] = v[1]; - data[offset+2] = v[2]; - - `,vec4:` - data[offset] = v[0]; - data[offset+1] = v[1]; - data[offset+2] = v[2]; - data[offset+3] = v[3]; - `,mat2:` - data[offset] = v[0]; - data[offset+1] = v[1]; - - data[offset+4] = v[2]; - data[offset+5] = v[3]; - `,mat3:` - data[offset] = v[0]; - data[offset+1] = v[1]; - data[offset+2] = v[2]; - - data[offset + 4] = v[3]; - data[offset + 5] = v[4]; - data[offset + 6] = v[5]; - - data[offset + 8] = v[6]; - data[offset + 9] = v[7]; - data[offset + 10] = v[8]; - `,mat4:` - for(var i = 0; i < 16; i++) - { - data[offset + i] = v[i]; - } - `},gs={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function _s(e){for(var t=e.map(function(e){return{data:e,offset:0,dataLen:0,dirty:0}}),n=0,r=0,i=0,a=0;a1&&(n=Math.max(n,16)*o.data.size),o.dataLen=n,r%n!==0&&r<16){var s=r%n%16;r+=s,i+=s}r+n>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=n,r=n):(o.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function vs(e,t){var n=[];for(var r in e)t[r]&&n.push(t[r]);return n.sort(function(e,t){return e.index-t.index}),n}function ys(e,t){if(!e.autoManage)return{size:0,syncFunc:ms};for(var n=vs(e.uniforms,t),r=_s(n),i=r.uboElements,a=r.size,o=[` - var v = null; - var v2 = null; - var cv = null; - var t = 0; - var gl = renderer.gl - var index = 0; - var data = buffer.data; - `],s=0;s1){var m=So(c.data.type),h=Math.max(gs[c.data.type]/16,1),g=m/h,_=(4-g%4)%4;o.push(` - cv = ud.`+u+`.value; - v = uv.`+u+`; - offset = `+c.offset/4+`; - - t = 0; - - for(var i=0; i < `+c.data.size*h+`; i++) - { - for(var j = 0; j < `+g+`; j++) - { - data[offset++] = v[t++]; - } - offset += `+_+`; - } - - `)}else{var v=hs[c.data.type];o.push(` - cv = ud.`+u+`.value; - v = uv.`+u+`; - offset = `+c.offset/4+`; - `+v+`; - `)}}return o.push(` - renderer.buffer.update(buffer); - `),{size:a,syncFunc:Function(`ud`,`uv`,`renderer`,`syncData`,`buffer`,o.join(` -`))}}var bs=function(){function e(){}return e}(),xs=function(){function e(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return e.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},e}();function Ss(e,t){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;it?1:-1});for(var o=0;o>=1,n++;this.stateId=e.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var e=this.renderer.texture,t=e.managedTextures,n=!1,r=0;rthis.maxIdle&&(e.destroyTexture(i,!0),t[r]=null,n=!0)}if(n){for(var a=0,r=0;r=0;r--)this.unload(e.children[r])},e.prototype.destroy=function(){this.renderer=null},e}();function Ls(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;return C=`WebGL2RenderingContext`in globalThis&&e instanceof globalThis.WebGL2RenderingContext?(t={},t[sr.UNSIGNED_BYTE]=(n={},n[W.RGBA]=e.RGBA8,n[W.RGB]=e.RGB8,n[W.RG]=e.RG8,n[W.RED]=e.R8,n[W.RGBA_INTEGER]=e.RGBA8UI,n[W.RGB_INTEGER]=e.RGB8UI,n[W.RG_INTEGER]=e.RG8UI,n[W.RED_INTEGER]=e.R8UI,n[W.ALPHA]=e.ALPHA,n[W.LUMINANCE]=e.LUMINANCE,n[W.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,n),t[sr.BYTE]=(r={},r[W.RGBA]=e.RGBA8_SNORM,r[W.RGB]=e.RGB8_SNORM,r[W.RG]=e.RG8_SNORM,r[W.RED]=e.R8_SNORM,r[W.RGBA_INTEGER]=e.RGBA8I,r[W.RGB_INTEGER]=e.RGB8I,r[W.RG_INTEGER]=e.RG8I,r[W.RED_INTEGER]=e.R8I,r),t[sr.UNSIGNED_SHORT]=(i={},i[W.RGBA_INTEGER]=e.RGBA16UI,i[W.RGB_INTEGER]=e.RGB16UI,i[W.RG_INTEGER]=e.RG16UI,i[W.RED_INTEGER]=e.R16UI,i[W.DEPTH_COMPONENT]=e.DEPTH_COMPONENT16,i),t[sr.SHORT]=(a={},a[W.RGBA_INTEGER]=e.RGBA16I,a[W.RGB_INTEGER]=e.RGB16I,a[W.RG_INTEGER]=e.RG16I,a[W.RED_INTEGER]=e.R16I,a),t[sr.UNSIGNED_INT]=(o={},o[W.RGBA_INTEGER]=e.RGBA32UI,o[W.RGB_INTEGER]=e.RGB32UI,o[W.RG_INTEGER]=e.RG32UI,o[W.RED_INTEGER]=e.R32UI,o[W.DEPTH_COMPONENT]=e.DEPTH_COMPONENT24,o),t[sr.INT]=(s={},s[W.RGBA_INTEGER]=e.RGBA32I,s[W.RGB_INTEGER]=e.RGB32I,s[W.RG_INTEGER]=e.RG32I,s[W.RED_INTEGER]=e.R32I,s),t[sr.FLOAT]=(c={},c[W.RGBA]=e.RGBA32F,c[W.RGB]=e.RGB32F,c[W.RG]=e.RG32F,c[W.RED]=e.R32F,c[W.DEPTH_COMPONENT]=e.DEPTH_COMPONENT32F,c),t[sr.HALF_FLOAT]=(l={},l[W.RGBA]=e.RGBA16F,l[W.RGB]=e.RGB16F,l[W.RG]=e.RG16F,l[W.RED]=e.R16F,l),t[sr.UNSIGNED_SHORT_5_6_5]=(u={},u[W.RGB]=e.RGB565,u),t[sr.UNSIGNED_SHORT_4_4_4_4]=(d={},d[W.RGBA]=e.RGBA4,d),t[sr.UNSIGNED_SHORT_5_5_5_1]=(f={},f[W.RGBA]=e.RGB5_A1,f),t[sr.UNSIGNED_INT_2_10_10_10_REV]=(p={},p[W.RGBA]=e.RGB10_A2,p[W.RGBA_INTEGER]=e.RGB10_A2UI,p),t[sr.UNSIGNED_INT_10F_11F_11F_REV]=(m={},m[W.RGB]=e.R11F_G11F_B10F,m),t[sr.UNSIGNED_INT_5_9_9_9_REV]=(h={},h[W.RGB]=e.RGB9_E5,h),t[sr.UNSIGNED_INT_24_8]=(g={},g[W.DEPTH_STENCIL]=e.DEPTH24_STENCIL8,g),t[sr.FLOAT_32_UNSIGNED_INT_24_8_REV]=(_={},_[W.DEPTH_STENCIL]=e.DEPTH32F_STENCIL8,_),t):(v={},v[sr.UNSIGNED_BYTE]=(y={},y[W.RGBA]=e.RGBA,y[W.RGB]=e.RGB,y[W.ALPHA]=e.ALPHA,y[W.LUMINANCE]=e.LUMINANCE,y[W.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,y),v[sr.UNSIGNED_SHORT_5_6_5]=(b={},b[W.RGB]=e.RGB,b),v[sr.UNSIGNED_SHORT_4_4_4_4]=(x={},x[W.RGBA]=e.RGBA,x),v[sr.UNSIGNED_SHORT_5_5_5_1]=(S={},S[W.RGBA]=e.RGBA,S),v),C}var Rs=function(){function e(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=sr.UNSIGNED_BYTE,this.internalFormat=W.RGBA,this.samplerType=0}return e}(),zs=function(){function e(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new ga,this.hasIntegerTextures=!1}return e.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=Ls(e);var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(var n=0;n=0;--a){var o=n[a];if(o){var s=o._glTextures[i];s.samplerType!==cr.FLOAT&&this.renderer.texture.unbind(o)}}},e.prototype.initTexture=function(e){var t=new Rs(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on(`dispose`,this.destroyTexture,this),t},e.prototype.initTextureType=function(e,t){var n,r;t.internalFormat=(r=(n=this.internalFormats[e.type])?.[e.format])??e.format,this.webGLVersion===2&&e.type===sr.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type},e.prototype.updateTexture=function(e){var t=e._glTextures[this.CONTEXT_UID];if(t){var n=this.renderer;if(this.initTextureType(e,t),e.resource&&e.resource.upload(n,e,t))t.samplerType!==cr.FLOAT&&(this.hasIntegerTextures=!0);else{var r=e.realWidth,i=e.realHeight,a=n.gl;(t.width!==r||t.height!==i||t.dirtyId<0)&&(t.width=r,t.height=i,a.texImage2D(e.target,0,t.internalFormat,r,i,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}},e.prototype.destroyTexture=function(e,t){var n=this.gl;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off(`dispose`,this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){var r=this.managedTextures.indexOf(e);r!==-1&&_i(this.managedTextures,r,1)}},e.prototype.updateTextureStyle=function(e){var t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===dr.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=ur.CLAMP:t.wrapMode=e.wrapMode,e.resource&&e.resource.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)},e.prototype.setStyle=function(e,t){var n=this.gl;if(t.mipmap&&e.mipmap!==dr.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,t.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===lr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&e.anisotropicLevel>0&&e.scaleMode===lr.LINEAR){var i=Math.min(e.anisotropicLevel,n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,r.TEXTURE_MAX_ANISOTROPY_EXT,i)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===lr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===lr.LINEAR?n.LINEAR:n.NEAREST)},e.prototype.destroy=function(){this.renderer=null},e}(),Bs={__proto__:null,FilterSystem:Qa,BatchSystem:eo,ContextSystem:no,FramebufferSystem:ao,GeometrySystem:so,MaskSystem:ns,ScissorSystem:cs,StencilSystem:ls,ProjectionSystem:us,RenderTextureSystem:ps,ShaderSystem:Ds,StateSystem:Fs,TextureGCSystem:Is,TextureSystem:zs},Vs=new Xi,Hs=function(e){ua(t,e);function t(t,n){t===void 0&&(t=nr.UNKNOWN);var r=e.call(this)||this;return n=Object.assign({},G.RENDER_OPTIONS,n),r.options=n,r.type=t,r.screen=new Wi(0,0,n.width,n.height),r.view=n.view||G.ADAPTER.createCanvas(),r.resolution=n.resolution||G.RESOLUTION,r.useContextAlpha=n.useContextAlpha,r.autoDensity=!!n.autoDensity,r.preserveDrawingBuffer=n.preserveDrawingBuffer,r.clearBeforeRender=n.clearBeforeRender,r._backgroundColor=0,r._backgroundColorRgba=[0,0,0,1],r._backgroundColorString=`#000000`,r.backgroundColor=n.backgroundColor||r._backgroundColor,r.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(xi(`6.0.0`,`Option transparent is deprecated, please use backgroundAlpha instead.`),r.useContextAlpha=n.transparent,r.backgroundAlpha=n.transparent?0:1),r._lastObjectRendered=null,r.plugins={},r}return t.prototype.initPlugins=function(e){for(var t in e)this.plugins[t]=new e[t](this)},Object.defineProperty(t.prototype,`width`,{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return this.view.height},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t){this.view.width=Math.round(e*this.resolution),this.view.height=Math.round(t*this.resolution);var n=this.view.width/this.resolution,r=this.view.height/this.resolution;this.screen.width=n,this.screen.height=r,this.autoDensity&&(this.view.style.width=n+`px`,this.view.style.height=r+`px`),this.emit(`resize`,n,r)},t.prototype.generateTexture=function(e,t,n,r){t===void 0&&(t={}),typeof t==`number`&&(xi(`6.1.0`,`generateTexture options (scaleMode, resolution, region) are now object options.`),t={scaleMode:t,resolution:n,region:r});var i=t.region,a=fa(t,[`region`]);r=i||e.getLocalBounds(null,!0),r.width===0&&(r.width=1),r.height===0&&(r.height=1);var o=Pa.create(da({width:r.width,height:r.height},a));return Vs.tx=-r.x,Vs.ty=-r.y,this.render(e,{renderTexture:o,clear:!1,transform:Vs,skipUpdateTransform:!!e.parent}),o},t.prototype.destroy=function(e){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var n=this;n.plugins=null,n.type=nr.UNKNOWN,n.view=null,n.screen=null,n._tempDisplayObjectParent=null,n.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(t.prototype,`backgroundColor`,{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._backgroundColorString=ci(e),si(e,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`backgroundAlpha`,{get:function(){return this._backgroundColorRgba[3]},set:function(e){this._backgroundColorRgba[3]=e},enumerable:!1,configurable:!0}),t}(Qr.default),Us=function(){function e(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return e}(),Ws=function(){function e(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return e.prototype.destroy=function(){this.renderer=null},e.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},e.prototype.bind=function(e){var t=this,n=t.gl,r=t.CONTEXT_UID,i=e._glBuffers[r]||this.createGLBuffer(e);n.bindBuffer(e.type,i.buffer)},e.prototype.bindBufferBase=function(e,t){var n=this,r=n.gl,i=n.CONTEXT_UID;if(this.boundBufferBases[t]!==e){var a=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[t]=e,r.bindBufferBase(r.UNIFORM_BUFFER,t,a.buffer)}},e.prototype.bindBufferRange=function(e,t,n){var r=this,i=r.gl,a=r.CONTEXT_UID;n||=0;var o=e._glBuffers[a]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,t||0,o.buffer,n*256,256)},e.prototype.update=function(e){var t=this,n=t.gl,r=t.CONTEXT_UID,i=e._glBuffers[r];if(e._updateID!==i.updateID)if(i.updateID=e._updateID,n.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)n.bufferSubData(e.type,0,e.data);else{var a=e.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,n.bufferData(e.type,e.data,a)}},e.prototype.dispose=function(e,t){if(this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var n=e._glBuffers[this.CONTEXT_UID],r=this.gl;e.disposeRunner.remove(this),n&&(t||r.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeAll=function(e){for(var t=Object.keys(this.managedBuffers),n=0;n=vr.HIGH?this.multisample=vr.HIGH:t>=vr.MEDIUM?this.multisample=vr.MEDIUM:t>=vr.LOW?this.multisample=vr.LOW:this.multisample=vr.NONE},t.prototype.addSystem=function(e,t){var n=new e(this);if(this[t])throw Error(`Whoops! The name "`+t+`" is already in use`);for(var r in this[t]=n,this.runners)this.runners[r].add(n);return this},t.prototype.render=function(e,t){var n,r,i,a;if(t&&(t instanceof Pa?(xi(`6.0.0`,`Renderer#render arguments changed, use options instead.`),n=t,r=arguments[2],i=arguments[3],a=arguments[4]):(n=t.renderTexture,r=t.clear,i=t.transform,a=t.skipUpdateTransform)),this.renderingToScreen=!n,this.runners.prerender.emit(),this.emit(`prerender`),this.projection.transform=i,!this.context.isLost){if(n||(this._lastObjectRendered=e),!a){var o=e.enableTempParent();e.updateTransform(),e.disableTempParent(o)}this.renderTexture.bind(n),this.batch.currentRenderer.start(),(r===void 0?this.clearBeforeRender:r)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),n&&n.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit(`postrender`)}},t.prototype.generateTexture=function(t,n,r,i){n===void 0&&(n={});var a=e.prototype.generateTexture.call(this,t,n,r,i);return this.framebuffer.blit(),a},t.prototype.resize=function(t,n){e.prototype.resize.call(this,t,n),this.runners.resize.emit(this.screen.height,this.screen.width)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.prototype.destroy=function(t){for(var n in this.runners.destroy.emit(),this.runners)this.runners[n].destroy();e.prototype.destroy.call(this,t),this.gl=null},Object.defineProperty(t.prototype,`extract`,{get:function(){return xi(`6.0.0`,`Renderer#extract has been deprecated, please use Renderer#plugins.extract instead.`),this.plugins.extract},enumerable:!1,configurable:!0}),t.registerPlugin=function(e,t){xi(`6.5.0`,`Renderer.registerPlugin() has been deprecated, please use extensions.add() instead.`),Mi.add({name:e,type:Ai.RendererPlugin,ref:t})},t.__plugins={},t}(Hs);Mi.handleByMap(Ai.RendererPlugin,Gs.__plugins);function Ks(e){return Gs.create(e)}var qs=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Js=qs,Ys=function(){function e(e){xi(`6.1.0`,`System class is deprecated, implemement ISystem interface instead.`),this.renderer=e}return e.prototype.destroy=function(){this.renderer=null},e}(),Xs=function(){function e(){this.texArray=null,this.blend=0,this.type=ar.TRIANGLES,this.start=0,this.size=0,this.data=null}return e}(),Zs=function(){function e(){this.elements=[],this.ids=[],this.count=0}return e.prototype.clear=function(){for(var e=0;ethis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)},t.prototype.buildTexturesAndDrawCalls=function(){var e=this,n=e._bufferedTextures,r=e.MAX_TEXTURES,i=t._textureArrayPool,a=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,c=++ga._globalBatch,l=0,u=i[0],d=0;a.copyBoundTextures(o,r);for(var f=0;f=r&&(a.boundArray(u,o,c,r),this.buildDrawCalls(u,d,f),d=f,u=i[++l],++c),p._batchEnabled=c,p.touched=s,u.elements[u.count++]=p)}u.count>0&&(a.boundArray(u,o,c,r),this.buildDrawCalls(u,d,this._bufferSize),++l,++c);for(var f=0;f0&&(t+=` -else `),nthis.maxX||this.minY>this.maxY},e.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},e.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?Wi.EMPTY:(e||=new Wi(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},e.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},e.prototype.addPointMatrix=function(e,t){var n=e.a,r=e.b,i=e.c,a=e.d,o=e.tx,s=e.ty,c=n*t.x+i*t.y+o,l=r*t.x+a*t.y+s;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},e.prototype.addQuad=function(e){var t=this.minX,n=this.minY,r=this.maxX,i=this.maxY,a=e[0],o=e[1];t=ar?a:r,i=o>i?o:i,a=e[2],o=e[3],t=ar?a:r,i=o>i?o:i,a=e[4],o=e[5],t=ar?a:r,i=o>i?o:i,a=e[6],o=e[7],t=ar?a:r,i=o>i?o:i,this.minX=t,this.minY=n,this.maxX=r,this.maxY=i},e.prototype.addFrame=function(e,t,n,r,i){this.addFrameMatrix(e.worldTransform,t,n,r,i)},e.prototype.addFrameMatrix=function(e,t,n,r,i){var a=e.a,o=e.b,s=e.c,c=e.d,l=e.tx,u=e.ty,d=this.minX,f=this.minY,p=this.maxX,m=this.maxY,h=a*t+s*n+l,g=o*t+c*n+u;d=hp?h:p,m=g>m?g:m,h=a*r+s*n+l,g=o*r+c*n+u,d=hp?h:p,m=g>m?g:m,h=a*t+s*i+l,g=o*t+c*i+u,d=hp?h:p,m=g>m?g:m,h=a*r+s*i+l,g=o*r+c*i+u,d=hp?h:p,m=g>m?g:m,this.minX=d,this.minY=f,this.maxX=p,this.maxY=m},e.prototype.addVertexData=function(e,t,n){for(var r=this.minX,i=this.minY,a=this.maxX,o=this.maxY,s=t;sa?c:a,o=l>o?l:o}this.minX=r,this.minY=i,this.maxX=a,this.maxY=o},e.prototype.addVertices=function(e,t,n,r){this.addVerticesMatrix(e.worldTransform,t,n,r)},e.prototype.addVerticesMatrix=function(e,t,n,r,i,a){i===void 0&&(i=0),a===void 0&&(a=i);for(var o=e.a,s=e.b,c=e.c,l=e.d,u=e.tx,d=e.ty,f=this.minX,p=this.minY,m=this.maxX,h=this.maxY,g=n;gr?e.maxX:r,this.maxY=e.maxY>i?e.maxY:i},e.prototype.addBoundsMask=function(e,t){var n=e.minX>t.minX?e.minX:t.minX,r=e.minY>t.minY?e.minY:t.minY,i=e.maxXc?i:c,this.maxY=a>l?a:l}},e.prototype.addBoundsMatrix=function(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)},e.prototype.addBoundsArea=function(e,t){var n=e.minX>t.x?e.minX:t.x,r=e.minY>t.y?e.minY:t.y,i=e.maxXc?i:c,this.maxY=a>l?a:l}},e.prototype.pad=function(e,t){e===void 0&&(e=0),t===void 0&&(t=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)},e.prototype.addFramePad=function(e,t,n,r,i,a){e-=i,t-=a,n+=i,r+=a,this.minX=this.minXn?this.maxX:n,this.minY=this.minYr?this.maxY:r},e}(),fc=function(e,t){return fc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},fc(e,t)};function pc(e,t){fc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var mc=function(e){pc(t,e);function t(){var t=e.call(this)||this;return t.tempDisplayObjectParent=null,t.transform=new oa,t.alpha=1,t.visible=!0,t.renderable=!0,t.cullable=!1,t.cullArea=null,t.parent=null,t.worldAlpha=1,t._lastSortedIndex=0,t._zIndex=0,t.filterArea=null,t.filters=null,t._enabledFilters=null,t._bounds=new dc,t._localBounds=null,t._boundsID=0,t._boundsRect=null,t._localBoundsRect=null,t._mask=null,t._maskRefCount=0,t._destroyed=!1,t.isSprite=!1,t.isMask=!1,t}return t.mixin=function(e){for(var n=Object.keys(e),r=0;r1)for(var r=0;rthis.children.length)throw Error(e+`addChildAt: The index `+t+` supplied is out of bounds `+this.children.length);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit(`added`,this),this.emit(`childAdded`,e,this,t),e},t.prototype.swapChildren=function(e,t){if(e!==t){var n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e,this.onChildrenChange(n=this.children.length)throw Error(`The index `+t+` supplied is out of bounds `+this.children.length);var n=this.getChildIndex(e);_i(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)},t.prototype.getChildAt=function(e){if(e<0||e>=this.children.length)throw Error(`getChildAt: Index (`+e+`) does not exist.`);return this.children[e]},t.prototype.removeChild=function(){for(var e=arguments,t=[],n=0;n1)for(var r=0;r0&&i<=r){a=this.children.splice(n,i);for(var o=0;o1&&this.children.sort(gc),this.sortDirty=!1},t.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var e=0,t=this.children.length;e0&&n.height>0){var r,i;if(this.cullArea?(r=this.cullArea,i=this.worldTransform):this._render!==t.prototype._render&&(r=this.getBounds(!0)),r&&n.intersects(r,i))this._render(e);else if(this.cullArea)return;for(var a=0,o=this.children.length;anew Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Sc=class e{constructor(){this._breathParameters=[],this._currentTime=0}static create(){return new e}setParameters(e){this._breathParameters=e}getParameters(){return this._breathParameters}updateParameters(e,t){this._currentTime+=t;let n=this._currentTime*2*3.14159;for(let t=0;t=1&&(r=1,this._blinkingState=Ec.EyeState_Closed,this._stateStartTimeSeconds=this._userTimeSeconds),n=1-r;break;case Ec.EyeState_Closed:r=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._closedSeconds,r>=1&&(this._blinkingState=Ec.EyeState_Opening,this._stateStartTimeSeconds=this._userTimeSeconds),n=0;break;case Ec.EyeState_Opening:r=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._openingSeconds,r>=1&&(r=1,this._blinkingState=Ec.EyeState_Interval,this._nextBlinkingTime=this.determinNextBlinkingTiming()),n=r;break;case Ec.EyeState_Interval:this._nextBlinkingTime(e[e.EyeState_First=0]=`EyeState_First`,e[e.EyeState_Interval=1]=`EyeState_Interval`,e[e.EyeState_Closing=2]=`EyeState_Closing`,e[e.EyeState_Closed=3]=`EyeState_Closed`,e[e.EyeState_Opening=4]=`EyeState_Opening`,e))(Ec||{});const Dc=.001,Oc=.5;var kc=class e{static create(t){let n=new e;typeof t.FadeInTime==`number`&&(n._fadeTimeSeconds=t.FadeInTime,n._fadeTimeSeconds<=0&&(n._fadeTimeSeconds=Oc));let r=t.Groups,i=r.length;for(let e=0;eDc){if(i>=0)break;i=o,a=e.getPartOpacityByIndex(n),a+=t/this._fadeTimeSeconds,a>1&&(a=1)}}i<0&&(i=0,a=1);for(let t=n;ts&&(r=1-s/(1-a)),t>r&&(t=r),e.setPartOpacityByIndex(n,t)}}}constructor(){this._fadeTimeSeconds=Oc,this._lastModel=void 0,this._partGroups=[],this._partGroupCounts=[]}},Ac=class e{constructor(e){this.parameterIndex=0,this.partIndex=0,this.partId=``,this.link=[],e!=null&&this.assignment(e)}assignment(e){return this.partId=e.partId,this.link=e.link.map(e=>e.clone()),this}initialize(e){this.parameterIndex=e.getParameterIndex(this.partId),this.partIndex=e.getPartIndex(this.partId),e.setParameterValueByIndex(this.parameterIndex,1)}clone(){let t=new e;return t.partId=this.partId,t.parameterIndex=this.parameterIndex,t.partIndex=this.partIndex,t.link=this.link.map(e=>e.clone()),t}},jc=class e{constructor(e,t){this.x=e||0,this.y=t||0}add(t){let n=new e(0,0);return n.x=this.x+t.x,n.y=this.y+t.y,n}substract(t){let n=new e(0,0);return n.x=this.x-t.x,n.y=this.y-t.y,n}multiply(t){let n=new e(0,0);return n.x=this.x*t.x,n.y=this.y*t.y,n}multiplyByScaler(t){return this.multiply(new e(t,t))}division(t){let n=new e(0,0);return n.x=this.x/t.x,n.y=this.y/t.y,n}divisionByScalar(t){return this.division(new e(t,t))}getLength(){return Math.sqrt(this.x*this.x+this.y*this.y)}getDistanceWith(e){return Math.sqrt((this.x-e.x)*(this.x-e.x)+(this.y-e.y)*(this.y-e.y))}dot(e){return this.x*e.x+this.y*e.y}normalize(){let e=(this.x*this.x+this.y*this.y)**.5;this.x/=e,this.y/=e}isEqual(e){return this.x==e.x&&this.y==e.y}isNotEqual(e){return!this.isEqual(e)}};const Mc=class{static range(e,t,n){return en&&(e=n),e}static sin(e){return Math.sin(e)}static cos(e){return Math.cos(e)}static abs(e){return Math.abs(e)}static sqrt(e){return Math.sqrt(e)}static cbrt(e){if(e===0)return e;let t=e,n=t<0;n&&(t=-t);let r;return t===1/0?r=1/0:(r=Math.exp(Math.log(t)/3),r=(t/(r*r)+2*r)/3),n?-r:r}static getEasingSine(e){return e<0?0:e>1?1:.5-.5*this.cos(e*Math.PI)}static max(e,t){return e>t?e:t}static min(e,t){return e>t?t:e}static degreesToRadian(e){return e/180*Math.PI}static radianToDegrees(e){return e*180/Math.PI}static directionToRadian(e,t){let n=Math.atan2(t.y,t.x),r=Math.atan2(e.y,e.x),i=n-r;for(;i<-Math.PI;)i+=Math.PI*2;for(;i>Math.PI;)i-=Math.PI*2;return i}static directionToDegrees(e,t){let n=this.directionToRadian(e,t),r=this.radianToDegrees(n);return t.x-e.x>0&&(r=-r),r}static radianToDirection(e){let t=new jc;return t.x=this.sin(e),t.y=this.cos(e),t}static quadraticEquation(e,t,n){return this.abs(e)1&&(e=1),t<0?t=0:t>1&&(t=1),n<0?n=0:n>1&&(n=1),r<0?r=0:r>1&&(r=1),this._modelColor.R=e,this._modelColor.G=t,this._modelColor.B=n,this._modelColor.A=r}getModelColor(){return Object.assign({},this._modelColor)}setIsPremultipliedAlpha(e){this._isPremultipliedAlpha=e}isPremultipliedAlpha(){return this._isPremultipliedAlpha}setIsCulling(e){this._isCulling=e}isCulling(){return this._isCulling}setAnisotropy(e){this._anisortopy=e}getAnisotropy(){return this._anisortopy}getModel(){return this._model}constructor(){this._isCulling=!1,this._isPremultipliedAlpha=!1,this._anisortopy=0,this._modelColor=new Lc,this._mvpMatrix4x4=new Pc,this._mvpMatrix4x4.loadIdentity()}},Ic=(e=>(e[e.CubismBlendMode_Normal=0]=`CubismBlendMode_Normal`,e[e.CubismBlendMode_Additive=1]=`CubismBlendMode_Additive`,e[e.CubismBlendMode_Multiplicative=2]=`CubismBlendMode_Multiplicative`,e))(Ic||{}),Lc=class{constructor(){this.R=1,this.G=1,this.B=1,this.A=1}};let Rc=!1,zc=!1,Bc;const Vc={vertexOffset:0,vertexStep:2};var Hc=class{static startUp(e){if(Rc)return Kc(`CubismFramework.startUp() is already done.`),Rc;if(Live2DCubismCore._isStarted)return Rc=!0,!0;if(Live2DCubismCore._isStarted=!0,Bc=e,Bc&&Live2DCubismCore.Logging.csmSetLogFunction(Bc.logFunction),Rc=!0,Rc){let e=Live2DCubismCore.Version.csmGetVersion(),t=(e&4278190080)>>24,n=(e&16711680)>>16,r=e&65535,i=e;Kc(`Live2D Cubism Core version: {0}.{1}.{2} ({3})`,(`00`+t).slice(-2),(`00`+n).slice(-2),(`0000`+r).slice(-4),i)}return Kc(`CubismFramework.startUp() is complete.`),Rc}static cleanUp(){Rc=!1,zc=!1,Bc=void 0}static initialize(){if(!Rc){qc(`CubismFramework is not started.`);return}if(zc){qc(`CubismFramework.initialize() skipped, already initialized.`);return}zc=!0,Kc(`CubismFramework.initialize() is complete.`)}static dispose(){if(!Rc){qc(`CubismFramework is not started.`);return}if(!zc){qc(`CubismFramework.dispose() skipped, not initialized.`);return}Fc.staticRelease(),zc=!1,Kc(`CubismFramework.dispose() is complete.`)}static isStarted(){return Rc}static isInitialized(){return zc}static coreLogFunction(e){Live2DCubismCore.Logging.csmGetLogFunction()&&Live2DCubismCore.Logging.csmGetLogFunction()(e)}static getLoggingLevel(){return Bc==null?Uc.LogLevel_Off:Bc.loggingLevel}constructor(){}},Uc=(e=>(e[e.LogLevel_Verbose=0]=`LogLevel_Verbose`,e[e.LogLevel_Debug=1]=`LogLevel_Debug`,e[e.LogLevel_Info=2]=`LogLevel_Info`,e[e.LogLevel_Warning=3]=`LogLevel_Warning`,e[e.LogLevel_Error=4]=`LogLevel_Error`,e[e.LogLevel_Off=5]=`LogLevel_Off`,e))(Uc||{});const Wc=()=>{};function Gc(e,...t){Yc.print(Uc.LogLevel_Debug,`[CSM][D]`+e+` -`,t)}function Kc(e,...t){Yc.print(Uc.LogLevel_Info,`[CSM][I]`+e+` -`,t)}function qc(e,...t){Yc.print(Uc.LogLevel_Warning,`[CSM][W]`+e+` -`,t)}function Jc(e,...t){Yc.print(Uc.LogLevel_Error,`[CSM][E]`+e+` -`,t)}var Yc=class{static print(e,t,n){if(en[t]);r(i)}static dumpBytes(e,t,n){for(let r=0;r0?this.print(e,` -`):r%8==0&&r>0&&this.print(e,` `),this.print(e,`{0} `,[t[r]&255]);this.print(e,` -`)}constructor(){}},Xc=class{update(){this._model.update(),this._model.drawables.resetDynamicFlags()}getCanvasWidth(){return this._model==null?0:this._model.canvasinfo.CanvasWidth/this._model.canvasinfo.PixelsPerUnit}getCanvasHeight(){return this._model==null?0:this._model.canvasinfo.CanvasHeight/this._model.canvasinfo.PixelsPerUnit}saveParameters(){let e=this._model.parameters.count,t=this._savedParameters.length;for(let n=0;nt&&(t=this._model.parameters.minimumValues[e]),this._parameterValues[e]=n==1?t:this._parameterValues[e]=this._parameterValues[e]*(1-n)+t*n}setParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.setParameterValueByIndex(r,t,n)}addParameterValueByIndex(e,t,n=1){this.setParameterValueByIndex(e,this.getParameterValueByIndex(e)+t*n)}addParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.addParameterValueByIndex(r,t,n)}multiplyParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.multiplyParameterValueByIndex(r,t,n)}multiplyParameterValueByIndex(e,t,n=1){this.setParameterValueByIndex(e,this.getParameterValueByIndex(e)*(1+(t-1)*n))}getDrawableIds(){return this._drawableIds.slice()}getDrawableIndex(e){let t=this._model.drawables.count;for(let n=0;nt&&(e=t);for(let t=0;t0&&t.getEndTime()(e[e.ExpressionBlendType_Add=0]=`ExpressionBlendType_Add`,e[e.ExpressionBlendType_Multiply=1]=`ExpressionBlendType_Multiply`,e[e.ExpressionBlendType_Overwrite=2]=`ExpressionBlendType_Overwrite`,e))(tl||{}),nl;(e=>{e.supportMoreMaskDivisions=!0,e.setOpacityFromMotion=!1})(nl||={});var rl=(e=>(e[e.CubismMotionCurveTarget_Model=0]=`CubismMotionCurveTarget_Model`,e[e.CubismMotionCurveTarget_Parameter=1]=`CubismMotionCurveTarget_Parameter`,e[e.CubismMotionCurveTarget_PartOpacity=2]=`CubismMotionCurveTarget_PartOpacity`,e))(rl||{}),il=(e=>(e[e.CubismMotionSegmentType_Linear=0]=`CubismMotionSegmentType_Linear`,e[e.CubismMotionSegmentType_Bezier=1]=`CubismMotionSegmentType_Bezier`,e[e.CubismMotionSegmentType_Stepped=2]=`CubismMotionSegmentType_Stepped`,e[e.CubismMotionSegmentType_InverseStepped=3]=`CubismMotionSegmentType_InverseStepped`,e))(il||{}),al=class{constructor(e=0,t=0){this.time=e,this.value=t}},ol=class{constructor(){this.basePointIndex=0,this.segmentType=0}},sl=class{constructor(){this.id=``,this.type=0,this.segmentCount=0,this.baseSegmentIndex=0,this.fadeInTime=0,this.fadeOutTime=0}},cl=class{constructor(){this.fireTime=0,this.value=``}},ll=class{constructor(){this.duration=0,this.loop=!1,this.curveCount=0,this.eventCount=0,this.fps=0,this.curves=[],this.segments=[],this.points=[],this.events=[]}},ul=class{constructor(e){this._json=e}release(){this._json=void 0}getMotionDuration(){return this._json.Meta.Duration}isMotionLoop(){return this._json.Meta.Loop||!1}getEvaluationOptionFlag(e){return dl.EvaluationOptionFlag_AreBeziersRistricted==e?!!this._json.Meta.AreBeziersRestricted:!1}getMotionCurveCount(){return this._json.Meta.CurveCount}getMotionFps(){return this._json.Meta.Fps}getMotionTotalSegmentCount(){return this._json.Meta.TotalSegmentCount}getMotionTotalPointCount(){return this._json.Meta.TotalPointCount}getMotionFadeInTime(){return this._json.Meta.FadeInTime}getMotionFadeOutTime(){return this._json.Meta.FadeOutTime}getMotionCurveTarget(e){return this._json.Curves[e].Target}getMotionCurveId(e){return this._json.Curves[e].Id}getMotionCurveFadeInTime(e){return this._json.Curves[e].FadeInTime}getMotionCurveFadeOutTime(e){return this._json.Curves[e].FadeOutTime}getMotionCurveSegmentCount(e){return this._json.Curves[e].Segments.length}getMotionCurveSegment(e,t){return this._json.Curves[e].Segments[t]}getEventCount(){return this._json.Meta.UserDataCount||0}getTotalEventValueSize(){return this._json.Meta.TotalUserDataSize}getEventTime(e){return this._json.UserData[e].Time}getEventValue(e){return this._json.UserData[e].Value}},dl=(e=>(e[e.EvaluationOptionFlag_AreBeziersRistricted=0]=`EvaluationOptionFlag_AreBeziersRistricted`,e))(dl||{});const fl=`EyeBlink`,pl=`LipSync`,ml=`Model`,hl=`Parameter`,gl=`PartOpacity`,_l=!1;function vl(e,t,n){let r=new al;return r.time=e.time+(t.time-e.time)*n,r.value=e.value+(t.value-e.value)*n,r}function yl(e,t){let n=(t-e[0].time)/(e[1].time-e[0].time);return n<0&&(n=0),e[0].value+(e[1].value-e[0].value)*n}function bl(e,t){let n=(t-e[0].time)/(e[3].time-e[0].time);n<0&&(n=0);let r=vl(e[0],e[1],n),i=vl(e[1],e[2],n),a=vl(e[2],e[3],n),o=vl(r,i,n),s=vl(i,a,n);return vl(o,s,n).value}function xl(e,t){let n=t,r=e[0].time,i=e[3].time,a=e[1].time,o=e[2].time,s=i-3*o+3*a-r,c=3*o-6*a+3*r,l=3*a-3*r,u=r-n,d=Nc.cardanoAlgorithmForBezier(s,c,l,u),f=vl(e[0],e[1],d),p=vl(e[1],e[2],d),m=vl(e[2],e[3],d),h=vl(f,p,d),g=vl(p,m,d);return vl(h,g,d).value}function Sl(e,t){return e[0].value}function Cl(e,t){return e[1].value}function wl(e,t,n){let r=e.curves[t],i=-1,a=r.baseSegmentIndex+r.segmentCount,o=0;for(let t=r.baseSegmentIndex;tn){i=t;break}if(i==-1)return e.points[o].value;let s=e.segments[i];return s.evaluate(e.points.slice(s.basePointIndex),n)}var Tl=class e extends Qc{constructor(){super(),this._eyeBlinkParameterIds=[],this._lipSyncParameterIds=[],this._sourceFrameRate=30,this._loopDurationSeconds=-1,this._isLoop=!1,this._isLoopFadeIn=!0,this._lastWeight=0}static create(t,n){let r=new e;return r.parse(t),r._sourceFrameRate=r._motionData.fps,r._loopDurationSeconds=r._motionData.duration,r._onFinishedMotion=n,r}doUpdateParameters(e,t,n,r){this._modelCurveIdEyeBlink??=fl,this._modelCurveIdLipSync??=pl;let i=t-r.getStartTime();i<0&&(i=0);let a=Number.MAX_VALUE,o=Number.MAX_VALUE,s=64,c=0,l=0;this._eyeBlinkParameterIds.length>s&&Gc(`too many eye blink targets : {0}`,this._eyeBlinkParameterIds.length),this._lipSyncParameterIds.length>s&&Gc(`too many lip sync targets : {0}`,this._lipSyncParameterIds.length);let u=this._fadeInSeconds<=0?1:Nc.getEasingSine((t-r.getFadeInStartTime())/this._fadeInSeconds),d=this._fadeOutSeconds<=0||r.getEndTime()<0?1:Nc.getEasingSine((r.getEndTime()-t)/this._fadeOutSeconds),f,p,m,h=i;if(this._isLoop)for(;h>this._motionData.duration;)h-=this._motionData.duration;let g=this._motionData.curves;for(p=0;p>t&1)continue;let i=r+(o-r)*n;e.setParameterValueById(this._eyeBlinkParameterIds[t],i)}if(a!=Number.MAX_VALUE)for(let t=0;t>t&1)continue;let i=r+(a-r)*n;e.setParameterValueById(this._lipSyncParameterIds[t],i)}for(;p=this._motionData.duration&&(this._isLoop?(r.setStartTime(t),this._isLoopFadeIn&&r.setFadeInStartTime(t)):(this._onFinishedMotion&&this._onFinishedMotion(this),r.setIsFinished(!0))),this._lastWeight=n}setIsLoop(e){this._isLoop=e}isLoop(){return this._isLoop}setIsLoopFadeIn(e){this._isLoopFadeIn=e}isLoopFadeIn(){return this._isLoopFadeIn}getDuration(){return this._isLoop?-1:this._loopDurationSeconds}getLoopDuration(){return this._loopDurationSeconds}setParameterFadeInTime(e,t){let n=this._motionData.curves;for(let r=0;rnew sl),this._motionData.segments=Array.from({length:t.getMotionTotalSegmentCount()}).map(()=>new ol),this._motionData.events=Array.from({length:this._motionData.eventCount}).map(()=>new cl),this._motionData.points=[];let a=0,o=0;for(let e=0;ee&&this._motionData.events[n].fireTime<=t&&this._firedEventValues.push(this._motionData.events[n].value);return this._firedEventValues}},El=class{constructor(){this._autoDelete=!1,this._available=!0,this._finished=!1,this._started=!1,this._startTimeSeconds=-1,this._fadeInStartTimeSeconds=0,this._endTimeSeconds=-1,this._stateTimeSeconds=0,this._stateWeight=0,this._lastEventCheckSeconds=0,this._motionQueueEntryHandle=this,this._fadeOutSeconds=0,this._isTriggeredFadeOut=!1}release(){this._autoDelete&&this._motion&&this._motion.release()}setFadeOut(e){this._fadeOutSeconds=e,this._isTriggeredFadeOut=!0}startFadeOut(e,t){let n=t+e;this._isTriggeredFadeOut=!0,(this._endTimeSeconds<0||nt!=null&&t._motionQueueEntryHandle==e)}setEventCallback(e,t=null){this._eventCallBack=e,this._eventCustomData=t}doUpdateMotion(e,t){let n=!1,r=0;for(;r(e[e.CubismPhysicsTargetType_Parameter=0]=`CubismPhysicsTargetType_Parameter`,e))(kl||{}),Al=(e=>(e[e.CubismPhysicsSource_X=0]=`CubismPhysicsSource_X`,e[e.CubismPhysicsSource_Y=1]=`CubismPhysicsSource_Y`,e[e.CubismPhysicsSource_Angle=2]=`CubismPhysicsSource_Angle`,e))(Al||{}),jl=class{constructor(){this.initialPosition=new jc(0,0),this.position=new jc(0,0),this.lastPosition=new jc(0,0),this.lastGravity=new jc(0,0),this.force=new jc(0,0),this.velocity=new jc(0,0)}},Ml=class{constructor(){this.normalizationPosition={},this.normalizationAngle={}}},Nl=class{constructor(){this.source={}}},Pl=class{constructor(){this.destination={},this.translationScale=new jc(0,0)}},Fl=class{constructor(){this.settings=[],this.inputs=[],this.outputs=[],this.particles=[],this.gravity=new jc(0,0),this.wind=new jc(0,0)}},Il=class{constructor(e){this._json=e}release(){this._json=void 0}getGravity(){let e=new jc(0,0);return e.x=this._json.Meta.EffectiveForces.Gravity.X,e.y=this._json.Meta.EffectiveForces.Gravity.Y,e}getWind(){let e=new jc(0,0);return e.x=this._json.Meta.EffectiveForces.Wind.X,e.y=this._json.Meta.EffectiveForces.Wind.Y,e}getSubRigCount(){return this._json.Meta.PhysicsSettingCount}getTotalInputCount(){return this._json.Meta.TotalInputCount}getTotalOutputCount(){return this._json.Meta.TotalOutputCount}getVertexCount(){return this._json.Meta.VertexCount}getNormalizationPositionMinimumValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Minimum}getNormalizationPositionMaximumValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Maximum}getNormalizationPositionDefaultValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Default}getNormalizationAngleMinimumValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Minimum}getNormalizationAngleMaximumValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Maximum}getNormalizationAngleDefaultValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Default}getInputCount(e){return this._json.PhysicsSettings[e].Input.length}getInputWeight(e,t){return this._json.PhysicsSettings[e].Input[t].Weight}getInputReflect(e,t){return this._json.PhysicsSettings[e].Input[t].Reflect}getInputType(e,t){return this._json.PhysicsSettings[e].Input[t].Type}getInputSourceId(e,t){return this._json.PhysicsSettings[e].Input[t].Source.Id}getOutputCount(e){return this._json.PhysicsSettings[e].Output.length}getOutputVertexIndex(e,t){return this._json.PhysicsSettings[e].Output[t].VertexIndex}getOutputAngleScale(e,t){return this._json.PhysicsSettings[e].Output[t].Scale}getOutputWeight(e,t){return this._json.PhysicsSettings[e].Output[t].Weight}getOutputDestinationId(e,t){return this._json.PhysicsSettings[e].Output[t].Destination.Id}getOutputType(e,t){return this._json.PhysicsSettings[e].Output[t].Type}getOutputReflect(e,t){return this._json.PhysicsSettings[e].Output[t].Reflect}getParticleCount(e){return this._json.PhysicsSettings[e].Vertices.length}getParticleMobility(e,t){return this._json.PhysicsSettings[e].Vertices[t].Mobility}getParticleDelay(e,t){return this._json.PhysicsSettings[e].Vertices[t].Delay}getParticleAcceleration(e,t){return this._json.PhysicsSettings[e].Vertices[t].Acceleration}getParticleRadius(e,t){return this._json.PhysicsSettings[e].Vertices[t].Radius}getParticlePosition(e,t){let n=new jc(0,0);return n.x=this._json.PhysicsSettings[e].Vertices[t].Position.X,n.y=this._json.PhysicsSettings[e].Vertices[t].Position.Y,n}};const Ll=`X`,Rl=`Y`,zl=`Angle`,Bl=5,Vl=100,Hl=.001;var Ul=class e{static create(t){let n=new e;return n.parse(t),n._physicsRig.gravity.y=0,n}evaluate(e,t){let n,r,i,a,o=new jc,s,c,l,u,d,f,p,m;d=e.getModel().parameters.values,f=e.getModel().parameters.maximumValues,p=e.getModel().parameters.minimumValues,m=e.getModel().parameters.defaultValues;for(let h=0;h=s.particleCount)break;l[t].destinationParameterIndex==-1&&(l[t].destinationParameterIndex=e.getParameterIndex(l[t].destination.id));let r=new jc;r.x=u[n].position.x-u[n-1].position.x,r.y=u[n].position.y-u[n-1].position.y,a=l[t].getValue(r,u,n,l[t].reflect,this._options.gravity);let i=l[t].destinationParameterIndex,o=!Float32Array.prototype.slice&&`subarray`in Float32Array.prototype?JSON.parse(JSON.stringify(d.subarray(i))):d.slice(i);ru(o,p[i],f[i],a,l[t]);for(let e=i,t=0;e=2?t[n-1].position.substract(t[n-2].position):i.multiplyByScaler(-1),a=Nc.directionToRadian(i,e),r&&(a*=-1),a}function Zl(e,t){return Math.abs(Math.max(e,t)-Math.min(e,t))}function Ql(e,t){let n=Math.min(e,t);return n+Zl(e,t)/2}function $l(e,t){return e.x}function eu(e,t){return e.y}function tu(e,t){return t}function nu(e,t,n,r,i,a,o,s){let c,l,u,d,f=new jc(0,0),p=new jc(0,0),m=new jc(0,0),h=new jc(0,0);e[0].position=new jc(n.x,n.y),c=Nc.degreesToRadian(r),d=Nc.radianToDirection(c),d.normalize();for(let n=1;nn&&(o>i.valueExceededMaximum&&(i.valueExceededMaximum=o),o=n),s=i.weight/Vl,s>=1||(o=e[0]*(1-s)+o*s),e[0]=o}function iu(e,t,n,r,i,a,o,s){let c=0,l=Nc.max(n,t);le&&(e=u);let d=Nc.min(i,a),f=Nc.max(i,a),p=o,m=Ql(u,l),h=e-m;switch(Math.sign(h)){case 1:{let e=f-p,t=l-m;t!=0&&(c=h*(e/t),c+=p);break}case-1:{let e=d-p,t=u-m;t!=0&&(c=h*(e/t),c+=p);break}case 0:c=p;break}return s?c:c*-1}var au=class{constructor(e=0,t=0,n=0,r=0){this.x=e,this.y=t,this.width=n,this.height=r}getCenterX(){return this.x+.5*this.width}getCenterY(){return this.y+.5*this.height}getRight(){return this.x+this.width}getBottom(){return this.y+this.height}setRect(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height}expand(e,t){this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2}};const ou=4,su=10;let cu,lu,uu;var du=class{getChannelFlagAsColor(e){return this._channelColors[e]}getMaskRenderTexture(){let e=0;if(this._maskTexture&&this._maskTexture.texture!=0&&(this._maskTexture.frameNo=this._currentFrameNo,e=this._maskTexture.texture),e==0){let t=this._clippingMaskBufferSize;this._colorBuffer=this.gl.createTexture(),this.gl.bindTexture(this.gl.TEXTURE_2D,this._colorBuffer),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,t,t,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,null),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.bindTexture(this.gl.TEXTURE_2D,null),e=this.gl.createFramebuffer(),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e),this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,this.gl.TEXTURE_2D,this._colorBuffer,0),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,uu),this._maskTexture=new fu(this._currentFrameNo,e)}return e}setGL(e){this.gl=e}calcClippedDrawTotalBounds(e,t){let n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,o=t._clippedDrawableIndexList.length;for(let s=0;sf&&(f=t),np&&(p=n)}if(u!=Number.MAX_VALUE)if(ui&&(i=f),p>a&&(a=p),n==Number.MAX_VALUE)t._allClippedDrawRect.x=0,t._allClippedDrawRect.y=0,t._allClippedDrawRect.width=0,t._allClippedDrawRect.height=0,t._isUsing=!1;else{t._isUsing=!0;let e=i-n,o=a-r;t._allClippedDrawRect.x=n,t._allClippedDrawRect.y=r,t._allClippedDrawRect.width=e,t._allClippedDrawRect.height=o}}}constructor(){this._maskRenderTexture=null,this._colorBuffer=null,this._currentFrameNo=0,this._clippingMaskBufferSize=256,this._clippingContextListForMask=[],this._clippingContextListForDraw=[],this._channelColors=[],this._tmpBoundsOnModel=new au,this._tmpMatrix=new Pc,this._tmpMatrixForMask=new Pc,this._tmpMatrixForDraw=new Pc;let e=new Lc;e.R=1,e.G=0,e.B=0,e.A=0,this._channelColors.push(e),e=new Lc,e.R=0,e.G=1,e.B=0,e.A=0,this._channelColors.push(e),e=new Lc,e.R=0,e.G=0,e.B=1,e.A=0,this._channelColors.push(e),e=new Lc,e.R=0,e.G=0,e.B=0,e.A=1,this._channelColors.push(e)}release(){var e,t,n;let r=this;for(let t=0;t0){this.gl.viewport(0,0,this._clippingMaskBufferSize,this._clippingMaskBufferSize),this._maskRenderTexture=this.getMaskRenderTexture(),t.getMvpMatrix(),t.preDraw(),this.setupLayoutBounds(n),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this._maskRenderTexture),this.gl.clearColor(1,1,1,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT);for(let n=0;n(e[e.ShaderNames_SetupMask=0]=`ShaderNames_SetupMask`,e[e.ShaderNames_NormalPremultipliedAlpha=1]=`ShaderNames_NormalPremultipliedAlpha`,e[e.ShaderNames_NormalMaskedPremultipliedAlpha=2]=`ShaderNames_NormalMaskedPremultipliedAlpha`,e[e.ShaderNames_NomralMaskedInvertedPremultipliedAlpha=3]=`ShaderNames_NomralMaskedInvertedPremultipliedAlpha`,e[e.ShaderNames_AddPremultipliedAlpha=4]=`ShaderNames_AddPremultipliedAlpha`,e[e.ShaderNames_AddMaskedPremultipliedAlpha=5]=`ShaderNames_AddMaskedPremultipliedAlpha`,e[e.ShaderNames_AddMaskedPremultipliedAlphaInverted=6]=`ShaderNames_AddMaskedPremultipliedAlphaInverted`,e[e.ShaderNames_MultPremultipliedAlpha=7]=`ShaderNames_MultPremultipliedAlpha`,e[e.ShaderNames_MultMaskedPremultipliedAlpha=8]=`ShaderNames_MultMaskedPremultipliedAlpha`,e[e.ShaderNames_MultMaskedPremultipliedAlphaInverted=9]=`ShaderNames_MultMaskedPremultipliedAlphaInverted`,e))(hu||{});const gu=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_myPos;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_clipMatrix * a_position; v_myPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,_u=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_myPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;void main(){ float isInside = step(u_baseColor.x, v_myPos.x/v_myPos.w) * step(u_baseColor.y, v_myPos.y/v_myPos.w) * step(v_myPos.x/v_myPos.w, u_baseColor.z) * step(v_myPos.y/v_myPos.w, u_baseColor.w); gl_FragColor = u_channelFlag * texture2D(s_texture0, v_texCoord).a * isInside;}`,vu=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;uniform mat4 u_matrix;void main(){ gl_Position = u_matrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,yu=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform mat4 u_matrix;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_matrix * a_position; v_clipPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,bu=`precision mediump float;varying vec2 v_texCoord;uniform vec4 u_baseColor;uniform sampler2D s_texture0;void main(){ gl_FragColor = texture2D(s_texture0 , v_texCoord) * u_baseColor;}`,xu=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;uniform sampler2D s_texture1;void main(){ vec4 col_formask = texture2D(s_texture0 , v_texCoord) * u_baseColor; vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag; float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a; col_formask = col_formask * maskVal; gl_FragColor = col_formask;}`,Su=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform sampler2D s_texture0;uniform sampler2D s_texture1;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;void main(){vec4 col_formask = texture2D(s_texture0, v_texCoord) * u_baseColor;vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag;float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a;col_formask = col_formask * (1.0 - maskVal);gl_FragColor = col_formask;}`;var Cu=class extends Fc{constructor(){super(),this._clippingContextBufferForMask=null,this._clippingContextBufferForDraw=null,this._clippingManager=new du,this.firstDraw=!0,this._textures={},this._sortedDrawableIndexList=[],this._bufferData={vertex:null,uv:null,index:null}}initialize(e){e.isUsingMasking()&&(this._clippingManager=new du,this._clippingManager.initialize(e,e.getDrawableCount(),e.getDrawableMasks(),e.getDrawableMaskCounts()));for(let t=e.getDrawableCount()-1;t>=0;t--)this._sortedDrawableIndexList[t]=0;super.initialize(e)}bindTexture(e,t){this._textures[e]=t}getBindedTextures(){return this._textures}setClippingMaskBufferSize(e){this._clippingManager.release(),this._clippingManager=new du,this._clippingManager.setClippingMaskBufferSize(e),this._clippingManager.initialize(this.getModel(),this.getModel().getDrawableCount(),this.getModel().getDrawableMasks(),this.getModel().getDrawableMaskCounts())}getClippingMaskBufferSize(){return this._clippingManager.getClippingMaskBufferSize()}release(){var e,t,n;let r=this;this._clippingManager.release(),r._clippingManager=void 0,(e=this.gl)==null||e.deleteBuffer(this._bufferData.vertex),this._bufferData.vertex=null,(t=this.gl)==null||t.deleteBuffer(this._bufferData.uv),this._bufferData.uv=null,(n=this.gl)==null||n.deleteBuffer(this._bufferData.index),this._bufferData.index=null,r._bufferData=void 0,r._textures=void 0}doDrawModel(){this.preDraw(),this._clippingManager!=null&&this._clippingManager.setupClippingContext(this.getModel(),this);let e=this.getModel().getDrawableCount(),t=this.getModel().getDrawableRenderOrders();for(let n=0;n{Cu.doStaticRelease()};var wu=class{constructor(e){this.groups=e.Groups,this.hitAreas=e.HitAreas,this.layout=e.Layout,this.moc=e.FileReferences.Moc,this.expressions=e.FileReferences.Expressions,this.motions=e.FileReferences.Motions,this.textures=e.FileReferences.Textures,this.physics=e.FileReferences.Physics,this.pose=e.FileReferences.Pose}getEyeBlinkParameters(){var e,t;return(t=(e=this.groups)?.find(e=>e.Name===`EyeBlink`))?.Ids}getLipSyncParameters(){var e,t;return(t=(e=this.groups)?.find(e=>e.Name===`LipSync`))?.Ids}};const Tu=`ParamAngleX`,Eu=`ParamAngleY`,Du=`ParamAngleZ`,Ou=`ParamEyeBallX`,ku=`ParamEyeBallY`,Au=`ParamBodyAngleX`,ju=`ParamBreath`,Mu=2,Nu=2;var Pu;(e=>{e.LOG_LEVEL_VERBOSE=0,e.LOG_LEVEL_WARNING=1,e.LOG_LEVEL_ERROR=2,e.LOG_LEVEL_NONE=999,e.logLevel=e.LOG_LEVEL_WARNING,e.sound=!0,e.motionSync=!0,e.motionFadingDuration=500,e.idleMotionFadingDuration=2e3,e.expressionFadingDuration=500,e.preserveExpressionOnMotion=!0,e.cubism4=nl})(Pu||={});const Fu={log(e,...t){Pu.logLevel<=Pu.LOG_LEVEL_VERBOSE&&console.log(`[${e}]`,...t)},warn(e,...t){Pu.logLevel<=Pu.LOG_LEVEL_WARNING&&console.warn(`[${e}]`,...t)},error(e,...t){Pu.logLevel<=Pu.LOG_LEVEL_ERROR&&console.error(`[${e}]`,...t)}};function Iu(e,t,n){return en?n:e}function Lu(e,t){t.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(n=>{n!==`constructor`&&Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})})}function Ru(e){let t=e.lastIndexOf(`/`);return t!=-1&&(e=e.slice(0,t)),t=e.lastIndexOf(`/`),t!==-1&&(e=e.slice(t+1)),e}function zu(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}var Bu=class extends Qr.default{constructor(e,t){super(),this.expressions=[],this.reserveExpressionIndex=-1,this.destroyed=!1,this.settings=e,this.tag=`ExpressionManager(${e.name})`}init(){this.defaultExpression=this.createExpression({},void 0),this.currentExpression=this.defaultExpression,this.stopAllExpressions()}loadExpression(e){return xc(this,null,function*(){if(!this.definitions[e]){Fu.warn(this.tag,`Undefined expression at [${e}]`);return}if(this.expressions[e]===null){Fu.warn(this.tag,`Cannot set expression at [${e}] because it's already failed in loading.`);return}if(this.expressions[e])return this.expressions[e];let t=yield this._loadExpression(e);return this.expressions[e]=t,t})}_loadExpression(e){throw Error(`Not implemented.`)}setRandomExpression(){return xc(this,null,function*(){if(this.definitions.length){let e=[];for(let t=0;t-1&&ec&&(a*=c/s,o*=c/s),this.vx+=a,this.vy+=o;let l=Math.sqrt(bc(this.vx,2)+bc(this.vy,2)),u=.5*(Math.sqrt(bc(c,2)+8*c*r)-c);l>u&&(this.vx*=u/l,this.vy*=u/l),this.x+=this.vx,this.y+=this.vy}},Gu=class{constructor(e){this.json=e;let t=e.url;if(typeof t!=`string`)throw TypeError("The `url` field in settings JSON must be defined as a string.");this.url=t,this.name=Ru(this.url)}resolveURL(e){return ti.resolve(this.url,e)}replaceFiles(e){this.moc=e(this.moc,`moc`),this.pose!==void 0&&(this.pose=e(this.pose,`pose`)),this.physics!==void 0&&(this.physics=e(this.physics,`physics`));for(let t=0;t(e.push(t),t)),e}validateFiles(e){let t=(t,n)=>{let r=this.resolveURL(t);if(!e.includes(r)){if(n)throw Error(`File "${t}" is defined in settings, but doesn't exist in given files`);return!1}return!0},n=[this.moc,...this.textures];n.forEach(e=>t(e,!0));let r=this.getDefinedFiles();return r.filter(e=>t(e,!1))}},Ku=(e=>(e[e.NONE=0]=`NONE`,e[e.IDLE=1]=`IDLE`,e[e.NORMAL=2]=`NORMAL`,e[e.FORCE=3]=`FORCE`,e))(Ku||{}),qu=class{constructor(){this.debug=!1,this.currentPriority=0,this.reservePriority=0}reserve(e,t,n){if(n<=0)return Fu.log(this.tag,`Cannot start a motion with MotionPriority.NONE.`),!1;if(e===this.currentGroup&&t===this.currentIndex)return Fu.log(this.tag,`Motion is already playing.`,this.dump(e,t)),!1;if(e===this.reservedGroup&&t===this.reservedIndex||e===this.reservedIdleGroup&&t===this.reservedIdleIndex)return Fu.log(this.tag,`Motion is already reserved.`,this.dump(e,t)),!1;if(n===1){if(this.currentPriority!==0)return Fu.log(this.tag,`Cannot start idle motion because another motion is playing.`,this.dump(e,t)),!1;if(this.reservedIdleGroup!==void 0)return Fu.log(this.tag,`Cannot start idle motion because another idle motion has reserved.`,this.dump(e,t)),!1;this.setReservedIdle(e,t)}else{if(n<3){if(n<=this.currentPriority)return Fu.log(this.tag,`Cannot start motion because another motion is playing as an equivalent or higher priority.`,this.dump(e,t)),!1;if(n<=this.reservePriority)return Fu.log(this.tag,`Cannot start motion because another motion has reserved as an equivalent or higher priority.`,this.dump(e,t)),!1}this.setReserved(e,t,n)}return!0}start(e,t,n,r){if(r===1){if(this.setReservedIdle(void 0,void 0),this.currentPriority!==0)return Fu.log(this.tag,`Cannot start idle motion because another motion is playing.`,this.dump(t,n)),!1}else{if(t!==this.reservedGroup||n!==this.reservedIndex)return Fu.log(this.tag,`Cannot start motion because another motion has taken the place.`,this.dump(t,n)),!1;this.setReserved(void 0,void 0,0)}return e?(this.setCurrent(t,n,r),!0):!1}complete(){this.setCurrent(void 0,void 0,0)}setCurrent(e,t,n){this.currentPriority=n,this.currentGroup=e,this.currentIndex=t}setReserved(e,t,n){this.reservePriority=n,this.reservedGroup=e,this.reservedIndex=t}setReservedIdle(e,t){this.reservedIdleGroup=e,this.reservedIdleIndex=t}isActive(e,t){return e===this.currentGroup&&t===this.currentIndex||e===this.reservedGroup&&t===this.reservedIndex||e===this.reservedIdleGroup&&t===this.reservedIdleIndex}reset(){this.setCurrent(void 0,void 0,0),this.setReserved(void 0,void 0,0),this.setReservedIdle(void 0,void 0)}shouldRequestIdleMotion(){return this.currentGroup===void 0&&this.reservedIdleGroup===void 0}shouldOverrideExpression(){return!Pu.preserveExpressionOnMotion&&this.currentPriority>1}dump(e,t){if(this.debug){let n=[`currentPriority`,`reservePriority`,`currentGroup`,`currentIndex`,`reservedGroup`,`reservedIndex`,`reservedIdleGroup`,`reservedIdleIndex`];return` - group = "${e}", index = ${t} -`+n.map(e=>`[`+e+`] `+this[e]).join(` -`)}return``}};const Ju=`SoundManager`,Yu=.5;var Xu=class{static get volume(){return this._volume}static set volume(e){this._volume=(e>1?1:e<0?0:e)||0,this.audios.forEach(e=>e.volume=this._volume)}static add(e,t,n){let r=new Audio(e);return r.volume=this._volume,r.preload=`auto`,r.addEventListener(`ended`,()=>{this.dispose(r),t?.()}),r.addEventListener(`error`,t=>{this.dispose(r),Fu.warn(Ju,`Error occurred on "${e}"`,t.error),n?.(t.error)}),this.audios.push(r),r}static play(e){return new Promise((t,n)=>{var r;(r=e.play())==null||r.catch(t=>{e.dispatchEvent(new ErrorEvent(`error`,{error:t})),n(t)}),e.readyState===e.HAVE_ENOUGH_DATA?t():e.addEventListener(`canplaythrough`,t)})}static dispose(e){e.pause(),e.removeAttribute(`src`),zu(this.audios,e)}static destroy(){for(let e=this.audios.length-1;e>=0;e--)this.dispose(this.audios[e])}};Xu.audios=[],Xu._volume=Yu;var Zu=class extends Qr.default{constructor(e,t){super(),this.motionGroups={},this.state=new qu,this.playing=!1,this.destroyed=!1,this.settings=e,this.tag=`MotionManager(${e.name})`,this.state.tag=this.tag}init(e){e?.idleMotionGroup&&(this.groups.idle=e.idleMotionGroup),this.setupMotions(e),this.stopAllMotions()}setupMotions(e){for(let e of Object.keys(this.definitions))this.motionGroups[e]=[];let t;switch(e?.motionPreload){case`NONE`:return;case`ALL`:t=Object.keys(this.definitions);break;case`IDLE`:default:t=[this.groups.idle];break}for(let e of t)if(this.definitions[e])for(let t=0;tthis.currentAudio=void 0,()=>this.currentAudio=void 0),this.currentAudio=a}catch(t){Fu.warn(this.tag,`Failed to create audio`,e,t)}}let o=yield this.loadMotion(e,t);if(a){let e=Xu.play(a).catch(e=>Fu.warn(this.tag,`Failed to play audio`,a.src,e));Pu.motionSync&&(yield e)}return this.state.start(o,e,t,n)?(Fu.log(this.tag,`Start motion:`,this.getMotionName(i)),this.emit(`motionStart`,e,t,a),this.state.shouldOverrideExpression()&&this.expressionManager&&this.expressionManager.resetExpression(),this.playing=!0,this._startMotion(o),!0):(a&&(Xu.dispose(a),this.currentAudio=void 0),!1)})}startRandomMotion(e,t){return xc(this,null,function*(){let n=this.definitions[e];if(n?.length){let r=[];for(let t=0;te.index>=0);for(let t of e)this.hitAreas[t.name]=t}hitTest(e,t){return Object.keys(this.hitAreas).filter(n=>this.isHit(n,e,t))}isHit(e,t,n){if(!this.hitAreas[e])return!1;let r=this.hitAreas[e].index,i=this.getDrawableBounds(r,Qu);return i.x<=t&&t<=i.x+i.width&&i.y<=n&&n<=i.y+i.height}getDrawableBounds(e,t){let n=this.getDrawableVertices(e),r=n[0],i=n[0],a=n[1],o=n[1];for(let e=0;e{(a.status===200||a.status===0)&&a.response?r(a.response):a.onerror()},a.onerror=()=>{Fu.warn(ed,`Failed to load resource as ${a.responseType} (Status ${a.status}): ${t}`),i(new td(`Network error.`,t,a.status))},a.onabort=()=>i(new td(`Aborted.`,t,a.status,!0)),a.onloadend=()=>{var t;nd.allXhrSet.delete(a),e&&((t=nd.xhrMap.get(e))==null||t.delete(a))},a}static cancelXHRs(){var e;(e=nd.xhrMap.get(this))==null||e.forEach(e=>{e.abort(),nd.allXhrSet.delete(e)}),nd.xhrMap.delete(this)}static release(){nd.allXhrSet.forEach(e=>e.abort()),nd.allXhrSet.clear(),nd.xhrMap=new WeakMap}};let rd=nd;rd.xhrMap=new WeakMap,rd.allXhrSet=new Set,rd.loader=(e,t)=>new Promise((t,n)=>{let r=nd.createXHR(e.target,e.settings?e.settings.resolveURL(e.url):e.url,e.type,n=>{e.result=n,t()},n);r.send()});function id(e,t){let n=-1;return r(0);function r(i,a){if(a)return Promise.reject(a);if(i<=n)return Promise.reject(Error(`next() called multiple times`));n=i;let o=e[i];if(!o)return Promise.resolve();try{return Promise.resolve(o(t,r.bind(null,i+1)))}catch(e){return Promise.reject(e)}}}var ad=class{static load(e){return id(this.middlewares,e).then(()=>e.result)}};ad.middlewares=[rd.loader];function od(e,t={}){var n;let r={resourceOptions:{crossorigin:t.crossOrigin}};if(Na.fromURL)return Na.fromURL(e,r).catch(e=>{if(e instanceof Error)throw e;let t=Error(`Texture loading error`);throw t.event=e,t});r.resourceOptions.autoLoad=!1;let i=Na.from(e,r);if(i.baseTexture.valid)return Promise.resolve(i);let a=i.baseTexture.resource;return(n=a._live2d_load)??(a._live2d_load=new Promise((e,t)=>{let n=e=>{a.source.removeEventListener(`error`,n);let r=Error(`Texture loading error`);r.event=e,t(r)};a.source.addEventListener(`error`,n),a.load().then(()=>e(i)).catch(n)})),a._live2d_load}const sd=`Live2DFactory`,cd=(e,t)=>xc(void 0,null,function*(){if(typeof e.source==`string`){let t=yield ad.load({url:e.source,type:`json`,target:e.live2dModel});t.url=e.source,e.source=t,e.live2dModel.emit(`settingsJSONLoaded`,t)}return t()}),ld=(e,t)=>xc(void 0,null,function*(){if(e.source instanceof Gu)return e.settings=e.source,t();if(typeof e.source==`object`){let n=hd.findRuntime(e.source);if(n){let r=n.createModelSettings(e.source);return e.settings=r,e.live2dModel.emit(`settingsLoaded`,r),t()}}throw TypeError(`Unknown settings format.`)}),ud=(e,t)=>{if(e.settings){let n=hd.findRuntime(e.settings);if(n)return n.ready().then(t)}return t()},dd=(e,t)=>xc(void 0,null,function*(){yield t();let n=e.internalModel;if(n){let t=e.settings,r=hd.findRuntime(t);if(r){let i=[];t.pose&&i.push(ad.load({settings:t,url:t.pose,type:`json`,target:n}).then(t=>{n.pose=r.createPose(n.coreModel,t),e.live2dModel.emit(`poseLoaded`,n.pose)}).catch(t=>{e.live2dModel.emit(`poseLoadError`,t),Fu.warn(sd,`Failed to load pose.`,t)})),t.physics&&i.push(ad.load({settings:t,url:t.physics,type:`json`,target:n}).then(t=>{n.physics=r.createPhysics(n.coreModel,t),e.live2dModel.emit(`physicsLoaded`,n.physics)}).catch(t=>{e.live2dModel.emit(`physicsLoadError`,t),Fu.warn(sd,`Failed to load physics.`,t)})),i.length&&(yield Promise.all(i))}}}),fd=(e,t)=>xc(void 0,null,function*(){if(e.settings){let n=e.live2dModel,r=e.settings.textures.map(t=>{let n=e.settings.resolveURL(t);return od(n,{crossOrigin:e.options.crossOrigin})});if(yield t(),e.internalModel)n.internalModel=e.internalModel,n.emit(`modelLoaded`,e.internalModel);else throw TypeError(`Missing internal model.`);n.textures=yield Promise.all(r),n.emit(`textureLoaded`,n.textures)}else throw TypeError(`Missing settings.`)}),pd=(e,t)=>xc(void 0,null,function*(){let n=e.settings;if(n instanceof Gu){let r=hd.findRuntime(n);if(!r)throw TypeError(`Unknown model settings.`);let i=yield ad.load({settings:n,url:n.moc,type:`arraybuffer`,target:e.live2dModel});if(!r.isValidMoc(i))throw Error(`Invalid moc data`);let a=r.createCoreModel(i);return e.internalModel=r.createInternalModel(a,n,e.options),t()}throw TypeError(`Missing settings.`)}),md=class{static registerRuntime(e){md.runtimes.push(e),md.runtimes.sort((e,t)=>t.version-e.version)}static findRuntime(e){for(let t of md.runtimes)if(t.test(e))return t}static setupLive2DModel(e,t,n){return xc(this,null,function*(){let r=new Promise(t=>e.once(`textureLoaded`,t)),i=new Promise(t=>e.once(`modelLoaded`,t)),a=Promise.all([r,i]).then(()=>e.emit(`ready`));yield id(md.live2DModelMiddlewares,{live2dModel:e,source:t,options:n||{}}),yield a,e.emit(`load`)})}static loadMotion(e,t,n){var r,i;let a=r=>e.emit(`motionLoadError`,t,n,r);try{let o=(r=e.definitions[t])?.[n];if(!o)return Promise.resolve(void 0);e.listeners(`destroy`).includes(md.releaseTasks)||e.once(`destroy`,md.releaseTasks);let s=md.motionTasksMap.get(e);s||(s={},md.motionTasksMap.set(e,s));let c=s[t];c||(c=[],s[t]=c);let l=e.getMotionFile(o);return(i=c[n])??(c[n]=ad.load({url:l,settings:e.settings,type:e.motionDataType,target:e}).then(r=>{var i;let a=(i=md.motionTasksMap.get(e))?.[t];a&&delete a[n];let s=e.createMotion(r,t,o);return e.emit(`motionLoaded`,t,n,s),s}).catch(t=>{Fu.warn(e.tag,`Failed to load motion: ${l} -`,t),a(t)})),c[n]}catch(r){Fu.warn(e.tag,`Failed to load motion at "${t}"[${n}] -`,r),a(r)}return Promise.resolve(void 0)}static loadExpression(e,t){var n;let r=n=>e.emit(`expressionLoadError`,t,n);try{let i=e.definitions[t];if(!i)return Promise.resolve(void 0);e.listeners(`destroy`).includes(md.releaseTasks)||e.once(`destroy`,md.releaseTasks);let a=md.expressionTasksMap.get(e);a||(a=[],md.expressionTasksMap.set(e,a));let o=e.getExpressionFile(i);return(n=a[t])??(a[t]=ad.load({url:o,settings:e.settings,type:`json`,target:e}).then(n=>{let r=md.expressionTasksMap.get(e);r&&delete r[t];let a=e.createExpression(n,i);return e.emit(`expressionLoaded`,t,a),a}).catch(t=>{Fu.warn(e.tag,`Failed to load expression: ${o} -`,t),r(t)})),a[t]}catch(n){Fu.warn(e.tag,`Failed to load expression at [${t}] -`,n),r(n)}return Promise.resolve(void 0)}static releaseTasks(){this instanceof Zu?md.motionTasksMap.delete(this):md.expressionTasksMap.delete(this)}};let hd=md;hd.runtimes=[],hd.urlToJSON=cd,hd.jsonToSettings=ld,hd.waitUntilReady=ud,hd.setupOptionals=dd,hd.setupEssentials=fd,hd.createInternalModel=pd,hd.live2DModelMiddlewares=[cd,ld,ud,dd,fd,pd],hd.motionTasksMap=new WeakMap,hd.expressionTasksMap=new WeakMap,Zu.prototype._loadMotion=function(e,t){return hd.loadMotion(this,e,t)},Bu.prototype._loadExpression=function(e){return hd.loadExpression(this,e)};var gd=class{constructor(){this._autoInteract=!1}get autoInteract(){return this._autoInteract}set autoInteract(e){e!==this._autoInteract&&(e?this.on(`pointertap`,_d,this):this.off(`pointertap`,_d,this),this._autoInteract=e)}registerInteraction(e){e!==this.interactionManager&&(this.unregisterInteraction(),this._autoInteract&&e&&(this.interactionManager=e,e.on(`pointermove`,vd,this)))}unregisterInteraction(){var e;this.interactionManager&&((e=this.interactionManager)==null||e.off(`pointermove`,vd,this),this.interactionManager=void 0)}};function _d(e){this.tap(e.data.global.x,e.data.global.y)}function vd(e){this.focus(e.data.global.x,e.data.global.y)}var yd=class extends oa{};const bd=new Hi,xd=new Xi;let Sd;var Cd=class extends _c{constructor(e){super(),this.tag=`Live2DModel(uninitialized)`,this.textures=[],this.transform=new yd,this.anchor=new Yi(this.onAnchorChange,this,0,0),this.glContextID=-1,this.elapsedTime=performance.now(),this.deltaTime=0,this._autoUpdate=!1,this.once(`modelLoaded`,()=>this.init(e))}static from(e,t){let n=new this(t);return hd.setupLive2DModel(n,e,t).then(()=>n)}static fromSync(e,t){let n=new this(t);return hd.setupLive2DModel(n,e,t).then(t?.onLoad).catch(t?.onError),n}static registerTicker(e){Sd=e}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){var t;Sd||=(t=window.PIXI)?.Ticker,e?this._destroyed||(Sd?(Sd.shared.add(this.onTickerUpdate,this),this._autoUpdate=!0):Fu.warn(this.tag,`No Ticker registered, please call Live2DModel.registerTicker(Ticker).`)):(Sd?.shared.remove(this.onTickerUpdate,this),this._autoUpdate=!1)}init(e){this.tag=`Live2DModel(${this.internalModel.settings.name})`;let t=Object.assign({autoUpdate:!0,autoInteract:!0},e);t.autoInteract&&(this.interactive=!0),this.autoInteract=t.autoInteract,this.autoUpdate=t.autoUpdate}onAnchorChange(){this.pivot.set(this.anchor.x*this.internalModel.width,this.anchor.y*this.internalModel.height)}motion(e,t,n){return t===void 0?this.internalModel.motionManager.startRandomMotion(e,n):this.internalModel.motionManager.startMotion(e,t,n)}expression(e){return this.internalModel.motionManager.expressionManager?e===void 0?this.internalModel.motionManager.expressionManager.setRandomExpression():this.internalModel.motionManager.expressionManager.setExpression(e):Promise.resolve(!1)}focus(e,t,n=!1){bd.x=e,bd.y=t,this.toModelPosition(bd,bd,!0);let r=bd.x/this.internalModel.originalWidth*2-1,i=bd.y/this.internalModel.originalHeight*2-1,a=Math.atan2(i,r);this.internalModel.focusController.focus(Math.cos(a),-Math.sin(a),n)}tap(e,t){let n=this.hitTest(e,t);n.length&&(Fu.log(this.tag,`Hit`,n),this.emit(`hit`,n))}hitTest(e,t){return bd.x=e,bd.y=t,this.toModelPosition(bd,bd),this.internalModel.hitTest(bd.x,bd.y)}toModelPosition(e,t=e.clone(),n){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.transform.worldTransform.applyInverse(e,t),this.internalModel.localTransform.applyInverse(t,t),t}containsPoint(e){return this.getBounds(!0).contains(e.x,e.y)}_calculateBounds(){this._bounds.addFrame(this.transform,0,0,this.internalModel.width,this.internalModel.height)}onTickerUpdate(){this.update(Sd.shared.deltaMS)}update(e){this.deltaTime+=e,this.elapsedTime+=e}_render(e){this.registerInteraction(e.plugins.interaction),e.batch.reset(),e.geometry.reset(),e.shader.reset(),e.state.reset();let t=!1;this.glContextID!==e.CONTEXT_UID&&(this.glContextID=e.CONTEXT_UID,this.internalModel.updateWebGLContext(e.gl,this.glContextID),t=!0);for(let n=0;nt.destroy(e.baseTexture)),this.internalModel.destroy(),super.destroy(e)}};Lu(Cd,[gd]);const wd=class{static resolveURL(e,t){var n;let r=(n=wd.filesMap[e])?.[t];if(r===void 0)throw Error(`Cannot find this file from uploaded files: `+t);return r}static upload(e,t){return xc(this,null,function*(){let n={};for(let r of t.getDefinedFiles()){let i=decodeURI(ti.resolve(t.url,r)),a=e.find(e=>e.webkitRelativePath===i);a&&(n[r]=URL.createObjectURL(a))}wd.filesMap[t._objectURL]=n})}static createSettings(e){return xc(this,null,function*(){let t=e.find(e=>e.name.endsWith(`model.json`)||e.name.endsWith(`model3.json`));if(!t)throw TypeError(`Settings file not found`);let n=yield wd.readText(t),r=JSON.parse(n);r.url=t.webkitRelativePath;let i=hd.findRuntime(r);if(!i)throw Error(`Unknown settings JSON`);let a=i.createModelSettings(r);return a._objectURL=URL.createObjectURL(t),a})}static readText(e){return xc(this,null,function*(){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsText(e,`utf8`)})})}};let Td=wd;Td.filesMap={},Td.factory=(e,t)=>xc(void 0,null,function*(){if(Array.isArray(e.source)&&e.source[0]instanceof File){let t=e.source,n=t.settings;if(!n)n=yield wd.createSettings(t);else if(!n._objectURL)throw Error(`"_objectURL" must be specified in ModelSettings`);n.validateFiles(t.map(e=>encodeURI(e.webkitRelativePath))),yield wd.upload(t,n),n.resolveURL=function(e){return wd.resolveURL(this._objectURL,e)},e.source=n,e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){let e=this.settings._objectURL;if(URL.revokeObjectURL(e),wd.filesMap[e])for(let t of Object.values(wd.filesMap[e]))URL.revokeObjectURL(t);delete wd.filesMap[e]})})}return t()}),hd.live2DModelMiddlewares.unshift(Td.factory);const Ed=class{static unzip(e,t){return xc(this,null,function*(){let n=yield Ed.getFilePaths(e),r=[];for(let e of t.getDefinedFiles()){let i=decodeURI(ti.resolve(t.url,e));n.includes(i)&&r.push(i)}let i=yield Ed.getFiles(e,r);for(let e=0;ee.endsWith(`model.json`)||e.endsWith(`model3.json`));if(!n)throw Error(`Settings file not found`);let r=yield Ed.readText(e,n);if(!r)throw Error(`Empty settings file: `+n);let i=JSON.parse(r);i.url=n;let a=hd.findRuntime(i);if(!a)throw Error(`Unknown settings JSON`);return a.createModelSettings(i)})}static zipReader(e,t){return xc(this,null,function*(){throw Error(`Not implemented`)})}static getFilePaths(e){return xc(this,null,function*(){throw Error(`Not implemented`)})}static getFiles(e,t){return xc(this,null,function*(){throw Error(`Not implemented`)})}static readText(e,t){return xc(this,null,function*(){throw Error(`Not implemented`)})}static releaseReader(e){}};let Dd=Ed;if(Dd.ZIP_PROTOCOL=`zip://`,Dd.uid=0,Dd.factory=(e,t)=>xc(void 0,null,function*(){let n=e.source,r,i,a;if(typeof n==`string`&&(n.endsWith(`.zip`)||n.startsWith(Ed.ZIP_PROTOCOL))?(r=n.startsWith(Ed.ZIP_PROTOCOL)?n.slice(Ed.ZIP_PROTOCOL.length):n,i=yield ad.load({url:r,type:`blob`,target:e.live2dModel})):Array.isArray(n)&&n.length===1&&n[0]instanceof File&&n[0].name.endsWith(`.zip`)&&(i=n[0],r=URL.createObjectURL(i),a=n.settings),i){if(!i.size)throw Error(`Empty zip file`);let t=yield Ed.zipReader(i,r);a||=yield Ed.createSettings(t),a._objectURL=Ed.ZIP_PROTOCOL+Ed.uid+`/`+a.url;let n=yield Ed.unzip(t,a);n.settings=a,e.source=n,r.startsWith(`blob:`)&&e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){URL.revokeObjectURL(r)})}),Ed.releaseReader(t)}return t()}),hd.live2DModelMiddlewares.unshift(Dd.factory),!window.Live2DCubismCore)throw Error(`Could not find Cubism 4 runtime. This plugin requires live2dcubismcore.js to be loaded.`);var Od=class extends Bu{constructor(e,t){var n;super(e,t),this.queueManager=new Dl,this.definitions=(n=e.expressions)??[],this.init()}isFinished(){return this.queueManager.isFinished()}getExpressionIndex(e){return this.definitions.findIndex(t=>t.Name===e)}getExpressionFile(e){return e.File}createExpression(e,t){return el.create(e)}_setExpression(e){return this.queueManager.startMotion(e,!1,performance.now())}stopAllExpressions(){this.queueManager.stopAllMotions()}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}},kd=class e extends Gu{constructor(t){if(super(t),!e.isValidJSON(t))throw TypeError(`Invalid JSON.`);Object.assign(this,new wu(t))}static isValidJSON(e){var t;return!!e?.FileReferences&&typeof e.FileReferences.Moc==`string`&&(t=e.FileReferences.Textures)?.length>0&&e.FileReferences.Textures.every(e=>typeof e==`string`)}replaceFiles(e){if(super.replaceFiles(e),this.motions)for(let[t,n]of Object.entries(this.motions))for(let r=0;r{this.emit(`motion:`+t)})}isFinished(){return this.queueManager.isFinished()}_startMotion(e,t){return e.setFinishedMotionHandler(t),this.queueManager.stopAllMotions(),this.queueManager.startMotion(e,!1,performance.now())}_stopAllMotions(){this.queueManager.stopAllMotions()}createMotion(e,t,n){let r=Tl.create(e),i=new ul(e),a=(t===this.groups.idle?Pu.idleMotionFadingDuration:Pu.motionFadingDuration)/1e3;return i.getMotionFadeInTime()===void 0&&r.setFadeInTime(n.FadeInTime>0?n.FadeInTime:a),i.getMotionFadeOutTime()===void 0&&r.setFadeOutTime(n.FadeOutTime>0?n.FadeOutTime:a),r.setEffectIds(this.eyeBlinkIds,this.lipSyncIds),r}getMotionFile(e){return e.File}getMotionName(e){return e.File}getSoundFile(e){return e.Sound}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}destroy(){super.destroy(),this.queueManager.release(),this.queueManager=void 0}};const jd=new Pc;var Md=class extends $u{constructor(e,t,n){super(),this.lipSync=!0,this.breath=Sc.create(),this.renderer=new Cu,this.idParamAngleX=Tu,this.idParamAngleY=Eu,this.idParamAngleZ=Du,this.idParamEyeBallX=Ou,this.idParamEyeBallY=ku,this.idParamBodyAngleX=Au,this.idParamBreath=ju,this.pixelsPerUnit=1,this.centeringTransform=new Xi,this.coreModel=e,this.settings=t,this.motionManager=new Ad(t,n),this.init()}init(){var e;super.init(),(e=this.settings.getEyeBlinkParameters())?.length>0&&(this.eyeBlink=Tc.create(this.settings)),this.breath.setParameters([new Cc(this.idParamAngleX,0,15,6.5345,.5),new Cc(this.idParamAngleY,0,8,3.5345,.5),new Cc(this.idParamAngleZ,0,10,5.5345,.5),new Cc(this.idParamBodyAngleX,0,4,15.5345,.5),new Cc(this.idParamBreath,0,.5,3.2345,.5)]),this.renderer.initialize(this.coreModel),this.renderer.setIsPremultipliedAlpha(!0)}getSize(){return[this.coreModel.getModel().canvasinfo.CanvasWidth,this.coreModel.getModel().canvasinfo.CanvasHeight]}getLayout(){let e={};if(this.settings.layout)for(let t of Object.keys(this.settings.layout)){let n=t.charAt(0).toLowerCase()+t.slice(1);e[n]=this.settings.layout[t]}return e}setupLayout(){super.setupLayout(),this.pixelsPerUnit=this.coreModel.getModel().canvasinfo.PixelsPerUnit,this.centeringTransform.scale(this.pixelsPerUnit,this.pixelsPerUnit).translate(this.originalWidth/2,this.originalHeight/2)}updateWebGLContext(e,t){this.renderer.firstDraw=!0,this.renderer._bufferData={vertex:null,uv:null,index:null},this.renderer.startUp(e),this.renderer._clippingManager._currentFrameNo=t,this.renderer._clippingManager._maskTexture=void 0,mu.getInstance()._shaderSets=[]}bindTexture(e,t){this.renderer.bindTexture(e,t)}getHitAreaDefs(){var e,t;return(t=(e=this.settings.hitAreas)?.map(e=>({id:e.Id,name:e.Name,index:this.coreModel.getDrawableIndex(e.Id)})))??[]}getDrawableIDs(){return this.coreModel.getDrawableIds()}getDrawableIndex(e){return this.coreModel.getDrawableIndex(e)}getDrawableVertices(e){if(typeof e==`string`&&(e=this.coreModel.getDrawableIndex(e),e===-1))throw TypeError(`Unable to find drawable ID: `+e);let t=this.coreModel.getDrawableVertices(e).slice();for(let e=0;e{function n(){try{Id(),e()}catch(e){if(Pd--,Pd<0){let n=Error(`Failed to start up Cubism 4 framework.`);n.cause=e,t(n);return}Fu.log(`Cubism4`,`Startup failed, retrying 10ms later...`),setTimeout(n,10)}}n()}),Nd)}function Id(e){e=Object.assign({logFunction:console.log,loggingLevel:Uc.LogLevel_Verbose},e),Hc.startUp(e),Hc.initialize()}hd.registerRuntime({version:4,ready:Fd,test(e){return e instanceof kd||kd.isValidJSON(e)},isValidMoc(e){if(e.byteLength<4)return!1;let t=new Int8Array(e,0,4);return String.fromCharCode(...t)===`MOC3`},createModelSettings(e){return new kd(e)},createCoreModel(e){let t=Zc.create(e);try{let e=t.createModel();return e.__moc=t,e}catch(e){try{t.release()}catch{}throw e}},createInternalModel(e,t,n){let r=new Md(e,t,n),i=e;return i.__moc&&(r.__moc=i.__moc,delete i.__moc,r.once(`destroy`,Ld)),r},createPhysics(e,t){return Ul.create(t)},createPose(e,t){return kc.create(t)}});function Ld(){var e;(e=this.__moc)==null||e.release()}var Rd=R({__name:`Canvas`,props:{width:{},height:{},resolution:{default:2}},setup(e,{expose:t}){let n=e,r=z(),i=z(),a=z();async function o(e){Cd.registerTicker(Ii),Mi.add(Li),i.value=new yc({width:n.width*n.resolution,height:n.height*n.resolution,backgroundAlpha:0,preserveDrawingBuffer:!0}),a.value=i.value.view,a.value.style.width=`100%`,a.value.style.height=`100%`,a.value.style.objectFit=`cover`,a.value.style.display=`block`,e.appendChild(i.value.view)}function s(){i.value&&i.value.renderer.resize(n.width,n.height)}I([()=>n.width,()=>n.height],()=>s()),I(()=>n.resolution,e=>{i.value&&e&&(i.value.renderer.resolution=e,s())}),pn(async()=>r.value&&await o(r.value)),On(()=>i.value?.destroy());async function c(){let e=new Promise(e=>{if(!a.value||!i.value)return e(null);i.value.render(),a.value.toBlob(e)});return e}function l(){return a.value}return t({captureFrame:c,canvasElement:l}),(e,t)=>(L(),B(`div`,{ref_key:`containerRef`,ref:r,"h-full":``,"w-full":``},[Mn(e.$slots,`default`,{app:i.value})],512))}}),zd=Rd,Bd=function(){function e(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new Hi,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(e.prototype,`pointerId`,{get:function(){return this.identifier},enumerable:!1,configurable:!0}),e.prototype.getLocalPosition=function(e,t,n){return e.worldTransform.applyInverse(n||this.global,t)},e.prototype.copyEvent=function(e){`isPrimary`in e&&e.isPrimary&&(this.isPrimary=!0),this.button=`button`in e&&e.button;var t=`buttons`in e&&e.buttons;this.buttons=Number.isInteger(t)?t:`which`in e&&e.which,this.width=`width`in e&&e.width,this.height=`height`in e&&e.height,this.tiltX=`tiltX`in e&&e.tiltX,this.tiltY=`tiltY`in e&&e.tiltY,this.pointerType=`pointerType`in e&&e.pointerType,this.pressure=`pressure`in e&&e.pressure,this.rotationAngle=`rotationAngle`in e&&e.rotationAngle,this.twist=`twist`in e&&e.twist||0,this.tangentialPressure=`tangentialPressure`in e&&e.tangentialPressure||0},e.prototype.reset=function(){this.isPrimary=!1},e}(),Vd=function(e,t){return Vd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Vd(e,t)};function Hd(e,t){Vd(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ud=function(){function e(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return e.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},e.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},e}(),Wd=function(){function e(t){this._pointerId=t,this._flags=e.FLAGS.NONE}return e.prototype._doSet=function(e,t){t?this._flags|=e:this._flags&=~e},Object.defineProperty(e.prototype,`pointerId`,{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`flags`,{get:function(){return this._flags},set:function(e){this._flags=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`none`,{get:function(){return this._flags===e.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`over`,{get:function(){return(this._flags&e.FLAGS.OVER)!==0},set:function(t){this._doSet(e.FLAGS.OVER,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`rightDown`,{get:function(){return(this._flags&e.FLAGS.RIGHT_DOWN)!==0},set:function(t){this._doSet(e.FLAGS.RIGHT_DOWN,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`leftDown`,{get:function(){return(this._flags&e.FLAGS.LEFT_DOWN)!==0},set:function(t){this._doSet(e.FLAGS.LEFT_DOWN,t)},enumerable:!1,configurable:!0}),e.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),e}(),Gd=function(){function e(){this._tempPoint=new Hi}return e.prototype.recursiveFindHit=function(e,t,n,r,i){var a;if(!t||!t.visible)return!1;var o=e.data.global;i=t.interactive||i;var s=!1,c=i,l=!0;if(t.hitArea)r&&(t.worldTransform.applyInverse(o,this._tempPoint),t.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?s=!0:(r=!1,l=!1)),c=!1;else if(t._mask&&r){var u=t._mask.isMaskData?t._mask.maskObject:t._mask;u&&!(a=u.containsPoint)?.call(u,o)&&(r=!1)}if(l&&t.interactiveChildren&&t.children)for(var d=t.children,f=d.length-1;f>=0;f--){var p=d[f],m=this.recursiveFindHit(e,p,n,r,c);if(m){if(!p.parent)continue;c=!1,m&&(e.target&&(r=!1),s=!0)}}return i&&(r&&!e.target&&!t.hitArea&&t.containsPoint&&t.containsPoint(o)&&(s=!0),t.interactive&&(s&&!e.target&&(e.target=t),n&&n(e,t,!!s))),s},e.prototype.findHit=function(e,t,n,r){this.recursiveFindHit(e,t,n,r,!1)},e}(),Kd={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor===`pointer`},set buttonMode(e){e?this.cursor=`pointer`:this.cursor===`pointer`&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};mc.mixin(Kd);var qd=1,Jd={target:null,data:{global:null}},Yd=function(e){Hd(t,e);function t(t,n){var r=e.call(this)||this;return n||={},r.renderer=t,r.autoPreventDefault=n.autoPreventDefault===void 0?!0:n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new Bd,r.mouse.identifier=qd,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[qd]=r.mouse,r.interactionDataPool=[],r.eventData=new Ud,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!(`PointerEvent`in globalThis),r.supportsTouchEvents=`ontouchstart`in globalThis,r.supportsPointerEvents=!!globalThis.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:`inherit`,pointer:`pointer`},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new Gd,r._tempDisplayObject=new hc,r._eventListenerOptions={capture:!0,passive:!1},r._useSystemTicker=n.useSystemTicker===void 0?!0:n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return Object.defineProperty(t.prototype,`useSystemTicker`,{get:function(){return this._useSystemTicker},set:function(e){this._useSystemTicker=e,e?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lastObjectRendered`,{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),t.prototype.hitTest=function(e,t){return Jd.target=null,Jd.data.global=e,t||=this.lastObjectRendered,this.processInteractive(Jd,t,null,!0),Jd.target},t.prototype.setTargetElement=function(e,t){t===void 0&&(t=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=e,this.resolution=t,this.addEvents(),this.addTickerListener()},t.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(Ii.system.add(this.tickerUpdate,this,Pi.INTERACTION),this.tickerAdded=!0)},t.prototype.removeTickerListener=function(){this.tickerAdded&&(Ii.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},t.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=`none`,e.msTouchAction=`none`):this.supportsPointerEvents&&(e.touchAction=`none`),this.supportsPointerEvents?(globalThis.document.addEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},t.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=``,e.msTouchAction=``):this.supportsPointerEvents&&(e.touchAction=``),this.supportsPointerEvents?(globalThis.document.removeEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},t.prototype.tickerUpdate=function(e){this._deltaTime+=e,!(this._deltaTime0&&(a=e.composedPath()[0]);for(var o=a===this.interactionDOMElement?``:`outside`,s=0;s 0.0) { - c.rgb /= c.a; - - vec3 rgb = pow(c.rgb, vec3(1. / gamma)); - rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast); - rgb.r *= red; - rgb.g *= green; - rgb.b *= blue; - c.rgb = rgb * brightness; - - c.rgb *= c.a; - } - - gl_FragColor = c * alpha; -} -`,ef=function(e){Zd(t,e);function t(t){var n=e.call(this,Qd,$d)||this;return n.gamma=1,n.saturation=1,n.contrast=1,n.brightness=1,n.red=1,n.green=1,n.blue=1,n.alpha=1,Object.assign(n,t),n}return t.prototype.apply=function(e,t,n,r){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,n,r)},t}(Xo),tf=function(e,t){return tf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},tf(e,t)};function nf(e,t){tf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var rf=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,af=` -varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform vec2 uOffset; - -void main(void) -{ - vec4 color = vec4(0.0); - - // Sample top left pixel - color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y)); - - // Sample top right pixel - color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y)); - - // Sample bottom right pixel - color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y)); - - // Sample bottom left pixel - color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y)); - - // Average - color *= 0.25; - - gl_FragColor = color; -}`,sf=` -varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform vec2 uOffset; -uniform vec4 filterClamp; - -void main(void) -{ - vec4 color = vec4(0.0); - - // Sample top left pixel - color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw)); - - // Sample top right pixel - color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw)); - - // Sample bottom right pixel - color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw)); - - // Sample bottom left pixel - color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw)); - - // Average - color *= 0.25; - - gl_FragColor = color; -} -`,cf=function(e){nf(t,e);function t(t,n,r){t===void 0&&(t=4),n===void 0&&(n=3),r===void 0&&(r=!1);var i=e.call(this,rf,r?sf:af)||this;return i._kernels=[],i._blur=4,i._quality=3,i.uniforms.uOffset=new Float32Array(2),i._pixelSize=new Hi,i.pixelSize=1,i._clamp=r,Array.isArray(t)?i.kernels=t:(i._blur=t,i.quality=n),i}return t.prototype.apply=function(e,t,n,r){var i=this._pixelSize.x/t._frame.width,a=this._pixelSize.y/t._frame.height,o;if(this._quality===1||this._blur===0)o=this._kernels[0]+.5,this.uniforms.uOffset[0]=o*i,this.uniforms.uOffset[1]=o*a,e.applyFilter(this,t,n,r);else{for(var s=e.getFilterTexture(),c=t,l=s,u=void 0,d=this._quality-1,f=0;f0)for(var r=e,i=e/t,a=1;a0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`clamp`,{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`pixelSize`,{get:function(){return this._pixelSize},set:function(e){typeof e==`number`?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof Hi?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`quality`,{get:function(){return this._quality},set:function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`blur`,{get:function(){return this._blur},set:function(e){this._blur=e,this._generateKernels()},enumerable:!1,configurable:!0}),t}(Xo),lf=function(e,t){return lf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},lf(e,t)};function uf(e,t){lf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var df=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,ff=` -uniform sampler2D uSampler; -varying vec2 vTextureCoord; - -uniform float threshold; - -void main() { - vec4 color = texture2D(uSampler, vTextureCoord); - - // A simple & fast algorithm for getting brightness. - // It's inaccuracy , but good enought for this feature. - float _max = max(max(color.r, color.g), color.b); - float _min = min(min(color.r, color.g), color.b); - float brightness = (_max + _min) * 0.5; - - if(brightness > threshold) { - gl_FragColor = color; - } else { - gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); - } -} -`,pf=function(e){uf(t,e);function t(t){t===void 0&&(t=.5);var n=e.call(this,df,ff)||this;return n.threshold=t,n}return Object.defineProperty(t.prototype,`threshold`,{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),t}(Xo),mf=`uniform sampler2D uSampler; -varying vec2 vTextureCoord; - -uniform sampler2D bloomTexture; -uniform float bloomScale; -uniform float brightness; - -void main() { - vec4 color = texture2D(uSampler, vTextureCoord); - color.rgb *= brightness; - vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0); - bloomColor.rgb *= bloomScale; - gl_FragColor = color + bloomColor; -} -`,hf=function(e){uf(t,e);function t(n){var r=e.call(this,df,mf)||this;r.bloomScale=1,r.brightness=1,r._resolution=G.FILTER_RESOLUTION,typeof n==`number`&&(n={threshold:n});var i=Object.assign(t.defaults,n);r.bloomScale=i.bloomScale,r.brightness=i.brightness;var a=i.kernels,o=i.blur,s=i.quality,c=i.pixelSize,l=i.resolution;return r._extractFilter=new pf(i.threshold),r._extractFilter.resolution=l,r._blurFilter=a?new cf(a):new cf(o,s),r.pixelSize=c,r.resolution=l,r}return t.prototype.apply=function(e,t,n,r,i){var a=e.getFilterTexture();this._extractFilter.apply(e,t,a,1,i);var o=e.getFilterTexture();this._blurFilter.apply(e,a,o,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=o,e.applyFilter(this,t,n,r),e.returnFilterTexture(o),e.returnFilterTexture(a)},Object.defineProperty(t.prototype,`resolution`,{get:function(){return this._resolution},set:function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`threshold`,{get:function(){return this._extractFilter.threshold},set:function(e){this._extractFilter.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`kernels`,{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`blur`,{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`quality`,{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`pixelSize`,{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),t.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:G.FILTER_RESOLUTION},t}(Xo),gf=function(e,t){return gf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},gf(e,t)};function _f(e,t){gf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var vf=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,yf=`varying vec2 vTextureCoord; - -uniform vec4 filterArea; -uniform float pixelSize; -uniform sampler2D uSampler; - -vec2 mapCoord( vec2 coord ) -{ - coord *= filterArea.xy; - coord += filterArea.zw; - - return coord; -} - -vec2 unmapCoord( vec2 coord ) -{ - coord -= filterArea.zw; - coord /= filterArea.xy; - - return coord; -} - -vec2 pixelate(vec2 coord, vec2 size) -{ - return floor( coord / size ) * size; -} - -vec2 getMod(vec2 coord, vec2 size) -{ - return mod( coord , size) / size; -} - -float character(float n, vec2 p) -{ - p = floor(p*vec2(4.0, -4.0) + 2.5); - - if (clamp(p.x, 0.0, 4.0) == p.x) - { - if (clamp(p.y, 0.0, 4.0) == p.y) - { - if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0; - } - } - return 0.0; -} - -void main() -{ - vec2 coord = mapCoord(vTextureCoord); - - // get the rounded color.. - vec2 pixCoord = pixelate(coord, vec2(pixelSize)); - pixCoord = unmapCoord(pixCoord); - - vec4 color = texture2D(uSampler, pixCoord); - - // determine the character to use - float gray = (color.r + color.g + color.b) / 3.0; - - float n = 65536.0; // . - if (gray > 0.2) n = 65600.0; // : - if (gray > 0.3) n = 332772.0; // * - if (gray > 0.4) n = 15255086.0; // o - if (gray > 0.5) n = 23385164.0; // & - if (gray > 0.6) n = 15252014.0; // 8 - if (gray > 0.7) n = 13199452.0; // @ - if (gray > 0.8) n = 11512810.0; // # - - // get the mod.. - vec2 modd = getMod(coord, vec2(pixelSize)); - - gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0); - -} -`,bf=function(e){_f(t,e);function t(t){t===void 0&&(t=8);var n=e.call(this,vf,yf)||this;return n.size=t,n}return Object.defineProperty(t.prototype,`size`,{get:function(){return this.uniforms.pixelSize},set:function(e){this.uniforms.pixelSize=e},enumerable:!1,configurable:!0}),t}(Xo),xf=function(e,t){return xf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},xf(e,t)};function Sf(e,t){xf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Cf=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,wf=`precision mediump float; - -varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform vec4 filterArea; - -uniform float transformX; -uniform float transformY; -uniform vec3 lightColor; -uniform float lightAlpha; -uniform vec3 shadowColor; -uniform float shadowAlpha; - -void main(void) { - vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY); - vec4 color = texture2D(uSampler, vTextureCoord); - float light = texture2D(uSampler, vTextureCoord - transform).a; - float shadow = texture2D(uSampler, vTextureCoord + transform).a; - - color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0)); - color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0)); - gl_FragColor = vec4(color.rgb * color.a, color.a); -} -`,Tf=function(e){Sf(t,e);function t(t){var n=e.call(this,Cf,wf)||this;return n._thickness=2,n._angle=0,n.uniforms.lightColor=new Float32Array(3),n.uniforms.shadowColor=new Float32Array(3),Object.assign(n,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},t),n.padding=1,n}return t.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(t.prototype,`rotation`,{get:function(){return this._angle/Bi},set:function(e){this._angle=e*Bi,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`thickness`,{get:function(){return this._thickness},set:function(e){this._thickness=e,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lightColor`,{get:function(){return li(this.uniforms.lightColor)},set:function(e){si(e,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lightAlpha`,{get:function(){return this.uniforms.lightAlpha},set:function(e){this.uniforms.lightAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`shadowColor`,{get:function(){return li(this.uniforms.shadowColor)},set:function(e){si(e,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`shadowAlpha`,{get:function(){return this.uniforms.shadowAlpha},set:function(e){this.uniforms.shadowAlpha=e},enumerable:!1,configurable:!0}),t}(Xo),Ef=function(e,t){return Ef=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Ef(e,t)};function Df(e,t){Ef(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Of=`varying vec2 vTextureCoord; - -uniform sampler2D uSampler; -uniform float uAlpha; - -void main(void) -{ - gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha; -} -`,kf=function(e){Df(t,e);function t(t){t===void 0&&(t=1);var n=e.call(this,Js,Of,{uAlpha:1})||this;return n.alpha=t,n}return Object.defineProperty(t.prototype,`alpha`,{get:function(){return this.uniforms.uAlpha},set:function(e){this.uniforms.uAlpha=e},enumerable:!1,configurable:!0}),t}(Xo),Af=function(e,t){return Af=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Af(e,t)};function jf(e,t){Af(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Mf=` - attribute vec2 aVertexPosition; - - uniform mat3 projectionMatrix; - - uniform float strength; - - varying vec2 vBlurTexCoords[%size%]; - - uniform vec4 inputSize; - uniform vec4 outputFrame; - - vec4 filterVertexPosition( void ) - { - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); - } - - vec2 filterTextureCoord( void ) - { - return aVertexPosition * (outputFrame.zw * inputSize.zw); - } - - void main(void) - { - gl_Position = filterVertexPosition(); - - vec2 textureCoord = filterTextureCoord(); - %blur% - }`;function Nf(e,t){var n=Math.ceil(e/2),r=Mf,i=``,a;a=t?`vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);`:`vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);`;for(var o=0;o=n&&(o=e-s-1),c=c.replace(`%value%`,t[o].toString()),i+=c,i+=` -`}return r=r.replace(`%blur%`,i),r=r.replace(`%size%`,e.toString()),r}var Lf=function(e){jf(t,e);function t(t,n,r,i,a){n===void 0&&(n=8),r===void 0&&(r=4),i===void 0&&(i=G.FILTER_RESOLUTION),a===void 0&&(a=5);var o=this,s=Nf(a,t),c=If(a);return o=e.call(this,s,c)||this,o.horizontal=t,o.resolution=i,o._quality=0,o.quality=r,o.blur=n,o}return t.prototype.apply=function(e,t,n,r){if(n?this.horizontal?this.uniforms.strength=1/n.width*(n.width/t.width):this.uniforms.strength=1/n.height*(n.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,n,r);else{var i=e.getFilterTexture(),a=e.renderer,o=t,s=i;this.state.blend=!1,e.applyFilter(this,o,s,pr.CLEAR);for(var c=1;c 0.0) { - coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75); - } else { - coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent); - } - } - coord += center * dimensions.xy; - coord /= filterArea.xy; - vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw); - vec4 color = texture2D(uSampler, clampedCoord); - if (coord != clampedCoord) { - color *= max(0.0, 1.0 - length(coord - clampedCoord)); - } - - gl_FragColor = color; -} -`,Kf=function(e){Uf(t,e);function t(n){var r=e.call(this,Wf,Gf)||this;return r.uniforms.dimensions=new Float32Array(2),Object.assign(r,t.defaults,n),r}return t.prototype.apply=function(e,t,n,r){var i=t.filterFrame,a=i.width,o=i.height;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=o,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`strength`,{get:function(){return this.uniforms.strength},set:function(e){this.uniforms.strength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`center`,{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),t.defaults={center:[.5,.5],radius:100,strength:1},t}(Xo),qf=function(e,t){return qf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},qf(e,t)};function Jf(e,t){qf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Yf=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Xf=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform sampler2D colorMap; -uniform float _mix; -uniform float _size; -uniform float _sliceSize; -uniform float _slicePixelSize; -uniform float _sliceInnerSize; -void main() { - vec4 color = texture2D(uSampler, vTextureCoord.xy); - - vec4 adjusted; - if (color.a > 0.0) { - color.rgb /= color.a; - float innerWidth = _size - 1.0; - float zSlice0 = min(floor(color.b * innerWidth), innerWidth); - float zSlice1 = min(zSlice0 + 1.0, innerWidth); - float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize; - float s0 = xOffset + (zSlice0 * _sliceSize); - float s1 = xOffset + (zSlice1 * _sliceSize); - float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize); - vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset)); - vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset)); - float zOffset = fract(color.b * innerWidth); - adjusted = mix(slice0Color, slice1Color, zOffset); - - color.rgb *= color.a; - } - gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a); - -}`,Zf=function(e){Jf(t,e);function t(t,n,r){n===void 0&&(n=!1),r===void 0&&(r=1);var i=e.call(this,Yf,Xf)||this;return i.mix=1,i._size=0,i._sliceSize=0,i._slicePixelSize=0,i._sliceInnerSize=0,i._nearest=!1,i._scaleMode=null,i._colorMap=null,i._scaleMode=null,i.nearest=n,i.mix=r,i.colorMap=t,i}return t.prototype.apply=function(e,t,n,r){this.uniforms._mix=this.mix,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`colorSize`,{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`colorMap`,{get:function(){return this._colorMap},set:function(e){var t;e&&(e instanceof Na||(e=Na.from(e)),(t=e)?.baseTexture&&(e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=dr.OFF,this._size=e.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=e),this._colorMap=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`nearest`,{get:function(){return this._nearest},set:function(e){this._nearest=e,this._scaleMode=e?lr.NEAREST:lr.LINEAR;var t=this._colorMap;t&&t.baseTexture&&(t.baseTexture._glTextures={},t.baseTexture.scaleMode=this._scaleMode,t.baseTexture.mipmap=dr.OFF,t._updateID++,t.baseTexture.emit(`update`,t.baseTexture))},enumerable:!1,configurable:!0}),t.prototype.updateColorMap=function(){var e=this._colorMap;e&&e.baseTexture&&(e._updateID++,e.baseTexture.emit(`update`,e.baseTexture),this.colorMap=e)},t.prototype.destroy=function(t){t===void 0&&(t=!1),this._colorMap&&this._colorMap.destroy(t),e.prototype.destroy.call(this)},t}(Xo),Qf=function(e,t){return Qf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Qf(e,t)};function $f(e,t){Qf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ep=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,tp=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform vec3 color; -uniform float alpha; - -void main(void) { - vec4 currentColor = texture2D(uSampler, vTextureCoord); - gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a); -} -`,np=function(e){$f(t,e);function t(t,n){t===void 0&&(t=0),n===void 0&&(n=1);var r=e.call(this,ep,tp)||this;return r._color=0,r._alpha=1,r.uniforms.color=new Float32Array(3),r.color=t,r.alpha=n,r}return Object.defineProperty(t.prototype,`color`,{get:function(){return this._color},set:function(e){var t=this.uniforms.color;typeof e==`number`?(si(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._color=li(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`alpha`,{get:function(){return this._alpha},set:function(e){this.uniforms.alpha=e,this._alpha=e},enumerable:!1,configurable:!0}),t}(Xo),rp=function(e,t){return rp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},rp(e,t)};function ip(e,t){rp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ap=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,op=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform vec3 originalColor; -uniform vec3 newColor; -uniform float epsilon; -void main(void) { - vec4 currentColor = texture2D(uSampler, vTextureCoord); - vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001)); - float colorDistance = length(colorDiff); - float doReplace = step(colorDistance, epsilon); - gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a); -} -`,sp=function(e){ip(t,e);function t(t,n,r){t===void 0&&(t=16711680),n===void 0&&(n=0),r===void 0&&(r=.4);var i=e.call(this,ap,op)||this;return i._originalColor=16711680,i._newColor=0,i.uniforms.originalColor=new Float32Array(3),i.uniforms.newColor=new Float32Array(3),i.originalColor=t,i.newColor=n,i.epsilon=r,i}return Object.defineProperty(t.prototype,`originalColor`,{get:function(){return this._originalColor},set:function(e){var t=this.uniforms.originalColor;typeof e==`number`?(si(e,t),this._originalColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._originalColor=li(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`newColor`,{get:function(){return this._newColor},set:function(e){var t=this.uniforms.newColor;typeof e==`number`?(si(e,t),this._newColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._newColor=li(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`epsilon`,{get:function(){return this.uniforms.epsilon},set:function(e){this.uniforms.epsilon=e},enumerable:!1,configurable:!0}),t}(Xo),cp=function(e,t){return cp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},cp(e,t)};function lp(e,t){cp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var up=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,dp=`precision mediump float; - -varying mediump vec2 vTextureCoord; - -uniform sampler2D uSampler; -uniform vec2 texelSize; -uniform float matrix[9]; - -void main(void) -{ - vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left - vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center - vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right - - vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left - vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center - vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right - - vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left - vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center - vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right - - gl_FragColor = - c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] + - c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] + - c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8]; - - gl_FragColor.a = c22.a; -} -`,fp=function(e){lp(t,e);function t(t,n,r){n===void 0&&(n=200),r===void 0&&(r=200);var i=e.call(this,up,dp)||this;return i.uniforms.texelSize=new Float32Array(2),i.uniforms.matrix=new Float32Array(9),t!==void 0&&(i.matrix=t),i.width=n,i.height=r,i}return Object.defineProperty(t.prototype,`matrix`,{get:function(){return this.uniforms.matrix},set:function(e){var t=this;e.forEach(function(e,n){t.uniforms.matrix[n]=e})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`width`,{get:function(){return 1/this.uniforms.texelSize[0]},set:function(e){this.uniforms.texelSize[0]=1/e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return 1/this.uniforms.texelSize[1]},set:function(e){this.uniforms.texelSize[1]=1/e},enumerable:!1,configurable:!0}),t}(Xo),pp=function(e,t){return pp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},pp(e,t)};function mp(e,t){pp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var hp=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,gp=`precision mediump float; - -varying vec2 vTextureCoord; - -uniform sampler2D uSampler; - -void main(void) -{ - float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb); - - gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); - - if (lum < 1.00) - { - if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) - { - gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - } - } - - if (lum < 0.75) - { - if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) - { - gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - } - } - - if (lum < 0.50) - { - if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0) - { - gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - } - } - - if (lum < 0.3) - { - if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0) - { - gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - } - } -} -`,_p=function(e){mp(t,e);function t(){return e.call(this,hp,gp)||this}return t}(Xo),vp=function(e,t){return vp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},vp(e,t)};function yp(e,t){vp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var bp=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,xp=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform vec4 filterArea; -uniform vec2 dimensions; - -const float SQRT_2 = 1.414213; - -const float light = 1.0; - -uniform float curvature; -uniform float lineWidth; -uniform float lineContrast; -uniform bool verticalLine; -uniform float noise; -uniform float noiseSize; - -uniform float vignetting; -uniform float vignettingAlpha; -uniform float vignettingBlur; - -uniform float seed; -uniform float time; - -float rand(vec2 co) { - return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); -} - -void main(void) -{ - vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; - vec2 dir = vec2(vTextureCoord.xy * filterArea.xy / dimensions - vec2(0.5, 0.5)); - - gl_FragColor = texture2D(uSampler, vTextureCoord); - vec3 rgb = gl_FragColor.rgb; - - if (noise > 0.0 && noiseSize > 0.0) - { - pixelCoord.x = floor(pixelCoord.x / noiseSize); - pixelCoord.y = floor(pixelCoord.y / noiseSize); - float _noise = rand(pixelCoord * noiseSize * seed) - 0.5; - rgb += _noise * noise; - } - - if (lineWidth > 0.0) - { - float _c = curvature > 0. ? curvature : 1.; - float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.; - vec2 uv = dir * k; - - float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c; - float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast; - rgb *= j; - float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.); - rgb *= 0.99 + ceil(segment) * 0.015; - } - - if (vignetting > 0.0) - { - float outter = SQRT_2 - vignetting * SQRT_2; - float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0); - rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha); - } - - gl_FragColor.rgb = rgb; -} -`,Sp=function(e){yp(t,e);function t(n){var r=e.call(this,bp,xp)||this;return r.time=0,r.seed=0,r.uniforms.dimensions=new Float32Array(2),Object.assign(r,t.defaults,n),r}return t.prototype.apply=function(e,t,n,r){var i=t.filterFrame,a=i.width,o=i.height;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=o,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`curvature`,{get:function(){return this.uniforms.curvature},set:function(e){this.uniforms.curvature=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lineWidth`,{get:function(){return this.uniforms.lineWidth},set:function(e){this.uniforms.lineWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lineContrast`,{get:function(){return this.uniforms.lineContrast},set:function(e){this.uniforms.lineContrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`verticalLine`,{get:function(){return this.uniforms.verticalLine},set:function(e){this.uniforms.verticalLine=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`noise`,{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`noiseSize`,{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignetting`,{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignettingAlpha`,{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignettingBlur`,{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),t.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},t}(Xo),Cp=function(e,t){return Cp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Cp(e,t)};function wp(e,t){Cp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Tp=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Ep=`precision mediump float; - -varying vec2 vTextureCoord; -varying vec4 vColor; - -uniform vec4 filterArea; -uniform sampler2D uSampler; - -uniform float angle; -uniform float scale; - -float pattern() -{ - float s = sin(angle), c = cos(angle); - vec2 tex = vTextureCoord * filterArea.xy; - vec2 point = vec2( - c * tex.x - s * tex.y, - s * tex.x + c * tex.y - ) * scale; - return (sin(point.x) * sin(point.y)) * 4.0; -} - -void main() -{ - vec4 color = texture2D(uSampler, vTextureCoord); - float average = (color.r + color.g + color.b) / 3.0; - gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a); -} -`,Dp=function(e){wp(t,e);function t(t,n){t===void 0&&(t=1),n===void 0&&(n=5);var r=e.call(this,Tp,Ep)||this;return r.scale=t,r.angle=n,r}return Object.defineProperty(t.prototype,`scale`,{get:function(){return this.uniforms.scale},set:function(e){this.uniforms.scale=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`angle`,{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),t}(Xo),Op=function(e,t){return Op=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Op(e,t)};function kp(e,t){Op(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ap=function(){return Ap=Object.assign||function(e){for(var t=arguments,n,r=1,i=arguments.length;r 1.0 || coord.y > 1.0) { - return; - } - - float cx = coord.x - 0.5; - float cy = (coord.y - 0.5) * aspect; - float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5; - - // displacementMap: repeat - // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny); - - // displacementMap: mirror - ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny); - - vec4 dc = texture2D(displacementMap, vec2(0.5, ny)); - - float displacement = (dc.r - dc.g) * (offset / filterArea.x); - - coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect); - - if (fillMode == CLAMP) { - coord = clamp(coord, filterClamp.xy, filterClamp.zw); - } else { - if( coord.x > filterClamp.z ) { - if (fillMode == TRANSPARENT) { - discard; - } else if (fillMode == LOOP) { - coord.x -= filterClamp.z; - } else if (fillMode == MIRROR) { - coord.x = filterClamp.z * 2.0 - coord.x; - } - } else if( coord.x < filterClamp.x ) { - if (fillMode == TRANSPARENT) { - discard; - } else if (fillMode == LOOP) { - coord.x += filterClamp.z; - } else if (fillMode == MIRROR) { - coord.x *= -filterClamp.z; - } - } - - if( coord.y > filterClamp.w ) { - if (fillMode == TRANSPARENT) { - discard; - } else if (fillMode == LOOP) { - coord.y -= filterClamp.w; - } else if (fillMode == MIRROR) { - coord.y = filterClamp.w * 2.0 - coord.y; - } - } else if( coord.y < filterClamp.y ) { - if (fillMode == TRANSPARENT) { - discard; - } else if (fillMode == LOOP) { - coord.y += filterClamp.w; - } else if (fillMode == MIRROR) { - coord.y *= -filterClamp.w; - } - } - } - - gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r; - gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g; - gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b; - gl_FragColor.a = texture2D(uSampler, coord).a; -} -`,Up=function(e){Bp(t,e);function t(n){var r=e.call(this,Vp,Hp)||this;return r.offset=100,r.fillMode=t.TRANSPARENT,r.average=!1,r.seed=0,r.minSize=8,r.sampleSize=512,r._slices=0,r._offsets=new Float32Array(1),r._sizes=new Float32Array(1),r._direction=-1,r.uniforms.dimensions=new Float32Array(2),r._canvas=document.createElement(`canvas`),r._canvas.width=4,r._canvas.height=r.sampleSize,r.texture=Na.from(r._canvas,{scaleMode:lr.NEAREST}),Object.assign(r,t.defaults,n),r}return t.prototype.apply=function(e,t,n,r){var i=t.filterFrame,a=i.width,o=i.height;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=o,this.uniforms.aspect=o/a,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,t,n,r)},t.prototype._randomizeSizes=function(){var e=this._sizes,t=this._slices-1,n=this.sampleSize,r=Math.min(this.minSize/n,.9/this._slices);if(this.average){for(var i=this._slices,a=1,o=0;o0;n--){var r=Math.random()*n>>0,i=e[n];e[n]=e[r],e[r]=i}},t.prototype._randomizeOffsets=function(){for(var e=0;e0?r:0,c=r<0?-r:0;n.fillStyle=`rgba(`+s+`, `+c+`, 0, 1)`,n.fillRect(0,i>>0,e,o+1>>0),i+=o}t.baseTexture.update(),this.uniforms.displacementMap=t},Object.defineProperty(t.prototype,`sizes`,{get:function(){return this._sizes},set:function(e){for(var t=Math.min(this._slices,e.length),n=0;n>0)+1},Object.defineProperty(t.prototype,`offset`,{get:function(){return this.uniforms.uOffset},set:function(e){this.uniforms.uOffset=e},enumerable:!1,configurable:!0}),t}(Xo),om=function(e,t){return om=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},om(e,t)};function sm(e,t){om(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var cm=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,lm=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform float epsilon; - -const int MAX_COLORS = %maxColors%; - -uniform vec3 originalColors[MAX_COLORS]; -uniform vec3 targetColors[MAX_COLORS]; - -void main(void) -{ - gl_FragColor = texture2D(uSampler, vTextureCoord); - - float alpha = gl_FragColor.a; - if (alpha < 0.0001) - { - return; - } - - vec3 color = gl_FragColor.rgb / alpha; - - for(int i = 0; i < MAX_COLORS; i++) - { - vec3 origColor = originalColors[i]; - if (origColor.r < 0.0) - { - break; - } - vec3 colorDiff = origColor - color; - if (length(colorDiff) < epsilon) - { - vec3 targetColor = targetColors[i]; - gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha); - return; - } - } -} -`,um=function(e){sm(t,e);function t(t,n,r){n===void 0&&(n=.05),r===void 0&&(r=t.length);var i=e.call(this,cm,lm.replace(/%maxColors%/g,r.toFixed(0)))||this;return i._replacements=[],i._maxColors=0,i.epsilon=n,i._maxColors=r,i.uniforms.originalColors=new Float32Array(r*3),i.uniforms.targetColors=new Float32Array(r*3),i.replacements=t,i}return Object.defineProperty(t.prototype,`replacements`,{get:function(){return this._replacements},set:function(e){var t=this.uniforms.originalColors,n=this.uniforms.targetColors,r=e.length;if(r>this._maxColors)throw Error(`Length of replacements (`+r+`) exceeds the maximum colors length (`+this._maxColors+`)`);t[r*3]=-1;for(var i=0;i 0.5) then: 1 - 2 * (1 - dst) * (1 - src) - return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)), - (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)), - (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z))); -} - - -void main() -{ - gl_FragColor = texture2D(uSampler, vTextureCoord); - vec3 color = gl_FragColor.rgb; - - if (sepia > 0.0) - { - float gray = (color.x + color.y + color.z) / 3.0; - vec3 grayscale = vec3(gray); - - color = Overlay(SEPIA_RGB, grayscale); - - color = grayscale + sepia * (color - grayscale); - } - - vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy; - - if (vignetting > 0.0) - { - float outter = SQRT_2 - vignetting * SQRT_2; - vec2 dir = vec2(vec2(0.5, 0.5) - coord); - dir.y *= dimensions.y / dimensions.x; - float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0); - color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha); - } - - if (scratchDensity > seed && scratch != 0.0) - { - float phase = seed * 256.0; - float s = mod(floor(phase), 2.0); - float dist = 1.0 / scratchDensity; - float d = distance(coord, vec2(seed * dist, abs(s - seed * dist))); - if (d < seed * 0.6 + 0.4) - { - highp float period = scratchDensity * 10.0; - - float xx = coord.x * period + phase; - float aa = abs(mod(xx, 0.5) * 4.0); - float bb = mod(floor(xx / 0.5), 2.0); - float yy = (1.0 - bb) * aa + bb * (2.0 - aa); - - float kk = 2.0 * period; - float dw = scratchWidth / dimensions.x * (0.75 + seed); - float dh = dw * kk; - - float tine = (yy - (2.0 - dh)); - - if (tine > 0.0) { - float _sign = sign(scratch); - - tine = s * tine / period + scratch + 0.1; - tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5); - - color.rgb *= tine; - } - } - } - - if (noise > 0.0 && noiseSize > 0.0) - { - vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; - pixelCoord.x = floor(pixelCoord.x / noiseSize); - pixelCoord.y = floor(pixelCoord.y / noiseSize); - // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0); - // float _noise = snoise(d) * 0.5; - float _noise = rand(pixelCoord * noiseSize * seed) - 0.5; - color += _noise * noise; - } - - gl_FragColor.rgb = color; -} -`,hm=function(e){fm(t,e);function t(n,r){r===void 0&&(r=0);var i=e.call(this,pm,mm)||this;return i.seed=0,i.uniforms.dimensions=new Float32Array(2),typeof n==`number`?(i.seed=n,n=void 0):i.seed=r,Object.assign(i,t.defaults,n),i}return t.prototype.apply=function(e,t,n,r){var i,a;this.uniforms.dimensions[0]=(i=t.filterFrame)?.width,this.uniforms.dimensions[1]=(a=t.filterFrame)?.height,this.uniforms.seed=this.seed,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`sepia`,{get:function(){return this.uniforms.sepia},set:function(e){this.uniforms.sepia=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`noise`,{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`noiseSize`,{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scratch`,{get:function(){return this.uniforms.scratch},set:function(e){this.uniforms.scratch=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scratchDensity`,{get:function(){return this.uniforms.scratchDensity},set:function(e){this.uniforms.scratchDensity=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scratchWidth`,{get:function(){return this.uniforms.scratchWidth},set:function(e){this.uniforms.scratchWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignetting`,{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignettingAlpha`,{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignettingBlur`,{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),t.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},t}(Xo),gm=function(e,t){return gm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},gm(e,t)};function _m(e,t){gm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var vm=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,ym=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform vec2 thickness; -uniform vec4 outlineColor; -uniform vec4 filterClamp; - -const float DOUBLE_PI = 3.14159265358979323846264 * 2.; - -void main(void) { - vec4 ownColor = texture2D(uSampler, vTextureCoord); - vec4 curColor; - float maxAlpha = 0.; - vec2 displaced; - for (float angle = 0.; angle <= DOUBLE_PI; angle += \${angleStep}) { - displaced.x = vTextureCoord.x + thickness.x * cos(angle); - displaced.y = vTextureCoord.y + thickness.y * sin(angle); - curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw)); - maxAlpha = max(maxAlpha, curColor.a); - } - float resultAlpha = max(maxAlpha, ownColor.a); - gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha); -} -`,bm=function(e){_m(t,e);function t(n,r,i){n===void 0&&(n=1),r===void 0&&(r=0),i===void 0&&(i=.1);var a=e.call(this,vm,ym.replace(/\$\{angleStep\}/,t.getAngleStep(i)))||this;return a._thickness=1,a.uniforms.thickness=new Float32Array([0,0]),a.uniforms.outlineColor=new Float32Array([0,0,0,1]),Object.assign(a,{thickness:n,color:r,quality:i}),a}return t.getAngleStep=function(e){var n=Math.max(e*t.MAX_SAMPLES,t.MIN_SAMPLES);return(Math.PI*2/n).toFixed(7)},t.prototype.apply=function(e,t,n,r){this.uniforms.thickness[0]=this._thickness/t._frame.width,this.uniforms.thickness[1]=this._thickness/t._frame.height,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`color`,{get:function(){return li(this.uniforms.outlineColor)},set:function(e){si(e,this.uniforms.outlineColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`thickness`,{get:function(){return this._thickness},set:function(e){this._thickness=e,this.padding=e},enumerable:!1,configurable:!0}),t.MIN_SAMPLES=1,t.MAX_SAMPLES=100,t}(Xo),xm=function(e,t){return xm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},xm(e,t)};function Sm(e,t){xm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Cm=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,wm=`precision mediump float; - -varying vec2 vTextureCoord; - -uniform vec2 size; -uniform sampler2D uSampler; - -uniform vec4 filterArea; - -vec2 mapCoord( vec2 coord ) -{ - coord *= filterArea.xy; - coord += filterArea.zw; - - return coord; -} - -vec2 unmapCoord( vec2 coord ) -{ - coord -= filterArea.zw; - coord /= filterArea.xy; - - return coord; -} - -vec2 pixelate(vec2 coord, vec2 size) -{ - return floor( coord / size ) * size; -} - -void main(void) -{ - vec2 coord = mapCoord(vTextureCoord); - - coord = pixelate(coord, size); - - coord = unmapCoord(coord); - - gl_FragColor = texture2D(uSampler, coord); -} -`,Tm=function(e){Sm(t,e);function t(t){t===void 0&&(t=10);var n=e.call(this,Cm,wm)||this;return n.size=t,n}return Object.defineProperty(t.prototype,`size`,{get:function(){return this.uniforms.size},set:function(e){typeof e==`number`&&(e=[e,e]),this.uniforms.size=e},enumerable:!1,configurable:!0}),t}(Xo),Em=function(e,t){return Em=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Em(e,t)};function Dm(e,t){Em(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Om=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,km=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform vec4 filterArea; - -uniform float uRadian; -uniform vec2 uCenter; -uniform float uRadius; -uniform int uKernelSize; - -const int MAX_KERNEL_SIZE = 2048; - -void main(void) -{ - vec4 color = texture2D(uSampler, vTextureCoord); - - if (uKernelSize == 0) - { - gl_FragColor = color; - return; - } - - float aspect = filterArea.y / filterArea.x; - vec2 center = uCenter.xy / filterArea.xy; - float gradient = uRadius / filterArea.x * 0.3; - float radius = uRadius / filterArea.x - gradient * 0.5; - int k = uKernelSize - 1; - - vec2 coord = vTextureCoord; - vec2 dir = vec2(center - coord); - float dist = length(vec2(dir.x, dir.y * aspect)); - - float radianStep = uRadian; - if (radius >= 0.0 && dist > radius) { - float delta = dist - radius; - float gap = gradient; - float scale = 1.0 - abs(delta / gap); - if (scale <= 0.0) { - gl_FragColor = color; - return; - } - radianStep *= scale; - } - radianStep /= float(k); - - float s = sin(radianStep); - float c = cos(radianStep); - mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c)); - - for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) { - if (i == k) { - break; - } - - coord -= center; - coord.y *= aspect; - coord = rotationMatrix * coord; - coord.y /= aspect; - coord += center; - - vec4 sample = texture2D(uSampler, coord); - - // switch to pre-multiplied alpha to correctly blur transparent images - // sample.rgb *= sample.a; - - color += sample; - } - - gl_FragColor = color / float(uKernelSize); -} -`,Am=function(e){Dm(t,e);function t(t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=[0,0]),r===void 0&&(r=5),i===void 0&&(i=-1);var a=e.call(this,Om,km)||this;return a._angle=0,a.angle=t,a.center=n,a.kernelSize=r,a.radius=i,a}return t.prototype.apply=function(e,t,n,r){this.uniforms.uKernelSize=this._angle===0?0:this.kernelSize,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`angle`,{get:function(){return this._angle},set:function(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`center`,{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),t}(Xo),jm=function(e,t){return jm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},jm(e,t)};function Mm(e,t){jm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Nm=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Pm=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform vec4 filterArea; -uniform vec4 filterClamp; -uniform vec2 dimensions; - -uniform bool mirror; -uniform float boundary; -uniform vec2 amplitude; -uniform vec2 waveLength; -uniform vec2 alpha; -uniform float time; - -float rand(vec2 co) { - return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); -} - -void main(void) -{ - vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; - vec2 coord = pixelCoord / dimensions; - - if (coord.y < boundary) { - gl_FragColor = texture2D(uSampler, vTextureCoord); - return; - } - - float k = (coord.y - boundary) / (1. - boundary + 0.0001); - float areaY = boundary * dimensions.y / filterArea.y; - float v = areaY + areaY - vTextureCoord.y; - float y = mirror ? v : vTextureCoord.y; - - float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x; - float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y; - float _alpha = (alpha.y - alpha.x) * k + alpha.x; - - float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude; - x = clamp(x, filterClamp.x, filterClamp.z); - - vec4 color = texture2D(uSampler, vec2(x, y)); - - gl_FragColor = color * _alpha; -} -`,Fm=function(e){Mm(t,e);function t(n){var r=e.call(this,Nm,Pm)||this;return r.time=0,r.uniforms.amplitude=new Float32Array(2),r.uniforms.waveLength=new Float32Array(2),r.uniforms.alpha=new Float32Array(2),r.uniforms.dimensions=new Float32Array(2),Object.assign(r,t.defaults,n),r}return t.prototype.apply=function(e,t,n,r){var i,a;this.uniforms.dimensions[0]=(i=t.filterFrame)?.width,this.uniforms.dimensions[1]=(a=t.filterFrame)?.height,this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`mirror`,{get:function(){return this.uniforms.mirror},set:function(e){this.uniforms.mirror=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`boundary`,{get:function(){return this.uniforms.boundary},set:function(e){this.uniforms.boundary=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`amplitude`,{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`waveLength`,{get:function(){return this.uniforms.waveLength},set:function(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`alpha`,{get:function(){return this.uniforms.alpha},set:function(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]},enumerable:!1,configurable:!0}),t.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},t}(Xo),Im=function(e,t){return Im=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Im(e,t)};function Lm(e,t){Im(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Rm=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,zm=`precision mediump float; - -varying vec2 vTextureCoord; - -uniform sampler2D uSampler; -uniform vec4 filterArea; -uniform vec2 red; -uniform vec2 green; -uniform vec2 blue; - -void main(void) -{ - gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r; - gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g; - gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b; - gl_FragColor.a = texture2D(uSampler, vTextureCoord).a; -} -`,Bm=function(e){Lm(t,e);function t(t,n,r){t===void 0&&(t=[-10,0]),n===void 0&&(n=[0,10]),r===void 0&&(r=[0,0]);var i=e.call(this,Rm,zm)||this;return i.red=t,i.green=n,i.blue=r,i}return Object.defineProperty(t.prototype,`red`,{get:function(){return this.uniforms.red},set:function(e){this.uniforms.red=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`green`,{get:function(){return this.uniforms.green},set:function(e){this.uniforms.green=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`blue`,{get:function(){return this.uniforms.blue},set:function(e){this.uniforms.blue=e},enumerable:!1,configurable:!0}),t}(Xo),Vm=function(e,t){return Vm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Vm(e,t)};function Hm(e,t){Vm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Um=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Wm=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform vec4 filterArea; -uniform vec4 filterClamp; - -uniform vec2 center; - -uniform float amplitude; -uniform float wavelength; -// uniform float power; -uniform float brightness; -uniform float speed; -uniform float radius; - -uniform float time; - -const float PI = 3.14159; - -void main() -{ - float halfWavelength = wavelength * 0.5 / filterArea.x; - float maxRadius = radius / filterArea.x; - float currentRadius = time * speed / filterArea.x; - - float fade = 1.0; - - if (maxRadius > 0.0) { - if (currentRadius > maxRadius) { - gl_FragColor = texture2D(uSampler, vTextureCoord); - return; - } - fade = 1.0 - pow(currentRadius / maxRadius, 2.0); - } - - vec2 dir = vec2(vTextureCoord - center / filterArea.xy); - dir.y *= filterArea.y / filterArea.x; - float dist = length(dir); - - if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) { - gl_FragColor = texture2D(uSampler, vTextureCoord); - return; - } - - vec2 diffUV = normalize(dir); - - float diff = (dist - currentRadius) / halfWavelength; - - float p = 1.0 - pow(abs(diff), 2.0); - - // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade ); - float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade ); - - vec2 offset = diffUV * powDiff / filterArea.xy; - - // Do clamp : - vec2 coord = vTextureCoord + offset; - vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw); - vec4 color = texture2D(uSampler, clampedCoord); - if (coord != clampedCoord) { - color *= max(0.0, 1.0 - length(coord - clampedCoord)); - } - - // No clamp : - // gl_FragColor = texture2D(uSampler, vTextureCoord + offset); - - color.rgb *= 1.0 + (brightness - 1.0) * p * fade; - - gl_FragColor = color; -} -`,Gm=function(e){Hm(t,e);function t(n,r,i){n===void 0&&(n=[0,0]),i===void 0&&(i=0);var a=e.call(this,Um,Wm)||this;return a.center=n,Object.assign(a,t.defaults,r),a.time=i,a}return t.prototype.apply=function(e,t,n,r){this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`center`,{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`amplitude`,{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`wavelength`,{get:function(){return this.uniforms.wavelength},set:function(e){this.uniforms.wavelength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`brightness`,{get:function(){return this.uniforms.brightness},set:function(e){this.uniforms.brightness=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`speed`,{get:function(){return this.uniforms.speed},set:function(e){this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),t.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},t}(Xo),Km=function(e,t){return Km=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Km(e,t)};function qm(e,t){Km(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Jm=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Ym=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform sampler2D uLightmap; -uniform vec4 filterArea; -uniform vec2 dimensions; -uniform vec4 ambientColor; -void main() { - vec4 diffuseColor = texture2D(uSampler, vTextureCoord); - vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions; - vec4 light = texture2D(uLightmap, lightCoord); - vec3 ambient = ambientColor.rgb * ambientColor.a; - vec3 intensity = ambient + light.rgb; - vec3 finalColor = diffuseColor.rgb * intensity; - gl_FragColor = vec4(finalColor, diffuseColor.a); -} -`,Xm=function(e){qm(t,e);function t(t,n,r){n===void 0&&(n=0),r===void 0&&(r=1);var i=e.call(this,Jm,Ym)||this;return i._color=0,i.uniforms.dimensions=new Float32Array(2),i.uniforms.ambientColor=new Float32Array([0,0,0,r]),i.texture=t,i.color=n,i}return t.prototype.apply=function(e,t,n,r){var i,a;this.uniforms.dimensions[0]=(i=t.filterFrame)?.width,this.uniforms.dimensions[1]=(a=t.filterFrame)?.height,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`texture`,{get:function(){return this.uniforms.uLightmap},set:function(e){this.uniforms.uLightmap=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`color`,{get:function(){return this._color},set:function(e){var t=this.uniforms.ambientColor;typeof e==`number`?(si(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],this._color=li(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`alpha`,{get:function(){return this.uniforms.ambientColor[3]},set:function(e){this.uniforms.ambientColor[3]=e},enumerable:!1,configurable:!0}),t}(Xo),Zm=function(e,t){return Zm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Zm(e,t)};function Qm(e,t){Zm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var $m=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,eh=`varying vec2 vTextureCoord; - -uniform sampler2D uSampler; -uniform float blur; -uniform float gradientBlur; -uniform vec2 start; -uniform vec2 end; -uniform vec2 delta; -uniform vec2 texSize; - -float random(vec3 scale, float seed) -{ - return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed); -} - -void main(void) -{ - vec4 color = vec4(0.0); - float total = 0.0; - - float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0); - vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x)); - float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur; - - for (float t = -30.0; t <= 30.0; t++) - { - float percent = (t + offset - 0.5) / 30.0; - float weight = 1.0 - abs(percent); - vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius); - sample.rgb *= sample.a; - color += sample * weight; - total += weight; - } - - color /= total; - color.rgb /= color.a + 0.00001; - - gl_FragColor = color; -} -`,th=function(e){Qm(t,e);function t(t,n,r,i){t===void 0&&(t=100),n===void 0&&(n=600);var a=e.call(this,$m,eh)||this;return a.uniforms.blur=t,a.uniforms.gradientBlur=n,a.uniforms.start=r||new Hi(0,window.innerHeight/2),a.uniforms.end=i||new Hi(600,window.innerHeight/2),a.uniforms.delta=new Hi(30,30),a.uniforms.texSize=new Hi(window.innerWidth,window.innerHeight),a.updateDelta(),a}return t.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},Object.defineProperty(t.prototype,`blur`,{get:function(){return this.uniforms.blur},set:function(e){this.uniforms.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`gradientBlur`,{get:function(){return this.uniforms.gradientBlur},set:function(e){this.uniforms.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`start`,{get:function(){return this.uniforms.start},set:function(e){this.uniforms.start=e,this.updateDelta()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`end`,{get:function(){return this.uniforms.end},set:function(e){this.uniforms.end=e,this.updateDelta()},enumerable:!1,configurable:!0}),t}(Xo),nh=function(e){Qm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=e/n,this.uniforms.delta.y=t/n},t}(th),rh=function(e){Qm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=-t/n,this.uniforms.delta.y=e/n},t}(th),ih=function(e){Qm(t,e);function t(t,n,r,i){t===void 0&&(t=100),n===void 0&&(n=600);var a=e.call(this)||this;return a.tiltShiftXFilter=new nh(t,n,r,i),a.tiltShiftYFilter=new rh(t,n,r,i),a}return t.prototype.apply=function(e,t,n,r){var i=e.getFilterTexture();this.tiltShiftXFilter.apply(e,t,i,1),this.tiltShiftYFilter.apply(e,i,n,r),e.returnFilterTexture(i)},Object.defineProperty(t.prototype,`blur`,{get:function(){return this.tiltShiftXFilter.blur},set:function(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`gradientBlur`,{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`start`,{get:function(){return this.tiltShiftXFilter.start},set:function(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`end`,{get:function(){return this.tiltShiftXFilter.end},set:function(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e},enumerable:!1,configurable:!0}),t}(Xo),ah=function(e,t){return ah=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ah(e,t)};function oh(e,t){ah(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var sh=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,ch=`varying vec2 vTextureCoord; - -uniform sampler2D uSampler; -uniform float radius; -uniform float angle; -uniform vec2 offset; -uniform vec4 filterArea; - -vec2 mapCoord( vec2 coord ) -{ - coord *= filterArea.xy; - coord += filterArea.zw; - - return coord; -} - -vec2 unmapCoord( vec2 coord ) -{ - coord -= filterArea.zw; - coord /= filterArea.xy; - - return coord; -} - -vec2 twist(vec2 coord) -{ - coord -= offset; - - float dist = length(coord); - - if (dist < radius) - { - float ratioDist = (radius - dist) / radius; - float angleMod = ratioDist * ratioDist * angle; - float s = sin(angleMod); - float c = cos(angleMod); - coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c); - } - - coord += offset; - - return coord; -} - -void main(void) -{ - - vec2 coord = mapCoord(vTextureCoord); - - coord = twist(coord); - - coord = unmapCoord(coord); - - gl_FragColor = texture2D(uSampler, coord ); - -} -`,lh=function(e){oh(t,e);function t(n){var r=e.call(this,sh,ch)||this;return Object.assign(r,t.defaults,n),r}return Object.defineProperty(t.prototype,`offset`,{get:function(){return this.uniforms.offset},set:function(e){this.uniforms.offset=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`angle`,{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),t.defaults={radius:200,angle:4,padding:20,offset:new Hi},t}(Xo),uh=function(e,t){return uh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},uh(e,t)};function dh(e,t){uh(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function fh(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);i= 0.0 && dist > radius) { // radius < 0 means it's infinity - delta = dist - radius; - gap = gradient; - } - - if (delta > 0.0) { - float normalCount = gap / filterArea.x; - delta = (normalCount - delta) / normalCount; - countLimit *= delta; - strength *= delta; - if (countLimit < 1.0) - { - gl_FragColor = texture2D(uSampler, vTextureCoord); - return; - } - } - - // randomize the lookup values to hide the fixed number of samples - float offset = rand(vTextureCoord, 0.0); - - float total = 0.0; - vec4 color = vec4(0.0); - - dir *= strength; - - for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) { - float percent = (t + offset) / MAX_KERNEL_SIZE; - float weight = 4.0 * (percent - percent * percent); - vec2 p = vTextureCoord + dir * percent; - vec4 sample = texture2D(uSampler, p); - - // switch to pre-multiplied alpha to correctly blur transparent images - // sample.rgb *= sample.a; - - color += sample * weight; - total += weight; - - if (t > countLimit){ - break; - } - } - - color /= total; - // switch back from pre-multiplied alpha - // color.rgb /= color.a + 0.00001; - - gl_FragColor = color; -} -`,hh=function(e){dh(t,e);function t(n){var r=this,i=Object.assign(t.defaults,n),a=i.maxKernelSize,o=fh(i,[`maxKernelSize`]);return r=e.call(this,ph,mh.replace("${maxKernelSize}",a.toFixed(1)))||this,Object.assign(r,o),r}return Object.defineProperty(t.prototype,`center`,{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`strength`,{get:function(){return this.uniforms.uStrength},set:function(e){this.uniforms.uStrength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`innerRadius`,{get:function(){return this.uniforms.uInnerRadius},set:function(e){this.uniforms.uInnerRadius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),t.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},t}(Xo);function gh(){let e=-1,t,n=-1;function r(r,i){(i>=e||i({x:0,y:0})},disableFocusAt:{type:Boolean,default:!1},xOffset:{},yOffset:{},scale:{default:1}},emits:[`modelLoaded`],setup(e,{expose:t,emit:n}){let r=e,i=n;function a(){let e=Number.parseFloat(String(r.xOffset))||0,t=Number.parseFloat(String(r.yOffset))||0;return String(r.xOffset).endsWith(`%`)&&(e=Number.parseFloat(String(r.xOffset).replace(`%`,``))/100*r.width),String(r.yOffset).endsWith(`%`)&&(t=Number.parseFloat(String(r.yOffset).replace(`%`,``))/100*r.height),{xOffset:e,yOffset:t}}let o=In(()=>a()),s=vn(()=>r.app),c=vn(()=>r.paused),l=vn(()=>r.focusAt),u=z(),d=z(0),f=z(0),p=In(()=>Math.max(0,Math.min(100,r.mouthOpenSize))),m=w(),h=C(S),g=In(()=>h.between(`sm`,`md`).value||h.smaller(`sm`).value),_=gh(),v=H(new Np({alpha:.2,blur:0,distance:20,rotation:45}));function b(){return u.value.internalModel.coreModel}function T(){if(!u.value)return;let e=2.2;g.value&&(e=2.2);let t=r.height*.95/f.value*e,n=r.width*.95/d.value*e,i=Math.min(t,n);u.value.scale.set(i*r.scale,i*r.scale),u.value.x=r.width/2+o.value.xOffset,u.value.y=r.height+o.value.yOffset}let{modelFile:E,loadingModel:D,currentMotion:O,availableMotions:ee,loadSource:te,modelUrl:ne}=x(Jn()),{themeColorsHue:re,themeColorsHueDynamic:j}=x(qn()),ie=z({group:`Idle`,index:0});async function ae(){if(!s.value)return;u.value&&(s.value.stage.removeChild(u.value),u.value.destroy(),u.value=void 0);let e=new Cd;te.value===`file`?await hd.setupLive2DModel(e,[E.value],{autoInteract:!1}):te.value===`url`&&await hd.setupLive2DModel(e,ne.value,{autoInteract:!1}),u.value=e,s.value.stage.addChild(u.value),d.value=u.value.width,f.value=u.value.height,u.value.anchor.set(.5,.5),T(),u.value.on(`hit`,e=>{u.value&&e.includes(`body`)&&u.value.motion(`tap_body`)});let t=u.value.internalModel,n=t.coreModel,r=t.motionManager;n.setParameterValueById(`ParamMouthOpenY`,p.value),ee.value=Object.entries(r.definitions).flatMap(([e,t])=>t?t.map((t,n)=>({motionName:e,motionIndex:n,fileName:t.File})):[]).filter(Boolean),r.groups.idle&&r.motionGroups[r.groups.idle]?.forEach(e=>{e._motionData.curves.forEach(e=>{(e.id===`ParamEyeBallX`||e.id===`ParamEyeBallY`)&&(e.id=`_${e.id}`)})});let a=r.update;r.update=function(e,n){return a?.call(this,e,n),r.state.currentGroup===r.groups.idle&&_.update(t,n),!0},r.on(`motionStart`,(e,t)=>{ie.value={group:e,index:t}}),E.value&&await _h.default.setItem(`live2dModel`,E.value),i(`modelLoaded`),D.value=!1}async function oe(){if(!s.value)return;Cd.registerTicker(Ii),Mi.add(Li),Mi.add(Yd);let e=await _h.default.getItem(`live2dModel`);if(e){E.value=e,te.value=`file`,D.value=!0;return}if(ne.value){te.value=`url`,D.value=!0;return}D.value=!1}async function se(e,t){await u.value?.motion(e,t,Ku.FORCE)}let M=A(T,100),ce=z(),N=z(0);function le(){if(u.value){let e=getComputedStyle(ce.value).backgroundColor;v.value.color=Number(y(e).replace(`#`,`0x`)),u.value.filters=[v.value]}}I([()=>r.width,()=>r.height],()=>M()),I(m,le,{immediate:!0}),I([u,re],le),I(o,T),I(()=>r.scale,T);function ue(){le(),N.value=requestAnimationFrame(ue)}I(j,()=>{j.value?N.value=requestAnimationFrame(ue):(cancelAnimationFrame(N.value),N.value=0)},{immediate:!0}),I(p,e=>b().setParameterValueById(`ParamMouthOpenY`,e)),I(s,oe),I(O,e=>se(e.group,e.index)),I(c,e=>e?s.value?.stop():s.value?.start()),I(l,e=>{u.value&&(r.disableFocusAt||u.value.focus(e.x,e.y))}),k(D,e=>{e&&ae()},{debounce:1e3}),pn(le),On(()=>{cancelAnimationFrame(N.value),u.value&&s.value?.stage.removeChild(u.value)});function de(){return ee.value}return t({setMotion:se,listMotionGroups:de}),(e,t)=>(L(),B(Fn,null,[V(`div`,{ref_key:`dropShadowColorComputer`,ref:ce,hidden:``,bg:`primary-400 dark:primary-500`},null,512),Mn(e.$slots,`default`)],64))}}),yh=vh,bh=Tn(Kn());Dd.zipReader=(e,t)=>bh.default.loadAsync(e);const xh=Dd.createSettings;Dd.createSettings=async e=>{let t=Object.keys(e.files);return t.find(e=>Sh(e))?xh(e):Th(t)};function Sh(e){return e.endsWith(`model3.json`)}function Ch(e){return e.endsWith(`.moc3`)}function wh(e){return e.split(/[\\/]/).pop()}function Th(e){let t=e.filter(e=>Ch(e));if(t.length!==1){let e=t.length?`(${t.map(e=>`"${e}"`).join(`,`)})`:``;throw Error(`Expected exactly one moc file, got ${t.length} ${e}`)}let n=t[0],r=wh(n).replace(/\.moc3?/,``),i=e.filter(e=>e.endsWith(`.png`));if(!i.length)throw Error(`Textures not found`);let a=e.filter(e=>e.endsWith(`.mtn`)||e.endsWith(`.motion3.json`)),o=e.find(e=>e.includes(`physics`)),s=e.find(e=>e.includes(`pose`)),c=new kd({url:`${r}.model3.json`,Version:3,FileReferences:{Moc:n,Textures:i,Physics:o,Pose:s,Motions:a.length?{"":a.map(e=>({File:e}))}:void 0}});return c.name=r,c._objectURL=`example://${c.url}`,c}Dd.readText=(e,t)=>{let n=e.file(t);if(!n)throw Error(`Cannot find file: ${t}`);return n.async(`text`)},Dd.getFilePaths=e=>{let t=[];return e.forEach(e=>t.push(e)),Promise.resolve(t)},Dd.getFiles=(e,t)=>Promise.all(t.map(async t=>{let n=t.slice(t.lastIndexOf(`/`)+1),r=await e.file(t).async(`blob`);return new File([r],n)}));const Eh={absolute:``,bottom:`3`,right:`3`},Dh={flex:`~ row`,"cursor-pointer":``},Oh=[`checked`,`aria-checked`],kh={key:0,"min-w":`50vw`,z:`(L(),jn(T,{relative:``},{default:En(({width:a,height:o})=>[dn(zd,{width:a,height:o,resolution:2,"max-h":`100dvh`},{default:En(({app:t})=>[dn(yh,{app:t,"mouth-open-size":e.mouthOpenSize,width:a,height:o,paused:e.paused,"focus-at":e.focusAt,"x-offset":e.xOffset,"y-offset":e.yOffset,scale:e.scale},null,8,[`app`,`mouth-open-size`,`width`,`height`,`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`])]),_:2},1032,[`width`,`height`]),V(`div`,Eh,[V(`div`,Dh,[V(`label`,{class:bn([n.value?`bg-neutral-300 dark:bg-neutral-200`:`bg-neutral-100 dark:bg-neutral-700`]),transition:`all ease-in-out duration-500`,text:`lg neutral-500 dark:neutral-400`,"m-1":``,"h-fit":``,"w-fit":``,"cursor-pointer":``,"appearance-none":``,"gap-1":``,"rounded-lg":``,"rounded-md":``,"border-none":``,"p-2":``,"outline-none":``},[Nn(V(`input`,{"onUpdate:modelValue":i[0]||=e=>n.value=e,checked:n.value,"aria-checked":n.value,name:`showLive2DViewerInspector`,type:`checkbox`,"appearance-none":``,"outline-none":``,hidden:``},null,8,Oh),[[Lt,n.value]]),i[8]||=V(`div`,{"select-none":``},[V(`div`,{"i-solar:bug-bold-duotone":``})],-1)],2)]),dn(U(D),null,{default:En(()=>[n.value?(L(),B(`div`,kh,[V(`div`,Ah,[V(`div`,jh,[V(`span`,null,yn(U(t)(`stage.viewers.debug-menu.emotions`)),1)]),V(`div`,Mh,[V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[1]||=e=>r.value={group:`Surprise`,index:0}},yn(U(t)(`stage.viewers.debug-menu.emotions-btn.surprised`)),1),V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[2]||=e=>r.value={group:`Sad`,index:0}},yn(U(t)(`stage.viewers.debug-menu.emotions-btn.sad`)),1),V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[3]||=e=>r.value={group:`Angry`,index:0}},yn(U(t)(`stage.viewers.debug-menu.emotions-btn.angry`)),1),V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[4]||=e=>r.value={group:`Happy`,index:0}},yn(U(t)(`stage.viewers.debug-menu.emotions-btn.happy`)),1),V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[5]||=e=>r.value={group:`Awkward`,index:0}},yn(U(t)(`stage.viewers.debug-menu.emotions-btn.awkward`)),1),V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[6]||=e=>r.value={group:`Question`,index:0}},yn(U(t)(`stage.viewers.debug-menu.emotions-btn.question`)),1),V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[7]||=e=>r.value={group:`Think`,index:0}},yn(U(t)(`stage.viewers.debug-menu.emotions-btn.think`)),1)])])])):hn(``,!0)]),_:1})])]),_:1}))}}),Ph=Nh;function Fh(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 Ih(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 Lh(e){return this instanceof Lh?(this.v=e,this):new Lh(e)}function Rh(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 Lh?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 zh(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:Lh(e[r](t)),done:!1}:i?i(t):t}:i}}function Bh(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Ih==`function`?Ih(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 Vh=new TextDecoder(`utf-8`),Hh=e=>Vh.decode(e),Uh=new TextEncoder,Wh=e=>Uh.encode(e),Gh=e=>typeof e==`number`,Kh=e=>typeof e==`boolean`,qh=e=>typeof e==`function`,Jh=e=>e!=null&&Object(e)===e,Yh=e=>Jh(e)&&qh(e.then),Xh=e=>Jh(e)&&qh(e[Symbol.iterator]),Zh=e=>Jh(e)&&qh(e[Symbol.asyncIterator]),Qh=e=>Jh(e)&&Jh(e.schema),$h=e=>Jh(e)&&`done`in e&&`value`in e,eg=e=>Jh(e)&&qh(e.stat)&&Gh(e.fd),tg=e=>Jh(e)&&ig(e.body),ng=e=>`_getDOMStream`in e&&`_getNodeStream`in e,rg=e=>Jh(e)&&qh(e.abort)&&qh(e.getWriter)&&!ng(e),ig=e=>Jh(e)&&qh(e.cancel)&&qh(e.getReader)&&!ng(e),ag=e=>Jh(e)&&qh(e.end)&&qh(e.write)&&Kh(e.writable)&&!ng(e),og=e=>Jh(e)&&qh(e.read)&&qh(e.pipe)&&Kh(e.readable)&&!ng(e),sg=e=>Jh(e)&&qh(e.clear)&&qh(e.bytes)&&qh(e.position)&&qh(e.setPosition)&&qh(e.capacity)&&qh(e.getBufferIdentifier)&&qh(e.createLong),cg=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function lg(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;++cfg(Int32Array,e),mg=e=>fg(BigInt64Array,e),hg=e=>fg(Uint8Array,e),gg=e=>(e.next(),e);function*_g(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof cg?n(t):Xh(t)?t:n(t);return yield*gg(function*(t){let n=null;do n=t.next(yield fg(e,n));while(!n.done)}(r[Symbol.iterator]())),new e}const vg=e=>_g(Uint8Array,e);function yg(e,t){return Rh(this,arguments,function*(){if(Yh(t))return yield Lh(yield Lh(yield*zh(Bh(yg(e,yield Lh(t))))));let n=function(e){return Rh(this,arguments,function*(){yield yield Lh(yield Lh(e))})},r=function(e){return Rh(this,arguments,function*(){yield Lh(yield*zh(Bh(gg(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 cg?n(t):Xh(t)?r(t):Zh(t)?t:n(t);return yield Lh(yield*zh(Bh(gg(function(t){return Rh(this,arguments,function*(){let n=null;do n=yield Lh(t.next(yield yield Lh(fg(e,n))));while(!n.done)})}(i[Symbol.asyncIterator]()))))),yield Lh(new e)})}const bg=e=>yg(Uint8Array,e);function xg(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*Tg(e){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?dg(r,o)[0]:([i,r,s]=dg(r,o),i)}({cmd:a,size:o}=(yield(()=>null)())||{cmd:`read`,size:0});let l=vg(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=bg(e)[Symbol.asyncIterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?yield Lh(l.next()):yield Lh(l.next(o-s)),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield Lh(c()));while(onull)()))||{cmd:`read`,size:0});let l=new Og(e);try{do if({done:t,value:i}=Number.isNaN(o-s)?yield Lh(l.read()):yield Lh(l.read(o-s)),!t&&i.byteLength>0&&(r.push(hg(i)),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield Lh(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 Fh(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 Fh(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=hg(t)),t})}};const kg=(e,t)=>{let n=e=>r([t,e]),r;return[t,n,new Promise(i=>(r=i)&&e.once(t,n))]};function Ag(e){return Rh(this,arguments,function*(){let t=[],n=`error`,r=!1,i=null,a,o,s=0,c=[],l;function u(){return a===`peek`?dg(c,o)[0]:([l,c,s]=dg(c,o),l)}if({cmd:a,size:o}=(yield yield Lh((()=>null)()))||{cmd:`read`,size:0},e.isTTY)return yield yield Lh(new Uint8Array),yield Lh(null);try{t[0]=kg(e,`end`),t[1]=kg(e,`error`);do{if(t[2]=kg(e,`readable`),[n,i]=yield Lh(Promise.race(t.map(e=>e[2]))),n===`error`)break;if((r=n===`end`)||(Number.isFinite(o-s)?(l=hg(e.read(o-s)),l.byteLength0&&(c.push(l),s+=l.byteLength)),r||o<=s)do({cmd:a,size:o}=yield yield Lh(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 jg;(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`})(jg||={});var Mg;(function(e){e[e.Sparse=0]=`Sparse`,e[e.Dense=1]=`Dense`})(Mg||={});var Ng;(function(e){e[e.HALF=0]=`HALF`,e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`})(Ng||={});var Pg;(function(e){e[e.DAY=0]=`DAY`,e[e.MILLISECOND=1]=`MILLISECOND`})(Pg||={});var Fg;(function(e){e[e.SECOND=0]=`SECOND`,e[e.MILLISECOND=1]=`MILLISECOND`,e[e.MICROSECOND=2]=`MICROSECOND`,e[e.NANOSECOND=3]=`NANOSECOND`})(Fg||={});var Ig;(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`})(Ig||={});const Lg=2,Rg=4,zg=4,Bg=4,Vg=new Int32Array(2),Hg=new Float32Array(Vg.buffer),Ug=new Float64Array(Vg.buffer),Wg=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var Gg;(function(e){e[e.UTF8_BYTES=1]=`UTF8_BYTES`,e[e.UTF16_STRING=2]=`UTF16_STRING`})(Gg||={});var Kg=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){Hg[0]=t,this.writeInt32(e,Vg[0])}writeFloat64(e,t){Ug[0]=t,this.writeInt32(e,Vg[Wg?0:1]),this.writeInt32(e+4,Vg[Wg?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)*Lg;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,Rg+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)}},w_=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()+Bg),(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)}},T_;(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`})(T_||={});var E_=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()+Bg),(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):T_.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 i_).__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 a_).__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,T_.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}},D_=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()+Bg),(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):t_.Little}fields(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new E_).__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 a_).__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,t_.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)}},O_;(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`})(O_||={});var K;(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`})(K||={});var k_;(function(e){e[e.OFFSET=0]=`OFFSET`,e[e.DATA=1]=`DATA`,e[e.VALIDITY=2]=`VALIDITY`,e[e.TYPE=3]=`TYPE`})(k_||={});const A_=void 0;function j_(e){if(e===null)return`null`;if(e===A_)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=>j_(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function M_(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 N_(e,t){return M_(e/t)+M_(e%t)/M_(t)}const P_=Symbol.for(`isArrowBigNum`);function F_(e,...t){return t.length===0?Object.setPrototypeOf(fg(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}F_.prototype[P_]=!0,F_.prototype.toJSON=function(){return`"${H_(this)}"`},F_.prototype.valueOf=function(e){return V_(this,e)},F_.prototype.toString=function(){return H_(this)},F_.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return V_(this);case`string`:return H_(this);case`default`:return U_(this)}return H_(this)};function I_(...e){return F_.apply(this,e)}function L_(...e){return F_.apply(this,e)}function R_(...e){return F_.apply(this,e)}Object.setPrototypeOf(I_.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(L_.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(R_.prototype,Object.create(Uint32Array.prototype)),Object.assign(I_.prototype,F_.prototype,{constructor:I_,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(L_.prototype,F_.prototype,{constructor:L_,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(R_.prototype,F_.prototype,{constructor:R_,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const z_=BigInt(4294967296)*BigInt(4294967296),B_=z_-BigInt(1);function V_(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 W_(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`))(mv.prototype);var hv=class extends mv{constructor(){super(K.Null)}toString(){return`Null`}};q_=Symbol.toStringTag,hv[q_]=(e=>e[Symbol.toStringTag]=`Null`)(hv.prototype);var gv=class extends mv{constructor(e,t){super(K.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}`}};J_=Symbol.toStringTag,gv[J_]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(gv.prototype);var _v=class extends gv{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},vv=class extends gv{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},yv=class extends gv{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},bv=class extends gv{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},xv=class extends gv{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Sv=class extends gv{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},Cv=class extends gv{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},wv=class extends gv{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(_v.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(vv.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(yv.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(bv.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(xv.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(Sv.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Cv.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(wv.prototype,`ArrayType`,{value:BigUint64Array});var Tv=class extends mv{constructor(e){super(K.Float),this.precision=e}get ArrayType(){switch(this.precision){case Ng.HALF:return Uint16Array;case Ng.SINGLE:return Float32Array;case Ng.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};Y_=Symbol.toStringTag,Tv[Y_]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(Tv.prototype);var Ev=class extends Tv{constructor(){super(Ng.HALF)}},Dv=class extends Tv{constructor(){super(Ng.SINGLE)}},Ov=class extends Tv{constructor(){super(Ng.DOUBLE)}};Object.defineProperty(Ev.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Dv.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(Ov.prototype,`ArrayType`,{value:Float64Array});var kv=class extends mv{constructor(){super(K.Binary)}toString(){return`Binary`}};X_=Symbol.toStringTag,kv[X_]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(kv.prototype);var Av=class extends mv{constructor(){super(K.LargeBinary)}toString(){return`LargeBinary`}};Z_=Symbol.toStringTag,Av[Z_]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(Av.prototype);var jv=class extends mv{constructor(){super(K.Utf8)}toString(){return`Utf8`}};Q_=Symbol.toStringTag,jv[Q_]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(jv.prototype);var Mv=class extends mv{constructor(){super(K.LargeUtf8)}toString(){return`LargeUtf8`}};$_=Symbol.toStringTag,Mv[$_]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(Mv.prototype);var Nv=class extends mv{constructor(){super(K.Bool)}toString(){return`Bool`}};ev=Symbol.toStringTag,Nv[ev]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(Nv.prototype);var Pv=class extends mv{constructor(e,t,n=128){super(K.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};tv=Symbol.toStringTag,Pv[tv]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(Pv.prototype);var Fv=class extends mv{constructor(e){super(K.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${Pg[this.unit]}>`}get ArrayType(){return this.unit===Pg.DAY?Int32Array:BigInt64Array}};nv=Symbol.toStringTag,Fv[nv]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(Fv.prototype);var Iv=class extends mv{constructor(e,t){super(K.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${Fg[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};rv=Symbol.toStringTag,Iv[rv]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(Iv.prototype);var Lv=class extends mv{constructor(e,t){super(K.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${Fg[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};iv=Symbol.toStringTag,Lv[iv]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(Lv.prototype);var Rv=class extends mv{constructor(e){super(K.Interval),this.unit=e}toString(){return`Interval<${Ig[this.unit]}>`}};av=Symbol.toStringTag,Rv[av]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(Rv.prototype);var zv=class extends mv{constructor(e){super(K.Duration),this.unit=e}toString(){return`Duration<${Fg[this.unit]}>`}};ov=Symbol.toStringTag,zv[ov]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(zv.prototype);var Bv=class extends mv{constructor(e){super(K.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}};sv=Symbol.toStringTag,Bv[sv]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(Bv.prototype);var Vv=class extends mv{constructor(e){super(K.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};cv=Symbol.toStringTag,Vv[cv]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(Vv.prototype);var Hv=class extends mv{constructor(e,t,n){super(K.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(` | `)}>`}};lv=Symbol.toStringTag,Hv[lv]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(Hv.prototype);var Uv=class extends mv{constructor(e){super(K.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};uv=Symbol.toStringTag,Uv[uv]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(Uv.prototype);var Wv=class extends mv{constructor(e,t){super(K.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}>`}};dv=Symbol.toStringTag,Wv[dv]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(Wv.prototype);var Gv=class extends mv{constructor(e,t=!1){var n,r,i;if(super(K.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(`, `)}}>`}};fv=Symbol.toStringTag,Gv[fv]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(Gv.prototype);const Kv=(e=>()=>++e)(-1);var qv=class extends mv{constructor(e,t,n,r){super(K.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?Kv():M_(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}>`}};pv=Symbol.toStringTag,qv[pv]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(qv.prototype);function Jv(e){let t=e;switch(e.typeId){case K.Decimal:return e.bitWidth/32;case K.Interval:return 1+t.unit;case K.FixedSizeList:return t.listSize;case K.FixedSizeBinary:return t.byteWidth;default:return 1}}var Yv=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 Xv(this,e,t)}getVisitFnByTypeId(e,t=!0){return Zv(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 Xv(e,t,n=!0){return typeof t==`number`?Zv(e,t,n):typeof t==`string`&&t in K?Zv(e,K[t],n):t&&t instanceof mv?Zv(e,Qv(t),n):t?.type&&t.type instanceof mv?Zv(e,Qv(t.type),n):Zv(e,K.NONE,n)}function Zv(e,t,n=!0){let r=null;switch(t){case K.Null:r=e.visitNull;break;case K.Bool:r=e.visitBool;break;case K.Int:r=e.visitInt;break;case K.Int8:r=e.visitInt8||e.visitInt;break;case K.Int16:r=e.visitInt16||e.visitInt;break;case K.Int32:r=e.visitInt32||e.visitInt;break;case K.Int64:r=e.visitInt64||e.visitInt;break;case K.Uint8:r=e.visitUint8||e.visitInt;break;case K.Uint16:r=e.visitUint16||e.visitInt;break;case K.Uint32:r=e.visitUint32||e.visitInt;break;case K.Uint64:r=e.visitUint64||e.visitInt;break;case K.Float:r=e.visitFloat;break;case K.Float16:r=e.visitFloat16||e.visitFloat;break;case K.Float32:r=e.visitFloat32||e.visitFloat;break;case K.Float64:r=e.visitFloat64||e.visitFloat;break;case K.Utf8:r=e.visitUtf8;break;case K.LargeUtf8:r=e.visitLargeUtf8;break;case K.Binary:r=e.visitBinary;break;case K.LargeBinary:r=e.visitLargeBinary;break;case K.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case K.Date:r=e.visitDate;break;case K.DateDay:r=e.visitDateDay||e.visitDate;break;case K.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case K.Timestamp:r=e.visitTimestamp;break;case K.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case K.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case K.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case K.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case K.Time:r=e.visitTime;break;case K.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case K.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case K.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case K.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case K.Decimal:r=e.visitDecimal;break;case K.List:r=e.visitList;break;case K.Struct:r=e.visitStruct;break;case K.Union:r=e.visitUnion;break;case K.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case K.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case K.Dictionary:r=e.visitDictionary;break;case K.Interval:r=e.visitInterval;break;case K.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case K.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case K.Duration:r=e.visitDuration;break;case K.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case K.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case K.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case K.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case K.FixedSizeList:r=e.visitFixedSizeList;break;case K.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${K[t]}'`)}function Qv(e){switch(e.typeId){case K.Null:return K.Null;case K.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?K.Int8:K.Uint8;case 16:return n?K.Int16:K.Uint16;case 32:return n?K.Int32:K.Uint32;case 64:return n?K.Int64:K.Uint64}return K.Int}case K.Float:switch(e.precision){case Ng.HALF:return K.Float16;case Ng.SINGLE:return K.Float32;case Ng.DOUBLE:return K.Float64}return K.Float;case K.Binary:return K.Binary;case K.LargeBinary:return K.LargeBinary;case K.Utf8:return K.Utf8;case K.LargeUtf8:return K.LargeUtf8;case K.Bool:return K.Bool;case K.Decimal:return K.Decimal;case K.Time:switch(e.unit){case Fg.SECOND:return K.TimeSecond;case Fg.MILLISECOND:return K.TimeMillisecond;case Fg.MICROSECOND:return K.TimeMicrosecond;case Fg.NANOSECOND:return K.TimeNanosecond}return K.Time;case K.Timestamp:switch(e.unit){case Fg.SECOND:return K.TimestampSecond;case Fg.MILLISECOND:return K.TimestampMillisecond;case Fg.MICROSECOND:return K.TimestampMicrosecond;case Fg.NANOSECOND:return K.TimestampNanosecond}return K.Timestamp;case K.Date:switch(e.unit){case Pg.DAY:return K.DateDay;case Pg.MILLISECOND:return K.DateMillisecond}return K.Date;case K.Interval:switch(e.unit){case Ig.DAY_TIME:return K.IntervalDayTime;case Ig.YEAR_MONTH:return K.IntervalYearMonth}return K.Interval;case K.Duration:switch(e.unit){case Fg.SECOND:return K.DurationSecond;case Fg.MILLISECOND:return K.DurationMillisecond;case Fg.MICROSECOND:return K.DurationMicrosecond;case Fg.NANOSECOND:return K.DurationNanosecond}return K.Duration;case K.Map:return K.Map;case K.List:return K.List;case K.Struct:return K.Struct;case K.Union:switch(e.mode){case Mg.Dense:return K.DenseUnion;case Mg.Sparse:return K.SparseUnion}return K.Union;case K.FixedSizeBinary:return K.FixedSizeBinary;case K.FixedSizeList:return K.FixedSizeList;case K.Dictionary:return K.Dictionary}throw Error(`Unrecognized type '${K[e.typeId]}'`)}Yv.prototype.visitInt8=null,Yv.prototype.visitInt16=null,Yv.prototype.visitInt32=null,Yv.prototype.visitInt64=null,Yv.prototype.visitUint8=null,Yv.prototype.visitUint16=null,Yv.prototype.visitUint32=null,Yv.prototype.visitUint64=null,Yv.prototype.visitFloat16=null,Yv.prototype.visitFloat32=null,Yv.prototype.visitFloat64=null,Yv.prototype.visitDateDay=null,Yv.prototype.visitDateMillisecond=null,Yv.prototype.visitTimestampSecond=null,Yv.prototype.visitTimestampMillisecond=null,Yv.prototype.visitTimestampMicrosecond=null,Yv.prototype.visitTimestampNanosecond=null,Yv.prototype.visitTimeSecond=null,Yv.prototype.visitTimeMillisecond=null,Yv.prototype.visitTimeMicrosecond=null,Yv.prototype.visitTimeNanosecond=null,Yv.prototype.visitDenseUnion=null,Yv.prototype.visitSparseUnion=null,Yv.prototype.visitIntervalDayTime=null,Yv.prototype.visitIntervalYearMonth=null,Yv.prototype.visitDuration=null,Yv.prototype.visitDurationSecond=null,Yv.prototype.visitDurationMillisecond=null,Yv.prototype.visitDurationMicrosecond=null,Yv.prototype.visitDurationNanosecond=null;const $v=new Float64Array(1),ey=new Uint32Array($v.buffer);function ty(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 ny(e){if(e!==e)return 32256;$v[0]=e;let t=(ey[1]&2147483648)>>16&65535,n=ey[1]&2146435072,r=0;return n>=1089470464?ey[0]>0?n=31744:(n=(n&2080374784)>>16,r=(ey[1]&1048575)>>10):n<=1056964608?(r=1048576+(ey[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(ey[1]&1048575)+512>>10),t|n|r&65535}var ry=class extends Yv{};function iy(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const ay=(e,t,n)=>{e[t]=Math.floor(n/864e5)},oy=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},ly=({values:e},t,n)=>{e[t]=n},uy=({values:e},t,n)=>{e[t]=ny(n)},dy=(e,t,n)=>{switch(e.type.precision){case Ng.HALF:return uy(e,t,n);case Ng.SINGLE:case Ng.DOUBLE:return ly(e,t,n)}},fy=({values:e},t,n)=>{ay(e,t,n.valueOf())},py=({values:e},t,n)=>{e[t]=BigInt(n)},my=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},hy=({values:e,valueOffsets:t},n,r)=>oy(e,t,n,r),gy=({values:e,valueOffsets:t},n,r)=>oy(e,t,n,Wh(r)),_y=(e,t,n)=>{e.type.unit===Pg.DAY?fy(e,t,n):py(e,t,n)},vy=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},yy=({values:e},t,n)=>{e[t]=BigInt(n)},by=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},xy=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},Sy=(e,t,n)=>{switch(e.type.unit){case Fg.SECOND:return vy(e,t,n);case Fg.MILLISECOND:return yy(e,t,n);case Fg.MICROSECOND:return by(e,t,n);case Fg.NANOSECOND:return xy(e,t,n)}},Cy=({values:e},t,n)=>{e[t]=n},wy=({values:e},t,n)=>{e[t]=n},Ty=({values:e},t,n)=>{e[t]=n},Ey=({values:e},t,n)=>{e[t]=n},Dy=(e,t,n)=>{switch(e.type.unit){case Fg.SECOND:return Cy(e,t,n);case Fg.MILLISECOND:return wy(e,t,n);case Fg.MICROSECOND:return Ty(e,t,n);case Fg.NANOSECOND:return Ey(e,t,n)}},Oy=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},ky=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=Yy.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=Yy.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},jy=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),My=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),Ny=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),Py=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),Fy=(e,t,n)=>{let r=e.type.children.map(e=>Yy.getVisitFn(e.type)),i=n instanceof Map?Ny(t,n):n instanceof Jx?My(t,n):Array.isArray(n)?jy(t,n):Py(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},Iy=(e,t,n)=>{e.type.mode===Mg.Dense?Ly(e,t,n):Ry(e,t,n)},Ly=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Yy.visit(i,e.valueOffsets[t],n)},Ry=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Yy.visit(i,t,n)},zy=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},By=(e,t,n)=>{e.type.unit===Ig.DAY_TIME?Vy(e,t,n):Hy(e,t,n)},Vy=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},Hy=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},Uy=({values:e},t,n)=>{e[t]=n},Wy=({values:e},t,n)=>{e[t]=n},Gy=({values:e},t,n)=>{e[t]=n},Ky=({values:e},t,n)=>{e[t]=n},qy=(e,t,n)=>{switch(e.type.unit){case Fg.SECOND:return Uy(e,t,n);case Fg.MILLISECOND:return Wy(e,t,n);case Fg.MICROSECOND:return Gy(e,t,n);case Fg.NANOSECOND:return Ky(e,t,n)}},Jy=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=Yy.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${j_(e)}: ${j_(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new $y(this[Xy],this[Zy])}},$y=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[Xy].type.children.findIndex(e=>e.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[Xy].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[Xy].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=Gb.visit(e[Xy].children[n],e[Zy]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[Xy].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(Yy.visit(e[Xy].children[r],e[Zy],n),Reflect.set(e,t,n))}},tb=class extends Yv{};function nb(e){return(t,n)=>t.getValid(n)?e(t,n):null}const rb=(e,t)=>864e5*e[t],ib=(e,t)=>null,ab=(e,t,n)=>{if(n+1>=t.length)return null;let r=M_(t[n]),i=M_(t[n+1]);return e.subarray(r,i)},ob=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<rb(e,t),cb=({values:e},t)=>M_(e[t]),lb=({stride:e,values:t},n)=>t[e*n],ub=({stride:e,values:t},n)=>ty(t[e*n]),db=({values:e},t)=>e[t],fb=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),pb=({values:e,valueOffsets:t},n)=>ab(e,t,n),mb=({values:e,valueOffsets:t},n)=>{let r=ab(e,t,n);return r===null?null:Hh(r)},hb=({values:e},t)=>e[t],gb=({type:e,values:t},n)=>e.precision===Ng.HALF?ty(t[n]):t[n],_b=(e,t)=>e.type.unit===Pg.DAY?sb(e,t):cb(e,t),vb=({values:e},t)=>1e3*M_(e[t]),yb=({values:e},t)=>M_(e[t]),bb=({values:e},t)=>N_(e[t],BigInt(1e3)),xb=({values:e},t)=>N_(e[t],BigInt(1e6)),Sb=(e,t)=>{switch(e.type.unit){case Fg.SECOND:return vb(e,t);case Fg.MILLISECOND:return yb(e,t);case Fg.MICROSECOND:return bb(e,t);case Fg.NANOSECOND:return xb(e,t)}},Cb=({values:e},t)=>e[t],wb=({values:e},t)=>e[t],Tb=({values:e},t)=>e[t],Eb=({values:e},t)=>e[t],Db=(e,t)=>{switch(e.type.unit){case Fg.SECOND:return Cb(e,t);case Fg.MILLISECOND:return wb(e,t);case Fg.MICROSECOND:return Tb(e,t);case Fg.NANOSECOND:return Eb(e,t)}},Ob=({values:e,stride:t},n)=>G_.decimal(e.subarray(t*n,t*(n+1))),kb=(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 Jx([c])},Ab=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new Xb(o.slice(i,a-i))},jb=(e,t)=>new Qy(e,t),Mb=(e,t)=>e.type.mode===Mg.Dense?Nb(e,t):Pb(e,t),Nb=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return Gb.visit(r,e.valueOffsets[t])},Pb=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return Gb.visit(r,t)},Fb=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},Ib=(e,t)=>e.type.unit===Ig.DAY_TIME?Lb(e,t):Rb(e,t),Lb=({values:e},t)=>e.subarray(2*t,2*(t+1)),Rb=({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},zb=({values:e},t)=>e[t],Bb=({values:e},t)=>e[t],Vb=({values:e},t)=>e[t],Hb=({values:e},t)=>e[t],Ub=(e,t)=>{switch(e.type.unit){case Fg.SECOND:return zb(e,t);case Fg.MILLISECOND:return Bb(e,t);case Fg.MICROSECOND:return Vb(e,t);case Fg.NANOSECOND:return Hb(e,t)}},Wb=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new Jx([a])};tb.prototype.visitNull=nb(ib),tb.prototype.visitBool=nb(ob),tb.prototype.visitInt=nb(hb),tb.prototype.visitInt8=nb(lb),tb.prototype.visitInt16=nb(lb),tb.prototype.visitInt32=nb(lb),tb.prototype.visitInt64=nb(db),tb.prototype.visitUint8=nb(lb),tb.prototype.visitUint16=nb(lb),tb.prototype.visitUint32=nb(lb),tb.prototype.visitUint64=nb(db),tb.prototype.visitFloat=nb(gb),tb.prototype.visitFloat16=nb(ub),tb.prototype.visitFloat32=nb(lb),tb.prototype.visitFloat64=nb(lb),tb.prototype.visitUtf8=nb(mb),tb.prototype.visitLargeUtf8=nb(mb),tb.prototype.visitBinary=nb(pb),tb.prototype.visitLargeBinary=nb(pb),tb.prototype.visitFixedSizeBinary=nb(fb),tb.prototype.visitDate=nb(_b),tb.prototype.visitDateDay=nb(sb),tb.prototype.visitDateMillisecond=nb(cb),tb.prototype.visitTimestamp=nb(Sb),tb.prototype.visitTimestampSecond=nb(vb),tb.prototype.visitTimestampMillisecond=nb(yb),tb.prototype.visitTimestampMicrosecond=nb(bb),tb.prototype.visitTimestampNanosecond=nb(xb),tb.prototype.visitTime=nb(Db),tb.prototype.visitTimeSecond=nb(Cb),tb.prototype.visitTimeMillisecond=nb(wb),tb.prototype.visitTimeMicrosecond=nb(Tb),tb.prototype.visitTimeNanosecond=nb(Eb),tb.prototype.visitDecimal=nb(Ob),tb.prototype.visitList=nb(kb),tb.prototype.visitStruct=nb(jb),tb.prototype.visitUnion=nb(Mb),tb.prototype.visitDenseUnion=nb(Nb),tb.prototype.visitSparseUnion=nb(Pb),tb.prototype.visitDictionary=nb(Fb),tb.prototype.visitInterval=nb(Ib),tb.prototype.visitIntervalDayTime=nb(Lb),tb.prototype.visitIntervalYearMonth=nb(Rb),tb.prototype.visitDuration=nb(Ub),tb.prototype.visitDurationSecond=nb(zb),tb.prototype.visitDurationMillisecond=nb(Bb),tb.prototype.visitDurationMicrosecond=nb(Vb),tb.prototype.visitDurationNanosecond=nb(Hb),tb.prototype.visitFixedSizeList=nb(Wb),tb.prototype.visitMap=nb(Ab);const Gb=new tb,Kb=Symbol.for(`keys`),qb=Symbol.for(`vals`),Jb=Symbol.for(`kKeysAsStrings`),Yb=Symbol.for(`_kKeysAsStrings`);var Xb=class{constructor(e){return this[Kb]=new Jx([e.children[0]]).memoize(),this[qb]=e.children[1],new Proxy(this,new Qb)}get[Jb](){return this[Yb]||(this[Yb]=Array.from(this[Kb].toArray(),String))}[Symbol.iterator](){return new Zb(this[Kb],this[qb])}get size(){return this[Kb].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[Kb],t=this[qb],n={};for(let r=-1,i=e.length;++r`${j_(e)}: ${j_(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},Zb=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),Gb.visit(this.vals,e)]})}},Qb=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[Jb]}has(e,t){return e[Jb].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[Jb].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[Jb].indexOf(t);if(n!==-1){let r=Gb.visit(Reflect.get(e,qb),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[Jb].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(Yy.visit(Reflect.get(e,qb),r,n),Reflect.set(e,t,n))}};Object.defineProperties(Xb.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[Kb]:{writable:!0,enumerable:!1,configurable:!1,value:null},[qb]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Yb]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let $b;function ex(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 tx=(e,t)=>e<0?t+e:e,nx=e=>e!==e;function rx(e){let t=typeof e;if(t!==`object`||e===null)return nx(e)?nx: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?Sg(e,t):!1:e instanceof Map?ax(e):Array.isArray(e)?ix(e):e instanceof Jx?ox(e):sx(e,!0)}function ix(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 lx(e,n);case Map:return dx(e,n,n.keys());case Xb:case Qy:case Object:case void 0:return dx(e,n,t||Object.keys(n))}return n instanceof Jx?ux(e,n):!1}}function lx(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++r>r}function mx(e,t,n){let r=n.byteLength+7&-8;if(e>0||n.byteLength>3):hx(new gx(n,e,t,null,fx)).subarray(0,r)),i}return n}function hx(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 gx=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 _x(e,t,i)+_x(e,r,n)+vx(e,i>>3,r-i>>3)}function vx(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+=yx(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=yx(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=yx(a.getUint8(i)),i+=1;return r}function yx(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const bx=-1;var xx=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 mv.isSparseUnion(e)||mv.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(mv.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=bx&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-_x(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=Jv(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(mv.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===Mg.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(mx(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===K.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(mx(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[k_.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[k_.TYPE])&&(a[k_.TYPE]=i.subarray(e,e+t)),(i=a[k_.OFFSET])&&(a[k_.OFFSET]=i.subarray(e,e+t+1))||(i=a[k_.DATA])&&(a[k_.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};xx.prototype.children=Object.freeze([]);var Sx=class e extends Yv{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new xx(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=hg(e.data),i=hg(e.nullBitmap),a=pg(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xx(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=hg(e.data),i=hg(e.nullBitmap),a=mg(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xx(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=hg(e.data),i=hg(e.nullBitmap),a=pg(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xx(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=hg(e.data),i=hg(e.nullBitmap),a=mg(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xx(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=hg(e.nullBitmap),a=pg(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xx(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=hg(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=fg(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(mv.isSparseUnion(t))return new xx(t,n,a,o,[void 0,void 0,void 0,i],r);let s=pg(e.valueOffsets);return new xx(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=hg(t.nullBitmap),a=fg(n.indices.ArrayType,t.data),{dictionary:o=new Jx([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new xx(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xx(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=hg(t.nullBitmap),{length:o=i.length/Jv(n),nullCount:s=t.nullBitmap?-1:0}=t;return new xx(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=hg(t.nullBitmap),o=pg(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new xx(n,r,s,c,[o,void 0,a],[i])}};const Cx=new Sx;function wx(e){return Cx.visit(e)}var Tx=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 Dx(e){return e.reduce((e,t)=>e+t.nullCount,0)}function Ox(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function kx(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 Ax(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function Lx(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new gx(n,e.offset+(t||0),e.length,n,fx)){if(!i)return r;++r}return-1}function Rx(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case K.Union:break;case K.Dictionary:break;default:return Lx(e,n)}let r=Gb.getVisitFn(e),i=rx(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 Tx(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new Ux(a)})}var Ux=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof xx)))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}=Kx[o.typeId],r=a[0];this.isValid=e=>jx(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,qx[o.typeId]),this._offsets=Ox(a);break}this.data=a,this.type=o,this.stride=Jv(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 Ex(this.data)}get nullCount(){return Dx(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${K[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(tx(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return Wx.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(ex(this,t,n,({data:e,_offsets:t},n,r)=>kx(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case K.Int:case K.Float:case K.Decimal:case K.Time:case K.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 mv.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(mv.isDictionary(this.type)){let t=new Yx(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new Yx(this)}unmemoize(){if(mv.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}};Gx=Symbol.toStringTag,Jx[Gx]=(e=>{e.type=mv.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(K).map(e=>K[e]).filter(e=>typeof e==`number`&&e!==K.NONE);for(let n of t){let t=Gb.getVisitFnByTypeId(n),r=Yy.getVisitFnByTypeId(n),i=Bx.getVisitFnByTypeId(n);Kx[n]={get:t,set:r,indexOf:i},qx[n]=Object.create(e,{isValid:{value:Mx(jx)},get:{value:Mx(Gb.getVisitFnByTypeId(n))},set:{value:Nx(Yy.getVisitFnByTypeId(n))},indexOf:{value:Px(Bx.getVisitFnByTypeId(n))}})}return`Vector`})(Jx.prototype);var Yx=class e extends Jx{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 Jx(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},Xx=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()}},Zx=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()+Bg),(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):jg.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new D_).__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 Xx).__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 Xx).__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 a_).__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,jg.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)}},Qx=class e{constructor(e=[],t,n,r=jg.V5){this.fields=e||[],this.metadata=t||new Map,n||=tS(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=eS(eS(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:eS(eS(new Map,r[t].metadata),e.metadata)}))&&!1:!0}),o=tS(a,new Map);return new e([...r,...a],i,new Map([...this.dictionaries,...o]))}};Qx.prototype.fields=null,Qx.prototype.metadata=null,Qx.prototype.dictionaries=null;var $x=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)}};$x.prototype.type=null,$x.prototype.name=null,$x.prototype.nullable=null,$x.prototype.metadata=null;function eS(e,t){return new Map([...e||new Map,...t||new Map])}function tS(e,t=new Map){for(let n=-1,r=e.length;++n0&&tS(i.children,t)}return t}var nS=qg,rS=Kg,iS=class{static decode(e){e=new rS(hg(e));let t=Zx.getRootAsFooter(e),n=Qx.decode(t.schema(),new Map,t.version());return new aS(n,t)}static encode(e){let t=new nS,n=Qx.encode(t,e.schema);Zx.startRecordBatchesVector(t,e.numRecordBatches);for(let n of[...e.recordBatches()].slice().reverse())oS.encode(t,n);let r=t.endVector();Zx.startDictionariesVector(t,e.numDictionaries);for(let n of[...e.dictionaryBatches()].slice().reverse())oS.encode(t,n);let i=t.endVector();return Zx.startFooter(t),Zx.addSchema(t,n),Zx.addVersion(t,jg.V5),Zx.addRecordBatches(t,r),Zx.addDictionaries(t,i),Zx.finishFooterBuffer(t,Zx.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=jg.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 Fh(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(sS);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Cg.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Cg.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return Fh(this,void 0,void 0,function*(){return yield this.abort(e),sS})}return(e){return Fh(this,void 0,void 0,function*(){return yield this.close(),sS})}read(e){return Fh(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return Fh(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(sS)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw Error(`AsyncQueue is closed`)}},dS=class extends uS{write(e){if((e=hg(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?Hh(this.toUint8Array(!0)):this.toUint8Array(!1).then(Hh)}toUint8Array(e=!1){return e?dg(this._values)[0]:(()=>Fh(this,void 0,void 0,function*(){var e,t,n,r;let i=[],a=0;try{for(var o=!0,s=Bh(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 dg(i,a)[0]}))()}},fS=class{constructor(e){e&&(this.source=new mS(Cg.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)}},pS=class e{constructor(t){t instanceof e?this.source=t.source:t instanceof dS?this.source=new hS(Cg.fromAsyncIterable(t)):og(t)?this.source=new hS(Cg.fromNodeStream(t)):ig(t)?this.source=new hS(Cg.fromDOMStream(t)):tg(t)?this.source=new hS(Cg.fromDOMStream(t.body)):Xh(t)?this.source=new hS(Cg.fromIterable(t)):(Yh(t)||Zh(t))&&(this.source=new hS(Cg.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)}},mS=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)||sS)}return(e){return Object.create(this.source.return&&this.source.return(e)||sS)}},hS=class{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(e){return Fh(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return Fh(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return Fh(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(e){return Fh(this,arguments,void 0,function*(e,t=`read`){return yield this.source.next({cmd:t,size:e})})}throw(e){return Fh(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||sS;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return Fh(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||sS;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},gS=class extends fS{constructor(e,t){super(),this.position=0,this.buffer=hg(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),eFh(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return Fh(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 Fh(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`${yS(this.buffer[3])} ${yS(this.buffer[2])} ${yS(this.buffer[1])} ${yS(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)}},DS=class extends ES{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:hx(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return fg(Uint8Array,fg(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return fg(Uint8Array,fg(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:n}=this;return mv.isTimestamp(e)||(mv.isInt(e)||mv.isTime(e))&&e.bitWidth===64||mv.isDuration(e)||mv.isDate(e)&&e.unit===Pg.MILLISECOND?fg(Uint8Array,wS.convertArray(n[t])):mv.isDecimal(e)?fg(Uint8Array,TS.convertArray(n[t])):mv.isBinary(e)||mv.isLargeBinary(e)||mv.isFixedSizeBinary(e)?OS(n[t]):mv.isBool(e)?hx(n[t]):mv.isUtf8(e)||mv.isLargeUtf8(e)?Wh(n[t].join(``)):fg(Uint8Array,fg(e.ArrayType,n[t].map(e=>+e)))}};function OS(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 kS=class extends Yv{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 AS(e,t){return t instanceof e.constructor}function jS(e,t){return e===t||AS(e,t)}function MS(e,t){return e===t||AS(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function NS(e,t){return e===t||AS(e,t)&&e.precision===t.precision}function PS(e,t){return e===t||AS(e,t)&&e.byteWidth===t.byteWidth}function FS(e,t){return e===t||AS(e,t)&&e.unit===t.unit}function IS(e,t){return e===t||AS(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function LS(e,t){return e===t||AS(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function RS(e,t){return e===t||AS(e,t)&&e.children.length===t.children.length&&KS.compareManyFields(e.children,t.children)}function zS(e,t){return e===t||AS(e,t)&&e.children.length===t.children.length&&KS.compareManyFields(e.children,t.children)}function BS(e,t){return e===t||AS(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&KS.compareManyFields(e.children,t.children)}function VS(e,t){return e===t||AS(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&KS.visit(e.indices,t.indices)&&KS.visit(e.dictionary,t.dictionary)}function HS(e,t){return e===t||AS(e,t)&&e.unit===t.unit}function US(e,t){return e===t||AS(e,t)&&e.unit===t.unit}function WS(e,t){return e===t||AS(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&KS.compareManyFields(e.children,t.children)}function GS(e,t){return e===t||AS(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&KS.compareManyFields(e.children,t.children)}kS.prototype.visitNull=jS,kS.prototype.visitBool=jS,kS.prototype.visitInt=MS,kS.prototype.visitInt8=MS,kS.prototype.visitInt16=MS,kS.prototype.visitInt32=MS,kS.prototype.visitInt64=MS,kS.prototype.visitUint8=MS,kS.prototype.visitUint16=MS,kS.prototype.visitUint32=MS,kS.prototype.visitUint64=MS,kS.prototype.visitFloat=NS,kS.prototype.visitFloat16=NS,kS.prototype.visitFloat32=NS,kS.prototype.visitFloat64=NS,kS.prototype.visitUtf8=jS,kS.prototype.visitLargeUtf8=jS,kS.prototype.visitBinary=jS,kS.prototype.visitLargeBinary=jS,kS.prototype.visitFixedSizeBinary=PS,kS.prototype.visitDate=FS,kS.prototype.visitDateDay=FS,kS.prototype.visitDateMillisecond=FS,kS.prototype.visitTimestamp=IS,kS.prototype.visitTimestampSecond=IS,kS.prototype.visitTimestampMillisecond=IS,kS.prototype.visitTimestampMicrosecond=IS,kS.prototype.visitTimestampNanosecond=IS,kS.prototype.visitTime=LS,kS.prototype.visitTimeSecond=LS,kS.prototype.visitTimeMillisecond=LS,kS.prototype.visitTimeMicrosecond=LS,kS.prototype.visitTimeNanosecond=LS,kS.prototype.visitDecimal=jS,kS.prototype.visitList=RS,kS.prototype.visitStruct=zS,kS.prototype.visitUnion=BS,kS.prototype.visitDenseUnion=BS,kS.prototype.visitSparseUnion=BS,kS.prototype.visitDictionary=VS,kS.prototype.visitInterval=HS,kS.prototype.visitIntervalDayTime=HS,kS.prototype.visitIntervalYearMonth=HS,kS.prototype.visitDuration=US,kS.prototype.visitDurationSecond=US,kS.prototype.visitDurationMillisecond=US,kS.prototype.visitDurationMicrosecond=US,kS.prototype.visitDurationNanosecond=US,kS.prototype.visitFixedSizeList=WS,kS.prototype.visitMap=GS;const KS=new kS;function qS(e,t){return KS.compareSchemas(e,t)}function JS(e,t){return YS(e,t.map(e=>e.data.concat()))}function YS(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++]=wx({type:new Vv(n),length:o,nullCount:0,children:u.slice()})))}return[e=e.assign(n),r.map(t=>new eC(e,t))]}function XS(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))??wx({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return n}var ZS,QS=class e{constructor(...t){var n,r;if(t.length===0)return this.batches=[],this.schema=new Qx([]),this._offsets=[0],this;let i,a;t[0]instanceof Qx&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(a=t.pop());let o=t=>{if(t){if(t instanceof eC)return[t];if(t instanceof e)return t.batches;if(t instanceof xx){if(t.type instanceof Vv)return[new eC(new Qx(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 Jx([t[e]])),r=i??new Qx(e.map((e,t)=>new $x(String(e),n[t].type,n[t].nullable))),[,a]=JS(r,n);return a.length===0?[new eC(t)]:a}}return[]},s=t.flatMap(e=>o(e));if(i=(r=i??(n=s[0])?.schema)??new Qx([]),!(i instanceof Qx))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);for(let e of s){if(!(e instanceof eC))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);if(!qS(i,e.schema))throw TypeError(`Table and inner RecordBatch schemas must be equivalent.`)}this.schema=i,this.batches=s,this._offsets=a??Ox(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=Dx(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(tx(e,this.numRows))}set(e,t){}indexOf(e,t){return-1}[Symbol.iterator](){return this.batches.length>0?Wx.visit(new Jx(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 eC(n,e)))}slice(t,n){let r=this.schema;[t,n]=ex({length:this.numRows},t,n);let i=kx(this.data,this._offsets,t,n);return new e(r,i.map(e=>new eC(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=wx({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new Jx(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]=JS(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(...JS(a,o))}};ZS=Symbol.toStringTag,QS[ZS]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=Mx(jx),e.get=Mx(Gb.getVisitFn(K.Struct)),e.set=Nx(Yy.getVisitFn(K.Struct)),e.indexOf=Px(Bx.getVisitFn(K.Struct)),`Table`))(QS.prototype);var $S,eC=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof Qx)||([,this.data=wx({nullCount:0,type:new Vv(this.schema.fields),children:this.schema.fields.map(e=>wx({type:e.type,nullCount:0}))})]=e,!(this.data instanceof xx)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=tC(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]=$x.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new Qx(n),o=wx({type:new Vv(n),length:i,children:r,nullCount:0});[this.schema,this.data]=tC(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||=nC(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 Gb.visit(this.data,e)}at(e){return this.get(tx(e,this.numRows))}set(e,t){return Yy.visit(this.data,e,t)}indexOf(e,t){return Bx.visit(this.data,e,t)}[Symbol.iterator](){return Wx.visit(new Jx([this.data]))}toArray(){return[...this]}concat(...e){return new QS(this.schema,[this,...e])}slice(t,n){let[r]=new Jx([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,wx({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=wx({type:new Vv(n.fields),length:this.numRows,children:r});return new e(n,i)}};$S=Symbol.toStringTag,eC[$S]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(eC.prototype);function tC(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))??wx({type:c.type,length:n,nullCount:n,nullBitmap:new Uint8Array(o)}))}return[e.assign(i),wx({type:new Vv(i),length:n,children:a})]}function nC(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;++rwx({type:e.type})),n=wx({type:new Vv(e.fields),nullCount:0,children:t});super(e,n)}},iC=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()+Bg),(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):jg.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):O_.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 a_).__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,jg.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,O_.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)}},aC=class extends Yv{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return y_.startNull(t),y_.endNull(t)}visitInt(e,t){return r_.startInt(t),r_.addBitWidth(t,e.bitWidth),r_.addIsSigned(t,e.isSigned),r_.endInt(t)}visitFloat(e,t){return p_.startFloatingPoint(t),p_.addPrecision(t,e.precision),p_.endFloatingPoint(t)}visitBinary(e,t){return o_.startBinary(t),o_.endBinary(t)}visitLargeBinary(e,t){return h_.startLargeBinary(t),h_.endLargeBinary(t)}visitBool(e,t){return s_.startBool(t),s_.endBool(t)}visitUtf8(e,t){return w_.startUtf8(t),w_.endUtf8(t)}visitLargeUtf8(e,t){return g_.startLargeUtf8(t),g_.endLargeUtf8(t)}visitDecimal(e,t){return l_.startDecimal(t),l_.addScale(t,e.scale),l_.addPrecision(t,e.precision),l_.addBitWidth(t,e.bitWidth),l_.endDecimal(t)}visitDate(e,t){return c_.startDate(t),c_.addUnit(t,e.unit),c_.endDate(t)}visitTime(e,t){return x_.startTime(t),x_.addUnit(t,e.unit),x_.addBitWidth(t,e.bitWidth),x_.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return S_.startTimestamp(t),S_.addUnit(t,e.unit),n!==void 0&&S_.addTimezone(t,n),S_.endTimestamp(t)}visitInterval(e,t){return m_.startInterval(t),m_.addUnit(t,e.unit),m_.endInterval(t)}visitDuration(e,t){return u_.startDuration(t),u_.addUnit(t,e.unit),u_.endDuration(t)}visitList(e,t){return __.startList(t),__.endList(t)}visitStruct(e,t){return b_.startStruct_(t),b_.endStruct_(t)}visitUnion(e,t){C_.startTypeIdsVector(t,e.typeIds.length);let n=C_.createTypeIdsVector(t,e.typeIds);return C_.startUnion(t),C_.addMode(t,e.mode),C_.addTypeIds(t,n),C_.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return i_.startDictionaryEncoding(t),i_.addId(t,BigInt(e.id)),i_.addIsOrdered(t,e.isOrdered),n!==void 0&&i_.addIndexType(t,n),i_.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return d_.startFixedSizeBinary(t),d_.addByteWidth(t,e.byteWidth),d_.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return f_.startFixedSizeList(t),f_.addListSize(t,e.listSize),f_.endFixedSizeList(t)}visitMap(e,t){return v_.startMap(t),v_.addKeysSorted(t,e.keysSorted),v_.endMap(t)}};const oC=new aC;function sC(e,t=new Map){return new Qx(uC(e,t),gC(e.metadata),t)}function cC(e){return new SC(e.count,fC(e.columns),pC(e.columns))}function lC(e){return new CC(cC(e.data),e.id,e.isDelta)}function uC(e,t){return(e.fields||[]).filter(Boolean).map(e=>$x.fromJSON(e,t))}function dC(e,t){return(e.children||[]).filter(Boolean).map(e=>$x.fromJSON(e,t))}function fC(e){return(e||[]).reduce((e,t)=>[...e,new TC(t.count,mC(t.VALIDITY)),...fC(t.children)],[])}function pC(e,t=[]){for(let n=-1,r=(e||[]).length;++ne+ +(t===0),0)}function hC(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=vC(e,dC(e,t)),i=new $x(e.name,o,e.nullable,gC(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?_C(r):new yv,s=new qv(t.get(n),r,n,a.isOrdered),i=new $x(e.name,s,e.nullable,gC(e.metadata))):(r=(r=a.indexType)?_C(r):new yv,t.set(n,o=vC(e,dC(e,t))),s=new qv(o,r,n,a.isOrdered),i=new $x(e.name,s,e.nullable,gC(e.metadata))),i||null}function gC(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function _C(e){return new gv(e.isSigned,e.bitWidth)}function vC(e,t){let n=e.type.name;switch(n){case`NONE`:return new hv;case`null`:return new hv;case`binary`:return new kv;case`largebinary`:return new Av;case`utf8`:return new jv;case`largeutf8`:return new Mv;case`bool`:return new Nv;case`list`:return new Bv((t||[])[0]);case`struct`:return new Vv(t||[]);case`struct_`:return new Vv(t||[])}switch(n){case`int`:{let t=e.type;return new gv(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new Tv(Ng[t.precision])}case`decimal`:{let t=e.type;return new Pv(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new Fv(Pg[t.unit])}case`time`:{let t=e.type;return new Iv(Fg[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new Lv(Fg[t.unit],t.timezone)}case`interval`:{let t=e.type;return new Rv(Ig[t.unit])}case`duration`:{let t=e.type;return new zv(Fg[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase(),a=r.toUpperCase()+i.join(``);return new Hv(Mg[a],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new Uv(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new Wv(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new Gv((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var yC=qg,bC=Kg,xC=class e{static fromJSON(t,n){let r=new e(0,jg.V5,n);return r._createHeader=EC(t,n),r}static decode(t){t=new bC(hg(t));let n=iC.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=DC(n,a),o}static encode(e){let t=new yC,n=-1;return e.isSchema()?n=Qx.encode(t,e.header()):e.isRecordBatch()?n=SC.encode(t,e.header()):e.isDictionaryBatch()&&(n=CC.encode(t,e.header())),iC.startMessage(t),iC.addVersion(t,jg.V5),iC.addHeader(t,n),iC.addHeaderType(t,e.headerType),iC.addBodyLength(t,BigInt(e.bodyLength)),iC.finishMessageBuffer(t,iC.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof Qx)return new e(0,jg.V5,O_.Schema,t);if(t instanceof SC)return new e(n,jg.V5,O_.RecordBatch,t);if(t instanceof CC)return new e(n,jg.V5,O_.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===O_.Schema}isRecordBatch(){return this.headerType===O_.RecordBatch}isDictionaryBatch(){return this.headerType===O_.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=M_(e)}},SC=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=M_(e)}},CC=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=M_(t)}},wC=class{constructor(e,t){this.offset=M_(e),this.length=M_(t)}},TC=class{constructor(e,t){this.length=M_(e),this.nullCount=M_(t)}};function EC(e,t){return()=>{switch(t){case O_.Schema:return Qx.fromJSON(e);case O_.RecordBatch:return SC.fromJSON(e);case O_.DictionaryBatch:return CC.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${O_[t]}, type: ${t} }`)}}function DC(e,t){return()=>{switch(t){case O_.Schema:return Qx.decode(e.header(new D_),new Map,e.version());case O_.RecordBatch:return SC.decode(e.header(new $g),e.version());case O_.DictionaryBatch:return CC.decode(e.header(new e_),e.version())}throw Error(`Unrecognized Message type: { name: ${O_[t]}, type: ${t} }`)}}$x.encode=HC,$x.decode=LC,$x.fromJSON=hC,Qx.encode=VC,Qx.decode=OC,Qx.fromJSON=sC,SC.encode=UC,SC.decode=kC,SC.fromJSON=cC,CC.encode=WC,CC.decode=AC,CC.fromJSON=lC,TC.encode=GC,TC.decode=MC,wC.encode=KC,wC.decode=jC;function OC(e,t=new Map,n=jg.V5){let r=FC(e,t);return new Qx(r,RC(e),t,n)}function kC(e,t=jg.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new SC(e.length(),NC(e),PC(e,t))}function AC(e,t=jg.V5){return new CC(SC.decode(e.data(),t),e.id(),e.isDelta())}function jC(e){return new wC(e.offset(),e.length())}function MC(e){return new TC(e.length(),e.nullCount())}function NC(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++r$x.encode(e,t));D_.startFieldsVector(e,n.length);let r=D_.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?D_.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return a_.startKeyValue(e),a_.addKey(e,r),a_.addValue(e,i),a_.endKeyValue(e)})):-1;return D_.startSchema(e),D_.addFields(e,r),D_.addEndianness(e,qC?t_.Little:t_.Big),i!==-1&&D_.addCustomMetadata(e,i),D_.endSchema(e)}function HC(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;mv.isDictionary(a)?(o=a.dictionary.typeId,i=oC.visit(a,e),r=oC.visit(a.dictionary,e)):r=oC.visit(a,e);let s=(a.children||[]).map(t=>$x.encode(e,t)),c=E_.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?E_.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return a_.startKeyValue(e),a_.addKey(e,r),a_.addValue(e,i),a_.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),E_.startField(e),E_.addType(e,r),E_.addTypeType(e,o),E_.addChildren(e,c),E_.addNullable(e,!!t.nullable),n!==-1&&E_.addName(e,n),i!==-1&&E_.addDictionary(e,i),l!==-1&&E_.addCustomMetadata(e,l),E_.endField(e)}function UC(e,t){let n=t.nodes||[],r=t.buffers||[];$g.startNodesVector(e,n.length);for(let t of n.slice().reverse())TC.encode(e,t);let i=e.endVector();$g.startBuffersVector(e,r.length);for(let t of r.slice().reverse())wC.encode(e,t);let a=e.endVector();return $g.startRecordBatch(e),$g.addLength(e,BigInt(t.length)),$g.addNodes(e,i),$g.addBuffers(e,a),$g.endRecordBatch(e)}function WC(e,t){let n=SC.encode(e,t.data);return e_.startDictionaryBatch(e),e_.addId(e,BigInt(t.id)),e_.addIsDelta(e,t.isDelta),e_.addData(e,n),e_.endDictionaryBatch(e)}function GC(e,t){return Qg.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function KC(e,t){return Zg.createBuffer(e,BigInt(t.offset),BigInt(t.length))}const qC=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),JC=e=>`Expected ${O_[e]} Message in stream, but was null or length 0.`,YC=e=>`Header pointer of flatbuffer-encoded ${O_[e]} Message is null or length 0.`,XC=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,ZC=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;var QC=class{constructor(e){this.source=e instanceof fS?e:new fS(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?sS: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(JC(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=hg(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(JC(e));return t.value}readSchema(){let e=O_.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(YC(e));return n}};const tw=4,nw=`ARROW1`,rw=new Uint8Array(6);for(let e=0;e<6;e+=1)rw[e]=nw.codePointAt(e);function iw(e,t=0){for(let n=-1,r=rw.length;++nthis):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 Cg.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Cg.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:Qh(t)?Sw(t):eg(t)?Tw(t):Yh(t)?(()=>Fh(this,void 0,void 0,function*(){return yield e.from(yield t)}))():tg(t)||ig(t)||og(t)||Zh(t)?ww(new pS(t)):Cw(new fS(t))}static readAll(t){return t instanceof e?t.isSync()?bw(t):xw(t):Qh(t)||ArrayBuffer.isView(t)||Xh(t)||$h(t)?bw(t):xw(t)}},lw=class extends cw{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Rh(this,arguments,function*(){yield Lh(yield*zh(Bh(this[Symbol.iterator]())))})}},uw=class extends cw{constructor(e){super(e),this._impl=e}readAll(){return Fh(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=Bh(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]()}},dw=class extends lw{constructor(e){super(e),this._impl=e}},fw=class extends uw{constructor(e){super(e),this._impl=e}},pw=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=wx({type:new Vv(this.schema.fields),length:e.length,children:n});return new eC(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 Jx(c)):new Jx(c)).memoize()}_loadVectors(e,t,n){return new ES(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},mw=class extends pw{constructor(e,t){super(t),this._reader=Qh(e)?new ew(this._handle=e):new QC(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=yw(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):sS}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):sS}next(){if(this.closed)return sS;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 rC(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},hw=class extends pw{constructor(e,t){super(t),this._reader=new $C(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Fh(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 Fh(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=yw(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Fh(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):sS})}return(e){return Fh(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):sS})}next(){return Fh(this,void 0,void 0,function*(){if(this.closed)return sS;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 rC(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Fh(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},gw=class extends mw{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 gS?e:new gS(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(O_.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(O_.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-ow,n=e.readInt32(t),r=e.readAt(t-n,n);return iS.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Fh(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 Fh(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(O_.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 Fh(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(O_.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 Fh(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-ow,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return iS.decode(r)})}_readNextMessageAndValidate(e){return Fh(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?iw(t)?new dw(new gw(e.read())):new lw(new mw(e)):new lw(new mw(function*(){}()))}function ww(e){return Fh(this,void 0,void 0,function*(){let t=yield e.peek(aw+7&-8);return t&&t.byteLength>=4?iw(t)?new dw(new gw(yield e.read())):new uw(new hw(e)):new uw(new hw(function(){return Rh(this,arguments,function*(){})}()))})}function Tw(e){return Fh(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new _S(e,t);return t>=sw&&iw(yield n.readAt(0,aw+7&-8))?new fw(new _w(n)):new uw(new hw(n))})}var Ew=class e extends Yv{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof eC?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 Jx)return this.visitMany(e.data),this;let{type:t}=e;if(!mv.isDictionary(t)){let{length:n}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);if(mv.isUnion(t))this.nodes.push(new TC(n,0));else{let{nullCount:r}=e;mv.isNull(t)||Dw.call(this,r<=0?new Uint8Array:mx(e.offset,n,e.nullBitmap)),this.nodes.push(new TC(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 Dw(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new wC(this._byteLength,t)),this._byteLength+=t,this}function Ow(e){var t;let{type:n,length:r,typeIds:i,valueOffsets:a}=e;if(Dw.call(this,i),n.mode===Mg.Sparse)return Nw.call(this,e);if(n.mode===Mg.Dense){if(e.offset<=0)return Dw.call(this,a),Nw.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 kw(e){let t;return e.nullCount>=e.length?Dw.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?Dw.call(this,mx(e.offset,e.length,t)):Dw.call(this,hx(e.values))}function Aw(e){return Dw.call(this,e.values.subarray(0,e.length*e.stride))}function jw(e){let{length:t,values:n,valueOffsets:r}=e,i=M_(r[0]),a=M_(r[t]),o=Math.min(a-i,n.byteLength-i);return Dw.call(this,xg(-i,t+1,r)),Dw.call(this,n.subarray(i,i+o)),this}function Mw(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return Dw.call(this,xg(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function Nw(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}Ew.prototype.visitBool=kw,Ew.prototype.visitInt=Aw,Ew.prototype.visitFloat=Aw,Ew.prototype.visitUtf8=jw,Ew.prototype.visitLargeUtf8=jw,Ew.prototype.visitBinary=jw,Ew.prototype.visitLargeBinary=jw,Ew.prototype.visitFixedSizeBinary=Aw,Ew.prototype.visitDate=Aw,Ew.prototype.visitTimestamp=Aw,Ew.prototype.visitTime=Aw,Ew.prototype.visitDecimal=Aw,Ew.prototype.visitList=Mw,Ew.prototype.visitStruct=Nw,Ew.prototype.visitUnion=Ow,Ew.prototype.visitInterval=Aw,Ew.prototype.visitDuration=Aw,Ew.prototype.visitFixedSizeList=Mw,Ew.prototype.visitMap=Mw;var Pw=class extends lS{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 dS,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Jh(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 Yh(e)?e.then(e=>this.writeAll(e)):Zh(e)?Rw(this,e):Lw(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 dS?this._sink=e:(this._sink=new dS,e&&rg(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&ag(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||!qS(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 QS&&!(t=e.schema)||e instanceof eC&&!(t=e.schema))return this.finish()&&void 0}else throw Error(`RecordBatchWriter is closed`);if(t&&!qS(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof eC?e instanceof rC||this._writeRecordBatch(e):e instanceof QS?this.writeAll(e.batches):Xh(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=xC.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===O_.RecordBatch?this._recordBatchBlocks.push(new oS(o,e.bodyLength,this._position)):e.headerType===O_.DictionaryBatch&&this._dictionaryBlocks.push(new oS(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=hg(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(xC.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(rw)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=Ew.assemble(e),a=new SC(e.numRows,n,r),o=xC.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}=Ew.assemble(new Jx([e])),s=new SC(e.length,i,a),c=new CC(s,t,n),l=xC.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)):Zh(t)?Rw(r,t):Lw(r,t)}},Iw=class e extends Pw{static writeAll(t){let n=new e;return Yh(t)?t.then(e=>n.writeAll(e)):Zh(t)?Rw(n,t):Lw(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=iS.encode(new iS(e,jg.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function Lw(e,t){let n=t;t instanceof QS&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function Rw(e,t){return Fh(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=Bh(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 zw(e,t=`stream`){return(t===`stream`?Fw:Iw).writeAll(e).toUint8Array(!0)}var Bw=Object.create,Vw=Object.defineProperty,Hw=Object.getOwnPropertyDescriptor,Uw=Object.getOwnPropertyNames,Ww=Object.getPrototypeOf,Gw=Object.prototype.hasOwnProperty,Kw=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qw=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Uw(t))!Gw.call(e,i)&&i!==n&&Vw(e,i,{get:()=>t[i],enumerable:!(r=Hw(t,i))||r.enumerable});return e},Jw=(e,t,n)=>(n=e==null?{}:Bw(Ww(e)),qw(t||!e||!e.__esModule?Vw(n,`default`,{value:e,enumerable:!0}):n,e)),Yw=Kw((e,t)=>{t.exports=Worker}),Xw=(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))(Xw||{}),Zw=(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))(Zw||{}),Qw=(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))(Qw||{}),$w=(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))($w||{}),eT=(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))(eT||{}),tT=(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))(tT||{}),nT=class{log(e){}},rT=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},iT=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e))(iT||{}),aT=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=cw.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new QS(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 oT(this._bindings,this._conn,n),i=await cw.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 sT(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=zw(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)}},oT=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}},sT=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=cw.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new QS(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new oT(this.bindings,this.connectionId,t),r=await cw.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},cT=(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))(cT||{}),lT=(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))(lT||{}),uT=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 dT(e){switch(e.typeId){case K.Binary:return{sqlType:`binary`};case K.Bool:return{sqlType:`bool`};case K.Date:return{sqlType:`date`};case K.DateDay:return{sqlType:`date32[d]`};case K.DateMillisecond:return{sqlType:`date64[ms]`};case K.Decimal:{let t=e;return{sqlType:`decimal`,precision:t.precision,scale:t.scale}}case K.Float:return{sqlType:`float`};case K.Float16:return{sqlType:`float16`};case K.Float32:return{sqlType:`float32`};case K.Float64:return{sqlType:`float64`};case K.Int:return{sqlType:`int32`};case K.Int16:return{sqlType:`int16`};case K.Int32:return{sqlType:`int32`};case K.Int64:return{sqlType:`int64`};case K.Uint16:return{sqlType:`uint16`};case K.Uint32:return{sqlType:`uint32`};case K.Uint64:return{sqlType:`uint64`};case K.Uint8:return{sqlType:`uint8`};case K.IntervalDayTime:return{sqlType:`interval[dt]`};case K.IntervalYearMonth:return{sqlType:`interval[m]`};case K.List:return{sqlType:`list`,valueType:dT(e.valueType)};case K.FixedSizeBinary:return{sqlType:`fixedsizebinary`,byteWidth:e.byteWidth};case K.Null:return{sqlType:`null`};case K.Utf8:return{sqlType:`utf8`};case K.Struct:return{sqlType:`struct`,fields:e.children.map(e=>fT(e.name,e.type))};case K.Map:{let t=e;return{sqlType:`map`,keyType:dT(t.keyType),valueType:dT(t.valueType)}}case K.Time:return{sqlType:`time[s]`};case K.TimeMicrosecond:return{sqlType:`time[us]`};case K.TimeMillisecond:return{sqlType:`time[ms]`};case K.TimeNanosecond:return{sqlType:`time[ns]`};case K.TimeSecond:return{sqlType:`time[s]`};case K.Timestamp:return{sqlType:`timestamp`,timezone:e.timezone||void 0};case K.TimestampSecond:return{sqlType:`timestamp[s]`,timezone:e.timezone||void 0};case K.TimestampMicrosecond:return{sqlType:`timestamp[us]`,timezone:e.timezone||void 0};case K.TimestampNanosecond:return{sqlType:`timestamp[ns]`,timezone:e.timezone||void 0};case K.TimestampMillisecond:return{sqlType:`timestamp[ms]`,timezone:e.timezone||void 0}}throw Error(`unsupported arrow type: ${e.toString()}`)}function fT(e,t){let n=dT(t);return n.name=e,n}var pT=new TextEncoder,mT=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 uT(`RESET`,null);return await this.postTask(e)}async ping(){let e=new uT(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new uT(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new uT(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new uT(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new uT(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new uT(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new uT(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new uT(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new uT(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new uT(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new aT(this,e)}async disconnect(e){let t=new uT(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new uT(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new uT(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new uT(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new uT(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new uT(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new uT(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new uT(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new uT(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new uT(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new uT(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new uT(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=pT.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new uT(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new uT(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new uT(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new uT(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new uT(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new uT(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new uT(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new uT(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new uT(`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(fT(t,r))}n.columnsFlat=e,delete n.columns}let r=new uT(`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(fT(t,r))}n.columnsFlat=e,delete n.columns}let r=new uT(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function hT(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}var gT=hT(),_T=(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))(_T||{}),vT=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])),yT=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])),bT=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])),xT=()=>(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])),ST={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`}}},CT=ST.name,wT=ST.version,TT=ST.version.split(`.`),ET=TT[0],DT=TT[1],OT=TT[2],kT=()=>typeof navigator>`u`,AT=()=>kT()?`node`:navigator.userAgent,jT=()=>AT().includes(`Firefox`),MT=()=>/^((?!chrome|android).)*safari/i.test(AT()),NT=null,PT=null,FT=null,IT=null,LT=null;async function RT(){return NT??=typeof BigInt64Array<`u`,PT??=await yT(),FT??=await xT(),IT??=await bT(),LT??=await vT(),{bigInt64Array:NT,crossOriginIsolated:kT()||globalThis.crossOriginIsolated||!1,wasmExceptions:PT,wasmSIMD:IT,wasmThreads:FT,wasmBulkMemory:LT}}async function zT(e){let t=await RT();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 BT=Jw(Yw());const VT=Symbol.for(`constructDateFrom`),HT={},UT={};function WT(e,t){try{let n=HT[e]||=new Intl.DateTimeFormat(`en-GB`,{timeZone:e,hour:`numeric`,timeZoneName:`longOffset`}).format,r=n(t).split(`GMT`)[1]||``;return r in UT?UT[r]:KT(r,r.split(`:`))}catch{if(e in UT)return UT[e];let t=e?.match(GT);return t?KT(e,t.slice(1)):NaN}}const GT=/([+-]\d\d):?(\d\d)?/;function KT(e,t){let n=+t[0],r=+(t[1]||0);return UT[e]=n>0?n*60+r:n*60-r}var qT=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(WT(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)),ZT(this,NaN),YT(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-WT(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),YT(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};const JT=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!JT.test(e))return;let t=e.replace(JT,`$1UTC`);qT.prototype[t]&&(e.startsWith(`get`)?qT.prototype[e]=function(){return this.internal[t]()}:(qT.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),XT(this),+this},qT.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),YT(this),+this}))});function YT(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function XT(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()),ZT(e)}function ZT(e){let t=WT(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=WT(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=WT(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 QT=class e extends qT{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} (${$T(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 $T(e,t){return new Intl.DateTimeFormat(`en-GB`,{timeZone:e,timeZoneName:`long`}).format(t).slice(12)}const eE=new TextDecoder(`utf-8`),tE=e=>eE.decode(e),nE=new TextEncoder,rE=e=>nE.encode(e),iE=e=>typeof e==`function`,aE=e=>e!=null&&Object(e)===e,oE=e=>aE(e)&&iE(e.then),sE=e=>aE(e)&&iE(e[Symbol.iterator]),cE=e=>aE(e)&&iE(e[Symbol.asyncIterator]),lE=e=>aE(e)&&`done`in e&&`value`in e,uE=e=>aE(e)&&iE(e.clear)&&iE(e.bytes)&&iE(e.position)&&iE(e.setPosition)&&iE(e.capacity)&&iE(e.getBufferIdentifier)&&iE(e.createLong);var dE={};Cn(dE,{compareArrayLike:()=>XE,joinUint8Arrays:()=>hE,memcpy:()=>mE,rebaseValueOffsets:()=>YE,toArrayBufferView:()=>gE,toArrayBufferViewAsyncIterator:()=>zE,toArrayBufferViewIterator:()=>kE,toBigInt64Array:()=>bE,toBigUint64Array:()=>wE,toFloat32Array:()=>TE,toFloat32ArrayAsyncIterator:()=>KE,toFloat32ArrayIterator:()=>IE,toFloat64Array:()=>EE,toFloat64ArrayAsyncIterator:()=>qE,toFloat64ArrayIterator:()=>LE,toInt16Array:()=>vE,toInt16ArrayAsyncIterator:()=>VE,toInt16ArrayIterator:()=>jE,toInt32Array:()=>yE,toInt32ArrayAsyncIterator:()=>HE,toInt32ArrayIterator:()=>ME,toInt8Array:()=>_E,toInt8ArrayAsyncIterator:()=>BE,toInt8ArrayIterator:()=>AE,toUint16Array:()=>SE,toUint16ArrayAsyncIterator:()=>WE,toUint16ArrayIterator:()=>PE,toUint32Array:()=>CE,toUint32ArrayAsyncIterator:()=>GE,toUint32ArrayIterator:()=>FE,toUint8Array:()=>xE,toUint8ArrayAsyncIterator:()=>UE,toUint8ArrayIterator:()=>NE,toUint8ClampedArray:()=>DE,toUint8ClampedArrayAsyncIterator:()=>JE,toUint8ClampedArrayIterator:()=>RE});const fE=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function pE(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;++cgE(Int8Array,e),vE=e=>gE(Int16Array,e),yE=e=>gE(Int32Array,e),bE=e=>gE(BigInt64Array,e),xE=e=>gE(Uint8Array,e),SE=e=>gE(Uint16Array,e),CE=e=>gE(Uint32Array,e),wE=e=>gE(BigUint64Array,e),TE=e=>gE(Float32Array,e),EE=e=>gE(Float64Array,e),DE=e=>gE(Uint8ClampedArray,e),OE=e=>(e.next(),e);function*kE(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof fE?n(t):sE(t)?t:n(t);return yield*OE(function*(t){let n=null;do n=t.next(yield gE(e,n));while(!n.done)}(r[Symbol.iterator]())),new e}const AE=e=>kE(Int8Array,e),jE=e=>kE(Int16Array,e),ME=e=>kE(Int32Array,e),NE=e=>kE(Uint8Array,e),PE=e=>kE(Uint16Array,e),FE=e=>kE(Uint32Array,e),IE=e=>kE(Float32Array,e),LE=e=>kE(Float64Array,e),RE=e=>kE(Uint8ClampedArray,e);function zE(e,t){return Rh(this,arguments,function*(){if(oE(t))return yield Lh(yield Lh(yield*zh(Bh(zE(e,yield Lh(t))))));let n=function(e){return Rh(this,arguments,function*(){yield yield Lh(yield Lh(e))})},r=function(e){return Rh(this,arguments,function*(){yield Lh(yield*zh(Bh(OE(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 fE?n(t):sE(t)?r(t):cE(t)?t:n(t);return yield Lh(yield*zh(Bh(OE(function(t){return Rh(this,arguments,function*(){let n=null;do n=yield Lh(t.next(yield yield Lh(gE(e,n))));while(!n.done)})}(i[Symbol.asyncIterator]()))))),yield Lh(new e)})}const BE=e=>zE(Int8Array,e),VE=e=>zE(Int16Array,e),HE=e=>zE(Int32Array,e),UE=e=>zE(Uint8Array,e),WE=e=>zE(Uint16Array,e),GE=e=>zE(Uint32Array,e),KE=e=>zE(Float32Array,e),qE=e=>zE(Float64Array,e),JE=e=>zE(Uint8ClampedArray,e);function YE(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(++naD});const iD=void 0;function aD(e){if(e===null)return`null`;if(e===iD)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=>aD(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function oD(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 sD(e,t){return oD(e/t)+oD(e%t)/oD(t)}var cD={};Cn(cD,{BN:()=>bD,bigNumToBigInt:()=>vD,bigNumToNumber:()=>gD,bigNumToString:()=>_D,isArrowBigNumSymbol:()=>lD});const lD=Symbol.for(`isArrowBigNum`);function uD(e,...t){return t.length===0?Object.setPrototypeOf(gE(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}uD.prototype[lD]=!0,uD.prototype.toJSON=function(){return`"${_D(this)}"`},uD.prototype.valueOf=function(e){return gD(this,e)},uD.prototype.toString=function(){return _D(this)},uD.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return gD(this);case`string`:return _D(this);case`default`:return vD(this)}return _D(this)};function dD(...e){return uD.apply(this,e)}function fD(...e){return uD.apply(this,e)}function pD(...e){return uD.apply(this,e)}Object.setPrototypeOf(dD.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(fD.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(pD.prototype,Object.create(Uint32Array.prototype)),Object.assign(dD.prototype,uD.prototype,{constructor:dD,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(fD.prototype,uD.prototype,{constructor:fD,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(pD.prototype,uD.prototype,{constructor:pD,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const mD=BigInt(4294967296)*BigInt(4294967296),hD=mD-BigInt(1);function gD(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=oD(n),a=`${r}`.padStart(t,`0`),o=s&&i===0?`-`:``;return+`${o}${i}.${a}`}return oD(c)}function _D(e){if(e.byteLength===8){let t=new e.BigIntArray(e.buffer,e.byteOffset,1);return`${t[0]}`}if(!e.signed)return yD(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=new Int16Array([t.at(-1)])[0];if(n>=0)return yD(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`))(UD.prototype);var WD=class extends UD{constructor(){super(q.Null)}toString(){return`Null`}};SD=Symbol.toStringTag,WD[SD]=(e=>e[Symbol.toStringTag]=`Null`)(WD.prototype);var GD=class extends UD{constructor(e,t){super(q.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}`}};CD=Symbol.toStringTag,GD[CD]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(GD.prototype);var KD=class extends GD{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},qD=class extends GD{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},JD=class extends GD{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},YD=class extends GD{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},XD=class extends GD{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},ZD=class extends GD{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},QD=class extends GD{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},$D=class extends GD{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(KD.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(qD.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(JD.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(YD.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(XD.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(ZD.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(QD.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty($D.prototype,`ArrayType`,{value:BigUint64Array});var eO=class extends UD{constructor(e){super(q.Float),this.precision=e}get ArrayType(){switch(this.precision){case QE.HALF:return Uint16Array;case QE.SINGLE:return Float32Array;case QE.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};wD=Symbol.toStringTag,eO[wD]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(eO.prototype);var tO=class extends eO{constructor(){super(QE.HALF)}},nO=class extends eO{constructor(){super(QE.SINGLE)}},rO=class extends eO{constructor(){super(QE.DOUBLE)}};Object.defineProperty(tO.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(nO.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(rO.prototype,`ArrayType`,{value:Float64Array});var iO=class extends UD{constructor(){super(q.Binary)}toString(){return`Binary`}};TD=Symbol.toStringTag,iO[TD]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(iO.prototype);var aO=class extends UD{constructor(){super(q.LargeBinary)}toString(){return`LargeBinary`}};ED=Symbol.toStringTag,aO[ED]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(aO.prototype);var oO=class extends UD{constructor(){super(q.Utf8)}toString(){return`Utf8`}};DD=Symbol.toStringTag,oO[DD]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(oO.prototype);var sO=class extends UD{constructor(){super(q.LargeUtf8)}toString(){return`LargeUtf8`}};OD=Symbol.toStringTag,sO[OD]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(sO.prototype);var cO=class extends UD{constructor(){super(q.Bool)}toString(){return`Bool`}};kD=Symbol.toStringTag,cO[kD]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(cO.prototype);var lO=class extends UD{constructor(e,t,n=128){super(q.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};AD=Symbol.toStringTag,lO[AD]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(lO.prototype);var uO=class extends UD{constructor(e){super(q.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${$E[this.unit]}>`}get ArrayType(){return this.unit===$E.DAY?Int32Array:BigInt64Array}};jD=Symbol.toStringTag,uO[jD]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(uO.prototype);var dO=class extends UD{constructor(e,t){super(q.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${eD[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};MD=Symbol.toStringTag,dO[MD]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(dO.prototype);var fO=class extends UD{constructor(e,t){super(q.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${eD[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};ND=Symbol.toStringTag,fO[ND]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(fO.prototype);var pO=class extends UD{constructor(e){super(q.Interval),this.unit=e}toString(){return`Interval<${tD[this.unit]}>`}};PD=Symbol.toStringTag,pO[PD]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(pO.prototype);var mO=class extends UD{constructor(e){super(q.Duration),this.unit=e}toString(){return`Duration<${eD[this.unit]}>`}};FD=Symbol.toStringTag,mO[FD]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(mO.prototype);var hO=class extends UD{constructor(e){super(q.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}};ID=Symbol.toStringTag,hO[ID]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(hO.prototype);var gO=class extends UD{constructor(e){super(q.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};LD=Symbol.toStringTag,gO[LD]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(gO.prototype);var _O=class extends UD{constructor(e,t,n){super(q.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(` | `)}>`}};RD=Symbol.toStringTag,_O[RD]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(_O.prototype);var vO=class extends UD{constructor(e){super(q.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};zD=Symbol.toStringTag,vO[zD]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(vO.prototype);var yO=class extends UD{constructor(e,t){super(q.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}>`}};BD=Symbol.toStringTag,yO[BD]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(yO.prototype);var bO=class extends UD{constructor(e,t=!1){var n,r,i;if(super(q.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(`, `)}}>`}};VD=Symbol.toStringTag,bO[VD]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(bO.prototype);const xO=(e=>()=>++e)(-1);var SO=class extends UD{constructor(e,t,n,r){super(q.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?xO():oD(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}>`}};HD=Symbol.toStringTag,SO[HD]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(SO.prototype);function CO(e){let t=e;switch(e.typeId){case q.Decimal:return e.bitWidth/32;case q.Interval:return t.unit===tD.MONTH_DAY_NANO?4:1+t.unit;case q.FixedSizeList:return t.listSize;case q.FixedSizeBinary:return t.byteWidth;default:return 1}}var wO=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 TO(this,e,t)}getVisitFnByTypeId(e,t=!0){return EO(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 TO(e,t,n=!0){return typeof t==`number`?EO(e,t,n):typeof t==`string`&&t in q?EO(e,q[t],n):t&&t instanceof UD?EO(e,DO(t),n):t?.type&&t.type instanceof UD?EO(e,DO(t.type),n):EO(e,q.NONE,n)}function EO(e,t,n=!0){let r=null;switch(t){case q.Null:r=e.visitNull;break;case q.Bool:r=e.visitBool;break;case q.Int:r=e.visitInt;break;case q.Int8:r=e.visitInt8||e.visitInt;break;case q.Int16:r=e.visitInt16||e.visitInt;break;case q.Int32:r=e.visitInt32||e.visitInt;break;case q.Int64:r=e.visitInt64||e.visitInt;break;case q.Uint8:r=e.visitUint8||e.visitInt;break;case q.Uint16:r=e.visitUint16||e.visitInt;break;case q.Uint32:r=e.visitUint32||e.visitInt;break;case q.Uint64:r=e.visitUint64||e.visitInt;break;case q.Float:r=e.visitFloat;break;case q.Float16:r=e.visitFloat16||e.visitFloat;break;case q.Float32:r=e.visitFloat32||e.visitFloat;break;case q.Float64:r=e.visitFloat64||e.visitFloat;break;case q.Utf8:r=e.visitUtf8;break;case q.LargeUtf8:r=e.visitLargeUtf8;break;case q.Binary:r=e.visitBinary;break;case q.LargeBinary:r=e.visitLargeBinary;break;case q.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case q.Date:r=e.visitDate;break;case q.DateDay:r=e.visitDateDay||e.visitDate;break;case q.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case q.Timestamp:r=e.visitTimestamp;break;case q.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case q.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case q.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case q.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case q.Time:r=e.visitTime;break;case q.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case q.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case q.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case q.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case q.Decimal:r=e.visitDecimal;break;case q.List:r=e.visitList;break;case q.Struct:r=e.visitStruct;break;case q.Union:r=e.visitUnion;break;case q.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case q.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case q.Dictionary:r=e.visitDictionary;break;case q.Interval:r=e.visitInterval;break;case q.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case q.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case q.IntervalMonthDayNano:r=e.visitIntervalMonthDayNano||e.visitInterval;break;case q.Duration:r=e.visitDuration;break;case q.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case q.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case q.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case q.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case q.FixedSizeList:r=e.visitFixedSizeList;break;case q.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${q[t]}'`)}function DO(e){switch(e.typeId){case q.Null:return q.Null;case q.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?q.Int8:q.Uint8;case 16:return n?q.Int16:q.Uint16;case 32:return n?q.Int32:q.Uint32;case 64:return n?q.Int64:q.Uint64}return q.Int}case q.Float:switch(e.precision){case QE.HALF:return q.Float16;case QE.SINGLE:return q.Float32;case QE.DOUBLE:return q.Float64}return q.Float;case q.Binary:return q.Binary;case q.LargeBinary:return q.LargeBinary;case q.Utf8:return q.Utf8;case q.LargeUtf8:return q.LargeUtf8;case q.Bool:return q.Bool;case q.Decimal:return q.Decimal;case q.Time:switch(e.unit){case eD.SECOND:return q.TimeSecond;case eD.MILLISECOND:return q.TimeMillisecond;case eD.MICROSECOND:return q.TimeMicrosecond;case eD.NANOSECOND:return q.TimeNanosecond}return q.Time;case q.Timestamp:switch(e.unit){case eD.SECOND:return q.TimestampSecond;case eD.MILLISECOND:return q.TimestampMillisecond;case eD.MICROSECOND:return q.TimestampMicrosecond;case eD.NANOSECOND:return q.TimestampNanosecond}return q.Timestamp;case q.Date:switch(e.unit){case $E.DAY:return q.DateDay;case $E.MILLISECOND:return q.DateMillisecond}return q.Date;case q.Interval:switch(e.unit){case tD.DAY_TIME:return q.IntervalDayTime;case tD.YEAR_MONTH:return q.IntervalYearMonth;case tD.MONTH_DAY_NANO:return q.IntervalMonthDayNano}return q.Interval;case q.Duration:switch(e.unit){case eD.SECOND:return q.DurationSecond;case eD.MILLISECOND:return q.DurationMillisecond;case eD.MICROSECOND:return q.DurationMicrosecond;case eD.NANOSECOND:return q.DurationNanosecond}return q.Duration;case q.Map:return q.Map;case q.List:return q.List;case q.Struct:return q.Struct;case q.Union:switch(e.mode){case ZE.Dense:return q.DenseUnion;case ZE.Sparse:return q.SparseUnion}return q.Union;case q.FixedSizeBinary:return q.FixedSizeBinary;case q.FixedSizeList:return q.FixedSizeList;case q.Dictionary:return q.Dictionary}throw Error(`Unrecognized type '${q[e.typeId]}'`)}wO.prototype.visitInt8=null,wO.prototype.visitInt16=null,wO.prototype.visitInt32=null,wO.prototype.visitInt64=null,wO.prototype.visitUint8=null,wO.prototype.visitUint16=null,wO.prototype.visitUint32=null,wO.prototype.visitUint64=null,wO.prototype.visitFloat16=null,wO.prototype.visitFloat32=null,wO.prototype.visitFloat64=null,wO.prototype.visitDateDay=null,wO.prototype.visitDateMillisecond=null,wO.prototype.visitTimestampSecond=null,wO.prototype.visitTimestampMillisecond=null,wO.prototype.visitTimestampMicrosecond=null,wO.prototype.visitTimestampNanosecond=null,wO.prototype.visitTimeSecond=null,wO.prototype.visitTimeMillisecond=null,wO.prototype.visitTimeMicrosecond=null,wO.prototype.visitTimeNanosecond=null,wO.prototype.visitDenseUnion=null,wO.prototype.visitSparseUnion=null,wO.prototype.visitIntervalDayTime=null,wO.prototype.visitIntervalYearMonth=null,wO.prototype.visitIntervalMonthDayNano=null,wO.prototype.visitDuration=null,wO.prototype.visitDurationSecond=null,wO.prototype.visitDurationMillisecond=null,wO.prototype.visitDurationMicrosecond=null,wO.prototype.visitDurationNanosecond=null;var OO={};Cn(OO,{float64ToUint16:()=>MO,uint16ToFloat64:()=>jO});const kO=new Float64Array(1),AO=new Uint32Array(kO.buffer);function jO(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 MO(e){if(e!==e)return 32256;kO[0]=e;let t=(AO[1]&2147483648)>>16&65535,n=AO[1]&2146435072,r=0;return n>=1089470464?AO[0]>0?n=31744:(n=(n&2080374784)>>16,r=(AO[1]&1048575)>>10):n<=1056964608?(r=1048576+(AO[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(AO[1]&1048575)+512>>10),t|n|r&65535}var NO=class extends wO{};function PO(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const FO=(e,t,n)=>{e[t]=Math.floor(n/864e5)},IO=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},zO=({values:e},t,n)=>{e[t]=n},BO=({values:e},t,n)=>{e[t]=MO(n)},VO=(e,t,n)=>{switch(e.type.precision){case QE.HALF:return BO(e,t,n);case QE.SINGLE:case QE.DOUBLE:return zO(e,t,n)}},HO=({values:e},t,n)=>{FO(e,t,n.valueOf())},UO=({values:e},t,n)=>{e[t]=BigInt(n)},WO=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},GO=({values:e,valueOffsets:t},n,r)=>IO(e,t,n,r),KO=({values:e,valueOffsets:t},n,r)=>IO(e,t,n,rE(r)),qO=(e,t,n)=>{e.type.unit===$E.DAY?HO(e,t,n):UO(e,t,n)},JO=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},YO=({values:e},t,n)=>{e[t]=BigInt(n)},XO=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},ZO=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},QO=(e,t,n)=>{switch(e.type.unit){case eD.SECOND:return JO(e,t,n);case eD.MILLISECOND:return YO(e,t,n);case eD.MICROSECOND:return XO(e,t,n);case eD.NANOSECOND:return ZO(e,t,n)}},$O=({values:e},t,n)=>{e[t]=n},ek=({values:e},t,n)=>{e[t]=n},tk=({values:e},t,n)=>{e[t]=n},nk=({values:e},t,n)=>{e[t]=n},rk=(e,t,n)=>{switch(e.type.unit){case eD.SECOND:return $O(e,t,n);case eD.MILLISECOND:return ek(e,t,n);case eD.MICROSECOND:return tk(e,t,n);case eD.NANOSECOND:return nk(e,t,n)}},ik=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},ak=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=Ek.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=Ek.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},sk=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),ck=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),lk=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),uk=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),dk=(e,t,n)=>{let r=e.type.children.map(e=>Ek.getVisitFn(e.type)),i=n instanceof Map?lk(t,n):n instanceof kj?ck(t,n):Array.isArray(n)?sk(t,n):uk(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},fk=(e,t,n)=>{e.type.mode===ZE.Dense?pk(e,t,n):mk(e,t,n)},pk=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Ek.visit(i,e.valueOffsets[t],n)},mk=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Ek.visit(i,t,n)},hk=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},gk=(e,t,n)=>{switch(e.type.unit){case tD.YEAR_MONTH:return vk(e,t,n);case tD.DAY_TIME:return _k(e,t,n);case tD.MONTH_DAY_NANO:return yk(e,t,n)}},_k=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},vk=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},yk=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},bk=({values:e},t,n)=>{e[t]=n},xk=({values:e},t,n)=>{e[t]=n},Sk=({values:e},t,n)=>{e[t]=n},Ck=({values:e},t,n)=>{e[t]=n},wk=(e,t,n)=>{switch(e.type.unit){case eD.SECOND:return bk(e,t,n);case eD.MILLISECOND:return xk(e,t,n);case eD.MICROSECOND:return Sk(e,t,n);case eD.NANOSECOND:return Ck(e,t,n)}},Tk=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=Ek.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${aD(e)}: ${aD(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new Ak(this[Dk],this[Ok])}},Ak=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[Dk].type.children.some(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(e[Dk].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[Dk].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=wA.visit(e[Dk].children[n],e[Ok]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[Dk].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(Ek.visit(e[Dk].children[r],e[Ok],n),Reflect.set(e,t,n))}};const Mk=new jk;var Nk=class extends wO{};function Pk(e){return(t,n)=>t.getValid(n)?e(t,n):null}const Fk=(e,t)=>864e5*e[t],Ik=(e,t)=>null,Lk=(e,t,n)=>{if(n+1>=t.length)return null;let r=oD(t[n]),i=oD(t[n+1]);return e.subarray(r,i)},Rk=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<Fk(e,t),Bk=({values:e},t)=>oD(e[t]),Vk=({stride:e,values:t},n)=>t[e*n],Hk=({stride:e,values:t},n)=>jO(t[e*n]),Uk=({values:e},t)=>e[t],Wk=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),Gk=({values:e,valueOffsets:t},n)=>Lk(e,t,n),Kk=({values:e,valueOffsets:t},n)=>{let r=Lk(e,t,n);return r===null?null:tE(r)},qk=({values:e},t)=>e[t],Jk=({type:e,values:t},n)=>e.precision===QE.HALF?jO(t[n]):t[n],Yk=(e,t)=>e.type.unit===$E.DAY?zk(e,t):Bk(e,t),Xk=({values:e},t)=>1e3*oD(e[t]),Zk=({values:e},t)=>oD(e[t]),Qk=({values:e},t)=>sD(e[t],BigInt(1e3)),$k=({values:e},t)=>sD(e[t],BigInt(1e6)),eA=(e,t)=>{switch(e.type.unit){case eD.SECOND:return Xk(e,t);case eD.MILLISECOND:return Zk(e,t);case eD.MICROSECOND:return Qk(e,t);case eD.NANOSECOND:return $k(e,t)}},tA=({values:e},t)=>e[t],nA=({values:e},t)=>e[t],rA=({values:e},t)=>e[t],iA=({values:e},t)=>e[t],aA=(e,t)=>{switch(e.type.unit){case eD.SECOND:return tA(e,t);case eD.MILLISECOND:return nA(e,t);case eD.MICROSECOND:return rA(e,t);case eD.NANOSECOND:return iA(e,t)}},oA=({values:e,stride:t},n)=>bD.decimal(e.subarray(t*n,t*(n+1))),sA=(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 kj([c])},cA=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new kA(o.slice(i,a-i))},lA=(e,t)=>new kk(e,t),uA=(e,t)=>e.type.mode===ZE.Dense?dA(e,t):fA(e,t),dA=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return wA.visit(r,e.valueOffsets[t])},fA=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return wA.visit(r,t)},pA=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},mA=(e,t)=>e.type.unit===tD.MONTH_DAY_NANO?_A(e,t):e.type.unit===tD.DAY_TIME?hA(e,t):gA(e,t),hA=({values:e},t)=>e.subarray(2*t,2*(t+1)),gA=({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},_A=({values:e},t)=>e.subarray(4*t,4*(t+1)),vA=({values:e},t)=>e[t],yA=({values:e},t)=>e[t],bA=({values:e},t)=>e[t],xA=({values:e},t)=>e[t],SA=(e,t)=>{switch(e.type.unit){case eD.SECOND:return vA(e,t);case eD.MILLISECOND:return yA(e,t);case eD.MICROSECOND:return bA(e,t);case eD.NANOSECOND:return xA(e,t)}},CA=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new kj([a])};Nk.prototype.visitNull=Pk(Ik),Nk.prototype.visitBool=Pk(Rk),Nk.prototype.visitInt=Pk(qk),Nk.prototype.visitInt8=Pk(Vk),Nk.prototype.visitInt16=Pk(Vk),Nk.prototype.visitInt32=Pk(Vk),Nk.prototype.visitInt64=Pk(Uk),Nk.prototype.visitUint8=Pk(Vk),Nk.prototype.visitUint16=Pk(Vk),Nk.prototype.visitUint32=Pk(Vk),Nk.prototype.visitUint64=Pk(Uk),Nk.prototype.visitFloat=Pk(Jk),Nk.prototype.visitFloat16=Pk(Hk),Nk.prototype.visitFloat32=Pk(Vk),Nk.prototype.visitFloat64=Pk(Vk),Nk.prototype.visitUtf8=Pk(Kk),Nk.prototype.visitLargeUtf8=Pk(Kk),Nk.prototype.visitBinary=Pk(Gk),Nk.prototype.visitLargeBinary=Pk(Gk),Nk.prototype.visitFixedSizeBinary=Pk(Wk),Nk.prototype.visitDate=Pk(Yk),Nk.prototype.visitDateDay=Pk(zk),Nk.prototype.visitDateMillisecond=Pk(Bk),Nk.prototype.visitTimestamp=Pk(eA),Nk.prototype.visitTimestampSecond=Pk(Xk),Nk.prototype.visitTimestampMillisecond=Pk(Zk),Nk.prototype.visitTimestampMicrosecond=Pk(Qk),Nk.prototype.visitTimestampNanosecond=Pk($k),Nk.prototype.visitTime=Pk(aA),Nk.prototype.visitTimeSecond=Pk(tA),Nk.prototype.visitTimeMillisecond=Pk(nA),Nk.prototype.visitTimeMicrosecond=Pk(rA),Nk.prototype.visitTimeNanosecond=Pk(iA),Nk.prototype.visitDecimal=Pk(oA),Nk.prototype.visitList=Pk(sA),Nk.prototype.visitStruct=Pk(lA),Nk.prototype.visitUnion=Pk(uA),Nk.prototype.visitDenseUnion=Pk(dA),Nk.prototype.visitSparseUnion=Pk(fA),Nk.prototype.visitDictionary=Pk(pA),Nk.prototype.visitInterval=Pk(mA),Nk.prototype.visitIntervalDayTime=Pk(hA),Nk.prototype.visitIntervalYearMonth=Pk(gA),Nk.prototype.visitIntervalMonthDayNano=Pk(_A),Nk.prototype.visitDuration=Pk(SA),Nk.prototype.visitDurationSecond=Pk(vA),Nk.prototype.visitDurationMillisecond=Pk(yA),Nk.prototype.visitDurationMicrosecond=Pk(bA),Nk.prototype.visitDurationNanosecond=Pk(xA),Nk.prototype.visitFixedSizeList=Pk(CA),Nk.prototype.visitMap=Pk(cA);const wA=new Nk,TA=Symbol.for(`keys`),EA=Symbol.for(`vals`),DA=Symbol.for(`kKeysAsStrings`),OA=Symbol.for(`_kKeysAsStrings`);var kA=class{constructor(e){return this[TA]=new kj([e.children[0]]).memoize(),this[EA]=e.children[1],new Proxy(this,new jA)}get[DA](){return this[OA]||(this[OA]=Array.from(this[TA].toArray(),String))}[Symbol.iterator](){return new AA(this[TA],this[EA])}get size(){return this[TA].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[TA],t=this[EA],n={};for(let r=-1,i=e.length;++r`${aD(e)}: ${aD(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},AA=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),wA.visit(this.vals,e)]})}},jA=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[DA]}has(e,t){return e[DA].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[DA].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[DA].indexOf(t);if(n!==-1){let r=wA.visit(Reflect.get(e,EA),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[DA].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(Ek.visit(Reflect.get(e,EA),r,n),Reflect.set(e,t,n))}};Object.defineProperties(kA.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[TA]:{writable:!0,enumerable:!1,configurable:!1,value:null},[EA]:{writable:!0,enumerable:!1,configurable:!1,value:null},[OA]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var MA={};Cn(MA,{clampRange:()=>PA,createElementComparator:()=>LA,wrapIndex:()=>FA});let NA;function PA(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 FA=(e,t)=>e<0?t+e:e,IA=e=>e!==e;function LA(e){let t=typeof e;if(t!==`object`||e===null)return IA(e)?IA: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?XE(e,t):!1:e instanceof Map?zA(e):Array.isArray(e)?RA(e):e instanceof kj?BA(e):VA(e,!0)}function RA(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 UA(e,n);case Map:return GA(e,n,n.keys());case kA:case kk:case Object:case void 0:return GA(e,n,t||Object.keys(n))}return n instanceof kj?WA(e,n):!1}}function UA(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++rQA,getBit:()=>JA,getBool:()=>qA,packBools:()=>ZA,popcnt_array:()=>ej,popcnt_bit_range:()=>$A,popcnt_uint32:()=>tj,setBool:()=>YA,truncateBitmap:()=>XA});function qA(e,t,n,r){return(n&1<>r}function YA(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):ZA(new QA(n,e,t,null,qA)).subarray(0,r)),i}return n}function ZA(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 QA=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 $A(e,t,i)+$A(e,r,n)+ej(e,i>>3,r-i>>3)}function ej(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+=tj(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=tj(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=tj(a.getUint8(i)),i+=1;return r}function tj(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const nj=-1;var rj=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 UD.isSparseUnion(e)||UD.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(UD.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=nj&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-$A(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=CO(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(UD.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===ZE.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(XA(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===q.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(XA(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[nD.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[nD.TYPE])&&(a[nD.TYPE]=i.subarray(e,e+t)),(i=a[nD.OFFSET])&&(a[nD.OFFSET]=i.subarray(e,e+t+1))||(i=a[nD.DATA])&&(a[nD.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};rj.prototype.children=Object.freeze([]);var ij=class e extends wO{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new rj(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=xE(e.data),i=xE(e.nullBitmap),a=yE(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new rj(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=xE(e.data),i=xE(e.nullBitmap),a=bE(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new rj(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=xE(e.data),i=xE(e.nullBitmap),a=yE(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new rj(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=xE(e.data),i=xE(e.nullBitmap),a=bE(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new rj(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=xE(e.nullBitmap),a=yE(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new rj(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=xE(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=gE(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(UD.isSparseUnion(t))return new rj(t,n,a,o,[void 0,void 0,void 0,i],r);let s=yE(e.valueOffsets);return new rj(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=xE(t.nullBitmap),a=gE(n.indices.ArrayType,t.data),{dictionary:o=new kj([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new rj(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new rj(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=xE(t.nullBitmap),{length:o=i.length/CO(n),nullCount:s=t.nullBitmap?-1:0}=t;return new rj(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=xE(t.nullBitmap),o=yE(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new rj(n,r,s,c,[o,void 0,a],[i])}};const aj=new ij;var oj=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 cj(e){return e.reduce((e,t)=>e+t.nullCount,0)}function lj(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function uj(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 dj(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function vj(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new QA(n,e.offset+(t||0),e.length,n,qA)){if(!i)return r;++r}return-1}function yj(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case q.Union:break;case q.Dictionary:break;default:return vj(e,n)}let r=wA.getVisitFn(e),i=LA(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 oj(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new wj(a)})}var wj=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof rj)))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}=Dj[o.typeId],r=a[0];this.isValid=e=>fj(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,Oj[o.typeId]),this._offsets=lj(a);break}this.data=a,this.type=o,this.stride=CO(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 sj(this.data)}get nullCount(){return cj(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${q[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(FA(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return Tj.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(PA(this,t,n,({data:e,_offsets:t},n,r)=>uj(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case q.Int:case q.Float:case q.Decimal:case q.Time:case q.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 UD.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(UD.isDictionary(this.type)){let t=new Aj(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new Aj(this)}unmemoize(){if(UD.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}};Ej=Symbol.toStringTag,kj[Ej]=(e=>{e.type=UD.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(q).map(e=>q[e]).filter(e=>typeof e==`number`&&e!==q.NONE);for(let n of t){let t=wA.getVisitFnByTypeId(n),r=Ek.getVisitFnByTypeId(n),i=xj.getVisitFnByTypeId(n);Dj[n]={get:t,set:r,indexOf:i},Oj[n]=Object.create(e,{isValid:{value:pj(fj)},get:{value:pj(wA.getVisitFnByTypeId(n))},set:{value:mj(Ek.getVisitFnByTypeId(n))},indexOf:{value:hj(xj.getVisitFnByTypeId(n))}})}return`Vector`})(kj.prototype);var Aj=class e extends kj{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 kj(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},jj={};Cn(jj,{BaseInt64:()=>Ij,Int128:()=>zj,Int64:()=>Rj,Uint64:()=>Lj});const Mj=65536;function Nj(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const Pj=8,Fj=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];var Ij=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`${Nj(this.buffer[3])} ${Nj(this.buffer[2])} ${Nj(this.buffer[1])} ${Nj(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;nVj,toIntervalDayTimeObjects:()=>Uj,toIntervalMonthDayNanoInt32Array:()=>Hj,toIntervalMonthDayNanoObjects:()=>Wj});function Vj(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 Uj(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 Gj=class extends wO{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 Kj(e,t){return t instanceof e.constructor}function qj(e,t){return e===t||Kj(e,t)}function Jj(e,t){return e===t||Kj(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function Yj(e,t){return e===t||Kj(e,t)&&e.precision===t.precision}function Xj(e,t){return e===t||Kj(e,t)&&e.byteWidth===t.byteWidth}function Zj(e,t){return e===t||Kj(e,t)&&e.unit===t.unit}function Qj(e,t){return e===t||Kj(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function $j(e,t){return e===t||Kj(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function eM(e,t){return e===t||Kj(e,t)&&e.children.length===t.children.length&&cM.compareManyFields(e.children,t.children)}function tM(e,t){return e===t||Kj(e,t)&&e.children.length===t.children.length&&cM.compareManyFields(e.children,t.children)}function nM(e,t){return e===t||Kj(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&cM.compareManyFields(e.children,t.children)}function rM(e,t){return e===t||Kj(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&cM.visit(e.indices,t.indices)&&cM.visit(e.dictionary,t.dictionary)}function iM(e,t){return e===t||Kj(e,t)&&e.unit===t.unit}function aM(e,t){return e===t||Kj(e,t)&&e.unit===t.unit}function oM(e,t){return e===t||Kj(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&cM.compareManyFields(e.children,t.children)}function sM(e,t){return e===t||Kj(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&cM.compareManyFields(e.children,t.children)}Gj.prototype.visitNull=qj,Gj.prototype.visitBool=qj,Gj.prototype.visitInt=Jj,Gj.prototype.visitInt8=Jj,Gj.prototype.visitInt16=Jj,Gj.prototype.visitInt32=Jj,Gj.prototype.visitInt64=Jj,Gj.prototype.visitUint8=Jj,Gj.prototype.visitUint16=Jj,Gj.prototype.visitUint32=Jj,Gj.prototype.visitUint64=Jj,Gj.prototype.visitFloat=Yj,Gj.prototype.visitFloat16=Yj,Gj.prototype.visitFloat32=Yj,Gj.prototype.visitFloat64=Yj,Gj.prototype.visitUtf8=qj,Gj.prototype.visitLargeUtf8=qj,Gj.prototype.visitBinary=qj,Gj.prototype.visitLargeBinary=qj,Gj.prototype.visitFixedSizeBinary=Xj,Gj.prototype.visitDate=Zj,Gj.prototype.visitDateDay=Zj,Gj.prototype.visitDateMillisecond=Zj,Gj.prototype.visitTimestamp=Qj,Gj.prototype.visitTimestampSecond=Qj,Gj.prototype.visitTimestampMillisecond=Qj,Gj.prototype.visitTimestampMicrosecond=Qj,Gj.prototype.visitTimestampNanosecond=Qj,Gj.prototype.visitTime=$j,Gj.prototype.visitTimeSecond=$j,Gj.prototype.visitTimeMillisecond=$j,Gj.prototype.visitTimeMicrosecond=$j,Gj.prototype.visitTimeNanosecond=$j,Gj.prototype.visitDecimal=qj,Gj.prototype.visitList=eM,Gj.prototype.visitStruct=tM,Gj.prototype.visitUnion=nM,Gj.prototype.visitDenseUnion=nM,Gj.prototype.visitSparseUnion=nM,Gj.prototype.visitDictionary=rM,Gj.prototype.visitInterval=iM,Gj.prototype.visitIntervalDayTime=iM,Gj.prototype.visitIntervalYearMonth=iM,Gj.prototype.visitIntervalMonthDayNano=iM,Gj.prototype.visitDuration=aM,Gj.prototype.visitDurationSecond=aM,Gj.prototype.visitDurationMillisecond=aM,Gj.prototype.visitDurationMicrosecond=aM,Gj.prototype.visitDurationNanosecond=aM,Gj.prototype.visitFixedSizeList=oM,Gj.prototype.visitMap=sM;const cM=new Gj;function lM(e,t){return cM.compareSchemas(e,t)}function uM(e,t){return cM.compareFields(e,t)}function dM(e,t){return cM.visit(e,t)}const fM=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},cD),jj),KA),OO),dE),MA),rD),Bj),{compareSchemas:lM,compareFields:uM,compareTypes:dM}),pM=365.2425,mM=10**8*24*60*60*1e3,hM=6048e5,gM=864e5,_M=3600,vM=_M*24,yM=vM*7,bM=vM*pM,xM=bM/12,SM=xM*3,CM=Symbol.for(`constructDateFrom`);function wM(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&CM in e?e[CM](t):e instanceof Date?new e.constructor(t):new Date(t)}function TM(e,t){return wM(t||e,e)}let EM={};function DM(){return EM}function OM(e,t){let n=DM(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=TM(e,t?.in),a=i.getDay(),o=(a=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function jM(e){let t=TM(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 MM(e,...t){let n=wM.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function NM(e,t){let n=TM(e,t?.in);return n.setHours(0,0,0,0),n}function PM(e,t,n){let[r,i]=MM(n?.in,e,t),a=NM(r),o=NM(i),s=+a-jM(a),c=+o-jM(o);return Math.round((s-c)/gM)}function FM(e,t){let n=AM(e,t),r=wM(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),kM(r)}function IM(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function LM(e){return!(!IM(e)&&typeof e!=`number`||isNaN(+TM(e)))}function RM(e,t){let n=TM(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const zM={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`}},BM=(e,t,n)=>{let r,i=zM[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 VM(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}const HM={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},UM={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},WM={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},GM={date:VM({formats:HM,defaultWidth:`full`}),time:VM({formats:UM,defaultWidth:`full`}),dateTime:VM({formats:WM,defaultWidth:`full`})},KM={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},qM=(e,t,n,r)=>KM[e];function JM(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 YM={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},XM={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},ZM={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`]},QM={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`]},$M={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`}},eN={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`}},tN=(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`},nN={ordinalNumber:tN,era:JM({values:YM,defaultWidth:`wide`}),quarter:JM({values:XM,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:JM({values:ZM,defaultWidth:`wide`}),day:JM({values:QM,defaultWidth:`wide`}),dayPeriod:JM({values:$M,defaultWidth:`wide`,formattingValues:eN,defaultFormattingWidth:`wide`})};function rN(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)?aN(s,e=>e.test(o)):iN(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 iN(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function aN(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 sN=/^(\d+)(th|st|nd|rd)?/i,cN=/\d+/i,lN={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},uN={any:[/^b/i,/^(a|c)/i]},dN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fN={any:[/1/i,/2/i,/3/i,/4/i]},pN={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},mN={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]},hN={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},gN={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]},_N={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},vN={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}},yN={ordinalNumber:oN({matchPattern:sN,parsePattern:cN,valueCallback:e=>parseInt(e,10)}),era:rN({matchPatterns:lN,defaultMatchWidth:`wide`,parsePatterns:uN,defaultParseWidth:`any`}),quarter:rN({matchPatterns:dN,defaultMatchWidth:`wide`,parsePatterns:fN,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:rN({matchPatterns:pN,defaultMatchWidth:`wide`,parsePatterns:mN,defaultParseWidth:`any`}),day:rN({matchPatterns:hN,defaultMatchWidth:`wide`,parsePatterns:gN,defaultParseWidth:`any`}),dayPeriod:rN({matchPatterns:_N,defaultMatchWidth:`any`,parsePatterns:vN,defaultParseWidth:`any`})},bN={code:`en-US`,formatDistance:BM,formatLong:GM,formatRelative:qM,localize:nN,match:yN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function xN(e,t){let n=TM(e,t?.in),r=PM(n,RM(n)),i=r+1;return i}function SN(e,t){let n=TM(e,t?.in),r=kM(n)-+FM(n);return Math.round(r/hM)+1}function CN(e,t){let n=TM(e,t?.in),r=n.getFullYear(),i=DM(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=wM(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=OM(o,t),c=wM(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=OM(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function wN(e,t){let n=DM(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=CN(e,t),a=wM(t?.in||e,0);a.setFullYear(i,0,r),a.setHours(0,0,0,0);let o=OM(a,t);return o}function TN(e,t){let n=TM(e,t?.in),r=OM(n,t)-+wN(n,t);return Math.round(r/hM)+1}function EN(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString().padStart(t,`0`);return n+r}const DN={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return EN(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):EN(n+1,2)},d(e,t){return EN(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 EN(e.getHours()%12||12,t.length)},H(e,t){return EN(e.getHours(),t.length)},m(e,t){return EN(e.getMinutes(),t.length)},s(e,t){return EN(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*10**(n-3));return EN(i,t.length)}},ON={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},kN={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 DN.y(e,t)},Y:function(e,t,n,r){let i=CN(e,r),a=i>0?i:1-i;if(t===`YY`){let e=a%100;return EN(e,2)}return t===`Yo`?n.ordinalNumber(a,{unit:`year`}):EN(a,t.length)},R:function(e,t){let n=AM(e);return EN(n,t.length)},u:function(e,t){let n=e.getFullYear();return EN(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 EN(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 EN(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 DN.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 EN(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=TN(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):EN(i,t.length)},I:function(e,t,n){let r=SN(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):EN(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):DN.d(e,t)},D:function(e,t,n){let r=xN(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):EN(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 EN(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 EN(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 EN(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?ON.noon:r===0?ON.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?ON.evening:r>=12?ON.afternoon:r>=4?ON.morning:ON.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 DN.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):DN.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):EN(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):EN(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):DN.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):DN.s(e,t)},S:function(e,t){return DN.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return jN(r);case`XXXX`:case`XX`:return MN(r);case`XXXXX`:case`XXX`:default:return MN(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return jN(r);case`xxxx`:case`xx`:return MN(r);case`xxxxx`:case`xxx`:default:return MN(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+AN(r,`:`);case`OOOO`:default:return`GMT`+MN(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+AN(r,`:`);case`zzzz`:default:return`GMT`+MN(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return EN(r,t.length)},T:function(e,t,n){return EN(+e,t.length)}};function AN(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+EN(a,2)}function jN(e,t){if(e%60==0){let t=e>0?`-`:`+`;return t+EN(Math.abs(e)/60,2)}return MN(e,t)}function MN(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=EN(Math.trunc(r/60),2),a=EN(r%60,2);return n+i+t+a}const NN=(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`})}},PN=(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`})}},FN=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return NN(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}}`,NN(r,t)).replace(`{{time}}`,PN(i,t))},IN={p:PN,P:FN},LN=/^D+$/,RN=/^Y+$/,zN=[`D`,`DD`,`YY`,`YYYY`];function BN(e){return LN.test(e)}function VN(e){return RN.test(e)}function HN(e,t,n){let r=UN(e,t,n);if(console.warn(r),zN.includes(e))throw RangeError(r)}function UN(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 WN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,GN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,KN=/^'([^]*?)'?$/,qN=/''/g,JN=/[a-zA-Z]/;function YN(e,t,n){let r=DM(),i=n?.locale??r.locale??bN,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=TM(e,n?.in);if(!LM(s))throw RangeError(`Invalid time value`);let c=t.match(GN).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=IN[t];return n(e,i.formatLong)}return e}).join(``).match(WN).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:XN(e)};if(kN[t])return{isToken:!0,value:e};if(t.match(JN))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&VN(a)||!n?.useAdditionalDayOfYearTokens&&BN(a))&&HN(a,t,String(e));let o=kN[a[0]];return o(s,a,i.localize,l)}).join(``)}function XN(e){let t=e.match(KN);return t?t[1].replace(qN,`'`):e}function ZN(e,t){return TM(e*1e3,t?.in)}function QN(e,t){let n=$N(t)?new t(0):wM(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function $N(e){return typeof e==`function`&&e.prototype?.constructor===e}function eP(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 tP(e){return e==null}function nP(e){return e!=null}async function rP(){if(typeof window<`u`&&window!==null)return`browser`;try{let e=await b(()=>import(`./__vite-browser-external-Dcc0vk0T.js`).then(wn(1)),__vite__mapDeps([0,1,2]));return e!==void 0&&e.versions!=null&&e.versions.node!=null?`node`:`unknown`}catch{return`unknown`}}function iP(e){return tP(e)?!1:UD.isInt(e.type)&&!uP(e)||aP(e)}function aP(e){return tP(e)?!1:UD.isInt(e.type)&&e.type.isSigned===!1}function oP(e){return tP(e)?!1:UD.isFloat(e.type)??!1}function sP(e){return tP(e)?!1:UD.isDecimal(e.type)}function cP(e){return tP(e)?!1:UD.isBool(e.type)}function lP(e){return tP(e)?!1:UD.isDuration(e.type)}function uP(e){return tP(e)?!1:UD.isInt(e.type)&&e.metadata.get(`ARROW:extension:name`)===`period`}function dP(e){return tP(e)?!1:UD.isTimestamp(e.type)}function fP(e){return tP(e)?!1:UD.isDate(e.type)}function pP(e){return tP(e)?!1:UD.isTime(e.type)}function mP(e){return tP(e)?!1:UD.isList(e.type)||UD.isFixedSizeList(e.type)}function hP(e){return tP(e)?!1:UD.isStruct(e.type)||UD.isMap(e.type)}function gP(e){return tP(e)?!1:UD.isStruct(e.type)&&e.metadata.get(`ARROW:extension:name`)===`interval`||UD.isInterval(e.type)}const _P=new Date(1970,0,1);function vP(e,t){let n;if(t===eD.MILLISECOND)n=1e3;else if(t===eD.MICROSECOND)n=1e3*1e3;else if(t===eD.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 yP(e,t){let n=vP(e,t?.type?.unit??eD.SECOND);return ZN(n)}function bP(e,t){let n=yP(e,t);return YN(n,n.getMilliseconds()===0?`HH:mm:ss`:`HH:mm:ss.SSS`)}function xP(e){let t=`yyyy-MM-dd`;return e instanceof Date||typeof e==`number`&&Number.isFinite(e)?YN(e,t):(console.warn(`Unsupported date value: ${e}`),String(e))}function SP(e,t){if(!(e instanceof Date||typeof e==`number`&&Number.isFinite(e)))return console.warn(`Unsupported datetime value: ${e}`),null;let n,r=t?.type?.timezone;return n=r?new qT(e,r):new qT(e),QN(n,Date)}function CP(e,t){let n=t?.type?.scale||0,r=fM.bigNumToString(new fM.BN(e)).padStart(n,`0`);if(n===0)return r;let i=``;r.startsWith(`-`)&&(i=`-`,r=r.slice(1));let a=r.slice(0,-n)||`0`,o=eP(r.slice(-n),`0`)||``;return`${i}${a}${o?`.${o}`:``}`}const wP=new Intl.NumberFormat(`en-US`,{style:`decimal`,maximumFractionDigits:4,minimumFractionDigits:4,useGrouping:!0});function TP(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 EP(e,t){if(UD.isInterval(t?.type))return TP(e);let n=t&&t.metadata.get(`ARROW:extension:name`);if(n&&n===`pandas.interval`){let n=JSON.parse(t.metadata.get(`ARROW:extension:metadata`)),{closed:r}=n,i=e.toJSON(),a=r===`both`||r===`left`?`[`:`(`,o=r===`both`||r===`right`?`]`:`)`,s=OP(i.left,t.type?.children?.[0]),c=OP(i.right,t.type?.children?.[1]);return`${a+s}, ${c+o}`}return String(e)}function DP(e,t){return t?.type instanceof gO?JSON.parse(JSON.stringify(e,(e,t)=>{if(nP(t))return typeof t==`bigint`?Number(t):t})):JSON.parse(JSON.stringify(e,(e,t)=>typeof t==`bigint`?Number(t):t))}function OP(e,t){if(tP(e))return null;let n=e instanceof Date||Number.isFinite(e);if(n&&fP(t))return xP(e);if(typeof e==`bigint`&&pP(t))return bP(Number(e),t);if(n&&dP(t))return SP(e,t);if(uP(t))throw Error(`Period type is not supported yet`);if(gP(t))return EP(e,t);if(lP(t))throw Error(`Duration type is not supported yet`);return sP(t)?CP(e,t):oP(t)&&Number.isFinite(e)||iP(t)?e:hP(t)||mP(t)?DP(e,t):cP(t)?!!e:String(e)}function kP(e){let t=(e.toArray()||[]).map(e=>e.toJSON())||[],n=t.map(t=>(e.schema.fields.forEach(e=>t[e.name]=OP(t[e.name],e)),t));return n}let AP=function(e){return e.ORIGIN_PRIVATE_FS=`origin-private-fs`,e.NODE_FS=`node-fs`,e}({});async function jP(e){let t=re(e,{logger:!1}),n,r,i=await rP();if(i===`browser`){if(t.bundles===void 0){let{getBundles:e}=await b(async()=>{let{getBundles:e}=await import(`./default-browser-CICL74Rl.js`);return{getBundles:e}},[]);t.bundles=await e()}r=await zT(await t.bundles),n=new Worker(r.mainWorker)}else if(i===`node`){if(t.bundles===void 0){let{getBundles:e}=await b(async()=>{let{getBundles:e}=await import(`./default-node-C2t2tqcG.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]));t.bundles=await e()}r=await zT(await t.bundles);let e=r.mainWorker;e.startsWith(`/@fs/`)&&(e=e.replace(`/@fs/`,`file://`));let i=await b(()=>import(`./browser-DAWwZmxu.js`),[]);n=new i.default(e,{type:`module`})}else throw Error(`Unsupported environment: ${i}`);let a;a=t.logger===!0?new rT:t.logger===!1?new nT:t.logger;let o=new mT(a,n);if(await o.instantiate(r.mainModule,r.pthreadWorker),t.storage)switch(t.storage.type){case AP.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 AP.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:kP(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:kP(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 MP(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 NP(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 J=Symbol.for(`drizzle:entityKind`),PP=Symbol.for(`drizzle:hasOwnEntityKind`);function Y(e,t){if(!e||typeof e!=`object`)return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,J))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(J in n&&n[J]===t[J])return!0;n=Object.getPrototypeOf(n)}return!1}var FP=class{constructor(e,t){this.table=e,this.config=t,this.name=t.name,this.keyAsName=t.keyAsName,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.onUpdateFn=t.onUpdateFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType,this.generated=t.generated,this.generatedIdentity=t.generatedIdentity}static[J]=`Column`;name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!==`byDefault`}},IP=class{static[J]=`ColumnBuilder`;config;constructor(e,t,n){this.config={name:e,keyAsName:e===``,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:t,columnType:n,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}$default=this.$defaultFn;$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===``&&(this.config.name=e)}};const LP=Symbol.for(`drizzle:Name`);var RP=class{static[J]=`PgForeignKeyBuilder`;reference;_onUpdate=`no action`;_onDelete=`no action`;constructor(e,t){this.reference=()=>{let{name:t,columns:n,foreignColumns:r}=e();return{name:t,columns:n,foreignTable:r[0].table,foreignColumns:r}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.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 zP(e,this)}},zP=class{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static[J]=`PgForeignKey`;reference;onUpdate;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[LP],...r,n[0].table[LP],...i];return e??`${a.join(`_`)}_fk`}};function BP(e,...t){return e(...t)}function VP(e,t){return`${e[LP]}_${t.join(`_`)}_unique`}var HP=class{constructor(e,t){this.name=t,this.columns=e}static[J]=`PgUniqueConstraintBuilder`;columns;nullsNotDistinctConfig=!1;nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(e){return new WP(e,this.columns,this.nullsNotDistinctConfig,this.name)}},UP=class{static[J]=`PgUniqueOnConstraintBuilder`;name;constructor(e){this.name=e}on(...e){return new HP(e,this.name)}},WP=class{constructor(e,t,n,r){this.table=e,this.columns=t,this.name=r??VP(this.table,this.columns.map(e=>e.name)),this.nullsNotDistinct=n}static[J]=`PgUniqueConstraint`;columns;name;nullsNotDistinct=!1;getName(){return this.name}};function GP(e,t,n){for(let r=t;rArray.isArray(e)?JP(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var YP=class extends IP{foreignKeyConfigs=[];static[J]=`PgColumnBuilder`;array(e){return new $P(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})=>BP((n,r)=>{let i=new RP(()=>{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 ZP(e,this.config)}},XP=class extends FP{constructor(e,t){t.uniqueName||=VP(e,[t.name]),super(e,t),this.table=e}static[J]=`PgColumn`},ZP=class extends XP{static[J]=`ExtraConfigColumn`;getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??`asc`,nulls:this.config.nulls??`last`,opClass:this.config.opClass};defaultConfig={order:`asc`,nulls:`last`,opClass:void 0};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}},QP=class{static[J]=`IndexedColumn`;constructor(e,t,n,r){this.name=e,this.keyAsName=t,this.type=n,this.indexConfig=r}name;keyAsName;type;indexConfig},$P=class extends YP{static[J]=`PgArrayBuilder`;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 eF(e,this.config,t)}},eF=class e extends XP{constructor(e,t,n,r){super(e,t),this.baseColumn=n,this.range=r,this.size=t.size}size;static[J]=`PgArray`;getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==`number`?this.size:``}]`}mapFromDriverValue(e){return typeof e==`string`&&(e=qP(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(t,n=!1){let r=t.map(t=>t===null?null:Y(this.baseColumn,e)?this.baseColumn.mapToDriverValue(t,!0):this.baseColumn.mapToDriverValue(t));return n?r:JP(r)}},tF=class extends YP{static[J]=`PgEnumObjectColumnBuilder`;constructor(e,t){super(e,`string`,`PgEnumObjectColumn`),this.config.enum=t}build(e){return new nF(e,this.config)}},nF=class extends XP{static[J]=`PgEnumObjectColumn`;enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}};const rF=Symbol.for(`drizzle:isPgEnum`);function iF(e){return!!e&&typeof e==`function`&&rF in e&&e[rF]===!0}var aF=class extends YP{static[J]=`PgEnumColumnBuilder`;constructor(e,t){super(e,`string`,`PgEnumColumn`),this.config.enum=t}build(e){return new oF(e,this.config)}},oF=class extends XP{static[J]=`PgEnumColumn`;enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}},sF=class{static[J]=`Subquery`;constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},cF=class extends sF{static[J]=`WithSubquery`},lF=`0.44.2`;let uF,dF;const fF={startActiveSpan(e,t){return uF?(dF||=uF.trace.getTracer(`drizzle-orm`,lF),BP((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()}}),uF,dF)):t()}},pF=Symbol.for(`drizzle:ViewBaseConfig`),mF=Symbol.for(`drizzle:Schema`),hF=Symbol.for(`drizzle:Columns`),gF=Symbol.for(`drizzle:ExtraConfigColumns`),_F=Symbol.for(`drizzle:OriginalName`),vF=Symbol.for(`drizzle:BaseName`),yF=Symbol.for(`drizzle:IsAlias`),bF=Symbol.for(`drizzle:ExtraConfigBuilder`),xF=Symbol.for(`drizzle:IsDrizzleTable`);var X=class{static[J]=`Table`;static Symbol={Name:LP,Schema:mF,OriginalName:_F,Columns:hF,ExtraConfigColumns:gF,BaseName:vF,IsAlias:yF,ExtraConfigBuilder:bF};[LP];[_F];[mF];[hF];[gF];[vF];[yF]=!1;[xF]=!0;[bF]=void 0;constructor(e,t,n){this[LP]=this[_F]=e,this[mF]=t,this[vF]=n}};function SF(e){return e[LP]}function CF(e){return`${e[mF]??`public`}.${e[LP]}`}var wF=class{static[J]=`FakePrimitiveParam`};function TF(e){return e!=null&&typeof e.getSQL==`function`}function EF(e){let t={sql:``,params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||=[],t.typings.push(...n.typings));return t}var DF=class{static[J]=`StringChunk`;value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new OF([this])}},OF=class e{constructor(e){this.queryChunks=e;for(let t of e)if(Y(t,X)){let e=t[X.Symbol.Schema];this.usedTables.push(e===void 0?t[X.Symbol.Name]:e+`.`+t[X.Symbol.Name])}}static[J]=`SQL`;decoder=jF;shouldInlineParams=!1;usedTables=[];append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return fF.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(t,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 EF(t.map(t=>{if(Y(t,DF))return{sql:t.value.join(``),params:[]};if(Y(t,kF))return{sql:a(t.value),params:[]};if(t===void 0)return{sql:``,params:[]};if(Array.isArray(t)){let e=[new DF(`(`)];for(let[n,r]of t.entries())e.push(r),ne},MF={mapToDriverValue:e=>e},NF={...jF,...MF};var PF=class{constructor(e,t=MF){this.value=e,this.encoder=t}static[J]=`Param`;brand;getSQL(){return new OF([this])}};function Z(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new DF(e[0]));for(let[r,i]of t.entries())n.push(i,new DF(e[r+1]));return new OF(n)}(e=>{function t(){return new OF([])}e.empty=t;function n(e){return new OF(e)}e.fromList=n;function r(e){return new OF([new DF(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 OF(n)}e.join=i;function a(e){return new kF(e)}e.identifier=a;function o(e){return new FF(e)}e.placeholder=o;function s(e,t){return new PF(e,t)}e.param=s})(Z||={}),(e=>{class t{constructor(e,t){this.sql=e,this.fieldAlias=t}static[J]=`SQL.Aliased`;isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(OF||={});var FF=class{constructor(e){this.name=e}static[J]=`Placeholder`;getSQL(){return new OF([this])}};function IF(e,t){return e.map(e=>{if(Y(e,FF)){if(!(e.name in t))throw Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(Y(e,PF)&&Y(e.value,FF)){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 LF=Symbol.for(`drizzle:IsDrizzleView`);var RF=class{static[J]=`View`;[pF];[LF]=!0;constructor({name:e,schema:t,selectedFields:n,query:r}){this[pF]={name:e,originalName:e,schema:t,selectedFields:n,query:r,isExisting:!r,isAlias:!1}}getSQL(){return new OF([this])}};FP.prototype.getSQL=function(){return new OF([this])},X.prototype.getSQL=function(){return new OF([this])},sF.prototype.getSQL=function(){return new OF([this])};var zF=class{constructor(e){this.table=e}static[J]=`ColumnAliasProxyHandler`;get(e,t){return t===`table`?this.table:e[t]}},BF=class{constructor(e,t){this.alias=e,this.replaceOriginalName=t}static[J]=`TableAliasProxyHandler`;get(e,t){if(t===X.Symbol.IsAlias)return!0;if(t===X.Symbol.Name||this.replaceOriginalName&&t===X.Symbol.OriginalName)return this.alias;if(t===pF)return{...e[pF],name:this.alias,isAlias:!0};if(t===X.Symbol.Columns){let t=e[X.Symbol.Columns];if(!t)return t;let n={};return Object.keys(t).map(r=>{n[r]=new Proxy(t[r],new zF(new Proxy(e,this)))}),n}let n=e[t];return Y(n,FP)?new Proxy(n,new zF(new Proxy(e,this))):n}},VF=class{constructor(e){this.alias=e}static[J]=`RelationTableAliasProxyHandler`;get(e,t){return t===`sourceTable`?HF(e.sourceTable,this.alias):e[t]}};function HF(e,t){return new Proxy(e,new BF(t,!1))}function UF(e,t){return new Proxy(e,new zF(new Proxy(e.table,new BF(t,!1))))}function WF(e,t){return new OF.Aliased(GF(e.sql,t),e.fieldAlias)}function GF(e,t){return Z.join(e.queryChunks.map(e=>Y(e,FP)?UF(e,t):Y(e,OF)?GF(e,t):Y(e,OF.Aliased)?WF(e,t):e))}var KF=class extends Error{static[J]=`DrizzleError`;constructor({message:e,cause:t}){super(e),this.name=`DrizzleError`,this.cause=t}},qF=class extends KF{static[J]=`TransactionRollbackError`;constructor(){super({message:`Rollback`})}},JF=class{static[J]=`ConsoleLogWriter`;write(e){console.log(e)}},YF=class{static[J]=`DefaultLogger`;writer;constructor(e){this.writer=e?.writer??new JF}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}`)}},XF=class{static[J]=`NoopLogger`;logQuery(){}},ZF=class{static[J]=`QueryPromise`;[Symbol.toStringTag]=`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)}};function QF(e,t){return Object.entries(e).reduce((e,[n,r])=>{if(typeof n!=`string`)return e;let i=t?[...t,n]:[n];return Y(r,FP)||Y(r,OF)||Y(r,OF.Aliased)?e.push({path:i,field:r}):Y(r,X)?e.push(...QF(r[X.Symbol.Columns],i)):e.push(...QF(r,i)),e},[])}function $F(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 eI(e,t){let n=Object.entries(t).filter(([,e])=>e!==void 0).map(([t,n])=>Y(n,OF)||Y(n,FP)?[t,n]:[t,new PF(n,e[X.Symbol.Columns][t])]);if(n.length===0)throw Error(`No values to set`);return Object.fromEntries(n)}function tI(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 nI(e){return e[X.Symbol.Columns]}function rI(e){return Y(e,sF)?e._.alias:Y(e,RF)?e[pF].name:Y(e,OF)?void 0:e[X.Symbol.IsAlias]?e[X.Symbol.Name]:e[X.Symbol.BaseName]}function iI(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 aI=class extends YP{static[J]=`PgDateColumnBaseBuilder`;defaultNow(){return this.default(Z`now()`)}},oI=class extends aI{static[J]=`PgDateBuilder`;constructor(e){super(e,`date`,`PgDate`)}build(e){return new sI(e,this.config)}},sI=class extends XP{static[J]=`PgDate`;getSQLType(){return`date`}mapFromDriverValue(e){return new Date(e)}mapToDriverValue(e){return e.toISOString()}},cI=class extends aI{static[J]=`PgDateStringBuilder`;constructor(e){super(e,`string`,`PgDateString`)}build(e){return new lI(e,this.config)}},lI=class extends XP{static[J]=`PgDateString`;getSQLType(){return`date`}},uI=class extends YP{static[J]=`PgJsonBuilder`;constructor(e){super(e,`json`,`PgJson`)}build(e){return new dI(e,this.config)}},dI=class extends XP{static[J]=`PgJson`;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}},fI=class extends YP{static[J]=`PgJsonbBuilder`;constructor(e){super(e,`json`,`PgJsonb`)}build(e){return new pI(e,this.config)}},pI=class extends XP{static[J]=`PgJsonb`;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}},mI=class extends YP{static[J]=`PgNumericBuilder`;constructor(e,t,n){super(e,`string`,`PgNumeric`),this.config.precision=t,this.config.scale=n}build(e){return new hI(e,this.config)}},hI=class extends XP{static[J]=`PgNumeric`;precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.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})`}},gI=class extends YP{static[J]=`PgNumericNumberBuilder`;constructor(e,t,n){super(e,`number`,`PgNumericNumber`),this.config.precision=t,this.config.scale=n}build(e){return new _I(e,this.config)}},_I=class extends XP{static[J]=`PgNumericNumber`;precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return typeof e==`number`?e:Number(e)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},vI=class extends YP{static[J]=`PgNumericBigIntBuilder`;constructor(e,t,n){super(e,`bigint`,`PgNumericBigInt`),this.config.precision=t,this.config.scale=n}build(e){return new yI(e,this.config)}},yI=class extends XP{static[J]=`PgNumericBigInt`;precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},bI=class extends aI{constructor(e,t,n){super(e,`string`,`PgTime`),this.withTimezone=t,this.precision=n,this.config.withTimezone=t,this.config.precision=n}static[J]=`PgTimeBuilder`;build(e){return new xI(e,this.config)}},xI=class extends XP{static[J]=`PgTime`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`time${e}${this.withTimezone?` with time zone`:``}`}},SI=class extends aI{static[J]=`PgTimestampBuilder`;constructor(e,t,n){super(e,`date`,`PgTimestamp`),this.config.withTimezone=t,this.config.precision=n}build(e){return new CI(e,this.config)}},CI=class extends XP{static[J]=`PgTimestamp`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=this.precision===void 0?``:` (${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}mapFromDriverValue=e=>new Date(this.withTimezone?e:e+`+0000`);mapToDriverValue=e=>e.toISOString()},wI=class extends aI{static[J]=`PgTimestampStringBuilder`;constructor(e,t,n){super(e,`string`,`PgTimestampString`),this.config.withTimezone=t,this.config.precision=n}build(e){return new TI(e,this.config)}},TI=class extends XP{static[J]=`PgTimestampString`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},EI=class extends YP{static[J]=`PgUUIDBuilder`;constructor(e){super(e,`string`,`PgUUID`)}defaultRandom(){return this.default(Z`gen_random_uuid()`)}build(e){return new DI(e,this.config)}},DI=class extends XP{static[J]=`PgUUID`;getSQLType(){return`uuid`}};const OI=Symbol.for(`drizzle:PgInlineForeignKeys`),kI=Symbol.for(`drizzle:EnableRLS`);var AI=class extends X{static[J]=`PgTable`;static Symbol=Object.assign({},X.Symbol,{InlineForeignKeys:OI,EnableRLS:kI});[OI]=[];[kI]=!1;[X.Symbol.ExtraConfigBuilder]=void 0;[X.Symbol.ExtraConfigColumns]={}},jI=class{static[J]=`PgPrimaryKeyBuilder`;columns;name;constructor(e,t){this.columns=e,this.name=t}build(e){return new MI(e,this.columns,this.name)}},MI=class{constructor(e,t,n){this.table=e,this.columns=t,this.name=n}static[J]=`PgPrimaryKey`;columns;name;getName(){return this.name??`${this.table[AI.Symbol.Name]}_${this.columns.map(e=>e.name).join(`_`)}_pk`}};function NI(e,t){return AF(t)&&!TF(e)&&!Y(e,PF)&&!Y(e,FF)&&!Y(e,FP)&&!Y(e,X)&&!Y(e,RF)?new PF(e,t):e}const PI=(e,t)=>Z`${e} = ${NI(t,e)}`,FI=(e,t)=>Z`${e} <> ${NI(t,e)}`;function II(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new OF(t):new OF([new DF(`(`),Z.join(t,new DF(` and `)),new DF(`)`)])}function LI(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new OF(t):new OF([new DF(`(`),Z.join(t,new DF(` or `)),new DF(`)`)])}function RI(e){return Z`not ${e}`}const zI=(e,t)=>Z`${e} > ${NI(t,e)}`,BI=(e,t)=>Z`${e} >= ${NI(t,e)}`,VI=(e,t)=>Z`${e} < ${NI(t,e)}`,HI=(e,t)=>Z`${e} <= ${NI(t,e)}`;function UI(e,t){return Array.isArray(t)?t.length===0?Z`false`:Z`${e} in ${t.map(t=>NI(t,e))}`:Z`${e} in ${NI(t,e)}`}function WI(e,t){return Array.isArray(t)?t.length===0?Z`true`:Z`${e} not in ${t.map(t=>NI(t,e))}`:Z`${e} not in ${NI(t,e)}`}function GI(e){return Z`${e} is null`}function KI(e){return Z`${e} is not null`}function qI(e){return Z`exists ${e}`}function JI(e){return Z`not exists ${e}`}function YI(e,t,n){return Z`${e} between ${NI(t,e)} and ${NI(n,e)}`}function XI(e,t,n){return Z`${e} not between ${NI(t,e)} and ${NI(n,e)}`}function ZI(e,t){return Z`${e} like ${t}`}function QI(e,t){return Z`${e} not like ${t}`}function $I(e,t){return Z`${e} ilike ${t}`}function eL(e,t){return Z`${e} not ilike ${t}`}function tL(e){return Z`${e} asc`}function nL(e){return Z`${e} desc`}var rL=class{constructor(e,t,n){this.sourceTable=e,this.referencedTable=t,this.relationName=n,this.referencedTableName=t[X.Symbol.Name]}static[J]=`Relation`;referencedTableName;fieldName},iL=class{constructor(e,t){this.table=e,this.config=t}static[J]=`Relations`},aL=class e extends rL{constructor(e,t,n,r){super(e,t,n?.relationName),this.config=n,this.isNullable=r}static[J]=`One`;withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config,this.isNullable);return n.fieldName=t,n}},oL=class e extends rL{constructor(e,t,n){super(e,t,n?.relationName),this.config=n}static[J]=`Many`;withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config);return n.fieldName=t,n}};function sL(){return{and:II,between:YI,eq:PI,exists:qI,gt:zI,gte:BI,ilike:$I,inArray:UI,isNull:GI,isNotNull:KI,like:ZI,lt:VI,lte:HI,ne:FI,not:RI,notBetween:XI,notExists:JI,notLike:QI,notIlike:eL,notInArray:WI,or:LI,sql:Z}}function cL(){return{sql:Z,asc:tL,desc:nL}}function lL(e,t){Object.keys(e).length===1&&`default`in e&&!Y(e.default,X)&&(e=e.default);let n={},r={},i={};for(let[a,o]of Object.entries(e))if(Y(o,X)){let e=CF(o),t=r[e];n[e]=a,i[a]={tsName:a,dbName:o[X.Symbol.Name],schema:o[X.Symbol.Schema],columns:o[X.Symbol.Columns],relations:t?.relations??{},primaryKey:t?.primaryKey??[]};for(let e of Object.values(o[X.Symbol.Columns]))e.primary&&i[a].primaryKey.push(e);let s=o[X.Symbol.ExtraConfigBuilder]?.(o[X.Symbol.ExtraConfigColumns]);if(s)for(let e of Object.values(s))Y(e,jI)&&i[a].primaryKey.push(...e.columns)}else if(Y(o,iL)){let e=CF(o.table),a=n[e],s=o.config(t(o.table)),c;for(let[t,n]of Object.entries(s))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 uL(e){return function(t,n){return new aL(e,t,n,n?.fields.reduce((e,t)=>e&&t.notNull,!0)??!1)}}function dL(e){return function(t,n){return new oL(e,t,n)}}function fL(e,t,n){if(Y(n,aL)&&n.config)return{fields:n.config.fields,references:n.config.references};let r=t[CF(n.referencedTable)];if(!r)throw Error(`Table "${n.referencedTable[X.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[CF(a)];if(!o)throw Error(`Table "${a[X.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[X.Symbol.Name]}". Please specify relation name`);if(s[0]&&Y(s[0],aL)&&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 pL(e){return{one:uL(e),many:dL(e)}}function mL(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]=Y(r,aL)?l&&mL(e,e[s.relationTableTsKey],l,s.selection,i):l.map(t=>mL(e,e[s.relationTableTsKey],t,s.selection,i))}else{let e=i(n[o]),t=s.field,r;r=Y(t,FP)?t:Y(t,OF)?t.decoder:t.sql.decoder,a[s.tsKey]=e===null?null:r.mapFromDriverValue(e)}return a}var hL=class e{static[J]=`SelectionProxyHandler`;config;constructor(e){this.config={...e}}get(t,n){if(n===`_`)return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(n===pF)return{...t[pF],selectedFields:new Proxy(t[pF].selectedFields,this)};if(typeof n==`symbol`)return t[n];let r=Y(t,sF)?t._.selectedFields:Y(t,RF)?t[pF].selectedFields:t,i=r[n];if(Y(i,OF.Aliased)){if(this.config.sqlAliasedBehavior===`sql`&&!i.isSelectionField)return i.sql;let e=i.clone();return e.isSelectionField=!0,e}if(Y(i,OF)){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 Y(i,FP)?this.config.alias?new Proxy(i,new zF(new Proxy(i.table,new BF(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!=`object`||!i?i:new Proxy(i,new e(this.config))}};function gL(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 _L(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 vL(e){return e}var yL=class{static[J]=`CasingCache`;cache={};cachedTables={};convert;constructor(e){this.convert=e===`snake_case`?gL:e===`camelCase`?_L:vL}getColumnCasing(e){if(!e.keyAsName)return e.name;let t=e.table[X.Symbol.Schema]??`public`,n=e.table[X.Symbol.OriginalName],r=`${t}.${n}.${e.name}`;return this.cache[r]||this.cacheTable(e.table),this.cache[r]}cacheTable(e){let t=e[X.Symbol.Schema]??`public`,n=e[X.Symbol.OriginalName],r=`${t}.${n}`;if(!this.cachedTables[r]){for(let t of Object.values(e[X.Symbol.Columns])){let e=`${r}.${t.name}`;this.cache[e]=this.convert(t.name)}this.cachedTables[r]=!0}}clearCache(){this.cache={},this.cachedTables={}}},bL=class extends RF{static[J]=`PgViewBase`},xL=class{static[J]=`PgDialect`;casing;constructor(e){this.casing=new yL(e?.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=Z` - CREATE TABLE IF NOT EXISTS ${Z.identifier(i)}.${Z.identifier(r)} ( - id SERIAL PRIMARY KEY, - hash text NOT NULL, - created_at bigint - ) - `;await t.execute(Z`CREATE SCHEMA IF NOT EXISTS ${Z.identifier(i)}`),await t.execute(a);let o=await t.all(Z`select id, hash, created_at from ${Z.identifier(i)}.${Z.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)t[e]!==void 0||n[e]?.onUpdateFn!==void 0),i=r.length;return Z.join(r.flatMap((e,r)=>{let a=n[e],o=t[e]??Z.param(a.onUpdateFn(),a),s=Z`${Z.identifier(this.casing.getColumnCasing(a))} = ${o}`;return r{let i=[];if(Y(e,OF.Aliased)&&e.isSelectionField)i.push(Z.identifier(e.fieldAlias));else if(Y(e,OF.Aliased)||Y(e,OF)){let n=Y(e,OF.Aliased)?e.sql:e;t?i.push(new OF(n.queryChunks.map(e=>Y(e,XP)?Z.identifier(this.casing.getColumnCasing(e)):e))):i.push(n),Y(e,OF.Aliased)&&i.push(Z` as ${Z.identifier(e.fieldAlias)}`)}else Y(e,FP)&&(t?i.push(Z.identifier(this.casing.getColumnCasing(e))):i.push(e));return ro?.some(({alias:t})=>t===(e[X.Symbol.IsAlias]?SF(e):e[X.Symbol.BaseName])))(e.field.table)){let t=SF(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?Z` distinct`:Z` distinct on (${Z.join(f.on,Z`, `)})`);let v=this.buildSelection(m,{isSingleTable:h}),y=this.buildFromTable(a),b=this.buildJoins(o),x=r?Z` where ${r}`:void 0,S=i?Z` having ${i}`:void 0,C;s&&s.length>0&&(C=Z` order by ${Z.join(s,Z`, `)}`);let w;c&&c.length>0&&(w=Z` group by ${Z.join(c,Z`, `)}`);let T=typeof l==`object`||typeof l==`number`&&l>=0?Z` limit ${l}`:void 0,E=u?Z` offset ${u}`:void 0,D=Z.empty();if(d){let e=Z` for ${Z.raw(d.strength)}`;d.config.of&&e.append(Z` of ${Z.join(Array.isArray(d.config.of)?d.config.of:[d.config.of],Z`, `)}`),d.config.noWait?e.append(Z` nowait`):d.config.skipLocked&&e.append(Z` skip locked`),D.append(e)}let O=Z`${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=Z`(${e.getSQL()}) `,c=Z`(${r.getSQL()})`,l;if(a&&a.length>0){let e=[];for(let t of a)if(Y(t,XP))e.push(Z.identifier(t.name));else if(Y(t,OF)){for(let e=0;e=0?Z` limit ${i}`:void 0,d=Z.raw(`${t} ${n?`all `:``}`),f=o?Z` offset ${o}`:void 0;return Z`${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[X.Symbol.Columns],l=Object.entries(c).filter(([e,t])=>!t.shouldDisableInsert()),u=l.map(([,e])=>Z.identifier(this.casing.getColumnCasing(e)));if(a){let e=t;Y(e,OF)?s.push(e):s.push(e.getSQL())}else{let e=t;s.push(Z.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||Y(i,PF)&&i.value===void 0)if(t.defaultFn!==void 0){let e=t.defaultFn(),n=Y(e,OF)?e:Z.param(e,t);r.push(n)}else if(!t.default&&t.onUpdateFn!==void 0){let e=t.onUpdateFn(),n=Y(e,OF)?e:Z.param(e,t);r.push(n)}else r.push(Z`default`);else r.push(i)}s.push(r),t({dbKey:t.name,tsKey:e,field:UF(t,o),relationTableTsKey:void 0,isJson:!1,selection:[]}))}else{let r=Object.fromEntries(Object.entries(i.columns).map(([e,t])=>[e,UF(t,o)]));if(a.where){let e=typeof a.where==`function`?a.where(r,sL()):a.where;p=e&&GF(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=>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:Z}):a.extras;for(let[e,t]of Object.entries(g))s.push({tsKey:e,value:WF(t,o)})}for(let{tsKey:e,value:t}of s)l.push({dbKey:Y(t,OF.Aliased)?t.fieldAlias:i.columns[e].name,tsKey:e,field:Y(t,FP)?UF(t,o):t,relationTableTsKey:void 0,isJson:!1,selection:[]});let _=typeof a.orderBy==`function`?a.orderBy(r,cL()):a.orderBy??[];Array.isArray(_)||(_=[_]),f=_.map(e=>Y(e,FP)?UF(e,o):GF(e,o)),u=a.limit,d=a.offset;for(let{tsKey:r,queryConfig:i,relation:a}of h){let s=fL(t,n,a),c=CF(a.referencedTable),u=n[c],d=`${o}_${r}`,f=II(...s.fields.map((e,t)=>PI(UF(s.references[t],d),UF(e,o)))),p=this.buildRelationalQueryWithoutPK({fullSchema:e,schema:t,tableNamesMap:n,table:e[u],tableConfig:t[u],queryConfig:Y(a,aL)?i===!0?{limit:1}:{...i,limit:1}:i,tableAlias:d,joinOn:f,nestedQueryRelation:a}),h=Z`${Z.identifier(d)}.${Z.identifier(`data`)}`.as(r);m.push({on:Z`true`,table:new sF(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 KF({message:`No fields selected for table "${i.tsName}" ("${o}")`});let h;if(p=II(c,p),s){let e=Z`json_build_array(${Z.join(l.map(({field:e,tsKey:t,isJson:n})=>n?Z`${Z.identifier(`${o}_${t}`)}.${Z.identifier(`data`)}`:Y(e,OF.Aliased)?e.sql:e),Z`, `)})`;Y(s,oL)&&(e=Z`coalesce(json_agg(${e}${f.length>0?Z` order by ${Z.join(f,Z`, `)}`: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:HF(r,o),fields:{},fieldsFlat:[{path:[],field:Z.raw(`*`)}],where:p,limit:u,offset:d,orderBy:f,setOperators:[]}),p=void 0,u=void 0,d=void 0,f=[]):h=HF(r,o),h=this.buildSelectQuery({table:Y(h,AI)?h:new sF(h,{},o),fields:{},fieldsFlat:t.map(({field:e})=>({path:[],field:Y(e,FP)?UF(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]})}else h=this.buildSelectQuery({table:HF(r,o),fields:{},fieldsFlat:l.map(({field:e})=>({path:[],field:Y(e,FP)?UF(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]});return{tableTsKey:i.tsName,sql:h,selection:l}}},SL=class{static[J]=`TypedQueryBuilder`;getSelectedFields(){return this._.selectedFields}},CL=class{static[J]=`PgSelectBuilder`;fields;session;dialect;withList=[];distinct;constructor(e){this.fields=e.fields,this.session=e.session,this.dialect=e.dialect,e.withList&&(this.withList=e.withList),this.distinct=e.distinct}authToken;setToken(e){return this.authToken=e,this}from(e){let t=!!this.fields,n=e,r;return r=this.fields?this.fields:Y(n,sF)?Object.fromEntries(Object.keys(n._.selectedFields).map(e=>[e,n[e]])):Y(n,bL)?n[pF].selectedFields:Y(n,OF)?{}:nI(n),new TL({table:n,fields:r,isPartialSelect:t,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}},wL=class extends SL{static[J]=`PgSelectQueryBuilder`;_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:e,fields:t,isPartialSelect:n,session:r,dialect:i,withList:a,distinct:o}){super(),this.config={withList:a,table:e,fields:{...t},distinct:o,setOperators:[]},this.isPartialSelect=n,this.session=r,this.dialect=i,this._={selectedFields:t,config:this.config},this.tableName=rI(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{};for(let t of FL(e))this.usedTables.add(t)}getUsedTables(){return[...this.usedTables]}createJoin(e,t){return(n,r)=>{let i=this.tableName,a=rI(n);for(let e of FL(n))this.usedTables.add(e);if(typeof a==`string`&&this.config.joins?.some(e=>e.alias===a))throw Error(`Alias "${a}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof i==`string`&&(this.config.fields={[i]:this.config.fields}),typeof a==`string`&&!Y(n,OF))){let e=Y(n,sF)?n._.selectedFields:Y(n,RF)?n[pF].selectedFields:n[X.Symbol.Columns];this.config.fields[a]=e}if(typeof r==`function`&&(r=r(new Proxy(this.config.fields,new hL({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:r,table:n,joinType:e,alias:a,lateral:t}),typeof a==`string`)switch(e){case`left`:this.joinsNotNullableMap[a]=!1;break;case`right`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[a]=!0;break;case`cross`:case`inner`:this.joinsNotNullableMap[a]=!0;break;case`full`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[a]=!1;break}return this}}leftJoin=this.createJoin(`left`,!1);leftJoinLateral=this.createJoin(`left`,!0);rightJoin=this.createJoin(`right`,!1);innerJoin=this.createJoin(`inner`,!1);innerJoinLateral=this.createJoin(`inner`,!0);fullJoin=this.createJoin(`full`,!1);crossJoin=this.createJoin(`cross`,!1);crossJoinLateral=this.createJoin(`cross`,!0);createSetOperator(e,t){return n=>{let r=typeof n==`function`?n(DL()):n;if(!$F(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}}union=this.createSetOperator(`union`,!1);unionAll=this.createSetOperator(`union`,!0);intersect=this.createSetOperator(`intersect`,!1);intersectAll=this.createSetOperator(`intersect`,!0);except=this.createSetOperator(`except`,!1);exceptAll=this.createSetOperator(`except`,!0);addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new hL({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.where=e,this}having(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new hL({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 hL({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 hL({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(...FL(this.config.table)),this.config.joins)for(let e of this.config.joins)t.push(...FL(e.table));return new Proxy(new sF(this.getSQL(),this.config.fields,e,!1,[...new Set(t)]),new hL({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`}))}getSelectedFields(){return new Proxy(this.config.fields,new hL({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}},TL=class extends wL{static[J]=`PgSelect`;_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 fF.startActiveSpan(`drizzle.prepareQuery`,()=>{let n=QF(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)}authToken;setToken(e){return this.authToken=e,this}execute=e=>fF.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))};tI(TL,[ZF]);function EL(e,t){return(n,r,...i)=>{let a=[r,...i].map(n=>({type:e,isAll:t,rightSelect:n}));for(let e of a)if(!$F(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 DL=()=>({union:OL,unionAll:kL,intersect:AL,intersectAll:jL,except:ML,exceptAll:NL}),OL=EL(`union`,!1),kL=EL(`union`,!0),AL=EL(`intersect`,!1),jL=EL(`intersect`,!0),ML=EL(`except`,!1),NL=EL(`except`,!0);var PL=class{static[J]=`PgQueryBuilder`;dialect;dialectConfig;constructor(e){this.dialect=Y(e,xL)?e:void 0,this.dialectConfig=Y(e,xL)?void 0:e}$with=(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(n)),new Proxy(new cF(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new hL({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};with(...e){let t=this;function n(n){return new CL({fields:n??void 0,session:void 0,dialect:t.getDialect(),withList:e})}function r(e){return new CL({fields:e??void 0,session:void 0,dialect:t.getDialect(),distinct:!0})}function i(e,n){return new CL({fields:n??void 0,session:void 0,dialect:t.getDialect(),distinct:{on:e}})}return{select:n,selectDistinct:r,selectDistinctOn:i}}select(e){return new CL({fields:e??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(e){return new CL({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(e,t){return new CL({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:e}})}getDialect(){return this.dialect||=new xL(this.dialectConfig),this.dialect}};function FL(e){return Y(e,AI)?[e[mF]?`${e[mF]}.${e[X.Symbol.BaseName]}`:e[X.Symbol.BaseName]]:Y(e,sF)?e._.usedTables??[]:Y(e,OF)?e.usedTables??[]:[]}var IL=class extends ZF{constructor(e,t,n,r){super(),this.session=t,this.dialect=n,this.config={table:e,withList:r}}static[J]=`PgDelete`;config;cacheConfig;where(e){return this.config.where=e,this}returning(e=this.config.table[X.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=QF(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return fF.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`delete`,tables:FL(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>fF.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new hL({alias:SF(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},LL=class{constructor(e,t,n,r,i){this.table=e,this.session=t,this.dialect=n,this.withList=r,this.overridingSystemValue_=i}static[J]=`PgInsertBuilder`;authToken;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[X.Symbol.Columns];for(let r of Object.keys(e)){let i=e[r];t[r]=Y(i,OF)?i:new PF(i,n[r])}return t});return new RL(this.table,t,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(e){let t=typeof e==`function`?e(new PL):e;if(!Y(t,OF)&&!$F(this.table[hF],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 RL(this.table,t,this.session,this.dialect,this.withList,!0)}},RL=class extends ZF{constructor(e,t,n,r,i,a,o){super(),this.session=n,this.dialect=r,this.config={table:e,values:t,withList:i,select:a,overridingSystemValue_:o}}static[J]=`PgInsert`;config;cacheConfig;returning(e=this.config.table[X.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=QF(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=Z`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?Z` where ${e.where}`:void 0;this.config.onConflict=Z`(${Z.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?Z` where ${e.where}`:void 0,n=e.targetWhere?Z` where ${e.targetWhere}`:void 0,r=e.setWhere?Z` where ${e.setWhere}`:void 0,i=this.dialect.buildUpdateSet(this.config.table,eI(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=Z`(${Z.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 fF.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`insert`,tables:FL(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>fF.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new hL({alias:SF(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},zL=class extends ZF{constructor(e,t,n){super(),this.session=t,this.dialect=n,this.config={view:e}}static[J]=`PgRefreshMaterializedView`;config;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 fF.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>fF.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))},BL=class{constructor(e,t,n,r){this.table=e,this.session=t,this.dialect=n,this.withList=r}static[J]=`PgUpdateBuilder`;authToken;setToken(e){return this.authToken=e,this}set(e){return new VL(this.table,eI(this.table,e),this.session,this.dialect,this.withList).setToken(this.authToken)}},VL=class extends ZF{constructor(e,t,n,r,i){super(),this.session=n,this.dialect=r,this.config={set:t,table:e,withList:i,joins:[]},this.tableName=rI(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{}}static[J]=`PgUpdate`;config;tableName;joinsNotNullableMap;cacheConfig;from(e){let t=e,n=rI(t);return typeof n==`string`&&(this.joinsNotNullableMap[n]=!0),this.config.from=t,this}getTableLikeFields(e){return Y(e,AI)?e[X.Symbol.Columns]:Y(e,sF)?e._.selectedFields:e[pF].selectedFields}createJoin(e){return(t,n)=>{let r=rI(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&&!Y(this.config.from,OF)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[X.Symbol.Columns],new hL({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})),e&&new Proxy(e,new hL({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}}leftJoin=this.createJoin(`left`);rightJoin=this.createJoin(`right`);innerJoin=this.createJoin(`inner`);fullJoin=this.createJoin(`full`);where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[X.Symbol.Columns]),this.config.from)){let t=rI(this.config.from);if(typeof t==`string`&&this.config.from&&!Y(this.config.from,OF)){let n=this.getTableLikeFields(this.config.from);e[t]=n}for(let t of this.config.joins){let n=rI(t.table);if(typeof n==`string`&&!Y(t.table,OF)){let r=this.getTableLikeFields(t.table);e[n]=r}}}return this.config.returningFields=e,this.config.returning=QF(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:FL(this.config.table)},this.cacheConfig);return t.joinsNotNullableMap=this.joinsNotNullableMap,t}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>this._prepare().execute(e,this.authToken);getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new hL({alias:SF(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},HL=class e extends OF{constructor(t){super(e.buildEmbeddedCount(t.source,t.filters).queryChunks),this.params=t,this.mapWith(Number),this.session=t.session,this.sql=e.buildCount(t.source,t.filters)}sql;token;static[J]=`PgCountBuilder`;[Symbol.toStringTag]=`PgCountBuilder`;session;static buildEmbeddedCount(e,t){return Z`(select count(*) from ${e}${Z.raw(` where `).if(t)}${t})`}static buildCount(e,t){return Z`select count(*) as count from ${e}${Z.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})}},UL=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}static[J]=`PgRelationalQueryBuilder`;findMany(e){return new WL(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},`many`)}findFirst(e){return new WL(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},`first`)}},WL=class extends ZF{constructor(e,t,n,r,i,a,o,s,c){super(),this.fullSchema=e,this.schema=t,this.tableNamesMap=n,this.table=r,this.tableConfig=i,this.dialect=a,this.session=o,this.config=s,this.mode=c}static[J]=`PgRelationalQuery`;_prepare(e){return fF.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=>mL(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}authToken;setToken(e){return this.authToken=e,this}execute(){return fF.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(void 0,this.authToken))}},GL=class extends ZF{constructor(e,t,n,r){super(),this.execute=e,this.sql=t,this.query=n,this.mapBatchResult=r}static[J]=`PgRaw`;getSQL(){return this.sql}getQuery(){return this.query}mapResult(e,t){return t?this.mapBatchResult(e):e}_prepare(){return this}isResponseInArrayMode(){return!1}},KL=class{constructor(e,t,n){if(this.dialect=e,this.session=t,this._=n?{schema:n.schema,fullSchema:n.fullSchema,tableNamesMap:n.tableNamesMap,session:t}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:t},this.query={},this._.schema)for(let[r,i]of Object.entries(this._.schema))this.query[r]=new UL(n.fullSchema,this._.schema,this._.tableNamesMap,n.fullSchema[r],i,e,t);this.$cache={invalidate:async e=>{}}}static[J]=`PgDatabase`;query;$with=(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(new PL(n.dialect))),new Proxy(new cF(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new hL({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};$count(e,t){return new HL({source:e,filters:t,session:this.session})}$cache;with(...e){let t=this;function n(n){return new CL({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e})}function r(n){return new CL({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:!0})}function i(n,r){return new CL({fields:r??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:{on:n}})}function a(n){return new BL(n,t.session,t.dialect,e)}function o(n){return new LL(n,t.session,t.dialect,e)}function s(n){return new IL(n,t.session,t.dialect,e)}return{select:n,selectDistinct:r,selectDistinctOn:i,update:a,insert:o,delete:s}}select(e){return new CL({fields:e??void 0,session:this.session,dialect:this.dialect})}selectDistinct(e){return new CL({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(e,t){return new CL({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:{on:e}})}update(e){return new BL(e,this.session,this.dialect)}insert(e){return new LL(e,this.session,this.dialect)}delete(e){return new IL(e,this.session,this.dialect)}refreshMaterializedView(e){return new zL(e,this.session,this.dialect)}authToken;execute(e){let t=typeof e==`string`?Z.raw(e):e.getSQL(),n=this.dialect.sqlToQuery(t),r=this.session.prepareQuery(n,void 0,void 0,!1);return new GL(()=>r.execute(void 0,this.authToken),t,n,e=>r.mapResult(e,!0))}transaction(e,t){return this.session.transaction(e,t)}},qL=class{static[J]=`Cache`},JL=class extends qL{strategy(){return`all`}static[J]=`NoopCache`;async get(e){}async put(e,t,n,r){}async onMutate(e){}};async function YL(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 XL=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)}},ZL=class{constructor(e,t,n,r){this.query=e,this.cache=t,this.queryMetadata=n,this.cacheConfig=r,t&&t.strategy()===`all`&&r===void 0&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),this.cacheConfig?.enable||(this.cacheConfig=void 0)}authToken;getQuery(){return this.query}mapResult(e,t){return e}setToken(e){return this.authToken=e,this}static[J]=`PgPreparedQuery`;joinsNotNullableMap;async queryWithCache(e,t,n){if(this.cache===void 0||Y(this.cache,JL)||this.queryMetadata===void 0)try{return await n()}catch(n){throw new XL(e,t,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await n()}catch(n){throw new XL(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 XL(e,t,n)}if(!this.cacheConfig)try{return await n()}catch(n){throw new XL(e,t,n)}if(this.queryMetadata.type===`select`){let r=await this.cache.get(this.cacheConfig.tag??await YL(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 XL(e,t,n)}return await this.cache.put(this.cacheConfig.tag??await YL(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 XL(e,t,n)}}},QL=class{constructor(e){this.dialect=e}static[J]=`PgSession`;execute(e,t){return fF.startActiveSpan(`drizzle.operation`,()=>{let n=fF.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)}},$L=class extends KL{constructor(e,t,n,r=0){super(e,t,n),this.schema=n,this.nestedIndex=r}static[J]=`PgTransaction`;rollback(){throw new qF}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`),Z.raw(t.join(` `))}setTransaction(e){return this.session.execute(Z`set transaction ${this.getTransactionConfigSQL(e)}`)}};function eR(e){return typeof e==`string`&&/^true$/i.test(e)}function tR(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&&eR(r)&&(t.logger=!0);let i=n.searchParams.get(`storage`);switch(i){case AP.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:AP.ORIGIN_PRIVATE_FS,path:n.pathname.startsWith(`/`)?n.pathname.slice(1):n.pathname,...e&&eR(e)&&{accessMode:Xw.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var nR=class extends ZL{static[J]=`DuckDBWasmPreparedQuery`;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=IF(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=IF(this.params,e);this.logger.logQuery(this.queryString,t);let n=await this.client;return n.query(this.queryString,t)}},rR=class e extends QL{static[J]=`DuckDBWasmSession`;logger;constructor(e,t,n,r={}){super(t),this.client=e,this.schema=n,this.options=r,this.logger=r.logger??new XF}prepareQuery(e,t,n,r,i){return new nR(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(t,n){return MP(this.client,async r=>{let i=new e(r,this.dialect,this.schema,this.options),a=new iR(this.dialect,i,this.schema);return n&&await a.setTransaction(n),t(a)})}},iR=class e extends $L{static[J]=`DuckDBWasmTransaction`;dialect;session;constructor(e,t,n,r=0){super(e,t,n,r),this.dialect=e,this.session=t}async transaction(t){return NP(this.session.client,``,async n=>{let r=new rR(n,this.dialect,this.schema,this.session.options),i=new e(this.dialect,r,this.schema);return t(i)})}},aR=class extends KL{static[J]=`DuckDBWasmDatabase`};function oR(e,t={}){let n=new xL({casing:t.casing}),r;t.logger===!0?r=new YF:t.logger!==!1&&(r=t.logger);let i;if(t.schema){let e=lL(t.schema,pL);i={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new rR(e,n,i,{logger:r}),o=new aR(n,a,i);return o.$client=e,o}function sR(e,t){let n=tR(e),r;if(n.bundles===`import-url`){let e=async()=>{let e=await rP();switch(e){case`browser`:return(await b(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-browser-CXhM7gkL.js`);return{getImportUrlBundles:e}},__vite__mapDeps([4,5,6]))).getImportUrlBundles();case`node`:return await(await b(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-node-DcfQpSzu.js`);return{getImportUrlBundles:e}},__vite__mapDeps([7,6]))).getImportUrlBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}else{let e=async()=>{let e=await rP();switch(e){case`browser`:return(await b(async()=>{let{getBundles:e}=await import(`./default-browser-CICL74Rl.js`);return{getBundles:e}},[])).getBundles();case`node`:return await(await b(async()=>{let{getBundles:e}=await import(`./default-node-C2t2tqcG.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]))).getBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}return oR(jP({bundles:r,logger:n.logger?new rT:void 0,storage:n.storage}),t)}function cR(...e){if(typeof e[0]==`string`)return sR(e[0],e[1]);if(iI(e[0])){let{connection:t,client:n,...r}=e[0];if(n)return oR(n,r);if(typeof t==`string`)return sR(t,r);if(t===void 0)throw Error(`connection option is required`);return oR(jP({bundles:t.bundles,logger:t.logger,storage:t.storage}),r)}return oR(e[0],e[1])}(function(e){function t(e){return oR({options:{parsers:{},serializers:{}}},e)}e.mock=t})(cR||={});var lR=Object.defineProperty,uR=(e,t,n)=>t in e?lR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dR=(e,t,n)=>uR(e,typeof t==`symbol`?t:t+``,n);function fR(e){return Bn()?(Un(e),!0):!1}function pR(e){return typeof e==`function`?e():U(e)}const mR=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const hR=Object.prototype.toString,gR=e=>hR.call(e)===`[object Object]`,_R=()=>{};function vR(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 yR(e,t={}){let n,r,i=_R,a=e=>{clearTimeout(e),i(),i=_R};return o=>{let s=pR(e),c=pR(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 bR(...e){let t=0,n,r=!0,i=_R,a,o,s,c,l;!_n(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=_R)};return e=>{let d=pR(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)}}function xR(e){return Ln()}function SR(e,t=200,n={}){return vR(yR(t,n),e)}function CR(e,t=200,n=!1,r=!0,i=!1){return vR(bR(t,n,r,i),e)}function wR(e,t=!0,n){xR()?pn(e,n):t?e():mn(e)}const TR=mR?window:void 0;function ER(e){var t;let n=pR(e);return(t=n?.$el)??n}function DR(...e){let t,n,r,i;if(typeof e[0]==`string`||Array.isArray(e[0])?([n,r,i]=e,t=TR):[t,n,r,i]=e,!t)return _R;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=I(()=>[ER(t),pR(i)],([e,t])=>{if(o(),!e)return;let i=gR(t)?{...t}:t;a.push(...n.flatMap(t=>r.map(n=>s(e,t,n,i))))},{immediate:!0,flush:`post`}),l=()=>{c(),o()};return fR(l),l}function OR(){let e=z(!1),t=Ln();return t&&pn(()=>{e.value=!0},t),e}function kR(e){let t=OR();return In(()=>(t.value,!!e()))}function AR(e,t={}){let{window:n=TR}=t,r=kR(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),i,a=z(!1),o=e=>{a.value=e.matches},s=()=>{i&&(`removeEventListener`in i?i.removeEventListener(`change`,o):i.removeListener(o))},c=An(()=>{r.value&&(s(),i=n.matchMedia(pR(e)),`addEventListener`in i?i.addEventListener(`change`,o):i.addListener(o),a.value=i.matches)});return fR(()=>{c(),s(),i=void 0}),a}function jR(e,t,n={}){let{window:r=TR,...i}=n,a,o=kR(()=>r&&`ResizeObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=In(()=>{let t=pR(e);return Array.isArray(t)?t.map(e=>ER(e)):[ER(t)]}),l=I(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 fR(u),{isSupported:o,stop:u}}function MR(e,t={width:0,height:0},n={}){let{window:r=TR,box:i=`content-box`}=n,a=In(()=>{var t,n;return(n=(t=ER(e))?.namespaceURI)?.includes(`svg`)}),o=z(t.width),s=z(t.height),{stop:c}=jR(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=ER(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=Array.isArray(n)?n:[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);wR(()=>{let n=ER(e);n&&(o.value=`offsetWidth`in n?n.offsetWidth:t.width,s.value=`offsetHeight`in n?n.offsetHeight:t.height)});let l=I(()=>ER(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}}const NR=1;function PR(e,t={}){let{throttle:n=0,idle:r=200,onStop:i=_R,onScroll:a=_R,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:s={capture:!1,passive:!0},behavior:c=`auto`,window:l=TR,onError:u=e=>{console.error(e)}}=t,d=z(0),f=z(0),p=In({get(){return d.value},set(e){h(e,void 0)}}),m=In({get(){return f.value},set(e){h(void 0,e)}});function h(t,n){var r,i,a,o;if(!l)return;let s=pR(e);if(!s)return;(a=s instanceof Document?l.document.body:s)==null||a.scrollTo({top:(r=pR(n))??m.value,left:(i=pR(t))??p.value,behavior:pR(c)});let u=(o=s?.document)?.documentElement||s?.documentElement||s;p!=null&&(d.value=u.scrollLeft),m!=null&&(f.value=u.scrollTop)}let g=z(!1),_=Hn({left:!0,right:!1,top:!0,bottom:!1}),v=Hn({left:!1,right:!1,top:!1,bottom:!1}),y=e=>{g.value&&(g.value=!1,v.left=!1,v.right=!1,v.top=!1,v.bottom=!1,i(e))},b=SR(y,n+r),x=e=>{var t;if(!l)return;let n=(t=e?.document)?.documentElement||e?.documentElement||ER(e),{display:r,flexDirection:i}=getComputedStyle(n),a=n.scrollLeft;v.left=ad.value;let s=Math.abs(a)<=(o.left||0),c=Math.abs(a)+n.clientWidth>=n.scrollWidth-(o.right||0)-NR;r===`flex`&&i===`row-reverse`?(_.left=c,_.right=s):(_.left=s,_.right=c),d.value=a;let u=n.scrollTop;e===l.document&&!u&&(u=l.document.body.scrollTop),v.top=uf.value;let p=Math.abs(u)<=(o.top||0),m=Math.abs(u)+n.clientHeight>=n.scrollHeight-(o.bottom||0)-NR;r===`flex`&&i===`column-reverse`?(_.top=m,_.bottom=p):(_.top=p,_.bottom=m),f.value=u},S=e=>{var t;if(!l)return;let n=(t=e.target.documentElement)??e.target;x(n),g.value=!0,b(e),a(e)};return DR(e,`scroll`,n?CR(S,n,!0,!1):S,s),wR(()=>{try{let t=pR(e);if(!t)return;x(t)}catch(e){u(e)}}),DR(e,`scrollend`,y,s),{x:p,y:m,isScrolling:g,arrivedState:_,directions:v,measure(){let t=pR(e);l&&t&&x(t)}}}const FR={ctrl:`control`,command:`meta`,cmd:`meta`,option:`alt`,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`};function IR(e={}){let{reactive:t=!1,target:n=TR,aliasMap:r=FR,passive:i=!0,onEventFired:a=_R}=e,o=Hn(new Set),s={toJSON(){return{}},current:o},c=t?Hn(s):s,l=new Set,u=new Set;function d(e,n){e in c&&(t?c[e]=n:c[e].value=n)}function f(){o.clear();for(let e of u)d(e,!1)}function p(e,t){var n,r;let i=(n=e.key)?.toLowerCase(),a=[(r=e.code)?.toLowerCase(),i].filter(Boolean);i&&(t?o.add(i):o.delete(i));for(let e of a)u.add(e),d(e,t);i===`meta`&&!t?(l.forEach(e=>{o.delete(e),d(e,!1)}),l.clear()):typeof e.getModifierState==`function`&&e.getModifierState(`Meta`)&&t&&[...o,...a].forEach(e=>l.add(e))}DR(n,`keydown`,e=>(p(e,!0),a(e)),{passive:i}),DR(n,`keyup`,e=>(p(e,!1),a(e)),{passive:i}),DR(`blur`,f,{passive:!0}),DR(`focus`,f,{passive:!0});let m=new Proxy(c,{get(e,n,i){if(typeof n!=`string`)return Reflect.get(e,n,i);if(n=n.toLowerCase(),n in r&&(n=r[n]),!(n in c))if(/[+_-]/.test(n)){let e=n.split(/[+_-]/g).map(e=>e.trim());c[n]=In(()=>e.every(e=>pR(m[e])))}else c[n]=z(!1);let a=Reflect.get(e,n,i);return t?pR(a):a}});return m}const LR={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof Touch?null:[e.movementX,e.movementY]};function RR(e={}){let{type:t=`page`,touch:n=!0,resetOnTouchEnds:r=!1,initialValue:i={x:0,y:0},window:a=TR,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:LR[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};DR(o,[`mousemove`,`dragover`],b,e),n&&t!==`movement`&&(DR(o,[`touchstart`,`touchmove`],x,e),r&&DR(o,`touchend`,y,e)),s&&t===`page`&&DR(a,`scroll`,S,{passive:!0})}return{x:f,y:p,sourceType:m}}function zR(e={}){let{window:t=TR,behavior:n=`auto`}=e;if(!t)return{x:z(0),y:z(0)};let r=z(t.scrollX),i=z(t.scrollY),a=In({get(){return r.value},set(e){scrollTo({left:e,behavior:n})}}),o=In({get(){return i.value},set(e){scrollTo({top:e,behavior:n})}});return DR(t,`scroll`,()=>{r.value=t.scrollX,i.value=t.scrollY},{capture:!1,passive:!0}),{x:a,y:o}}function BR(e={}){let{window:t=TR,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=()=>{t&&(o===`outer`?(s.value=t.outerWidth,c.value=t.outerHeight):a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight))};if(l(),wR(l),DR(`resize`,l,{passive:!0}),i){let e=AR(`(orientation: portrait)`);I(e,()=>l())}return{width:s,height:c}}function VR(e){let{resolution:t,renderer:n,scene:r,envMap:i,fog:a,near:o,far:s}=e;n??=j().renderer,r??=j().scene,An(()=>{t=gn(e.resolution)??255,o=gn(e.near)??.1,s=gn(e.far)??1e3,i=gn(e.envMap)??void 0,a=gn(e.fog)??void 0,n=gn(e.renderer)??n,r=gn(e.scene)??r});let c=In(()=>new lt(gn(t)));c.value.texture.type=vt,fR(()=>{c.value.dispose()});let l=In(()=>new Yt(gn(o),gn(s),gn(c))),u=()=>{let e=gn(r),t=e.fog,o=e.background;e.background=gn(i)||o,e.fog=gn(a)||t,l.value.update(gn(n),e),e.fog=t,e.background=o};return An(u),{fbo:c,camera:l,update:u}}const HR=[`object`],UR=R({__name:`component`,props:{frames:{default:1/0},resolution:{},near:{},far:{},envMap:{},fog:{},renderer:{},scene:{}},setup(e,{expose:t}){let n=e,r=H(),{fbo:i,camera:a,update:o}=VR(n),s=0;return ie().onBeforeRender(()=>{r.value&&(n.frames===1/0||s{`material`in e&&typeof e.material==`object`&&e.material&&`envMap`in e.material&&(e.material.envMap=i.value.texture)}),s++)}),t({instance:r,fbo:i,camera:a,update:o}),(e,t)=>(L(),B(`TresGroup`,{ref_key:`groupRef`,ref:r},[V(`primitive`,{object:U(a)},null,8,HR),Mn(e.$slots,`default`)],512))}}),WR=R({__name:`Billboard`,props:{autoUpdate:{type:Boolean,default:!0},lockX:{type:Boolean,default:!1},lockY:{type:Boolean,default:!1},lockZ:{type:Boolean,default:!1}},setup(e,{expose:t}){let n=e,r=H(new le),i=H(new le),a=new Pe,o=new Dt;function s(e){r.value&&(!e&&(e=j().camera.value,!e)||(i.value.rotation.copy(o),r.value.updateMatrix(),r.value.updateWorldMatrix(!1,!1),r.value.getWorldQuaternion(a),e.getWorldQuaternion(i.value.quaternion).premultiply(a.invert()),n.lockX&&(i.value.rotation.x=o.x),n.lockY&&(i.value.rotation.y=o.y),n.lockZ&&(i.value.rotation.z=o.z)))}return ie().onBeforeRender(({camera:e})=>{n.autoUpdate&&s(e)}),t({instance:r,update:s}),(e,t)=>(L(),B(`TresGroup`,{ref_key:`outerRef`,ref:r},[V(`TresGroup`,{ref_key:`innerRef`,ref:i},[Mn(e.$slots,`default`)],512)],512))}}),GR=R({name:`GlobalAudio`,props:[`src`,`loop`,`volume`,`playbackRate`,`playTrigger`,`stopTrigger`],async setup(e,{expose:t,emit:n}){var r;let{camera:i,renderer:a}=Ie(),o=new $e;(r=i.value)==null||r.add(o);let s=new we(o),c=new Jt;t({instance:s}),On(()=>{s&&s.disconnect()}),I(()=>[e.playbackRate],()=>s.setPlaybackRate(e.playbackRate??1),{immediate:!0}),I(()=>[e.volume],()=>s.setVolume(e.volume??.5),{immediate:!0}),I(()=>[e.loop],()=>s.setLoop(e.loop??!1),{immediate:!0}),I(()=>[e.src],async()=>{let t=await c.loadAsync(e.src);s.setBuffer(t)},{immediate:!0});let l=document.getElementById(e.playTrigger??``)||a.value.domElement;DR(l,`click`,()=>{s.isPlaying?s.pause():s.play(),n(`isPlaying`,s.isPlaying)});let u=document.getElementById(e.stopTrigger??``);return u&&DR(u,`click`,()=>{s.stop(),n(`isPlaying`,s.isPlaying)}),null}}),KR=[`color-space`,`args`,`attach`],qR=R({__name:`GradientTexture`,props:{stops:{},colors:{},attach:{default:`map`},height:{default:1024},width:{default:16},type:{default:`linear`},innerCircleRadius:{default:0},outerCircleRadius:{default:`auto`}},setup(e,{expose:t}){let n=e,r=H(),i=document.createElement(`canvas`);function a(e){let t=e.getContext(`2d`);e.width=n.width,e.height=n.height;let i;if(n.type===`linear`)i=t.createLinearGradient(0,0,0,n.height);else{let r=e.width/2,a=e.height/2,o=n.outerCircleRadius===`auto`?Math.sqrt(r**2+a**2):Math.abs(Number(n.outerCircleRadius));i=t.createRadialGradient(r,a,Math.abs(n.innerCircleRadius),r,a,o)}let a=new ot,o=n.stops.length;for(;o--;)i.addColorStop(n.stops[o],a.set(n.colors[o]).getStyle());t.save(),t.fillStyle=i,t.fillRect(0,0,n.width,n.height),t.restore(),r.value&&(r.value.needsUpdate=!0)}let o=j().renderer;return I(()=>[n.colors,n.stops,n.height,n.width,n.type,n.innerCircleRadius,n.outerCircleRadius],()=>{a(i)},{immediate:!0}),Rn(n.colors)&&I(n.colors,()=>a(i)),Rn(n.stops)&&I(n.stops,()=>a(i)),t({instance:r}),(e,t)=>(L(),B(`TresCanvasTexture`,{ref_key:`textureRef`,ref:r,"color-space":U(o).outputColorSpace,args:[U(i)],attach:n.attach},null,8,KR))}});function JR(e,t,n,r){let i=class extends ct{constructor(r={}){let i=Object.entries(e);super({uniforms:i.reduce((e,[t,n])=>{let r=Ce.clone({[t]:{value:n}});return{...e,...r}},{}),vertexShader:t,fragmentShader:n}),dR(this,`key`,``),i.forEach(([e])=>Object.defineProperty(this,e,{get:()=>this.uniforms[e].value,set:t=>this.uniforms[e].value=t})),Object.assign(this,r)}};return i.key=Wt.generateUUID(),i}const YR=JR({color:new ot(`white`),scale:new Xt(1,1),imageBounds:new Xt(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` - varying vec2 vUv; - varying vec2 vPos; - void main() { - gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.); - vUv = uv; - vPos = position.xy; - } - `,` - // mostly from https://gist.github.com/statico/df64c5d167362ecf7b34fca0b1459a44 - varying vec2 vUv; - varying vec2 vPos; - uniform vec2 scale; - uniform vec2 imageBounds; - uniform float resolution; - uniform vec3 color; - uniform sampler2D map; - uniform float radius; - uniform float zoom; - uniform float grayscale; - uniform float opacity; - const vec3 luma = vec3(.299, 0.587, 0.114); - vec4 toGrayscale(vec4 color, float intensity) { - return vec4(mix(color.rgb, vec3(dot(color.rgb, luma)), intensity), color.a); - } - vec2 aspect(vec2 size) { - return size / min(size.x, size.y); - } - - const float PI = 3.14159265; - - // from https://iquilezles.org/articles/distfunctions - float udRoundBox( vec2 p, vec2 b, float r ) { - return length(max(abs(p)-b+r,0.0))-r; - } - - void main() { - vec2 s = aspect(scale); - vec2 i = aspect(imageBounds); - float rs = s.x / s.y; - float ri = i.x / i.y; - vec2 new = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, i.y * s.x / i.x); - vec2 offset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new; - vec2 uv = vUv * s / new + offset; - vec2 zUv = (uv - vec2(0.5, 0.5)) / zoom + vec2(0.5, 0.5); - - vec2 res = vec2(scale * resolution); - vec2 halfRes = 0.5 * res; - float b = udRoundBox(vUv.xy * res - halfRes, halfRes, resolution * radius); - vec3 a = mix(vec3(1.0,0.0,0.0), vec3(0.0,0.0,0.0), smoothstep(0.0, 1.0, b)); - gl_FragColor = toGrayscale(texture2D(map, zUv) * vec4(color, opacity * a), grayscale); - - #include - #include - } - `),XR=R({__name:`ImageMaterial`,setup(e,{expose:t}){ce({ImageMaterial:YR});let n=H();return t({instance:n}),(e,t)=>(L(),B(`TresImageMaterial`,{ref_key:`materialRef`,ref:n},null,512))}}),ZR=[`scale`],QR=[`args`],$R=R({__name:`component`,props:{segments:{default:1},scale:{default:1},color:{default:()=>new ot(`white`)},zoom:{default:1},radius:{default:0},grayscale:{default:0},toneMapped:{type:Boolean,default:!0},transparent:{type:Boolean,default:!1},opacity:{default:1},side:{default:ln},texture:{},url:{}},setup(e,{expose:t}){let n=e,r=H(),i=H(n.texture??null),a=j().sizes,o=In(()=>Array.isArray(n.scale)?[n.scale[0],n.scale[1]]:[n.scale,n.scale]),s=In(()=>{var e,t;return[(e=i.value)?.image.width??0,(t=i.value)?.image.height??0]}),c=In(()=>Math.max(a.width.value,a.height.value));An(()=>{n.texture?i.value=n.texture:ae([n.url]).then(e=>i.value=e)});let l=In(()=>Array.isArray(n.scale)?[...n.scale,1]:n.scale);return t({instance:r}),(e,t)=>(L(),B(`TresMesh`,{ref_key:`imageRef`,ref:r,scale:l.value},[Mn(e.$slots,`default`,{},()=>[V(`TresPlaneGeometry`,{args:[1,1,n.segments,n.segments]},null,8,QR)]),dn(XR,{color:n.color,map:i.value,zoom:n.zoom,grayscale:n.grayscale,opacity:n.opacity,scale:o.value,imageBounds:s.value,resolution:c.value,radius:e.radius,toneMapped:e.toneMapped,transparent:e.transparent,side:e.side},null,8,[`color`,`map`,`zoom`,`grayscale`,`opacity`,`scale`,`imageBounds`,`resolution`,`radius`,`toneMapped`,`transparent`,`side`])],8,ZR))}}),ez=parseInt(xe.replace(/\D+/g,``)),tz=ez>=125?`uv1`:`uv2`;function nz(e,t=Math.PI/3){let n=Math.cos(t),r=1.0000000001*100,i=[new P,new P,new P],a=new P,o=new P,s=new P,c=new P;function l(e){let t=~~(e.x*r),n=~~(e.y*r),i=~~(e.z*r);return`${t},${n},${i}`}let u=e.index?e.toNonIndexed():e,d=u.attributes.position,f={};for(let e=0,t=d.count/3;en&&c.add(t)}c.normalize(),m.setXYZ(t+e,c.x,c.y,c.z)}}return u.setAttribute(`normal`,m),u}var rz=Object.defineProperty,iz=(e,t,n)=>t in e?rz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,az=(e,t,n)=>(iz(e,t+``,n),n);async function oz(e){let t=await e.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(t)));return`data:${e.type||``};base64,${n}`}let sz,cz,lz,uz;function dz(e,t=1/0,n=null){cz||=new ge(2,2,1,1),lz||=new ct({uniforms:{blitTexture:new Ye(e)},vertexShader:` - varying vec2 vUv; - void main(){ - vUv = uv; - gl_Position = vec4(position.xy * 1.0,0.,.999999); - } - `,fragmentShader:` - uniform sampler2D blitTexture; - varying vec2 vUv; - - void main(){ - gl_FragColor = vec4(vUv.xy, 0, 1); - - #ifdef IS_SRGB - gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) ); - #else - gl_FragColor = texture2D( blitTexture, vUv); - #endif - } - `}),lz.uniforms.blitTexture.value=e,lz.defines.IS_SRGB=`colorSpace`in e?e.colorSpace===`srgb`:e.encoding===3001,lz.needsUpdate=!0,uz||(uz=new F(cz,lz),uz.frustrumCulled=!1);let r=new me,i=new Zt;i.add(uz),n||=sz=new ze({antialias:!1}),n.setSize(Math.min(e.image.width,t),Math.min(e.image.height,t)),n.clear(),n.render(i,r);let a=new zt(n.domElement);return a.minFilter=e.minFilter,a.magFilter=e.magFilter,a.wrapS=e.wrapS,a.wrapT=e.wrapT,a.name=e.name,sz&&(sz.dispose(),sz=null),a}const fz={POSITION:[`byte`,`byte normalized`,`unsigned byte`,`unsigned byte normalized`,`short`,`short normalized`,`unsigned short`,`unsigned short normalized`],NORMAL:[`byte normalized`,`short normalized`],TANGENT:[`byte normalized`,`short normalized`],TEXCOORD:[`byte`,`byte normalized`,`unsigned byte`,`short`,`short normalized`,`unsigned short`]};var pz=class{constructor(){this.pluginCallbacks=[],this.register(function(e){return new Pz(e)}),this.register(function(e){return new Fz(e)}),this.register(function(e){return new Rz(e)}),this.register(function(e){return new zz(e)}),this.register(function(e){return new Bz(e)}),this.register(function(e){return new Vz(e)}),this.register(function(e){return new Iz(e)}),this.register(function(e){return new Lz(e)}),this.register(function(e){return new Hz(e)}),this.register(function(e){return new Uz(e)}),this.register(function(e){return new Wz(e)})}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let i=new Nz,a=[];for(let e=0,t=this.pluginCallbacks.length;ee.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-t)<.001)return e.times.length-1;r[r.length-1]=t,r.set(e.times,0),i.set(e.values,0),i.set(a.evaluate(t),e.values.length),o=r.length-1}else for(let s=0;st){r.set(e.times.slice(0,s+1),0),r[s+1]=t,r.set(e.times.slice(s+1),s+2),i.set(e.values.slice(0,(s+1)*n),0),i.set(a.evaluate(t),(s+1)*n),i.set(e.values.slice((s+1)*n),(s+2)*n),o=s+1;break}}return e.times=r,e.values=i,o},mergeMorphTargetTracks:function(e,t){let n=[],r={},i=e.tracks;for(let e=0;e4?n=e.array[i*e.itemSize+t]:(t===0?n=e.getX(i):t===1?n=e.getY(i):t===2?n=e.getZ(i):t===3&&(n=e.getW(i)),e.normalized===!0&&(n=Wt.normalize(n,e.array))),r.min[t]=Math.min(r.min[t],n),r.max[t]=Math.max(r.max[t],n)}return r}function kz(e){return Math.ceil(e/4)*4}function Az(e,t=0){let n=kz(e.byteLength);if(n!==e.byteLength){let r=new Uint8Array(n);if(r.set(new Uint8Array(e)),t!==0)for(let i=e.byteLength;i`u`&&typeof OffscreenCanvas<`u`?new OffscreenCanvas(1,1):document.createElement(`canvas`)}function Mz(e,t){if(e.toBlob!==void 0)return new Promise(n=>e.toBlob(n,t));let n;return t===`image/jpeg`?n=.92:t===`image/webp`&&(n=.8),e.convertToBlob({type:t,quality:n})}var Nz=class{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:`2.0`,generator:`THREE.GLTFExporter`}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,t,n={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},n),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);let r=this,i=r.buffers,a=r.json;n=r.options;let o=r.extensionsUsed,s=r.extensionsRequired,c=new Blob(i,{type:`application/octet-stream`}),l=Object.keys(o),u=Object.keys(s);l.length>0&&(a.extensionsUsed=l),u.length>0&&(a.extensionsRequired=u),a.buffers&&a.buffers.length>0&&(a.buffers[0].byteLength=c.size),n.binary===!0?c.arrayBuffer().then(e=>{let n=Az(e),r=new DataView(new ArrayBuffer(Sz));r.setUint32(0,n.byteLength,!0),r.setUint32(4,wz,!0);let i=Az(Ez(JSON.stringify(a)),32),o=new DataView(new ArrayBuffer(Sz));o.setUint32(0,i.byteLength,!0),o.setUint32(4,Cz,!0);let s=new ArrayBuffer(yz),c=new DataView(s);c.setUint32(0,bz,!0),c.setUint32(4,xz,!0);let l=yz+o.byteLength+i.byteLength+r.byteLength+n.byteLength;c.setUint32(8,l,!0),new Blob([s,o,i,r,n],{type:`application/octet-stream`}).arrayBuffer().then(t)}):a.buffers&&a.buffers.length>0?oz(c).then(e=>{a.buffers[0].uri=e,t(a)}):t(a)}serializeUserData(e,t){if(Object.keys(e.userData).length===0)return;let n=this.options,r=this.extensionsUsed;try{let i=JSON.parse(JSON.stringify(e.userData));if(n.includeCustomExtensions&&i.gltfExtensions){for(let e in t.extensions===void 0&&(t.extensions={}),i.gltfExtensions)t.extensions[e]=i.gltfExtensions[e],r[e]=!0;delete i.gltfExtensions}Object.keys(i).length>0&&(t.extras=i)}catch(t){console.warn(`THREE.GLTFExporter: userData of '`+e.name+`' won't be serialized because of JSON.stringify error - `+t.message)}}getUID(e,t=!1){if(this.uids.has(e)===!1){let t=new Map;t.set(!0,this.uid++),t.set(!1,this.uid++),this.uids.set(e,t)}return this.uids.get(e).get(t)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;let t=new P;for(let n=0,r=e.count;n5e-4)return!1;return!0}createNormalizedNormalAttribute(e){let t=this.cache;if(t.attributesNormalized.has(e))return t.attributesNormalized.get(e);let n=e.clone(),r=new P;for(let e=0,t=n.count;e4?r=e.array[i*e.itemSize+n]:(n===0?r=e.getX(i):n===1?r=e.getY(i):n===2?r=e.getZ(i):n===3&&(r=e.getW(i)),e.normalized===!0&&(r=Wt.normalize(r,e.array))),t===mz.FLOAT?c.setFloat32(l,r,!0):t===mz.INT?c.setInt32(l,r,!0):t===mz.UNSIGNED_INT?c.setUint32(l,r,!0):t===mz.SHORT?c.setInt16(l,r,!0):t===mz.UNSIGNED_SHORT?c.setUint16(l,r,!0):t===mz.BYTE?c.setInt8(l,r):t===mz.UNSIGNED_BYTE&&c.setUint8(l,r),l+=o}let u={buffer:this.processBuffer(c.buffer),byteOffset:this.byteOffset,byteLength:s};return i!==void 0&&(u.target=i),i===mz.ARRAY_BUFFER&&(u.byteStride=e.itemSize*o),this.byteOffset+=s,a.bufferViews.push(u),{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){let t=this,n=t.json;return n.bufferViews||=[],e.arrayBuffer().then(e=>{let r=Az(e),i={buffer:t.processBuffer(r),byteOffset:t.byteOffset,byteLength:r.byteLength};return t.byteOffset+=r.byteLength,n.bufferViews.push(i)-1})}processAccessor(e,t,n,r){let i=this.json,a={1:`SCALAR`,2:`VEC2`,3:`VEC3`,4:`VEC4`,9:`MAT3`,16:`MAT4`},o;if(e.array.constructor===Float32Array)o=mz.FLOAT;else if(e.array.constructor===Int32Array)o=mz.INT;else if(e.array.constructor===Uint32Array)o=mz.UNSIGNED_INT;else if(e.array.constructor===Int16Array)o=mz.SHORT;else if(e.array.constructor===Uint16Array)o=mz.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)o=mz.BYTE;else if(e.array.constructor===Uint8Array)o=mz.UNSIGNED_BYTE;else throw Error(`THREE.GLTFExporter: Unsupported bufferAttribute component type: `+e.array.constructor.name);if(n===void 0&&(n=0),r===void 0&&(r=e.count),r===0)return null;let s=Oz(e,n,r),c;t!==void 0&&(c=e===t.index?mz.ELEMENT_ARRAY_BUFFER:mz.ARRAY_BUFFER);let l=this.processBufferView(e,o,n,r,c),u={bufferView:l.id,byteOffset:l.byteOffset,componentType:o,count:r,max:s.max,min:s.min,type:a[e.itemSize]};return e.normalized===!0&&(u.normalized=!0),i.accessors||=[],i.accessors.push(u)-1}processImage(e,t,n,r=`image/png`){if(e!==null){let i=this,a=i.cache,o=i.json,s=i.options,c=i.pending;a.images.has(e)||a.images.set(e,{});let l=a.images.get(e),u=r+`:flipY/`+n.toString();if(l[u]!==void 0)return l[u];o.images||=[];let d={mimeType:r},f=jz();f.width=Math.min(e.width,s.maxTextureSize),f.height=Math.min(e.height,s.maxTextureSize);let p=f.getContext(`2d`);if(n===!0&&(p.translate(0,f.height),p.scale(1,-1)),e.data!==void 0){t!==Je&&console.error(`GLTFExporter: Only RGBAFormat is supported.`,t),(e.width>s.maxTextureSize||e.height>s.maxTextureSize)&&console.warn(`GLTFExporter: Image size is bigger than maxTextureSize`,e);let n=new Uint8ClampedArray(e.height*e.width*4);for(let t=0;ti.processBufferViewImage(e)).then(e=>{d.bufferView=e})):f.toDataURL===void 0?c.push(Mz(f,r).then(oz).then(e=>{d.uri=e})):d.uri=f.toDataURL(r);let m=o.images.push(d)-1;return l[u]=m,m}else throw Error(`THREE.GLTFExporter: No valid image data found. Unable to process texture.`)}processSampler(e){let t=this.json;t.samplers||=[];let n={magFilter:gz[e.magFilter],minFilter:gz[e.minFilter],wrapS:gz[e.wrapS],wrapT:gz[e.wrapT]};return t.samplers.push(n)-1}processTexture(e){let t=this.options,n=this.cache,r=this.json;if(n.textures.has(e))return n.textures.get(e);r.textures||=[],e instanceof Qe&&(e=dz(e,t.maxTextureSize));let i=e.userData.mimeType;i===`image/webp`&&(i=`image/png`);let a={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,i)};e.name&&(a.name=e.name),this._invokeAll(function(t){t.writeTexture&&t.writeTexture(e,a)});let o=r.textures.push(a)-1;return n.textures.set(e,o),o}processMaterial(e){let t=this.cache,n=this.json;if(t.materials.has(e))return t.materials.get(e);if(e.isShaderMaterial)return console.warn(`GLTFExporter: THREE.ShaderMaterial not supported.`),null;n.materials||=[];let r={pbrMetallicRoughness:{}};e.isMeshStandardMaterial!==!0&&e.isMeshBasicMaterial!==!0&&console.warn(`GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.`);let i=e.color.toArray().concat([e.opacity]);if(Tz(i,[1,1,1,1])||(r.pbrMetallicRoughness.baseColorFactor=i),e.isMeshStandardMaterial?(r.pbrMetallicRoughness.metallicFactor=e.metalness,r.pbrMetallicRoughness.roughnessFactor=e.roughness):(r.pbrMetallicRoughness.metallicFactor=.5,r.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){let t=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),n={index:this.processTexture(t),channel:t.channel};this.applyTextureTransform(n,t),r.pbrMetallicRoughness.metallicRoughnessTexture=n}if(e.map){let t={index:this.processTexture(e.map),texCoord:e.map.channel};this.applyTextureTransform(t,e.map),r.pbrMetallicRoughness.baseColorTexture=t}if(e.emissive){let t=e.emissive;if(Math.max(t.r,t.g,t.b)>0&&(r.emissiveFactor=e.emissive.toArray()),e.emissiveMap){let t={index:this.processTexture(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(t,e.emissiveMap),r.emissiveTexture=t}}if(e.normalMap){let t={index:this.processTexture(e.normalMap),texCoord:e.normalMap.channel};e.normalScale&&e.normalScale.x!==1&&(t.scale=e.normalScale.x),this.applyTextureTransform(t,e.normalMap),r.normalTexture=t}if(e.aoMap){let t={index:this.processTexture(e.aoMap),texCoord:e.aoMap.channel};e.aoMapIntensity!==1&&(t.strength=e.aoMapIntensity),this.applyTextureTransform(t,e.aoMap),r.occlusionTexture=t}e.transparent?r.alphaMode=`BLEND`:e.alphaTest>0&&(r.alphaMode=`MASK`,r.alphaCutoff=e.alphaTest),e.side===jt&&(r.doubleSided=!0),e.name!==``&&(r.name=e.name),this.serializeUserData(e,r),this._invokeAll(function(t){t.writeMaterial&&t.writeMaterial(e,r)});let a=n.materials.push(r)-1;return t.materials.set(e,a),a}processMesh(e){let t=this.cache,n=this.json,r=[e.geometry.uuid];if(Array.isArray(e.material))for(let t=0,n=e.material.length;t=152?{uv:`TEXCOORD_0`,uv1:`TEXCOORD_1`,uv2:`TEXCOORD_2`,uv3:`TEXCOORD_3`}:{uv:`TEXCOORD_0`,uv2:`TEXCOORD_1`},color:`COLOR_0`,skinWeight:`WEIGHTS_0`,skinIndex:`JOINTS_0`},f=a.getAttribute(`normal`);f!==void 0&&!this.isNormalizedNormalAttribute(f)&&(console.warn(`THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one.`),a.setAttribute(`normal`,this.createNormalizedNormalAttribute(f)));let p=null;for(let e in a.attributes){if(e.slice(0,5)===`morph`)continue;let n=a.attributes[e];if(e=d[e]||e.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(e)||(e=`_`+e),t.attributes.has(this.getUID(n))){c[e]=t.attributes.get(this.getUID(n));continue}p=null;let r=n.array;e===`JOINTS_0`&&!(r instanceof Uint16Array)&&!(r instanceof Uint8Array)&&(console.warn(`GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.`),p=new Ze(new Uint16Array(r),n.itemSize,n.normalized));let i=this.processAccessor(p||n,a);i!==null&&(e.startsWith(`_`)||this.detectMeshQuantization(e,n),c[e]=i,t.attributes.set(this.getUID(n),i))}if(f!==void 0&&a.setAttribute(`normal`,f),Object.keys(c).length===0)return null;if(e.morphTargetInfluences!==void 0&&e.morphTargetInfluences.length>0){let n=[],r=[],i={};if(e.morphTargetDictionary!==void 0)for(let t in e.morphTargetDictionary)i[e.morphTargetDictionary[t]]=t;for(let o=0;o0&&(s.extras={},s.extras.targetNames=r)}let m=Array.isArray(e.material);if(m&&a.groups.length===0)return null;let h=m?e.material:[e.material],g=m?a.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let e=0,n=g.length;e0&&(n.targets=u),a.index!==null){let r=this.getUID(a.index);(g[e].start!==void 0||g[e].count!==void 0)&&(r+=`:`+g[e].start+`:`+g[e].count),t.attributes.has(r)?n.indices=t.attributes.get(r):(n.indices=this.processAccessor(a.index,a,g[e].start,g[e].count),t.attributes.set(r,n.indices)),n.indices===null&&delete n.indices}let r=this.processMaterial(h[g[e].materialIndex]);r!==null&&(n.material=r),l.push(n)}s.primitives=l,n.meshes||=[],this._invokeAll(function(t){t.writeMesh&&t.writeMesh(e,s)});let _=n.meshes.push(s)-1;return t.meshes.set(i,_),_}detectMeshQuantization(e,t){if(this.extensionsUsed[hz])return;let n;switch(t.array.constructor){case Int8Array:n=`byte`;break;case Uint8Array:n=`unsigned byte`;break;case Int16Array:n=`short`;break;case Uint16Array:n=`unsigned short`;break;default:return}t.normalized&&(n+=` normalized`);let r=e.split(`_`,1)[0];fz[r]&&fz[r].includes(n)&&(this.extensionsUsed[hz]=!0,this.extensionsRequired[hz]=!0)}processCamera(e){let t=this.json;t.cameras||=[];let n=e.isOrthographicCamera,r={type:n?`orthographic`:`perspective`};return n?r.orthographic={xmag:e.right*2,ymag:e.top*2,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:r.perspective={aspectRatio:e.aspect,yfov:Wt.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},e.name!==``&&(r.name=e.type),t.cameras.push(r)-1}processAnimation(e,t){let n=this.json,r=this.nodeMap;n.animations||=[],e=pz.Utils.mergeMorphTargetTracks(e.clone(),t);let i=e.tracks,a=[],o=[];for(let e=0;e0){let t=[];for(let r=0,i=e.children.length;r0&&(i.children=t)}this._invokeAll(function(t){t.writeNode&&t.writeNode(e,i)});let a=t.nodes.push(i)-1;return r.set(e,a),a}processScene(e){let t=this.json,n=this.options;t.scenes||(t.scenes=[],t.scene=0);let r={};e.name!==``&&(r.name=e.name),t.scenes.push(r);let i=[];for(let t=0,r=e.children.length;t0&&(r.nodes=i),this.serializeUserData(e,r)}processObjects(e){let t=new Zt;t.name=`AuxScene`;for(let n=0;n0&&this.processObjects(n);for(let e=0;e0&&(a.range=e.distance)):e.isSpotLight&&(a.type=`spot`,e.distance>0&&(a.range=e.distance),a.spot={},a.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,a.spot.outerConeAngle=e.angle),e.decay!==void 0&&e.decay!==2&&console.warn(`THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2.`),e.target&&(e.target.parent!==e||e.target.position.x!==0||e.target.position.y!==0||e.target.position.z!==-1)&&console.warn(`THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1.`),i[this.name]||(r.extensions=r.extensions||{},r.extensions[this.name]={lights:[]},i[this.name]=!0);let o=r.extensions[this.name].lights;o.push(a),t.extensions=t.extensions||{},t.extensions[this.name]={light:o.length-1}}};let Fz=class{constructor(e){this.writer=e,this.name=`KHR_materials_unlit`}writeMaterial(e,t){if(!e.isMeshBasicMaterial)return;let n=this.writer.extensionsUsed;t.extensions=t.extensions||{},t.extensions[this.name]={},n[this.name]=!0,t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9}},Iz=class{constructor(e){this.writer=e,this.name=`KHR_materials_clearcoat`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.clearcoat===0)return;let n=this.writer,r=n.extensionsUsed,i={};if(i.clearcoatFactor=e.clearcoat,e.clearcoatMap){let t={index:n.processTexture(e.clearcoatMap),texCoord:e.clearcoatMap.channel};n.applyTextureTransform(t,e.clearcoatMap),i.clearcoatTexture=t}if(i.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){let t={index:n.processTexture(e.clearcoatRoughnessMap),texCoord:e.clearcoatRoughnessMap.channel};n.applyTextureTransform(t,e.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=t}if(e.clearcoatNormalMap){let t={index:n.processTexture(e.clearcoatNormalMap),texCoord:e.clearcoatNormalMap.channel};n.applyTextureTransform(t,e.clearcoatNormalMap),i.clearcoatNormalTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Lz=class{constructor(e){this.writer=e,this.name=`KHR_materials_iridescence`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.iridescence===0)return;let n=this.writer,r=n.extensionsUsed,i={};if(i.iridescenceFactor=e.iridescence,e.iridescenceMap){let t={index:n.processTexture(e.iridescenceMap),texCoord:e.iridescenceMap.channel};n.applyTextureTransform(t,e.iridescenceMap),i.iridescenceTexture=t}if(i.iridescenceIor=e.iridescenceIOR,i.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){let t={index:n.processTexture(e.iridescenceThicknessMap),texCoord:e.iridescenceThicknessMap.channel};n.applyTextureTransform(t,e.iridescenceThicknessMap),i.iridescenceThicknessTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Rz=class{constructor(e){this.writer=e,this.name=`KHR_materials_transmission`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;let n=this.writer,r=n.extensionsUsed,i={};if(i.transmissionFactor=e.transmission,e.transmissionMap){let t={index:n.processTexture(e.transmissionMap),texCoord:e.transmissionMap.channel};n.applyTextureTransform(t,e.transmissionMap),i.transmissionTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},zz=class{constructor(e){this.writer=e,this.name=`KHR_materials_volume`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;let n=this.writer,r=n.extensionsUsed,i={};if(i.thicknessFactor=e.thickness,e.thicknessMap){let t={index:n.processTexture(e.thicknessMap),texCoord:e.thicknessMap.channel};n.applyTextureTransform(t,e.thicknessMap),i.thicknessTexture=t}i.attenuationDistance=e.attenuationDistance,i.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Bz=class{constructor(e){this.writer=e,this.name=`KHR_materials_ior`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.ior===1.5)return;let n=this.writer.extensionsUsed,r={};r.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=r,n[this.name]=!0}},Vz=class{constructor(e){this.writer=e,this.name=`KHR_materials_specular`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.specularIntensity===1&&e.specularColor.equals(vz)&&!e.specularIntensityMap&&!e.specularColorTexture)return;let n=this.writer,r=n.extensionsUsed,i={};if(e.specularIntensityMap){let t={index:n.processTexture(e.specularIntensityMap),texCoord:e.specularIntensityMap.channel};n.applyTextureTransform(t,e.specularIntensityMap),i.specularTexture=t}if(e.specularColorMap){let t={index:n.processTexture(e.specularColorMap),texCoord:e.specularColorMap.channel};n.applyTextureTransform(t,e.specularColorMap),i.specularColorTexture=t}i.specularFactor=e.specularIntensity,i.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Hz=class{constructor(e){this.writer=e,this.name=`KHR_materials_sheen`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.sheen==0)return;let n=this.writer,r=n.extensionsUsed,i={};if(e.sheenRoughnessMap){let t={index:n.processTexture(e.sheenRoughnessMap),texCoord:e.sheenRoughnessMap.channel};n.applyTextureTransform(t,e.sheenRoughnessMap),i.sheenRoughnessTexture=t}if(e.sheenColorMap){let t={index:n.processTexture(e.sheenColorMap),texCoord:e.sheenColorMap.channel};n.applyTextureTransform(t,e.sheenColorMap),i.sheenColorTexture=t}i.sheenRoughnessFactor=e.sheenRoughness,i.sheenColorFactor=e.sheenColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Uz=class{constructor(e){this.writer=e,this.name=`KHR_materials_anisotropy`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.anisotropy==0)return;let n=this.writer,r=n.extensionsUsed,i={};if(e.anisotropyMap){let t={index:n.processTexture(e.anisotropyMap)};n.applyTextureTransform(t,e.anisotropyMap),i.anisotropyTexture=t}i.anisotropyStrength=e.anisotropy,i.anisotropyRotation=e.anisotropyRotation,t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Wz=class{constructor(e){this.writer=e,this.name=`KHR_materials_emissive_strength`}writeMaterial(e,t){if(!e.isMeshStandardMaterial||e.emissiveIntensity===1)return;let n=this.writer.extensionsUsed,r={};r.emissiveStrength=e.emissiveIntensity,t.extensions=t.extensions||{},t.extensions[this.name]=r,n[this.name]=!0}};var Gz=Uint8Array,Kz=Uint16Array,qz=Uint32Array,Jz=new Gz([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Yz=new Gz([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Xz=new Gz([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zz=function(e,t){for(var n=new Kz(31),r=0;r<31;++r)n[r]=t+=1<>>1|(iB&21845)<<1;aB=(aB&52428)>>>2|(aB&13107)<<2,aB=(aB&61680)>>>4|(aB&3855)<<4,rB[iB]=((aB&65280)>>>8|(aB&255)<<8)>>>1}for(var oB=function(e,t,n){for(var r=e.length,i=0,a=new Kz(t);i>>c]=l}else for(s=new Kz(r),i=0;i>>15-e[i]);return s},sB=new Gz(288),iB=0;iB<144;++iB)sB[iB]=8;for(var iB=144;iB<256;++iB)sB[iB]=9;for(var iB=256;iB<280;++iB)sB[iB]=7;for(var iB=280;iB<288;++iB)sB[iB]=8;for(var cB=new Gz(32),iB=0;iB<32;++iB)cB[iB]=5;var lB=oB(sB,9,1),uB=oB(cB,5,1),dB=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},fB=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},pB=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},mB=function(e){return(e/8|0)+(e&7&&1)},hB=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Kz?Kz:e instanceof qz?qz:Gz)(n-t);return r.set(e.subarray(t,n)),r},gB=function(e,t,n){var r=e.length;if(!r||n&&!n.l&&r<5)return t||new Gz(0);var i=!t||n,a=!n||n.i;n||={},t||=new Gz(r*3);var o=function(e){var n=t.length;if(e>n){var r=new Gz(Math.max(n*2,e));r.set(t),t=r}},s=n.f||0,c=n.p||0,l=n.b||0,u=n.l,d=n.d,f=n.m,p=n.n,m=r*8;do{if(!u){n.f=s=fB(e,c,1);var h=fB(e,c+1,3);if(c+=3,h)if(h==1)u=lB,d=uB,f=9,p=5;else if(h==2){var g=fB(e,c,31)+257,_=fB(e,c+10,15)+4,v=g+fB(e,c+5,31)+1;c+=14;for(var y=new Gz(v),b=new Gz(19),x=0;x<_;++x)b[Xz[x]]=fB(e,c+x*3,7);c+=_*3;for(var S=dB(b),C=(1<>>4;if(E<16)y[x++]=E;else{var D=0,O=0;for(E==16?(O=3+fB(e,c,3),c+=2,D=y[x-1]):E==17?(O=3+fB(e,c,7),c+=3):E==18&&(O=11+fB(e,c,127),c+=7);O--;)y[x++]=D}}var ee=y.subarray(0,g),te=y.subarray(g);f=dB(ee),p=dB(te),u=oB(ee,f,1),d=oB(te,p,1)}else throw`invalid block type`;else{var E=mB(c)+4,ne=e[E-4]|e[E-3]<<8,k=E+ne;if(k>r){if(a)throw`unexpected EOF`;break}i&&o(l+ne),t.set(e.subarray(E,k),l),n.b=l+=ne,n.p=c=k*8;continue}if(c>m){if(a)throw`unexpected EOF`;break}}i&&o(l+131072);for(var A=(1<>>4;if(c+=D&15,c>m){if(a)throw`unexpected EOF`;break}if(!D)throw`invalid length/literal`;if(ie<256)t[l++]=ie;else if(ie==256){j=c,u=null;break}else{var ae=ie-254;if(ie>264){var x=ie-257,oe=Jz[x];ae=fB(e,c,(1<>>4;if(!se)throw`invalid distance`;c+=se&15;var te=nB[M];if(M>3){var oe=Yz[M];te+=pB(e,c)&(1<m){if(a)throw`unexpected EOF`;break}i&&o(l+131072);for(var ce=l+ae;l>>4>7||(e[0]<<8|e[1])%31)throw`invalid zlib data`;if(e[1]&32)throw`invalid zlib data: preset dictionaries not supported`},yB=typeof TextDecoder<`u`&&new TextDecoder,bB=0;try{yB.decode(_B,{stream:!0}),bB=1}catch{}var xB=Object.defineProperty,SB=(e,t,n)=>t in e?xB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CB=(e,t,n)=>(SB(e,t+``,n),n);const wB=class extends F{constructor(e,t={}){super(e),this.isReflector=!0,this.type=`Reflector`,this.camera=new me;let n=this,r=t.color===void 0?new ot(8355711):new ot(t.color),i=t.textureWidth||512,a=t.textureHeight||512,o=t.clipBias||0,s=t.shader||wB.ReflectorShader,c=t.multisample===void 0?4:t.multisample,l=new Me,u=new P,d=new P,f=new P,p=new bt,m=new P(0,0,-1),h=new _t,g=new P,_=new P,v=new _t,y=new bt,b=this.camera,x=new qe(i,a,{samples:c,type:vt}),S=new ct({uniforms:Ce.clone(s.uniforms),fragmentShader:s.fragmentShader,vertexShader:s.vertexShader});S.uniforms.tDiffuse.value=x.texture,S.uniforms.color.value=r,S.uniforms.textureMatrix.value=y,this.material=S,this.onBeforeRender=function(e,t,r){if(d.setFromMatrixPosition(n.matrixWorld),f.setFromMatrixPosition(r.matrixWorld),p.extractRotation(n.matrixWorld),u.set(0,0,1),u.applyMatrix4(p),g.subVectors(d,f),g.dot(u)>0)return;g.reflect(u).negate(),g.add(d),p.extractRotation(r.matrixWorld),m.set(0,0,-1),m.applyMatrix4(p),m.add(f),_.subVectors(d,m),_.reflect(u).negate(),_.add(d),b.position.copy(g),b.up.set(0,1,0),b.up.applyMatrix4(p),b.up.reflect(u),b.lookAt(_),b.far=r.far,b.updateMatrixWorld(),b.projectionMatrix.copy(r.projectionMatrix),y.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),y.multiply(b.projectionMatrix),y.multiply(b.matrixWorldInverse),y.multiply(n.matrixWorld),l.setFromNormalAndCoplanarPoint(u,d),l.applyMatrix4(b.matrixWorldInverse),h.set(l.normal.x,l.normal.y,l.normal.z,l.constant);let i=b.projectionMatrix;v.x=(Math.sign(h.x)+i.elements[8])/i.elements[0],v.y=(Math.sign(h.y)+i.elements[9])/i.elements[5],v.z=-1,v.w=(1+i.elements[10])/i.elements[14],h.multiplyScalar(2/h.dot(v)),i.elements[2]=h.x,i.elements[6]=h.y,i.elements[10]=h.z+1-o,i.elements[14]=h.w,n.visible=!1;let a=e.getRenderTarget(),s=e.xr.enabled,c=e.shadowMap.autoUpdate,S=e.toneMapping,C=!1;C=`outputColorSpace`in e?e.outputColorSpace===`srgb`:e.outputEncoding===3001,e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,`outputColorSpace`in e?e.outputColorSpace=`srgb-linear`:e.outputEncoding=3e3,e.toneMapping=Ee,e.setRenderTarget(x),e.state.buffers.depth.setMask(!0),e.autoClear===!1&&e.clear(),e.render(t,b),e.xr.enabled=s,e.shadowMap.autoUpdate=c,e.toneMapping=S,`outputColorSpace`in e?e.outputColorSpace=C?`srgb`:`srgb-linear`:e.outputEncoding=C?3001:3e3,e.setRenderTarget(a);let w=r.viewport;w!==void 0&&e.state.viewport(w),n.visible=!0},this.getRenderTarget=function(){return x},this.dispose=function(){x.dispose(),n.material.dispose()}}};let TB=wB;CB(TB,`ReflectorShader`,{uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:` - uniform mat4 textureMatrix; - varying vec4 vUv; - - #include - #include - - void main() { - - vUv = textureMatrix * vec4( position, 1.0 ); - - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - - #include - - }`,fragmentShader:` - uniform vec3 color; - uniform sampler2D tDiffuse; - varying vec4 vUv; - - #include - - float blendOverlay( float base, float blend ) { - - return( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) ); - - } - - vec3 blendOverlay( vec3 base, vec3 blend ) { - - return vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) ); - - } - - void main() { - - #include - - vec4 base = texture2DProj( tDiffuse, vUv ); - gl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 ); - - #include - #include <${ez>=154?`colorspace_fragment`:`encodings_fragment`}> - - }`});var EB=Object.defineProperty,DB=(e,t,n)=>t in e?EB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OB=(e,t,n)=>(DB(e,typeof t==`symbol`?t:t+``,n),n);const kB=new Ut,AB=new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,1,1,0,1,1,-1,1,0,0,1]),jB=new Ct(AB,5);kB.setIndex([0,1,2,0,2,3]),kB.setAttribute(`position`,new $t(jB,3,0,!1)),kB.setAttribute(`uv`,new $t(jB,2,3,!1));const MB=class extends F{constructor(){super(MB.Geometry,new nn({opacity:0,transparent:!0})),this.isLensflare=!0,this.type=`Lensflare`,this.frustumCulled=!1,this.renderOrder=1/0;let e=new P,t=new P,n=new Qt(new Uint8Array(16*16*3),16,16,Je);n.minFilter=nt,n.magFilter=nt,n.wrapS=Ue,n.wrapT=Ue;let r=new Qt(new Uint8Array(16*16*3),16,16,Je);r.minFilter=nt,r.magFilter=nt,r.wrapS=Ue,r.wrapT=Ue;let i=MB.Geometry,a=new ut({uniforms:{scale:{value:null},screenPosition:{value:null}},vertexShader:` - - precision highp float; - - uniform vec3 screenPosition; - uniform vec2 scale; - - attribute vec3 position; - - void main() { - - gl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 ); - - }`,fragmentShader:` - - precision highp float; - - void main() { - - gl_FragColor = vec4( 1.0, 0.0, 1.0, 1.0 ); - - }`,depthTest:!0,depthWrite:!1,transparent:!1}),o=new ut({uniforms:{map:{value:n},scale:{value:null},screenPosition:{value:null}},vertexShader:` - - precision highp float; - - uniform vec3 screenPosition; - uniform vec2 scale; - - attribute vec3 position; - attribute vec2 uv; - - varying vec2 vUV; - - void main() { - - vUV = uv; - - gl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 ); - - }`,fragmentShader:` - - precision highp float; - - uniform sampler2D map; - - varying vec2 vUV; - - void main() { - - gl_FragColor = texture2D( map, vUV ); - - }`,depthTest:!1,depthWrite:!1,transparent:!1}),s=new F(i,a),c=[],l=PB.Shader,u=new ut({uniforms:{map:{value:null},occlusionMap:{value:r},color:{value:new ot(16777215)},scale:{value:new Xt},screenPosition:{value:new P}},vertexShader:l.vertexShader,fragmentShader:l.fragmentShader,blending:Be,transparent:!0,depthWrite:!1}),d=new F(i,u);this.addElement=function(e){c.push(e)};let f=new Xt,p=new Xt,m=new De,h=new _t;this.onBeforeRender=function(l,g,_){l.getCurrentViewport(h);let v=h.w/h.z,y=h.z/2,b=h.w/2,x=16/h.w;if(f.set(x*v,x),m.min.set(h.x,h.y),m.max.set(h.x+(h.z-16),h.y+(h.w-16)),t.setFromMatrixPosition(this.matrixWorld),t.applyMatrix4(_.matrixWorldInverse),!(t.z>0)&&(e.copy(t).applyMatrix4(_.projectionMatrix),p.x=h.x+e.x*y+y-8,p.y=h.y+e.y*b+b-8,m.containsPoint(p))){l.copyFramebufferToTexture(p,n);let t=a.uniforms;t.scale.value=f,t.screenPosition.value=e,l.renderBufferDirect(_,null,i,a,s,null),l.copyFramebufferToTexture(p,r),t=o.uniforms,t.scale.value=f,t.screenPosition.value=e,l.renderBufferDirect(_,null,i,o,s,null);let m=-e.x*2,g=-e.y*2;for(let t=0,n=c.length;t - #include - #include - #include - - void main() { - mirrorCoord = modelMatrix * vec4( position, 1.0 ); - worldPosition = mirrorCoord.xyzw; - mirrorCoord = textureMatrix * mirrorCoord; - vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); - gl_Position = projectionMatrix * mvPosition; - - #include - #include - #include - #include - #include - }`,fragmentShader:` - uniform sampler2D mirrorSampler; - uniform float alpha; - uniform float time; - uniform float size; - uniform float distortionScale; - uniform sampler2D normalSampler; - uniform vec3 sunColor; - uniform vec3 sunDirection; - uniform vec3 eye; - uniform vec3 waterColor; - - varying vec4 mirrorCoord; - varying vec4 worldPosition; - - vec4 getNoise( vec2 uv ) { - vec2 uv0 = ( uv / 103.0 ) + vec2(time / 17.0, time / 29.0); - vec2 uv1 = uv / 107.0-vec2( time / -19.0, time / 31.0 ); - vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( time / 101.0, time / 97.0 ); - vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( time / 109.0, time / -113.0 ); - vec4 noise = texture2D( normalSampler, uv0 ) + - texture2D( normalSampler, uv1 ) + - texture2D( normalSampler, uv2 ) + - texture2D( normalSampler, uv3 ); - return noise * 0.5 - 1.0; - } - - void sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) { - vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) ); - float direction = max( 0.0, dot( eyeDirection, reflection ) ); - specularColor += pow( direction, shiny ) * sunColor * spec; - diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * sunColor * diffuse; - } - - #include - #include - #include - #include - #include - #include - #include - #include - - void main() { - - #include - vec4 noise = getNoise( worldPosition.xz * size ); - vec3 surfaceNormal = normalize( noise.xzy * vec3( 1.5, 1.0, 1.5 ) ); - - vec3 diffuseLight = vec3(0.0); - vec3 specularLight = vec3(0.0); - - vec3 worldToEye = eye-worldPosition.xyz; - vec3 eyeDirection = normalize( worldToEye ); - sunLight( surfaceNormal, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight ); - - float distance = length(worldToEye); - - vec2 distortion = surfaceNormal.xz * ( 0.001 + 1.0 / distance ) * distortionScale; - vec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) ); - - float theta = max( dot( eyeDirection, surfaceNormal ), 0.0 ); - float rf0 = 0.3; - float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 ); - vec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor; - vec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance); - vec3 outgoingLight = albedo; - gl_FragColor = vec4( outgoingLight, alpha ); - - #include - #include <${parseInt(xe.replace(/\D+/g,``))>=154?`colorspace_fragment`:`encodings_fragment`}> - #include - }`},te=new ct({fragmentShader:ee.fragmentShader,vertexShader:ee.vertexShader,uniforms:Ce.clone(ee.uniforms),lights:!0,side:m,fog:h});te.uniforms.mirrorSampler.value=O.texture,te.uniforms.textureMatrix.value=E,te.uniforms.alpha.value=o,te.uniforms.time.value=s,te.uniforms.normalSampler.value=c,te.uniforms.sunColor.value=u,te.uniforms.waterColor.value=d,te.uniforms.sunDirection.value=l,te.uniforms.distortionScale.value=p,te.uniforms.eye.value=f,n.material=te,n.onBeforeRender=function(e,t,r){if(v.setFromMatrixPosition(n.matrixWorld),y.setFromMatrixPosition(r.matrixWorld),b.extractRotation(n.matrixWorld),_.set(0,0,1),_.applyMatrix4(b),C.subVectors(v,y),C.dot(_)>0)return;C.reflect(_).negate(),C.add(v),b.extractRotation(r.matrixWorld),x.set(0,0,-1),x.applyMatrix4(b),x.add(y),w.subVectors(v,x),w.reflect(_).negate(),w.add(v),D.position.copy(C),D.up.set(0,1,0),D.up.applyMatrix4(b),D.up.reflect(_),D.lookAt(w),D.far=r.far,D.updateMatrixWorld(),D.projectionMatrix.copy(r.projectionMatrix),E.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),E.multiply(D.projectionMatrix),E.multiply(D.matrixWorldInverse),g.setFromNormalAndCoplanarPoint(_,v),g.applyMatrix4(D.matrixWorldInverse),S.set(g.normal.x,g.normal.y,g.normal.z,g.constant);let i=D.projectionMatrix;T.x=(Math.sign(S.x)+i.elements[8])/i.elements[0],T.y=(Math.sign(S.y)+i.elements[9])/i.elements[5],T.z=-1,T.w=(1+i.elements[10])/i.elements[14],S.multiplyScalar(2/S.dot(T)),i.elements[2]=S.x,i.elements[6]=S.y,i.elements[10]=S.z+1-a,i.elements[14]=S.w,f.setFromMatrixPosition(r.matrixWorld);let o=e.getRenderTarget(),s=e.xr.enabled,c=e.shadowMap.autoUpdate;n.visible=!1,e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,e.setRenderTarget(O),e.state.buffers.depth.setMask(!0),e.autoClear===!1&&e.clear(),e.render(t,D),n.visible=!0,e.xr.enabled=s,e.shadowMap.autoUpdate=c,e.setRenderTarget(o);let l=r.viewport;l!==void 0&&e.state.viewport(l)}}},IB=Object.defineProperty,LB=(e,t,n)=>t in e?IB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,RB=(e,t,n)=>(LB(e,typeof t==`symbol`?t:t+``,n),n);const zB={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new P},up:{value:new P(0,1,0)}},vertexShader:` - uniform vec3 sunPosition; - uniform float rayleigh; - uniform float turbidity; - uniform float mieCoefficient; - uniform vec3 up; - - varying vec3 vWorldPosition; - varying vec3 vSunDirection; - varying float vSunfade; - varying vec3 vBetaR; - varying vec3 vBetaM; - varying float vSunE; - - // constants for atmospheric scattering - const float e = 2.71828182845904523536028747135266249775724709369995957; - const float pi = 3.141592653589793238462643383279502884197169; - - // wavelength of used primaries, according to preetham - const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 ); - // this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function: - // (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn)) - const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 ); - - // mie stuff - // K coefficient for the primaries - const float v = 4.0; - const vec3 K = vec3( 0.686, 0.678, 0.666 ); - // MieConst = pi * pow( ( 2.0 * pi ) / lambda, vec3( v - 2.0 ) ) * K - const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 ); - - // earth shadow hack - // cutoffAngle = pi / 1.95; - const float cutoffAngle = 1.6110731556870734; - const float steepness = 1.5; - const float EE = 1000.0; - - float sunIntensity( float zenithAngleCos ) { - zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 ); - return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) ); - } - - vec3 totalMie( float T ) { - float c = ( 0.2 * T ) * 10E-18; - return 0.434 * c * MieConst; - } - - void main() { - - vec4 worldPosition = modelMatrix * vec4( position, 1.0 ); - vWorldPosition = worldPosition.xyz; - - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - gl_Position.z = gl_Position.w; // set z to camera.far - - vSunDirection = normalize( sunPosition ); - - vSunE = sunIntensity( dot( vSunDirection, up ) ); - - vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 ); - - float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) ); - - // extinction (absorbtion + out scattering) - // rayleigh coefficients - vBetaR = totalRayleigh * rayleighCoefficient; - - // mie coefficients - vBetaM = totalMie( turbidity ) * mieCoefficient; - - } - `,fragmentShader:` - varying vec3 vWorldPosition; - varying vec3 vSunDirection; - varying float vSunfade; - varying vec3 vBetaR; - varying vec3 vBetaM; - varying float vSunE; - - uniform float mieDirectionalG; - uniform vec3 up; - - const vec3 cameraPos = vec3( 0.0, 0.0, 0.0 ); - - // constants for atmospheric scattering - const float pi = 3.141592653589793238462643383279502884197169; - - const float n = 1.0003; // refractive index of air - const float N = 2.545E25; // number of molecules per unit volume for air at 288.15K and 1013mb (sea level -45 celsius) - - // optical length at zenith for molecules - const float rayleighZenithLength = 8.4E3; - const float mieZenithLength = 1.25E3; - // 66 arc seconds -> degrees, and the cosine of that - const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324; - - // 3.0 / ( 16.0 * pi ) - const float THREE_OVER_SIXTEENPI = 0.05968310365946075; - // 1.0 / ( 4.0 * pi ) - const float ONE_OVER_FOURPI = 0.07957747154594767; - - float rayleighPhase( float cosTheta ) { - return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) ); - } - - float hgPhase( float cosTheta, float g ) { - float g2 = pow( g, 2.0 ); - float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 ); - return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse ); - } - - void main() { - - vec3 direction = normalize( vWorldPosition - cameraPos ); - - // optical length - // cutoff angle at 90 to avoid singularity in next formula. - float zenithAngle = acos( max( 0.0, dot( up, direction ) ) ); - float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) ); - float sR = rayleighZenithLength * inverse; - float sM = mieZenithLength * inverse; - - // combined extinction factor - vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) ); - - // in scattering - float cosTheta = dot( direction, vSunDirection ); - - float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 ); - vec3 betaRTheta = vBetaR * rPhase; - - float mPhase = hgPhase( cosTheta, mieDirectionalG ); - vec3 betaMTheta = vBetaM * mPhase; - - vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) ); - Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) ); - - // nightsky - float theta = acos( direction.y ); // elevation --> y-axis, [-pi/2, pi/2] - float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2] - vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 ); - vec3 L0 = vec3( 0.1 ) * Fex; - - // composition + solar disc - float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta ); - L0 += ( vSunE * 19000.0 * Fex ) * sundisk; - - vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 ); - - vec3 retColor = pow( texColor, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) ); - - gl_FragColor = vec4( retColor, 1.0 ); - - #include - #include <${ez>=154?`colorspace_fragment`:`encodings_fragment`}> - - } - `},BB=new ct({name:`SkyShader`,fragmentShader:zB.fragmentShader,vertexShader:zB.vertexShader,uniforms:Ce.clone(zB.uniforms),side:xt,depthWrite:!1});var VB=class extends F{constructor(){super(new tn(1,1,1),BB)}};RB(VB,`SkyShader`,zB),RB(VB,`material`,BB);const HB=new Ne,UB=new P;var WB=class{constructor(e){let t=e.geometry;t.index&&(console.warn(`THREE.MeshSurfaceSampler: Converting geometry to non-indexed BufferGeometry.`),t=t.toNonIndexed()),this.geometry=t,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute(`position`),this.colorAttribute=this.geometry.getAttribute(`color`),this.weightAttribute=null,this.distribution=null}setWeightAttribute(e){return this.weightAttribute=e?this.geometry.getAttribute(e):null,this}build(){let e=this.positionAttribute,t=this.weightAttribute,n=new Float32Array(e.count/3);for(let r=0;re){i=a;break}else e1&&(i=1-i,a=1-a),HB.a.fromBufferAttribute(this.positionAttribute,e*3),HB.b.fromBufferAttribute(this.positionAttribute,e*3+1),HB.c.fromBufferAttribute(this.positionAttribute,e*3+2),t.set(0,0,0).addScaledVector(HB.a,i).addScaledVector(HB.b,a).addScaledVector(HB.c,1-(i+a)),n!==void 0&&HB.getNormal(n),r!==void 0&&this.colorAttribute!==void 0&&(HB.a.fromBufferAttribute(this.colorAttribute,e*3),HB.b.fromBufferAttribute(this.colorAttribute,e*3+1),HB.c.fromBufferAttribute(this.colorAttribute,e*3+2),UB.set(0,0,0).addScaledVector(HB.a,i).addScaledVector(HB.b,a).addScaledVector(HB.c,1-(i+a)),r.r=UB.x,r.g=UB.y,r.b=UB.z),this}},GB=Object.defineProperty,KB=(e,t,n)=>t in e?GB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t,n)=>(KB(e,typeof t==`symbol`?t:t+``,n),n),qB=class extends N{constructor(e,t){super(),Q(this,`isTransformControls`,!0),Q(this,`visible`,!1),Q(this,`domElement`),Q(this,`raycaster`,new Gt),Q(this,`gizmo`),Q(this,`plane`),Q(this,`tempVector`,new P),Q(this,`tempVector2`,new P),Q(this,`tempQuaternion`,new Pe),Q(this,`unit`,{X:new P(1,0,0),Y:new P(0,1,0),Z:new P(0,0,1)}),Q(this,`pointStart`,new P),Q(this,`pointEnd`,new P),Q(this,`offset`,new P),Q(this,`rotationAxis`,new P),Q(this,`startNorm`,new P),Q(this,`endNorm`,new P),Q(this,`rotationAngle`,0),Q(this,`cameraPosition`,new P),Q(this,`cameraQuaternion`,new Pe),Q(this,`cameraScale`,new P),Q(this,`parentPosition`,new P),Q(this,`parentQuaternion`,new Pe),Q(this,`parentQuaternionInv`,new Pe),Q(this,`parentScale`,new P),Q(this,`worldPositionStart`,new P),Q(this,`worldQuaternionStart`,new Pe),Q(this,`worldScaleStart`,new P),Q(this,`worldPosition`,new P),Q(this,`worldQuaternion`,new Pe),Q(this,`worldQuaternionInv`,new Pe),Q(this,`worldScale`,new P),Q(this,`eye`,new P),Q(this,`positionStart`,new P),Q(this,`quaternionStart`,new Pe),Q(this,`scaleStart`,new P),Q(this,`camera`),Q(this,`object`),Q(this,`enabled`,!0),Q(this,`axis`,null),Q(this,`mode`,`translate`),Q(this,`translationSnap`,null),Q(this,`rotationSnap`,null),Q(this,`scaleSnap`,null),Q(this,`space`,`world`),Q(this,`size`,1),Q(this,`dragging`,!1),Q(this,`showX`,!0),Q(this,`showY`,!0),Q(this,`showZ`,!0),Q(this,`changeEvent`,{type:`change`}),Q(this,`mouseDownEvent`,{type:`mouseDown`,mode:this.mode}),Q(this,`mouseUpEvent`,{type:`mouseUp`,mode:this.mode}),Q(this,`objectChangeEvent`,{type:`objectChange`}),Q(this,`intersectObjectWithRay`,(e,t,n)=>{let r=t.intersectObject(e,!0);for(let e=0;e(this.object=e,this.visible=!0,this)),Q(this,`detach`,()=>(this.object=void 0,this.visible=!1,this.axis=null,this)),Q(this,`reset`,()=>(this.enabled&&this.dragging&&this.object!==void 0&&(this.object.position.copy(this.positionStart),this.object.quaternion.copy(this.quaternionStart),this.object.scale.copy(this.scaleStart),this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent),this.pointStart.copy(this.pointEnd)),this)),Q(this,`updateMatrixWorld`,()=>{this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error(`TransformControls: The attached 3D object must be a part of the scene graph.`):this.object.parent.matrixWorld.decompose(this.parentPosition,this.parentQuaternion,this.parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this.worldScale),this.parentQuaternionInv.copy(this.parentQuaternion).invert(),this.worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this.cameraScale),this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld()}),Q(this,`pointerHover`,e=>{if(this.object===void 0||this.dragging===!0)return;this.raycaster.setFromCamera(e,this.camera);let t=this.intersectObjectWithRay(this.gizmo.picker[this.mode],this.raycaster);t?this.axis=t.object.name:this.axis=null}),Q(this,`pointerDown`,e=>{if(!(this.object===void 0||this.dragging===!0||e.button!==0)&&this.axis!==null){this.raycaster.setFromCamera(e,this.camera);let t=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(t){let e=this.space;if(this.mode===`scale`?e=`local`:(this.axis===`E`||this.axis===`XYZE`||this.axis===`XYZ`)&&(e=`world`),e===`local`&&this.mode===`rotate`){let e=this.rotationSnap;this.axis===`X`&&e&&(this.object.rotation.x=Math.round(this.object.rotation.x/e)*e),this.axis===`Y`&&e&&(this.object.rotation.y=Math.round(this.object.rotation.y/e)*e),this.axis===`Z`&&e&&(this.object.rotation.z=Math.round(this.object.rotation.z/e)*e)}this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.positionStart.copy(this.object.position),this.quaternionStart.copy(this.object.quaternion),this.scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this.worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)}this.dragging=!0,this.mouseDownEvent.mode=this.mode,this.dispatchEvent(this.mouseDownEvent)}}),Q(this,`pointerMove`,e=>{let t=this.axis,n=this.mode,r=this.object,i=this.space;if(n===`scale`?i=`local`:(t===`E`||t===`XYZE`||t===`XYZ`)&&(i=`world`),r===void 0||t===null||this.dragging===!1||e.button!==-1)return;this.raycaster.setFromCamera(e,this.camera);let a=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(a){if(this.pointEnd.copy(a.point).sub(this.worldPositionStart),n===`translate`)this.offset.copy(this.pointEnd).sub(this.pointStart),i===`local`&&t!==`XYZ`&&this.offset.applyQuaternion(this.worldQuaternionInv),t.indexOf(`X`)===-1&&(this.offset.x=0),t.indexOf(`Y`)===-1&&(this.offset.y=0),t.indexOf(`Z`)===-1&&(this.offset.z=0),i===`local`&&t!==`XYZ`?this.offset.applyQuaternion(this.quaternionStart).divide(this.parentScale):this.offset.applyQuaternion(this.parentQuaternionInv).divide(this.parentScale),r.position.copy(this.offset).add(this.positionStart),this.translationSnap&&(i===`local`&&(r.position.applyQuaternion(this.tempQuaternion.copy(this.quaternionStart).invert()),t.search(`X`)!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),t.search(`Y`)!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),t.search(`Z`)!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this.quaternionStart)),i===`world`&&(r.parent&&r.position.add(this.tempVector.setFromMatrixPosition(r.parent.matrixWorld)),t.search(`X`)!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),t.search(`Y`)!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),t.search(`Z`)!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(this.tempVector.setFromMatrixPosition(r.parent.matrixWorld))));else if(n===`scale`){if(t.search(`XYZ`)!==-1){let e=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(e*=-1),this.tempVector2.set(e,e,e)}else this.tempVector.copy(this.pointStart),this.tempVector2.copy(this.pointEnd),this.tempVector.applyQuaternion(this.worldQuaternionInv),this.tempVector2.applyQuaternion(this.worldQuaternionInv),this.tempVector2.divide(this.tempVector),t.search(`X`)===-1&&(this.tempVector2.x=1),t.search(`Y`)===-1&&(this.tempVector2.y=1),t.search(`Z`)===-1&&(this.tempVector2.z=1);r.scale.copy(this.scaleStart).multiply(this.tempVector2),this.scaleSnap&&this.object&&(t.search(`X`)!==-1&&(this.object.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search(`Y`)!==-1&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search(`Z`)!==-1&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(n===`rotate`){this.offset.copy(this.pointEnd).sub(this.pointStart);let e=20/this.worldPosition.distanceTo(this.tempVector.setFromMatrixPosition(this.camera.matrixWorld));t===`E`?(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this.startNorm.copy(this.pointStart).normalize(),this.endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this.endNorm.cross(this.startNorm).dot(this.eye)<0?1:-1):t===`XYZE`?(this.rotationAxis.copy(this.offset).cross(this.eye).normalize(),this.rotationAngle=this.offset.dot(this.tempVector.copy(this.rotationAxis).cross(this.eye))*e):(t===`X`||t===`Y`||t===`Z`)&&(this.rotationAxis.copy(this.unit[t]),this.tempVector.copy(this.unit[t]),i===`local`&&this.tempVector.applyQuaternion(this.worldQuaternion),this.rotationAngle=this.offset.dot(this.tempVector.cross(this.eye).normalize())*e),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),i===`local`&&t!==`E`&&t!==`XYZE`?(r.quaternion.copy(this.quaternionStart),r.quaternion.multiply(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this.parentQuaternionInv),r.quaternion.copy(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this.quaternionStart).normalize())}this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent)}}),Q(this,`pointerUp`,e=>{e.button===0&&(this.dragging&&this.axis!==null&&(this.mouseUpEvent.mode=this.mode,this.dispatchEvent(this.mouseUpEvent)),this.dragging=!1,this.axis=null)}),Q(this,`getPointer`,e=>{var t;if(this.domElement&&(t=this.domElement.ownerDocument)!=null&&t.pointerLockElement)return{x:0,y:0,button:e.button};{let t=e.changedTouches?e.changedTouches[0]:e,n=this.domElement.getBoundingClientRect();return{x:(t.clientX-n.left)/n.width*2-1,y:-(t.clientY-n.top)/n.height*2+1,button:e.button}}}),Q(this,`onPointerHover`,e=>{if(this.enabled)switch(e.pointerType){case`mouse`:case`pen`:this.pointerHover(this.getPointer(e));break}}),Q(this,`onPointerDown`,e=>{!this.enabled||!this.domElement||(this.domElement.style.touchAction=`none`,this.domElement.ownerDocument.addEventListener(`pointermove`,this.onPointerMove),this.pointerHover(this.getPointer(e)),this.pointerDown(this.getPointer(e)))}),Q(this,`onPointerMove`,e=>{this.enabled&&this.pointerMove(this.getPointer(e))}),Q(this,`onPointerUp`,e=>{!this.enabled||!this.domElement||(this.domElement.style.touchAction=``,this.domElement.ownerDocument.removeEventListener(`pointermove`,this.onPointerMove),this.pointerUp(this.getPointer(e)))}),Q(this,`getMode`,()=>this.mode),Q(this,`setMode`,e=>{this.mode=e}),Q(this,`setTranslationSnap`,e=>{this.translationSnap=e}),Q(this,`setRotationSnap`,e=>{this.rotationSnap=e}),Q(this,`setScaleSnap`,e=>{this.scaleSnap=e}),Q(this,`setSize`,e=>{this.size=e}),Q(this,`setSpace`,e=>{this.space=e}),Q(this,`update`,()=>{console.warn(`THREE.TransformControls: update function has no more functionality and therefore has been deprecated.`)}),Q(this,`connect`,e=>{e===document&&console.error(`THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.`),this.domElement=e,this.domElement.addEventListener(`pointerdown`,this.onPointerDown),this.domElement.addEventListener(`pointermove`,this.onPointerHover),this.domElement.ownerDocument.addEventListener(`pointerup`,this.onPointerUp)}),Q(this,`dispose`,()=>{var e,t,n,r,i,a;(e=this.domElement)==null||e.removeEventListener(`pointerdown`,this.onPointerDown),(t=this.domElement)==null||t.removeEventListener(`pointermove`,this.onPointerHover),(r=(n=this.domElement)?.ownerDocument)==null||r.removeEventListener(`pointermove`,this.onPointerMove),(a=(i=this.domElement)?.ownerDocument)==null||a.removeEventListener(`pointerup`,this.onPointerUp),this.traverse(e=>{let t=e;t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()})}),this.domElement=t,this.camera=e,this.gizmo=new JB,this.add(this.gizmo),this.plane=new YB,this.add(this.plane);let n=(e,t)=>{let n=t;Object.defineProperty(this,e,{get:function(){return n===void 0?t:n},set:function(t){n!==t&&(n=t,this.plane[e]=t,this.gizmo[e]=t,this.dispatchEvent({type:e+`-changed`,value:t}),this.dispatchEvent(this.changeEvent))}}),this[e]=t,this.plane[e]=t,this.gizmo[e]=t};n(`camera`,this.camera),n(`object`,this.object),n(`enabled`,this.enabled),n(`axis`,this.axis),n(`mode`,this.mode),n(`translationSnap`,this.translationSnap),n(`rotationSnap`,this.rotationSnap),n(`scaleSnap`,this.scaleSnap),n(`space`,this.space),n(`size`,this.size),n(`dragging`,this.dragging),n(`showX`,this.showX),n(`showY`,this.showY),n(`showZ`,this.showZ),n(`worldPosition`,this.worldPosition),n(`worldPositionStart`,this.worldPositionStart),n(`worldQuaternion`,this.worldQuaternion),n(`worldQuaternionStart`,this.worldQuaternionStart),n(`cameraPosition`,this.cameraPosition),n(`cameraQuaternion`,this.cameraQuaternion),n(`pointStart`,this.pointStart),n(`pointEnd`,this.pointEnd),n(`rotationAxis`,this.rotationAxis),n(`rotationAngle`,this.rotationAngle),n(`eye`,this.eye),t!==void 0&&this.connect(t)}},JB=class extends N{constructor(){super(),Q(this,`isTransformControlsGizmo`,!0),Q(this,`type`,`TransformControlsGizmo`),Q(this,`tempVector`,new P(0,0,0)),Q(this,`tempEuler`,new Dt),Q(this,`alignVector`,new P(0,1,0)),Q(this,`zeroVector`,new P(0,0,0)),Q(this,`lookAtMatrix`,new bt),Q(this,`tempQuaternion`,new Pe),Q(this,`tempQuaternion2`,new Pe),Q(this,`identityQuaternion`,new Pe),Q(this,`unitX`,new P(1,0,0)),Q(this,`unitY`,new P(0,1,0)),Q(this,`unitZ`,new P(0,0,1)),Q(this,`gizmo`),Q(this,`picker`),Q(this,`helper`),Q(this,`rotationAxis`,new P),Q(this,`cameraPosition`,new P),Q(this,`worldPositionStart`,new P),Q(this,`worldQuaternionStart`,new Pe),Q(this,`worldPosition`,new P),Q(this,`worldQuaternion`,new Pe),Q(this,`eye`,new P),Q(this,`camera`,null),Q(this,`enabled`,!0),Q(this,`axis`,null),Q(this,`mode`,`translate`),Q(this,`space`,`world`),Q(this,`size`,1),Q(this,`dragging`,!1),Q(this,`showX`,!0),Q(this,`showY`,!0),Q(this,`showZ`,!0),Q(this,`updateMatrixWorld`,()=>{let e=this.space;this.mode===`scale`&&(e=`local`);let t=e===`local`?this.worldQuaternion:this.identityQuaternion;this.gizmo.translate.visible=this.mode===`translate`,this.gizmo.rotate.visible=this.mode===`rotate`,this.gizmo.scale.visible=this.mode===`scale`,this.helper.translate.visible=this.mode===`translate`,this.helper.rotate.visible=this.mode===`rotate`,this.helper.scale.visible=this.mode===`scale`;let n=[];n=n.concat(this.picker[this.mode].children),n=n.concat(this.gizmo[this.mode].children),n=n.concat(this.helper[this.mode].children);for(let e=0;e.9&&(r.visible=!1)),this.axis===`Y`&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,0,Math.PI/2)),r.quaternion.copy(t).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye))>.9&&(r.visible=!1)),this.axis===`Z`&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),r.quaternion.copy(t).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye))>.9&&(r.visible=!1)),this.axis===`XYZE`&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),this.alignVector.copy(this.rotationAxis),r.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.zeroVector,this.alignVector,this.unitY)),r.quaternion.multiply(this.tempQuaternion),r.visible=this.dragging),this.axis===`E`&&(r.visible=!1)):r.name===`START`?(r.position.copy(this.worldPositionStart),r.visible=this.dragging):r.name===`END`?(r.position.copy(this.worldPosition),r.visible=this.dragging):r.name===`DELTA`?(r.position.copy(this.worldPositionStart),r.quaternion.copy(this.worldQuaternionStart),this.tempVector.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),this.tempVector.applyQuaternion(this.worldQuaternionStart.clone().invert()),r.scale.copy(this.tempVector),r.visible=this.dragging):(r.quaternion.copy(t),this.dragging?r.position.copy(this.worldPositionStart):r.position.copy(this.worldPosition),this.axis&&(r.visible=this.axis.search(r.name)!==-1));continue}r.quaternion.copy(t),this.mode===`translate`||this.mode===`scale`?((r.name===`X`||r.name===`XYZX`)&&Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(t).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),(r.name===`Y`||r.name===`XYZY`)&&Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),(r.name===`Z`||r.name===`XYZZ`)&&Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`XY`&&Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`YZ`&&Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(t).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`XZ`&&Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name.search(`X`)!==-1&&(this.alignVector.copy(this.unitX).applyQuaternion(t).dot(this.eye)<0?r.tag===`fwd`?r.visible=!1:r.scale.x*=-1:r.tag===`bwd`&&(r.visible=!1)),r.name.search(`Y`)!==-1&&(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye)<0?r.tag===`fwd`?r.visible=!1:r.scale.y*=-1:r.tag===`bwd`&&(r.visible=!1)),r.name.search(`Z`)!==-1&&(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye)<0?r.tag===`fwd`?r.visible=!1:r.scale.z*=-1:r.tag===`bwd`&&(r.visible=!1))):this.mode===`rotate`&&(this.tempQuaternion2.copy(t),this.alignVector.copy(this.eye).applyQuaternion(this.tempQuaternion.copy(t).invert()),r.name.search(`E`)!==-1&&r.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.eye,this.zeroVector,this.unitY)),r.name===`X`&&(this.tempQuaternion.setFromAxisAngle(this.unitX,Math.atan2(-this.alignVector.y,this.alignVector.z)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),r.quaternion.copy(this.tempQuaternion)),r.name===`Y`&&(this.tempQuaternion.setFromAxisAngle(this.unitY,Math.atan2(this.alignVector.x,this.alignVector.z)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),r.quaternion.copy(this.tempQuaternion)),r.name===`Z`&&(this.tempQuaternion.setFromAxisAngle(this.unitZ,Math.atan2(this.alignVector.y,this.alignVector.x)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),r.quaternion.copy(this.tempQuaternion))),r.visible=r.visible&&(r.name.indexOf(`X`)===-1||this.showX),r.visible=r.visible&&(r.name.indexOf(`Y`)===-1||this.showY),r.visible=r.visible&&(r.name.indexOf(`Z`)===-1||this.showZ),r.visible=r.visible&&(r.name.indexOf(`E`)===-1||this.showX&&this.showY&&this.showZ),r.material.tempOpacity=r.material.tempOpacity||r.material.opacity,r.material.tempColor=r.material.tempColor||r.material.color.clone(),r.material.color.copy(r.material.tempColor),r.material.opacity=r.material.tempOpacity,this.enabled?this.axis&&(r.name===this.axis||this.axis.split(``).some(function(e){return r.name===e})?(r.material.opacity=1,r.material.color.lerp(new ot(1,1,1),.5)):(r.material.opacity*=.25,r.material.color.lerp(new ot(1,1,1),.5))):(r.material.opacity*=.5,r.material.color.lerp(new ot(1,1,1),.5))}super.updateMatrixWorld()});let e=new nn({depthTest:!1,depthWrite:!1,transparent:!0,side:jt,fog:!1,toneMapped:!1}),t=new Ft({depthTest:!1,depthWrite:!1,transparent:!0,linewidth:1,fog:!1,toneMapped:!1}),n=e.clone();n.opacity=.15;let r=e.clone();r.opacity=.33;let i=e.clone();i.color.set(16711680);let a=e.clone();a.color.set(65280);let o=e.clone();o.color.set(255);let s=e.clone();s.opacity=.25;let c=s.clone();c.color.set(16776960);let l=s.clone();l.color.set(65535);let u=s.clone();u.color.set(16711935),e.clone().color.set(16776960);let d=t.clone();d.color.set(16711680);let f=t.clone();f.color.set(65280);let p=t.clone();p.color.set(255);let m=t.clone();m.color.set(65535);let h=t.clone();h.color.set(16711935);let g=t.clone();g.color.set(16776960);let _=t.clone();_.color.set(7895160);let v=g.clone();v.opacity=.25;let y=new ht(0,.05,.2,12,1,!1),b=new tn(.125,.125,.125),x=new Ut;x.setAttribute(`position`,new rt([0,0,0,1,0,0],3));let S=(e,t)=>{let n=new Ut,r=[];for(let n=0;n<=64*t;++n)r.push(0,Math.cos(n/32*Math.PI)*e,Math.sin(n/32*Math.PI)*e);return n.setAttribute(`position`,new rt(r,3)),n},C=()=>{let e=new Ut;return e.setAttribute(`position`,new rt([0,0,0,1,1,1],3)),e},w={X:[[new F(y,i),[1,0,0],[0,0,-Math.PI/2],null,`fwd`],[new F(y,i),[1,0,0],[0,0,Math.PI/2],null,`bwd`],[new ye(x,d)]],Y:[[new F(y,a),[0,1,0],null,null,`fwd`],[new F(y,a),[0,1,0],[Math.PI,0,0],null,`bwd`],[new ye(x,f),null,[0,0,Math.PI/2]]],Z:[[new F(y,o),[0,0,1],[Math.PI/2,0,0],null,`fwd`],[new F(y,o),[0,0,1],[-Math.PI/2,0,0],null,`bwd`],[new ye(x,p),null,[0,-Math.PI/2,0]]],XYZ:[[new F(new We(.1,0),s.clone()),[0,0,0],[0,0,0]]],XY:[[new F(new ge(.295,.295),c.clone()),[.15,.15,0]],[new ye(x,g),[.18,.3,0],null,[.125,1,1]],[new ye(x,g),[.3,.18,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new F(new ge(.295,.295),l.clone()),[0,.15,.15],[0,Math.PI/2,0]],[new ye(x,m),[0,.18,.3],[0,0,Math.PI/2],[.125,1,1]],[new ye(x,m),[0,.3,.18],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new F(new ge(.295,.295),u.clone()),[.15,0,.15],[-Math.PI/2,0,0]],[new ye(x,h),[.18,0,.3],null,[.125,1,1]],[new ye(x,h),[.3,0,.18],[0,-Math.PI/2,0],[.125,1,1]]]},T={X:[[new F(new ht(.2,0,1,4,1,!1),n),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new F(new ht(.2,0,1,4,1,!1),n),[0,.6,0]]],Z:[[new F(new ht(.2,0,1,4,1,!1),n),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new F(new We(.2,0),n)]],XY:[[new F(new ge(.4,.4),n),[.2,.2,0]]],YZ:[[new F(new ge(.4,.4),n),[0,.2,.2],[0,Math.PI/2,0]]],XZ:[[new F(new ge(.4,.4),n),[.2,0,.2],[-Math.PI/2,0,0]]]},E={START:[[new F(new We(.01,2),r),null,null,null,`helper`]],END:[[new F(new We(.01,2),r),null,null,null,`helper`]],DELTA:[[new ye(C(),r),null,null,null,`helper`]],X:[[new ye(x,r.clone()),[-1e3,0,0],null,[1e6,1,1],`helper`]],Y:[[new ye(x,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],`helper`]],Z:[[new ye(x,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],`helper`]]},D={X:[[new ye(S(1,.5),d)],[new F(new We(.04,0),i),[0,0,.99],null,[1,3,1]]],Y:[[new ye(S(1,.5),f),null,[0,0,-Math.PI/2]],[new F(new We(.04,0),a),[0,0,.99],null,[3,1,1]]],Z:[[new ye(S(1,.5),p),null,[0,Math.PI/2,0]],[new F(new We(.04,0),o),[.99,0,0],null,[1,3,1]]],E:[[new ye(S(1.25,1),v),null,[0,Math.PI/2,0]],[new F(new ht(.03,0,.15,4,1,!1),v),[1.17,0,0],[0,0,-Math.PI/2],[1,1,.001]],[new F(new ht(.03,0,.15,4,1,!1),v),[-1.17,0,0],[0,0,Math.PI/2],[1,1,.001]],[new F(new ht(.03,0,.15,4,1,!1),v),[0,-1.17,0],[Math.PI,0,0],[1,1,.001]],[new F(new ht(.03,0,.15,4,1,!1),v),[0,1.17,0],[0,0,0],[1,1,.001]]],XYZE:[[new ye(S(1,1),_),null,[0,Math.PI/2,0]]]},O={AXIS:[[new ye(x,r.clone()),[-1e3,0,0],null,[1e6,1,1],`helper`]]},ee={X:[[new F(new Mt(1,.1,4,24),n),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new F(new Mt(1,.1,4,24),n),[0,0,0],[Math.PI/2,0,0]]],Z:[[new F(new Mt(1,.1,4,24),n),[0,0,0],[0,0,-Math.PI/2]]],E:[[new F(new Mt(1.25,.1,2,24),n)]],XYZE:[[new F(new Ae(.7,10,8),n)]]},te={X:[[new F(b,i),[.8,0,0],[0,0,-Math.PI/2]],[new ye(x,d),null,null,[.8,1,1]]],Y:[[new F(b,a),[0,.8,0]],[new ye(x,f),null,[0,0,Math.PI/2],[.8,1,1]]],Z:[[new F(b,o),[0,0,.8],[Math.PI/2,0,0]],[new ye(x,p),null,[0,-Math.PI/2,0],[.8,1,1]]],XY:[[new F(b,c),[.85,.85,0],null,[2,2,.2]],[new ye(x,g),[.855,.98,0],null,[.125,1,1]],[new ye(x,g),[.98,.855,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new F(b,l),[0,.85,.85],null,[.2,2,2]],[new ye(x,m),[0,.855,.98],[0,0,Math.PI/2],[.125,1,1]],[new ye(x,m),[0,.98,.855],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new F(b,u),[.85,0,.85],null,[2,.2,2]],[new ye(x,h),[.855,0,.98],null,[.125,1,1]],[new ye(x,h),[.98,0,.855],[0,-Math.PI/2,0],[.125,1,1]]],XYZX:[[new F(new tn(.125,.125,.125),s.clone()),[1.1,0,0]]],XYZY:[[new F(new tn(.125,.125,.125),s.clone()),[0,1.1,0]]],XYZZ:[[new F(new tn(.125,.125,.125),s.clone()),[0,0,1.1]]]},ne={X:[[new F(new ht(.2,0,.8,4,1,!1),n),[.5,0,0],[0,0,-Math.PI/2]]],Y:[[new F(new ht(.2,0,.8,4,1,!1),n),[0,.5,0]]],Z:[[new F(new ht(.2,0,.8,4,1,!1),n),[0,0,.5],[Math.PI/2,0,0]]],XY:[[new F(b,n),[.85,.85,0],null,[3,3,.2]]],YZ:[[new F(b,n),[0,.85,.85],null,[.2,3,3]]],XZ:[[new F(b,n),[.85,0,.85],null,[3,.2,3]]],XYZX:[[new F(new tn(.2,.2,.2),n),[1.1,0,0]]],XYZY:[[new F(new tn(.2,.2,.2),n),[0,1.1,0]]],XYZZ:[[new F(new tn(.2,.2,.2),n),[0,0,1.1]]]},k={X:[[new ye(x,r.clone()),[-1e3,0,0],null,[1e6,1,1],`helper`]],Y:[[new ye(x,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],`helper`]],Z:[[new ye(x,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],`helper`]]},A=e=>{let t=new N;for(let n in e)for(let r=e[n].length;r--;){let i=e[n][r][0].clone(),a=e[n][r][1],o=e[n][r][2],s=e[n][r][3],c=e[n][r][4];i.name=n,i.tag=c,a&&i.position.set(a[0],a[1],a[2]),o&&i.rotation.set(o[0],o[1],o[2]),s&&i.scale.set(s[0],s[1],s[2]),i.updateMatrix();let l=i.geometry.clone();l.applyMatrix4(i.matrix),i.geometry=l,i.renderOrder=1/0,i.position.set(0,0,0),i.rotation.set(0,0,0),i.scale.set(1,1,1),t.add(i)}return t};this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=A(w)),this.add(this.gizmo.rotate=A(D)),this.add(this.gizmo.scale=A(te)),this.add(this.picker.translate=A(T)),this.add(this.picker.rotate=A(ee)),this.add(this.picker.scale=A(ne)),this.add(this.helper.translate=A(E)),this.add(this.helper.rotate=A(O)),this.add(this.helper.scale=A(k)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}},YB=class extends F{constructor(){super(new ge(1e5,1e5,2,2),new nn({visible:!1,wireframe:!0,side:jt,transparent:!0,opacity:.1,toneMapped:!1})),Q(this,`isTransformControlsPlane`,!0),Q(this,`type`,`TransformControlsPlane`),Q(this,`unitX`,new P(1,0,0)),Q(this,`unitY`,new P(0,1,0)),Q(this,`unitZ`,new P(0,0,1)),Q(this,`tempVector`,new P),Q(this,`dirVector`,new P),Q(this,`alignVector`,new P),Q(this,`tempMatrix`,new bt),Q(this,`identityQuaternion`,new Pe),Q(this,`cameraQuaternion`,new Pe),Q(this,`worldPosition`,new P),Q(this,`worldQuaternion`,new Pe),Q(this,`eye`,new P),Q(this,`axis`,null),Q(this,`mode`,`translate`),Q(this,`space`,`world`),Q(this,`updateMatrixWorld`,()=>{let e=this.space;switch(this.position.copy(this.worldPosition),this.mode===`scale`&&(e=`local`),this.unitX.set(1,0,0).applyQuaternion(e===`local`?this.worldQuaternion:this.identityQuaternion),this.unitY.set(0,1,0).applyQuaternion(e===`local`?this.worldQuaternion:this.identityQuaternion),this.unitZ.set(0,0,1).applyQuaternion(e===`local`?this.worldQuaternion:this.identityQuaternion),this.alignVector.copy(this.unitY),this.mode){case`translate`:case`scale`:switch(this.axis){case`X`:this.alignVector.copy(this.eye).cross(this.unitX),this.dirVector.copy(this.unitX).cross(this.alignVector);break;case`Y`:this.alignVector.copy(this.eye).cross(this.unitY),this.dirVector.copy(this.unitY).cross(this.alignVector);break;case`Z`:this.alignVector.copy(this.eye).cross(this.unitZ),this.dirVector.copy(this.unitZ).cross(this.alignVector);break;case`XY`:this.dirVector.copy(this.unitZ);break;case`YZ`:this.dirVector.copy(this.unitX);break;case`XZ`:this.alignVector.copy(this.unitZ),this.dirVector.copy(this.unitY);break;case`XYZ`:case`E`:this.dirVector.set(0,0,0);break}break;case`rotate`:default:this.dirVector.set(0,0,0)}this.dirVector.length()===0?this.quaternion.copy(this.cameraQuaternion):(this.tempMatrix.lookAt(this.tempVector.set(0,0,0),this.dirVector,this.alignVector),this.quaternion.setFromRotationMatrix(this.tempMatrix)),super.updateMatrixWorld()})}},XB=Object.defineProperty,ZB=(e,t,n)=>t in e?XB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QB=(e,t,n)=>(ZB(e,typeof t==`symbol`?t:t+``,n),n);const $B=new Dt(0,0,0,`YXZ`),eV=new P,tV={type:`change`},nV={type:`lock`},rV={type:`unlock`},iV=Math.PI/2;var aV=class extends _e{constructor(e,t){super(),QB(this,`camera`),QB(this,`domElement`),QB(this,`isLocked`),QB(this,`minPolarAngle`),QB(this,`maxPolarAngle`),QB(this,`pointerSpeed`),QB(this,`onMouseMove`,e=>{if(!this.domElement||this.isLocked===!1)return;let t=e.movementX||e.mozMovementX||e.webkitMovementX||0,n=e.movementY||e.mozMovementY||e.webkitMovementY||0;$B.setFromQuaternion(this.camera.quaternion),$B.y-=t*.002*this.pointerSpeed,$B.x-=n*.002*this.pointerSpeed,$B.x=Math.max(iV-this.maxPolarAngle,Math.min(iV-this.minPolarAngle,$B.x)),this.camera.quaternion.setFromEuler($B),this.dispatchEvent(tV)}),QB(this,`onPointerlockChange`,()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(nV),this.isLocked=!0):(this.dispatchEvent(rV),this.isLocked=!1))}),QB(this,`onPointerlockError`,()=>{console.error(`THREE.PointerLockControls: Unable to use Pointer Lock API`)}),QB(this,`connect`,e=>{this.domElement=e||this.domElement,this.domElement&&(this.domElement.ownerDocument.addEventListener(`mousemove`,this.onMouseMove),this.domElement.ownerDocument.addEventListener(`pointerlockchange`,this.onPointerlockChange),this.domElement.ownerDocument.addEventListener(`pointerlockerror`,this.onPointerlockError))}),QB(this,`disconnect`,()=>{this.domElement&&(this.domElement.ownerDocument.removeEventListener(`mousemove`,this.onMouseMove),this.domElement.ownerDocument.removeEventListener(`pointerlockchange`,this.onPointerlockChange),this.domElement.ownerDocument.removeEventListener(`pointerlockerror`,this.onPointerlockError))}),QB(this,`dispose`,()=>{this.disconnect()}),QB(this,`getObject`,()=>this.camera),QB(this,`direction`,new P(0,0,-1)),QB(this,`getDirection`,e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion)),QB(this,`moveForward`,e=>{eV.setFromMatrixColumn(this.camera.matrix,0),eV.crossVectors(this.camera.up,eV),this.camera.position.addScaledVector(eV,e)}),QB(this,`moveRight`,e=>{eV.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector(eV,e)}),QB(this,`lock`,()=>{this.domElement&&this.domElement.requestPointerLock()}),QB(this,`unlock`,()=>{this.domElement&&this.domElement.ownerDocument.exitPointerLock()}),this.camera=e,this.domElement=t,this.isLocked=!1,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.pointerSpeed=1,t&&this.connect(t)}},oV=Object.defineProperty,sV=(e,t,n)=>t in e?oV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cV=(e,t,n)=>(sV(e,typeof t==`symbol`?t:t+``,n),n);const lV=new At,uV=new Me,dV=Math.cos(70*(Math.PI/180)),fV=(e,t)=>(e%t+t)%t;var pV=class extends _e{constructor(e,t){super(),cV(this,`object`),cV(this,`domElement`),cV(this,`enabled`,!0),cV(this,`target`,new P),cV(this,`minDistance`,0),cV(this,`maxDistance`,1/0),cV(this,`minZoom`,0),cV(this,`maxZoom`,1/0),cV(this,`minPolarAngle`,0),cV(this,`maxPolarAngle`,Math.PI),cV(this,`minAzimuthAngle`,-1/0),cV(this,`maxAzimuthAngle`,1/0),cV(this,`enableDamping`,!1),cV(this,`dampingFactor`,.05),cV(this,`enableZoom`,!0),cV(this,`zoomSpeed`,1),cV(this,`enableRotate`,!0),cV(this,`rotateSpeed`,1),cV(this,`enablePan`,!0),cV(this,`panSpeed`,1),cV(this,`screenSpacePanning`,!0),cV(this,`keyPanSpeed`,7),cV(this,`zoomToCursor`,!1),cV(this,`autoRotate`,!1),cV(this,`autoRotateSpeed`,2),cV(this,`reverseOrbit`,!1),cV(this,`reverseHorizontalOrbit`,!1),cV(this,`reverseVerticalOrbit`,!1),cV(this,`keys`,{LEFT:`ArrowLeft`,UP:`ArrowUp`,RIGHT:`ArrowRight`,BOTTOM:`ArrowDown`}),cV(this,`mouseButtons`,{LEFT:ke.ROTATE,MIDDLE:ke.DOLLY,RIGHT:ke.PAN}),cV(this,`touches`,{ONE:je.ROTATE,TWO:je.DOLLY_PAN}),cV(this,`target0`),cV(this,`position0`),cV(this,`zoom0`),cV(this,`_domElementKeyEvents`,null),cV(this,`getPolarAngle`),cV(this,`getAzimuthalAngle`),cV(this,`setPolarAngle`),cV(this,`setAzimuthalAngle`),cV(this,`getDistance`),cV(this,`getZoomScale`),cV(this,`listenToKeyEvents`),cV(this,`stopListenToKeyEvents`),cV(this,`saveState`),cV(this,`reset`),cV(this,`update`),cV(this,`connect`),cV(this,`dispose`),cV(this,`dollyIn`),cV(this,`dollyOut`),cV(this,`getScale`),cV(this,`setScale`),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>l.phi,this.getAzimuthalAngle=()=>l.theta,this.setPolarAngle=e=>{let t=fV(e,2*Math.PI),r=l.phi;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i{let t=fV(e,2*Math.PI),r=l.theta;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-in.object.position.distanceTo(n.target),this.listenToKeyEvents=e=>{e.addEventListener(`keydown`,Me),this._domElementKeyEvents=e},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener(`keydown`,Me),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(r),n.update(),s=o.NONE},this.update=(()=>{let t=new P,i=new P(0,1,0),a=new Pe().setFromUnitVectors(e.up,i),p=a.clone().invert(),m=new P,h=new Pe,g=2*Math.PI;return function(){let _=n.object.position;a.setFromUnitVectors(e.up,i),p.copy(a).invert(),t.copy(_).sub(n.target),t.applyQuaternion(a),l.setFromVector3(t),n.autoRotate&&s===o.NONE&&ee(D()),n.enableDamping?(l.theta+=u.theta*n.dampingFactor,l.phi+=u.phi*n.dampingFactor):(l.theta+=u.theta,l.phi+=u.phi);let v=n.minAzimuthAngle,y=n.maxAzimuthAngle;isFinite(v)&&isFinite(y)&&(v<-Math.PI?v+=g:v>Math.PI&&(v-=g),y<-Math.PI?y+=g:y>Math.PI&&(y-=g),v<=y?l.theta=Math.max(v,Math.min(y,l.theta)):l.theta=l.theta>(v+y)/2?Math.max(v,l.theta):Math.min(y,l.theta)),l.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,l.phi)),l.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(f,n.dampingFactor):n.target.add(f),n.zoomToCursor&&w||n.object.isOrthographicCamera?l.radius=oe(l.radius):l.radius=oe(l.radius*d),t.setFromSpherical(l),t.applyQuaternion(p),_.copy(n.target).add(t),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),n.enableDamping===!0?(u.theta*=1-n.dampingFactor,u.phi*=1-n.dampingFactor,f.multiplyScalar(1-n.dampingFactor)):(u.set(0,0,0),f.set(0,0,0));let b=!1;if(n.zoomToCursor&&w){let r=null;if(n.object instanceof me&&n.object.isPerspectiveCamera){let e=t.length();r=oe(e*d);let i=e-r;n.object.position.addScaledVector(S,i),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){let e=new P(C.x,C.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/d)),n.object.updateProjectionMatrix(),b=!0;let i=new P(C.x,C.y,0);i.unproject(n.object),n.object.position.sub(i).add(e),n.object.updateMatrixWorld(),r=t.length()}else console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.`),n.zoomToCursor=!1;r!==null&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(r).add(n.object.position):(lV.origin.copy(n.object.position),lV.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(lV.direction))c||8*(1-h.dot(n.object.quaternion))>c?(n.dispatchEvent(r),m.copy(n.object.position),h.copy(n.object.quaternion),b=!1,!0):!1}})(),this.connect=e=>{n.domElement=e,n.domElement.style.touchAction=`none`,n.domElement.addEventListener(`contextmenu`,Ie),n.domElement.addEventListener(`pointerdown`,we),n.domElement.addEventListener(`pointercancel`,Ee),n.domElement.addEventListener(`wheel`,Ae)},this.dispose=()=>{var e,t,r,i,a,o;n.domElement&&(n.domElement.style.touchAction=`auto`),(e=n.domElement)==null||e.removeEventListener(`contextmenu`,Ie),(t=n.domElement)==null||t.removeEventListener(`pointerdown`,we),(r=n.domElement)==null||r.removeEventListener(`pointercancel`,Ee),(i=n.domElement)==null||i.removeEventListener(`wheel`,Ae),(a=n.domElement)==null||a.ownerDocument.removeEventListener(`pointermove`,Te),(o=n.domElement)==null||o.ownerDocument.removeEventListener(`pointerup`,Ee),n._domElementKeyEvents!==null&&n._domElementKeyEvents.removeEventListener(`keydown`,Me)};let n=this,r={type:`change`},i={type:`start`},a={type:`end`},o={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},s=o.NONE,c=1e-6,l=new wt,u=new wt,d=1,f=new P,p=new Xt,m=new Xt,h=new Xt,g=new Xt,_=new Xt,v=new Xt,y=new Xt,b=new Xt,x=new Xt,S=new P,C=new Xt,w=!1,T=[],E={};function D(){return 2*Math.PI/60/60*n.autoRotateSpeed}function O(){return .95**n.zoomSpeed}function ee(e){n.reverseOrbit||n.reverseHorizontalOrbit?u.theta+=e:u.theta-=e}function te(e){n.reverseOrbit||n.reverseVerticalOrbit?u.phi+=e:u.phi-=e}let ne=(()=>{let e=new P;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),f.add(e)}})(),k=(()=>{let e=new P;return function(t,r){n.screenSpacePanning===!0?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),f.add(e)}})(),A=(()=>{let e=new P;return function(t,r){let i=n.domElement;if(i&&n.object instanceof me&&n.object.isPerspectiveCamera){let a=n.object.position;e.copy(a).sub(n.target);let o=e.length();o*=Math.tan(n.object.fov/2*Math.PI/180),ne(2*t*o/i.clientHeight,n.object.matrix),k(2*r*o/i.clientHeight,n.object.matrix)}else i&&n.object instanceof Pt&&n.object.isOrthographicCamera?(ne(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),k(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.`),n.enablePan=!1)}})();function re(e){n.object instanceof me&&n.object.isPerspectiveCamera||n.object instanceof Pt&&n.object.isOrthographicCamera?d=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),n.enableZoom=!1)}function j(e){re(d/e)}function ie(e){re(d*e)}function ae(e){if(!n.zoomToCursor||!n.domElement)return;w=!0;let t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,a=t.width,o=t.height;C.x=r/a*2-1,C.y=-(i/o)*2+1,S.set(C.x,C.y,1).unproject(n.object).sub(n.object.position).normalize()}function oe(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function se(e){p.set(e.clientX,e.clientY)}function M(e){ae(e),y.set(e.clientX,e.clientY)}function ce(e){g.set(e.clientX,e.clientY)}function N(e){m.set(e.clientX,e.clientY),h.subVectors(m,p).multiplyScalar(n.rotateSpeed);let t=n.domElement;t&&(ee(2*Math.PI*h.x/t.clientHeight),te(2*Math.PI*h.y/t.clientHeight)),p.copy(m),n.update()}function le(e){b.set(e.clientX,e.clientY),x.subVectors(b,y),x.y>0?j(O()):x.y<0&&ie(O()),y.copy(b),n.update()}function ue(e){_.set(e.clientX,e.clientY),v.subVectors(_,g).multiplyScalar(n.panSpeed),A(v.x,v.y),g.copy(_),n.update()}function de(e){ae(e),e.deltaY<0?ie(O()):e.deltaY>0&&j(O()),n.update()}function fe(e){let t=!1;switch(e.code){case n.keys.UP:A(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:A(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:A(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:A(-n.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),n.update())}function pe(){if(T.length==1)p.set(T[0].pageX,T[0].pageY);else{let e=.5*(T[0].pageX+T[1].pageX),t=.5*(T[0].pageY+T[1].pageY);p.set(e,t)}}function he(){if(T.length==1)g.set(T[0].pageX,T[0].pageY);else{let e=.5*(T[0].pageX+T[1].pageX),t=.5*(T[0].pageY+T[1].pageY);g.set(e,t)}}function ge(){let e=T[0].pageX-T[1].pageX,t=T[0].pageY-T[1].pageY,n=Math.sqrt(e*e+t*t);y.set(0,n)}function _e(){n.enableZoom&&ge(),n.enablePan&&he()}function ve(){n.enableZoom&&ge(),n.enableRotate&&pe()}function ye(e){if(T.length==1)m.set(e.pageX,e.pageY);else{let t=Be(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);m.set(n,r)}h.subVectors(m,p).multiplyScalar(n.rotateSpeed);let t=n.domElement;t&&(ee(2*Math.PI*h.x/t.clientHeight),te(2*Math.PI*h.y/t.clientHeight)),p.copy(m)}function be(e){if(T.length==1)_.set(e.pageX,e.pageY);else{let t=Be(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);_.set(n,r)}v.subVectors(_,g).multiplyScalar(n.panSpeed),A(v.x,v.y),g.copy(_)}function xe(e){let t=Be(e),r=e.pageX-t.x,i=e.pageY-t.y,a=Math.sqrt(r*r+i*i);b.set(0,a),x.set(0,(b.y/y.y)**+n.zoomSpeed),j(x.y),y.copy(b)}function Se(e){n.enableZoom&&xe(e),n.enablePan&&be(e)}function Ce(e){n.enableZoom&&xe(e),n.enableRotate&&ye(e)}function we(e){var t,r;n.enabled!==!1&&(T.length===0&&((t=n.domElement)==null||t.ownerDocument.addEventListener(`pointermove`,Te),(r=n.domElement)==null||r.ownerDocument.addEventListener(`pointerup`,Ee)),Le(e),e.pointerType===`touch`?Ne(e):De(e))}function Te(e){n.enabled!==!1&&(e.pointerType===`touch`?Fe(e):Oe(e))}function Ee(e){var t,r,i;Re(e),T.length===0&&((t=n.domElement)==null||t.releasePointerCapture(e.pointerId),(r=n.domElement)==null||r.ownerDocument.removeEventListener(`pointermove`,Te),(i=n.domElement)==null||i.ownerDocument.removeEventListener(`pointerup`,Ee)),n.dispatchEvent(a),s=o.NONE}function De(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case ke.DOLLY:if(n.enableZoom===!1)return;M(e),s=o.DOLLY;break;case ke.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(n.enablePan===!1)return;ce(e),s=o.PAN}else{if(n.enableRotate===!1)return;se(e),s=o.ROTATE}break;case ke.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(n.enableRotate===!1)return;se(e),s=o.ROTATE}else{if(n.enablePan===!1)return;ce(e),s=o.PAN}break;default:s=o.NONE}s!==o.NONE&&n.dispatchEvent(i)}function Oe(e){if(n.enabled!==!1)switch(s){case o.ROTATE:if(n.enableRotate===!1)return;N(e);break;case o.DOLLY:if(n.enableZoom===!1)return;le(e);break;case o.PAN:if(n.enablePan===!1)return;ue(e);break}}function Ae(e){n.enabled===!1||n.enableZoom===!1||s!==o.NONE&&s!==o.ROTATE||(e.preventDefault(),n.dispatchEvent(i),de(e),n.dispatchEvent(a))}function Me(e){n.enabled===!1||n.enablePan===!1||fe(e)}function Ne(e){switch(ze(e),T.length){case 1:switch(n.touches.ONE){case je.ROTATE:if(n.enableRotate===!1)return;pe(),s=o.TOUCH_ROTATE;break;case je.PAN:if(n.enablePan===!1)return;he(),s=o.TOUCH_PAN;break;default:s=o.NONE}break;case 2:switch(n.touches.TWO){case je.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;_e(),s=o.TOUCH_DOLLY_PAN;break;case je.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;ve(),s=o.TOUCH_DOLLY_ROTATE;break;default:s=o.NONE}break;default:s=o.NONE}s!==o.NONE&&n.dispatchEvent(i)}function Fe(e){switch(ze(e),s){case o.TOUCH_ROTATE:if(n.enableRotate===!1)return;ye(e),n.update();break;case o.TOUCH_PAN:if(n.enablePan===!1)return;be(e),n.update();break;case o.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;Se(e),n.update();break;case o.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;Ce(e),n.update();break;default:s=o.NONE}}function Ie(e){n.enabled!==!1&&e.preventDefault()}function Le(e){T.push(e)}function Re(e){delete E[e.pointerId];for(let t=0;t{ie(e),n.update()},this.dollyOut=(e=O())=>{j(e),n.update()},this.getScale=()=>d,this.setScale=e=>{re(e),n.update()},this.getZoomScale=()=>O(),t!==void 0&&this.connect(t),this.update()}},mV=class extends pV{constructor(e,t){super(e,t),this.screenSpacePanning=!1,this.mouseButtons.LEFT=ke.PAN,this.mouseButtons.RIGHT=ke.ROTATE,this.touches.ONE=je.PAN,this.touches.TWO=je.DOLLY_ROTATE}};const hV=new Pe,gV={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},_V={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},vV={9728:nt,9729:be,9984:it,9985:Te,9986:ue,9987:ne},yV={33071:Ue,33648:Xe,10497:Ve},bV={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},xV={POSITION:`position`,NORMAL:`normal`,TANGENT:`tangent`,...ez>=152?{TEXCOORD_0:`uv`,TEXCOORD_1:`uv1`,TEXCOORD_2:`uv2`,TEXCOORD_3:`uv3`}:{TEXCOORD_0:`uv`,TEXCOORD_1:`uv2`},COLOR_0:`color`,WEIGHTS_0:`skinWeight`,JOINTS_0:`skinIndex`},SV={scale:`scale`,translation:`position`,rotation:`quaternion`,weights:`morphTargetInfluences`},CV={CUBICSPLINE:void 0,LINEAR:kt,STEP:St},wV={OPAQUE:`OPAQUE`,MASK:`MASK`,BLEND:`BLEND`},TV=new bt,EV=new P;function DV(e,t,n,r,i,a){let o=2*Math.PI*i/4,s=Math.max(a-2*i,0),c=Math.PI/4;EV.copy(t),EV[r]=0,EV.normalize();let l=.5*o/(o+s),u=1-EV.angleTo(e)/c;return Math.sign(EV[n])===1?u*l:s/(o+s)+l+l*(1-u)}var OV=class extends tn{constructor(e=1,t=1,n=1,r=2,i=.1){if(r=r*2+1,i=Math.min(e/2,t/2,n/2,i),super(1,1,1,r,r,r),r===1)return;let a=this.toNonIndexed();this.index=null,this.attributes.position=a.attributes.position,this.attributes.normal=a.attributes.normal,this.attributes.uv=a.attributes.uv;let o=new P,s=new P,c=new P(e,t,n).divideScalar(2).subScalar(i),l=this.attributes.position.array,u=this.attributes.normal.array,d=this.attributes.uv.array,f=l.length/6,p=new P,m=.5/r;for(let r=0,a=0;rt in e?PV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IV=(e,t,n)=>(FV(e,typeof t==`symbol`?t:t+``,n),n),LV=class extends dt{constructor(e){super(e)}load(e,t,n,r){let i=new tt(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,e=>{if(typeof e!=`string`)throw Error(`unsupported data type`);let n=JSON.parse(e),r=this.parse(n);t&&t(r)},n,r)}loadAsync(e,t){return super.loadAsync(e,t)}parse(e){return new RV(e)}},RV=class{constructor(e){IV(this,`data`),this.data=e}generateShapes(e,t=100,n){let r=[],i={letterSpacing:0,lineHeight:1,...n},a=zV(e,t,this.data,i);for(let e=0,t=a.length;e(a=c.indexOf(n))&&o=e.byteLength||!(l=r(e)))&&t(1,`no header found`),(u=l.match(n))||t(3,`bad initial token`),c.valid|=1,c.programtype=u[1],c.string+=l+` -`;l=r(e),l!==!1;){if(c.string+=l+` -`,l.charAt(0)===`#`){c.comments+=l+` -`;continue}if((u=l.match(i))&&(c.gamma=parseFloat(u[1])),(u=l.match(a))&&(c.exposure=parseFloat(u[1])),(u=l.match(o))&&(c.valid|=2,c.format=u[1]),(u=l.match(s))&&(c.valid|=4,c.height=parseInt(u[1],10),c.width=parseInt(u[2],10)),c.valid&2&&c.valid&4)break}return c.valid&2||t(3,`missing format specifier`),c.valid&4||t(3,`missing image size specifier`),c},a=function(e,n,r){let i=n;if(i<8||i>32767||e[0]!==2||e[1]!==2||e[2]&128)return new Uint8Array(e);i!==(e[2]<<8|e[3])&&t(3,`wrong scanline width`);let a=new Uint8Array(4*n*r);a.length||t(4,`unable to allocate buffer space`);let o=0,s=0,c=4*i,l=new Uint8Array(4),u=new Uint8Array(c),d=r;for(;d>0&&se.byteLength&&t(1),l[0]=e[s++],l[1]=e[s++],l[2]=e[s++],l[3]=e[s++],(l[0]!=2||l[1]!=2||(l[2]<<8|l[3])!=i)&&t(3,`bad rgbe scanline format`);let n=0,r;for(;n128;if(i&&(r-=128),(r===0||n+r>c)&&t(3,`bad scanline data`),i){let t=e[s++];for(let e=0;e0?ie.copy(ee[ee.length-1]):ie.identity())}function r(e){let t=new Tt,n=new Xt,r=new Xt,i=new Xt,o=!0,s=!1,c=e.getAttribute(`d`);if(c===``||c===`none`)return null;let l=c.match(/[a-df-z][^a-df-z]*/gi);for(let e=0,c=l.length;e0&&(n.copy(i),t.currentPath.currentPoint.copy(n),o=!0);break;default:console.warn(c)}s=!1}return t}function i(e){if(!(!e.sheet||!e.sheet.cssRules||!e.sheet.cssRules.length))for(let t=0;te.trim());for(let e=0;ee!==``));O[r[e]]=Object.assign(O[r[e]]||{},t)}}}function a(e,t,n,r,i,a,s,c){if(t==0||n==0){e.lineTo(c.x,c.y);return}r=r*Math.PI/180,t=Math.abs(t),n=Math.abs(n);let l=(s.x-c.x)/2,u=(s.y-c.y)/2,d=Math.cos(r)*l+Math.sin(r)*u,f=-Math.sin(r)*l+Math.cos(r)*u,p=t*t,m=n*n,h=d*d,g=f*f,_=h/p+g/m;if(_>1){let e=Math.sqrt(_);t=e*t,n=e*n,p=t*t,m=n*n}let v=p*g+m*h,y=(p*m-v)/v,b=Math.sqrt(Math.max(0,y));i===a&&(b=-b);let x=b*t*f/n,S=-b*n*d/t,C=Math.cos(r)*x-Math.sin(r)*S+(s.x+c.x)/2,w=Math.sin(r)*x+Math.cos(r)*S+(s.y+c.y)/2,T=o(1,0,(d-x)/t,(f-S)/n),E=o((d-x)/t,(f-S)/n,(-d-x)/t,(-f-S)/n)%(Math.PI*2);e.currentPath.absellipse(C,w,t,n,T,T+E,a===0,r)}function o(e,t,n,r){let i=e*n+t*r,a=Math.sqrt(e*e+t*t)*Math.sqrt(n*n+r*r),o=Math.acos(Math.max(-1,Math.min(1,i/a)));return e*r-t*n<0&&(o=-o),o}function s(e){let t=v(e.getAttribute(`x`)||0),n=v(e.getAttribute(`y`)||0),r=v(e.getAttribute(`rx`)||e.getAttribute(`ry`)||0),i=v(e.getAttribute(`ry`)||e.getAttribute(`rx`)||0),a=v(e.getAttribute(`width`)),o=v(e.getAttribute(`height`)),s=.448084975506,c=new Tt;return c.moveTo(t+r,n),c.lineTo(t+a-r,n),(r!==0||i!==0)&&c.bezierCurveTo(t+a-r*s,n,t+a,n+i*s,t+a,n+i),c.lineTo(t+a,n+o-i),(r!==0||i!==0)&&c.bezierCurveTo(t+a,n+o-i*s,t+a-r*s,n+o,t+a-r,n+o),c.lineTo(t+r,n+o),(r!==0||i!==0)&&c.bezierCurveTo(t+r*s,n+o,t,n+o-i*s,t,n+o-i),c.lineTo(t,n+i),(r!==0||i!==0)&&c.bezierCurveTo(t,n+i*s,t+r*s,n,t+r,n),c}function c(e){function t(e,t,n){let a=v(t),o=v(n);i===0?r.moveTo(a,o):r.lineTo(a,o),i++}let n=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,r=new Tt,i=0;return e.getAttribute(`points`).replace(n,t),r.currentPath.autoClose=!0,r}function l(e){function t(e,t,n){let a=v(t),o=v(n);i===0?r.moveTo(a,o):r.lineTo(a,o),i++}let n=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,r=new Tt,i=0;return e.getAttribute(`points`).replace(n,t),r.currentPath.autoClose=!1,r}function u(e){let t=v(e.getAttribute(`cx`)||0),n=v(e.getAttribute(`cy`)||0),r=v(e.getAttribute(`r`)||0),i=new He;i.absarc(t,n,r,0,Math.PI*2);let a=new Tt;return a.subPaths.push(i),a}function d(e){let t=v(e.getAttribute(`cx`)||0),n=v(e.getAttribute(`cy`)||0),r=v(e.getAttribute(`rx`)||0),i=v(e.getAttribute(`ry`)||0),a=new He;a.absellipse(t,n,r,i,0,Math.PI*2);let o=new Tt;return o.subPaths.push(a),o}function f(e){let t=v(e.getAttribute(`x1`)||0),n=v(e.getAttribute(`y1`)||0),r=v(e.getAttribute(`x2`)||0),i=v(e.getAttribute(`y2`)||0),a=new Tt;return a.moveTo(t,n),a.lineTo(r,i),a.currentPath.autoClose=!1,a}function p(e,t){t=Object.assign({},t);let n={};if(e.hasAttribute(`class`)){let t=e.getAttribute(`class`).split(/\s/).filter(Boolean).map(e=>e.trim());for(let e=0;e0&&t.premultiply(ee[ee.length-1]),ie.copy(t),ee.push(t),t}function b(e){let t=new de,n=te;if(e.nodeName===`use`&&(e.hasAttribute(`x`)||e.hasAttribute(`y`))){let n=v(e.getAttribute(`x`)),r=v(e.getAttribute(`y`));t.translate(n,r)}if(e.hasAttribute(`transform`)){let r=e.getAttribute(`transform`).split(`)`);for(let e=r.length-1;e>=0;e--){let i=r[e].trim();if(i===``)continue;let a=i.indexOf(`(`),o=i.length;if(a>0&&a=1){let e=t[0],r=0;t.length>=2&&(r=t[1]),n.translate(e,r)}break;case`rotate`:if(t.length>=1){let e=0,r=0,i=0;e=t[0]*Math.PI/180,t.length>=3&&(r=t[1],i=t[2]),ne.makeTranslation(-r,-i),k.makeRotation(e),A.multiplyMatrices(k,ne),ne.makeTranslation(r,i),n.multiplyMatrices(ne,A)}break;case`scale`:if(t.length>=1){let e=t[0],r=e;t.length>=2&&(r=t[1]),n.scale(e,r)}break;case`skewX`:t.length===1&&n.set(1,Math.tan(t[0]*Math.PI/180),0,0,1,0,0,0,1);break;case`skewY`:t.length===1&&n.set(1,0,0,Math.tan(t[0]*Math.PI/180),1,0,0,0,1);break;case`matrix`:t.length===6&&n.set(t[0],t[2],t[4],t[1],t[3],t[5],0,0,1);break}}t.premultiply(n)}}return t}function x(e,t){function n(e){j.set(e.x,e.y,1).applyMatrix3(t),e.set(j.x,j.y)}function r(e){let n=e.xRadius,r=e.yRadius,i=Math.cos(e.aRotation),a=Math.sin(e.aRotation),o=new P(n*i,n*a,0),s=new P(-r*a,r*i,0),c=o.applyMatrix3(t),l=s.applyMatrix3(t),u=te.set(c.x,l.x,0,c.y,l.y,0,0,0,1),d=ne.copy(u).invert(),f=k.copy(d).transpose().multiply(d).elements,p=E(f[0],f[1],f[4]),m=Math.sqrt(p.rt1),h=Math.sqrt(p.rt2);if(e.xRadius=1/m,e.yRadius=1/h,e.aRotation=Math.atan2(p.sn,p.cs),!((e.aEndAngle-e.aStartAngle)%(2*Math.PI)<2**-52)){let n=ne.set(m,0,0,0,h,0,0,0,1),r=k.set(p.cs,p.sn,0,-p.sn,p.cs,0,0,0,1),i=n.multiply(r).multiply(u),a=e=>{let{x:t,y:n}=new P(Math.cos(e),Math.sin(e),0).applyMatrix3(i);return Math.atan2(n,t)};e.aStartAngle=a(e.aStartAngle),e.aEndAngle=a(e.aEndAngle),S(t)&&(e.aClockwise=!e.aClockwise)}}function i(e){let n=w(t),r=T(t);e.xRadius*=n,e.yRadius*=r;let i=n>2**-52?Math.atan2(t.elements[1],t.elements[0]):Math.atan2(-t.elements[3],t.elements[4]);e.aRotation+=i,S(t)&&(e.aStartAngle*=-1,e.aEndAngle*=-1,e.aClockwise=!e.aClockwise)}let a=e.subPaths;for(let e=0,o=a.length;e2**-52}function w(e){let t=e.elements;return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function T(e){let t=e.elements;return Math.sqrt(t[3]*t[3]+t[4]*t[4])}function E(e,t,n){let r,i,a,o,s,c=e+n,l=e-n,u=Math.sqrt(l*l+4*t*t);return c>0?(r=.5*(c+u),s=1/r,i=e*s*n-t*s*t):c<0?i=.5*(c-u):(r=.5*u,i=-.5*u),a=l>0?l+u:l-u,Math.abs(a)>2*Math.abs(t)?(s=-2*t/a,o=1/Math.sqrt(1+s*s),a=s*o):Math.abs(t)===0?(a=1,o=0):(s=-.5*a/t,a=1/Math.sqrt(1+s*s),o=s*a),l>0&&(s=a,a=-o,o=s),{rt1:r,rt2:i,cs:a,sn:o}}let D=[],O={},ee=[],te=new de,ne=new de,k=new de,A=new de,re=new Xt,j=new P,ie=new de,ae=new DOMParser().parseFromString(e,`image/svg+xml`);return n(ae.documentElement,{fill:`#000`,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:`miter`,strokeLineCap:`butt`,strokeMiterLimit:4}),{paths:D,xml:ae.documentElement}}static createShapes(e){let t={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},n={loc:t.ORIGIN,t:0};function r(e,r,a,o){let s=e.x,c=r.x,l=a.x,u=o.x,d=e.y,f=r.y,p=a.y,m=o.y,h=(u-l)*(d-p)-(m-p)*(s-l),g=(c-s)*(d-p)-(f-d)*(s-l),_=(m-p)*(c-s)-(u-l)*(f-d),v=h/_,y=g/_;if(_===0&&h!==0||v<=0||v>=1||y<0||y>1)return null;if(h===0&&_===0){for(let l=0;l<2;l++)if(i(l===0?a:o,e,r),n.loc==t.ORIGIN){let e=l===0?a:o;return{x:e.x,y:e.y,t:n.t}}else if(n.loc==t.BETWEEN){let e=+(s+n.t*(c-s)).toPrecision(10),t=+(d+n.t*(f-d)).toPrecision(10);return{x:e,y:t,t:n.t}}return null}else{for(let s=0;s<2;s++)if(i(s===0?a:o,e,r),n.loc==t.ORIGIN){let e=s===0?a:o;return{x:e.x,y:e.y,t:n.t}}let l=+(s+v*(c-s)).toPrecision(10),u=+(d+v*(f-d)).toPrecision(10);return{x:l,y:u,t:v}}}function i(e,r,i){let a=i.x-r.x,o=i.y-r.y,s=e.x-r.x,c=e.y-r.y,l=a*c-s*o;if(e.x===r.x&&e.y===r.y){n.loc=t.ORIGIN,n.t=0;return}if(e.x===i.x&&e.y===i.y){n.loc=t.DESTINATION,n.t=1;return}if(l<-(2**-52)){n.loc=t.LEFT;return}if(l>2**-52){n.loc=t.RIGHT;return}if(a*s<0||o*c<0){n.loc=t.BEHIND;return}if(Math.sqrt(a*a+o*o)e.t<=l.t+2**-52&&e.t>=l.t-2**-52)===void 0&&(n.push(l),i.push(new Xt(l.x,l.y)))}}return i}function o(e,t,n){let r=new Xt;t.getCenter(r);let i=[];return n.forEach(t=>{t.boundingBox.containsPoint(r)&&a(e,t.points).forEach(e=>{i.push({identifier:t.identifier,isCW:t.isCW,point:e})})}),i.sort((e,t)=>e.point.x-t.point.x),i}function s(e,t,n,r,i){(i==null||i===``)&&(i=`nonzero`);let a=new Xt;e.boundingBox.getCenter(a);let s=[new Xt(n,a.y),new Xt(r,a.y)],c=o(s,e.boundingBox,t);c.sort((e,t)=>e.point.x-t.point.x);let l=[],u=[];c.forEach(t=>{t.identifier===e.identifier?l.push(t):u.push(t)});let d=l[0].point.x,f=[],p=0;for(;p0&&f[f.length-1]===u[p].identifier?f.pop():f.push(u[p].identifier),p++;if(f.push(e.identifier),i===`evenodd`){let t=f.length%2==0,n=f[f.length-2];return{identifier:e.identifier,isHole:t,for:n}}else if(i===`nonzero`){let n=!0,r=null,i=null;for(let e=0;e{let t=e.getPoints(),n=-999999999,r=999999999,i=-999999999,a=999999999;for(let e=0;en&&(n=o.y),o.yi&&(i=o.x),o.x=a&&(c=a-1),{curves:e.curves,points:t,isCW:at.isClockWise(t),identifier:-1,boundingBox:new De(new Xt(a,r),new Xt(i,n))}});u=u.filter(e=>e.points.length>1);for(let e=0;es(t,u,c,l,e.userData?e.userData.style.fillRule:void 0)),f=[];return u.forEach(e=>{if(!d[e.identifier].isHole){let t=new mt;t.curves=e.curves,d.filter(t=>t.isHole&&t.for===e.identifier).forEach(e=>{let n=u[e.identifier],r=new He;r.curves=n.curves,t.holes.push(r)}),f.push(t)}}),f}static getStrokeStyle(e,t,n,r,i){return e=e===void 0?1:e,t=t===void 0?`#000`:t,n=n===void 0?`miter`:n,r=r===void 0?`butt`:r,i=i===void 0?4:i,{strokeColor:t,strokeWidth:e,strokeLineJoin:n,strokeLineCap:r,strokeMiterLimit:i}}static pointsToStroke(t,n,r,i){let a=[],o=[],s=[];if(e.pointsToStrokeWithBuffers(t,n,r,i,a,o,s)===0)return null;let c=new Ut;return c.setAttribute(`position`,new rt(a,3)),c.setAttribute(`normal`,new rt(o,3)),c.setAttribute(`uv`,new rt(s,2)),c}static pointsToStrokeWithBuffers(e,t,n,r,i,a,o,s){let c=new Xt,l=new Xt,u=new Xt,d=new Xt,f=new Xt,p=new Xt,m=new Xt,h=new Xt,g=new Xt,_=new Xt,v=new Xt,y=new Xt,b=new Xt,x=new Xt,S=new Xt,C=new Xt,w=new Xt;n=n===void 0?12:n,r=r===void 0?.001:r,s=s===void 0?0:s,e=me(e);let T=e.length;if(T<2)return 0;let E=e[0].equals(e[T-1]),D,O=e[0],ee,te=t.strokeWidth/2,ne=1/(T-1),k=0,A,re,j,ie,ae=!1,oe=0,se=s*3,M=s*2;ce(e[0],e[1],c).multiplyScalar(te),h.copy(e[0]).sub(c),g.copy(e[0]).add(c),_.copy(h),v.copy(g);for(let n=1;n2**-52){let n=te/e;u.multiplyScalar(-n),d.subVectors(D,O),f.copy(d).setLength(n).add(u),C.copy(f).negate();let r=f.length(),i=d.length();d.divideScalar(i),p.subVectors(ee,D);let a=p.length();switch(p.divideScalar(a),d.dot(C)=r&&n.push(e[t]);return n.push(e[e.length-1]),n}}};const WV=new Ke,GV=new P;var KV=class extends on{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type=`LineSegmentsGeometry`;let e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute(`position`,new rt(e,3)),this.setAttribute(`uv`,new rt(t,2))}applyMatrix4(e){let t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let n=new en(t,6,1);return this.setAttribute(`instanceStart`,new $t(n,3,0)),this.setAttribute(`instanceEnd`,new $t(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));let r=new en(n,t*2,1);return this.setAttribute(`instanceColorStart`,new $t(r,t,0)),this.setAttribute(`instanceColorEnd`,new $t(r,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new Ge(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ke);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),WV.setFromBufferAttribute(t),this.boundingBox.union(WV))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Oe),this.boundingBox===null&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){let n=this.boundingSphere.center;this.boundingBox.getCenter(n);let r=0;for(let i=0,a=e.count;i - #include - #include - #include - - uniform float linewidth; - uniform vec2 resolution; - - attribute vec3 instanceStart; - attribute vec3 instanceEnd; - - #ifdef USE_COLOR - #ifdef USE_LINE_COLOR_ALPHA - varying vec4 vLineColor; - attribute vec4 instanceColorStart; - attribute vec4 instanceColorEnd; - #else - varying vec3 vLineColor; - attribute vec3 instanceColorStart; - attribute vec3 instanceColorEnd; - #endif - #endif - - #ifdef WORLD_UNITS - - varying vec4 worldPos; - varying vec3 worldStart; - varying vec3 worldEnd; - - #ifdef USE_DASH - - varying vec2 vUv; - - #endif - - #else - - varying vec2 vUv; - - #endif - - #ifdef USE_DASH - - uniform float dashScale; - attribute float instanceDistanceStart; - attribute float instanceDistanceEnd; - varying float vLineDistance; - - #endif - - void trimSegment( const in vec4 start, inout vec4 end ) { - - // trim end segment so it terminates between the camera plane and the near plane - - // conservative estimate of the near plane - float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column - float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column - float nearEstimate = - 0.5 * b / a; - - float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); - - end.xyz = mix( start.xyz, end.xyz, alpha ); - - } - - void main() { - - #ifdef USE_COLOR - - vLineColor = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; - - #endif - - #ifdef USE_DASH - - vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; - vUv = uv; - - #endif - - float aspect = resolution.x / resolution.y; - - // camera space - vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); - vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); - - #ifdef WORLD_UNITS - - worldStart = start.xyz; - worldEnd = end.xyz; - - #else - - vUv = uv; - - #endif - - // special case for perspective projection, and segments that terminate either in, or behind, the camera plane - // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space - // but we need to perform ndc-space calculations in the shader, so we must address this issue directly - // perhaps there is a more elegant solution -- WestLangley - - bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column - - if ( perspective ) { - - if ( start.z < 0.0 && end.z >= 0.0 ) { - - trimSegment( start, end ); - - } else if ( end.z < 0.0 && start.z >= 0.0 ) { - - trimSegment( end, start ); - - } - - } - - // clip space - vec4 clipStart = projectionMatrix * start; - vec4 clipEnd = projectionMatrix * end; - - // ndc space - vec3 ndcStart = clipStart.xyz / clipStart.w; - vec3 ndcEnd = clipEnd.xyz / clipEnd.w; - - // direction - vec2 dir = ndcEnd.xy - ndcStart.xy; - - // account for clip-space aspect ratio - dir.x *= aspect; - dir = normalize( dir ); - - #ifdef WORLD_UNITS - - // get the offset direction as perpendicular to the view vector - vec3 worldDir = normalize( end.xyz - start.xyz ); - vec3 offset; - if ( position.y < 0.5 ) { - - offset = normalize( cross( start.xyz, worldDir ) ); - - } else { - - offset = normalize( cross( end.xyz, worldDir ) ); - - } - - // sign flip - if ( position.x < 0.0 ) offset *= - 1.0; - - float forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) ); - - // don't extend the line if we're rendering dashes because we - // won't be rendering the endcaps - #ifndef USE_DASH - - // extend the line bounds to encompass endcaps - start.xyz += - worldDir * linewidth * 0.5; - end.xyz += worldDir * linewidth * 0.5; - - // shift the position of the quad so it hugs the forward edge of the line - offset.xy -= dir * forwardOffset; - offset.z += 0.5; - - #endif - - // endcaps - if ( position.y > 1.0 || position.y < 0.0 ) { - - offset.xy += dir * 2.0 * forwardOffset; - - } - - // adjust for linewidth - offset *= linewidth * 0.5; - - // set the world position - worldPos = ( position.y < 0.5 ) ? start : end; - worldPos.xyz += offset; - - // project the worldpos - vec4 clip = projectionMatrix * worldPos; - - // shift the depth of the projected points so the line - // segments overlap neatly - vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; - clip.z = clipPose.z * clip.w; - - #else - - vec2 offset = vec2( dir.y, - dir.x ); - // undo aspect ratio adjustment - dir.x /= aspect; - offset.x /= aspect; - - // sign flip - if ( position.x < 0.0 ) offset *= - 1.0; - - // endcaps - if ( position.y < 0.0 ) { - - offset += - dir; - - } else if ( position.y > 1.0 ) { - - offset += dir; - - } - - // adjust for linewidth - offset *= linewidth; - - // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... - offset /= resolution.y; - - // select end - vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; - - // back to clip space - offset *= clip.w; - - clip.xy += offset; - - #endif - - gl_Position = clip; - - vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation - - #include - #include - #include - - } - `,fragmentShader:` - uniform vec3 diffuse; - uniform float opacity; - uniform float linewidth; - - #ifdef USE_DASH - - uniform float dashOffset; - uniform float dashSize; - uniform float gapSize; - - #endif - - varying float vLineDistance; - - #ifdef WORLD_UNITS - - varying vec4 worldPos; - varying vec3 worldStart; - varying vec3 worldEnd; - - #ifdef USE_DASH - - varying vec2 vUv; - - #endif - - #else - - varying vec2 vUv; - - #endif - - #include - #include - #include - #include - - #ifdef USE_COLOR - #ifdef USE_LINE_COLOR_ALPHA - varying vec4 vLineColor; - #else - varying vec3 vLineColor; - #endif - #endif - - vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { - - float mua; - float mub; - - vec3 p13 = p1 - p3; - vec3 p43 = p4 - p3; - - vec3 p21 = p2 - p1; - - float d1343 = dot( p13, p43 ); - float d4321 = dot( p43, p21 ); - float d1321 = dot( p13, p21 ); - float d4343 = dot( p43, p43 ); - float d2121 = dot( p21, p21 ); - - float denom = d2121 * d4343 - d4321 * d4321; - - float numer = d1343 * d4321 - d1321 * d4343; - - mua = numer / denom; - mua = clamp( mua, 0.0, 1.0 ); - mub = ( d1343 + d4321 * ( mua ) ) / d4343; - mub = clamp( mub, 0.0, 1.0 ); - - return vec2( mua, mub ); - - } - - void main() { - - #include - - #ifdef USE_DASH - - if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps - - if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX - - #endif - - float alpha = opacity; - - #ifdef WORLD_UNITS - - // Find the closest points on the view ray and the line segment - vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; - vec3 lineDir = worldEnd - worldStart; - vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); - - vec3 p1 = worldStart + lineDir * params.x; - vec3 p2 = rayEnd * params.y; - vec3 delta = p1 - p2; - float len = length( delta ); - float norm = len / linewidth; - - #ifndef USE_DASH - - #ifdef USE_ALPHA_TO_COVERAGE - - float dnorm = fwidth( norm ); - alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); - - #else - - if ( norm > 0.5 ) { - - discard; - - } - - #endif - - #endif - - #else - - #ifdef USE_ALPHA_TO_COVERAGE - - // artifacts appear on some hardware if a derivative is taken within a conditional - float a = vUv.x; - float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; - float len2 = a * a + b * b; - float dlen = fwidth( len2 ); - - if ( abs( vUv.y ) > 1.0 ) { - - alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); - - } - - #else - - if ( abs( vUv.y ) > 1.0 ) { - - float a = vUv.x; - float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; - float len2 = a * a + b * b; - - if ( len2 > 1.0 ) discard; - - } - - #endif - - #endif - - vec4 diffuseColor = vec4( diffuse, alpha ); - #ifdef USE_COLOR - #ifdef USE_LINE_COLOR_ALPHA - diffuseColor *= vLineColor; - #else - diffuseColor.rgb *= vLineColor; - #endif - #endif - - #include - - gl_FragColor = diffuseColor; - - #include - #include <${parseInt(xe.replace(/\D+/g,``))>=154?`colorspace_fragment`:`encodings_fragment`}> - #include - #include - - } - `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA=`1`:delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return`WORLD_UNITS`in this.defines},set:function(e){e===!0?this.defines.WORLD_UNITS=``:delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return`USE_DASH`in this.defines},set(e){!!e!=`USE_DASH`in this.defines&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH=``:delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return`USE_ALPHA_TO_COVERAGE`in this.defines},set:function(e){!!e!=`USE_ALPHA_TO_COVERAGE`in this.defines&&(this.needsUpdate=!0),e===!0?(this.defines.USE_ALPHA_TO_COVERAGE=``,this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}};const YV=new _t,XV=new P,ZV=new P,QV=new _t,$V=new _t,eH=new _t,tH=new P,nH=new bt,rH=new Kt,iH=new P,aH=new Ke,oH=new Oe,sH=new _t;let cH,lH;function uH(e,t,n){return sH.set(0,0,-t,1).applyMatrix4(e.projectionMatrix),sH.multiplyScalar(1/sH.w),sH.x=lH/n.width,sH.y=lH/n.height,sH.applyMatrix4(e.projectionMatrixInverse),sH.multiplyScalar(1/sH.w),Math.abs(Math.max(sH.x,sH.y))}function dH(e,t){let n=e.matrixWorld,r=e.geometry,i=r.attributes.instanceStart,a=r.attributes.instanceEnd,o=Math.min(r.instanceCount,i.count);for(let r=0,s=o;ru&&$V.z>u)continue;if(QV.z>u){let e=QV.z-$V.z,t=(QV.z-u)/e;QV.lerp($V,t)}else if($V.z>u){let e=$V.z-QV.z,t=($V.z-u)/e;$V.lerp(QV,t)}QV.applyMatrix4(r),$V.applyMatrix4(r),QV.multiplyScalar(1/QV.w),$V.multiplyScalar(1/$V.w),QV.x*=i.x/2,QV.y*=i.y/2,$V.x*=i.x/2,$V.y*=i.y/2,rH.start.copy(QV),rH.start.z=0,rH.end.copy($V),rH.end.z=0;let o=rH.closestPointToPointParameter(tH,!0);rH.at(o,iH);let l=Wt.lerp(QV.z,$V.z,o),d=l>=-1&&l<=1,f=tH.distanceTo(iH)t)),o=Math.min(e.length,i);return a.slice(0,o).sort().map(t=>e[t])}shuffle(e){return e.map(e=>({value:e,sort:this._getNext()})).sort((e,t)=>e.sort-t.sort).map(({value:e})=>e)}getMulberry32(e=0){return e>0&&e<1&&(e=Math.floor(e*2**16)),()=>{e+=1831565813;let t=e;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}};const UH=[gH,_H,vH,yH,bH],WH=Wt.lerp,GH=(e=0,t=zH)=>{let n=new HH(e).choice(UH);return t.map((t,r)=>{let i=new HH(e*(r*7907+1)+(typeof t.seed==`number`?t.seed:0)),a=i.int(t.length[0],t.length[1]);return Array.from({length:a}).fill(0).map(()=>{let e=n(i.rand());return{texture:i.defaultChoice(t.texture,BH.texture),size:WH(t.size[0],t.size[1],n(1-e)),distance:WH(t.distance[0],t.distance[1],e),color:i.defaultChoice(t.color,BH.color)}})}).flat()},KH=(e,t,n=void 0,r=void 0,i=BH)=>{if(e!==void 0&&e.length>0&&(typeof n==`number`||typeof r<`u`)){let a=GH(n??0,r??zH),o=a.length,s=e.length;return o>=s?a.map((n,r)=>Object.assign(n,t,rObject.assign({},i,n0){let n=Object.assign({},i,t);return e.map(e=>Object.assign({},n,e))}let a=r===void 0||r.length===0?zH:r;return GH(n??0,a).map(e=>Object.assign({},e,t))};function qH(e){return JH(e,(e,t)=>t in BH&&e!==void 0)}function JH(e,t){let n={};return Object.keys(e).forEach(r=>{t(e[r],r)&&(n[r]=e[r])}),n}const YH=R({__name:`component`,props:{scale:{default:1},elements:{default:void 0},seed:{default:void 0},seedProps:{default:void 0},color:{default:void 0},distance:{default:void 0},size:{default:void 0},texture:{default:void 0}},setup(e,{expose:t}){let n=e,r=H(),i=H([]),a=H(qH(n));t({instance:r});let o=new fe,s=new NB,c=[],l=()=>{for(var e,t,n;c.length;)c.pop();(e=r.value)==null||e.children.forEach(e=>{`dispose`in e&&e.dispose()}),(t=r.value)==null||t.remove(...r.value.children),(n=r.value)==null||n.dispose()},u=e=>{if(typeof e.texture==`string`){let t=e.texture;e.texture=o.load(t),e.texture.name=t}return e.color=oe(e.color),e},d=()=>{for(let e=i.value.length-1;e{c[t].size=e.size*n.scale})},f=()=>{for(;i.value.length>c.length;){let e={...u(i.value[c.length])};c.push(e),s.addElement(e)}i.value.forEach((e,t)=>{let n=c[t],{texture:r,size:i,distance:a,color:s}=e;if(typeof r==`string`){if(n.texture.name!==r){n.texture.dispose();let e=r;n.texture=o.load(e),n.texture.name=e}}else n.texture!==r&&(n.texture.dispose(),n.texture=r);n.size=i,n.distance=a,n.color=oe(s)}),d()};return On(()=>{l()}),pn(()=>{var e;(e=r.value)==null||e.add(s),i.value=KH(n.elements,a.value,n.seed,n.seedProps)}),I(()=>[n.color,n.distance,n.size,n.texture],()=>{a.value={color:n.color,distance:n.distance,size:n.size,texture:n.texture}}),I(()=>[a.value,n.elements,n.seed,n.seedProps],()=>{i.value=KH(n.elements,a.value,n.seed,n.seedProps)}),I(()=>n.scale,()=>{d()}),I(()=>i.value,()=>{f()}),(e,t)=>(L(),B(`TresGroup`,{ref_key:`lensflareRef`,ref:r},null,512))}}),XH=R({__name:`Levioso`,props:{speed:{default:1},rotationFactor:{default:1},floatFactor:{default:1},range:{default:()=>[-.1,.1]}},setup(e,{expose:t}){let n=e,r=H();t({instance:r});{let e=Math.random()*1e4,{onBeforeRender:t}=ie(),i=e;t(({delta:e,invalidate:t})=>{if(!r.value)return;i+=e*n.speed;let a=i*.25,o=r.value;o.rotation.x=Math.cos(a)*.125*n.rotationFactor,o.rotation.y=Math.sin(a)*.125*n.rotationFactor,o.rotation.z=Math.sin(a)*.05*n.rotationFactor,o.position.y=Wt.mapLinear(Math.sin(a),-1,1,n.range[0],n.range[1])*n.floatFactor,t()})}return(e,t)=>(L(),B(`TresGroup`,st(e.$attrs,{ref_key:`groupRef`,ref:r}),[Mn(e.$slots,`default`)],16))}}),ZH=[`render-order`],QH=R({__name:`component`,props:{id:{default:1},colorWrite:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!1}},setup(e,{expose:t}){let n=e,r=H();function i(){var e,t;let i=Array.isArray((e=r.value)?.material)?r.value.material[0]:(t=r.value)?.material;i&&(i.colorWrite=n.colorWrite,i.depthWrite=n.depthWrite,i.stencilWrite=!0,i.stencilRef=n.id,i.stencilFunc=ve,i.stencilFail=un,i.stencilZFail=un,i.stencilZPass=un)}return An(i),t({instance:r}),(e,t)=>(L(),B(`TresMesh`,{ref_key:`meshRef`,ref:r,"render-order":-n.id},[Mn(e.$slots,`default`)],8,ZH))}}),$H=R({__name:`MouseParallax`,props:{disabled:{type:Boolean,default:!1},factor:{default:2.5},ease:{default:.1},local:{type:Boolean,default:!1}},setup(e){let t=e,{camera:n,renderer:r}=Ie(),{disabled:i,factor:a,ease:o,local:s}=zn(t),c={};s.value&&(c.target=r.value.domElement,c.type=`client`);let{x:l,y:u}=RR(c),{width:d,height:f}=s.value?MR(r.value.domElement):BR(),p=H(),m=z(),h=z();I([a,o],()=>{m.value=Array.isArray(a.value)?a.value:[a.value,a.value],h.value=Array.isArray(o.value)?o.value:[o.value,o.value]},{immediate:!0});let g=In(()=>(l.value/d.value-.5)*m.value[0]),_=In(()=>-(u.value/f.value-.5)*m.value[1]),{onBeforeRender:v}=ie();return v(({delta:e,invalidate:t})=>{i.value||!p.value||Number.isNaN(g.value)||Number.isNaN(_.value)||(p.value.position.x+=(g.value-p.value.position.x)*h.value[0]*e,p.value.position.y+=(_.value-p.value.position.y)*h.value[1]*e,t())}),I(()=>p.value,e=>e?.add(n.value)),(e,t)=>(L(),B(`TresGroup`,{ref_key:`cameraGroupRef`,ref:p},null,512))}}),eU=JR({screenspace:!1,color:new ot(`black`),opacity:1,thickness:.05,size:new Xt(1,1)},`#include - #include - #include - uniform float thickness; - uniform bool screenspace; - uniform vec2 size; - void main() { - #if defined (USE_SKINNING) - #include - #include - #include - #include - #include - #endif - #include - #include - #include - #include - vec4 tNormal = vec4(normal, 0.0); - vec4 tPosition = vec4(transformed, 1.0); - #ifdef USE_INSTANCING - tNormal = instanceMatrix * tNormal; - tPosition = instanceMatrix * tPosition; - #endif - if (screenspace) { - vec3 newPosition = tPosition.xyz + tNormal.xyz * thickness; - gl_Position = projectionMatrix * modelViewMatrix * vec4(newPosition, 1.0); - } else { - vec4 clipPosition = projectionMatrix * modelViewMatrix * tPosition; - vec4 clipNormal = projectionMatrix * modelViewMatrix * tNormal; - vec2 offset = normalize(clipNormal.xy) * thickness / size * clipPosition.w * 2.0; - clipPosition.xy += offset; - gl_Position = clipPosition; - } - }`,`uniform vec3 color; - uniform float opacity; - void main(){ - gl_FragColor = vec4(color, opacity); - #include - #include - }`),tU=R({__name:`component`,props:{color:{default:`black`},screenspace:{type:Boolean,default:!1},opacity:{default:1},transparent:{type:Boolean,default:!1},thickness:{default:.05},angle:{default:Math.PI},toneMapped:{type:Boolean,default:!0},polygonOffset:{type:Boolean,default:!1},polygonOffsetFactor:{default:0},renderOrder:{default:0}},setup(e,{expose:t}){let n=e,r=H();t({instance:r});let i=new eU({...n}),a=new Xt(1,1),o=0,s=null;function c(e){var t;let r=e.parent;if(!(!r||!r.geometry)&&(o!==n.angle||s!==r.geometry)){o=n.angle,s=r.geometry;let a=(t=e.children)?.[0];a&&(n.angle&&a.geometry.dispose(),e.remove(a)),r.skeleton?(a=new Se,a.material=i,a.bind(r.skeleton,r.bindMatrix),e.add(a)):r.isInstancedMesh?(a=new pt(r.geometry,i,r.count),a.instanceMatrix=r.instanceMatrix,e.add(a)):(a=new F,a.material=i,e.add(a)),a.geometry=n.angle?nz(r.geometry,n.angle):r.geometry}}function l(){i.side=xt,i.transparent=n.transparent,i.thickness=n.thickness,i.color=oe(n.color),i.opacity=n.opacity,i.size=a,i.screenspace=n.screenspace,i.toneMapped=n.toneMapped,i.polygonOffset=n.polygonOffset,i.polygonOffsetFactor=n.polygonOffsetFactor}let u=j().sizes;return I(()=>[u.width.value,u.height.value],([e,t])=>{a.set(e,t)}),I(()=>[n.angle],()=>{r.value&&c(r.value)}),I(()=>[n.transparent,n.thickness,n.color,n.opacity,a,n.screenspace,n.toneMapped,n.polygonOffset,n.polygonOffsetFactor],()=>l(),{immediate:!0}),pn(()=>c(r.value)),On(()=>{var e;let t=(e=r.value)?.children[0];t&&(t.geometry.dispose(),i.dispose(),t.removeFromParent())}),(e,t)=>(L(),B(`TresGroup`,{ref_key:`groupRef`,ref:r},null,512))}}),nU=[`args`],rU=R({__name:`PositionalAudio`,props:{ready:{type:Boolean,default:!1},url:{},distance:{default:2},helper:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},autoplay:{type:Boolean,default:!1},innerAngle:{default:360},outerAngle:{default:360},outerGain:{default:0}},emits:[`isPlaying`],async setup(e,{expose:t,emit:n}){let r,i,a=e,o=n,{ready:s,url:c,distance:l,helper:u,loop:d,autoplay:f,innerAngle:p,outerAngle:m,outerGain:h}=zn(a),{camera:g}=Ie(),_=H(null),v=H(null),y=H(null),b=Wn(new $e),x=()=>{var e,t,n;(e=_?.value)!=null&&e.isPlaying||((t=_?.value)==null||t.play(),o(`isPlaying`,(n=_?.value)?.isPlaying))},S=()=>{var e,t;(e=_?.value)!=null&&e.isPlaying&&(_.value.pause(),o(`isPlaying`,(t=_?.value)?.isPlaying))},C=()=>{var e;_.value&&(_.value.stop(),o(`isPlaying`,(e=_?.value)?.isPlaying))},w=()=>{if(!(_!=null&&_.value))return;C();let e=_.value;e.source&&e.disconnect()},T=()=>{var e,t;!(_!=null&&_.value)||!(v!=null&&v.value)||((e=v?.value)==null||e.dispose(),(t=_?.value)==null||t.remove(v?.value))},E=()=>{var e;if(_.value&&(_.value.setBuffer(y.value),_.value.setRefDistance(l.value),_.value.setLoop(d.value),_.value.setDirectionalCone(p.value,m.value,h.value),(e=v?.value)==null||e.update(),v!=null&&v.value)){let e=v.value.material[0];!e.visible&&m.value!==p.value&&(e.visible=!0)}},D=()=>{var e,t;E();let n=(e=_.value)?.parent,r=new Ke().setFromObject(n),i=(r.max.z-r.min.z)*2;v.value=new hH(_.value,i,32,16),(t=_?.value)==null||t.add(v.value),v.value.update()},O=()=>{var e;(e=g?.value)==null||e.remove(b),w(),T()};return t({instance:_,play:x,stop:C,pause:S,dispose:O}),y.value=([r,i]=Pn(()=>Fe(Jt,c.value)),r=await r,i(),r),I(_,()=>{_!=null&&_.value&&(u.value&&D(),s.value&&f&&x())}),I(u,()=>{u.value?D():T()}),I(s,()=>{s.value&&E(),f.value&&s.value&&x(),!f.value&&s.value&&C()}),I([l,d,y,p,m,h,f],()=>{E()}),pn(()=>{var e;(e=g?.value)==null||e.add(b)}),Dn(()=>{O()}),(e,t)=>(L(),B(`TresPositionalAudio`,st({ref_key:`positionalAudioRef`,ref:_,args:[U(b)]},e.$attrs),null,16,nU))}}),iU=[`args`,`material-uniforms-color-value`],aU=R({__name:`Reflector`,props:{color:{default:`#333`},textureWidth:{default:512},textureHeight:{default:512},clipBias:{default:0},multisample:{default:4},shader:{default:TB.ReflectorShader}},setup(e,{expose:t}){let n=e,{extend:r,invalidate:i}=Ie(),a=H();r({Reflector:TB});let{color:o,textureWidth:s,textureHeight:c,clipBias:l,multisample:u,shader:d}=zn(n);return I(n,()=>i()),t({instance:a}),(e,t)=>(L(),B(`TresReflector`,{ref_key:`reflectorRef`,ref:a,args:[void 0,{textureWidth:U(s),textureHeight:U(c),clipBias:U(l),multisample:U(u),shader:U(d)}],"material-uniforms-color-value":U(o)},[Mn(e.$slots,`default`,{},()=>[t[0]||=V(`TresPlaneGeometry`,{args:[5,5]},null,-1)])],8,iU))}}),oU=[`position-z`],sU=R({__name:`ScreenSpace`,props:{depth:{default:-1}},setup(e,{expose:t}){let n=H();return ie().onBeforeRender(({camera:e})=>{n.value&&(n.value.quaternion.copy(e.quaternion),n.value.position.copy(e.position))}),t({instance:n}),(e,t)=>(L(),B(`TresGroup`,{ref_key:`outerRef`,ref:n},[V(`TresGroup`,{"position-z":-e.depth},[Mn(e.$slots,`default`)],8,oU)],512))}}),cU=[`args`,`center`],lU=R({__name:`Text3D`,props:{font:{},text:{},size:{default:.5},height:{default:.2},curveSegments:{default:5},bevelEnabled:{type:Boolean,default:!0},bevelThickness:{default:.05},bevelSize:{default:.02},bevelOffset:{default:0},bevelSegments:{default:4},center:{type:Boolean,default:!1},needUpdates:{type:Boolean,default:!1}},async setup(e,{expose:t}){let n,r,i=e,{center:a,font:o,text:s,needUpdates:c,size:l,height:u,curveSegments:d,bevelEnabled:f,bevelThickness:p,bevelSize:m,bevelOffset:h,bevelSegments:g}=zn(i),{extend:_,invalidate:v}=Ie();I(i,()=>v()),_({TextGeometry:kV});let y=new LV,b=Rt(),x=In(()=>{var e;return s!=null&&s.value?s.value:b.default?(e=b.default()[0].children)?.trim():c.value?``:`TresJS`}),S=H();t({instance:S});let C=([n,r]=Pn(()=>new Promise((e,t)=>{try{typeof o.value==`string`?y.load(o.value,t=>{e(t)}):e(o.value)}catch(e){t(console.error(`cientos`,e))}})),n=await n,r(),n),w=In(()=>({font:C,size:gn(l),height:gn(u),curveSegments:gn(d),bevelEnabled:gn(f),bevelThickness:gn(p),bevelSize:gn(m),bevelOffset:gn(h),bevelSegments:gn(g)}));return An(()=>{S.value&&c.value&&(S.value.geometry.dispose(),S.value.geometry=new kV(x.value,w.value),a.value&&S.value.geometry.center())}),(e,t)=>U(o)?(L(),B(`TresMesh`,{key:0,ref_key:`text3DRef`,ref:S},[x.value?(L(),B(`TresTextGeometry`,{key:0,args:[x.value,w.value],center:U(a)},null,8,cU)):hn(``,!0),Mn(e.$slots,`default`)],512)):hn(``,!0)}});function uU(e){let t=z(null),{height:n,width:r,settings:i,depth:a,autoRender:o=z(!0)}=Rn(e)?zn(e):zn(Hn(e)),{onBeforeRender:s}=ie(),{camera:c,renderer:l,scene:u,sizes:d,invalidate:f}=Ie();return I(()=>[r?.value,d.width.value,n?.value,d.height.value],()=>{var e;(e=t.value)==null||e.dispose(),t.value=new qe(r?.value||d.width.value,n?.value||d.height.value,{minFilter:be,magFilter:be,type:vt,...i?.value}),a!=null&&a.value&&(t.value.depthTexture=new ft(r?.value||d.width.value,n?.value||d.height.value,sn)),f()},{immediate:!0}),s(()=>{o.value&&(l.value.setRenderTarget(t.value),l.value.clear(),l.value.render(u.value,c.value),l.value.setRenderTarget(null))},1/0),Dn(()=>{var e;(e=t.value)==null||e.dispose()}),t}const dU=R({__name:`component`,props:{width:{},height:{},depth:{type:Boolean,default:!1},settings:{default:void 0},autoRender:{type:Boolean,default:!0}},setup(e,{expose:t}){let n=uU(e);return t({instance:n}),()=>{}}}),fU=(e,t=16,n,r,i)=>{let a=new Float32Array(t*16),o=z(new Ct(a,16));return(()=>{if(!e)return;let a=new WB(e);r&&a.setWeightAttribute(r),a.build();let s=new P,c=new P,l=new ot,u=new N;e.updateMatrixWorld(!0);for(let r=0;ro()),An(()=>{var e,t;i.value=n.instanceMesh??(e=r.value)?.children.find(e=>Object.prototype.hasOwnProperty.call(e,`instanceMatrix`)),a.value=n.mesh??(t=r.value)?.children.find(e=>e.type===`Mesh`),fU(a.value,n.count,i.value,n.weight,n.transform)}),t({samplerRef:r}),(e,t)=>(L(),B(`TresGroup`,{ref_key:`samplerRef`,ref:r},[Mn(e.$slots,`default`)],512))}}),mU=new P,hU=new P,gU=new P,_U=(e,t,n)=>{let r=n.width/2,i=n.height/2;t.updateMatrixWorld(!1);let a=e.project(t);return a.x=a.x*r+r,a.y=-(a.y*i)+i,a},vU=(e,t,n,r=1)=>{let i=mU.set(e.x/n.width*2-1,-(e.y/n.height)*2+1,r);return i.unproject(t),i},yU=(e,t,n,r)=>{let i=_U(gU.copy(e),n,r),a=0;for(let o=0;o<2;++o){let s=hU.copy(i).setComponent(o,i.getComponent(o)+t),c=vU(s,n,r,s.z);a=Math.max(a,e.distanceTo(c))}return a},bU=R({__name:`ScreenSizer`,setup(e,{expose:t}){let n=new P,r=H(),i=H(),a=j().sizes,o=In(()=>({width:a.width.value,height:a.height.value}));return ie().onBeforeRender(({camera:e})=>{let t=i.value;if(!t)return;let r=yU(t.getWorldPosition(n),1,e,o.value);t.scale.setScalar(r)}),t({instance:r}),(e,t)=>(L(),B(`TresObject3D`,{ref_key:`outerRef`,ref:r},[V(`TresObject3D`,{ref_key:`innerRef`,ref:i},[Mn(e.$slots,`default`)],512)],512))}}),xU=[`color`],SU=R({__name:`Edges`,props:{color:{default:`#ff0000`},threshold:{default:15}},setup(e,{expose:t}){let n=e,{color:r,threshold:i}=zn(n),a=H(),o=z(null),s=z(1);return t({instance:a}),I(()=>[a.value,i.value],()=>{if(a.value){let e=a.value.parent;if(e&&`geometry`in e&&e.geometry instanceof Ut){let t=e.geometry;(t!==o.value||i.value!==s.value)&&(o.value=t,s.value=i.value,a.value.geometry=new gt(t,i.value))}}}),(e,t)=>(L(),B(`TresLineSegments`,st({ref_key:`lineSegmentsRef`,ref:a},e.$attrs),[Mn(e.$slots,`default`,{},()=>[V(`TresLineBasicMaterial`,{color:U(r)},null,8,xU)])],16))}}),CU={sunset:`venice/venice_sunset_1k.hdr`,studio:`studio/poly_haven_studio_1k.hdr`,city:`city/canary_wharf_1k.hdr`,umbrellas:`outdoor/outdoor_umbrellas_1k.hdr`,night:`outdoor/satara_night_1k.hdr`,forest:`outood/mossy_forest_1k.hdr`,snow:`outdoor/snowy_forest_path_01_1k.hdr`,dawn:`kiara/kiara_1_dawn_1k.hdr`,hangar:`indoor/small_hangar_01_1k.hdr`,urban:`indoor/abandoned_games_room_02_1k.hdr`,modern:`city/modern_buildings_2_1k.hdr`,shangai:`city/shanghai_bund_1k.hdr`},wU=`https://raw.githubusercontent.com/Tresjs/assets/main/textures/hdr/`;function TU(e){return e instanceof Dt?e:Array.isArray(e)?new Dt(e[0],e[1],e[2]):typeof e==`number`?new Dt(e,e,e):e instanceof P||typeof e==`object`&&`x`in e&&`y`in e&&`z`in e?new Dt(e.x,e.y,e.z):null}function EU(e){e.traverse(e=>{e instanceof F&&e.material&&(e.material.needsUpdate=!0)})}async function DU(e,t){let{scene:n,invalidate:r}=Ie(),{preset:i,blur:a,files:o=z([]),path:s=z(``),background:c,backgroundIntensity:l=z(1),environmentIntensity:u=z(1),backgroundRotation:d=z([0,0,0]),environmentRotation:f=z([0,0,0]),syncMaterials:p=z(!1)}=zn(e);I(e,()=>{r()});let m=z(null),h=In(()=>Array.isArray(o.value)),g=In(()=>h.value?pe:VV);return I([o,s],async([e,t])=>{if(e&&e.length>0&&!(i!=null&&i.value)){try{let n=await Fe(g.value,h.value?[...U(e)]:U(e),e=>{t&&e.setPath(U(t))});m.value=Array.isArray(n)?n[0]:n}catch(e){throw Error(`Failed to load environment map: ${e}`)}m.value&&(m.value.mapping=h.value?yt:Nt)}},{immediate:!0}),I(m,e=>{n.value&&e&&(n.value.environment=e)},{immediate:!0}),I([c,m],([e,r])=>{if(n.value){let i=t!=null&&t.value?t.value.texture:r;i&&(n.value.background=e?i:null)}},{immediate:!0}),I(()=>a?.value,e=>{n.value&&e&&(n.value.backgroundBlurriness=e)},{immediate:!0}),I(()=>l?.value,e=>{n.value&&(n.value.backgroundIntensity=e??1)},{immediate:!0}),I(()=>u?.value,e=>{n.value&&(n.value.environmentIntensity=e??1)},{immediate:!0}),I(()=>d?.value,e=>{if(n.value){let t=TU(e);t&&(n.value.backgroundRotation=t)}},{immediate:!0}),I(()=>f?.value,e=>{if(n.value&&!(p!=null&&p.value)){let t=TU(e);t&&(n.value.environmentRotation=t,EU(n.value))}},{immediate:!0}),I(()=>i?.value,async e=>{if(e&&e in CU){let t=wU,n=CU[e];try{let e=await Fe(VV,n,e=>{e.setPath(t)});m.value=Array.isArray(e)?e[0]:e}catch(e){throw Error(`Failed to load environment map: ${e}`)}m.value&&(m.value.mapping=Nt),r()}else if(e&&!(e in CU))throw Error(`Preset must be one of: ${Object.keys(CU).join(`, `)}`)},{immediate:!0}),I([p,d],([e,t])=>{if(e&&n.value){let e=TU(t);e&&(n.value.environmentRotation=e,EU(n.value))}},{immediate:!0}),m} -/*! -* camera-controls -* https://github.com/yomotsu/camera-controls -* (c) 2017 @yomotsu -* Released under the MIT License. -*/ -const OU={LEFT:1,RIGHT:2,MIDDLE:4},$=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),kU={NONE:0,IN:1,OUT:-1};function AU(e){return e.isPerspectiveCamera}function jU(e){return e.isOrthographicCamera}const MU=Math.PI*2,NU=Math.PI/2,PU=1e-5,FU=Math.PI/180;function IU(e,t,n){return Math.max(t,Math.min(n,e))}function LU(e,t=PU){return Math.abs(e)0==p>u&&(p=u,n.value=(p-u)/a),p}function UU(e,t,n,r,i=1/0,a,o){r=Math.max(1e-4,r);let s=2/r,c=s*a,l=1/(1+c+.48*c*c+.235*c*c*c),u=t.x,d=t.y,f=t.z,p=e.x-u,m=e.y-d,h=e.z-f,g=u,_=d,v=f,y=i*r,b=y*y,x=p*p+m*m+h*h;if(x>b){let e=Math.sqrt(x);p=p/e*y,m=m/e*y,h=h/e*y}u=e.x-p,d=e.y-m,f=e.z-h;let S=(n.x+s*p)*a,C=(n.y+s*m)*a,w=(n.z+s*h)*a;n.x=(n.x-s*S)*l,n.y=(n.y-s*C)*l,n.z=(n.z-s*w)*l,o.x=u+(p+S)*l,o.y=d+(m+C)*l,o.z=f+(h+w)*l;let T=g-e.x,E=_-e.y,D=v-e.z,O=o.x-g,ee=o.y-_,te=o.z-v;return T*O+E*ee+D*te>0&&(o.x=g,o.y=_,o.z=v,n.x=(o.x-g)/a,n.y=(o.y-_)/a,n.z=(o.z-v)/a),o}function WU(e,t){t.set(0,0),e.forEach(e=>{t.x+=e.clientX,t.y+=e.clientY}),t.x/=e.length,t.y/=e.length}function GU(e,t){return jU(e)?(console.warn(`${t} is not supported in OrthographicCamera`),!0):!1}var KU=class{constructor(){this._listeners={}}addEventListener(e,t){let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners[e];if(n!==void 0){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){let t=this._listeners[e.type];if(t!==void 0){e.target=this;let n=t.slice(0);for(let t=0,r=n.length;t{},this._enabled=!0,this._state=$.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=kU.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new ZU.Vector3,this._focalOffsetVelocity=new ZU.Vector3,this._zoomVelocity={value:0},this._truckInternal=(e,t,n)=>{let r,i;if(AU(this._camera)){let n=nW.copy(this._camera.position).sub(this._target),a=this._camera.getEffectiveFOV()*FU,o=n.length()*Math.tan(a*.5);r=this.truckSpeed*e*o/this._elementRect.height,i=this.truckSpeed*t*o/this._elementRect.height}else if(jU(this._camera)){let n=this._camera;r=e*(n.right-n.left)/n.zoom/this._elementRect.width,i=t*(n.top-n.bottom)/n.zoom/this._elementRect.height}else return;this.verticalDragToForward?(n?this.setFocalOffset(this._focalOffsetEnd.x+r,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(r,0,!0),this.forward(-i,!0)):n?this.setFocalOffset(this._focalOffsetEnd.x+r,this._focalOffsetEnd.y+i,this._focalOffsetEnd.z,!0):this.truck(r,i,!0)},this._rotateInternal=(e,t)=>{let n=MU*this.azimuthRotateSpeed*e/this._elementRect.height,r=MU*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(n,r,!0)},this._dollyInternal=(e,t,n)=>{let r=.95**(-e*this.dollySpeed),i=this._sphericalEnd.radius,a=this._sphericalEnd.radius*r,o=IU(a,this.minDistance,this.maxDistance),s=o-a;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(a,!0):(this.infinityDolly&&!this.dollyToCursor&&this.dollyInFixed(s,!0),this._dollyToNoClamp(o,!0)),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?a:o)-i,this._dollyControlCoord.set(t,n)),this._lastDollyDirection=Math.sign(-e)},this._zoomInternal=(e,t,n)=>{let r=.95**(e*this.dollySpeed),i=this._zoom,a=this._zoom*r;this.zoomTo(a,!0),this.dollyToCursor&&(this._changedZoom+=a-i,this._dollyControlCoord.set(t,n))},typeof ZU>`u`&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=t,this._yAxisUpSpace=new ZU.Quaternion().setFromUnitVectors(this._camera.up,$U),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=$.NONE,this._target=new ZU.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new ZU.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new ZU.Spherical().setFromVector3(nW.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new ZU.Vector3,new ZU.Vector3,new ZU.Vector3,new ZU.Vector3],this._updateNearPlaneCorners(),this._boundary=new ZU.Box3(new ZU.Vector3(-1/0,-1/0,-1/0),new ZU.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new ZU.Vector2,this.mouseButtons={left:$.ROTATE,middle:$.DOLLY,right:$.TRUCK,wheel:AU(this._camera)?$.DOLLY:jU(this._camera)?$.ZOOM:$.NONE},this.touches={one:$.TOUCH_ROTATE,two:AU(this._camera)?$.TOUCH_DOLLY_TRUCK:jU(this._camera)?$.TOUCH_ZOOM_TRUCK:$.NONE,three:$.TOUCH_TRUCK};let r=new ZU.Vector2,i=new ZU.Vector2,a=new ZU.Vector2,o=e=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){let t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,r=e.clientY/t.height;if(nthis._interactiveArea.right||rthis._interactiveArea.bottom)return}let t=e.pointerType===`mouse`?(e.buttons&OU.LEFT)===OU.LEFT?OU.LEFT:(e.buttons&OU.MIDDLE)===OU.MIDDLE?OU.MIDDLE:(e.buttons&OU.RIGHT)===OU.RIGHT?OU.RIGHT:null:null;if(t!==null){let e=this._findPointerByMouseButton(t);e&&this._disposePointer(e)}if((e.buttons&OU.LEFT)===OU.LEFT&&this._lockedPointer)return;let n={pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,deltaX:0,deltaY:0,mouseButton:t};this._activePointers.push(n),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this._domElement.ownerDocument.addEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.addEventListener(`pointerup`,c),this._isDragging=!0,f(e)},s=e=>{e.cancelable&&e.preventDefault();let t=e.pointerId,n=this._lockedPointer||this._findPointerById(t);if(n){if(n.clientX=e.clientX,n.clientY=e.clientY,n.deltaX=e.movementX,n.deltaY=e.movementY,this._state=0,e.pointerType===`touch`)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else (!this._isDragging&&this._lockedPointer||this._isDragging&&(e.buttons&OU.LEFT)===OU.LEFT)&&(this._state|=this.mouseButtons.left),this._isDragging&&(e.buttons&OU.MIDDLE)===OU.MIDDLE&&(this._state|=this.mouseButtons.middle),this._isDragging&&(e.buttons&OU.RIGHT)===OU.RIGHT&&(this._state|=this.mouseButtons.right);p()}},c=e=>{let t=this._findPointerById(e.pointerId);if(!(t&&t===this._lockedPointer)){if(t&&this._disposePointer(t),e.pointerType===`touch`)switch(this._activePointers.length){case 0:this._state=$.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=$.NONE;m()}},l=-1,u=e=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===$.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){let t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,r=e.clientY/t.height;if(nthis._interactiveArea.right||rthis._interactiveArea.bottom)return}if(e.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===$.ROTATE||this.mouseButtons.wheel===$.TRUCK){let e=performance.now();l-e<1e3&&this._getClientRect(this._elementRect),l=e}let t=XU?-1:-3,n=e.deltaMode===1?e.deltaY/t:e.deltaY/(t*10),r=this.dollyToCursor?(e.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,i=this.dollyToCursor?(e.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case $.ROTATE:this._rotateInternal(e.deltaX,e.deltaY),this._isUserControllingRotate=!0;break;case $.TRUCK:this._truckInternal(e.deltaX,e.deltaY,!1),this._isUserControllingTruck=!0;break;case $.OFFSET:this._truckInternal(e.deltaX,e.deltaY,!0),this._isUserControllingOffset=!0;break;case $.DOLLY:this._dollyInternal(-n,r,i),this._isUserControllingDolly=!0;break;case $.ZOOM:this._zoomInternal(-n,r,i),this._isUserControllingZoom=!0;break}this.dispatchEvent({type:`control`})},d=t=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===e.ACTION.NONE){let e=t instanceof PointerEvent?t.pointerId:0,n=this._findPointerById(e);n&&this._disposePointer(n),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c);return}t.preventDefault()}},f=e=>{if(this._enabled){if(WU(this._activePointers,tW),this._getClientRect(this._elementRect),r.copy(tW),i.copy(tW),this._activePointers.length>=2){let e=tW.x-this._activePointers[1].clientX,t=tW.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t);a.set(0,n);let r=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,o=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(r,o)}if(this._state=0,!e)this._lockedPointer&&(this._state|=this.mouseButtons.left);else if(`pointerType`in e&&e.pointerType===`touch`)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else !this._lockedPointer&&(e.buttons&OU.LEFT)===OU.LEFT&&(this._state|=this.mouseButtons.left),(e.buttons&OU.MIDDLE)===OU.MIDDLE&&(this._state|=this.mouseButtons.middle),(e.buttons&OU.RIGHT)===OU.RIGHT&&(this._state|=this.mouseButtons.right);((this._state&$.ROTATE)===$.ROTATE||(this._state&$.TOUCH_ROTATE)===$.TOUCH_ROTATE||(this._state&$.TOUCH_DOLLY_ROTATE)===$.TOUCH_DOLLY_ROTATE||(this._state&$.TOUCH_ZOOM_ROTATE)===$.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&$.TRUCK)===$.TRUCK||(this._state&$.TOUCH_TRUCK)===$.TOUCH_TRUCK||(this._state&$.TOUCH_DOLLY_TRUCK)===$.TOUCH_DOLLY_TRUCK||(this._state&$.TOUCH_ZOOM_TRUCK)===$.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&$.DOLLY)===$.DOLLY||(this._state&$.TOUCH_DOLLY)===$.TOUCH_DOLLY||(this._state&$.TOUCH_DOLLY_TRUCK)===$.TOUCH_DOLLY_TRUCK||(this._state&$.TOUCH_DOLLY_OFFSET)===$.TOUCH_DOLLY_OFFSET||(this._state&$.TOUCH_DOLLY_ROTATE)===$.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&$.ZOOM)===$.ZOOM||(this._state&$.TOUCH_ZOOM)===$.TOUCH_ZOOM||(this._state&$.TOUCH_ZOOM_TRUCK)===$.TOUCH_ZOOM_TRUCK||(this._state&$.TOUCH_ZOOM_OFFSET)===$.TOUCH_ZOOM_OFFSET||(this._state&$.TOUCH_ZOOM_ROTATE)===$.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&$.OFFSET)===$.OFFSET||(this._state&$.TOUCH_OFFSET)===$.TOUCH_OFFSET||(this._state&$.TOUCH_DOLLY_OFFSET)===$.TOUCH_DOLLY_OFFSET||(this._state&$.TOUCH_ZOOM_OFFSET)===$.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:`controlstart`})}},p=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,WU(this._activePointers,tW);let e=this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,t=e?-e.deltaX:i.x-tW.x,n=e?-e.deltaY:i.y-tW.y;if(i.copy(tW),((this._state&$.ROTATE)===$.ROTATE||(this._state&$.TOUCH_ROTATE)===$.TOUCH_ROTATE||(this._state&$.TOUCH_DOLLY_ROTATE)===$.TOUCH_DOLLY_ROTATE||(this._state&$.TOUCH_ZOOM_ROTATE)===$.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(t,n),this._isUserControllingRotate=!0),(this._state&$.DOLLY)===$.DOLLY||(this._state&$.ZOOM)===$.ZOOM){let e=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,t=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0,i=this.dollyDragInverted?-1:1;(this._state&$.DOLLY)===$.DOLLY?(this._dollyInternal(i*n*YU,e,t),this._isUserControllingDolly=!0):(this._zoomInternal(i*n*YU,e,t),this._isUserControllingZoom=!0)}if((this._state&$.TOUCH_DOLLY)===$.TOUCH_DOLLY||(this._state&$.TOUCH_ZOOM)===$.TOUCH_ZOOM||(this._state&$.TOUCH_DOLLY_TRUCK)===$.TOUCH_DOLLY_TRUCK||(this._state&$.TOUCH_ZOOM_TRUCK)===$.TOUCH_ZOOM_TRUCK||(this._state&$.TOUCH_DOLLY_OFFSET)===$.TOUCH_DOLLY_OFFSET||(this._state&$.TOUCH_ZOOM_OFFSET)===$.TOUCH_ZOOM_OFFSET||(this._state&$.TOUCH_DOLLY_ROTATE)===$.TOUCH_DOLLY_ROTATE||(this._state&$.TOUCH_ZOOM_ROTATE)===$.TOUCH_ZOOM_ROTATE){let e=tW.x-this._activePointers[1].clientX,t=tW.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t),r=a.y-n;a.set(0,n);let o=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,s=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&$.TOUCH_DOLLY)===$.TOUCH_DOLLY||(this._state&$.TOUCH_DOLLY_ROTATE)===$.TOUCH_DOLLY_ROTATE||(this._state&$.TOUCH_DOLLY_TRUCK)===$.TOUCH_DOLLY_TRUCK||(this._state&$.TOUCH_DOLLY_OFFSET)===$.TOUCH_DOLLY_OFFSET?(this._dollyInternal(r*YU,o,s),this._isUserControllingDolly=!0):(this._zoomInternal(r*YU,o,s),this._isUserControllingZoom=!0)}((this._state&$.TRUCK)===$.TRUCK||(this._state&$.TOUCH_TRUCK)===$.TOUCH_TRUCK||(this._state&$.TOUCH_DOLLY_TRUCK)===$.TOUCH_DOLLY_TRUCK||(this._state&$.TOUCH_ZOOM_TRUCK)===$.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(t,n,!1),this._isUserControllingTruck=!0),((this._state&$.OFFSET)===$.OFFSET||(this._state&$.TOUCH_OFFSET)===$.TOUCH_OFFSET||(this._state&$.TOUCH_DOLLY_OFFSET)===$.TOUCH_DOLLY_OFFSET||(this._state&$.TOUCH_ZOOM_OFFSET)===$.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(t,n,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:`control`})},m=()=>{WU(this._activePointers,tW),i.copy(tW),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this.dispatchEvent({type:`controlend`}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener(`pointerlockchange`,h),this._domElement.ownerDocument.addEventListener(`pointerlockerror`,g),this._domElement.ownerDocument.addEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.addEventListener(`pointerup`,c),f())},this.unlockPointer=()=>{var e,t,n;this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),(e=this._domElement)==null||e.ownerDocument.exitPointerLock(),(t=this._domElement)==null||t.ownerDocument.removeEventListener(`pointerlockchange`,h),(n=this._domElement)==null||n.ownerDocument.removeEventListener(`pointerlockerror`,g),this.cancel()};let h=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},g=()=>{this.unlockPointer()};this._addAllEventListeners=e=>{this._domElement=e,this._domElement.style.touchAction=`none`,this._domElement.style.userSelect=`none`,this._domElement.style.webkitUserSelect=`none`,this._domElement.addEventListener(`pointerdown`,o),this._domElement.addEventListener(`pointercancel`,c),this._domElement.addEventListener(`wheel`,u,{passive:!1}),this._domElement.addEventListener(`contextmenu`,d)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction=``,this._domElement.style.userSelect=``,this._domElement.style.webkitUserSelect=``,this._domElement.removeEventListener(`pointerdown`,o),this._domElement.removeEventListener(`pointercancel`,c),this._domElement.removeEventListener(`wheel`,u,{passive:!1}),this._domElement.removeEventListener(`contextmenu`,d),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this._domElement.ownerDocument.removeEventListener(`pointerlockchange`,h),this._domElement.ownerDocument.removeEventListener(`pointerlockerror`,g))},this.cancel=()=>{this._state!==$.NONE&&(this._state=$.NONE,this._activePointers.length=0,m())},n&&this.connect(n),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction=`none`,this._domElement.style.userSelect=`none`,this._domElement.style.webkitUserSelect=`none`):(this.cancel(),this._domElement.style.touchAction=``,this._domElement.style.userSelect=``,this._domElement.style.webkitUserSelect=``))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=IU(e.width,0,1),this._interactiveArea.height=IU(e.height,0,1),this._interactiveArea.x=IU(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=IU(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,n=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,n=!1){this._isUserControllingRotate=!1;let r=IU(e,this.minAzimuthAngle,this.maxAzimuthAngle),i=IU(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=r,this._sphericalEnd.phi=i,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);let a=!n||RU(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&RU(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(a)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=kU.NONE,this._changedDolly=0,this._dollyToNoClamp(IU(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){let n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){let t=this._collisionTest(),r=RU(t,this._spherical.radius);if(!(n>e)&&r)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,t)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);let r=!t||RU(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(r)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(aW).multiplyScalar(e)),t||this._target.copy(this._targetEnd);let n=!t||RU(this._target.x,this._targetEnd.x,this.restThreshold)&&RU(this._target.y,this._targetEnd.y,this.restThreshold)&&RU(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=IU(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);let n=!t||RU(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t,n=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t,n=!1){this._camera.updateMatrix(),oW.setFromMatrixColumn(this._camera.matrix,0),sW.setFromMatrixColumn(this._camera.matrix,1),oW.multiplyScalar(e),sW.multiplyScalar(-t);let r=nW.copy(oW).add(sW),i=rW.copy(this._targetEnd).add(r);return this.moveTo(i.x,i.y,i.z,n)}forward(e,t=!1){nW.setFromMatrixColumn(this._camera.matrix,0),nW.crossVectors(this._camera.up,nW),nW.multiplyScalar(e);let n=rW.copy(this._targetEnd).add(nW);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return nW.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+nW.x,this._targetEnd.y+nW.y,this._targetEnd.z+nW.z,t)}moveTo(e,t,n,r=!1){this._isUserControllingTruck=!1;let i=nW.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,i,this.boundaryFriction),this._needsUpdate=!0,r||this._target.copy(this._targetEnd);let a=!r||RU(this._target.x,this._targetEnd.x,this.restThreshold)&&RU(this._target.y,this._targetEnd.y,this.restThreshold)&&RU(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(a)}lookInDirectionOf(e,t,n,r=!1){let i=nW.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);return this.setPosition(i.x,i.y,i.z,r)}fitToBox(e,t,{cover:n=!1,paddingLeft:r=0,paddingRight:i=0,paddingBottom:a=0,paddingTop:o=0}={}){let s=[],c=e.isBox3?pW.copy(e):pW.setFromObject(e);c.isEmpty()&&(console.warn(`camera-controls: fitTo() cannot be used with an empty box. Aborting`),Promise.resolve());let l=zU(this._sphericalEnd.theta,NU),u=zU(this._sphericalEnd.phi,NU);s.push(this.rotateTo(l,u,t));let d=nW.setFromSpherical(this._sphericalEnd).normalize(),f=gW.setFromUnitVectors(d,eW),p=RU(Math.abs(d.y),1);p&&f.multiply(_W.setFromAxisAngle($U,l)),f.multiply(this._yAxisUpSpaceInverse);let m=mW.makeEmpty();rW.copy(c.min).applyQuaternion(f),m.expandByPoint(rW),rW.copy(c.min).setX(c.max.x).applyQuaternion(f),m.expandByPoint(rW),rW.copy(c.min).setY(c.max.y).applyQuaternion(f),m.expandByPoint(rW),rW.copy(c.max).setZ(c.min.z).applyQuaternion(f),m.expandByPoint(rW),rW.copy(c.min).setZ(c.max.z).applyQuaternion(f),m.expandByPoint(rW),rW.copy(c.max).setY(c.min.y).applyQuaternion(f),m.expandByPoint(rW),rW.copy(c.max).setX(c.min.x).applyQuaternion(f),m.expandByPoint(rW),rW.copy(c.max).applyQuaternion(f),m.expandByPoint(rW),m.min.x-=r,m.min.y-=a,m.max.x+=i,m.max.y+=o,f.setFromUnitVectors(eW,d),p&&f.premultiply(_W.invert()),f.premultiply(this._yAxisUpSpace);let h=m.getSize(nW),g=m.getCenter(rW).applyQuaternion(f);if(AU(this._camera)){let e=this.getDistanceToFitBox(h.x,h.y,h.z,n);s.push(this.moveTo(g.x,g.y,g.z,t)),s.push(this.dollyTo(e,t)),s.push(this.setFocalOffset(0,0,0,t))}else if(jU(this._camera)){let e=this._camera,r=e.right-e.left,i=e.top-e.bottom,a=n?Math.max(r/h.x,i/h.y):Math.min(r/h.x,i/h.y);s.push(this.moveTo(g.x,g.y,g.z,t)),s.push(this.zoomTo(a,t)),s.push(this.setFocalOffset(0,0,0,t))}return Promise.all(s)}fitToSphere(t,n){let r=[],i=`isObject3D`in t?e.createBoundingSphere(t,hW):hW.copy(t);if(r.push(this.moveTo(i.center.x,i.center.y,i.center.z,n)),AU(this._camera)){let e=this.getDistanceToFitSphere(i.radius);r.push(this.dollyTo(e,n))}else if(jU(this._camera)){let e=this._camera.right-this._camera.left,t=this._camera.top-this._camera.bottom,a=2*i.radius,o=Math.min(e/a,t/a);r.push(this.zoomTo(o,n))}return r.push(this.setFocalOffset(0,0,0,n)),Promise.all(r)}setLookAt(e,t,n,r,i,a,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=kU.NONE,this._changedDolly=0;let s=rW.set(r,i,a),c=nW.set(e,t,n);this._targetEnd.copy(s),this._sphericalEnd.setFromVector3(c.sub(s).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));let l=!o||RU(this._target.x,this._targetEnd.x,this.restThreshold)&&RU(this._target.y,this._targetEnd.y,this.restThreshold)&&RU(this._target.z,this._targetEnd.z,this.restThreshold)&&RU(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&RU(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&RU(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(l)}lerpLookAt(e,t,n,r,i,a,o,s,c,l,u,d,f,p=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=kU.NONE,this._changedDolly=0;let m=nW.set(r,i,a),h=rW.set(e,t,n);dW.setFromVector3(h.sub(m).applyQuaternion(this._yAxisUpSpace));let g=iW.set(l,u,d),_=rW.set(o,s,c);fW.setFromVector3(_.sub(g).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(m.lerp(g,f));let v=fW.theta-dW.theta,y=fW.phi-dW.phi,b=fW.radius-dW.radius;this._sphericalEnd.set(dW.radius+b*f,dW.phi+y*f,dW.theta+v*f),this.normalizeRotations(),this._needsUpdate=!0,p||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));let x=!p||RU(this._target.x,this._targetEnd.x,this.restThreshold)&&RU(this._target.y,this._targetEnd.y,this.restThreshold)&&RU(this._target.z,this._targetEnd.z,this.restThreshold)&&RU(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&RU(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&RU(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(x)}setPosition(e,t,n,r=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,r)}setTarget(e,t,n,r=!1){let i=this.getPosition(nW),a=this.setLookAt(i.x,i.y,i.z,e,t,n,r);return this._sphericalEnd.phi=IU(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),a}setFocalOffset(e,t,n,r=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,r||this._focalOffset.copy(this._focalOffsetEnd);let i=!r||RU(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&RU(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&RU(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),oW.setFromMatrixColumn(this._camera.matrixWorldInverse,0),sW.setFromMatrixColumn(this._camera.matrixWorldInverse,1),cW.setFromMatrixColumn(this._camera.matrixWorldInverse,2);let r=nW.set(e,t,n),i=r.distanceTo(this._camera.position),a=r.sub(this._camera.position);oW.multiplyScalar(a.x),sW.multiplyScalar(a.y),cW.multiplyScalar(a.z),nW.copy(oW).add(sW).add(cW),nW.z+=i,this.dollyTo(i,!1),this.setFocalOffset(-nW.x,nW.y,-nW.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,r){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new ZU.Vector4,typeof e==`number`?this._viewport.set(e,t,n,r):this._viewport.copy(e)}getDistanceToFitBox(e,t,n,r=!1){if(GU(this._camera,`getDistanceToFitBox`))return this._spherical.radius;let i=e/t,a=this._camera.getEffectiveFOV()*FU,o=this._camera.aspect;return((r?i>o:it.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){let r=t.lengthSq();if(r===0)return e;let i=rW.copy(t).add(e),a=this._boundary.clampPoint(i,iW).sub(i),o=a.lengthSq();if(o===0)return e.add(t);if(o===r)return e;if(n===0)return e.add(t).add(a);{let r=1+n*o/t.dot(a);return e.add(rW.copy(t).multiplyScalar(r)).add(a.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(AU(this._camera)){let e=this._camera,t=e.near,n=e.getEffectiveFOV()*FU,r=Math.tan(n*.5)*t,i=r*e.aspect;this._nearPlaneCorners[0].set(-i,-r,0),this._nearPlaneCorners[1].set(i,-r,0),this._nearPlaneCorners[2].set(i,r,0),this._nearPlaneCorners[3].set(-i,r,0)}else if(jU(this._camera)){let e=this._camera,t=1/e.zoom,n=e.left*t,r=e.right*t,i=e.top*t,a=e.bottom*t;this._nearPlaneCorners[0].set(n,i,0),this._nearPlaneCorners[1].set(r,i,0),this._nearPlaneCorners[2].set(r,a,0),this._nearPlaneCorners[3].set(n,a,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||GU(this._camera,`_collisionTest`))return e;let t=this._getTargetDirection(aW);vW.lookAt(QU,t,this._camera.up);for(let n=0;n<4;n++){let r=rW.copy(this._nearPlaneCorners[n]);r.applyMatrix4(vW);let i=iW.addVectors(this._target,r);yW.set(i,t),yW.far=this._spherical.radius+1;let a=yW.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{let t=()=>{this.removeEventListener(`rest`,t),e()};this.addEventListener(`rest`,t)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(`.dampingFactor has been deprecated. use smoothTime (in seconds) instead.`),0}set dampingFactor(e){console.warn(`.dampingFactor has been deprecated. use smoothTime (in seconds) instead.`)}get draggingDampingFactor(){return console.warn(`.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.`),0}set draggingDampingFactor(e){console.warn(`.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.`)}static createBoundingSphere(e,t=new ZU.Sphere){let n=t,r=n.center;pW.makeEmpty(),e.traverseVisible(e=>{e.isMesh&&pW.expandByObject(e)}),pW.getCenter(r);let i=0;return e.traverseVisible(e=>{if(!e.isMesh)return;let t=e,n=t.geometry.clone();n.applyMatrix4(t.matrixWorld);let a=n.attributes.position;for(let e=0,t=a.count;e!!(e&&e.isPerspectiveCamera),SW=e=>!!(e&&e.isOrthographicCamera),CW=`min-polar-angle.max-polar-angle.min-azimuth-angle.max-azimuth-angle.distance.min-distance.max-distance.infinity-dolly.min-zoom.max-zoom.smooth-time.dragging-smooth-time.max-speed.azimuth-rotate-speed.polar-rotate-speed.dolly-speed.dolly-drag-inverted.truck-speed.dolly-to-cursor.drag-to-offset.vertical-drag-to-forward.boundary-friction.rest-threshold.collider-meshes.args.mouse-buttons.touches`.split(`.`),wW=(e,t)=>({left:bW.ACTION.ROTATE,middle:bW.ACTION.DOLLY,right:bW.ACTION.TRUCK,wheel:xW(e)?bW.ACTION.DOLLY:SW(e)?bW.ACTION.ZOOM:bW.ACTION.NONE,...t}),TW=(e,t)=>({one:bW.ACTION.TOUCH_ROTATE,two:xW(e)?bW.ACTION.TOUCH_DOLLY_TRUCK:SW(e)?bW.ACTION.TOUCH_ZOOM_TRUCK:bW.ACTION.NONE,three:bW.ACTION.TOUCH_TRUCK,...t}),EW=R({__name:`CameraControls`,props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},minPolarAngle:{default:0},maxPolarAngle:{default:Math.PI},minAzimuthAngle:{default:-1/0},maxAzimuthAngle:{default:1/0},distance:{default:()=>Ie().camera.value.position.z},minDistance:{default:2**-52},maxDistance:{default:1/0},infinityDolly:{type:Boolean,default:!1},minZoom:{default:.01},maxZoom:{default:1/0},smoothTime:{default:.25},draggingSmoothTime:{default:.125},maxSpeed:{default:1/0},azimuthRotateSpeed:{default:1},polarRotateSpeed:{default:1},dollySpeed:{default:1},dollyDragInverted:{type:Boolean,default:!1},truckSpeed:{default:2},dollyToCursor:{type:Boolean,default:!1},dragToOffset:{type:Boolean,default:!1},verticalDragToForward:{type:Boolean,default:!1},boundaryFriction:{default:0},restThreshold:{default:.01},colliderMeshes:{default:()=>[]},mouseButtons:{default:()=>wW(Ie().camera.value)},touches:{default:()=>TW(Ie().camera.value)}},emits:[`change`,`start`,`end`],setup(e,{expose:t,emit:n}){let r=e,i=n,{makeDefault:a,minPolarAngle:o,maxPolarAngle:s,minAzimuthAngle:c,maxAzimuthAngle:l,distance:u,minDistance:d,maxDistance:f,infinityDolly:p,minZoom:m,maxZoom:h,smoothTime:g,draggingSmoothTime:_,maxSpeed:v,azimuthRotateSpeed:y,polarRotateSpeed:b,dollySpeed:x,dollyDragInverted:S,truckSpeed:C,dollyToCursor:w,dragToOffset:T,verticalDragToForward:E,boundaryFriction:D,restThreshold:O,colliderMeshes:ee}=zn(r),te={Box3:Ke,MathUtils:{clamp:Wt.clamp},Matrix4:bt,Quaternion:Pe,Raycaster:Gt,Sphere:Oe,Spherical:wt,Vector2:Xt,Vector3:P,Vector4:_t};bW.install({THREE:te});let{camera:ne,renderer:k,extend:A,controls:re,invalidate:j}=Ie();I(r,()=>{j()});let ae=In(()=>wW(r.camera||ne.value,r.mouseButtons)),oe=In(()=>TW(r.camera||ne.value,r.touches)),se=H(null);A({CameraControls:bW}),An(()=>{M(),se.value&&a.value?re.value=se.value:re.value=null});function M(){DR(se.value,`update`,()=>{i(`change`,se.value),j()}),DR(se.value,`controlend`,()=>i(`end`,se.value)),DR(se.value,`controlstart`,()=>i(`start`,se.value))}let{onBeforeRender:ce}=ie();return ce(({delta:e,invalidate:t})=>{var n,r;(n=se.value)!=null&&n.enabled&&((r=se.value)==null||r.update(e),t())}),On(()=>{se.value&&se.value.disconnect()}),t({instance:se}),(e,t)=>(e.camera||U(ne))&&(e.domElement||U(k))?(L(),B(`TresCameraControls`,{key:0,ref_key:`controlsRef`,ref:se,"min-polar-angle":U(o),"max-polar-angle":U(s),"min-azimuth-angle":U(c),"max-azimuth-angle":U(l),distance:U(u),"min-distance":U(d),"max-distance":U(f),"infinity-dolly":U(p),"min-zoom":U(m),"max-zoom":U(h),"smooth-time":U(g),"dragging-smooth-time":U(_),"max-speed":U(v),"azimuth-rotate-speed":U(y),"polar-rotate-speed":U(b),"dolly-speed":U(x),"dolly-drag-inverted":U(S),"truck-speed":U(C),"dolly-to-cursor":U(w),"drag-to-offset":U(T),"vertical-drag-to-forward":U(E),"boundary-friction":U(D),"rest-threshold":U(O),"collider-meshes":U(ee),args:[e.camera||U(ne),e.domElement||U(k).domElement],"mouse-buttons":ae.value,touches:oe.value},null,8,CW)):hn(``,!0)}}),DW=R({__name:`KeyboardControls`,props:{makeDefault:{type:Boolean,default:!0},camera:{},domElement:{},moveSpeed:{default:.2},selector:{}},emits:[`isLock`,`change`],setup(e,{expose:t,emit:n}){let r=e,i=n,{moveSpeed:a}=zn(r),{camera:o,controls:s,renderer:c,invalidate:l}=Ie();I(r,()=>{l()});let u=z(0),d=z(0),{KeyW:f,KeyA:p,KeyS:m,KeyD:h,Up:g,Down:_,Left:v,Right:y}=IR();An(()=>{p.value||v.value?u.value=-a.value:h.value||y.value?u.value=a.value:u.value=0,f.value||g.value?d.value=a.value:m.value||_.value?d.value=-a.value:d.value=0}),t({instance:s});let b=e=>i(`isLock`,e),x=e=>i(`change`,e),S=new P,C=new P,w=new Pe,T=(e,t)=>{var n;if(!((n=o.value)!=null&&n.position)&&!S)return;let r=o.value,a=e*.001;r?.translateZ(-t),w.set(C.x*a,C.y*a,C.z*a,1).normalize(),r?.quaternion.multiply(w),(u.value||d.value)&&i(`change`,s.value)},{onBeforeRender:E}=ie();return E(({delta:e,invalidate:t})=>{var n;s.value instanceof aV&&(n=s.value)!=null&&n.isLocked&&(T(e,d.value),s.value.moveRight(u.value),t())}),(e,t)=>(L(),jn(U(NW),{selector:e.selector,"make-default":e.makeDefault,camera:e.camera||U(o),"dom-element":e.domElement||U(c).domElement,onIsLock:b,onChange:x},null,8,[`selector`,`make-default`,`camera`,`dom-element`]))}}),OW=[`args`,`auto-rotate`,`auto-rotate-speed`,`enable-damping`,`damping-factor`,`enable-pan`,`key-pan-speed`,`keys`,`max-azimuth-angle`,`min-azimuth-angle`,`max-polar-angle`,`min-polar-angle`,`min-distance`,`max-distance`,`min-zoom`,`max-zoom`,`enable-zoom`,`zoom-speed`,`enable-rotate`,`rotate-speed`],kW=R({__name:`MapControls`,props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},target:{},enableDamping:{type:Boolean,default:!0},dampingFactor:{default:.05},autoRotate:{type:Boolean,default:!1},autoRotateSpeed:{default:2},enablePan:{type:Boolean,default:!0},keyPanSpeed:{default:7},keys:{},maxAzimuthAngle:{default:1/0},minAzimuthAngle:{default:-1/0},maxPolarAngle:{default:Math.PI},minPolarAngle:{default:0},minDistance:{default:0},maxDistance:{default:1/0},minZoom:{default:0},maxZoom:{default:1/0},touches:{},enableZoom:{type:Boolean,default:!0},zoomSpeed:{default:1},enableRotate:{type:Boolean,default:!0},rotateSpeed:{default:1}},emits:[`change`,`start`,`end`],setup(e,{expose:t,emit:n}){let r=e,{autoRotate:i,autoRotateSpeed:a,enableDamping:o,dampingFactor:s,enablePan:c,keyPanSpeed:l,maxAzimuthAngle:u,minAzimuthAngle:d,maxPolarAngle:f,minPolarAngle:p,minDistance:m,maxDistance:h,minZoom:g,maxZoom:_,enableZoom:v,zoomSpeed:y,enableRotate:b,rotateSpeed:x}=zn(r),{camera:S,renderer:C,extend:w,controls:T,invalidate:E}=Ie();I(r,()=>{E()});let D=H(null);w({MapControls:mV}),I(T,e=>{e&&r.makeDefault?T.value=e:T.value=null});let{onBeforeRender:O}=ie();return O(({invalidate:e})=>{D.value&&(o.value||i.value)&&(D.value.update(),e())}),On(()=>{D.value&&D.value.dispose()}),t({instance:D}),(e,t)=>(e.camera||U(S))&&(e.domElement||U(C))?(L(),B(`TresMapControls`,{key:0,ref_key:`controlsRef`,ref:D,args:[e.camera||U(S),e.domElement||U(C).domElement],"auto-rotate":U(i),"auto-rotate-speed":U(a),"enable-damping":U(o),"damping-factor":U(s),"enable-pan":U(c),"key-pan-speed":U(l),keys:e.keys,"max-azimuth-angle":U(u),"min-azimuth-angle":U(d),"max-polar-angle":U(f),"min-polar-angle":U(p),"min-distance":U(m),"max-distance":U(h),"min-zoom":U(g),"max-zoom":U(_),"enable-zoom":U(v),"zoom-speed":U(y),"enable-rotate":U(b),"rotate-speed":U(x)},null,8,OW)):hn(``,!0)}}),AW=[`target`,`auto-rotate`,`auto-rotate-speed`,`enable-damping`,`damping-factor`,`enable-pan`,`key-pan-speed`,`keys`,`max-azimuth-angle`,`min-azimuth-angle`,`max-polar-angle`,`min-polar-angle`,`min-distance`,`max-distance`,`min-zoom`,`max-zoom`,`touches`,`enable-zoom`,`zoom-speed`,`enable-rotate`,`rotate-speed`,`mouse-buttons`,`args`],jW=R({__name:`OrbitControls`,props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},target:{default:()=>[0,0,0]},enableDamping:{type:Boolean,default:!0},dampingFactor:{default:.05},autoRotate:{type:Boolean,default:!1},autoRotateSpeed:{default:2},enablePan:{type:Boolean,default:!0},keyPanSpeed:{default:7},keys:{},maxAzimuthAngle:{default:1/0},minAzimuthAngle:{default:-1/0},maxPolarAngle:{default:Math.PI},minPolarAngle:{default:0},minDistance:{default:0},maxDistance:{default:1/0},minZoom:{default:0},maxZoom:{default:1/0},touches:{default:()=>({ONE:je.ROTATE,TWO:je.DOLLY_PAN})},enableZoom:{type:Boolean,default:!0},zoomSpeed:{default:1},enableRotate:{type:Boolean,default:!0},rotateSpeed:{default:1},mouseButtons:{default:()=>({LEFT:ke.ROTATE,MIDDLE:ke.DOLLY,RIGHT:ke.PAN})}},emits:[`change`,`start`,`end`],setup(e,{expose:t,emit:n}){let r=e,i=n,{makeDefault:a,autoRotate:o,autoRotateSpeed:s,enableDamping:c,dampingFactor:l,enablePan:u,keyPanSpeed:d,maxAzimuthAngle:f,minAzimuthAngle:p,maxPolarAngle:m,minPolarAngle:h,minDistance:g,maxDistance:_,minZoom:v,maxZoom:y,enableZoom:b,zoomSpeed:x,enableRotate:S,touches:C,rotateSpeed:w,target:T,mouseButtons:E}=zn(r),{camera:D,renderer:O,extend:ee,controls:te,invalidate:ne}=Ie(),k=H(null);ee({OrbitControls:pV}),I(k,e=>{A(),e&&a.value?te.value=e:te.value=null});function A(){DR(k.value,`change`,()=>{i(`change`,k.value),ne()}),DR(k.value,`start`,()=>i(`start`,k.value)),DR(k.value,`end`,()=>i(`end`,k.value))}let{onBeforeRender:re}=ie();return re(({invalidate:e})=>{k.value&&(c.value||o.value)&&(k.value.update(),o.value&&e())}),On(()=>{k.value&&k.value.dispose()}),t({instance:k}),(e,t)=>(e.camera||U(D))&&(e.domElement||U(O))?(L(),B(`TresOrbitControls`,{key:0,ref_key:`controlsRef`,ref:k,target:U(T),"auto-rotate":U(o),"auto-rotate-speed":U(s),"enable-damping":U(c),"damping-factor":U(l),"enable-pan":U(u),"key-pan-speed":U(d),keys:e.keys,"max-azimuth-angle":U(f),"min-azimuth-angle":U(p),"max-polar-angle":U(m),"min-polar-angle":U(h),"min-distance":U(g),"max-distance":U(_),"min-zoom":U(v),"max-zoom":U(y),touches:U(C),"enable-zoom":U(b),"zoom-speed":U(x),"enable-rotate":U(S),"rotate-speed":U(w),"mouse-buttons":U(E),args:[e.camera||U(D),e.domElement||U(O).domElement]},null,8,AW)):hn(``,!0)}}),MW=[`args`],NW=R({__name:`PointerLockControls`,props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},selector:{}},emits:[`isLock`,`change`],setup(e,{expose:t,emit:n}){let r=e,i=n,{camera:a,renderer:o,extend:s,controls:c,invalidate:l}=Ie();I(r,()=>{l()});let u=H(null),d;s({PointerLockControls:aV});let f=e=>{i(`isLock`,e)};return I(u,e=>{e&&r.makeDefault?c.value=e:c.value=null,d=document.getElementById(r.selector||``)||o.value.domElement,DR(d,`click`,()=>{u.value&&(u.value.lock(),u.value.addEventListener(`lock`,()=>f(!0)),u.value.addEventListener(`unlock`,()=>f(!1)),l())})}),On(()=>{let e=u.value;e&&(e.removeEventListener(`lock`,()=>f(!0)),e.removeEventListener(`unlock`,()=>f(!1)),e.dispose())}),t({instance:c}),(e,t)=>(e.camera||U(a))&&(e.domElement||U(o))?(L(),B(`TresPointerLockControls`,{key:0,ref_key:`controlsRef`,ref:u,args:[e.camera||U(a),e.domElement||U(o).domElement]},null,8,MW)):hn(``,!0)}}),PW=R({__name:`ScrollControls`,props:{pages:{default:4},distance:{default:4},smoothScroll:{default:.1},horizontal:{type:Boolean,default:!1},htmlScroll:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{expose:t,emit:n}){let r=e,i=n,{logWarning:a}=se();r.smoothScroll<0&&a(`SmoothControl must be greater than zero`),r.pages<0&&a(`Pages must be greater than zero`);let{camera:o,controls:s,renderer:c,invalidate:l}=Ie();I(r,()=>{l()});let u=H(),d=document.createElement(`div`),{y:f}=zR(),{x:p,y:m,isScrolling:h}=PR(d),{height:g,width:_}=BR(),v=0,y=z(!1),b=z(0),x=z(0),S=z(0),C=r.horizontal?`x`:`y`,w=I(o,e=>{if(y.value){w();return}v=r.horizontal?e?.position.x||0:e?.position.y||0,y.value=!0},{immediate:!0});I(h,e=>{s.value&&(s.value.enabled=!e)},{immediate:!0}),I(f,e=>{!h.value&&!r.htmlScroll||(x.value=e/g.value/(S.value/g.value-1),b.value=-1*x.value,i(`update:modelValue`,x.value))}),I(m,e=>{x.value=e/g.value/(S.value/g.value),b.value=-1*x.value,i(`update:modelValue`,x.value)}),I(p,e=>{x.value=e/_.value/(S.value/_.value-1),b.value=+x.value,i(`update:modelValue`,x.value)}),I(c,e=>{var t,n;let i=e?.domElement;if(r.htmlScroll&&e!=null&&e.domElement)i!=null&&i.style.width&&i!=null&&i.style.position&&i!=null&&i.style.top&&i!=null&&i.style.left&&(i.style.width=`100%`,i.style.position=`fixed`,i.style.zIndex=` -99999`,i.style.top=`0`,i.style.left=`0`),S.value=document.body.scrollHeight;else{let a=document.createElement(`div`),o=document.createElement(`div`);d.style[r.horizontal?`overflowX`:`overflowY`]=`auto`,d.style[r.horizontal?`overflowY`:`overflowX`]=`hidden`,d.style.position=`absolute`,d.style.width=`100%`,d.style.height=` 100%`,d.style.top=`0`,d.style.left=`0`,d.classList.add(`scrollContainer`),a.style.position=`sticky`,a.style.top=`0px`,a.style.left=`0px`,a.style.width=`100%`,a.style.height=`100%`,a.style.overflow=`hidden`,d.appendChild(a),o.style.height=r.horizontal?`100%`:`${g.value*r.pages}px`,o.style.width=r.horizontal?`${_.value*r.pages}px`:`100vw`,o.style.pointerEvents=`none`,i.style.position=`fixed`,i.style.zIndex=`0`,i!=null&&i.style.width&&(i.style.width=`100%`),d.appendChild(o),e!=null&&e.domElement.parentNode&&(e.domElement.parentNode.style.position=`relative`),(n=(t=e?.domElement)?.parentNode)==null||n.appendChild(d),S.value=r.horizontal?_.value*r.pages:g.value*r.pages}},{immediate:!0});let{onBeforeRender:T}=ie();return T(({invalidate:e})=>{var t;if((t=o.value)!=null&&t.position){let t=(b.value*r.distance-o.value.position[C]+v)*r.smoothScroll;o.value.position[C]+=t,u.value.children.length>0&&(u.value.position[C]+=t),e()}}),t({instance:u}),(e,t)=>(L(),B(`TresGroup`,{ref_key:`wrapperRef`,ref:u},[Mn(e.$slots,`default`)],512))}}),FW=[`object`,`args`,`mode`,`enabled`,`axis`,`translation-snap`,`rotation-snap`,`scale-snap`,`space`,`size`,`show-x`,`show-y`,`show-z`],IW=R({__name:`TransformControls`,props:{object:{},camera:{},mode:{default:`translate`},enabled:{type:Boolean,default:!0},axis:{default:`XYZ`},translationSnap:{},rotationSnap:{},scaleSnap:{},space:{default:`world`},size:{default:1},showX:{type:Boolean,default:!0},showY:{type:Boolean,default:!0},showZ:{type:Boolean,default:!0}},emits:[`dragging`,`change`,`mouseDown`,`mouseUp`,`objectChange`],setup(e,{expose:t,emit:n}){let r=e,i=n,{object:a,mode:o,enabled:s,axis:c,translationSnap:l,rotationSnap:u,scaleSnap:d,space:f,size:p,showX:m,showY:h,showZ:g}=zn(r),_=H(null),{controls:v,camera:y,renderer:b,extend:x,invalidate:S}=Ie();I([a,o,s,c,l,u,d,f,p,m,h,g],()=>{S()}),x({TransformControls:qB});let C=()=>{S(),i(`change`)},w=e=>{v.value&&(v.value.enabled=!e.value),S(),i(`dragging`,e.value)},T=()=>{S(),i(`mouseDown`)},E=()=>{S(),i(`mouseDown`)},D=()=>{S(),i(`objectChange`)};function O(){DR(_.value,`change`,C),DR(_.value,`dragging-changed`,w),DR(_.value,`mouseDown`,T),DR(_.value,`mouseUp`,E),DR(_.value,`objectChange`,D)}return I(_,e=>{e&&O()}),On(()=>{_.value&&_.value.dispose()}),t({instance:_}),(e,t)=>{var n;return(e.camera||U(y))&&U(b)?(L(),B(`TresTransformControls`,{ref_key:`controlsRef`,ref:_,key:(n=e.camera||U(y))?.uuid,object:U(a),args:[e.camera||U(y),U(b).domElement],mode:U(o),enabled:U(s),axis:U(c),"translation-snap":U(l),"rotation-snap":U(u),"scale-snap":U(d),space:U(f),size:U(p),"show-x":U(m),"show-y":U(h),"show-z":U(g),visible:!0},null,8,FW)):hn(``,!0)}}}),LW=[`geometry`,`render-order`],RW=R({__name:`component`,props:{src:{},skipStrokes:{type:Boolean,default:!1},skipFills:{type:Boolean,default:!1},fillMaterial:{},strokeMaterial:{},fillMeshProps:{},strokeMeshProps:{},depth:{default:`renderOrder`}},setup(e,{expose:t}){let n=e;class r extends UV{load(e,t,n,r){let i=Array.isArray(e)?e[0]:e;super.load(i,t,n,r)}}let{src:i,skipStrokes:a,skipFills:o,fillMaterial:s,strokeMaterial:c,fillMeshProps:l,strokeMeshProps:u,depth:d}=zn(n),f=H(),p=H([]),m=H([]);t({instance:f}),An(async()=>h(i.value).then(e=>m.value=e.paths)),I([o,a,s,c,m],_);async function h(e){let t=e.startsWith(`e.geometry.dispose())}function _(){var e,t,r;g();let i=[],[s,c]=(()=>{let e={flat:!1,renderOrder:!1,offsetZ:!0},t={flat:0,renderOrder:0,offsetZ:.025},n=d.value;return typeof n==`number`?[!0,n]:[e[n],t[n]]})(),l=0;for(let u of m.value){let d=(e=u.userData)?.style??{},f=Object.assign({color:d.fill,opacity:d.fillOpacity,transparent:!0,side:jt,depthWrite:s},n.fillMaterial);if(!o.value&&d.fill!==void 0&&d.fill!==`none`)for(let e of UV.createShapes(u)){let t=new Bt(e);t.scale(1,-1,1),c&&t.translate(0,0,l++*c),i.push({geometry:t,material:f,isStroke:!1})}if(!a.value&&d.stroke!==void 0&&d.stroke!==`none`){let e=Object.assign({color:(t=u.userData)?.style.stroke,opacity:(r=u.userData)?.style.strokeOpacity,transparent:!0,side:jt,depthWrite:s},n.strokeMaterial);for(let t of u.subPaths){let n=t.getPoints().map(e=>new Xt(e.x,-e.y)),r=UV.pointsToStroke(n,d||`none`);c&&r.translate(0,0,l++*c),i.push({geometry:r,material:e,isStroke:!0})}}}p.value=i}return(e,t)=>(L(),B(`TresGroup`,{ref_key:`svgRef`,ref:f},[(L(!0),B(Fn,null,kn(p.value,({geometry:e,material:t,isStroke:n},r)=>(L(),B(`TresMesh`,st({key:`${r}`,ref_for:!0},U(n?u:l),{geometry:e,"render-order":U(d)===`renderOrder`?r:0}),[V(`TresMeshBasicMaterial`,st({ref_for:!0},t),null,16)],16,LW))),128))],512))}});function zW(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function BW(e){throw Error(`Could not dynamically require "`+e+`". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.`)}var VW={exports:{}},HW;function UW(){return HW||(HW=1,function(e,t){(function(t){e.exports=t()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof BW==`function`&&BW;if(!s&&c)return c(o,!0);if(a)return a(o,!0);throw Error(`Cannot find module '`+o+`'`)}s=n[o]={exports:{}},t[o][0].call(s.exports,function(e){var n=t[o][1][e];return i(n||e)},s,s.exports,e,t,n,r)}return n[o].exports}for(var a=typeof BW==`function`&&BW,o=0;o>16),c((65280&r)>>8),c(255&r);return i==2?c(255&(r=l(e.charAt(n))<<2|l(e.charAt(n+1))>>4)):i==1&&(c((r=l(e.charAt(n))<<10|l(e.charAt(n+1))<<4|l(e.charAt(n+2))>>2)>>8&255),c(255&r)),a},e.fromByteArray=function(e){var t,n,r,i,a=e.length%3,o=``;function s(e){return`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.charAt(e)}for(t=0,r=e.length-a;t>18&63)+s(i>>12&63)+s(i>>6&63)+s(63&i);switch(a){case 1:o=(o+=s((n=e[e.length-1])>>2))+s(n<<4&63)+`==`;break;case 2:o=(o=(o+=s((n=(e[e.length-2]<<8)+e[e.length-1])>>10))+s(n>>4&63))+s(n<<2&63)+`=`}return o}})(n===void 0?this.base64js={}:n)}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js`,`/node_modules/gulp-browserify/node_modules/base64-js/lib`)},{buffer:3,lYpoI2:11}],3:[function(e,t,n){(function(t,r,i,a,o,s,c,l,u){var d=e(`base64-js`),f=e(`ieee754`);function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);var r,a,o,s,c=typeof e;if(t===`base64`&&c==`string`)for(e=(s=e).trim?s.trim():s.replace(/^\s+|\s+$/g,``);e.length%4!=0;)e+=`=`;if(c==`number`)r=te(e);else if(c==`string`)r=i.byteLength(e,t);else{if(c!=`object`)throw Error(`First argument needs to be a number, array or string.`);r=te(e.length)}if(i._useTypedArrays?a=i._augment(new Uint8Array(r)):((a=this).length=r,a._isBuffer=!0),i._useTypedArrays&&typeof e.byteLength==`number`)a._set(e);else if(ne(s=e)||i.isBuffer(s)||s&&typeof s==`object`&&typeof s.length==`number`)for(o=0;o>8,n%=256,r.push(n),r.push(t);return r}(t),e,n,r)}function h(e,t,n){var r=``;n=Math.min(e.length,n);for(var i=t;i>>0)):(t+1>>0),i}function v(e,t,n,r){if(r||(M(typeof n==`boolean`,`missing or invalid endian`),M(t!=null,`missing offset`),M(t+1>>8*(r?a:1-a)}function C(e,t,n,r,i){if(i||(M(t!=null,`missing value`),M(typeof r==`boolean`,`missing or invalid endian`),M(n!=null,`missing offset`),M(n+3>>8*(r?a:3-a)&255}function w(e,t,n,r,i){i||(M(t!=null,`missing value`),M(typeof r==`boolean`,`missing or invalid endian`),M(n!=null,`missing offset`),M(n+1this.length&&(r=this.length);var a=(r=e.length-t=this.length))return this[e]},i.prototype.readUInt16LE=function(e,t){return g(this,e,!0,t)},i.prototype.readUInt16BE=function(e,t){return g(this,e,!1,t)},i.prototype.readUInt32LE=function(e,t){return _(this,e,!0,t)},i.prototype.readUInt32BE=function(e,t){return _(this,e,!1,t)},i.prototype.readInt8=function(e,t){if(t||(M(e!=null,`missing offset`),M(e=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){return v(this,e,!0,t)},i.prototype.readInt16BE=function(e,t){return v(this,e,!1,t)},i.prototype.readInt32LE=function(e,t){return y(this,e,!0,t)},i.prototype.readInt32BE=function(e,t){return y(this,e,!1,t)},i.prototype.readFloatLE=function(e,t){return b(this,e,!0,t)},i.prototype.readFloatBE=function(e,t){return b(this,e,!1,t)},i.prototype.readDoubleLE=function(e,t){return x(this,e,!0,t)},i.prototype.readDoubleBE=function(e,t){return x(this,e,!1,t)},i.prototype.writeUInt8=function(e,t,n){n||(M(e!=null,`missing value`),M(t!=null,`missing offset`),M(t=this.length||(this[t]=e)},i.prototype.writeUInt16LE=function(e,t,n){S(this,e,t,!0,n)},i.prototype.writeUInt16BE=function(e,t,n){S(this,e,t,!1,n)},i.prototype.writeUInt32LE=function(e,t,n){C(this,e,t,!0,n)},i.prototype.writeUInt32BE=function(e,t,n){C(this,e,t,!1,n)},i.prototype.writeInt8=function(e,t,n){n||(M(e!=null,`missing value`),M(t!=null,`missing offset`),M(t=this.length||(0<=e?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},i.prototype.writeInt16LE=function(e,t,n){w(this,e,t,!0,n)},i.prototype.writeInt16BE=function(e,t,n){w(this,e,t,!1,n)},i.prototype.writeInt32LE=function(e,t,n){T(this,e,t,!0,n)},i.prototype.writeInt32BE=function(e,t,n){T(this,e,t,!1,n)},i.prototype.writeFloatLE=function(e,t,n){E(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){E(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){D(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){D(this,e,t,!1,n)},i.prototype.fill=function(e,t,n){if(t||=0,n||=this.length,M(typeof(e=typeof(e||=0)==`string`?e.charCodeAt(0):e)==`number`&&!isNaN(e),`value is not a number`),M(t<=n,`end < start`),n!==t&&this.length!==0){M(0<=t&&t`},i.prototype.toArrayBuffer=function(){if(typeof Uint8Array>`u`)throw Error(`Buffer.toArrayBuffer not supported in this browser`);if(i._useTypedArrays)return new i(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function ie(e){try{return decodeURIComponent(e)}catch{return`�`}}function ae(e,t){M(typeof e==`number`,`cannot write a non-number as a number`),M(0<=e,`specified a negative value for writing an unsigned value`),M(e<=t,`value is larger than maximum value for type`),M(Math.floor(e)===e,`value has a fractional component`)}function oe(e,t,n){M(typeof e==`number`,`cannot write a non-number as a number`),M(e<=t,`value larger than maximum allowed value`),M(n<=e,`value smaller than minimum allowed value`),M(Math.floor(e)===e,`value has a fractional component`)}function se(e,t,n){M(typeof e==`number`,`cannot write a non-number as a number`),M(e<=t,`value larger than maximum allowed value`),M(n<=e,`value smaller than minimum allowed value`)}function M(e,t){if(!e)throw Error(t||`Failed assertion`)}i._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=O.get,e.set=O.set,e.write=O.write,e.toString=O.toString,e.toLocaleString=O.toString,e.toJSON=O.toJSON,e.copy=O.copy,e.slice=O.slice,e.readUInt8=O.readUInt8,e.readUInt16LE=O.readUInt16LE,e.readUInt16BE=O.readUInt16BE,e.readUInt32LE=O.readUInt32LE,e.readUInt32BE=O.readUInt32BE,e.readInt8=O.readInt8,e.readInt16LE=O.readInt16LE,e.readInt16BE=O.readInt16BE,e.readInt32LE=O.readInt32LE,e.readInt32BE=O.readInt32BE,e.readFloatLE=O.readFloatLE,e.readFloatBE=O.readFloatBE,e.readDoubleLE=O.readDoubleLE,e.readDoubleBE=O.readDoubleBE,e.writeUInt8=O.writeUInt8,e.writeUInt16LE=O.writeUInt16LE,e.writeUInt16BE=O.writeUInt16BE,e.writeUInt32LE=O.writeUInt32LE,e.writeUInt32BE=O.writeUInt32BE,e.writeInt8=O.writeInt8,e.writeInt16LE=O.writeInt16LE,e.writeInt16BE=O.writeInt16BE,e.writeInt32LE=O.writeInt32LE,e.writeInt32BE=O.writeInt32BE,e.writeFloatLE=O.writeFloatLE,e.writeFloatBE=O.writeFloatBE,e.writeDoubleLE=O.writeDoubleLE,e.writeDoubleBE=O.writeDoubleBE,e.fill=O.fill,e.inspect=O.inspect,e.toArrayBuffer=O.toArrayBuffer,e}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/buffer/index.js`,`/node_modules/gulp-browserify/node_modules/buffer`)},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(e,t,n){(function(n,r,i,a,o,s,c,l,u){var i=e(`buffer`).Buffer,d=4,f=new i(d);f.fill(0),t.exports={hash:function(e,t,n,r){for(var a=t(function(e,t){e.length%d!=0&&(n=e.length+(d-e.length%d),e=i.concat([e,f],n));for(var n,r=[],a=t?e.readInt32BE:e.readInt32LE,o=0;oh?t=e(t):t.length>5]|=128<>>9<<4)]=t;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,o=0;o>>32-i,n)}function m(e,t,n,r,i,a,o){return p(t&n|~t&r,e,t,i,a,o)}function h(e,t,n,r,i,a,o){return p(t&r|n&~r,e,t,i,a,o)}function g(e,t,n,r,i,a,o){return p(t^n^r,e,t,i,a,o)}function _(e,t,n,r,i,a,o){return p(n^(t|~r),e,t,i,a,o)}function v(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}t.exports=function(e){return d.hash(e,f,16)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(e,t,n){(function(e,n,r,i,a,o,s,c,l){t.exports=function(e){for(var t,n=Array(e),r=0;r>>((3&r)<<3)&255;return n}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{buffer:3,lYpoI2:11}],8:[function(e,t,n){(function(n,r,i,a,o,s,c,l,u){var d=e(`./helpers`);function f(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n,r,i,a=Array(80),o=1732584193,s=-271733879,c=-1732584194,l=271733878,u=-1009589776,d=0;d>16)+(t>>16)+(n>>16)<<16|65535&n}function m(e,t){return e<>>32-t}t.exports=function(e){return d.hash(e,f,20,!0)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(e,t,n){(function(n,r,i,a,o,s,c,l,u){function d(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function f(e,t){var n,r=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],i=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],a=Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var o,s,c=0;c>>t|e<<32-t},h=function(e,t){return e>>>t};t.exports=function(e){return p.hash(e,f,32,!0)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(e,t,n){(function(e,t,r,i,a,o,s,c,l){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,c=(1<>1,u=-7,d=n?i-1:0,f=n?-1:1,i=e[t+d];for(d+=f,a=i&(1<<-u)-1,i>>=-u,u+=s;0>=-u,u+=r;0>1,d=i===23?2**-24-2**-77:0,f=r?0:a-1,p=r?1:-1,a=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(r=2**-o)<1&&(o--,r*=2),2<=(t+=1<=o+u?d/r:d*2**(1-u))*r&&(o++,r/=2),l<=o+u?(s=0,o=l):1<=o+u?(s=(t*r-1)*2**i,o+=u):(s=t*2**(u-1)*2**i,o=0));8<=i;e[n+f]=255&s,f+=p,s/=256,i-=8);for(o=o<>= ++ -- << >> <= >= == != && || += -= *= /= %= &= ^^ ^= |= ( ) [ ] . ! ~ * / % + - < > & ^ | ? : = , ; { }`.split(` `)),YW}var QW,$W;function eG(){return $W||($W=1,QW=`abs.acos.all.any.asin.atan.ceil.clamp.cos.cross.dFdx.dFdy.degrees.distance.dot.equal.exp.exp2.faceforward.floor.fract.gl_BackColor.gl_BackLightModelProduct.gl_BackLightProduct.gl_BackMaterial.gl_BackSecondaryColor.gl_ClipPlane.gl_ClipVertex.gl_Color.gl_DepthRange.gl_DepthRangeParameters.gl_EyePlaneQ.gl_EyePlaneR.gl_EyePlaneS.gl_EyePlaneT.gl_Fog.gl_FogCoord.gl_FogFragCoord.gl_FogParameters.gl_FragColor.gl_FragCoord.gl_FragData.gl_FragDepth.gl_FragDepthEXT.gl_FrontColor.gl_FrontFacing.gl_FrontLightModelProduct.gl_FrontLightProduct.gl_FrontMaterial.gl_FrontSecondaryColor.gl_LightModel.gl_LightModelParameters.gl_LightModelProducts.gl_LightProducts.gl_LightSource.gl_LightSourceParameters.gl_MaterialParameters.gl_MaxClipPlanes.gl_MaxCombinedTextureImageUnits.gl_MaxDrawBuffers.gl_MaxFragmentUniformComponents.gl_MaxLights.gl_MaxTextureCoords.gl_MaxTextureImageUnits.gl_MaxTextureUnits.gl_MaxVaryingFloats.gl_MaxVertexAttribs.gl_MaxVertexTextureImageUnits.gl_MaxVertexUniformComponents.gl_ModelViewMatrix.gl_ModelViewMatrixInverse.gl_ModelViewMatrixInverseTranspose.gl_ModelViewMatrixTranspose.gl_ModelViewProjectionMatrix.gl_ModelViewProjectionMatrixInverse.gl_ModelViewProjectionMatrixInverseTranspose.gl_ModelViewProjectionMatrixTranspose.gl_MultiTexCoord0.gl_MultiTexCoord1.gl_MultiTexCoord2.gl_MultiTexCoord3.gl_MultiTexCoord4.gl_MultiTexCoord5.gl_MultiTexCoord6.gl_MultiTexCoord7.gl_Normal.gl_NormalMatrix.gl_NormalScale.gl_ObjectPlaneQ.gl_ObjectPlaneR.gl_ObjectPlaneS.gl_ObjectPlaneT.gl_Point.gl_PointCoord.gl_PointParameters.gl_PointSize.gl_Position.gl_ProjectionMatrix.gl_ProjectionMatrixInverse.gl_ProjectionMatrixInverseTranspose.gl_ProjectionMatrixTranspose.gl_SecondaryColor.gl_TexCoord.gl_TextureEnvColor.gl_TextureMatrix.gl_TextureMatrixInverse.gl_TextureMatrixInverseTranspose.gl_TextureMatrixTranspose.gl_Vertex.greaterThan.greaterThanEqual.inversesqrt.length.lessThan.lessThanEqual.log.log2.matrixCompMult.max.min.mix.mod.normalize.not.notEqual.pow.radians.reflect.refract.sign.sin.smoothstep.sqrt.step.tan.texture2D.texture2DLod.texture2DProj.texture2DProjLod.textureCube.textureCubeLod.texture2DLodEXT.texture2DProjLodEXT.textureCubeLodEXT.texture2DGradEXT.texture2DProjGradEXT.textureCubeGradEXT`.split(`.`)),QW}var tG,nG;function rG(){if(nG)return tG;nG=1;var e=JW();return tG=e.slice().concat(`layout.centroid.smooth.case.mat2x2.mat2x3.mat2x4.mat3x2.mat3x3.mat3x4.mat4x2.mat4x3.mat4x4.uvec2.uvec3.uvec4.samplerCubeShadow.sampler2DArray.sampler2DArrayShadow.isampler2D.isampler3D.isamplerCube.isampler2DArray.usampler2D.usampler3D.usamplerCube.usampler2DArray.coherent.restrict.readonly.writeonly.resource.atomic_uint.noperspective.patch.sample.subroutine.common.partition.active.filter.image1D.image2D.image3D.imageCube.iimage1D.iimage2D.iimage3D.iimageCube.uimage1D.uimage2D.uimage3D.uimageCube.image1DArray.image2DArray.iimage1DArray.iimage2DArray.uimage1DArray.uimage2DArray.image1DShadow.image2DShadow.image1DArrayShadow.image2DArrayShadow.imageBuffer.iimageBuffer.uimageBuffer.sampler1DArray.sampler1DArrayShadow.isampler1D.isampler1DArray.usampler1D.usampler1DArray.isampler2DRect.usampler2DRect.samplerBuffer.isamplerBuffer.usamplerBuffer.sampler2DMS.isampler2DMS.usampler2DMS.sampler2DMSArray.isampler2DMSArray.usampler2DMSArray`.split(`.`)),tG}var iG,aG;function oG(){if(aG)return iG;aG=1;var e=eG();return e=e.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)}),iG=e.concat(`gl_VertexID.gl_InstanceID.gl_Position.gl_PointSize.gl_FragCoord.gl_FrontFacing.gl_FragDepth.gl_PointCoord.gl_MaxVertexAttribs.gl_MaxVertexUniformVectors.gl_MaxVertexOutputVectors.gl_MaxFragmentInputVectors.gl_MaxVertexTextureImageUnits.gl_MaxCombinedTextureImageUnits.gl_MaxTextureImageUnits.gl_MaxFragmentUniformVectors.gl_MaxDrawBuffers.gl_MinProgramTexelOffset.gl_MaxProgramTexelOffset.gl_DepthRangeParameters.gl_DepthRange.trunc.round.roundEven.isnan.isinf.floatBitsToInt.floatBitsToUint.intBitsToFloat.uintBitsToFloat.packSnorm2x16.unpackSnorm2x16.packUnorm2x16.unpackUnorm2x16.packHalf2x16.unpackHalf2x16.outerProduct.transpose.determinant.inverse.texture.textureSize.textureProj.textureLod.textureOffset.texelFetch.texelFetchOffset.textureProjOffset.textureLodOffset.textureProjLod.textureProjLodOffset.textureGrad.textureGradOffset.textureProjGrad.textureProjGradOffset`.split(`.`)),iG}var sG,cG;function lG(){if(cG)return sG;cG=1,sG=b;var e=JW(),t=ZW(),n=eG(),r=rG(),i=oG(),a=999,o=9999,s=0,c=1,l=2,u=3,d=4,f=5,p=6,m=7,h=8,g=9,_=10,v=11,y=[`block-comment`,`line-comment`,`preprocessor`,`operator`,`integer`,`float`,`ident`,`builtin`,`keyword`,`whitespace`,`eof`,`integer`];function b(b){var x=0,S=0,C=a,w,T,E=[],D=[],O=1,ee=0,te=0,ne=!1,k=!1,A=``,re;b||={};var j=n,ie=e;b.version===`300 es`&&(j=i,ie=r);for(var ae={},oe={},x=0;x0)continue;i=e.slice(0,1).join(``)}return se(i),te+=i.length,E=E.slice(i.length),E.length}while(!0)}function he(){return/[^a-fA-F0-9]/.test(w)?(se(E.join(``)),C=a,x):(E.push(w),T=w,x+1)}function ge(){return w===`.`||/[eE]/.test(w)?(E.push(w),C=f,T=w,x+1):w===`x`&&E.length===1&&E[0]===`0`?(C=v,E.push(w),T=w,x+1):/[^\d]/.test(w)?(se(E.join(``)),C=a,x):(E.push(w),T=w,x+1)}function _e(){return w===`f`&&(E.push(w),T=w,x+=1),/[eE]/.test(w)||(w===`-`||w===`+`)&&/[eE]/.test(T)?(E.push(w),T=w,x+1):/[^\d]/.test(w)?(se(E.join(``)),C=a,x):(E.push(w),T=w,x+1)}function ve(){if(/[^\d\w_]/.test(w)){var e=E.join(``);return C=oe[e]?h:ae[e]?m:p,se(E.join(``)),C=a,x}return E.push(w),T=w,x+1}}return sG}var uG,dG;function fG(){if(dG)return uG;dG=1;var e=lG();uG=t;function t(t,n){var r=e(n),i=[];return i=i.concat(r(t)),i=i.concat(r(null)),i}return uG}var pG=fG();const mG=zW(pG);var hG,gG;function _G(){if(gG)return hG;gG=1,hG=e;function e(e){for(var t=[],n=0;n=0;i--){if(n(e[i]))return i;if(r&&r(e[i]))return-1}return-1}}function t(e){return function(t){return t.type===`operator`&&(!e||t.data===e)}}function n(e){return e.type!==`whitespace`}return bG}var CG=SG();const wG=zW(CG);function TG(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}function EG(e){var t=TG(e,`string`);return typeof t==`symbol`?t:String(t)}function DG(e,t,n){return t=EG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kG(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function jG(e,t){if(e==null)return{};var n=AG(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MG(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function NG(e,t){for(var n=0;n`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function BG(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return FG(e)}function VG(e){var t=zG();return function(){var n=RG(e),r;if(t){var i=RG(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return BG(this,r)}}var HG={position:`csm_Position`,positionRaw:`csm_PositionRaw`,pointSize:`csm_PointSize`,fragColor:`csm_FragColor`,diffuseColor:`csm_DiffuseColor`,normal:`csm_Normal`,roughness:`csm_Roughness`,metalness:`csm_Metalness`,emissive:`csm_Emissive`,ao:`csm_AO`,bump:`csm_Bump`,depthAlpha:`csm_DepthAlpha`},UG,WG,GG=(UG={},DG(UG,`${HG.normal}`,{"#include ":` - vec3 objectNormal = ${HG.normal}; - #ifdef USE_TANGENT - vec3 objectTangent = vec3( tangent.xyz ); - #endif - `}),DG(UG,`${HG.position}`,{"#include ":` - vec3 transformed = ${HG.position}; - `}),DG(UG,`${HG.positionRaw}`,{"#include ":` - vec4 csm_internal_positionUnprojected = ${HG.positionRaw}; - mat4x4 csm_internal_unprojectMatrix = projectionMatrix * modelViewMatrix; - #ifdef USE_INSTANCING - csm_internal_unprojectMatrix = csm_internal_unprojectMatrix * instanceMatrix; - #endif - csm_internal_positionUnprojected = inverse(csm_internal_unprojectMatrix) * csm_internal_positionUnprojected; - vec3 transformed = csm_internal_positionUnprojected.xyz; - `}),DG(UG,`${HG.pointSize}`,{"gl_PointSize = size;":` - gl_PointSize = ${HG.pointSize}; - `}),DG(UG,`${HG.diffuseColor}`,{"#include ":` - #include - diffuseColor = ${HG.diffuseColor}; - `}),DG(UG,`${HG.fragColor}`,{"#include ":` - #include - gl_FragColor = ${HG.fragColor}; - `}),DG(UG,`${HG.emissive}`,{"vec3 totalEmissiveRadiance = emissive;":` - vec3 totalEmissiveRadiance = ${HG.emissive}; - `}),DG(UG,`${HG.roughness}`,{"#include ":` - #include - roughnessFactor = ${HG.roughness}; - `}),DG(UG,`${HG.metalness}`,{"#include ":` - #include - metalnessFactor = ${HG.metalness}; - `}),DG(UG,`${HG.ao}`,{"#include ":` - #include - reflectedLight.indirectDiffuse *= 1. - ${HG.ao}; - `}),DG(UG,`${HG.bump}`,{"#include ":` - #include - - vec3 csm_internal_orthogonal = ${HG.bump} - (dot(${HG.bump}, normal) * normal); - vec3 csm_internal_projectedbump = mat3(csm_internal_vModelViewMatrix) * csm_internal_orthogonal; - normal = normalize(normal - csm_internal_projectedbump); - `}),DG(UG,`${HG.depthAlpha}`,{"gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );":` - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity * ${HG.depthAlpha} ); - `,"gl_FragColor = packDepthToRGBA( fragCoordZ );":` - gl_FragColor = packDepthToRGBA( fragCoordZ ); - gl_FragColor.a *= ${HG.depthAlpha}; - `}),UG),KG=(WG={},DG(WG,`${HG.position}`,{"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );":` - gl_Position = projectionMatrix * modelViewMatrix * vec4( ${HG.position}, 1.0 ); - `}),DG(WG,`${HG.positionRaw}`,{"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );":` - gl_Position = ${HG.position}; - `}),DG(WG,`${HG.diffuseColor}`,{"gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );":` - gl_FragColor = ${HG.diffuseColor}; - `}),DG(WG,`${HG.fragColor}`,{"gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );":` - gl_FragColor = ${HG.fragColor}; - `}),WG),qG=` - -#ifdef IS_VERTEX - // csm_Position & csm_PositionRaw - #ifdef IS_UNKNOWN - vec3 csm_Position = vec3(0.0); - vec4 csm_PositionRaw = vec4(0.0); - vec3 csm_Normal = vec3(0.0); - #else - vec3 csm_Position = position; - vec4 csm_PositionRaw = projectionMatrix * modelViewMatrix * vec4(position, 1.); - vec3 csm_Normal = normal; - #endif - - // csm_PointSize - #ifdef IS_POINTSMATERIAL - float csm_PointSize = size; - #endif -#else - // csm_DiffuseColor & csm_FragColor - #if defined IS_UNKNOWN || defined IS_SHADERMATERIAL || defined IS_MESHDEPTHMATERIAL || defined IS_MESHNORMALMATERIAL || defined IS_SHADOWMATERIAL - vec4 csm_DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0); - vec4 csm_FragColor = vec4(1.0, 0.0, 1.0, 1.0); - #else - #ifdef USE_MAP - vec4 _csm_sampledDiffuseColor = texture2D(map, vMapUv); - - #ifdef DECODE_VIDEO_TEXTURE - // inline sRGB decode (TODO: Remove this code when https://crbug.com/1256340 is solved) - _csm_sampledDiffuseColor = vec4(mix(pow(_csm_sampledDiffuseColor.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), _csm_sampledDiffuseColor.rgb * 0.0773993808, vec3(lessThanEqual(_csm_sampledDiffuseColor.rgb, vec3(0.04045)))), _csm_sampledDiffuseColor.w); - #endif - - vec4 csm_DiffuseColor = vec4(diffuse, opacity) * _csm_sampledDiffuseColor; - vec4 csm_FragColor = vec4(diffuse, opacity) * _csm_sampledDiffuseColor; - #else - vec4 csm_DiffuseColor = vec4(diffuse, opacity); - vec4 csm_FragColor = vec4(diffuse, opacity); - #endif - #endif - - // csm_Emissive, csm_Roughness, csm_Metalness - #if defined IS_MESHSTANDARDMATERIAL || defined IS_MESHPHYSICALMATERIAL - vec3 csm_Emissive = emissive; - float csm_Roughness = roughness; - float csm_Metalness = metalness; - #endif - - // csm_AO - #if defined IS_MESHSTANDARDMATERIAL || defined IS_MESHPHYSICALMATERIAL || defined IS_MESHBASICMATERIAL || defined IS_MESHLAMBERTMATERIAL || defined IS_MESHPHONGMATERIAL || defined IS_MESHTOONMATERIAL - float csm_AO = 0.0; - #endif - - // csm_Bump - #if defined IS_MESHLAMBERTMATERIAL || defined IS_MESHMATCAPMATERIAL || defined IS_MESHNORMALMATERIAL || defined IS_MESHPHONGMATERIAL || defined IS_MESHPHYSICALMATERIAL || defined IS_MESHSTANDARDMATERIAL || defined IS_MESHTOONMATERIAL || defined IS_SHADOWMATERIAL - vec3 csm_Bump = vec3(0.0); - #endif - - float csm_DepthAlpha = 1.0; -#endif -`,JG=` - varying mat4 csm_internal_vModelViewMatrix; -`,YG=` - csm_internal_vModelViewMatrix = modelViewMatrix; -`,XG=` - varying mat4 csm_internal_vModelViewMatrix; -`,ZG=` - -`,QG,$G=(QG={},DG(QG,`${HG.position}`,`*`),DG(QG,`${HG.positionRaw}`,`*`),DG(QG,`${HG.normal}`,`*`),DG(QG,`${HG.pointSize}`,[`PointsMaterial`]),DG(QG,`${HG.diffuseColor}`,`*`),DG(QG,`${HG.fragColor}`,`*`),DG(QG,`${HG.emissive}`,[`MeshStandardMaterial`,`MeshPhysicalMaterial`]),DG(QG,`${HG.roughness}`,[`MeshStandardMaterial`,`MeshPhysicalMaterial`]),DG(QG,`${HG.metalness}`,[`MeshStandardMaterial`,`MeshPhysicalMaterial`]),DG(QG,`${HG.ao}`,[`MeshStandardMaterial`,`MeshPhysicalMaterial`,`MeshBasicMaterial`,`MeshLambertMaterial`,`MeshPhongMaterial`,`MeshToonMaterial`]),DG(QG,`${HG.bump}`,[`MeshLambertMaterial`,`MeshMatcapMaterial`,`MeshNormalMaterial`,`MeshPhongMaterial`,`MeshPhysicalMaterial`,`MeshStandardMaterial`,`MeshToonMaterial`,`ShadowMaterial`]),DG(QG,`${HG.depthAlpha}`,`*`),QG),eK=[`baseMaterial`,`fragmentShader`,`vertexShader`,`uniforms`,`patchMap`,`cacheKey`,`silent`],tK=function(e,t,n){return e.split(t).join(n)},nK=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)},rK=function(e,t){return RegExp(`\\b${nK(t)}\\b`).test(e)};function iK(e){try{new e}catch(e){if(e.message.indexOf(`is not a constructor`)>=0)return!1}return!0}function aK(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Object.assign(e,t);var r=Object.getPrototypeOf(t);Object.entries(Object.getOwnPropertyDescriptors(r)).filter(function(e){var t=typeof e[1].get==`function`,n=typeof e[1].set==`function`,r=typeof e[1].value==`function`,i=e[0]===`constructor`;return(t||n||r)&&!i}).forEach(function(t){if(typeof e[t[0]]==`function`){n||console.warn(`Function ${t[0]} already exists on CSM, renaming to base_${t[0]}`);var r=`base_${t[0]}`;e[r]=t[1].value.bind(e);return}Object.defineProperty(e,t[0],t[1])})}function oK(e){var t=e.toString().trim(),n=t.substring(t.indexOf(`{`)+1,t.lastIndexOf(`}`));return n.trim().length===0}function sK(e){return e.replace(/\s/g,``)}function cK(e,t,n){var r=e.lastIndexOf(t);return r===-1?e:e.substring(0,r)+n+e.substring(r+t.length)}var lK=function(e){LG(n,e);var t=VG(n);function n(e){var r,i=e.baseMaterial,a=e.fragmentShader,o=e.vertexShader,s=e.uniforms,c=e.patchMap,l=e.cacheKey,u=e.silent,d=jG(e,eK);MG(this,n);var f;if(iK(i)?f=new i(d):(f=i,Object.assign(f,d)),f.type===`RawShaderMaterial`)throw Error(`CustomShaderMaterial does not support RawShaderMaterial`);r=t.call(this),aK(FG(r),f,u),r.__csm={patchMap:c||{},fragmentShader:a||``,vertexShader:o||``,cacheKey:l,baseMaterial:i,instanceID:Wt.generateUUID(),type:f.type,isAlreadyExtended:!oK(f.onBeforeCompile),cacheHash:``,silent:u},r.uniforms=kG(kG({},r.uniforms||{}),s||{});var p=r.__csm,m=p.fragmentShader,h=p.vertexShader,g=r.uniforms;return r.__csm.cacheHash=r.getCacheHash(),r.generateMaterial(m,h,g),r}return PG(n,[{key:`update`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.uniforms=e.uniforms||this.uniforms,Object.assign(this.__csm,e);var t=this.__csm,n=t.fragmentShader,r=t.vertexShader,i=this.uniforms,a=this.getCacheHash();this.__csm.cacheHash=a,this.generateMaterial(n,r,i)}},{key:`clone`,value:function(){var e={baseMaterial:this.__csm.baseMaterial,fragmentShader:this.__csm.fragmentShader,vertexShader:this.__csm.vertexShader,uniforms:this.uniforms,silent:this.__csm.silent,patchMap:this.__csm.patchMap,cacheKey:this.__csm.cacheKey},t=new this.constructor(e);return Object.assign(this,t),t}},{key:`getCacheHash`,value:function(){var e=this.__csm,t=e.fragmentShader,n=e.vertexShader,r=this.uniforms,i=Object.values(r).reduce(function(e,t){var n=t.value;return e+JSON.stringify(n)},``),a=sK(t)+sK(n)+i;return a.trim().length>0?GW(a):this.customProgramCacheKey()}},{key:`generateMaterial`,value:function(e,t,n){var r=this,i=this.parseShader(e),a=this.parseShader(t);this.uniforms=n||{},this.customProgramCacheKey=function(){return r.__csm.cacheHash};var o=function(e){try{if(i){var t=r.patchShader(i,e.fragmentShader,!0);e.fragmentShader=r.getMaterialDefine()+t}if(a){var n=r.patchShader(a,e.vertexShader);e.vertexShader=`#define IS_VERTEX; -`+n,e.vertexShader=r.getMaterialDefine()+e.vertexShader}e.uniforms=kG(kG({},e.uniforms),r.uniforms),r.uniforms=e.uniforms}catch(e){console.error(e)}};if(this.__csm.isAlreadyExtended){var s=this.onBeforeCompile;this.onBeforeCompile=function(e,t){s(e,t),o(e)}}else this.onBeforeCompile=o;this.needsUpdate=!0}},{key:`patchShader`,value:function(e,t,n){var r=this,i=t,a=kG(kG({},this.getPatchMapForMaterial()),this.__csm.patchMap);Object.keys(a).forEach(function(t){Object.keys(a[t]).forEach(function(n){var o=$G[t],s=r.__csm.type;if(t===`*`||rK(e.main,t))if(!o||Array.isArray(o)&&o.includes(s)||o===`*`)i=tK(i,n,a[t][n]);else throw Error(`CSM: ${t} is not available in ${s}. Shader cannot compile.`)})}),i=i.replace(`void main() {`,` - #ifndef CSM_IS_HEAD_DEFAULTS_DEFINED - ${n?XG:JG} - #define CSM_IS_HEAD_DEFAULTS_DEFINED 1 - #endif - - ${e.header} - - void main() { - #ifndef CSM_IS_DEFAULTS_DEFINED - ${qG} - #define CSM_IS_DEFAULTS_DEFINED 1 - #endif - - #ifndef CSM_IS_MAIN_DEFAULTS_DEFINED - ${n?ZG:YG} - #define CSM_IS_MAIN_DEFAULTS_DEFINED 1 - #endif - - // CSM_START - `);var o=this.__csm.isAlreadyExtended,s=i.includes(`// CSM_END`);return i=o&&s?cK(i,`// CSM_END`,` - // CSM_END - ${e.main} - // CSM_END - `):i.replace(`// CSM_START`,` - // CSM_START - ${e.main} - // CSM_END - `),i=e.defines+i,i}},{key:`parseShader`,value:function(e){if(e){var t=e.replace(/\/\*\*(.*?)\*\/|\/\/(.*?)\n/gm,``),n=mG(t),r=wG(n),i=r.map(function(e){return e.name}).indexOf(`main`),a=yG(n.slice(0,i>=0?r[i].outer[0]:void 0)),o=i>=0?this.getShaderFromIndex(n,r[i].body):``;return{defines:``,header:a,main:o}}}},{key:`getMaterialDefine`,value:function(){var e=this.__csm.type;return e?`#define IS_${e.toUpperCase()}; -`:`#define IS_UNKNOWN; -`}},{key:`getPatchMapForMaterial`,value:function(){switch(this.__csm.type){case`ShaderMaterial`:return KG;default:return GG}}},{key:`getShaderFromIndex`,value:function(e,t){return yG(e.slice(t[0],t[1]))}}]),n}(Et),uK=class extends Ht{constructor(e={}){super(e),dR(this,`_time`),dR(this,`_factor`),this.setValues(e),this._time={value:0},this._factor={value:1}}onBeforeCompile(e){e.uniforms||={},e.uniforms.time=this._time,e.uniforms.factor=this._factor,e.vertexShader=` - uniform float time; - uniform float factor; - ${e.vertexShader} - `,e.vertexShader=e.vertexShader.replace(`#include `,`float theta = sin( time + position.y ) / 2.0 * factor; - float c = cos( theta ); - float s = sin( theta ); - mat3 m = mat3( c, 0, s, 0, 1, 0, -s, 0, c ); - vec3 transformed = vec3( position ) * m; - vNormal = vNormal * m;`)}get time(){return this._time.value}set time(e){this._time.value=e}get factor(){return this._factor.value}set factor(e){this._factor.value=e}};const dK=[`factor`],fK=R({__name:`index`,props:{speed:{default:1},factor:{default:1}},setup(e,{expose:t}){let n=e,r=H(),{extend:i,invalidate:a}=Ie();i({MeshWobbleMaterial:uK}),I(n,()=>a());let{onBeforeRender:o}=ie();return o(({elapsed:e,invalidate:t})=>{r.value&&(r.value.time=e*n?.speed,t())}),t({instance:r}),(e,t)=>(L(),B(`TresMeshWobbleMaterial`,st({ref_key:`materialRef`,ref:r,factor:e.factor},e.$attrs),null,16,dK))}}),pK=R({name:`BakeShadows`,setup(){let{renderer:e}=Ie();An(()=>{e.value.shadowMap.autoUpdate=!1,e.value.shadowMap.needsUpdate=!0})}});var mK=`void main() { - gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); -}`,hK=`#include - -void main() { - vec2 center = vec2(0., 1.); - float rotation = 0.0; - - - - float size = 0.03; - - vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec2 scale; - scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); - scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); - - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - - gl_Position = projectionMatrix * mvPosition; -}`;const gK=new P(0,0,0),_K=new P(0,0,0),vK=new P(0,0,0);function yK(e,t,n){let r=gK.setFromMatrixPosition(e.matrixWorld);r.project(t);let i=n.width/2,a=n.height/2;return[(Number.isNaN(r.x)?0:r.x)*i+i,-(r.y*a)+a,r.z]}function bK(e,t){let n=gK.setFromMatrixPosition(e.matrixWorld),r=_K.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),a=t.getWorldDirection(vK);return i.angleTo(a)>Math.PI/2}function xK(e,t,n,r){let i=gK.setFromMatrixPosition(e.matrixWorld),a=i.clone();a.project(t),n.setFromCamera(new Xt(a.x,a.y),t);let o=n.intersectObjects(r,!0);if(o.length>0){let e=o[0].distance;return i.distanceTo(n.ray.origin)Math.abs(e)<1e-10?0:e;function TK(e,t,n=``){let r=`matrix3d(`;for(let n=0;n!==16;n++)r+=wK(t[n]*e.elements[n])+(n===15?`)`:`,`);return n+r}const EK=(e=>t=>TK(t,e))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),DK=(e=>(t,n)=>TK(t,e(n),`translate(-50%,-50%)`))(e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1]),OK=[`geometry`,`material`],kK=R({__name:`HTML`,props:{geometry:{default:new ge},material:{},as:{default:`div`},transform:{type:Boolean,default:!1},portal:{},wrapperClass:{},eps:{default:1e-4},distanceFactor:{},fullscreen:{type:Boolean},center:{type:Boolean},pointerEvents:{default:`auto`},sprite:{type:Boolean,default:!1},zIndexRange:{default:()=>[16777271,0]},occlude:{type:[Object,null,Array,Boolean,String]}},emits:[`onOcclude`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=Rt(),o=fn(),s=z(),c=z(),{geometry:l,material:u,as:d,transform:f,portal:p,wrapperClass:m,eps:h,distanceFactor:g,fullscreen:_,center:v,pointerEvents:y,sprite:b,occlude:x,zIndexRange:S}=zn(r),{renderer:C,scene:w,camera:T,raycaster:E,sizes:D}=Ie(),O=In(()=>document.createElement(d.value)),ee=z([0,0,0]),te=z(0),ne=z(),k=In(()=>f.value?{position:`absolute`,top:0,left:0,width:`${D.width.value}px`,height:`${D.height.value}px`,transformStyle:`preserve-3d`,pointerEvents:`none`,zIndex:2}:{position:`absolute`,transform:v.value?`translate3d(-50%,-50%,0)`:`none`,..._.value&&{top:-D.height.value/2,left:-D.width.value/2,width:`${D.width.value}px`,height:`${D.height.value}px`},zIndex:2,...Object.assign({},o.style)}),A=In(()=>({position:`absolute`,pointerEvents:y.value})),re=z(null),j=z(!1),ae=In(()=>x?.value&&x?.value!==`blending`||Array.isArray(x?.value)&&x?.value.length&&_n(x.value[0]));I(()=>x,({value:e})=>{e===`blending`?(O.value.style.zIndex=`${Math.floor(S.value[0]/2)}`,O.value.style.position=`absolute`,O.value.style.pointerEvents=`none`):(O.value.style.zIndex=null,O.value.style.position=null,O.value.style.pointerEvents=null)}),I(()=>{var e;return[s.value,C.value,D.width.value,D.height.value,(e=a.default)?.call(a)]},([e,t])=>{var n,r,i,s,l,u;if(e&&t){let d=p?.value||t.domElement;if((n=w.value)==null||n.updateMatrixWorld(),f.value)O.value.style.cssText=`position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;`;else{let t=yK(e,T.value,{width:D.width.value,height:D.height.value});O.value.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${t[0]}px,${t[1]}px,0);transform-origin:0 0;`}d&&!O.value.parentNode&&((r=d.parentNode)==null||r.appendChild(O.value)),f.value?ne.value=dn(`div`,{id:`outer`,style:k.value},[dn(`div`,{id:`inner`,style:A.value},[dn(`div`,{key:(i=c.value)?.uuid,id:w?.value.uuid,class:o.class,style:o.style},(s=a.default)?.call(a))])]):ne.value=dn(`div`,{key:(l=c.value)?.uuid,id:w?.value.uuid,style:k.value},(u=a.default)?.call(a)),It(ne.value,O.value)}}),An(()=>{m!=null&&m.value&&(O.value.className=m.value)});let oe=z(!0),{onBeforeRender:se}=ie();se(({invalidate:e})=>{var t,n,r,a,u,d,p;if(e(),s.value&&T.value&&C.value){(t=T.value)==null||t.updateMatrixWorld(),s.value.updateWorldMatrix(!0,!1);let e=f.value?ee.value:yK(s.value,T.value,{width:D.width.value||0,height:D.height.value||0});if(f.value||Math.abs(te.value-T.value.zoom)>h.value||Math.abs(ee.value[0]-e[0])>h.value||Math.abs(ee.value[1]-e[1])>h.value||Math.abs(ee.value[2]-e[2])>h.value){let t=bK(s.value,T.value),a=!1;ae.value&&(Array.isArray(x?.value)?a=x?.value:x?.value!==`blending`&&(a=[w.value]));let o=oe.value;if(a){let e=xK(s.value,T.value,E.value,a);oe.value=e&&!t}else oe.value=!t;o!==oe.value&&(i(`onOcclude`,!oe.value),O.value.style.display=oe.value?`block`:`none`);let c=Math.floor(S.value[0]/2),l=x!=null&&x.value?ae.value?[S.value[0],c]:[c-1,0]:S.value;if(O.value.style.zIndex=`${CK(s.value,T.value,l)}`,f.value){let[e,t]=[D.width.value/2,D.height.value/2],i=T.value.projectionMatrix.elements[5]*t,{isOrthographicCamera:a,top:o,left:c,bottom:l,right:u}=T.value,d=EK(T.value.matrixWorldInverse),f=a?`scale(${i})translate(${wK(-(u+c)/2)}px,${wK((o+l)/2)}px)`:`translateZ(${i}px)`,p=s.value.matrixWorld;if(b.value&&(p=T.value.matrixWorldInverse.clone().transpose().copyPosition(p).scale(s.value.scale),p.elements[3]=p.elements[7]=p.elements[11]=0,p.elements[15]=1),O.value.style.width=`${D.width.value}px`,O.value.style.height=`${D.height.value}px`,O.value.style.perspective=a?``:`${i}px`,(n=ne.value)!=null&&n.el&&(r=ne.value)!=null&&r.children&&Array.isArray(ne.value.children)){ne.value.el.style.transform=`${f}${d}translate(${e}px,${t}px)`;let n=ne.value.children[0];n&&n.el&&(n.el.style.transform=DK(p,1/((g?.value||10)/400)))}}else{let t=g?.value===void 0?1:SK(s.value,T.value)*g?.value;O.value.style.transform=`translate3d(${e[0]}px,${e[1]}px,0) scale(${t})`}}ee.value=e,te.value=T.value.zoom}if(!ae.value&&c.value&&!j.value)if(f.value){if((a=ne.value)!=null&&a.el&&(u=ne.value)!=null&&u.children){let e=((d=ne.value)?.children)[0];if(e!=null&&e.clientWidth&&e!=null&&e.clientHeight){let{isOrthographicCamera:t}=T.value;if(t||l)o.scale&&(Array.isArray(o.scale)?o.scale instanceof P?c.value.scale.copy(o.scale.clone().divideScalar(1)):c.value.scale.set(1/o.scale[0],1/o.scale[1],1/o.scale[2]):c.value.scale.setScalar(1/o.scale));else{let t=(g?.value||10)/400,n=e.clientWidth*t,r=e.clientHeight*t;c.value.scale.set(n,r,1)}j.value=!0}}}else{let e=O.value.children[0];if(e!=null&&e.clientWidth&&e!=null&&e.clientHeight){let t=e.clientWidth*1,n=e.clientHeight*1;c.value.scale.set(t,n,1),j.value=!0}re.value.lookAt((p=T.value)?.position)}});let M=In(()=>({vertexShader:f.value?void 0:hK,fragmentShader:mK})),ce=In(()=>{let e=M.value;return u.value||new ct({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,side:jt})});return On(()=>{ce.value&&ce.value.dispose(),O.value.remove()}),t({instance:s}),(e,t)=>(L(),B(`TresGroup`,{ref_key:`groupRef`,ref:s},[U(x)&&!ae.value?(L(),B(`TresMesh`,{key:0,ref_key:`meshRef`,ref:c,geometry:U(l),material:ce.value},null,8,OK)):hn(``,!0)],512))}});var AK={exports:{}},jK=AK.exports,MK;function NK(){return MK||(MK=1,function(e,t){(function(t,n){e.exports=n()})(jK,function(){var e=function(){function t(e){return i.appendChild(e.dom),e}function n(e){for(var t=0;to+1e3&&(c.update(1e3*s/(e-o),100),o=e,s=0,u)){var t=performance.memory;u.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){a=this.end()},domElement:i,setMode:n}};return e.Panel=function(e,t,n){var r=1/0,i=0,a=Math.round,o=a(window.devicePixelRatio||1),s=80*o,c=48*o,l=3*o,u=2*o,d=3*o,f=15*o,p=74*o,m=30*o,h=document.createElement(`canvas`);h.width=s,h.height=c,h.style.cssText=`width:80px;height:48px`;var g=h.getContext(`2d`);return g.font=`bold `+9*o+`px Helvetica,Arial,sans-serif`,g.textBaseline=`top`,g.fillStyle=n,g.fillRect(0,0,s,c),g.fillStyle=t,g.fillText(e,l,u),g.fillRect(d,f,p,m),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(d,f,p,m),{dom:h,update:function(c,_){r=Math.min(r,c),i=Math.max(i,c),g.fillStyle=n,g.globalAlpha=1,g.fillRect(0,0,s,f),g.fillStyle=t,g.fillText(a(c)+` `+e+` (`+a(r)+`-`+a(i)+`)`,l,u),g.drawImage(h,d+o,f,p-o,m,d,f,p-o,m),g.fillRect(d+p-o,f,o,m),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(d+p-o,f,o,a((1-c/_)*m))}}},e})}(AK)),AK.exports}var PK=NK();const FK=zW(PK),IK=R({name:`Stats`,props:{showPanel:{type:Number,default:0}},setup(e,{expose:t}){let n=new FK;t({instance:n});let r=document.body;n.showPanel(e.showPanel||0),r?.appendChild(n.dom);let{onBeforeRender:i,onAfterRender:a}=ie();i(()=>n.begin(),-1/0),a(()=>n.end(),1/0),On(()=>{r?.removeChild(n.dom)})}});var LK=class{constructor(e,t,n){this.name=e,this.fg=t,this.bg=n,this.gradient=null,this.PR=Math.round(window.devicePixelRatio||1),this.WIDTH=90*this.PR,this.HEIGHT=48*this.PR,this.TEXT_X=3*this.PR,this.TEXT_Y=2*this.PR,this.GRAPH_X=3*this.PR,this.GRAPH_Y=15*this.PR,this.GRAPH_WIDTH=84*this.PR,this.GRAPH_HEIGHT=30*this.PR,this.canvas=document.createElement(`canvas`),this.canvas.width=this.WIDTH,this.canvas.height=this.HEIGHT,this.canvas.style.width=`90px`,this.canvas.style.height=`48px`,this.canvas.style.position=`absolute`,this.canvas.style.cssText=`width:90px;height:48px`,this.context=this.canvas.getContext(`2d`),this.initializeCanvas()}createGradient(){if(!this.context)throw Error(`No context`);let e=this.context.createLinearGradient(0,this.GRAPH_Y,0,this.GRAPH_Y+this.GRAPH_HEIGHT),t,n=this.fg;switch(this.fg.toLowerCase()){case`#0ff`:t=`#006666`;break;case`#0f0`:t=`#006600`;break;case`#ff0`:t=`#666600`;break;case`#e1e1e1`:t=`#666666`;break;default:t=this.bg;break}return e.addColorStop(0,t),e.addColorStop(1,n),e}initializeCanvas(){this.context&&(this.context.font=`bold `+9*this.PR+`px Helvetica,Arial,sans-serif`,this.context.textBaseline=`top`,this.gradient=this.createGradient(),this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.fg,this.context.fillText(this.name,this.TEXT_X,this.TEXT_Y),this.context.fillStyle=this.fg,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT))}update(e,t,n,r,i=0){if(!this.context||!this.gradient)return;let a=Math.min(1/0,e),o=Math.max(n,e);r=Math.max(r,t),this.context.globalAlpha=1,this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.GRAPH_Y),this.context.fillStyle=this.fg,this.context.fillText(`${e.toFixed(i)} ${this.name} (${a.toFixed(i)}-${parseFloat(o.toFixed(i))})`,this.TEXT_X,this.TEXT_Y),this.context.drawImage(this.canvas,this.GRAPH_X+this.PR,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT,this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT);let s=this.GRAPH_HEIGHT-(1-t/r)*this.GRAPH_HEIGHT;s>0&&(this.context.globalAlpha=1,this.context.fillStyle=this.gradient,this.context.fillRect(this.GRAPH_X+this.GRAPH_WIDTH-this.PR,this.GRAPH_Y+this.GRAPH_HEIGHT-s,this.PR,s))}};const RK=class e{constructor({trackGPU:t=!1,logsPerSecond:n=30,samplesLog:r=60,samplesGraph:i=10,precision:a=2,minimal:o=!1,horizontal:s=!0,mode:c=0}={}){this.gl=null,this.ext=null,this.activeQuery=null,this.gpuQueries=[],this.threeRendererPatched=!1,this.frames=0,this.renderCount=0,this.isRunningCPUProfiling=!1,this.totalCpuDuration=0,this.totalGpuDuration=0,this.totalGpuDurationCompute=0,this.totalFps=0,this.gpuPanel=null,this.gpuPanelCompute=null,this.averageFps={logs:[],graph:[]},this.averageCpu={logs:[],graph:[]},this.averageGpu={logs:[],graph:[]},this.averageGpuCompute={logs:[],graph:[]},this.handleClick=e=>{e.preventDefault(),this.showPanel(++this.mode%this.dom.children.length)},this.handleResize=()=>{this.resizePanel(this.fpsPanel,0),this.resizePanel(this.msPanel,1),this.gpuPanel&&this.resizePanel(this.gpuPanel,2),this.gpuPanelCompute&&this.resizePanel(this.gpuPanelCompute,3)},this.mode=c,this.horizontal=s,this.minimal=o,this.trackGPU=t,this.samplesLog=r,this.samplesGraph=i,this.precision=a,this.logsPerSecond=n,this.dom=document.createElement(`div`),this.initializeDOM(),this.beginTime=performance.now(),this.prevTime=this.beginTime,this.prevCpuTime=this.beginTime,this.fpsPanel=this.addPanel(new e.Panel(`FPS`,`#0ff`,`#002`),0),this.msPanel=this.addPanel(new e.Panel(`CPU`,`#0f0`,`#020`),1),this.setupEventListeners()}initializeDOM(){this.dom.style.cssText=` - position: fixed; - top: 0; - left: 0; - opacity: 0.9; - z-index: 10000; - ${this.minimal?`cursor: pointer;`:``} - `}setupEventListeners(){this.minimal?(this.dom.addEventListener(`click`,this.handleClick),this.showPanel(this.mode)):window.addEventListener(`resize`,this.handleResize)}async init(e){if(!e){console.error(`Stats: The "canvas" parameter is undefined.`);return}this.handleThreeRenderer(e)||await this.handleWebGPURenderer(e)||this.initializeWebGL(e)}handleThreeRenderer(e){return e.isWebGLRenderer&&!this.threeRendererPatched?(this.patchThreeRenderer(e),this.gl=e.getContext(),this.trackGPU&&this.initializeGPUTracking(),!0):!1}async handleWebGPURenderer(e){return e.isWebGPURenderer?(this.trackGPU&&(e.backend.trackTimestamp=!0,await e.hasFeatureAsync(`timestamp-query`)&&this.initializeWebGPUPanels()),this.info=e.info,!0):!1}initializeWebGPUPanels(){this.gpuPanel=this.addPanel(new e.Panel(`GPU`,`#ff0`,`#220`),2),this.gpuPanelCompute=this.addPanel(new e.Panel(`CPT`,`#e1e1e1`,`#212121`),3)}initializeWebGL(e){if(e instanceof WebGL2RenderingContext)this.gl=e;else if(e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas){if(this.gl=e.getContext(`webgl2`),!this.gl)return console.error(`Stats: Unable to obtain WebGL2 context.`),!1}else return console.error(`Stats: Invalid input type. Expected WebGL2RenderingContext, HTMLCanvasElement, or OffscreenCanvas.`),!1;return!0}initializeGPUTracking(){this.gl&&(this.ext=this.gl.getExtension(`EXT_disjoint_timer_query_webgl2`),this.ext&&(this.gpuPanel=this.addPanel(new e.Panel(`GPU`,`#ff0`,`#220`),2)))}begin(){this.isRunningCPUProfiling||this.beginProfiling(`cpu-started`),!(!this.gl||!this.ext)&&(this.activeQuery&&this.gl.endQuery(this.ext.TIME_ELAPSED_EXT),this.activeQuery=this.gl.createQuery(),this.activeQuery&&this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT,this.activeQuery))}end(){this.renderCount++,this.gl&&this.ext&&this.activeQuery&&(this.gl.endQuery(this.ext.TIME_ELAPSED_EXT),this.gpuQueries.push({query:this.activeQuery}),this.activeQuery=null)}update(){this.info?this.processWebGPUTimestamps():this.processGpuQueries(),this.endProfiling(`cpu-started`,`cpu-finished`,`cpu-duration`),this.updateAverages(),this.resetCounters()}processWebGPUTimestamps(){this.totalGpuDuration=this.info.render.timestamp,this.totalGpuDurationCompute=this.info.compute.timestamp,this.addToAverage(this.totalGpuDurationCompute,this.averageGpuCompute)}updateAverages(){this.addToAverage(this.totalCpuDuration,this.averageCpu),this.addToAverage(this.totalGpuDuration,this.averageGpu)}resetCounters(){this.renderCount=0,this.totalCpuDuration===0&&this.beginProfiling(`cpu-started`),this.totalCpuDuration=0,this.totalFps=0,this.beginTime=this.endInternal()}resizePanel(e,t){e.canvas.style.position=`absolute`,this.minimal?e.canvas.style.display=`none`:(e.canvas.style.display=`block`,this.horizontal?(e.canvas.style.top=`0px`,e.canvas.style.left=t*e.WIDTH/e.PR+`px`):(e.canvas.style.left=`0px`,e.canvas.style.top=t*e.HEIGHT/e.PR+`px`))}addPanel(e,t){return e.canvas&&(this.dom.appendChild(e.canvas),this.resizePanel(e,t)),e}showPanel(e){for(let t=0;t{if(this.gl){let n=this.gl.getQueryParameter(e.query,this.gl.QUERY_RESULT_AVAILABLE),r=this.gl.getParameter(this.ext.GPU_DISJOINT_EXT);if(n&&!r){let n=this.gl.getQueryParameter(e.query,this.gl.QUERY_RESULT)*1e-6;this.totalGpuDuration+=n,this.gl.deleteQuery(e.query),this.gpuQueries.splice(t,1)}}}))}endInternal(){this.frames++;let e=(performance||Date).now(),t=e-this.prevTime;if(e>=this.prevCpuTime+1e3/this.logsPerSecond){let n=Math.round(this.frames*1e3/t);this.addToAverage(n,this.averageFps),this.updatePanel(this.fpsPanel,this.averageFps,0),this.updatePanel(this.msPanel,this.averageCpu,this.precision),this.updatePanel(this.gpuPanel,this.averageGpu,this.precision),this.gpuPanelCompute&&this.updatePanel(this.gpuPanelCompute,this.averageGpuCompute),this.frames=0,this.prevCpuTime=e,this.prevTime=e}return e}addToAverage(e,t){t.logs.push(e),t.logs.length>this.samplesLog&&t.logs.shift(),t.graph.push(e),t.graph.length>this.samplesGraph&&t.graph.shift()}beginProfiling(e){window.performance&&(window.performance.mark(e),this.isRunningCPUProfiling=!0)}endProfiling(e,t,n){if(window.performance&&t&&this.isRunningCPUProfiling){window.performance.mark(t);let r=performance.measure(n,e,t);this.totalCpuDuration+=r.duration,this.isRunningCPUProfiling=!1}}updatePanel(e,t,n=2){if(t.logs.length>0){let r=0,i=.01;for(let e=0;ei&&(i=t.logs[e]);let a=0,o=.01;for(let e=0;eo&&(o=t.graph[e]);e&&e.update(r/Math.min(t.logs.length,this.samplesLog),a/Math.min(t.graph.length,this.samplesGraph),i,o,n)}}get domElement(){return this.dom}patchThreeRenderer(e){let t=e.render,n=this;e.render=function(e,r){n.begin(),t.call(this,e,r),n.end()},this.threeRendererPatched=!0}};RK.Panel=LK;let zK=RK;const BK=R({name:`StatsGl`,props:[`logsPerSecond`,`samplesLog`,`samplesGraph`,`precision`,`horizontal`,`minimal`,`mode`],setup(e,{expose:t}){let n=new zK({logsPerSecond:e.logsPerSecond,samplesLog:e.samplesLog,samplesGraph:e.samplesGraph,precision:e.precision,horizontal:e.horizontal,minimal:e.minimal,mode:e.mode});t({instance:n});let r=document.body,i=n.dom||n.container;r?.appendChild(i);let{renderer:a}=Ie(),{onAfterRender:o}=ie();n.init(a.value),o(()=>n.update(),1/0),On(()=>{r?.removeChild(i)})}}),{logError:VK}=se(),HK=[`args`],UK=[`color`],WK=R({__name:`Box`,props:{args:{default:()=>[1,1,1]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{invalidate:r}=Ie(),{args:i,color:a}=zn(n);I(i,()=>r());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`boxRef`,ref:o},e.$attrs),[V(`TresBoxGeometry`,{args:U(i)},null,8,HK),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(a)},null,8,UK)])],16))}}),GK=[`object`],KK=R({__name:`Line2`,props:{points:{},vertexColors:{default:null},color:{default:`white`},lineWidth:{default:1},worldUnits:{type:Boolean,default:!1},alphaToCoverage:{type:Boolean,default:!1},dashed:{type:Boolean,default:!1},dashSize:{default:1},gapSize:{default:1},dashScale:{default:1},dashOffset:{default:0}},setup(e,{expose:t}){let n=e;function r(e,t){if(!e||e.length===0)return Array.from({length:t}).fill(oe(n.color));if(e.length===1)return Array.from({length:t}).fill(oe(e[0]));if(e.length===t)return e.map(oe);let r=t-1,i=e.map(oe);closed&&i.push(i[0].clone());let a=[i[0]],o=r/(i.length-1);for(let e=1;eArray.isArray(n.vertexColors));function u(e,t){e.color=oe(t.color),e.linewidth=t.lineWidth,e.alphaToCoverage=t.alphaToCoverage,e.worldUnits=t.worldUnits,e.vertexColors=Array.isArray(t.vertexColors),e.dashed=t.dashed,e.dashScale=t.dashScale,e.dashSize=t.dashSize,e.dashOffset=t.dashOffset,e.gapSize=t.gapSize,e.needsUpdate=!0}function d(e,t,n){let i=t.map(e=>e instanceof P?[e.x,e.y,e.z]:e instanceof Xt?[e.x,e.y,0]:Array.isArray(e)&&e.length===2?[e[0],e[1],0]:e).flat();e.setPositions(i.flat());let a=r(n,t.length).map(e=>e.toArray()).flat();e.setColors(a),o.computeLineDistances()}u(i,n),d(a,n.points,n.vertexColors),o.computeLineDistances(),I(()=>[n.color,n.lineWidth,n.alphaToCoverage,n.worldUnits,l,n.dashed,n.dashScale,n.dashSize,n.dashOffset],()=>{u(i,n),c()}),I(()=>[n.points,n.vertexColors],()=>{d(a,n.points,n.vertexColors),c()}),I(()=>[s.height,s.width],()=>{i.resolution=new Xt(s.width.value,s.height.value),c()}),On(()=>{a.dispose(),i.dispose()});let f=H();return t({instance:f}),(e,t)=>(L(),B(`primitive`,{ref:f.value,object:U(o)},null,8,GK))}}),qK=R({__name:`CatmullRomCurve3`,props:{segments:{default:20},closed:{type:Boolean,default:!1},curveType:{default:`centripetal`},tension:{default:.5},points:{},vertexColors:{},color:{},lineWidth:{},alphaToCoverage:{type:Boolean},dashed:{type:Boolean},dashSize:{},dashScale:{},dashOffset:{},gapSize:{},worldUnits:{type:Boolean}},setup(e,{expose:t}){let n=e;function r(e,t,n,r){let i=e.map(e=>e instanceof P?e:new P(...e));return new rn(i,t,n,r)}function i(e,t){return e.getPoints(t)}let a=In(()=>r(n.points,n.closed,n.curveType,n.tension)),o=In(()=>i(a.value,n.segments)),s=H();return t({instance:s}),(e,t)=>(L(),jn(KK,{ref:s.value,points:o.value,"vertex-colors":n.vertexColors,color:n.color,"line-width":n.lineWidth,"alpha-to-coverage":n.alphaToCoverage,dashed:n.dashed,"dash-size":n.dashSize,"dash-scale":n.dashScale,"dash-offset":n.dashOffset,"gap-size":n.gapSize,"world-units":n.worldUnits},null,8,[`points`,`vertex-colors`,`color`,`line-width`,`alpha-to-coverage`,`dashed`,`dash-size`,`dash-scale`,`dash-offset`,`gap-size`,`world-units`]))}}),JK=[`args`],YK=[`color`],XK=R({__name:`Circle`,props:{args:{default:()=>[1,32,0,Math.PI*2]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`circleRef`,ref:o},e.$attrs),[V(`TresCircleGeometry`,{args:U(r)},null,8,JK),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,YK)])],16))}}),ZK=[`args`],QK=[`color`],$K=R({__name:`Cone`,props:{args:{default:()=>[1,1,12,12,!1,0,Math.PI*2]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`coneRef`,ref:o},e.$attrs),[V(`TresConeGeometry`,{args:U(r)},null,8,ZK),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,QK)])],16))}}),eq=[`args`],tq=[`color`],nq=R({__name:`Cylinder`,props:{args:{default:()=>[1,1,1,32,1,!1,0,Math.PI*2]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`cylinderRef`,ref:o},e.$attrs),[V(`TresCylinderGeometry`,{args:U(r)},null,8,eq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,tq)])],16))}}),rq=[`args`],iq=[`color`],aq=R({__name:`Dodecahedron`,props:{args:{default:()=>[1,0]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),a=H(),{invalidate:o}=Ie();return I(r,()=>o()),t({instance:a}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`dodecahedronRef`,ref:a},e.$attrs),[V(`TresDodecahedronGeometry`,{args:U(r)},null,8,rq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,iq)])],16))}}),oq=[`args`],sq=[`color`],cq=R({__name:`Icosahedron`,props:{args:{default:()=>[1,0]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`icosahedronRef`,ref:o},e.$attrs),[V(`TresIcosahedronGeometry`,{args:U(r)},null,8,oq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,sq)])],16))}}),lq=[`args`],uq=[`color`],dq=R({__name:`Octahedron`,props:{args:{default:()=>[1,0]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`octahedronRef`,ref:o},e.$attrs),[V(`TresOctahedronGeometry`,{args:U(r)},null,8,lq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,uq)])],16))}}),fq=[`rotation`],pq=[`args`],mq=[`color`],hq=R({__name:`Plane`,props:{args:{default:()=>[1,1]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`planeRef`,ref:o,rotation:[-Math.PI/2,0,0]},e.$attrs),[V(`TresPlaneGeometry`,{args:U(r)},null,8,pq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,mq)])],16,fq))}}),gq=[`args`],_q=[`color`],vq=R({__name:`Ring`,props:{args:{default:()=>[.5,1,32]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`ringRef`,ref:o},e.$attrs),[V(`TresRingGeometry`,{args:U(r)},null,8,gq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,_q)])],16))}}),yq=[`args`],bq=[`color`],xq=R({__name:`RoundedBox`,props:{args:{default:()=>[1,1,1,2,.1]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a,extend:o}=Ie();o({RoundedBoxGeometry:OV}),I(r,()=>a());let s=H();return t({instance:s}),(e,t)=>(L(),B(`TresMesh`,{ref_key:`roundedBoxRef`,ref:s},[V(`TresRoundedBoxGeometry`,{args:U(r)},null,8,yq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,bq)])],512))}}),Sq=[`args`],Cq=[`color`],wq=R({__name:`Sphere`,props:{args:{default:()=>[2,32,16]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`sphereRef`,ref:o},e.$attrs),[V(`TresSphereGeometry`,{args:U(r)},null,8,Sq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,Cq)])],16))}}),Tq=[`geometry`],Eq=[`color`],Dq=R({__name:`Superformula`,props:{widthSegments:{default:32},heightSegments:{default:32},numArmsA:{default:4},expA:{default:()=>[40,1.3,.9]},numArmsB:{default:4},expB:{default:()=>[40,1.3,.9]},color:{default:`white`}},setup(e,{expose:t}){let n=e,{invalidate:r}=Ie(),{cos:i,sin:a,abs:o}=Math,s=H(),c=H(n.color);function l(e,t){let n=new Ut,r=e*t,i=new Float32Array(Array.from({length:3*r}).fill(0)),a=new Float32Array(Array.from({length:3*r}).fill(0)),o=[];for(let n=0;nn.color,()=>c.value=n.color),I(()=>[n.widthSegments,n.heightSegments],()=>{s.value&&s.value.dispose(),s.value=l(n.widthSegments,n.heightSegments),r()},{immediate:!0}),I(()=>[n.numArmsA,n.expA[0],n.expA[1],n.expA[2],n.numArmsB,n.expB[0],n.expB[1],n.expB[2]],()=>{d(s.value,n.numArmsA,n.expA[0],n.expA[1],n.expA[2],n.numArmsB,n.expB[0],n.expB[1],n.expB[2],n.widthSegments,n.heightSegments),r()},{immediate:!0}),On(()=>{s.value&&s.value.dispose()});let f=H();return t({instance:f}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`superformulaRef`,ref:f},e.$attrs,{geometry:s.value}),[Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:c.value},null,8,Eq)])],16,Tq))}}),Oq=[`rotation`],kq=[`args`],Aq=[`color`],jq=R({__name:`Tetrahedron`,props:{args:{default:()=>[1,0]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),a=H();return t({instance:a}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`tetrahedronRef`,ref:a,rotation:[-Math.PI/2,0,0]},e.$attrs),[V(`TresTetrahedronGeometry`,{args:U(r)},null,8,kq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,Aq)])],16,Oq))}}),Mq=[`args`],Nq=[`color`],Pq=R({__name:`Torus`,props:{args:{default:()=>[1,1,16,80]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`torusRef`,ref:o},e.$attrs),[V(`TresTorusGeometry`,{args:U(r)},null,8,Mq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,Nq)])],16))}}),Fq=[`args`],Iq=[`color`],Lq=R({__name:`TorusKnot`,props:{args:{default:()=>[1,.4,64,8]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`torusKnotRef`,ref:o},e.$attrs),[V(`TresTorusKnotGeometry`,{args:U(r)},null,8,Fq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,Iq)])],16))}}),Rq=[`args`],zq=[`color`],Bq=R({__name:`Tube`,props:{args:{default:()=>[new an(new P(-1,0,0),new P(0,1,0),new P(1,0,0)),20,.2,8,!1]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=zn(n),{invalidate:a}=Ie();I(r,()=>a());let o=H();return t({instance:o}),(e,t)=>(L(),B(`TresMesh`,st({ref_key:`tubeRef`,ref:o},e.$attrs),[V(`TresTubeGeometry`,{args:U(r)},null,8,Rq),Mn(e.$slots,`default`,{},()=>[V(`TresMeshBasicMaterial`,{color:U(i)},null,8,zq)])],16))}}),Vq=R({__name:`Align`,props:{top:{type:Boolean},right:{type:Boolean},bottom:{type:Boolean},left:{type:Boolean},front:{type:Boolean},back:{type:Boolean},disable:{type:Boolean},disableX:{type:Boolean},disableY:{type:Boolean},disableZ:{type:Boolean},precise:{type:Boolean,default:!0},onAlign:{},cacheKey:{default:void 0}},setup(e,{expose:t}){let n=e,r=H(),i=H(),a=H(),o=new Ke,s=new P,c=new Oe;function l(){if(!i.value||!a.value||!r.value)return;i.value.matrixWorld.identity(),o.setFromObject(a.value,n.precise);let e=o.max.x-o.min.x,t=o.max.y-o.min.y,l=o.max.z-o.min.z;o.getCenter(s),o.getBoundingSphere(c);let u=n.top?t/2:n.bottom?-t/2:0,d=n.left?-e/2:n.right?e/2:0,f=n.front?l/2:n.back?-l/2:0;i.value.position.set(n.disable||n.disableX?0:-s.x+d,n.disable||n.disableY?0:-s.y+u,n.disable||n.disableZ?0:-s.z+f),typeof n.onAlign<`u`&&n.onAlign({parent:r.value.parent,container:r.value,width:e,height:t,depth:l,boundingBox:o,boundingSphere:c,center:s,verticalAlignment:u,horizontalAlignment:d,depthAlignment:f})}let u=null,d=null,f=ie();return An(()=>{u?.(),u=null;let e=gn(n.cacheKey);e===d&&d!=null||(d=e,n.cacheKey===null||n.cacheKey===void 0?u=f.onBeforeRender(()=>{l()}).off:l())}),t({instance:r,update:l}),(e,t)=>(L(),B(`TresGroup`,{ref_key:`ref`,ref:r},[V(`TresGroup`,{ref_key:`outer`,ref:i},[V(`TresGroup`,{ref_key:`inner`,ref:a},[Mn(e.$slots,`default`)],512)],512)],512))}}),Hq=[`receive-shadow`,`rotation`],Uq=[`args`],Wq=R({__name:`Backdrop`,props:{floor:{default:.25},segments:{default:20},receiveShadow:{type:Boolean,default:!1}},setup(e,{expose:t}){let n=e,r=e=>e===0?0:2**(10*e-10),{floor:i,segments:a,receiveShadow:o}=zn(n),s=z(null);I([a,i,s],([e,t,n])=>{if(!n||e===null)return;let i=0,a=e/e/2,o=n.attributes.position;for(let n=0;n(L(),B(`TresGroup`,st({ref_key:`backdropRef`,ref:c},e.$attrs),[V(`TresMesh`,{"receive-shadow":U(o),rotation:[-Math.PI/2,0,Math.PI/2]},[V(`TresPlaneGeometry`,{ref_key:`planeRef`,ref:s,args:[1,1,U(a),U(a)]},null,8,Uq),Mn(e.$slots,`default`,{},()=>[t[0]||=V(`TresMeshStandardMaterial`,{color:8421504,side:2},null,-1)])],8,Hq)],16))}}),Gq=[`object`],Kq=R({__name:`ContactShadows`,props:{opacity:{default:1},blur:{default:1},color:{default:`#000000`},tint:{default:void 0},scale:{default:10},width:{default:1},height:{default:1},far:{default:10},smooth:{type:Boolean,default:!0},resolution:{default:512},frames:{default:1/0},depthWrite:{type:Boolean,default:!1}},setup(e,{expose:t}){let n=e;function r(e,t,n){n.blurPlane.visible=!0,n.blurPlane.material=n.horizontalBlurMaterial,n.horizontalBlurMaterial.uniforms.tDiffuse.value=n.renderTarget.texture,n.horizontalBlurMaterial.uniforms.h.value=e/256,t.setRenderTarget(n.renderTargetBlur),t.render(n.blurPlane,n.shadowCamera),n.blurPlane.material=n.verticalBlurMaterial,n.verticalBlurMaterial.uniforms.tDiffuse.value=n.renderTargetBlur.texture,n.verticalBlurMaterial.uniforms.v.value=e/256,t.setRenderTarget(n.renderTarget),t.render(n.blurPlane,n.shadowCamera),n.blurPlane.visible=!1}function i(e,t,n,i){let{renderTarget:a,shadowCamera:o,depthMaterial:s}=i,c=t.background;t.background=null,t.overrideMaterial=s;let l=n.getClearAlpha();n.setClearAlpha(0),n.setRenderTarget(a),n.render(t,o),t.overrideMaterial=null,r(e.blur,n,i),e.smooth&&r(e.blur*.4,n,i),n.setRenderTarget(null),n.setClearAlpha(l),t.background=c}function a(e){let t=new le,n=new qe(e.resolution,e.resolution);n.texture.generateMipmaps=!1;let r=new qe(e.resolution,e.resolution);r.texture.generateMipmaps=!1;let i=new ge(e.width,e.height).rotateX(Math.PI/2),a=new nn({map:n.texture,opacity:e.opacity,transparent:!0,depthWrite:e.depthWrite,color:new ot(e.color??`black`)}),o=new F(i,a);t.add(o),o.scale.y=-1;let s=new F(i);s.visible=!1,t.add(s);let c=new Pt(-e.width/2,e.width/2,e.height/2,-e.height/2,0,.3);c.rotation.x=Math.PI/2,t.add(c);let l=new Vt,u=new ct(AV);u.depthTest=!1;let d=new ct(jV);return d.depthTest=!1,{renderTarget:n,renderTargetBlur:r,shadowCamera:c,depthMaterial:l,horizontalBlurMaterial:u,verticalBlurMaterial:d,shadowGroup:t,plane:o,blurPlane:s}}function o(e,t){let n=t.shadowCamera;n.left=-e.width/2,n.right=e.width/2,n.top=e.height/2,n.bottom=-e.height/2,n.far=e.far;let r=e.width*(Array.isArray(e.scale)?e.scale[0]:e.scale||1),i=e.height*(Array.isArray(e.scale)?e.scale[1]:e.scale||1);t.shadowGroup.scale.set(r,e.far,i)}function s(e,t){t.renderTarget.dispose(),t.renderTargetBlur.dispose(),t.renderTarget=new qe(e,e),t.renderTarget.texture.generateMipmaps=!1,t.renderTargetBlur=new qe(e,e),t.renderTargetBlur.texture.generateMipmaps=!1,t.plane.material.map=t.renderTarget.texture}function c(e,t){t.plane.material.color=new ot(e.color??`black`),t.depthMaterial.dispose(),t.depthMaterial=new Vt,t.depthMaterial.onBeforeCompile=function(t){let n=e.tint?new ot(e.tint):new ot(`white`),{r,g:i,b:a}=n,o=t.fragmentShader.replace(`gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );`,`gl_FragColor = vec4( ${r}, ${i}, ${a}, ( 1.0 - fragCoordZ ) * opacity);`);t.fragmentShader=o}}let{onBeforeRender:l}=ie(),u=a(n),d=0,f=()=>d=d>=n.frames?n.frames-1:d;return l(({renderer:e,scene:t,invalidate:r})=>{d[n.opacity,n.depthWrite,n.blur,n.smooth],()=>{u.plane.material.opacity=n.opacity??1,u.plane.material.depthWrite=n.depthWrite??!1,f()},{immediate:!0}),I(()=>[n.color,n.tint],()=>{c(n,u),f()},{immediate:!0}),I(()=>[n.resolution],()=>{s(n.resolution,u),f()}),I(()=>[n.width,n.height,n.scale,n.far],()=>{o(n,u),f()},{immediate:!0}),On(()=>{for(let e of Object.values(u))e&&`dispose`in e&&typeof e.dispose==`function`&&e.dispose()}),t({instance:u.shadowGroup}),(e,t)=>(L(),B(`primitive`,{object:U(u).shadowGroup},null,8,Gq))}}),qq=R({__name:`Fit`,props:{into:{default:()=>new Ke(new P(-.5,-.5,-.5),new P(.5,.5,.5))},precise:{type:Boolean,default:!1}},setup(e,{expose:t}){let n=e,{invalidate:r}=Ie(),i=H(new le),a=H(new le);function o(e,t){if(i.value.position.set(0,0,0),i.value.updateMatrixWorld(),a.value.scale.set(1,1,1),a.value.updateMatrixWorld(),!a.value.children.length||e===null)return;let{box3:n,use:o}=s(e,t),c=new Ke;a.value.children.forEach(e=>c.expandByObject(e,t));let l=c.getSize(new P),u=n.getSize(new P),d=Math.min(u.x/l.x,u.y/l.y,u.z/l.z);a.value.scale.setScalar(d===1/0?1:d),a.value.updateMatrixWorld();let f=i.value.worldToLocal(c.getCenter(new P));if(o.position){let e=i.value.worldToLocal(n.getCenter(new P));i.value.position.copy(e.sub(f.multiplyScalar(d)))}else i.value.position.copy(f.sub(f.multiplyScalar(d)));r()}function s(e,t){return typeof e==`number`?e=new P(e,e,e):Array.isArray(e)&&(e=new P(...e)),e&&`isVector3`in e&&e.isVector3?{box3:new Ke(new P(0,0,0),e),use:{position:!1}}:e&&`isBox3`in e&&e.isBox3?{box3:e,use:{position:!0}}:e&&`isObject3D`in e&&e.isObject3D?{box3:new Ke().setFromObject(e,t??!1),use:{position:!0}}:{box3:new Ke(new P(-.5,-.5,-.5),new P(.5,.5,.5)),use:{position:!0}}}I(()=>[n.into,n.precise],()=>o(n.into,n.precise)),pn(()=>{o(n.into,n.precise),mn().then(()=>{o(n.into,n.precise)})});let c=H();return t({instance:c,fit:(e=new Ke(new P(-.5,-.5,-.5),new P(.5,.5,.5)),t=!1)=>{o(e,t)},update:()=>o(n.into,n.precise)}),(e,t)=>(L(),B(`TresGroup`,{ref_key:`outer`,ref:c},[V(`TresGroup`,{ref_key:`middle`,ref:i},[V(`TresGroup`,{ref_key:`inner`,ref:a},[Mn(e.$slots,`default`)],512)],512)],512))}}),Jq=[`side`,`cell-size`,`section-size`,`cell-color`,`section-color`,`cell-thickness`,`section-thickness`,`fade-distance`,`fade-strength`,`fade-from`,`infinite-grid`,`follow-camera`],Yq=[`args`],Xq=R({__name:`Grid`,props:{cellSize:{default:.5},cellThickness:{default:.5},cellColor:{default:`#000000`},sectionSize:{default:1},sectionThickness:{default:1},sectionColor:{default:`#0000ff`},followCamera:{type:Boolean,default:!1},infiniteGrid:{type:Boolean,default:!1},fadeDistance:{default:100},fadeStrength:{default:1},fadeFrom:{default:1},side:{default:xt},args:{}},setup(e){let t=e,n=JR({cellSize:.5,sectionSize:1,fadeDistance:100,fadeStrength:1,fadeFrom:1,cellThickness:.5,sectionThickness:1,cellColor:new ot,sectionColor:new ot,infiniteGrid:!1,followCamera:!1,worldCamProjPosition:new P,worldPlanePosition:new P},` - varying vec3 localPosition; - varying vec4 worldPosition; - - uniform vec3 worldCamProjPosition; - uniform vec3 worldPlanePosition; - uniform float fadeDistance; - uniform bool infiniteGrid; - uniform bool followCamera; - - void main() { - localPosition = position.xzy; - if (infiniteGrid) localPosition *= 1.0 + fadeDistance; - - worldPosition = modelMatrix * vec4(localPosition, 1.0); - if (followCamera) { - worldPosition.xyz += (worldCamProjPosition - worldPlanePosition); - localPosition = (inverse(modelMatrix) * worldPosition).xyz; - } - - gl_Position = projectionMatrix * viewMatrix * worldPosition; - } - `,` - varying vec3 localPosition; - varying vec4 worldPosition; - - uniform vec3 worldCamProjPosition; - uniform float cellSize; - uniform float sectionSize; - uniform vec3 cellColor; - uniform vec3 sectionColor; - uniform float fadeDistance; - uniform float fadeStrength; - uniform float fadeFrom; - uniform float cellThickness; - uniform float sectionThickness; - - float getGrid(float size, float thickness) { - vec2 r = localPosition.xz / size; - vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r); - float line = min(grid.x, grid.y) + 1.0 - thickness; - return 1.0 - min(line, 1.0); - } - - void main() { - float g1 = getGrid(cellSize, cellThickness); - float g2 = getGrid(sectionSize, sectionThickness); - - vec3 from = worldCamProjPosition*vec3(fadeFrom); - float dist = distance(from, worldPosition.xyz); - float d = 1.0 - min(dist / fadeDistance, 1.0); - vec3 color = mix(cellColor, sectionColor, min(1.0, sectionThickness * g2)); - - gl_FragColor = vec4(color, (g1 + g2) * pow(d, fadeStrength)); - gl_FragColor.a = mix(0.75 * gl_FragColor.a, gl_FragColor.a, g2); - if (gl_FragColor.a <= 0.0) discard; - - #include - #include - } - `);ce({GridMaterial:n});let r=H(new F),i=new Me,a=new P(0,1,0),o=new P(0,0,0);return ie().onBeforeRender(e=>{i.setFromNormalAndCoplanarPoint(a,o).applyMatrix4(r.value.matrixWorld);let t=r.value.material,n=t.uniforms.worldCamProjPosition,s=t.uniforms.worldPlanePosition;i.projectPoint(e.camera.position,n.value),s.value.set(0,0,0).applyMatrix4(r.value.matrixWorld)}),(e,n)=>(L(),B(`TresMesh`,{ref_key:`ref`,ref:r,"frustum-culled":!1},[V(`TresGridMaterial`,{transparent:!0,"extensions-derivatives":!0,side:t.side,"cell-size":t.cellSize,"section-size":t.sectionSize,"cell-color":t.cellColor,"section-color":t.sectionColor,"cell-thickness":t.cellThickness,"section-thickness":t.sectionThickness,"fade-distance":t.fadeDistance,"fade-strength":t.fadeStrength,"fade-from":t.fadeFrom,"infinite-grid":t.infiniteGrid,"follow-camera":t.followCamera},null,8,Jq),V(`TresPlaneGeometry`,{args:t.args},null,8,Yq)],512))}}),Zq=[`rotation-x`,`args`],Qq=R({__name:`Ocean`,props:{textureWidth:{default:512},textureHeight:{default:512},waterNormals:{default:`https://raw.githubusercontent.com/Tresjs/assets/main/textures/water-normals/Water_1_M_Normal.jpg`},sunDirection:{default:()=>new P},sunColor:{default:16777215},waterColor:{default:7695},distortionScale:{default:3.7},size:{default:1},clipBias:{default:0},alpha:{default:1},side:{default:ln}},async setup(e,{expose:t}){let n,r,i=e,{textureWidth:a,textureHeight:o,waterNormals:s,sunDirection:c,sunColor:l,waterColor:u,distortionScale:d,size:f,clipBias:p,alpha:m,side:h}=zn(i),{extend:g,scene:_}=Ie();g({Water:FB});let v=H(),y=H(),b=_.value.fog!==void 0;t({instance:v}),_.value.traverse(e=>{Object.prototype.hasOwnProperty.call(e,`isSky`)&&(y.value=e)}),pn(async()=>{if(await mn(),y.value){let e=y.value.material.uniforms.sunPosition.value;v.value.material.uniforms.sunDirection.value.copy(e)}});let{normalMap:x}=([n,r]=Pn(()=>ae({normalMap:s.value})),n=await n,r(),n);x.wrapS=x.wrapT=Ve;let{onBeforeRender:S}=ie();return S(({delta:e,invalidate:t})=>{v.value.material.uniforms.time.value+=e,t()}),(e,t)=>(L(),B(`TresWater`,{ref_key:`waterRef`,ref:v,"rotation-x":-Math.PI/2,args:[void 0,{textureWidth:U(a),textureHeight:U(o),waterNormals:U(x),sunDirection:U(c),sunColor:U(l),waterColor:U(u),distortionScale:U(d),fog:b,size:U(f),clipBias:U(p),alpha:U(m),side:U(h)}]},[Mn(e.$slots,`default`,{},()=>[t[0]||=V(`TresPlaneGeometry`,{args:[1e4,1e4]},null,-1)])],8,Zq))}}),$q=[`size`,`color`,`alpha-map`,`map`,`opacity`,`alpha-test`,`depth-write`,`transparent`,`size-attenuation`],eJ=[`position`,`velocity`],tJ=R({__name:`Precipitation`,props:{size:{default:.1},area:{default:()=>[10,10,20]},color:{default:16777215},map:{},alphaMap:{},alphaTest:{default:.01},opacity:{default:.8},count:{default:5e3},speed:{default:.1},randomness:{default:.5},depthWrite:{type:Boolean,default:!1},transparent:{type:Boolean,default:!0},sizeAttenuation:{type:Boolean,default:!0}},setup(e,{expose:t}){let n=e,{size:r,area:i,color:a,alphaMap:o,map:s,opacity:c,alphaTest:l,depthWrite:u,transparent:d,sizeAttenuation:f,count:p,speed:m,randomness:h}=zn(n),g=H(),_=[],v=[],y=()=>{_=new Float32Array(p.value*3);for(let e=0;e{v=new Float32Array(p.value*2);for(let e=0;e{b(),y()});let x=H(null),S=H(null);An(async()=>{An(async()=>{if(typeof o.value==`string`){let e=await ae({alphaMap:o.value});x.value=e.alphaMap}else x.value=o.value??null;if(typeof s.value==`string`){let e=await ae({map:s.value});S.value=e.map}else S.value=s.value??null})});let{onBeforeRender:C}=ie();C(({invalidate:e})=>{var t,n;if((t=g.value)!=null&&t.attributes.position.array&&(n=g.value)!=null&&n.attributes.position.count){let t=g.value.attributes.position.array;for(let e=0;e=i.value[0]/2)&&(t[e*3]=t[e*3]*-1),(t[e*3+1]<=-i.value[1]/2||t[e*3+1]>=i.value[1]/2)&&(t[e*3+1]=t[e*3+1]*-1)}g.value.attributes.position.needsUpdate=!0,e()}});let w=H();return t({instance:w}),(e,t)=>(L(),B(`TresPoints`,{ref_key:`pointsRef`,ref:w},[V(`TresPointsMaterial`,{size:U(r),color:U(a),"alpha-map":x.value,map:S.value,opacity:U(c),"alpha-test":U(l),"depth-write":U(u),transparent:U(d),"size-attenuation":U(f)},null,8,$q),V(`TresBufferGeometry`,{ref_key:`geometryRef`,ref:g,position:[U(_),3],velocity:[U(v)]},null,8,eJ)],512))}}),nJ=[`object`,`material-uniforms-turbidity-value`,`material-uniforms-rayleigh-value`,`material-uniforms-mieCoefficient-value`,`material-uniforms-mieDirectionalG-value`,`material-uniforms-sunPosition-value`,`scale`],rJ=R({__name:`Sky`,props:{turbidity:{default:3.4},rayleigh:{default:3},mieCoefficient:{default:.005},mieDirectionalG:{default:.7},elevation:{default:.6},azimuth:{default:180},distance:{default:45e4}},setup(e,{expose:t}){let n=e,{invalidate:r}=Ie();I(n,()=>r());let i=H(),a=new VB,o=In(()=>s(n.azimuth,n.elevation));function s(e,t){let n=Wt.degToRad(90-t),r=Wt.degToRad(e);return new P().setFromSphericalCoords(1,n,r)}return t({instance:i,sunPosition:o.value}),(e,t)=>(L(),B(`primitive`,{ref_key:`skyRef`,ref:i,object:U(a),"material-uniforms-turbidity-value":n.turbidity,"material-uniforms-rayleigh-value":n.rayleigh,"material-uniforms-mieCoefficient-value":n.mieCoefficient,"material-uniforms-mieDirectionalG-value":n.mieDirectionalG,"material-uniforms-sunPosition-value":o.value,scale:n.distance},null,8,nJ))}}),iJ=[`position`],aJ=[`position`],oJ=[`scale`],sJ=[`map`,`depth-test`,`color-space`,`color`,`opacity`],cJ=R({__name:`Smoke`,props:{color:{default:`#ffffff`},opacity:{default:.5},speed:{default:.4},width:{default:10},depth:{default:1.5},segments:{default:20},texture:{default:`https://raw.githubusercontent.com/Tresjs/assets/main/textures/clouds/defaultCloud.png`},depthTest:{type:Boolean,default:!0}},async setup(e,{expose:t}){let n,r,i=e,{width:a,depth:o,segments:s,texture:c,color:l,depthTest:u,opacity:d,speed:f}=zn(i),p=H(),m=H();t({instance:p});let h=[s].map((e,t)=>({x:a.value/2-Math.random()*a.value,y:a.value/2-Math.random()*a.value,scale:.4+Math.sin((t+1)/s.value*Math.PI)*((.2+Math.random())*10),density:Math.max(.2,Math.random()),rotation:Math.max(.002,.005*Math.random())*f.value})),g=(e,t)=>e/6*t*d.value,{map:_}=([n,r]=Pn(()=>ae({map:c.value})),n=await n,r(),n),{renderer:v,camera:y}=Ie(),b=In(()=>{var e;return(e=v.value)?.outputColorSpace}),{onBeforeRender:x}=ie();return x(({invalidate:e})=>{var t,n;p.value&&y.value&&m.value&&((t=m.value)==null||t.children.forEach((e,t)=>{e.rotation.z+=h[t].rotation}),p.value.lookAt((n=y.value)?.position),e())}),(e,t)=>(L(),B(`TresGroup`,st({ref_key:`smokeRef`,ref:p},e.$attrs),[V(`TresGroup`,{ref_key:`groupRef`,ref:m,position:[0,0,U(s)/2*U(o)]},[(L(!0),B(Fn,null,kn(U(h),({scale:e,x:t,y:n,density:r},i)=>(L(),B(`TresMesh`,{key:`${i}`,position:[t,n,-i*U(o)]},[V(`TresPlaneGeometry`,{scale:[e,e,e],rotation:[0,0,0]},null,8,oJ),V(`TresMeshStandardMaterial`,{map:U(_),"depth-test":U(u),"color-space":b.value,color:U(l),"depth-write":!1,transparent:``,opacity:g(e,r)},null,8,sJ)],8,aJ))),128))],8,iJ)],16))}}),lJ=` -return PCSS( shadowMap, shadowCoord ); -`,uJ=R({__name:`SoftShadows`,props:{size:{default:25},samples:{default:10},focus:{default:0}},setup(e){let t=e,n=({focus:e=0,size:t=25,samples:n=10}={})=>` -#define PENUMBRA_FILTER_SIZE float(${t}) -#define RGB_NOISE_FUNCTION(uv) (randRGB(uv)) -vec3 randRGB(vec2 uv) { - return vec3( - fract(sin(dot(uv, vec2(12.75613, 38.12123))) * 13234.76575), - fract(sin(dot(uv, vec2(19.45531, 58.46547))) * 43678.23431), - fract(sin(dot(uv, vec2(23.67817, 78.23121))) * 93567.23423) - ); -} - -vec3 lowPassRandRGB(vec2 uv) { - // 3x3 convolution (average) - // can be implemented as separable with an extra buffer for a total of 6 samples instead of 9 - vec3 result = vec3(0); - result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, -1.0)); - result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, 0.0)); - result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, +1.0)); - result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, -1.0)); - result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, 0.0)); - result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, +1.0)); - result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, -1.0)); - result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, 0.0)); - result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, +1.0)); - result *= 0.111111111; // 1.0 / 9.0 - return result; -} -vec3 highPassRandRGB(vec2 uv) { - // by subtracting the low-pass signal from the original signal, we're being left with the high-pass signal - // hp(x) = x - lp(x) - return RGB_NOISE_FUNCTION(uv) - lowPassRandRGB(uv) + 0.5; -} - - -vec2 vogelDiskSample(int sampleIndex, int sampleCount, float angle) { - const float goldenAngle = 2.399963f; // radians - float r = sqrt(float(sampleIndex) + 0.5f) / sqrt(float(sampleCount)); - float theta = float(sampleIndex) * goldenAngle + angle; - float sine = sin(theta); - float cosine = cos(theta); - return vec2(cosine, sine) * r; -} -float penumbraSize( const in float zReceiver, const in float zBlocker ) { // Parallel plane estimation - return (zReceiver - zBlocker) / zBlocker; -} -float findBlocker(sampler2D shadowMap, vec2 uv, float compare, float angle) { - float texelSize = 1.0 / float(textureSize(shadowMap, 0).x); - float blockerDepthSum = float(${e}); - float blockers = 0.0; - - int j = 0; - vec2 offset = vec2(0.); - float depth = 0.; - - #pragma unroll_loop_start - for(int i = 0; i < ${n}; i ++) { - offset = (vogelDiskSample(j, ${n}, angle) * texelSize) * 2.0 * PENUMBRA_FILTER_SIZE; - depth = unpackRGBAToDepth( texture2D( shadowMap, uv + offset)); - if (depth < compare) { - blockerDepthSum += depth; - blockers++; - } - j++; - } - #pragma unroll_loop_end - - if (blockers > 0.0) { - return blockerDepthSum / blockers; - } - return -1.0; -} - - -float vogelFilter(sampler2D shadowMap, vec2 uv, float zReceiver, float filterRadius, float angle) { - float texelSize = 1.0 / float(textureSize(shadowMap, 0).x); - float shadow = 0.0f; - int j = 0; - vec2 vogelSample = vec2(0.0); - vec2 offset = vec2(0.0); - #pragma unroll_loop_start - for (int i = 0; i < ${n}; i++) { - vogelSample = vogelDiskSample(j, ${n}, angle) * texelSize; - offset = vogelSample * (1.0 + filterRadius * float(${t})); - shadow += step( zReceiver, unpackRGBAToDepth( texture2D( shadowMap, uv + offset ) ) ); - j++; - } - #pragma unroll_loop_end - return shadow * 1.0 / ${n}.0; -} - -float PCSS (sampler2D shadowMap, vec4 coords) { - vec2 uv = coords.xy; - float zReceiver = coords.z; // Assumed to be eye-space z in this code - float angle = highPassRandRGB(gl_FragCoord.xy).r * PI2; - float avgBlockerDepth = findBlocker(shadowMap, uv, zReceiver, angle); - if (avgBlockerDepth == -1.0) { - return 1.0; - } - float penumbraRatio = penumbraSize(zReceiver, avgBlockerDepth); - return vogelFilter(shadowMap, uv, zReceiver, 1.25 * penumbraRatio, angle); -}`,r=Le.shadowmap_pars_fragment,{renderer:i,scene:a,camera:o}=j();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 )`),Le.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 On(()=>{o.value&&(Le.shadowmap_pars_fragment=r,c(i.value,a.value,o.value))}),I(t,()=>{o.value&&(s(i.value,t),c(i.value,a.value,o.value))},{immediate:!0}),(e,t)=>(L(),B(`TresGroup`))}});var dJ=class extends N{constructor(){super(),dR(this,`virtualScene`,null),this.virtualScene=new Zt}add(...e){return this.virtualScene.add(...e),this}dispose(){this.virtualScene.traverse(e=>{e instanceof F&&(e.geometry.dispose(),e.material.dispose(),e.material.map&&e.material.map.dispose(),this.virtualScene.remove(e))}),this.virtualScene=null}};const fJ=R({__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=z(null);t({texture:a});let{extend:o,renderer:s,scene:c}=Ie();o({EnvironmentScene:dJ});let l=null,u=z(null),d=null,f=z(null),p=([n,r]=Pn(()=>DU(i,u)),n=await n,r(),n),{onBeforeRender:m}=ie(),h=1;m(()=>{if(d&&f.value&&u.value&&(i.frames===1/0||h{if(e&&t!=null&&t.virtualScene){let n=Vn(t).virtualScene,r=n.children.find(e=>e instanceof F&&e.userData.isEnvironment);r||(r=new F(new tn(1,1,1),new nn({side:xt})),r.userData.isEnvironment=!0,n.add(r)),n.background=e,n.backgroundBlurriness=i.blur}},{immediate:!0});let g=e=>{e&&l!=null&&l.length?(c.value.environment=e.texture,i.background&&(c.value.background=e.texture)):p.value&&(c.value.environment=p.value,i.background&&(c.value.background=p.value))};return I(p,()=>{u.value&&g(u.value)},{immediate:!0,deep:!0}),I(()=>Rt().default,e=>{var t;if(e&&(l=e(),Array.isArray(l)&&l.length>0)){o({EnvironmentScene:dJ}),u.value=new lt(i.resolution),u.value.texture.type=vt,d=new Yt(i.near,i.far,u.value),g(u.value);return}(t=u.value)==null||t.dispose(),u.value=null,g()},{immediate:!0,deep:!0}),a.value=p.value,On(()=>{var e,t;(e=f.value)==null||e.dispose(),(t=u.value)==null||t.dispose()}),(e,t)=>u.value?(L(),B(`TresEnvironmentScene`,{key:0,ref_key:`environmentScene`,ref:f},[Mn(e.$slots,`default`)],512)):hn(``,!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=R({__name:`index`,props:{args:{default:null},form:{default:`rect`},toneMapped:{type:Boolean,default:!1},map:{default:null},intensity:{default:1},color:{default:new ot(16777215)}},setup(e,{expose:t}){let n=e,r=z(),i=z();return An(()=>{r.value&&(r.value.color.copy(new ot(n.color)),r.value.color.multiplyScalar(n.intensity),r.value.needsUpdate=!0)}),t({mesh:i}),(e,t)=>(L(),B(`TresMesh`,{ref_key:`mesh`,ref:i},[e.form===`circle`?(L(),B(`TresRingGeometry`,pJ)):e.form===`ring`?(L(),B(`TresRingGeometry`,mJ)):e.form===`rect`?(L(),B(`TresPlaneGeometry`,hJ)):(L(),jn(n.form,{key:3,args:e.args},null,8,[`args`])),V(`TresMeshBasicMaterial`,{ref_key:`material`,ref:r,"tone-mapped":e.toneMapped,map:e.map,side:U(jt),color:e.color},null,8,gJ)],512))}});var vJ=R({__name:`Model`,props:{model:{},idleAnimation:{},loadAnimations:{},position:{},paused:{type:Boolean}},emits:[`loadModelProgress`,`error`],setup(s,{expose:c,emit:l}){let u=s,d=l,f,p=z(),m=z(),{scene:h}=Ie(),{onBeforeRender:g}=ie(),_=i(),v=a(),y=z();I(()=>u.position,([e,t,n])=>{p.value&&p.value.scene.position.set(e,t,n)}),pn(async()=>{if(h.value)try{let i=await t(u.model,{scene:h.value,lookAt:!0,position:u.position,onProgress:e=>d(`loadModelProgress`,Number.parseFloat((100*(e.loaded/e.total)).toFixed(2)))});if(!i){console.warn(`No VRM model loaded`);return}let a=await n(u.idleAnimation),o=await r(i,a);if(!o){console.warn(`No VRM animation loaded`);return}m.value=new qt(i.scene),m.value.clipAction(o).play(),y.value=e(i),p.value=i,f=g(({delta:e})=>{m.value?.update(e),p.value?.update(e),_.update(p.value,e),v.update(p.value,e),y.value?.update(e)}).off}catch(e){d(`error`,e)}}),On(()=>{f?.(),p.value&&(p.value.scene.removeFromParent(),o.deepDispose(p.value.scene))}),c({setExpression(e){y.value?.setEmotionWithResetAfter(e,1e3)}});let{pause:b,resume:x}=ie();return I(()=>u.paused,e=>{e?b():x()}),(e,t)=>Mn(e.$slots,`default`)}}),yJ=vJ;const bJ=[`position`],xJ={absolute:``,bottom:`3`,right:`3`},SJ={flex:`~ row`,"cursor-pointer":``},CJ=[`checked`,`aria-checked`],wJ={key:0,"min-w":`50vw`,z:`{f.value?.setExpression(e)}}),(e,t)=>(L(),jn(T,{relative:``},{default:En(({height:e,width:n})=>[dn(U(M),{alpha:!0,antialias:!0,width:n,height:e},{default:En(()=>[dn(U(jW)),V(`TresPerspectiveCamera`,{position:[o.value,s.value,c.value]},null,8,bJ),t[14]||=V(`TresDirectionalLight`,{color:16777215,intensity:1.2,position:[1,1,1]},null,-1),t[15]||=V(`TresAmbientLight`,{color:16777215,intensity:1.5},null,-1),dn(yJ,{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`]),V(`div`,xJ,[V(`div`,SJ,[V(`label`,{class:bn([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":``},[Nn(V(`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,CJ),[[Lt,a.value]]),t[16]||=V(`div`,{"select-none":``},[V(`div`,{"i-solar:bug-bold-duotone":``})],-1)],2)]),dn(U(D),null,{default:En(()=>[a.value?(L(),B(`div`,wJ,[V(`div`,TJ,[V(`div`,EJ,[V(`span`,null,yn(U(p)(`stage.viewers.debug-menu.vrm.model.title`)),1)]),dn(E,{"h-fit":``,"w-full":``,flex:`~ col`,border:`~ gray/25 rounded-lg`,divide:`y dashed gray/25`,"of-clip":``,"shadow-sm":``},{label:En(()=>[V(`span`,DJ,yn(U(p)(`stage.viewers.debug-menu.vrm.camera`)),1)]),default:En(()=>[V(`div`,OJ,[t[17]||=V(`div`,{text:`neutral-400 dark:neutral-500`},[V(`span`,null,`X`)],-1),V(`label`,kJ,[dn(er,{modelValue:o.value,"onUpdate:modelValue":t[3]||=e=>o.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),V(`div`,AJ,[V(`span`,null,yn(o.value),1)]),t[18]||=V(`div`,{text:`neutral-400 dark:neutral-500`},[V(`span`,null,`Y`)],-1),V(`label`,jJ,[dn(er,{modelValue:s.value,"onUpdate:modelValue":t[4]||=e=>s.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),V(`div`,MJ,[V(`span`,null,yn(s.value),1)]),t[19]||=V(`div`,{text:`neutral-400 dark:neutral-500`},[V(`span`,null,`Z`)],-1),V(`label`,NJ,[dn(er,{modelValue:c.value,"onUpdate:modelValue":t[5]||=e=>c.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),V(`div`,PJ,[V(`span`,null,yn(c.value),1)])])]),_:1}),dn(E,{"h-fit":``,"w-full":``,flex:`~ col`,border:`~ gray/25 rounded-lg`,divide:`y dashed gray/25`,"of-clip":``,"shadow-sm":``},{label:En(()=>[V(`span`,FJ,yn(U(p)(`stage.viewers.debug-menu.vrm.model.title`)),1)]),default:En(()=>[V(`div`,IJ,[t[20]||=V(`div`,{text:`neutral-400 dark:neutral-500`},[V(`span`,null,`X`)],-1),V(`label`,LJ,[dn(er,{modelValue:l.value,"onUpdate:modelValue":t[6]||=e=>l.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),V(`div`,RJ,[V(`span`,null,yn(l.value),1)]),t[21]||=V(`div`,{text:`neutral-400 dark:neutral-500`},[V(`span`,null,`Y`)],-1),V(`label`,zJ,[dn(er,{modelValue:u.value,"onUpdate:modelValue":t[7]||=e=>u.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),V(`div`,BJ,[V(`span`,null,yn(u.value),1)]),t[22]||=V(`div`,{text:`neutral-400 dark:neutral-500`},[V(`span`,null,`Z`)],-1),V(`label`,VJ,[dn(er,{modelValue:d.value,"onUpdate:modelValue":t[8]||=e=>d.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),V(`div`,HJ,[V(`span`,null,yn(d.value),1)])])]),_:1}),V(`div`,UJ,[V(`span`,null,yn(U(p)(`stage.viewers.debug-menu.emotions`)),1)]),V(`div`,WJ,[V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[9]||=e=>f.value?.setExpression(`neutral`)},yn(U(p)(`stage.viewers.debug-menu.emotions-btn.neutral`)),1),V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[10]||=e=>f.value?.setExpression(`surprised`)},yn(U(p)(`stage.viewers.debug-menu.emotions-btn.surprised`)),1),V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[11]||=e=>f.value?.setExpression(`sad`)},yn(U(p)(`stage.viewers.debug-menu.emotions-btn.sad`)),1),V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[12]||=e=>f.value?.setExpression(`angry`)},yn(U(p)(`stage.viewers.debug-menu.emotions-btn.angry`)),1),V(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[13]||=e=>f.value?.setExpression(`happy`)},yn(U(p)(`stage.viewers.debug-menu.emotions-btn.happy`)),1)])])])):hn(``,!0)]),_:1})])]),_:1}))}}),KJ=GJ;const qJ={relative:``},JJ={"h-full":``,"w-full":``};var YJ=R({__name:`Stage`,props:{paused:{type:Boolean,default:!1},focusAt:{},xOffset:{},yOffset:{},scale:{default:1}},setup(e){let t=z(),n=z(),{stageView:r}=x(qn()),{mouthOpenSize:i}=x(h()),{audioContext:a,calculateVolume:o}=m(),{onBeforeMessageComposed:s,onBeforeSend:c,onTokenLiteral:l,onTokenSpecial:_,onStreamEnd:y,onAssistantResponseEnd:b}=Yn(),S=Zn(),C=z(),w=z(!1),T=z(!1),E=p({handlers:[e=>new Promise(t=>{let n=a.createBufferSource();n.buffer=e.data.audioBuffer,n.connect(a.destination),n.connect(C.value),w.value=!0,n.start(0),n.onended=()=>{w.value=!1,t()}})]}),D=Xn(),{ssmlEnabled:ne,activeSpeechProvider:k,activeSpeechModel:A,activeSpeechVoice:re,pitch:j}=x(D);async function ie(e){try{if(!k.value){console.warn(`No active speech provider configured`);return}if(!re.value){console.warn(`No active speech voice configured`);return}let t=S.getProviderInstance(k.value);if(!t){console.error(`Failed to initialize speech provider`);return}let n=S.getProviderConfig(k.value),r=ne.value?D.generateSSML(e.data,re.value,{...n,pitch:j.value}):e.data,i=await g({...t.speech(A.value,n),input:r,voice:re.value.id}),o=await a.decodeAudioData(i);await E.add({audioBuffer:o,text:e.data})}catch(e){console.error(`Speech generation failed:`,e)}}let ae=p({handlers:[ie]});ae.on(`add`,e=>{console.debug(`ttsQueue added`,e)});let oe=u(ae),{currentMotion:se}=x(Jn()),M=p({handlers:[async e=>{if(r.value===`3d`){let t=v[e.data];if(!t)return;await n.value.setExpression(t)}else r.value===`2d`&&(se.value={group:te[e.data]})}]}),ce=d(M);ce.onHandlerEvent(`emotion`,e=>{console.debug(`emotion detected`,e)});let N=f();N.onHandlerEvent(`delay`,e=>{console.debug(`delay detected`,e)});function le(){requestAnimationFrame(le),w.value&&(i.value=o(C.value,`linear`))}function ue(){T.value||(le(),a.resume(),T.value=!0)}function de(){C.value||=a.createAnalyser()}return s(async()=>{de(),ue()}),c(async()=>{se.value={group:ee}}),l(async e=>{await oe.add(e)}),_(async e=>{await N.add(e),await ce.add(e)}),y(async()=>{await N.add(O)}),b(async e=>{}),On(()=>{T.value=!1}),pn(async()=>{t.value=cR({connection:{bundles:Qn()}}),await t.value.execute(`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(e,t)=>(L(),B(`div`,qJ,[V(`div`,JJ,[U(r)===`2d`?(L(),jn(Ph,{key:0,"focus-at":e.focusAt,"mouth-open-size":U(i),"min-w":`50% i.map(i=>d[i]); +import{D as e,E as t,F as n,G as r,H as i,I as a,J as o,K as s,L as c,M as l,N as u,O as d,P as f,Q as p,V as m,W as h,X as g,a3 as _,a8 as v,aA as y,aB as b,aK as x,aL as S,aQ as C,aR as w,aY as T,ag as E,ar as D,av as O,ax as k,ay as A,b$ as j,b1 as M,b2 as N,b4 as ee,b5 as P,b6 as F,b7 as I,b8 as L,b9 as R,bA as z,bB as te,bC as B,bD as ne,bE as re,bF as ie,bG as ae,bH as oe,bI as se,bJ as ce,bK as le,bL as ue,bM as de,bN as fe,bO as pe,bP as me,bQ as he,bR as ge,bS as _e,bT as ve,bU as ye,bV as be,bW as xe,bX as Se,bY as Ce,bZ as we,b_ as Te,ba as Ee,bb as De,bc as Oe,bd as ke,be as Ae,bf as je,bg as Me,bh as Ne,bi as Pe,bj as Fe,bk as Ie,bl as Le,bm as Re,bn as ze,bo as Be,bp as Ve,bq as He,br as Ue,bs as We,bt as Ge,bu as Ke,bv as qe,bw as Je,bx as Ye,by as Xe,bz as Ze,c0 as Qe,c1 as $e,c2 as et,c3 as tt,c4 as nt,c5 as rt,c6 as it,c7 as at,c8 as ot,c9 as st,cA as ct,cB as lt,cC as ut,cD as dt,cE as ft,cF as pt,cG as mt,cH as ht,cI as gt,cJ as _t,cK as vt,cL as yt,cM as bt,cN as xt,cO as St,cP as Ct,cQ as wt,cR as Tt,cS as Et,cT as Dt,cU as Ot,cW as kt,c_ as At,ca as jt,cb as Mt,cc as Nt,cd as Pt,ce as Ft,cf as V,cg as It,ch as Lt,ci as Rt,cj as zt,ck as Bt,cl as Vt,cm as Ht,cn as Ut,co as Wt,cp as Gt,cq as Kt,cr as qt,cs as Jt,ct as Yt,cu as Xt,cv as Zt,cw as Qt,cx as $t,cy as en,cz as tn,d1 as nn,d2 as rn,d3 as an,d4 as on,d5 as sn,d6 as cn,d7 as ln,d8 as un,dA as H,dB as dn,dC as fn,dD as pn,dE as mn,dF as hn,dG as gn,dH as _n,dI as vn,dJ as yn,dK as bn,dL as xn,dM as Sn,dN as Cn,da as U,db as wn,dc as Tn,dd as En,df as Dn,dg as On,dh as kn,dj as An,dk as jn,dl as Mn,dm as Nn,dn as Pn,do as Fn,dp as In,dq as W,ds as G,dt as Ln,du as Rn,dv as K,dw as zn,dx as Bn,dy as Vn,dz as Hn,q as Un,r as Wn,s as Gn,u as Kn,w as qn}from"./index-K-hxNScn.js";import{b as Jn}from"./import-url-browser-VKajNDYM.js";var Yn=an({__name:`Range`,props:{modelValue:{},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=H(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=jn(()=>s(a(n.modelValue,n.min,n.max),n.step)),l=jn(()=>{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 un(()=>{window.removeEventListener(`mousemove`,d),window.removeEventListener(`mouseup`,p)}),(e,t)=>(G(),cn(`span`,{ref_key:`sliderRef`,ref:i,class:_n([`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},[U(`span`,{style:vn(l.value),bg:`[#cabeff] dark:[#4e34b9]`,relative:``,block:``,"rounded-sm":``,h:`[14px]`},null,4),U(`span`,{role:`slider`,class:`slider-thumb`,style:vn({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))}}),Xn=Yn,Zn;(function(e){e[e.WEBGL_LEGACY=0]=`WEBGL_LEGACY`,e[e.WEBGL=1]=`WEBGL`,e[e.WEBGL2=2]=`WEBGL2`})(Zn||={});var Qn;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.WEBGL=1]=`WEBGL`,e[e.CANVAS=2]=`CANVAS`})(Qn||={});var $n;(function(e){e[e.COLOR=16384]=`COLOR`,e[e.DEPTH=256]=`DEPTH`,e[e.STENCIL=1024]=`STENCIL`})($n||={});var er;(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`})(er||={});var tr;(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`})(tr||={});var nr;(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`})(nr||={});var rr;(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`})(rr||={});var ir;(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`})(ir||={});var ar;(function(e){e[e.FLOAT=0]=`FLOAT`,e[e.INT=1]=`INT`,e[e.UINT=2]=`UINT`})(ar||={});var or;(function(e){e[e.NEAREST=0]=`NEAREST`,e[e.LINEAR=1]=`LINEAR`})(or||={});var sr;(function(e){e[e.CLAMP=33071]=`CLAMP`,e[e.REPEAT=10497]=`REPEAT`,e[e.MIRRORED_REPEAT=33648]=`MIRRORED_REPEAT`})(sr||={});var cr;(function(e){e[e.OFF=0]=`OFF`,e[e.POW2=1]=`POW2`,e[e.ON=2]=`ON`,e[e.ON_MANUAL=3]=`ON_MANUAL`})(cr||={});var lr;(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`})(lr||={});var ur;(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`})(ur||={});var dr;(function(e){e[e.AUTO=0]=`AUTO`,e[e.MANUAL=1]=`MANUAL`})(dr||={});var fr;(function(e){e.LOW=`lowp`,e.MEDIUM=`mediump`,e.HIGH=`highp`})(fr||={});var pr;(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`})(pr||={});var mr;(function(e){e[e.RED=1]=`RED`,e[e.GREEN=2]=`GREEN`,e[e.BLUE=4]=`BLUE`,e[e.ALPHA=8]=`ALPHA`})(mr||={});var hr;(function(e){e[e.NONE=0]=`NONE`,e[e.LOW=2]=`LOW`,e[e.MEDIUM=4]=`MEDIUM`,e[e.HIGH=8]=`HIGH`})(hr||={});var gr;(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`})(gr||={});var _r={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)}},vr=/iPhone/i,yr=/iPod/i,br=/iPad/i,xr=/\biOS-universal(?:.+)Mac\b/i,Sr=/\bAndroid(?:.+)Mobile\b/i,Cr=/Android/i,wr=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Tr=/Silk/i,Er=/Windows Phone/i,Dr=/\bWindows(?:.+)ARM\b/i,Or=/BlackBerry/i,kr=/BB10/i,Ar=/Opera Mini/i,jr=/\b(CriOS|Chrome)(?:.+)Mobile/i,Mr=/Mobile(?:.+)Firefox\b/i,Nr=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function Pr(e){return function(t){return t.test(e)}}function Fr(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=Pr(n),a={apple:{phone:i(vr)&&!i(Er),ipod:i(yr),tablet:!i(vr)&&(i(br)||Nr(t))&&!i(Er),universal:i(xr),device:(i(vr)||i(yr)||i(br)||i(xr)||Nr(t))&&!i(Er)},amazon:{phone:i(wr),tablet:!i(wr)&&i(Tr),device:i(wr)||i(Tr)},android:{phone:!i(Er)&&i(wr)||!i(Er)&&i(Sr),tablet:!i(Er)&&!i(wr)&&!i(Sr)&&(i(Tr)||i(Cr)),device:!i(Er)&&(i(wr)||i(Tr)||i(Sr)||i(Cr))||i(/\bokhttp\b/i)},windows:{phone:i(Er),tablet:i(Dr),device:i(Er)||i(Dr)},other:{blackberry:i(Or),blackberry10:i(kr),opera:i(Ar),firefox:i(Mr),chrome:i(jr),device:i(Or)||i(kr)||i(Ar)||i(Mr)||i(jr)},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 Ir=Fr(globalThis.navigator);function Lr(){return!Ir.apple.device}function Rr(e){var t=!0;if(Ir.tablet||Ir.phone){if(Ir.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(Ir.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 zr={ADAPTER:_r,MIPMAP_TEXTURES:cr.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:hr.NONE,SPRITE_MAX_TEXTURES:Rr(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:dr.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:sr.CLAMP,SCALE_MODE:or.LINEAR,PRECISION_VERTEX:fr.HIGH,PRECISION_FRAGMENT:Ir.apple.device?fr.HIGH:fr.MEDIUM,CAN_UPLOAD_SAME_BUFFER:Lr(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Br=yn((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}}),Hr=yn((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})(exports)}),Ur=yn((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)}),Wr=yn((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}}),Gr=yn((exports,t)=>{var n=Wr(),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=Ur(),r=Gr(),i=Wr(),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:``}}),qr=yn((exports,t)=>{var n=Gr(),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=Kr(),r=qr(),i=Wr();t.exports={formats:i,parse:r,stringify:n}}),Yr=yn(exports=>{var t=Hr();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},_=Jr();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),L=j.slice(E+1),R=N.match(p);R&&(I.push(R[1]),L.unshift(R[2])),L.length&&(b=`/`+L.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 z=this.port?`:`+this.port:``,te=this.hostname||``;this.host=te+z,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.format=y}),Xr=Cn(Br(),1),Zr=Cn(Vr(),1),Qr=Cn(Yr(),1),$r={parse:Qr.parse,format:Qr.format,resolve:Qr.resolve};zr.RETINA_PREFIX=/@([0-9\.]+)x/,zr.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var ei=!1,ti=`6.5.10`;function ni(e){var t;if(!ei){if(zr.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf(`chrome`)>-1){var n=[` + %c %c %c PixiJS `+ti+` - ✰ `+e+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ + +`,`background: #ff66a5; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`color: #ff66a5; background: #030307; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`background: #ffc3dc; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`];(t=globalThis.console).log.apply(t,n)}else globalThis.console&&globalThis.console.log(`PixiJS `+ti+` - `+e+` - http://www.pixijs.com/`);ei=!0}}var ri;function ii(){return ri===void 0&&(ri=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:zr.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!zr.ADAPTER.getWebGLRenderingContext())return!1;var t=zr.ADAPTER.createCanvas(),n=t.getContext(`webgl`,e)||t.getContext(`experimental-webgl`,e),r=!!(n&&n.getContextAttributes().stencil);if(n){var i=n.getExtension(`WEBGL_lose_context`);i&&i.loseContext()}return n=null,r}catch{return!1}}()),ri}function ai(e,t){return t===void 0&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(e&255)/255,t}function oi(e){var t=e.toString(16);return t=`000000`.substring(0,6-t.length)+t,`#`+t}function si(e){return(e[0]*255<<16)+(e[1]*255<<8)+(e[2]*255|0)}function ci(){for(var e=[],t=[],n=0;n<32;n++)e[n]=n,t[n]=n;e[er.NORMAL_NPM]=er.NORMAL,e[er.ADD_NPM]=er.ADD,e[er.SCREEN_NPM]=er.SCREEN,t[er.NORMAL]=er.NORMAL_NPM,t[er.ADD]=er.ADD_NPM,t[er.SCREEN]=er.SCREEN_NPM;var r=[];return r.push(t),r.push(e),r}var li=ci();function ui(e,t){if(t===1)return(t*255<<24)+e;if(t===0)return 0;var n=e>>16&255,r=e>>8&255,i=e&255;return n=n*t+.5|0,r=r*t+.5|0,i=i*t+.5|0,(t*255<<24)+(n<<16)+(r<<8)+i}function di(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?`Float32Array`:e instanceof Uint32Array?`Uint32Array`:`Int32Array`;if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return`Uint16Array`}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return`Uint8Array`;return null}function fi(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function pi(e){return!(e&e-1)&&!!e}function mi(e){var t=(e>65535?1:0)<<4;e>>>=t;var n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function hi(e,t,n){var r=e.length,i;if(!(t>=r||n===0)){n=t+n>r?r-t:n;var a=r-n;for(i=t;i8)throw Error(`max arguments reached`);var c=this,l=c.name,u=c.items;this._aliasCount++;for(var d=0,f=u.length;d0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},e.prototype.add=function(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this},e.prototype.remove=function(e){var t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this},e.prototype.contains=function(e){return this.items.indexOf(e)!==-1},e.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(e.prototype,`empty`,{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`name`,{get:function(){return this._name},enumerable:!1,configurable:!0}),e}();Object.defineProperties(ji.prototype,{dispatch:{value:ji.prototype.emit},run:{value:ji.prototype.emit}}),zr.TARGET_FPMS=.06;var Mi;(function(e){e[e.INTERACTION=50]=`INTERACTION`,e[e.HIGH=25]=`HIGH`,e[e.NORMAL=0]=`NORMAL`,e[e.LOW=-25]=`LOW`,e[e.UTILITY=-50]=`UTILITY`})(Mi||={});var Ni=function(){function e(e,t,n,r){t===void 0&&(t=null),n===void 0&&(n=0),r===void 0&&(r=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=n,this.once=r}return e.prototype.match=function(e,t){return t===void 0&&(t=null),this.fn===e&&this.context===t},e.prototype.emit=function(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));var t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t},e.prototype.connect=function(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this},e.prototype.destroy=function(e){e===void 0&&(e=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var t=this.next;return this.next=e?null:t,this.previous=null,t},e}(),Pi=function(){function e(){var e=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Ni(null,null,1/0),this.deltaMS=1/zr.TARGET_FPMS,this.elapsedMS=1/zr.TARGET_FPMS,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&e._requestId===null&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return e.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(e,t,n){return n===void 0&&(n=Mi.NORMAL),this._addListener(new Ni(e,t,n))},e.prototype.addOnce=function(e,t,n){return n===void 0&&(n=Mi.NORMAL),this._addListener(new Ni(e,t,n,!0))},e.prototype._addListener=function(e){var t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this},e.prototype.remove=function(e,t){for(var n=this._head.next;n;)n=n.match(e,t)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,`count`,{get:function(){if(!this._head)return 0;for(var e=0,t=this._head;t=t.next;)e++;return e},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(e){e===void 0&&(e=performance.now());var t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){var n=e-this._lastFrame|0;if(n=this.x&&e=this.y&&te.right?e.right:this.right;if(r<=n)return!1;var i=this.ye.bottom?e.bottom:this.bottom;return a>i}var o=this.left,s=this.right,c=this.top,l=this.bottom;if(s<=o||l<=c)return!1;var u=Vi[0].set(e.left,e.top),d=Vi[1].set(e.left,e.bottom),f=Vi[2].set(e.right,e.top),p=Vi[3].set(e.right,e.bottom);if(f.x<=u.x||d.y<=u.y)return!1;var m=Math.sign(t.a*t.d-t.b*t.c);if(m===0||(t.apply(u,u),t.apply(d,d),t.apply(f,f),t.apply(p,p),Math.max(u.x,d.x,f.x,p.x)<=o||Math.min(u.x,d.x,f.x,p.x)>=s||Math.max(u.y,d.y,f.y,p.y)<=c||Math.min(u.y,d.y,f.y,p.y)>=l))return!1;var h=m*(d.y-u.y),g=m*(u.x-d.x),_=h*o+g*c,v=h*s+g*c,y=h*o+g*l,b=h*s+g*l;if(Math.max(_,v,y,b)<=h*u.x+g*u.y||Math.min(_,v,y,b)>=h*p.x+g*p.y)return!1;var x=m*(u.y-f.y),S=m*(f.x-u.x),C=x*o+S*c,w=x*s+S*c,T=x*o+S*l,E=x*s+S*l;return!(Math.max(C,w,T,E)<=x*u.x+S*u.y||Math.min(C,w,T,E)>=x*p.x+S*p.y)},e.prototype.pad=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this},e.prototype.fit=function(e){var t=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),r=Math.max(this.y,e.y),i=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(n-t,0),this.y=r,this.height=Math.max(i-r,0),this},e.prototype.ceil=function(e,t){e===void 0&&(e=1),t===void 0&&(t=.001);var n=Math.ceil((this.x+this.width-t)*e)/e,r=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=n-this.x,this.height=r-this.y,this},e.prototype.enlarge=function(e){var t=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),r=Math.min(this.y,e.y),i=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=n-t,this.y=r,this.height=i-r,this},e.prototype.toString=function(){return`[@pixi/math:Rectangle x=`+this.x+` y=`+this.y+` width=`+this.width+` height=`+this.height+`]`},e}(),Ui=function(){function e(e,t,n){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),this.x=e,this.y=t,this.radius=n,this.type=zi.CIRC}return e.prototype.clone=function(){return new e(this.x,this.y,this.radius)},e.prototype.contains=function(e,t){if(this.radius<=0)return!1;var n=this.radius*this.radius,r=this.x-e,i=this.y-t;return r*=r,i*=i,r+i<=n},e.prototype.getBounds=function(){return new Hi(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)},e.prototype.toString=function(){return`[@pixi/math:Circle x=`+this.x+` y=`+this.y+` radius=`+this.radius+`]`},e}(),Wi=function(){function e(e,t,n,r){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),this.x=e,this.y=t,this.width=n,this.height=r,this.type=zi.ELIP}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var n=(e-this.x)/this.width,r=(t-this.y)/this.height;return n*=n,r*=r,n+r<=1},e.prototype.getBounds=function(){return new Hi(this.x-this.width,this.y-this.height,this.width,this.height)},e.prototype.toString=function(){return`[@pixi/math:Ellipse x=`+this.x+` y=`+this.y+` width=`+this.width+` height=`+this.height+`]`},e}(),Gi=function(){function e(){for(var e=arguments,t=[],n=0;nt!=l>t&&e<(c-o)*((t-s)/(l-s))+o;u&&(n=!n)}return n},e.prototype.toString=function(){return`[@pixi/math:Polygon`+(`closeStroke=`+this.closeStroke)+(`points=`+this.points.reduce(function(e,t){return e+`, `+t},``)+`]`)},e}(),Ki=function(){function e(e,t,n,r,i){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=20),this.x=e,this.y=t,this.width=n,this.height=r,this.radius=i,this.type=zi.RREC}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height,this.radius)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){var n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+n&&t<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;var r=e-(this.x+n),i=t-(this.y+n),a=n*n;if(r*r+i*i<=a||(r=e-(this.x+this.width-n),r*r+i*i<=a)||(i=t-(this.y+this.height-n),r*r+i*i<=a)||(r=e-(this.x+n),r*r+i*i<=a))return!0}return!1},e.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=`+this.x+` y=`+this.y+(`width=`+this.width+` height=`+this.height+` radius=`+this.radius+`]`)},e}(),qi=function(){function e(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0),this._x=n,this._y=r,this.cb=e,this.scope=t}return e.prototype.clone=function(t,n){return t===void 0&&(t=this.cb),n===void 0&&(n=this.scope),new e(t,n,this._x,this._y)},e.prototype.set=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this},e.prototype.copyFrom=function(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},e.prototype.copyTo=function(e){return e.set(this._x,this._y),e},e.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},e.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=`+this.scope+`]`},Object.defineProperty(e.prototype,`x`,{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`y`,{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),e}(),Ji=function(){function e(e,t,n,r,i,a){e===void 0&&(e=1),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=1),i===void 0&&(i=0),a===void 0&&(a=0),this.array=null,this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=a}return e.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},e.prototype.set=function(e,t,n,r,i,a){return this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=a,this},e.prototype.toArray=function(e,t){this.array||=new Float32Array(9);var n=t||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},e.prototype.apply=function(e,t){t||=new Bi;var n=e.x,r=e.y;return t.x=this.a*n+this.c*r+this.tx,t.y=this.b*n+this.d*r+this.ty,t},e.prototype.applyInverse=function(e,t){t||=new Bi;var n=1/(this.a*this.d+this.c*-this.b),r=e.x,i=e.y;return t.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,t.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,t},e.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},e.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},e.prototype.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this.a,i=this.c,a=this.tx;return this.a=r*t-this.b*n,this.b=r*n+this.b*t,this.c=i*t-this.d*n,this.d=i*n+this.d*t,this.tx=a*t-this.ty*n,this.ty=a*n+this.ty*t,this},e.prototype.append=function(e){var t=this.a,n=this.b,r=this.c,i=this.d;return this.a=e.a*t+e.b*r,this.b=e.a*n+e.b*i,this.c=e.c*t+e.d*r,this.d=e.c*n+e.d*i,this.tx=e.tx*t+e.ty*r+this.tx,this.ty=e.tx*n+e.ty*i+this.ty,this},e.prototype.setTransform=function(e,t,n,r,i,a,o,s,c){return this.a=Math.cos(o+c)*i,this.b=Math.sin(o+c)*i,this.c=-Math.sin(o-s)*a,this.d=Math.cos(o-s)*a,this.tx=e-(n*this.a+r*this.c),this.ty=t-(n*this.b+r*this.d),this},e.prototype.prepend=function(e){var t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){var n=this.a,r=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this},e.prototype.decompose=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=e.pivot,o=-Math.atan2(-r,i),s=Math.atan2(n,t),c=Math.abs(o+s);return c<1e-5||Math.abs(Ii-c)<1e-5?(e.rotation=s,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=s),e.scale.x=Math.sqrt(t*t+n*n),e.scale.y=Math.sqrt(r*r+i*i),e.position.x=this.tx+(a.x*t+a.y*r),e.position.y=this.ty+(a.x*n+a.y*i),e},e.prototype.invert=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.tx,a=e*r-t*n;return this.a=r/a,this.b=-t/a,this.c=-n/a,this.d=e/a,this.tx=(n*this.ty-r*i)/a,this.ty=-(e*this.ty-t*i)/a,this},e.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},e.prototype.clone=function(){var t=new e;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},e.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},e.prototype.toString=function(){return`[@pixi/math:Matrix a=`+this.a+` b=`+this.b+` c=`+this.c+` d=`+this.d+` tx=`+this.tx+` ty=`+this.ty+`]`},Object.defineProperty(e,`IDENTITY`,{get:function(){return new e},enumerable:!1,configurable:!0}),Object.defineProperty(e,`TEMP_MATRIX`,{get:function(){return new e},enumerable:!1,configurable:!0}),e}(),Yi=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Xi=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Zi=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Qi=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],$i=[],ea=[],ta=Math.sign;function na(){for(var e=0;e<16;e++){var t=[];$i.push(t);for(var n=0;n<16;n++)for(var r=ta(Yi[e]*Yi[n]+Zi[e]*Xi[n]),i=ta(Xi[e]*Yi[n]+Qi[e]*Xi[n]),a=ta(Yi[e]*Zi[n]+Zi[e]*Qi[n]),o=ta(Xi[e]*Zi[n]+Qi[e]*Qi[n]),s=0;s<16;s++)if(Yi[s]===r&&Xi[s]===i&&Zi[s]===a&&Qi[s]===o){t.push(s);break}}for(var e=0;e<16;e++){var c=new Ji;c.set(Yi[e],Xi[e],Zi[e],Qi[e],0,0),ea.push(c)}}na();var ra={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(e){return Yi[e]},uY:function(e){return Xi[e]},vX:function(e){return Zi[e]},vY:function(e){return Qi[e]},inv:function(e){return e&8?e&15:-e&7},add:function(e,t){return $i[e][t]},sub:function(e,t){return $i[e][ra.inv(t)]},rotate180:function(e){return e^4},isVertical:function(e){return(e&3)==2},byDirection:function(e,t){return Math.abs(e)*2<=Math.abs(t)?t>=0?ra.S:ra.N:Math.abs(t)*2<=Math.abs(e)?e>0?ra.E:ra.W:t>0?e>0?ra.SE:ra.SW:e>0?ra.NE:ra.NW},matrixAppendRotationInv:function(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=ea[ra.inv(t)];i.tx=n,i.ty=r,e.append(i)}},ia=function(){function e(){this.worldTransform=new Ji,this.localTransform=new Ji,this.position=new qi(this.onChange,this,0,0),this.scale=new qi(this.onChange,this,1,1),this.pivot=new qi(this.onChange,this,0,0),this.skew=new qi(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},e.prototype.toString=function(){return`[@pixi/math:Transform `+(`position=(`+this.position.x+`, `+this.position.y+`) `)+(`rotation=`+this.rotation+` `)+(`scale=(`+this.scale.x+`, `+this.scale.y+`) `)+(`skew=(`+this.skew.x+`, `+this.skew.y+`) `)+`]`},e.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(e){var t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}},e.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},Object.defineProperty(e.prototype,`rotation`,{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())},enumerable:!1,configurable:!0}),e.IDENTITY=new e,e}();zr.PREFER_ENV=Ir.any?Zn.WEBGL:Zn.WEBGL2,zr.STRICT_TEXTURE_CACHE=!1;var aa=[];function oa(e,t){if(!e)return null;var n=``;if(typeof e==`string`){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);r&&(n=r[1].toLowerCase())}for(var i=aa.length-1;i>=0;--i){var a=aa[i];if(a.test&&a.test(e,n))return new a(e,t)}throw Error(`Unrecognized source type to auto-detect Resource`)} +/*! ***************************************************************************** + +Copyright (c) Microsoft Corporation. + + + +Permission to use, copy, modify, and/or distribute this software for any + +purpose with or without fee is hereby granted. + + + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + +PERFORMANCE OF THIS SOFTWARE. + +***************************************************************************** */ +var sa=function(e,t){return sa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},sa(e,t)};function ca(e,t){sa(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var la=function(){return la=Object.assign||function(e){for(var t=arguments,n,r=1,i=arguments.length;r0&&l>0,r.textureCacheIds=[],r.destroyed=!1,r.resource=null,r._batchEnabled=0,r._batchLocation=0,r.parentTextureArray=null,r.setResource(t),r}return Object.defineProperty(t.prototype,`realWidth`,{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`realHeight`,{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`mipmap`,{get:function(){return this._mipmap},set:function(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scaleMode`,{get:function(){return this._scaleMode},set:function(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`wrapMode`,{get:function(){return this._wrapMode},set:function(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(e,t){var n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this},t.prototype.setSize=function(e,t,n){return n||=this.resolution,this.setRealSize(e*n,t*n,n)},t.prototype.setRealSize=function(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this},t.prototype._refreshPOT=function(){this.isPowerOfTwo=pi(this.realWidth)&&pi(this.realHeight)},t.prototype.setResolution=function(e){var t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit(`update`,this)),this._refreshPOT(),this)},t.prototype.setResource=function(e){if(this.resource===e)return this;if(this.resource)throw Error(`Resource can be set only once`);return e.bind(this),this.resource=e,this},t.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit(`update`,this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit(`loaded`,this),this.emit(`update`,this))},t.prototype.onError=function(e){this.emit(`error`,this,e)},t.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Si[this.cacheId],delete xi[this.cacheId],this.cacheId=null),this.dispose(),t.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},t.prototype.dispose=function(){this.emit(`dispose`,this)},t.prototype.castToBaseTexture=function(){return this},t.from=function(e,n,r){r===void 0&&(r=zr.STRICT_TEXTURE_CACHE);var i=typeof e==`string`,a=null;if(i)a=e;else{if(!e._pixiId){var o=n&&n.pixiIdPrefix||`pixiid`;e._pixiId=o+`_`+_i()}a=e._pixiId}var s=Si[a];if(i&&r&&!s)throw Error(`The cacheId "`+a+`" does not exist in BaseTextureCache.`);return s||(s=new t(e,n),s.cacheId=a,t.addToCache(s,a)),s},t.fromBuffer=function(e,n,r,i){e||=new Float32Array(n*r*4);var a=new fa(e,{width:n,height:r}),o=e instanceof Float32Array?ir.FLOAT:ir.UNSIGNED_BYTE;return new t(a,Object.assign({},pa,i||{width:n,height:r,type:o}))},t.addToCache=function(e,t){t&&(e.textureCacheIds.indexOf(t)===-1&&e.textureCacheIds.push(t),Si[t]&&console.warn(`BaseTexture added to the cache with an id [`+t+`] that already had an entry`),Si[t]=e)},t.removeFromCache=function(e){if(typeof e==`string`){var t=Si[e];if(t){var n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Si[e],t}}else if(e&&e.textureCacheIds){for(var r=0;r0)if(e.resource)this.addResourceAt(e.resource,t);else throw Error(`CubeResource does not support copying of renderTexture.`);else e.target=rr.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this},t.prototype.upload=function(e,n,r){for(var i=this.itemDirtyIds,a=0;a)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(_a),Sa=function(e){ca(t,e);function t(n,r){var i=this;if(r||={},!(n instanceof HTMLVideoElement)){var a=document.createElement(`video`);a.setAttribute(`preload`,`auto`),a.setAttribute(`webkit-playsinline`,``),a.setAttribute(`playsinline`,``),typeof n==`string`&&(n=[n]);var o=n[0].src||n[0];_a.crossOrigin(a,o,r.crossorigin);for(var s=0;s2},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Pi.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Pi.shared.remove(this.update,this),this._isConnectedToTicker=!1)},t.prototype._onCanPlay=function(){var e=this.source;e.removeEventListener(`canplay`,this._onCanPlay),e.removeEventListener(`canplaythrough`,this._onCanPlay);var t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&(Pi.shared.remove(this.update,this),this._isConnectedToTicker=!1);var t=this.source;t&&(t.removeEventListener(`error`,this._onError,!0),t.pause(),t.src=``,t.load()),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,`autoUpdate`,{get:function(){return this._autoUpdate},set:function(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Pi.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Pi.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`updateFPS`,{get:function(){return this._updateFPS},set:function(e){e!==this._updateFPS&&(this._updateFPS=e)},enumerable:!1,configurable:!0}),t.test=function(e,n){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||t.TYPES.indexOf(n)>-1},t.TYPES=[`mp4`,`m4v`,`webm`,`ogg`,`ogv`,`h264`,`avi`,`mov`],t.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`},t}(_a),Ca=function(e){ca(t,e);function t(t){return e.call(this,t)||this}return t.test=function(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<`u`&&e instanceof ImageBitmap},t}(_a);aa.push(ba,Ca,va,Sa,xa,fa,ya,ga);var wa={__proto__:null,Resource:da,BaseImageResource:_a,INSTALLED:aa,autoDetectResource:oa,AbstractMultiResource:ha,ArrayResource:ga,BufferResource:fa,CanvasResource:va,CubeResource:ya,ImageResource:ba,SVGResource:xa,VideoResource:Sa,ImageBitmapResource:Ca},Ta=function(e){ca(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.upload=function(e,t,n){var r=e.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===lr.UNPACK);var i=t.realWidth,a=t.realHeight;return n.width===i&&n.height===a?r.texSubImage2D(t.target,0,0,0,i,a,t.format,n.type,this.data):(n.width=i,n.height=a,r.texImage2D(t.target,0,n.internalFormat,i,a,0,t.format,n.type,this.data)),!0},t}(fa),Ea=function(){function e(e,t){this.width=Math.round(e||100),this.height=Math.round(t||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new ji(`disposeFramebuffer`),this.multisample=hr.NONE}return Object.defineProperty(e.prototype,`colorTexture`,{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(e,t){return e===void 0&&(e=0),this.colorTextures[e]=t||new ma(null,{scaleMode:or.NEAREST,resolution:1,mipmap:cr.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(e){return this.depthTexture=e||new ma(new Ta(null,{width:this.width,height:this.height}),{scaleMode:or.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:cr.OFF,format:nr.DEPTH_COMPONENT,type:ir.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(e,t){if(e=Math.round(e),t=Math.round(t),!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&t.textureCacheIds.splice(n,1),delete xi[e],t}}else if(e&&e.textureCacheIds){for(var r=0;rthis.baseTexture.width,o=n+i>this.baseTexture.height;if(a||o){var s=a&&o?`and`:`or`,c=`X: `+t+` + `+r+` = `+(t+r)+` > `+this.baseTexture.width,l=`Y: `+n+` + `+i+` = `+(n+i)+` > `+this.baseTexture.height;throw Error(`Texture Error: frame does not fit inside the base Texture dimensions: `+(c+` `+s+` `+l))}this.valid=r&&i&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`rotate`,{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`width`,{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),t.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(t,`EMPTY`,{get:function(){return t._EMPTY||(t._EMPTY=new t(new ma),Aa(t._EMPTY),Aa(t._EMPTY.baseTexture)),t._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(t,`WHITE`,{get:function(){if(!t._WHITE){var e=zr.ADAPTER.createCanvas(16,16),n=e.getContext(`2d`);e.width=16,e.height=16,n.fillStyle=`white`,n.fillRect(0,0,16,16),t._WHITE=new t(ma.from(e)),Aa(t._WHITE),Aa(t._WHITE.baseTexture)}return t._WHITE},enumerable:!1,configurable:!0}),t}(Xr.default),Ma=function(e){ca(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.valid=!0,r.filterFrame=null,r.filterPoolKey=null,r.updateUvs(),r}return Object.defineProperty(t.prototype,`framebuffer`,{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`multisample`,{get:function(){return this.framebuffer.multisample},set:function(e){this.framebuffer.multisample=e},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t,n){n===void 0&&(n=!0);var r=this.baseTexture.resolution,i=Math.round(e*r)/r,a=Math.round(t*r)/r;this.valid=i>0&&a>0,this._frame.width=this.orig.width=i,this._frame.height=this.orig.height=a,n&&this.baseTexture.resize(i,a),this.updateUvs()},t.prototype.setResolution=function(e){var t=this.baseTexture;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))},t.create=function(e){for(var n=arguments,r=[],i=1;i>>0,r>1&&(i+=r*4294967296)):i=r>1?-r:-1,this.texturePool[i]||(this.texturePool[i]=[]);var a=this.texturePool[i].pop();return a||=this.createTexture(e,t,r),a.filterPoolKey=i,a.setResolution(n),a},e.prototype.getFilterTexture=function(e,t,n){var r=this.getOptimalTexture(e.width,e.height,t||e.resolution,n||hr.NONE);return r.filterFrame=e.filterFrame,r},e.prototype.returnTexture=function(e){var t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)},e.prototype.returnFilterTexture=function(e){this.returnTexture(e)},e.prototype.clear=function(e){if(e=e!==!1,e)for(var t in this.texturePool){var n=this.texturePool[t];if(n)for(var r=0;r0&&e.height>0,this.texturePool){if(!(Number(t)<0))continue;var n=this.texturePool[t];if(n)for(var r=0;r1){for(var l=0;l1&&(u=this.getOptimalFilterTexture(l.width,l.height,t.resolution),u.filterFrame=l.filterFrame),n[d].apply(this,l,u,ur.CLEAR,t);var f=l;l=u,u=f}n[d].apply(this,l,c.renderTexture,ur.BLEND,t),d>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(l),this.returnFilterTexture(u)}t.clear(),this.statePool.push(t)},e.prototype.bindAndClear=function(e,t){t===void 0&&(t=ur.CLEAR);var n=this.renderer,r=n.renderTexture,i=n.state;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e&&e.filterFrame){var a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,r.bind(e,e.filterFrame,a)}else e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame):r.bind(e);var o=i.stateId&1||this.forceClear;(t===ur.CLEAR||t===ur.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)},e.prototype.applyFilter=function(e,t,n,r){var i=this.renderer;i.state.set(e.state),this.bindAndClear(n,r),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,i.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),i.geometry.bind(this.quadUv),i.geometry.draw(tr.TRIANGLES)):(i.geometry.bind(this.quad),i.geometry.draw(tr.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(e,t){var n=this.activeState,r=n.sourceFrame,i=n.destinationFrame,a=t._texture.orig,o=e.set(i.width,0,0,i.height,r.x,r.y),s=t.worldTransform.copyTo(Ji.TEMP_MATRIX);return s.invert(),o.prepend(s),o.scale(1/a.width,1/a.height),o.translate(t.anchor.x,t.anchor.y),o},e.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(e,t,n,r){return n===void 0&&(n=1),r===void 0&&(r=hr.NONE),this.texturePool.getOptimalTexture(e,t,n,r)},e.prototype.getFilterTexture=function(e,t,n){if(typeof e==`number`){var r=e;e=t,t=r}e||=this.activeState.renderTexture;var i=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,n||hr.NONE);return i.filterFrame=e.filterFrame,i},e.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e.prototype.transformAABB=function(e,t){var n=Ja[0],r=Ja[1],i=Ja[2],a=Ja[3];n.set(t.left,t.top),r.set(t.left,t.bottom),i.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(n,n),e.apply(r,r),e.apply(i,i),e.apply(a,a);var o=Math.min(n.x,r.x,i.x,a.x),s=Math.min(n.y,r.y,i.y,a.y),c=Math.max(n.x,r.x,i.x,a.x),l=Math.max(n.y,r.y,i.y,a.y);t.x=o,t.y=s,t.width=c-o,t.height=l-s},e.prototype.roundFrame=function(e,t,n,r,i){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(i){var a=i.a,o=i.b,s=i.c,c=i.d;if((Math.abs(o)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(c)>1e-4))return}i=i?Ya.copyFrom(i):Ya.identity(),i.translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.transformAABB(i,e),e.ceil(t),this.transformAABB(i.invert(),e)}},e}(),Za=function(){function e(e){this.renderer=e}return e.prototype.flush=function(){},e.prototype.destroy=function(){this.renderer=null},e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.render=function(e){},e}(),Qa=function(){function e(e){this.renderer=e,this.emptyRenderer=new Za(e),this.currentRenderer=this.emptyRenderer}return e.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(e,t){for(var n=this.renderer.texture.boundTextures,r=t-1;r>=0;--r)e[r]=n[r]||null,e[r]&&(e[r]._batchLocation=r)},e.prototype.boundArray=function(e,t,n,r){for(var i=e.elements,a=e.ids,o=e.count,s=0,c=0;c=0&&u=Zn.WEBGL2&&(n=e.getContext(`webgl2`,t)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext(`webgl`,t)||e.getContext(`experimental-webgl`,t),!n)throw Error(`This browser does not support WebGL. Try using the canvas renderer`);return this.gl=n,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var e=this.gl,t={loseContext:e.getExtension(`WEBGL_lose_context`),anisotropicFiltering:e.getExtension(`EXT_texture_filter_anisotropic`),floatTextureLinear:e.getExtension(`OES_texture_float_linear`),s3tc:e.getExtension(`WEBGL_compressed_texture_s3tc`),s3tc_sRGB:e.getExtension(`WEBGL_compressed_texture_s3tc_srgb`),etc:e.getExtension(`WEBGL_compressed_texture_etc`),etc1:e.getExtension(`WEBGL_compressed_texture_etc1`),pvrtc:e.getExtension(`WEBGL_compressed_texture_pvrtc`)||e.getExtension(`WEBKIT_WEBGL_compressed_texture_pvrtc`),atc:e.getExtension(`WEBGL_compressed_texture_atc`),astc:e.getExtension(`WEBGL_compressed_texture_astc`)};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension(`WEBGL_draw_buffers`),depthTexture:e.getExtension(`WEBGL_depth_texture`),vertexArrayObject:e.getExtension(`OES_vertex_array_object`)||e.getExtension(`MOZ_OES_vertex_array_object`)||e.getExtension(`WEBKIT_OES_vertex_array_object`),uint32ElementIndex:e.getExtension(`OES_element_index_uint`),floatTexture:e.getExtension(`OES_texture_float`),floatTextureLinear:e.getExtension(`OES_texture_float_linear`),textureHalfFloat:e.getExtension(`OES_texture_half_float`),textureHalfFloatLinear:e.getExtension(`OES_texture_half_float_linear`)}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension(`EXT_color_buffer_float`)})},e.prototype.handleContextLost=function(e){var t=this;e.preventDefault(),setTimeout(function(){t.gl.isContextLost()&&t.extensions.loseContext&&t.extensions.loseContext.restoreContext()},0)},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener(`webglcontextlost`,this.handleContextLost),e.removeEventListener(`webglcontextrestored`,this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(e){var t=e.getContextAttributes(),n=`WebGL2RenderingContext`in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),t&&!t.stencil&&console.warn(`Provided WebGL context does not have a stencil buffer, masks may not render correctly`);var r=n||!!e.getExtension(`OES_element_index_uint`);this.supports.uint32Indices=r,r||console.warn(`Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly`)},e}(),to=function(){function e(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=hr.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return e}(),no=new Hi,ro=function(){function e(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new Ea(10,10),this.msaaSamples=null}return e.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Hi,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var t=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;zr.PREFER_ENV===Zn.WEBGL_LEGACY&&(t=null,n=null),t?e.drawBuffers=function(e){return t.drawBuffersWEBGL(e)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},e.prototype.bind=function(e,t,n){n===void 0&&(n=0);var r=this.gl;if(e){var i=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,i.mipLevel=n),i.dirtyId!==e.dirtyId&&(i.dirtyId=e.dirtyId,i.dirtyFormat===e.dirtyFormat?i.dirtySize!==e.dirtySize&&(i.dirtySize=e.dirtySize,this.resizeFramebuffer(e)):(i.dirtyFormat=e.dirtyFormat,i.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)));for(var a=0;a>n,c=t.height>>n,l=s/t.width;this.setViewport(t.x*l,t.y*l,s,c)}else{var s=e.width>>n,c=e.height>>n;this.setViewport(0,0,s,c)}}else this.current&&(this.current=null,r.bindFramebuffer(r.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(e,t,n,r){var i=this.viewport;e=Math.round(e),t=Math.round(t),n=Math.round(n),r=Math.round(r),(i.width!==n||i.height!==r||i.x!==e||i.y!==t)&&(i.x=e,i.y=t,i.width=n,i.height=r,this.gl.viewport(e,t,n,r))},Object.defineProperty(e.prototype,`size`,{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),e.prototype.clear=function(e,t,n,r,i){i===void 0&&(i=$n.COLOR|$n.DEPTH);var a=this.gl;a.clearColor(e,t,n,r),a.clear(i)},e.prototype.initFramebuffer=function(e){var t=this.gl,n=new to(t.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n},e.prototype.resizeFramebuffer=function(e){var t=this.gl,n=e.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,n.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.RGBA8,e.width,e.height)),n.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,n.stencil),n.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.DEPTH24_STENCIL8,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height));var r=e.colorTextures,i=r.length;t.drawBuffers||(i=Math.min(i,1));for(var a=0;a1&&this.canMultisampleFramebuffer(e)?(r.msaaBuffer=r.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.RGBA8,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,r.msaaBuffer)):r.msaaBuffer&&(n.deleteRenderbuffer(r.msaaBuffer),r.msaaBuffer=null,r.blitFramebuffer&&(r.blitFramebuffer.dispose(),r.blitFramebuffer=null));for(var o=[],s=0;s1&&n.drawBuffers(o),e.depthTexture){var u=this.writeDepthTexture;if(u){var d=e.depthTexture;this.renderer.texture.bind(d,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,t)}}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(r.stencil=r.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,r.stencil)):r.stencil&&(n.deleteRenderbuffer(r.stencil),r.stencil=null)},e.prototype.canMultisampleFramebuffer=function(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture},e.prototype.detectSamples=function(e){var t=this.msaaSamples,n=hr.NONE;if(e<=1||t===null)return n;for(var r=0;r=0&&this.managedFramebuffers.splice(i,1),e.disposeRunner.remove(this),t||(r.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&r.deleteRenderbuffer(n.msaaBuffer),n.stencil&&r.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},e.prototype.disposeAll=function(e){var t=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=Zn.WEBGL2&&(t=e.getContext(`webgl2`,{})),t||(t=e.getContext(`webgl`,{})||e.getContext(`experimental-webgl`,{}),t?t.getExtension(`WEBGL_draw_buffers`):t=null),mo=t}return mo}var go;function _o(){if(!go){go=fr.MEDIUM;var e=ho();if(e&&e.getShaderPrecisionFormat){var t=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);go=t.precision?fr.HIGH:fr.MEDIUM}}return go}function vo(e,t,n){if(e.substring(0,9)!==`precision`){var r=t;return t===fr.HIGH&&n!==fr.HIGH&&(r=fr.MEDIUM),`precision `+r+` float; +`+e}else if(n!==fr.HIGH&&e.substring(0,15)===`precision highp`)return e.replace(`precision highp`,`precision mediump`);return e}var yo={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function bo(e){return yo[e]}var xo=null,So={FLOAT:`float`,FLOAT_VEC2:`vec2`,FLOAT_VEC3:`vec3`,FLOAT_VEC4:`vec4`,INT:`int`,INT_VEC2:`ivec2`,INT_VEC3:`ivec3`,INT_VEC4:`ivec4`,UNSIGNED_INT:`uint`,UNSIGNED_INT_VEC2:`uvec2`,UNSIGNED_INT_VEC3:`uvec3`,UNSIGNED_INT_VEC4:`uvec4`,BOOL:`bool`,BOOL_VEC2:`bvec2`,BOOL_VEC3:`bvec3`,BOOL_VEC4:`bvec4`,FLOAT_MAT2:`mat2`,FLOAT_MAT3:`mat3`,FLOAT_MAT4:`mat4`,SAMPLER_2D:`sampler2D`,INT_SAMPLER_2D:`sampler2D`,UNSIGNED_INT_SAMPLER_2D:`sampler2D`,SAMPLER_CUBE:`samplerCube`,INT_SAMPLER_CUBE:`samplerCube`,UNSIGNED_INT_SAMPLER_CUBE:`samplerCube`,SAMPLER_2D_ARRAY:`sampler2DArray`,INT_SAMPLER_2D_ARRAY:`sampler2DArray`,UNSIGNED_INT_SAMPLER_2D_ARRAY:`sampler2DArray`};function Co(e,t){if(!xo){var n=Object.keys(So);xo={};for(var r=0;r0&&(t+=` +else `),n0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==t&&this.renderer.gl.colorMask((n&1)!=0,(n&2)!=0,(n&4)!=0,(n&8)!=0)},e.prototype.destroy=function(){this.renderer=null},e}(),ts=function(){function e(e){this.renderer=e,this.maskStack=[],this.glConst=0}return e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(e){var t=this.renderer.gl,n=this.getStackLength();this.maskStack=e;var r=this.getStackLength();r!==n&&(r===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){this.renderer=null,this.maskStack=null},e}(),ns=new Ji,rs=[],os=function(e){ca(t,e);function t(t){var n=e.call(this,t)||this;return n.glConst=zr.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,n}return t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0},t.prototype.calcScissorRect=function(e){var t;if(!e._scissorRectLocal){var n=e._scissorRect,r=e.maskObject,i=this.renderer,a=i.renderTexture,o=r.getBounds(!0,(t=rs.pop())??new Hi);this.roundFrameToPixels(o,a.current?a.current.resolution:i.resolution,a.sourceFrame,a.destinationFrame,i.projection.transform),n&&o.fit(n),e._scissorRectLocal=o}},t.isMatrixRotated=function(e){if(!e)return!1;var t=e.a,n=e.b,r=e.c,i=e.d;return(Math.abs(n)>1e-4||Math.abs(r)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)},t.prototype.testScissor=function(e){var n=e.maskObject;if(!n.isFastRect||!n.isFastRect()||t.isMatrixRotated(n.worldTransform)||t.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);var r=e._scissorRectLocal;return r.width>0&&r.height>0},t.prototype.roundFrameToPixels=function(e,n,r,i,a){t.isMatrixRotated(a)||(a=a?ns.copyFrom(a):ns.identity(),a.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.renderer.filter.transformAABB(a,e),e.fit(i),e.x=Math.round(e.x*n),e.y=Math.round(e.y*n),e.width=Math.round(e.width*n),e.height=Math.round(e.height*n))},t.prototype.push=function(e){e._scissorRectLocal||this.calcScissorRect(e);var t=this.renderer.gl;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;e&&rs.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)},t.prototype._useCurrent=function(){var e=this.maskStack[this.maskStack.length-1]._scissorRect,t;t=this.renderer.renderTexture.current?e.y:this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)},t}(ts),ss=function(e){ca(t,e);function t(t){var n=e.call(this,t)||this;return n.glConst=zr.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,n}return t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0},t.prototype.push=function(e){var t=e.maskObject,n=this.renderer.gl,r=e._stencilCounter;r===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),e._stencilCounter++;var i=e._colorMask;i!==0&&(e._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,r,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(e._colorMask=i,n.colorMask((i&1)!=0,(i&2)!=0,(i&4)!=0,(i&8)!=0)),this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{var n=this.maskStack.length===0?null:this.maskStack[this.maskStack.length-1],r=n?n._colorMask:15;r!==0&&(n._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,r!==0&&(n._colorMask=r,t.colorMask((r&1)!=0,(r&2)!=0,(r&4)!=0,(r&8)!=0)),this._useCurrent()}},t.prototype._useCurrent=function(){var e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},t}(ts),cs=function(){function e(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Ji,this.transform=null}return e.prototype.update=function(e,t,n,r){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,r),this.transform&&this.projectionMatrix.append(this.transform);var i=this.renderer;i.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,i.globalUniforms.update(),i.shader.shader&&i.shader.syncUniformGroup(i.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(e,t,n,r){var i=this.projectionMatrix,a=r?-1:1;i.identity(),i.a=1/t.width*2,i.d=a*(1/t.height*2),i.tx=-1-t.x*i.a,i.ty=-a-t.y*i.d},e.prototype.setTransform=function(e){},e.prototype.destroy=function(){this.renderer=null},e}(),ls=new Hi,us=new Hi,ds=function(){function e(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Hi,this.destinationFrame=new Hi,this.viewportFrame=new Hi}return e.prototype.bind=function(e,t,n){e===void 0&&(e=null);var r=this.renderer;this.current=e;var i,a,o;e?(i=e.baseTexture,o=i.resolution,t||(ls.width=e.frame.width,ls.height=e.frame.height,t=ls),n||(us.x=e.frame.x,us.y=e.frame.y,us.width=t.width,us.height=t.height,n=us),a=i.framebuffer):(o=r.resolution,t||(ls.width=r.screen.width,ls.height=r.screen.height,t=ls),n||(n=ls,n.width=t.width,n.height=t.height));var s=this.viewportFrame;s.x=n.x*o,s.y=n.y*o,s.width=n.width*o,s.height=n.height*o,e||(s.y=r.view.height-(s.y+s.height)),s.ceil(),this.renderer.framebuffer.bind(a,s),this.renderer.projection.update(n,t,o,!a),e?this.renderer.mask.setMaskStack(i.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(n)},e.prototype.clear=function(e,t){this.current?e||=this.current.baseTexture.clearColor:e||=this.clearColor;var n=this.destinationFrame,r=this.current?this.current.baseTexture:this.renderer.screen,i=n.width!==r.width||n.height!==r.height;if(i){var a=this.viewportFrame,o=a.x,s=a.y,c=a.width,l=a.height;o=Math.round(o),s=Math.round(s),c=Math.round(c),l=Math.round(l),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(o,s,c,l)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],t),i&&this.renderer.scissor.pop()},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e.prototype.destroy=function(){this.renderer=null},e}();function fs(e,t,n,r,i){n.buffer.update(i)}var ps={float:` + data[offset] = v; + `,vec2:` + data[offset] = v[0]; + data[offset+1] = v[1]; + `,vec3:` + data[offset] = v[0]; + data[offset+1] = v[1]; + data[offset+2] = v[2]; + + `,vec4:` + data[offset] = v[0]; + data[offset+1] = v[1]; + data[offset+2] = v[2]; + data[offset+3] = v[3]; + `,mat2:` + data[offset] = v[0]; + data[offset+1] = v[1]; + + data[offset+4] = v[2]; + data[offset+5] = v[3]; + `,mat3:` + data[offset] = v[0]; + data[offset+1] = v[1]; + data[offset+2] = v[2]; + + data[offset + 4] = v[3]; + data[offset + 5] = v[4]; + data[offset + 6] = v[5]; + + data[offset + 8] = v[6]; + data[offset + 9] = v[7]; + data[offset + 10] = v[8]; + `,mat4:` + for(var i = 0; i < 16; i++) + { + data[offset + i] = v[i]; + } + `},ms={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function hs(e){for(var t=e.map(function(e){return{data:e,offset:0,dataLen:0,dirty:0}}),n=0,r=0,i=0,a=0;a1&&(n=Math.max(n,16)*o.data.size),o.dataLen=n,r%n!==0&&r<16){var s=r%n%16;r+=s,i+=s}r+n>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=n,r=n):(o.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function gs(e,t){var n=[];for(var r in e)t[r]&&n.push(t[r]);return n.sort(function(e,t){return e.index-t.index}),n}function _s(e,t){if(!e.autoManage)return{size:0,syncFunc:fs};for(var n=gs(e.uniforms,t),r=hs(n),i=r.uboElements,a=r.size,o=[` + var v = null; + var v2 = null; + var cv = null; + var t = 0; + var gl = renderer.gl + var index = 0; + var data = buffer.data; + `],s=0;s1){var m=bo(c.data.type),h=Math.max(ms[c.data.type]/16,1),g=m/h,_=(4-g%4)%4;o.push(` + cv = ud.`+u+`.value; + v = uv.`+u+`; + offset = `+c.offset/4+`; + + t = 0; + + for(var i=0; i < `+c.data.size*h+`; i++) + { + for(var j = 0; j < `+g+`; j++) + { + data[offset++] = v[t++]; + } + offset += `+_+`; + } + + `)}else{var v=ps[c.data.type];o.push(` + cv = ud.`+u+`.value; + v = uv.`+u+`; + offset = `+c.offset/4+`; + `+v+`; + `)}}return o.push(` + renderer.buffer.update(buffer); + `),{size:a,syncFunc:Function(`ud`,`uv`,`renderer`,`syncData`,`buffer`,o.join(` +`))}}var vs=function(){function e(){}return e}(),ys=function(){function e(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return e.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},e}();function bs(e,t){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;it?1:-1});for(var o=0;o>=1,n++;this.stateId=e.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var e=this.renderer.texture,t=e.managedTextures,n=!1,r=0;rthis.maxIdle&&(e.destroyTexture(i,!0),t[r]=null,n=!0)}if(n){for(var a=0,r=0;r=0;r--)this.unload(e.children[r])},e.prototype.destroy=function(){this.renderer=null},e}();function Fs(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;return C=`WebGL2RenderingContext`in globalThis&&e instanceof globalThis.WebGL2RenderingContext?(t={},t[ir.UNSIGNED_BYTE]=(n={},n[nr.RGBA]=e.RGBA8,n[nr.RGB]=e.RGB8,n[nr.RG]=e.RG8,n[nr.RED]=e.R8,n[nr.RGBA_INTEGER]=e.RGBA8UI,n[nr.RGB_INTEGER]=e.RGB8UI,n[nr.RG_INTEGER]=e.RG8UI,n[nr.RED_INTEGER]=e.R8UI,n[nr.ALPHA]=e.ALPHA,n[nr.LUMINANCE]=e.LUMINANCE,n[nr.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,n),t[ir.BYTE]=(r={},r[nr.RGBA]=e.RGBA8_SNORM,r[nr.RGB]=e.RGB8_SNORM,r[nr.RG]=e.RG8_SNORM,r[nr.RED]=e.R8_SNORM,r[nr.RGBA_INTEGER]=e.RGBA8I,r[nr.RGB_INTEGER]=e.RGB8I,r[nr.RG_INTEGER]=e.RG8I,r[nr.RED_INTEGER]=e.R8I,r),t[ir.UNSIGNED_SHORT]=(i={},i[nr.RGBA_INTEGER]=e.RGBA16UI,i[nr.RGB_INTEGER]=e.RGB16UI,i[nr.RG_INTEGER]=e.RG16UI,i[nr.RED_INTEGER]=e.R16UI,i[nr.DEPTH_COMPONENT]=e.DEPTH_COMPONENT16,i),t[ir.SHORT]=(a={},a[nr.RGBA_INTEGER]=e.RGBA16I,a[nr.RGB_INTEGER]=e.RGB16I,a[nr.RG_INTEGER]=e.RG16I,a[nr.RED_INTEGER]=e.R16I,a),t[ir.UNSIGNED_INT]=(o={},o[nr.RGBA_INTEGER]=e.RGBA32UI,o[nr.RGB_INTEGER]=e.RGB32UI,o[nr.RG_INTEGER]=e.RG32UI,o[nr.RED_INTEGER]=e.R32UI,o[nr.DEPTH_COMPONENT]=e.DEPTH_COMPONENT24,o),t[ir.INT]=(s={},s[nr.RGBA_INTEGER]=e.RGBA32I,s[nr.RGB_INTEGER]=e.RGB32I,s[nr.RG_INTEGER]=e.RG32I,s[nr.RED_INTEGER]=e.R32I,s),t[ir.FLOAT]=(c={},c[nr.RGBA]=e.RGBA32F,c[nr.RGB]=e.RGB32F,c[nr.RG]=e.RG32F,c[nr.RED]=e.R32F,c[nr.DEPTH_COMPONENT]=e.DEPTH_COMPONENT32F,c),t[ir.HALF_FLOAT]=(l={},l[nr.RGBA]=e.RGBA16F,l[nr.RGB]=e.RGB16F,l[nr.RG]=e.RG16F,l[nr.RED]=e.R16F,l),t[ir.UNSIGNED_SHORT_5_6_5]=(u={},u[nr.RGB]=e.RGB565,u),t[ir.UNSIGNED_SHORT_4_4_4_4]=(d={},d[nr.RGBA]=e.RGBA4,d),t[ir.UNSIGNED_SHORT_5_5_5_1]=(f={},f[nr.RGBA]=e.RGB5_A1,f),t[ir.UNSIGNED_INT_2_10_10_10_REV]=(p={},p[nr.RGBA]=e.RGB10_A2,p[nr.RGBA_INTEGER]=e.RGB10_A2UI,p),t[ir.UNSIGNED_INT_10F_11F_11F_REV]=(m={},m[nr.RGB]=e.R11F_G11F_B10F,m),t[ir.UNSIGNED_INT_5_9_9_9_REV]=(h={},h[nr.RGB]=e.RGB9_E5,h),t[ir.UNSIGNED_INT_24_8]=(g={},g[nr.DEPTH_STENCIL]=e.DEPTH24_STENCIL8,g),t[ir.FLOAT_32_UNSIGNED_INT_24_8_REV]=(_={},_[nr.DEPTH_STENCIL]=e.DEPTH32F_STENCIL8,_),t):(v={},v[ir.UNSIGNED_BYTE]=(y={},y[nr.RGBA]=e.RGBA,y[nr.RGB]=e.RGB,y[nr.ALPHA]=e.ALPHA,y[nr.LUMINANCE]=e.LUMINANCE,y[nr.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,y),v[ir.UNSIGNED_SHORT_5_6_5]=(b={},b[nr.RGB]=e.RGB,b),v[ir.UNSIGNED_SHORT_4_4_4_4]=(x={},x[nr.RGBA]=e.RGBA,x),v[ir.UNSIGNED_SHORT_5_5_5_1]=(S={},S[nr.RGBA]=e.RGBA,S),v),C}var Is=function(){function e(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=ir.UNSIGNED_BYTE,this.internalFormat=nr.RGBA,this.samplerType=0}return e}(),Ls=function(){function e(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new ma,this.hasIntegerTextures=!1}return e.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=Fs(e);var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(var n=0;n=0;--a){var o=n[a];if(o){var s=o._glTextures[i];s.samplerType!==ar.FLOAT&&this.renderer.texture.unbind(o)}}},e.prototype.initTexture=function(e){var t=new Is(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on(`dispose`,this.destroyTexture,this),t},e.prototype.initTextureType=function(e,t){var n,r;t.internalFormat=(r=(n=this.internalFormats[e.type])?.[e.format])??e.format,this.webGLVersion===2&&e.type===ir.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type},e.prototype.updateTexture=function(e){var t=e._glTextures[this.CONTEXT_UID];if(t){var n=this.renderer;if(this.initTextureType(e,t),e.resource&&e.resource.upload(n,e,t))t.samplerType!==ar.FLOAT&&(this.hasIntegerTextures=!0);else{var r=e.realWidth,i=e.realHeight,a=n.gl;(t.width!==r||t.height!==i||t.dirtyId<0)&&(t.width=r,t.height=i,a.texImage2D(e.target,0,t.internalFormat,r,i,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}},e.prototype.destroyTexture=function(e,t){var n=this.gl;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off(`dispose`,this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){var r=this.managedTextures.indexOf(e);r!==-1&&hi(this.managedTextures,r,1)}},e.prototype.updateTextureStyle=function(e){var t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===cr.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=sr.CLAMP:t.wrapMode=e.wrapMode,e.resource&&e.resource.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)},e.prototype.setStyle=function(e,t){var n=this.gl;if(t.mipmap&&e.mipmap!==cr.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,t.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===or.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&e.anisotropicLevel>0&&e.scaleMode===or.LINEAR){var i=Math.min(e.anisotropicLevel,n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,r.TEXTURE_MAX_ANISOTROPY_EXT,i)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===or.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===or.LINEAR?n.LINEAR:n.NEAREST)},e.prototype.destroy=function(){this.renderer=null},e}(),Rs={__proto__:null,FilterSystem:Xa,BatchSystem:Qa,ContextSystem:eo,FramebufferSystem:ro,GeometrySystem:ao,MaskSystem:es,ScissorSystem:os,StencilSystem:ss,ProjectionSystem:cs,RenderTextureSystem:ds,ShaderSystem:Ts,StateSystem:Ns,TextureGCSystem:Ps,TextureSystem:Ls},zs=new Ji,Bs=function(e){ca(t,e);function t(t,n){t===void 0&&(t=Qn.UNKNOWN);var r=e.call(this)||this;return n=Object.assign({},zr.RENDER_OPTIONS,n),r.options=n,r.type=t,r.screen=new Hi(0,0,n.width,n.height),r.view=n.view||zr.ADAPTER.createCanvas(),r.resolution=n.resolution||zr.RESOLUTION,r.useContextAlpha=n.useContextAlpha,r.autoDensity=!!n.autoDensity,r.preserveDrawingBuffer=n.preserveDrawingBuffer,r.clearBeforeRender=n.clearBeforeRender,r._backgroundColor=0,r._backgroundColorRgba=[0,0,0,1],r._backgroundColorString=`#000000`,r.backgroundColor=n.backgroundColor||r._backgroundColor,r.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(yi(`6.0.0`,`Option transparent is deprecated, please use backgroundAlpha instead.`),r.useContextAlpha=n.transparent,r.backgroundAlpha=n.transparent?0:1),r._lastObjectRendered=null,r.plugins={},r}return t.prototype.initPlugins=function(e){for(var t in e)this.plugins[t]=new e[t](this)},Object.defineProperty(t.prototype,`width`,{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return this.view.height},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t){this.view.width=Math.round(e*this.resolution),this.view.height=Math.round(t*this.resolution);var n=this.view.width/this.resolution,r=this.view.height/this.resolution;this.screen.width=n,this.screen.height=r,this.autoDensity&&(this.view.style.width=n+`px`,this.view.style.height=r+`px`),this.emit(`resize`,n,r)},t.prototype.generateTexture=function(e,t,n,r){t===void 0&&(t={}),typeof t==`number`&&(yi(`6.1.0`,`generateTexture options (scaleMode, resolution, region) are now object options.`),t={scaleMode:t,resolution:n,region:r});var i=t.region,a=ua(t,[`region`]);r=i||e.getLocalBounds(null,!0),r.width===0&&(r.width=1),r.height===0&&(r.height=1);var o=Ma.create(la({width:r.width,height:r.height},a));return zs.tx=-r.x,zs.ty=-r.y,this.render(e,{renderTexture:o,clear:!1,transform:zs,skipUpdateTransform:!!e.parent}),o},t.prototype.destroy=function(e){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var n=this;n.plugins=null,n.type=Qn.UNKNOWN,n.view=null,n.screen=null,n._tempDisplayObjectParent=null,n.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(t.prototype,`backgroundColor`,{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._backgroundColorString=oi(e),ai(e,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`backgroundAlpha`,{get:function(){return this._backgroundColorRgba[3]},set:function(e){this._backgroundColorRgba[3]=e},enumerable:!1,configurable:!0}),t}(Xr.default),Vs=function(){function e(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return e}(),Hs=function(){function e(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return e.prototype.destroy=function(){this.renderer=null},e.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},e.prototype.bind=function(e){var t=this,n=t.gl,r=t.CONTEXT_UID,i=e._glBuffers[r]||this.createGLBuffer(e);n.bindBuffer(e.type,i.buffer)},e.prototype.bindBufferBase=function(e,t){var n=this,r=n.gl,i=n.CONTEXT_UID;if(this.boundBufferBases[t]!==e){var a=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[t]=e,r.bindBufferBase(r.UNIFORM_BUFFER,t,a.buffer)}},e.prototype.bindBufferRange=function(e,t,n){var r=this,i=r.gl,a=r.CONTEXT_UID;n||=0;var o=e._glBuffers[a]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,t||0,o.buffer,n*256,256)},e.prototype.update=function(e){var t=this,n=t.gl,r=t.CONTEXT_UID,i=e._glBuffers[r];if(e._updateID!==i.updateID)if(i.updateID=e._updateID,n.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)n.bufferSubData(e.type,0,e.data);else{var a=e.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,n.bufferData(e.type,e.data,a)}},e.prototype.dispose=function(e,t){if(this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var n=e._glBuffers[this.CONTEXT_UID],r=this.gl;e.disposeRunner.remove(this),n&&(t||r.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeAll=function(e){for(var t=Object.keys(this.managedBuffers),n=0;n=hr.HIGH?this.multisample=hr.HIGH:t>=hr.MEDIUM?this.multisample=hr.MEDIUM:t>=hr.LOW?this.multisample=hr.LOW:this.multisample=hr.NONE},t.prototype.addSystem=function(e,t){var n=new e(this);if(this[t])throw Error(`Whoops! The name "`+t+`" is already in use`);for(var r in this[t]=n,this.runners)this.runners[r].add(n);return this},t.prototype.render=function(e,t){var n,r,i,a;if(t&&(t instanceof Ma?(yi(`6.0.0`,`Renderer#render arguments changed, use options instead.`),n=t,r=arguments[2],i=arguments[3],a=arguments[4]):(n=t.renderTexture,r=t.clear,i=t.transform,a=t.skipUpdateTransform)),this.renderingToScreen=!n,this.runners.prerender.emit(),this.emit(`prerender`),this.projection.transform=i,!this.context.isLost){if(n||(this._lastObjectRendered=e),!a){var o=e.enableTempParent();e.updateTransform(),e.disableTempParent(o)}this.renderTexture.bind(n),this.batch.currentRenderer.start(),(r===void 0?this.clearBeforeRender:r)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),n&&n.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit(`postrender`)}},t.prototype.generateTexture=function(t,n,r,i){n===void 0&&(n={});var a=e.prototype.generateTexture.call(this,t,n,r,i);return this.framebuffer.blit(),a},t.prototype.resize=function(t,n){e.prototype.resize.call(this,t,n),this.runners.resize.emit(this.screen.height,this.screen.width)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.prototype.destroy=function(t){for(var n in this.runners.destroy.emit(),this.runners)this.runners[n].destroy();e.prototype.destroy.call(this,t),this.gl=null},Object.defineProperty(t.prototype,`extract`,{get:function(){return yi(`6.0.0`,`Renderer#extract has been deprecated, please use Renderer#plugins.extract instead.`),this.plugins.extract},enumerable:!1,configurable:!0}),t.registerPlugin=function(e,t){yi(`6.5.0`,`Renderer.registerPlugin() has been deprecated, please use extensions.add() instead.`),Ai.add({name:e,type:Oi.RendererPlugin,ref:t})},t.__plugins={},t}(Bs);Ai.handleByMap(Oi.RendererPlugin,Us.__plugins);function Ws(e){return Us.create(e)}var Gs=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Ks=Gs,qs=function(){function e(e){yi(`6.1.0`,`System class is deprecated, implemement ISystem interface instead.`),this.renderer=e}return e.prototype.destroy=function(){this.renderer=null},e}(),Js=function(){function e(){this.texArray=null,this.blend=0,this.type=tr.TRIANGLES,this.start=0,this.size=0,this.data=null}return e}(),Ys=function(){function e(){this.elements=[],this.ids=[],this.count=0}return e.prototype.clear=function(){for(var e=0;ethis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)},t.prototype.buildTexturesAndDrawCalls=function(){var e=this,n=e._bufferedTextures,r=e.MAX_TEXTURES,i=t._textureArrayPool,a=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,c=++ma._globalBatch,l=0,u=i[0],d=0;a.copyBoundTextures(o,r);for(var f=0;f=r&&(a.boundArray(u,o,c,r),this.buildDrawCalls(u,d,f),d=f,u=i[++l],++c),p._batchEnabled=c,p.touched=s,u.elements[u.count++]=p)}u.count>0&&(a.boundArray(u,o,c,r),this.buildDrawCalls(u,d,this._bufferSize),++l,++c);for(var f=0;f0&&(t+=` +else `),nthis.maxX||this.minY>this.maxY},e.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},e.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?Hi.EMPTY:(e||=new Hi(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},e.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},e.prototype.addPointMatrix=function(e,t){var n=e.a,r=e.b,i=e.c,a=e.d,o=e.tx,s=e.ty,c=n*t.x+i*t.y+o,l=r*t.x+a*t.y+s;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},e.prototype.addQuad=function(e){var t=this.minX,n=this.minY,r=this.maxX,i=this.maxY,a=e[0],o=e[1];t=ar?a:r,i=o>i?o:i,a=e[2],o=e[3],t=ar?a:r,i=o>i?o:i,a=e[4],o=e[5],t=ar?a:r,i=o>i?o:i,a=e[6],o=e[7],t=ar?a:r,i=o>i?o:i,this.minX=t,this.minY=n,this.maxX=r,this.maxY=i},e.prototype.addFrame=function(e,t,n,r,i){this.addFrameMatrix(e.worldTransform,t,n,r,i)},e.prototype.addFrameMatrix=function(e,t,n,r,i){var a=e.a,o=e.b,s=e.c,c=e.d,l=e.tx,u=e.ty,d=this.minX,f=this.minY,p=this.maxX,m=this.maxY,h=a*t+s*n+l,g=o*t+c*n+u;d=hp?h:p,m=g>m?g:m,h=a*r+s*n+l,g=o*r+c*n+u,d=hp?h:p,m=g>m?g:m,h=a*t+s*i+l,g=o*t+c*i+u,d=hp?h:p,m=g>m?g:m,h=a*r+s*i+l,g=o*r+c*i+u,d=hp?h:p,m=g>m?g:m,this.minX=d,this.minY=f,this.maxX=p,this.maxY=m},e.prototype.addVertexData=function(e,t,n){for(var r=this.minX,i=this.minY,a=this.maxX,o=this.maxY,s=t;sa?c:a,o=l>o?l:o}this.minX=r,this.minY=i,this.maxX=a,this.maxY=o},e.prototype.addVertices=function(e,t,n,r){this.addVerticesMatrix(e.worldTransform,t,n,r)},e.prototype.addVerticesMatrix=function(e,t,n,r,i,a){i===void 0&&(i=0),a===void 0&&(a=i);for(var o=e.a,s=e.b,c=e.c,l=e.d,u=e.tx,d=e.ty,f=this.minX,p=this.minY,m=this.maxX,h=this.maxY,g=n;gr?e.maxX:r,this.maxY=e.maxY>i?e.maxY:i},e.prototype.addBoundsMask=function(e,t){var n=e.minX>t.minX?e.minX:t.minX,r=e.minY>t.minY?e.minY:t.minY,i=e.maxXc?i:c,this.maxY=a>l?a:l}},e.prototype.addBoundsMatrix=function(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)},e.prototype.addBoundsArea=function(e,t){var n=e.minX>t.x?e.minX:t.x,r=e.minY>t.y?e.minY:t.y,i=e.maxXc?i:c,this.maxY=a>l?a:l}},e.prototype.pad=function(e,t){e===void 0&&(e=0),t===void 0&&(t=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)},e.prototype.addFramePad=function(e,t,n,r,i,a){e-=i,t-=a,n+=i,r+=a,this.minX=this.minXn?this.maxX:n,this.minY=this.minYr?this.maxY:r},e}(),uc=function(e,t){return uc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},uc(e,t)};function dc(e,t){uc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var fc=function(e){dc(t,e);function t(){var t=e.call(this)||this;return t.tempDisplayObjectParent=null,t.transform=new ia,t.alpha=1,t.visible=!0,t.renderable=!0,t.cullable=!1,t.cullArea=null,t.parent=null,t.worldAlpha=1,t._lastSortedIndex=0,t._zIndex=0,t.filterArea=null,t.filters=null,t._enabledFilters=null,t._bounds=new lc,t._localBounds=null,t._boundsID=0,t._boundsRect=null,t._localBoundsRect=null,t._mask=null,t._maskRefCount=0,t._destroyed=!1,t.isSprite=!1,t.isMask=!1,t}return t.mixin=function(e){for(var n=Object.keys(e),r=0;r1)for(var r=0;rthis.children.length)throw Error(e+`addChildAt: The index `+t+` supplied is out of bounds `+this.children.length);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit(`added`,this),this.emit(`childAdded`,e,this,t),e},t.prototype.swapChildren=function(e,t){if(e!==t){var n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e,this.onChildrenChange(n=this.children.length)throw Error(`The index `+t+` supplied is out of bounds `+this.children.length);var n=this.getChildIndex(e);hi(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)},t.prototype.getChildAt=function(e){if(e<0||e>=this.children.length)throw Error(`getChildAt: Index (`+e+`) does not exist.`);return this.children[e]},t.prototype.removeChild=function(){for(var e=arguments,t=[],n=0;n1)for(var r=0;r0&&i<=r){a=this.children.splice(n,i);for(var o=0;o1&&this.children.sort(mc),this.sortDirty=!1},t.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var e=0,t=this.children.length;e0&&n.height>0){var r,i;if(this.cullArea?(r=this.cullArea,i=this.worldTransform):this._render!==t.prototype._render&&(r=this.getBounds(!0)),r&&n.intersects(r,i))this._render(e);else if(this.cullArea)return;for(var a=0,o=this.children.length;anew Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),bc=class e{constructor(){this._breathParameters=[],this._currentTime=0}static create(){return new e}setParameters(e){this._breathParameters=e}getParameters(){return this._breathParameters}updateParameters(e,t){this._currentTime+=t;let n=this._currentTime*2*3.14159;for(let t=0;t=1&&(r=1,this._blinkingState=wc.EyeState_Closed,this._stateStartTimeSeconds=this._userTimeSeconds),n=1-r;break;case wc.EyeState_Closed:r=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._closedSeconds,r>=1&&(this._blinkingState=wc.EyeState_Opening,this._stateStartTimeSeconds=this._userTimeSeconds),n=0;break;case wc.EyeState_Opening:r=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._openingSeconds,r>=1&&(r=1,this._blinkingState=wc.EyeState_Interval,this._nextBlinkingTime=this.determinNextBlinkingTiming()),n=r;break;case wc.EyeState_Interval:this._nextBlinkingTime(e[e.EyeState_First=0]=`EyeState_First`,e[e.EyeState_Interval=1]=`EyeState_Interval`,e[e.EyeState_Closing=2]=`EyeState_Closing`,e[e.EyeState_Closed=3]=`EyeState_Closed`,e[e.EyeState_Opening=4]=`EyeState_Opening`,e))(wc||{});const Tc=.001,Ec=.5;var Dc=class e{static create(t){let n=new e;typeof t.FadeInTime==`number`&&(n._fadeTimeSeconds=t.FadeInTime,n._fadeTimeSeconds<=0&&(n._fadeTimeSeconds=Ec));let r=t.Groups,i=r.length;for(let e=0;eTc){if(i>=0)break;i=o,a=e.getPartOpacityByIndex(n),a+=t/this._fadeTimeSeconds,a>1&&(a=1)}}i<0&&(i=0,a=1);for(let t=n;ts&&(r=1-s/(1-a)),t>r&&(t=r),e.setPartOpacityByIndex(n,t)}}}constructor(){this._fadeTimeSeconds=Ec,this._lastModel=void 0,this._partGroups=[],this._partGroupCounts=[]}},Oc=class e{constructor(e){this.parameterIndex=0,this.partIndex=0,this.partId=``,this.link=[],e!=null&&this.assignment(e)}assignment(e){return this.partId=e.partId,this.link=e.link.map(e=>e.clone()),this}initialize(e){this.parameterIndex=e.getParameterIndex(this.partId),this.partIndex=e.getPartIndex(this.partId),e.setParameterValueByIndex(this.parameterIndex,1)}clone(){let t=new e;return t.partId=this.partId,t.parameterIndex=this.parameterIndex,t.partIndex=this.partIndex,t.link=this.link.map(e=>e.clone()),t}},kc=class e{constructor(e,t){this.x=e||0,this.y=t||0}add(t){let n=new e(0,0);return n.x=this.x+t.x,n.y=this.y+t.y,n}substract(t){let n=new e(0,0);return n.x=this.x-t.x,n.y=this.y-t.y,n}multiply(t){let n=new e(0,0);return n.x=this.x*t.x,n.y=this.y*t.y,n}multiplyByScaler(t){return this.multiply(new e(t,t))}division(t){let n=new e(0,0);return n.x=this.x/t.x,n.y=this.y/t.y,n}divisionByScalar(t){return this.division(new e(t,t))}getLength(){return Math.sqrt(this.x*this.x+this.y*this.y)}getDistanceWith(e){return Math.sqrt((this.x-e.x)*(this.x-e.x)+(this.y-e.y)*(this.y-e.y))}dot(e){return this.x*e.x+this.y*e.y}normalize(){let e=(this.x*this.x+this.y*this.y)**.5;this.x/=e,this.y/=e}isEqual(e){return this.x==e.x&&this.y==e.y}isNotEqual(e){return!this.isEqual(e)}};const Ac=class{static range(e,t,n){return en&&(e=n),e}static sin(e){return Math.sin(e)}static cos(e){return Math.cos(e)}static abs(e){return Math.abs(e)}static sqrt(e){return Math.sqrt(e)}static cbrt(e){if(e===0)return e;let t=e,n=t<0;n&&(t=-t);let r;return t===1/0?r=1/0:(r=Math.exp(Math.log(t)/3),r=(t/(r*r)+2*r)/3),n?-r:r}static getEasingSine(e){return e<0?0:e>1?1:.5-.5*this.cos(e*Math.PI)}static max(e,t){return e>t?e:t}static min(e,t){return e>t?t:e}static degreesToRadian(e){return e/180*Math.PI}static radianToDegrees(e){return e*180/Math.PI}static directionToRadian(e,t){let n=Math.atan2(t.y,t.x),r=Math.atan2(e.y,e.x),i=n-r;for(;i<-Math.PI;)i+=Math.PI*2;for(;i>Math.PI;)i-=Math.PI*2;return i}static directionToDegrees(e,t){let n=this.directionToRadian(e,t),r=this.radianToDegrees(n);return t.x-e.x>0&&(r=-r),r}static radianToDirection(e){let t=new kc;return t.x=this.sin(e),t.y=this.cos(e),t}static quadraticEquation(e,t,n){return this.abs(e)1&&(e=1),t<0?t=0:t>1&&(t=1),n<0?n=0:n>1&&(n=1),r<0?r=0:r>1&&(r=1),this._modelColor.R=e,this._modelColor.G=t,this._modelColor.B=n,this._modelColor.A=r}getModelColor(){return Object.assign({},this._modelColor)}setIsPremultipliedAlpha(e){this._isPremultipliedAlpha=e}isPremultipliedAlpha(){return this._isPremultipliedAlpha}setIsCulling(e){this._isCulling=e}isCulling(){return this._isCulling}setAnisotropy(e){this._anisortopy=e}getAnisotropy(){return this._anisortopy}getModel(){return this._model}constructor(){this._isCulling=!1,this._isPremultipliedAlpha=!1,this._anisortopy=0,this._modelColor=new Fc,this._mvpMatrix4x4=new Mc,this._mvpMatrix4x4.loadIdentity()}},Pc=(e=>(e[e.CubismBlendMode_Normal=0]=`CubismBlendMode_Normal`,e[e.CubismBlendMode_Additive=1]=`CubismBlendMode_Additive`,e[e.CubismBlendMode_Multiplicative=2]=`CubismBlendMode_Multiplicative`,e))(Pc||{}),Fc=class{constructor(){this.R=1,this.G=1,this.B=1,this.A=1}};let Ic=!1,Lc=!1,Rc;const zc={vertexOffset:0,vertexStep:2};var Bc=class{static startUp(e){if(Ic)return Wc(`CubismFramework.startUp() is already done.`),Ic;if(Live2DCubismCore._isStarted)return Ic=!0,!0;if(Live2DCubismCore._isStarted=!0,Rc=e,Rc&&Live2DCubismCore.Logging.csmSetLogFunction(Rc.logFunction),Ic=!0,Ic){let e=Live2DCubismCore.Version.csmGetVersion(),t=(e&4278190080)>>24,n=(e&16711680)>>16,r=e&65535,i=e;Wc(`Live2D Cubism Core version: {0}.{1}.{2} ({3})`,(`00`+t).slice(-2),(`00`+n).slice(-2),(`0000`+r).slice(-4),i)}return Wc(`CubismFramework.startUp() is complete.`),Ic}static cleanUp(){Ic=!1,Lc=!1,Rc=void 0}static initialize(){if(!Ic){Gc(`CubismFramework is not started.`);return}if(Lc){Gc(`CubismFramework.initialize() skipped, already initialized.`);return}Lc=!0,Wc(`CubismFramework.initialize() is complete.`)}static dispose(){if(!Ic){Gc(`CubismFramework is not started.`);return}if(!Lc){Gc(`CubismFramework.dispose() skipped, not initialized.`);return}Nc.staticRelease(),Lc=!1,Wc(`CubismFramework.dispose() is complete.`)}static isStarted(){return Ic}static isInitialized(){return Lc}static coreLogFunction(e){Live2DCubismCore.Logging.csmGetLogFunction()&&Live2DCubismCore.Logging.csmGetLogFunction()(e)}static getLoggingLevel(){return Rc==null?Vc.LogLevel_Off:Rc.loggingLevel}constructor(){}},Vc=(e=>(e[e.LogLevel_Verbose=0]=`LogLevel_Verbose`,e[e.LogLevel_Debug=1]=`LogLevel_Debug`,e[e.LogLevel_Info=2]=`LogLevel_Info`,e[e.LogLevel_Warning=3]=`LogLevel_Warning`,e[e.LogLevel_Error=4]=`LogLevel_Error`,e[e.LogLevel_Off=5]=`LogLevel_Off`,e))(Vc||{});const Hc=()=>{};function Uc(e,...t){qc.print(Vc.LogLevel_Debug,`[CSM][D]`+e+` +`,t)}function Wc(e,...t){qc.print(Vc.LogLevel_Info,`[CSM][I]`+e+` +`,t)}function Gc(e,...t){qc.print(Vc.LogLevel_Warning,`[CSM][W]`+e+` +`,t)}function Kc(e,...t){qc.print(Vc.LogLevel_Error,`[CSM][E]`+e+` +`,t)}var qc=class{static print(e,t,n){if(en[t]);r(i)}static dumpBytes(e,t,n){for(let r=0;r0?this.print(e,` +`):r%8==0&&r>0&&this.print(e,` `),this.print(e,`{0} `,[t[r]&255]);this.print(e,` +`)}constructor(){}},Jc=class{update(){this._model.update(),this._model.drawables.resetDynamicFlags()}getCanvasWidth(){return this._model==null?0:this._model.canvasinfo.CanvasWidth/this._model.canvasinfo.PixelsPerUnit}getCanvasHeight(){return this._model==null?0:this._model.canvasinfo.CanvasHeight/this._model.canvasinfo.PixelsPerUnit}saveParameters(){let e=this._model.parameters.count,t=this._savedParameters.length;for(let n=0;nt&&(t=this._model.parameters.minimumValues[e]),this._parameterValues[e]=n==1?t:this._parameterValues[e]=this._parameterValues[e]*(1-n)+t*n}setParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.setParameterValueByIndex(r,t,n)}addParameterValueByIndex(e,t,n=1){this.setParameterValueByIndex(e,this.getParameterValueByIndex(e)+t*n)}addParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.addParameterValueByIndex(r,t,n)}multiplyParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.multiplyParameterValueByIndex(r,t,n)}multiplyParameterValueByIndex(e,t,n=1){this.setParameterValueByIndex(e,this.getParameterValueByIndex(e)*(1+(t-1)*n))}getDrawableIds(){return this._drawableIds.slice()}getDrawableIndex(e){let t=this._model.drawables.count;for(let n=0;nt&&(e=t);for(let t=0;t0&&t.getEndTime()(e[e.ExpressionBlendType_Add=0]=`ExpressionBlendType_Add`,e[e.ExpressionBlendType_Multiply=1]=`ExpressionBlendType_Multiply`,e[e.ExpressionBlendType_Overwrite=2]=`ExpressionBlendType_Overwrite`,e))($c||{}),el;(e=>{e.supportMoreMaskDivisions=!0,e.setOpacityFromMotion=!1})(el||={});var tl=(e=>(e[e.CubismMotionCurveTarget_Model=0]=`CubismMotionCurveTarget_Model`,e[e.CubismMotionCurveTarget_Parameter=1]=`CubismMotionCurveTarget_Parameter`,e[e.CubismMotionCurveTarget_PartOpacity=2]=`CubismMotionCurveTarget_PartOpacity`,e))(tl||{}),nl=(e=>(e[e.CubismMotionSegmentType_Linear=0]=`CubismMotionSegmentType_Linear`,e[e.CubismMotionSegmentType_Bezier=1]=`CubismMotionSegmentType_Bezier`,e[e.CubismMotionSegmentType_Stepped=2]=`CubismMotionSegmentType_Stepped`,e[e.CubismMotionSegmentType_InverseStepped=3]=`CubismMotionSegmentType_InverseStepped`,e))(nl||{}),rl=class{constructor(e=0,t=0){this.time=e,this.value=t}},il=class{constructor(){this.basePointIndex=0,this.segmentType=0}},al=class{constructor(){this.id=``,this.type=0,this.segmentCount=0,this.baseSegmentIndex=0,this.fadeInTime=0,this.fadeOutTime=0}},ol=class{constructor(){this.fireTime=0,this.value=``}},sl=class{constructor(){this.duration=0,this.loop=!1,this.curveCount=0,this.eventCount=0,this.fps=0,this.curves=[],this.segments=[],this.points=[],this.events=[]}},cl=class{constructor(e){this._json=e}release(){this._json=void 0}getMotionDuration(){return this._json.Meta.Duration}isMotionLoop(){return this._json.Meta.Loop||!1}getEvaluationOptionFlag(e){return ll.EvaluationOptionFlag_AreBeziersRistricted==e?!!this._json.Meta.AreBeziersRestricted:!1}getMotionCurveCount(){return this._json.Meta.CurveCount}getMotionFps(){return this._json.Meta.Fps}getMotionTotalSegmentCount(){return this._json.Meta.TotalSegmentCount}getMotionTotalPointCount(){return this._json.Meta.TotalPointCount}getMotionFadeInTime(){return this._json.Meta.FadeInTime}getMotionFadeOutTime(){return this._json.Meta.FadeOutTime}getMotionCurveTarget(e){return this._json.Curves[e].Target}getMotionCurveId(e){return this._json.Curves[e].Id}getMotionCurveFadeInTime(e){return this._json.Curves[e].FadeInTime}getMotionCurveFadeOutTime(e){return this._json.Curves[e].FadeOutTime}getMotionCurveSegmentCount(e){return this._json.Curves[e].Segments.length}getMotionCurveSegment(e,t){return this._json.Curves[e].Segments[t]}getEventCount(){return this._json.Meta.UserDataCount||0}getTotalEventValueSize(){return this._json.Meta.TotalUserDataSize}getEventTime(e){return this._json.UserData[e].Time}getEventValue(e){return this._json.UserData[e].Value}},ll=(e=>(e[e.EvaluationOptionFlag_AreBeziersRistricted=0]=`EvaluationOptionFlag_AreBeziersRistricted`,e))(ll||{});const ul=`EyeBlink`,dl=`LipSync`,fl=`Model`,pl=`Parameter`,ml=`PartOpacity`,hl=!1;function gl(e,t,n){let r=new rl;return r.time=e.time+(t.time-e.time)*n,r.value=e.value+(t.value-e.value)*n,r}function _l(e,t){let n=(t-e[0].time)/(e[1].time-e[0].time);return n<0&&(n=0),e[0].value+(e[1].value-e[0].value)*n}function vl(e,t){let n=(t-e[0].time)/(e[3].time-e[0].time);n<0&&(n=0);let r=gl(e[0],e[1],n),i=gl(e[1],e[2],n),a=gl(e[2],e[3],n),o=gl(r,i,n),s=gl(i,a,n);return gl(o,s,n).value}function yl(e,t){let n=t,r=e[0].time,i=e[3].time,a=e[1].time,o=e[2].time,s=i-3*o+3*a-r,c=3*o-6*a+3*r,l=3*a-3*r,u=r-n,d=jc.cardanoAlgorithmForBezier(s,c,l,u),f=gl(e[0],e[1],d),p=gl(e[1],e[2],d),m=gl(e[2],e[3],d),h=gl(f,p,d),g=gl(p,m,d);return gl(h,g,d).value}function bl(e,t){return e[0].value}function xl(e,t){return e[1].value}function Sl(e,t,n){let r=e.curves[t],i=-1,a=r.baseSegmentIndex+r.segmentCount,o=0;for(let t=r.baseSegmentIndex;tn){i=t;break}if(i==-1)return e.points[o].value;let s=e.segments[i];return s.evaluate(e.points.slice(s.basePointIndex),n)}var Cl=class e extends Xc{constructor(){super(),this._eyeBlinkParameterIds=[],this._lipSyncParameterIds=[],this._sourceFrameRate=30,this._loopDurationSeconds=-1,this._isLoop=!1,this._isLoopFadeIn=!0,this._lastWeight=0}static create(t,n){let r=new e;return r.parse(t),r._sourceFrameRate=r._motionData.fps,r._loopDurationSeconds=r._motionData.duration,r._onFinishedMotion=n,r}doUpdateParameters(e,t,n,r){this._modelCurveIdEyeBlink??=ul,this._modelCurveIdLipSync??=dl;let i=t-r.getStartTime();i<0&&(i=0);let a=Number.MAX_VALUE,o=Number.MAX_VALUE,s=64,c=0,l=0;this._eyeBlinkParameterIds.length>s&&Uc(`too many eye blink targets : {0}`,this._eyeBlinkParameterIds.length),this._lipSyncParameterIds.length>s&&Uc(`too many lip sync targets : {0}`,this._lipSyncParameterIds.length);let u=this._fadeInSeconds<=0?1:jc.getEasingSine((t-r.getFadeInStartTime())/this._fadeInSeconds),d=this._fadeOutSeconds<=0||r.getEndTime()<0?1:jc.getEasingSine((r.getEndTime()-t)/this._fadeOutSeconds),f,p,m,h=i;if(this._isLoop)for(;h>this._motionData.duration;)h-=this._motionData.duration;let g=this._motionData.curves;for(p=0;p>t&1)continue;let i=r+(o-r)*n;e.setParameterValueById(this._eyeBlinkParameterIds[t],i)}if(a!=Number.MAX_VALUE)for(let t=0;t>t&1)continue;let i=r+(a-r)*n;e.setParameterValueById(this._lipSyncParameterIds[t],i)}for(;p=this._motionData.duration&&(this._isLoop?(r.setStartTime(t),this._isLoopFadeIn&&r.setFadeInStartTime(t)):(this._onFinishedMotion&&this._onFinishedMotion(this),r.setIsFinished(!0))),this._lastWeight=n}setIsLoop(e){this._isLoop=e}isLoop(){return this._isLoop}setIsLoopFadeIn(e){this._isLoopFadeIn=e}isLoopFadeIn(){return this._isLoopFadeIn}getDuration(){return this._isLoop?-1:this._loopDurationSeconds}getLoopDuration(){return this._loopDurationSeconds}setParameterFadeInTime(e,t){let n=this._motionData.curves;for(let r=0;rnew al),this._motionData.segments=Array.from({length:t.getMotionTotalSegmentCount()}).map(()=>new il),this._motionData.events=Array.from({length:this._motionData.eventCount}).map(()=>new ol),this._motionData.points=[];let a=0,o=0;for(let e=0;ee&&this._motionData.events[n].fireTime<=t&&this._firedEventValues.push(this._motionData.events[n].value);return this._firedEventValues}},wl=class{constructor(){this._autoDelete=!1,this._available=!0,this._finished=!1,this._started=!1,this._startTimeSeconds=-1,this._fadeInStartTimeSeconds=0,this._endTimeSeconds=-1,this._stateTimeSeconds=0,this._stateWeight=0,this._lastEventCheckSeconds=0,this._motionQueueEntryHandle=this,this._fadeOutSeconds=0,this._isTriggeredFadeOut=!1}release(){this._autoDelete&&this._motion&&this._motion.release()}setFadeOut(e){this._fadeOutSeconds=e,this._isTriggeredFadeOut=!0}startFadeOut(e,t){let n=t+e;this._isTriggeredFadeOut=!0,(this._endTimeSeconds<0||nt!=null&&t._motionQueueEntryHandle==e)}setEventCallback(e,t=null){this._eventCallBack=e,this._eventCustomData=t}doUpdateMotion(e,t){let n=!1,r=0;for(;r(e[e.CubismPhysicsTargetType_Parameter=0]=`CubismPhysicsTargetType_Parameter`,e))(Dl||{}),Ol=(e=>(e[e.CubismPhysicsSource_X=0]=`CubismPhysicsSource_X`,e[e.CubismPhysicsSource_Y=1]=`CubismPhysicsSource_Y`,e[e.CubismPhysicsSource_Angle=2]=`CubismPhysicsSource_Angle`,e))(Ol||{}),kl=class{constructor(){this.initialPosition=new kc(0,0),this.position=new kc(0,0),this.lastPosition=new kc(0,0),this.lastGravity=new kc(0,0),this.force=new kc(0,0),this.velocity=new kc(0,0)}},Al=class{constructor(){this.normalizationPosition={},this.normalizationAngle={}}},jl=class{constructor(){this.source={}}},Ml=class{constructor(){this.destination={},this.translationScale=new kc(0,0)}},Nl=class{constructor(){this.settings=[],this.inputs=[],this.outputs=[],this.particles=[],this.gravity=new kc(0,0),this.wind=new kc(0,0)}},Pl=class{constructor(e){this._json=e}release(){this._json=void 0}getGravity(){let e=new kc(0,0);return e.x=this._json.Meta.EffectiveForces.Gravity.X,e.y=this._json.Meta.EffectiveForces.Gravity.Y,e}getWind(){let e=new kc(0,0);return e.x=this._json.Meta.EffectiveForces.Wind.X,e.y=this._json.Meta.EffectiveForces.Wind.Y,e}getSubRigCount(){return this._json.Meta.PhysicsSettingCount}getTotalInputCount(){return this._json.Meta.TotalInputCount}getTotalOutputCount(){return this._json.Meta.TotalOutputCount}getVertexCount(){return this._json.Meta.VertexCount}getNormalizationPositionMinimumValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Minimum}getNormalizationPositionMaximumValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Maximum}getNormalizationPositionDefaultValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Default}getNormalizationAngleMinimumValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Minimum}getNormalizationAngleMaximumValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Maximum}getNormalizationAngleDefaultValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Default}getInputCount(e){return this._json.PhysicsSettings[e].Input.length}getInputWeight(e,t){return this._json.PhysicsSettings[e].Input[t].Weight}getInputReflect(e,t){return this._json.PhysicsSettings[e].Input[t].Reflect}getInputType(e,t){return this._json.PhysicsSettings[e].Input[t].Type}getInputSourceId(e,t){return this._json.PhysicsSettings[e].Input[t].Source.Id}getOutputCount(e){return this._json.PhysicsSettings[e].Output.length}getOutputVertexIndex(e,t){return this._json.PhysicsSettings[e].Output[t].VertexIndex}getOutputAngleScale(e,t){return this._json.PhysicsSettings[e].Output[t].Scale}getOutputWeight(e,t){return this._json.PhysicsSettings[e].Output[t].Weight}getOutputDestinationId(e,t){return this._json.PhysicsSettings[e].Output[t].Destination.Id}getOutputType(e,t){return this._json.PhysicsSettings[e].Output[t].Type}getOutputReflect(e,t){return this._json.PhysicsSettings[e].Output[t].Reflect}getParticleCount(e){return this._json.PhysicsSettings[e].Vertices.length}getParticleMobility(e,t){return this._json.PhysicsSettings[e].Vertices[t].Mobility}getParticleDelay(e,t){return this._json.PhysicsSettings[e].Vertices[t].Delay}getParticleAcceleration(e,t){return this._json.PhysicsSettings[e].Vertices[t].Acceleration}getParticleRadius(e,t){return this._json.PhysicsSettings[e].Vertices[t].Radius}getParticlePosition(e,t){let n=new kc(0,0);return n.x=this._json.PhysicsSettings[e].Vertices[t].Position.X,n.y=this._json.PhysicsSettings[e].Vertices[t].Position.Y,n}};const Fl=`X`,Il=`Y`,Ll=`Angle`,Rl=5,zl=100,Bl=.001;var Vl=class e{static create(t){let n=new e;return n.parse(t),n._physicsRig.gravity.y=0,n}evaluate(e,t){let n,r,i,a,o=new kc,s,c,l,u,d,f,p,m;d=e.getModel().parameters.values,f=e.getModel().parameters.maximumValues,p=e.getModel().parameters.minimumValues,m=e.getModel().parameters.defaultValues;for(let h=0;h=s.particleCount)break;l[t].destinationParameterIndex==-1&&(l[t].destinationParameterIndex=e.getParameterIndex(l[t].destination.id));let r=new kc;r.x=u[n].position.x-u[n-1].position.x,r.y=u[n].position.y-u[n-1].position.y,a=l[t].getValue(r,u,n,l[t].reflect,this._options.gravity);let i=l[t].destinationParameterIndex,o=!Float32Array.prototype.slice&&`subarray`in Float32Array.prototype?JSON.parse(JSON.stringify(d.subarray(i))):d.slice(i);tu(o,p[i],f[i],a,l[t]);for(let e=i,t=0;e=2?t[n-1].position.substract(t[n-2].position):i.multiplyByScaler(-1),a=jc.directionToRadian(i,e),r&&(a*=-1),a}function Yl(e,t){return Math.abs(Math.max(e,t)-Math.min(e,t))}function Xl(e,t){let n=Math.min(e,t);return n+Yl(e,t)/2}function Zl(e,t){return e.x}function Ql(e,t){return e.y}function $l(e,t){return t}function eu(e,t,n,r,i,a,o,s){let c,l,u,d,f=new kc(0,0),p=new kc(0,0),m=new kc(0,0),h=new kc(0,0);e[0].position=new kc(n.x,n.y),c=jc.degreesToRadian(r),d=jc.radianToDirection(c),d.normalize();for(let n=1;nn&&(o>i.valueExceededMaximum&&(i.valueExceededMaximum=o),o=n),s=i.weight/zl,s>=1||(o=e[0]*(1-s)+o*s),e[0]=o}function nu(e,t,n,r,i,a,o,s){let c=0,l=jc.max(n,t);le&&(e=u);let d=jc.min(i,a),f=jc.max(i,a),p=o,m=Xl(u,l),h=e-m;switch(Math.sign(h)){case 1:{let e=f-p,t=l-m;t!=0&&(c=h*(e/t),c+=p);break}case-1:{let e=d-p,t=u-m;t!=0&&(c=h*(e/t),c+=p);break}case 0:c=p;break}return s?c:c*-1}var ru=class{constructor(e=0,t=0,n=0,r=0){this.x=e,this.y=t,this.width=n,this.height=r}getCenterX(){return this.x+.5*this.width}getCenterY(){return this.y+.5*this.height}getRight(){return this.x+this.width}getBottom(){return this.y+this.height}setRect(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height}expand(e,t){this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2}};const iu=4,au=10;let ou,su,cu;var lu=class{getChannelFlagAsColor(e){return this._channelColors[e]}getMaskRenderTexture(){let e=0;if(this._maskTexture&&this._maskTexture.texture!=0&&(this._maskTexture.frameNo=this._currentFrameNo,e=this._maskTexture.texture),e==0){let t=this._clippingMaskBufferSize;this._colorBuffer=this.gl.createTexture(),this.gl.bindTexture(this.gl.TEXTURE_2D,this._colorBuffer),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,t,t,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,null),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.bindTexture(this.gl.TEXTURE_2D,null),e=this.gl.createFramebuffer(),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e),this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,this.gl.TEXTURE_2D,this._colorBuffer,0),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,cu),this._maskTexture=new uu(this._currentFrameNo,e)}return e}setGL(e){this.gl=e}calcClippedDrawTotalBounds(e,t){let n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,o=t._clippedDrawableIndexList.length;for(let s=0;sf&&(f=t),np&&(p=n)}if(u!=Number.MAX_VALUE)if(ui&&(i=f),p>a&&(a=p),n==Number.MAX_VALUE)t._allClippedDrawRect.x=0,t._allClippedDrawRect.y=0,t._allClippedDrawRect.width=0,t._allClippedDrawRect.height=0,t._isUsing=!1;else{t._isUsing=!0;let e=i-n,o=a-r;t._allClippedDrawRect.x=n,t._allClippedDrawRect.y=r,t._allClippedDrawRect.width=e,t._allClippedDrawRect.height=o}}}constructor(){this._maskRenderTexture=null,this._colorBuffer=null,this._currentFrameNo=0,this._clippingMaskBufferSize=256,this._clippingContextListForMask=[],this._clippingContextListForDraw=[],this._channelColors=[],this._tmpBoundsOnModel=new ru,this._tmpMatrix=new Mc,this._tmpMatrixForMask=new Mc,this._tmpMatrixForDraw=new Mc;let e=new Fc;e.R=1,e.G=0,e.B=0,e.A=0,this._channelColors.push(e),e=new Fc,e.R=0,e.G=1,e.B=0,e.A=0,this._channelColors.push(e),e=new Fc,e.R=0,e.G=0,e.B=1,e.A=0,this._channelColors.push(e),e=new Fc,e.R=0,e.G=0,e.B=0,e.A=1,this._channelColors.push(e)}release(){var e,t,n;let r=this;for(let t=0;t0){this.gl.viewport(0,0,this._clippingMaskBufferSize,this._clippingMaskBufferSize),this._maskRenderTexture=this.getMaskRenderTexture(),t.getMvpMatrix(),t.preDraw(),this.setupLayoutBounds(n),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this._maskRenderTexture),this.gl.clearColor(1,1,1,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT);for(let n=0;n(e[e.ShaderNames_SetupMask=0]=`ShaderNames_SetupMask`,e[e.ShaderNames_NormalPremultipliedAlpha=1]=`ShaderNames_NormalPremultipliedAlpha`,e[e.ShaderNames_NormalMaskedPremultipliedAlpha=2]=`ShaderNames_NormalMaskedPremultipliedAlpha`,e[e.ShaderNames_NomralMaskedInvertedPremultipliedAlpha=3]=`ShaderNames_NomralMaskedInvertedPremultipliedAlpha`,e[e.ShaderNames_AddPremultipliedAlpha=4]=`ShaderNames_AddPremultipliedAlpha`,e[e.ShaderNames_AddMaskedPremultipliedAlpha=5]=`ShaderNames_AddMaskedPremultipliedAlpha`,e[e.ShaderNames_AddMaskedPremultipliedAlphaInverted=6]=`ShaderNames_AddMaskedPremultipliedAlphaInverted`,e[e.ShaderNames_MultPremultipliedAlpha=7]=`ShaderNames_MultPremultipliedAlpha`,e[e.ShaderNames_MultMaskedPremultipliedAlpha=8]=`ShaderNames_MultMaskedPremultipliedAlpha`,e[e.ShaderNames_MultMaskedPremultipliedAlphaInverted=9]=`ShaderNames_MultMaskedPremultipliedAlphaInverted`,e))(pu||{});const mu=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_myPos;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_clipMatrix * a_position; v_myPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,hu=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_myPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;void main(){ float isInside = step(u_baseColor.x, v_myPos.x/v_myPos.w) * step(u_baseColor.y, v_myPos.y/v_myPos.w) * step(v_myPos.x/v_myPos.w, u_baseColor.z) * step(v_myPos.y/v_myPos.w, u_baseColor.w); gl_FragColor = u_channelFlag * texture2D(s_texture0, v_texCoord).a * isInside;}`,gu=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;uniform mat4 u_matrix;void main(){ gl_Position = u_matrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,_u=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform mat4 u_matrix;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_matrix * a_position; v_clipPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,vu=`precision mediump float;varying vec2 v_texCoord;uniform vec4 u_baseColor;uniform sampler2D s_texture0;void main(){ gl_FragColor = texture2D(s_texture0 , v_texCoord) * u_baseColor;}`,yu=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;uniform sampler2D s_texture1;void main(){ vec4 col_formask = texture2D(s_texture0 , v_texCoord) * u_baseColor; vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag; float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a; col_formask = col_formask * maskVal; gl_FragColor = col_formask;}`,bu=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform sampler2D s_texture0;uniform sampler2D s_texture1;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;void main(){vec4 col_formask = texture2D(s_texture0, v_texCoord) * u_baseColor;vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag;float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a;col_formask = col_formask * (1.0 - maskVal);gl_FragColor = col_formask;}`;var xu=class extends Nc{constructor(){super(),this._clippingContextBufferForMask=null,this._clippingContextBufferForDraw=null,this._clippingManager=new lu,this.firstDraw=!0,this._textures={},this._sortedDrawableIndexList=[],this._bufferData={vertex:null,uv:null,index:null}}initialize(e){e.isUsingMasking()&&(this._clippingManager=new lu,this._clippingManager.initialize(e,e.getDrawableCount(),e.getDrawableMasks(),e.getDrawableMaskCounts()));for(let t=e.getDrawableCount()-1;t>=0;t--)this._sortedDrawableIndexList[t]=0;super.initialize(e)}bindTexture(e,t){this._textures[e]=t}getBindedTextures(){return this._textures}setClippingMaskBufferSize(e){this._clippingManager.release(),this._clippingManager=new lu,this._clippingManager.setClippingMaskBufferSize(e),this._clippingManager.initialize(this.getModel(),this.getModel().getDrawableCount(),this.getModel().getDrawableMasks(),this.getModel().getDrawableMaskCounts())}getClippingMaskBufferSize(){return this._clippingManager.getClippingMaskBufferSize()}release(){var e,t,n;let r=this;this._clippingManager.release(),r._clippingManager=void 0,(e=this.gl)==null||e.deleteBuffer(this._bufferData.vertex),this._bufferData.vertex=null,(t=this.gl)==null||t.deleteBuffer(this._bufferData.uv),this._bufferData.uv=null,(n=this.gl)==null||n.deleteBuffer(this._bufferData.index),this._bufferData.index=null,r._bufferData=void 0,r._textures=void 0}doDrawModel(){this.preDraw(),this._clippingManager!=null&&this._clippingManager.setupClippingContext(this.getModel(),this);let e=this.getModel().getDrawableCount(),t=this.getModel().getDrawableRenderOrders();for(let n=0;n{xu.doStaticRelease()};var Su=class{constructor(e){this.groups=e.Groups,this.hitAreas=e.HitAreas,this.layout=e.Layout,this.moc=e.FileReferences.Moc,this.expressions=e.FileReferences.Expressions,this.motions=e.FileReferences.Motions,this.textures=e.FileReferences.Textures,this.physics=e.FileReferences.Physics,this.pose=e.FileReferences.Pose}getEyeBlinkParameters(){var e,t;return(t=(e=this.groups)?.find(e=>e.Name===`EyeBlink`))?.Ids}getLipSyncParameters(){var e,t;return(t=(e=this.groups)?.find(e=>e.Name===`LipSync`))?.Ids}};const Cu=`ParamAngleX`,wu=`ParamAngleY`,Tu=`ParamAngleZ`,Eu=`ParamEyeBallX`,Du=`ParamEyeBallY`,Ou=`ParamBodyAngleX`,ku=`ParamBreath`,Au=2,ju=2;var Mu;(e=>{e.LOG_LEVEL_VERBOSE=0,e.LOG_LEVEL_WARNING=1,e.LOG_LEVEL_ERROR=2,e.LOG_LEVEL_NONE=999,e.logLevel=e.LOG_LEVEL_WARNING,e.sound=!0,e.motionSync=!0,e.motionFadingDuration=500,e.idleMotionFadingDuration=2e3,e.expressionFadingDuration=500,e.preserveExpressionOnMotion=!0,e.cubism4=el})(Mu||={});const Nu={log(e,...t){Mu.logLevel<=Mu.LOG_LEVEL_VERBOSE&&console.log(`[${e}]`,...t)},warn(e,...t){Mu.logLevel<=Mu.LOG_LEVEL_WARNING&&console.warn(`[${e}]`,...t)},error(e,...t){Mu.logLevel<=Mu.LOG_LEVEL_ERROR&&console.error(`[${e}]`,...t)}};function Pu(e,t,n){return en?n:e}function Fu(e,t){t.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(n=>{n!==`constructor`&&Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})})}function Iu(e){let t=e.lastIndexOf(`/`);return t!=-1&&(e=e.slice(0,t)),t=e.lastIndexOf(`/`),t!==-1&&(e=e.slice(t+1)),e}function Lu(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}var Ru=class extends Xr.default{constructor(e,t){super(),this.expressions=[],this.reserveExpressionIndex=-1,this.destroyed=!1,this.settings=e,this.tag=`ExpressionManager(${e.name})`}init(){this.defaultExpression=this.createExpression({},void 0),this.currentExpression=this.defaultExpression,this.stopAllExpressions()}loadExpression(e){return yc(this,null,function*(){if(!this.definitions[e]){Nu.warn(this.tag,`Undefined expression at [${e}]`);return}if(this.expressions[e]===null){Nu.warn(this.tag,`Cannot set expression at [${e}] because it's already failed in loading.`);return}if(this.expressions[e])return this.expressions[e];let t=yield this._loadExpression(e);return this.expressions[e]=t,t})}_loadExpression(e){throw Error(`Not implemented.`)}setRandomExpression(){return yc(this,null,function*(){if(this.definitions.length){let e=[];for(let t=0;t-1&&ec&&(a*=c/s,o*=c/s),this.vx+=a,this.vy+=o;let l=Math.sqrt(vc(this.vx,2)+vc(this.vy,2)),u=.5*(Math.sqrt(vc(c,2)+8*c*r)-c);l>u&&(this.vx*=u/l,this.vy*=u/l),this.x+=this.vx,this.y+=this.vy}},Uu=class{constructor(e){this.json=e;let t=e.url;if(typeof t!=`string`)throw TypeError("The `url` field in settings JSON must be defined as a string.");this.url=t,this.name=Iu(this.url)}resolveURL(e){return $r.resolve(this.url,e)}replaceFiles(e){this.moc=e(this.moc,`moc`),this.pose!==void 0&&(this.pose=e(this.pose,`pose`)),this.physics!==void 0&&(this.physics=e(this.physics,`physics`));for(let t=0;t(e.push(t),t)),e}validateFiles(e){let t=(t,n)=>{let r=this.resolveURL(t);if(!e.includes(r)){if(n)throw Error(`File "${t}" is defined in settings, but doesn't exist in given files`);return!1}return!0},n=[this.moc,...this.textures];n.forEach(e=>t(e,!0));let r=this.getDefinedFiles();return r.filter(e=>t(e,!1))}},Wu=(e=>(e[e.NONE=0]=`NONE`,e[e.IDLE=1]=`IDLE`,e[e.NORMAL=2]=`NORMAL`,e[e.FORCE=3]=`FORCE`,e))(Wu||{}),Gu=class{constructor(){this.debug=!1,this.currentPriority=0,this.reservePriority=0}reserve(e,t,n){if(n<=0)return Nu.log(this.tag,`Cannot start a motion with MotionPriority.NONE.`),!1;if(e===this.currentGroup&&t===this.currentIndex)return Nu.log(this.tag,`Motion is already playing.`,this.dump(e,t)),!1;if(e===this.reservedGroup&&t===this.reservedIndex||e===this.reservedIdleGroup&&t===this.reservedIdleIndex)return Nu.log(this.tag,`Motion is already reserved.`,this.dump(e,t)),!1;if(n===1){if(this.currentPriority!==0)return Nu.log(this.tag,`Cannot start idle motion because another motion is playing.`,this.dump(e,t)),!1;if(this.reservedIdleGroup!==void 0)return Nu.log(this.tag,`Cannot start idle motion because another idle motion has reserved.`,this.dump(e,t)),!1;this.setReservedIdle(e,t)}else{if(n<3){if(n<=this.currentPriority)return Nu.log(this.tag,`Cannot start motion because another motion is playing as an equivalent or higher priority.`,this.dump(e,t)),!1;if(n<=this.reservePriority)return Nu.log(this.tag,`Cannot start motion because another motion has reserved as an equivalent or higher priority.`,this.dump(e,t)),!1}this.setReserved(e,t,n)}return!0}start(e,t,n,r){if(r===1){if(this.setReservedIdle(void 0,void 0),this.currentPriority!==0)return Nu.log(this.tag,`Cannot start idle motion because another motion is playing.`,this.dump(t,n)),!1}else{if(t!==this.reservedGroup||n!==this.reservedIndex)return Nu.log(this.tag,`Cannot start motion because another motion has taken the place.`,this.dump(t,n)),!1;this.setReserved(void 0,void 0,0)}return e?(this.setCurrent(t,n,r),!0):!1}complete(){this.setCurrent(void 0,void 0,0)}setCurrent(e,t,n){this.currentPriority=n,this.currentGroup=e,this.currentIndex=t}setReserved(e,t,n){this.reservePriority=n,this.reservedGroup=e,this.reservedIndex=t}setReservedIdle(e,t){this.reservedIdleGroup=e,this.reservedIdleIndex=t}isActive(e,t){return e===this.currentGroup&&t===this.currentIndex||e===this.reservedGroup&&t===this.reservedIndex||e===this.reservedIdleGroup&&t===this.reservedIdleIndex}reset(){this.setCurrent(void 0,void 0,0),this.setReserved(void 0,void 0,0),this.setReservedIdle(void 0,void 0)}shouldRequestIdleMotion(){return this.currentGroup===void 0&&this.reservedIdleGroup===void 0}shouldOverrideExpression(){return!Mu.preserveExpressionOnMotion&&this.currentPriority>1}dump(e,t){if(this.debug){let n=[`currentPriority`,`reservePriority`,`currentGroup`,`currentIndex`,`reservedGroup`,`reservedIndex`,`reservedIdleGroup`,`reservedIdleIndex`];return` + group = "${e}", index = ${t} +`+n.map(e=>`[`+e+`] `+this[e]).join(` +`)}return``}};const Ku=`SoundManager`,qu=.5;var Ju=class{static get volume(){return this._volume}static set volume(e){this._volume=(e>1?1:e<0?0:e)||0,this.audios.forEach(e=>e.volume=this._volume)}static add(e,t,n){let r=new Audio(e);return r.volume=this._volume,r.preload=`auto`,r.addEventListener(`ended`,()=>{this.dispose(r),t?.()}),r.addEventListener(`error`,t=>{this.dispose(r),Nu.warn(Ku,`Error occurred on "${e}"`,t.error),n?.(t.error)}),this.audios.push(r),r}static play(e){return new Promise((t,n)=>{var r;(r=e.play())==null||r.catch(t=>{e.dispatchEvent(new ErrorEvent(`error`,{error:t})),n(t)}),e.readyState===e.HAVE_ENOUGH_DATA?t():e.addEventListener(`canplaythrough`,t)})}static dispose(e){e.pause(),e.removeAttribute(`src`),Lu(this.audios,e)}static destroy(){for(let e=this.audios.length-1;e>=0;e--)this.dispose(this.audios[e])}};Ju.audios=[],Ju._volume=qu;var Yu=class extends Xr.default{constructor(e,t){super(),this.motionGroups={},this.state=new Gu,this.playing=!1,this.destroyed=!1,this.settings=e,this.tag=`MotionManager(${e.name})`,this.state.tag=this.tag}init(e){e?.idleMotionGroup&&(this.groups.idle=e.idleMotionGroup),this.setupMotions(e),this.stopAllMotions()}setupMotions(e){for(let e of Object.keys(this.definitions))this.motionGroups[e]=[];let t;switch(e?.motionPreload){case`NONE`:return;case`ALL`:t=Object.keys(this.definitions);break;case`IDLE`:default:t=[this.groups.idle];break}for(let e of t)if(this.definitions[e])for(let t=0;tthis.currentAudio=void 0,()=>this.currentAudio=void 0),this.currentAudio=a}catch(t){Nu.warn(this.tag,`Failed to create audio`,e,t)}}let o=yield this.loadMotion(e,t);if(a){let e=Ju.play(a).catch(e=>Nu.warn(this.tag,`Failed to play audio`,a.src,e));Mu.motionSync&&(yield e)}return this.state.start(o,e,t,n)?(Nu.log(this.tag,`Start motion:`,this.getMotionName(i)),this.emit(`motionStart`,e,t,a),this.state.shouldOverrideExpression()&&this.expressionManager&&this.expressionManager.resetExpression(),this.playing=!0,this._startMotion(o),!0):(a&&(Ju.dispose(a),this.currentAudio=void 0),!1)})}startRandomMotion(e,t){return yc(this,null,function*(){let n=this.definitions[e];if(n?.length){let r=[];for(let t=0;te.index>=0);for(let t of e)this.hitAreas[t.name]=t}hitTest(e,t){return Object.keys(this.hitAreas).filter(n=>this.isHit(n,e,t))}isHit(e,t,n){if(!this.hitAreas[e])return!1;let r=this.hitAreas[e].index,i=this.getDrawableBounds(r,Xu);return i.x<=t&&t<=i.x+i.width&&i.y<=n&&n<=i.y+i.height}getDrawableBounds(e,t){let n=this.getDrawableVertices(e),r=n[0],i=n[0],a=n[1],o=n[1];for(let e=0;e{(a.status===200||a.status===0)&&a.response?r(a.response):a.onerror()},a.onerror=()=>{Nu.warn(Qu,`Failed to load resource as ${a.responseType} (Status ${a.status}): ${t}`),i(new $u(`Network error.`,t,a.status))},a.onabort=()=>i(new $u(`Aborted.`,t,a.status,!0)),a.onloadend=()=>{var t;ed.allXhrSet.delete(a),e&&((t=ed.xhrMap.get(e))==null||t.delete(a))},a}static cancelXHRs(){var e;(e=ed.xhrMap.get(this))==null||e.forEach(e=>{e.abort(),ed.allXhrSet.delete(e)}),ed.xhrMap.delete(this)}static release(){ed.allXhrSet.forEach(e=>e.abort()),ed.allXhrSet.clear(),ed.xhrMap=new WeakMap}};let td=ed;td.xhrMap=new WeakMap,td.allXhrSet=new Set,td.loader=(e,t)=>new Promise((t,n)=>{let r=ed.createXHR(e.target,e.settings?e.settings.resolveURL(e.url):e.url,e.type,n=>{e.result=n,t()},n);r.send()});function nd(e,t){let n=-1;return r(0);function r(i,a){if(a)return Promise.reject(a);if(i<=n)return Promise.reject(Error(`next() called multiple times`));n=i;let o=e[i];if(!o)return Promise.resolve();try{return Promise.resolve(o(t,r.bind(null,i+1)))}catch(e){return Promise.reject(e)}}}var rd=class{static load(e){return nd(this.middlewares,e).then(()=>e.result)}};rd.middlewares=[td.loader];function id(e,t={}){var n;let r={resourceOptions:{crossorigin:t.crossOrigin}};if(ja.fromURL)return ja.fromURL(e,r).catch(e=>{if(e instanceof Error)throw e;let t=Error(`Texture loading error`);throw t.event=e,t});r.resourceOptions.autoLoad=!1;let i=ja.from(e,r);if(i.baseTexture.valid)return Promise.resolve(i);let a=i.baseTexture.resource;return(n=a._live2d_load)??(a._live2d_load=new Promise((e,t)=>{let n=e=>{a.source.removeEventListener(`error`,n);let r=Error(`Texture loading error`);r.event=e,t(r)};a.source.addEventListener(`error`,n),a.load().then(()=>e(i)).catch(n)})),a._live2d_load}const ad=`Live2DFactory`,od=(e,t)=>yc(void 0,null,function*(){if(typeof e.source==`string`){let t=yield rd.load({url:e.source,type:`json`,target:e.live2dModel});t.url=e.source,e.source=t,e.live2dModel.emit(`settingsJSONLoaded`,t)}return t()}),sd=(e,t)=>yc(void 0,null,function*(){if(e.source instanceof Uu)return e.settings=e.source,t();if(typeof e.source==`object`){let n=pd.findRuntime(e.source);if(n){let r=n.createModelSettings(e.source);return e.settings=r,e.live2dModel.emit(`settingsLoaded`,r),t()}}throw TypeError(`Unknown settings format.`)}),cd=(e,t)=>{if(e.settings){let n=pd.findRuntime(e.settings);if(n)return n.ready().then(t)}return t()},ld=(e,t)=>yc(void 0,null,function*(){yield t();let n=e.internalModel;if(n){let t=e.settings,r=pd.findRuntime(t);if(r){let i=[];t.pose&&i.push(rd.load({settings:t,url:t.pose,type:`json`,target:n}).then(t=>{n.pose=r.createPose(n.coreModel,t),e.live2dModel.emit(`poseLoaded`,n.pose)}).catch(t=>{e.live2dModel.emit(`poseLoadError`,t),Nu.warn(ad,`Failed to load pose.`,t)})),t.physics&&i.push(rd.load({settings:t,url:t.physics,type:`json`,target:n}).then(t=>{n.physics=r.createPhysics(n.coreModel,t),e.live2dModel.emit(`physicsLoaded`,n.physics)}).catch(t=>{e.live2dModel.emit(`physicsLoadError`,t),Nu.warn(ad,`Failed to load physics.`,t)})),i.length&&(yield Promise.all(i))}}}),ud=(e,t)=>yc(void 0,null,function*(){if(e.settings){let n=e.live2dModel,r=e.settings.textures.map(t=>{let n=e.settings.resolveURL(t);return id(n,{crossOrigin:e.options.crossOrigin})});if(yield t(),e.internalModel)n.internalModel=e.internalModel,n.emit(`modelLoaded`,e.internalModel);else throw TypeError(`Missing internal model.`);n.textures=yield Promise.all(r),n.emit(`textureLoaded`,n.textures)}else throw TypeError(`Missing settings.`)}),dd=(e,t)=>yc(void 0,null,function*(){let n=e.settings;if(n instanceof Uu){let r=pd.findRuntime(n);if(!r)throw TypeError(`Unknown model settings.`);let i=yield rd.load({settings:n,url:n.moc,type:`arraybuffer`,target:e.live2dModel});if(!r.isValidMoc(i))throw Error(`Invalid moc data`);let a=r.createCoreModel(i);return e.internalModel=r.createInternalModel(a,n,e.options),t()}throw TypeError(`Missing settings.`)}),fd=class{static registerRuntime(e){fd.runtimes.push(e),fd.runtimes.sort((e,t)=>t.version-e.version)}static findRuntime(e){for(let t of fd.runtimes)if(t.test(e))return t}static setupLive2DModel(e,t,n){return yc(this,null,function*(){let r=new Promise(t=>e.once(`textureLoaded`,t)),i=new Promise(t=>e.once(`modelLoaded`,t)),a=Promise.all([r,i]).then(()=>e.emit(`ready`));yield nd(fd.live2DModelMiddlewares,{live2dModel:e,source:t,options:n||{}}),yield a,e.emit(`load`)})}static loadMotion(e,t,n){var r,i;let a=r=>e.emit(`motionLoadError`,t,n,r);try{let o=(r=e.definitions[t])?.[n];if(!o)return Promise.resolve(void 0);e.listeners(`destroy`).includes(fd.releaseTasks)||e.once(`destroy`,fd.releaseTasks);let s=fd.motionTasksMap.get(e);s||(s={},fd.motionTasksMap.set(e,s));let c=s[t];c||(c=[],s[t]=c);let l=e.getMotionFile(o);return(i=c[n])??(c[n]=rd.load({url:l,settings:e.settings,type:e.motionDataType,target:e}).then(r=>{var i;let a=(i=fd.motionTasksMap.get(e))?.[t];a&&delete a[n];let s=e.createMotion(r,t,o);return e.emit(`motionLoaded`,t,n,s),s}).catch(t=>{Nu.warn(e.tag,`Failed to load motion: ${l} +`,t),a(t)})),c[n]}catch(r){Nu.warn(e.tag,`Failed to load motion at "${t}"[${n}] +`,r),a(r)}return Promise.resolve(void 0)}static loadExpression(e,t){var n;let r=n=>e.emit(`expressionLoadError`,t,n);try{let i=e.definitions[t];if(!i)return Promise.resolve(void 0);e.listeners(`destroy`).includes(fd.releaseTasks)||e.once(`destroy`,fd.releaseTasks);let a=fd.expressionTasksMap.get(e);a||(a=[],fd.expressionTasksMap.set(e,a));let o=e.getExpressionFile(i);return(n=a[t])??(a[t]=rd.load({url:o,settings:e.settings,type:`json`,target:e}).then(n=>{let r=fd.expressionTasksMap.get(e);r&&delete r[t];let a=e.createExpression(n,i);return e.emit(`expressionLoaded`,t,a),a}).catch(t=>{Nu.warn(e.tag,`Failed to load expression: ${o} +`,t),r(t)})),a[t]}catch(n){Nu.warn(e.tag,`Failed to load expression at [${t}] +`,n),r(n)}return Promise.resolve(void 0)}static releaseTasks(){this instanceof Yu?fd.motionTasksMap.delete(this):fd.expressionTasksMap.delete(this)}};let pd=fd;pd.runtimes=[],pd.urlToJSON=od,pd.jsonToSettings=sd,pd.waitUntilReady=cd,pd.setupOptionals=ld,pd.setupEssentials=ud,pd.createInternalModel=dd,pd.live2DModelMiddlewares=[od,sd,cd,ld,ud,dd],pd.motionTasksMap=new WeakMap,pd.expressionTasksMap=new WeakMap,Yu.prototype._loadMotion=function(e,t){return pd.loadMotion(this,e,t)},Ru.prototype._loadExpression=function(e){return pd.loadExpression(this,e)};var md=class{constructor(){this._autoInteract=!1}get autoInteract(){return this._autoInteract}set autoInteract(e){e!==this._autoInteract&&(e?this.on(`pointertap`,hd,this):this.off(`pointertap`,hd,this),this._autoInteract=e)}registerInteraction(e){e!==this.interactionManager&&(this.unregisterInteraction(),this._autoInteract&&e&&(this.interactionManager=e,e.on(`pointermove`,gd,this)))}unregisterInteraction(){var e;this.interactionManager&&((e=this.interactionManager)==null||e.off(`pointermove`,gd,this),this.interactionManager=void 0)}};function hd(e){this.tap(e.data.global.x,e.data.global.y)}function gd(e){this.focus(e.data.global.x,e.data.global.y)}var _d=class extends ia{};const vd=new Bi,yd=new Ji;let bd;var xd=class extends hc{constructor(e){super(),this.tag=`Live2DModel(uninitialized)`,this.textures=[],this.transform=new _d,this.anchor=new qi(this.onAnchorChange,this,0,0),this.glContextID=-1,this.elapsedTime=performance.now(),this.deltaTime=0,this._autoUpdate=!1,this.once(`modelLoaded`,()=>this.init(e))}static from(e,t){let n=new this(t);return pd.setupLive2DModel(n,e,t).then(()=>n)}static fromSync(e,t){let n=new this(t);return pd.setupLive2DModel(n,e,t).then(t?.onLoad).catch(t?.onError),n}static registerTicker(e){bd=e}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){var t;bd||=(t=window.PIXI)?.Ticker,e?this._destroyed||(bd?(bd.shared.add(this.onTickerUpdate,this),this._autoUpdate=!0):Nu.warn(this.tag,`No Ticker registered, please call Live2DModel.registerTicker(Ticker).`)):(bd?.shared.remove(this.onTickerUpdate,this),this._autoUpdate=!1)}init(e){this.tag=`Live2DModel(${this.internalModel.settings.name})`;let t=Object.assign({autoUpdate:!0,autoInteract:!0},e);t.autoInteract&&(this.interactive=!0),this.autoInteract=t.autoInteract,this.autoUpdate=t.autoUpdate}onAnchorChange(){this.pivot.set(this.anchor.x*this.internalModel.width,this.anchor.y*this.internalModel.height)}motion(e,t,n){return t===void 0?this.internalModel.motionManager.startRandomMotion(e,n):this.internalModel.motionManager.startMotion(e,t,n)}expression(e){return this.internalModel.motionManager.expressionManager?e===void 0?this.internalModel.motionManager.expressionManager.setRandomExpression():this.internalModel.motionManager.expressionManager.setExpression(e):Promise.resolve(!1)}focus(e,t,n=!1){vd.x=e,vd.y=t,this.toModelPosition(vd,vd,!0);let r=vd.x/this.internalModel.originalWidth*2-1,i=vd.y/this.internalModel.originalHeight*2-1,a=Math.atan2(i,r);this.internalModel.focusController.focus(Math.cos(a),-Math.sin(a),n)}tap(e,t){let n=this.hitTest(e,t);n.length&&(Nu.log(this.tag,`Hit`,n),this.emit(`hit`,n))}hitTest(e,t){return vd.x=e,vd.y=t,this.toModelPosition(vd,vd),this.internalModel.hitTest(vd.x,vd.y)}toModelPosition(e,t=e.clone(),n){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.transform.worldTransform.applyInverse(e,t),this.internalModel.localTransform.applyInverse(t,t),t}containsPoint(e){return this.getBounds(!0).contains(e.x,e.y)}_calculateBounds(){this._bounds.addFrame(this.transform,0,0,this.internalModel.width,this.internalModel.height)}onTickerUpdate(){this.update(bd.shared.deltaMS)}update(e){this.deltaTime+=e,this.elapsedTime+=e}_render(e){this.registerInteraction(e.plugins.interaction),e.batch.reset(),e.geometry.reset(),e.shader.reset(),e.state.reset();let t=!1;this.glContextID!==e.CONTEXT_UID&&(this.glContextID=e.CONTEXT_UID,this.internalModel.updateWebGLContext(e.gl,this.glContextID),t=!0);for(let n=0;nt.destroy(e.baseTexture)),this.internalModel.destroy(),super.destroy(e)}};Fu(xd,[md]);const Sd=class{static resolveURL(e,t){var n;let r=(n=Sd.filesMap[e])?.[t];if(r===void 0)throw Error(`Cannot find this file from uploaded files: `+t);return r}static upload(e,t){return yc(this,null,function*(){let n={};for(let r of t.getDefinedFiles()){let i=decodeURI($r.resolve(t.url,r)),a=e.find(e=>e.webkitRelativePath===i);a&&(n[r]=URL.createObjectURL(a))}Sd.filesMap[t._objectURL]=n})}static createSettings(e){return yc(this,null,function*(){let t=e.find(e=>e.name.endsWith(`model.json`)||e.name.endsWith(`model3.json`));if(!t)throw TypeError(`Settings file not found`);let n=yield Sd.readText(t),r=JSON.parse(n);r.url=t.webkitRelativePath;let i=pd.findRuntime(r);if(!i)throw Error(`Unknown settings JSON`);let a=i.createModelSettings(r);return a._objectURL=URL.createObjectURL(t),a})}static readText(e){return yc(this,null,function*(){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsText(e,`utf8`)})})}};let Cd=Sd;Cd.filesMap={},Cd.factory=(e,t)=>yc(void 0,null,function*(){if(Array.isArray(e.source)&&e.source[0]instanceof File){let t=e.source,n=t.settings;if(!n)n=yield Sd.createSettings(t);else if(!n._objectURL)throw Error(`"_objectURL" must be specified in ModelSettings`);n.validateFiles(t.map(e=>encodeURI(e.webkitRelativePath))),yield Sd.upload(t,n),n.resolveURL=function(e){return Sd.resolveURL(this._objectURL,e)},e.source=n,e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){let e=this.settings._objectURL;if(URL.revokeObjectURL(e),Sd.filesMap[e])for(let t of Object.values(Sd.filesMap[e]))URL.revokeObjectURL(t);delete Sd.filesMap[e]})})}return t()}),pd.live2DModelMiddlewares.unshift(Cd.factory);const wd=class{static unzip(e,t){return yc(this,null,function*(){let n=yield wd.getFilePaths(e),r=[];for(let e of t.getDefinedFiles()){let i=decodeURI($r.resolve(t.url,e));n.includes(i)&&r.push(i)}let i=yield wd.getFiles(e,r);for(let e=0;ee.endsWith(`model.json`)||e.endsWith(`model3.json`));if(!n)throw Error(`Settings file not found`);let r=yield wd.readText(e,n);if(!r)throw Error(`Empty settings file: `+n);let i=JSON.parse(r);i.url=n;let a=pd.findRuntime(i);if(!a)throw Error(`Unknown settings JSON`);return a.createModelSettings(i)})}static zipReader(e,t){return yc(this,null,function*(){throw Error(`Not implemented`)})}static getFilePaths(e){return yc(this,null,function*(){throw Error(`Not implemented`)})}static getFiles(e,t){return yc(this,null,function*(){throw Error(`Not implemented`)})}static readText(e,t){return yc(this,null,function*(){throw Error(`Not implemented`)})}static releaseReader(e){}};let Td=wd;if(Td.ZIP_PROTOCOL=`zip://`,Td.uid=0,Td.factory=(e,t)=>yc(void 0,null,function*(){let n=e.source,r,i,a;if(typeof n==`string`&&(n.endsWith(`.zip`)||n.startsWith(wd.ZIP_PROTOCOL))?(r=n.startsWith(wd.ZIP_PROTOCOL)?n.slice(wd.ZIP_PROTOCOL.length):n,i=yield rd.load({url:r,type:`blob`,target:e.live2dModel})):Array.isArray(n)&&n.length===1&&n[0]instanceof File&&n[0].name.endsWith(`.zip`)&&(i=n[0],r=URL.createObjectURL(i),a=n.settings),i){if(!i.size)throw Error(`Empty zip file`);let t=yield wd.zipReader(i,r);a||=yield wd.createSettings(t),a._objectURL=wd.ZIP_PROTOCOL+wd.uid+`/`+a.url;let n=yield wd.unzip(t,a);n.settings=a,e.source=n,r.startsWith(`blob:`)&&e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){URL.revokeObjectURL(r)})}),wd.releaseReader(t)}return t()}),pd.live2DModelMiddlewares.unshift(Td.factory),!window.Live2DCubismCore)throw Error(`Could not find Cubism 4 runtime. This plugin requires live2dcubismcore.js to be loaded.`);var Ed=class extends Ru{constructor(e,t){var n;super(e,t),this.queueManager=new Tl,this.definitions=(n=e.expressions)??[],this.init()}isFinished(){return this.queueManager.isFinished()}getExpressionIndex(e){return this.definitions.findIndex(t=>t.Name===e)}getExpressionFile(e){return e.File}createExpression(e,t){return Qc.create(e)}_setExpression(e){return this.queueManager.startMotion(e,!1,performance.now())}stopAllExpressions(){this.queueManager.stopAllMotions()}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}},Dd=class e extends Uu{constructor(t){if(super(t),!e.isValidJSON(t))throw TypeError(`Invalid JSON.`);Object.assign(this,new Su(t))}static isValidJSON(e){var t;return!!e?.FileReferences&&typeof e.FileReferences.Moc==`string`&&(t=e.FileReferences.Textures)?.length>0&&e.FileReferences.Textures.every(e=>typeof e==`string`)}replaceFiles(e){if(super.replaceFiles(e),this.motions)for(let[t,n]of Object.entries(this.motions))for(let r=0;r{this.emit(`motion:`+t)})}isFinished(){return this.queueManager.isFinished()}_startMotion(e,t){return e.setFinishedMotionHandler(t),this.queueManager.stopAllMotions(),this.queueManager.startMotion(e,!1,performance.now())}_stopAllMotions(){this.queueManager.stopAllMotions()}createMotion(e,t,n){let r=Cl.create(e),i=new cl(e),a=(t===this.groups.idle?Mu.idleMotionFadingDuration:Mu.motionFadingDuration)/1e3;return i.getMotionFadeInTime()===void 0&&r.setFadeInTime(n.FadeInTime>0?n.FadeInTime:a),i.getMotionFadeOutTime()===void 0&&r.setFadeOutTime(n.FadeOutTime>0?n.FadeOutTime:a),r.setEffectIds(this.eyeBlinkIds,this.lipSyncIds),r}getMotionFile(e){return e.File}getMotionName(e){return e.File}getSoundFile(e){return e.Sound}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}destroy(){super.destroy(),this.queueManager.release(),this.queueManager=void 0}};const kd=new Mc;var Ad=class extends Zu{constructor(e,t,n){super(),this.lipSync=!0,this.breath=bc.create(),this.renderer=new xu,this.idParamAngleX=Cu,this.idParamAngleY=wu,this.idParamAngleZ=Tu,this.idParamEyeBallX=Eu,this.idParamEyeBallY=Du,this.idParamBodyAngleX=Ou,this.idParamBreath=ku,this.pixelsPerUnit=1,this.centeringTransform=new Ji,this.coreModel=e,this.settings=t,this.motionManager=new Od(t,n),this.init()}init(){var e;super.init(),(e=this.settings.getEyeBlinkParameters())?.length>0&&(this.eyeBlink=Cc.create(this.settings)),this.breath.setParameters([new xc(this.idParamAngleX,0,15,6.5345,.5),new xc(this.idParamAngleY,0,8,3.5345,.5),new xc(this.idParamAngleZ,0,10,5.5345,.5),new xc(this.idParamBodyAngleX,0,4,15.5345,.5),new xc(this.idParamBreath,0,.5,3.2345,.5)]),this.renderer.initialize(this.coreModel),this.renderer.setIsPremultipliedAlpha(!0)}getSize(){return[this.coreModel.getModel().canvasinfo.CanvasWidth,this.coreModel.getModel().canvasinfo.CanvasHeight]}getLayout(){let e={};if(this.settings.layout)for(let t of Object.keys(this.settings.layout)){let n=t.charAt(0).toLowerCase()+t.slice(1);e[n]=this.settings.layout[t]}return e}setupLayout(){super.setupLayout(),this.pixelsPerUnit=this.coreModel.getModel().canvasinfo.PixelsPerUnit,this.centeringTransform.scale(this.pixelsPerUnit,this.pixelsPerUnit).translate(this.originalWidth/2,this.originalHeight/2)}updateWebGLContext(e,t){this.renderer.firstDraw=!0,this.renderer._bufferData={vertex:null,uv:null,index:null},this.renderer.startUp(e),this.renderer._clippingManager._currentFrameNo=t,this.renderer._clippingManager._maskTexture=void 0,fu.getInstance()._shaderSets=[]}bindTexture(e,t){this.renderer.bindTexture(e,t)}getHitAreaDefs(){var e,t;return(t=(e=this.settings.hitAreas)?.map(e=>({id:e.Id,name:e.Name,index:this.coreModel.getDrawableIndex(e.Id)})))??[]}getDrawableIDs(){return this.coreModel.getDrawableIds()}getDrawableIndex(e){return this.coreModel.getDrawableIndex(e)}getDrawableVertices(e){if(typeof e==`string`&&(e=this.coreModel.getDrawableIndex(e),e===-1))throw TypeError(`Unable to find drawable ID: `+e);let t=this.coreModel.getDrawableVertices(e).slice();for(let e=0;e{function n(){try{Pd(),e()}catch(e){if(Md--,Md<0){let n=Error(`Failed to start up Cubism 4 framework.`);n.cause=e,t(n);return}Nu.log(`Cubism4`,`Startup failed, retrying 10ms later...`),setTimeout(n,10)}}n()}),jd)}function Pd(e){e=Object.assign({logFunction:console.log,loggingLevel:Vc.LogLevel_Verbose},e),Bc.startUp(e),Bc.initialize()}pd.registerRuntime({version:4,ready:Nd,test(e){return e instanceof Dd||Dd.isValidJSON(e)},isValidMoc(e){if(e.byteLength<4)return!1;let t=new Int8Array(e,0,4);return String.fromCharCode(...t)===`MOC3`},createModelSettings(e){return new Dd(e)},createCoreModel(e){let t=Yc.create(e);try{let e=t.createModel();return e.__moc=t,e}catch(e){try{t.release()}catch{}throw e}},createInternalModel(e,t,n){let r=new Ad(e,t,n),i=e;return i.__moc&&(r.__moc=i.__moc,delete i.__moc,r.once(`destroy`,Fd)),r},createPhysics(e,t){return Vl.create(t)},createPose(e,t){return Dc.create(t)}});function Fd(){var e;(e=this.__moc)==null||e.release()}var Id=an({__name:`Canvas`,props:{width:{},height:{},resolution:{default:2}},setup(e,{expose:t}){let n=e,r=H(),i=H(),a=H();async function o(e){xd.registerTicker(Pi),Ai.add(Fi),i.value=new _c({width:n.width*n.resolution,height:n.height*n.resolution,backgroundAlpha:0,preserveDrawingBuffer:!0}),a.value=i.value.view,a.value.style.width=`100%`,a.value.style.height=`100%`,a.value.style.objectFit=`cover`,a.value.style.display=`block`,e.appendChild(i.value.view)}function s(){i.value&&i.value.renderer.resize(n.width,n.height)}W([()=>n.width,()=>n.height],()=>s()),W(()=>n.resolution,e=>{i.value&&e&&(i.value.renderer.resolution=e,s())}),nn(async()=>r.value&&await o(r.value)),un(()=>i.value?.destroy());async function c(){let e=new Promise(e=>{if(!a.value||!i.value)return e(null);i.value.render(),a.value.toBlob(e)});return e}function l(){return a.value}return t({captureFrame:c,canvasElement:l}),(e,t)=>(G(),cn(`div`,{ref_key:`containerRef`,ref:r,"h-full":``,"w-full":``},[Dn(e.$slots,`default`,{app:i.value})],512))}}),Ld=Id,Rd=yn((exports,t)=>{ +/*! +localForage -- Offline Storage, Improved +Version 1.10.0 +https://localforage.github.io/localForage +(c) 2013-2017 Mozilla, Apache License 2.0 +*/ +(function(n){if(typeof exports==`object`&&t!==void 0)t.exports=n();else if(typeof define==`function`&&define.amd)define([],n);else{var r;r=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this,r.localforage=n()}})(function(){var e,t,n;return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof Sn==`function`&&Sn;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var l=Error(`Cannot find module '`+o+`'`);throw l.code=`MODULE_NOT_FOUND`,l}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var a=typeof Sn==`function`&&Sn,o=0;o`u`&&e(3);var l=Promise;function u(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function d(e,t,n){typeof t==`function`&&e.then(t),typeof n==`function`&&e.catch(n)}function f(e){return typeof e!=`string`&&(console.warn(e+` used as a key, but it is not a string.`),e=String(e)),e}function p(){if(arguments.length&&typeof arguments[arguments.length-1]==`function`)return arguments[arguments.length-1]}var m=`local-forage-detect-blob-support`,h=void 0,g={},_=Object.prototype.toString,v=`readonly`,y=`readwrite`;function b(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i=43)}}).catch(function(){return!1})}function S(e){return typeof h==`boolean`?l.resolve(h):x(e).then(function(e){return h=e,h})}function C(e){var t=g[e.name],n={};n.promise=new l(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function w(e){var t=g[e.name],n=t.deferredOperations.pop();if(n)return n.resolve(),n.promise}function T(e,t){var n=g[e.name],r=n.deferredOperations.pop();if(r)return r.reject(t),r.promise}function E(e,t){return new l(function(n,r){if(g[e.name]=g[e.name]||F(),e.db)if(t)C(e),e.db.close();else return n(e.db);var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(m)}catch(n){if(n.name===`ConstraintError`)console.warn(`The database "`+e.name+`" has been upgraded from version `+t.oldVersion+` to version `+t.newVersion+`, but the storage "`+e.storeName+`" already exists.`);else throw n}}),a.onerror=function(e){e.preventDefault(),r(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},n(t),w(e)}})}function D(e){return E(e,!1)}function O(e){return E(e,!0)}function k(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn(`The database "`+e.name+`" can't be downgraded from version `+e.db.version+` to version `+e.version+`.`),e.version=e.db.version),i||n){if(n){var a=e.db.version+1;a>e.version&&(e.version=a)}return!0}return!1}function A(e){return new l(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||``);t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function j(e){var t=b(atob(e.data));return c([t],{type:e.type})}function M(e){return e&&e.__local_forage_encoded_blob}function N(e){var t=this,n=t._initReady().then(function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function ee(e){C(e);for(var t=g[e.name],n=t.forages,r=0;r0&&(!e.db||i.name===`InvalidStateError`||i.name===`NotFoundError`))return l.resolve().then(function(){if(!e.db||i.name===`NotFoundError`&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),O(e)}).then(function(){return ee(e).then(function(){P(e,t,n,r-1)})}).catch(n);n(i)}}function F(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function I(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=g[n.name];i||(i=F(),g[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=N);var a=[];function o(){return l.resolve()}for(var s=0;s>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l}function De(e){var t=new Uint8Array(e),n=``,r;for(r=0;r>2],n+=ce[(t[r]&3)<<4|t[r+1]>>4],n+=ce[(t[r+1]&15)<<2|t[r+2]>>6],n+=ce[t[r+2]&63];return t.length%3==2?n=n.substring(0,n.length-1)+`=`:t.length%3==1&&(n=n.substring(0,n.length-2)+`==`),n}function Oe(e,t){var n=``;if(e&&(n=Te.call(e)),e&&(n===`[object ArrayBuffer]`||e.buffer&&Te.call(e.buffer)===`[object ArrayBuffer]`)){var r,i=de;e instanceof ArrayBuffer?(r=e,i+=pe):(r=e.buffer,n===`[object Int8Array]`?i+=he:n===`[object Uint8Array]`?i+=ge:n===`[object Uint8ClampedArray]`?i+=_e:n===`[object Int16Array]`?i+=ve:n===`[object Uint16Array]`?i+=be:n===`[object Int32Array]`?i+=ye:n===`[object Uint32Array]`?i+=xe:n===`[object Float32Array]`?i+=Se:n===`[object Float64Array]`?i+=Ce:t(Error(`Failed to get type for BinaryArray`))),t(i+De(r))}else if(n===`[object Blob]`){var a=new FileReader;a.onload=function(){var n=le+e.type+`~`+De(this.result);t(de+me+n)},a.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error(`Couldn't convert value into a JSON string: `,e),t(null,n)}}function ke(e){if(e.substring(0,fe)!==de)return JSON.parse(e);var t=e.substring(we),n=e.substring(fe,we),r;if(n===me&&ue.test(t)){var i=t.match(ue);r=i[1],t=t.substring(i[0].length)}var a=Ee(t);switch(n){case pe:return a;case me:return c([a],{type:r});case he:return new Int8Array(a);case ge:return new Uint8Array(a);case _e:return new Uint8ClampedArray(a);case ve:return new Int16Array(a);case be:return new Uint16Array(a);case ye:return new Int32Array(a);case xe:return new Uint32Array(a);case Se:return new Float32Array(a);case Ce:return new Float64Array(a);default:throw Error(`Unkown type: `+n)}}var Ae={serialize:Oe,deserialize:ke,stringToBuffer:Ee,bufferToString:De};function je(e,t,n,r){e.executeSql(`CREATE TABLE IF NOT EXISTS `+t.storeName+` (id INTEGER PRIMARY KEY, key unique, value)`,[],n,r)}function Me(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=typeof e[r]==`string`?e[r]:e[r].toString();var i=new l(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction(function(i){je(i,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=Ae,i}function Ne(e,t,n,r,i,a){e.executeSql(n,r,i,function(e,o){o.code===o.SYNTAX_ERR?e.executeSql(`SELECT name FROM sqlite_master WHERE type='table' AND name = ?`,[t.storeName],function(e,s){s.rows.length?a(e,o):je(e,t,function(){e.executeSql(n,r,i,a)},a)},a):a(e,o)},a)}function Pe(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Ne(n,i,`SELECT * FROM `+i.storeName+` WHERE key = ? LIMIT 1`,[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&=i.serializer.deserialize(r),t(r)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Fe(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Ne(n,i,`SELECT * FROM `+i.storeName,[],function(n,r){for(var a=r.rows,o=a.length,s=0;s0){a(Ie.apply(i,[e,s,n,r-1]));return}o(t)}})})}).catch(o)});return u(a,n),a}function Le(e,t,n){return Ie.apply(this,[e,t,n,1])}function Re(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Ne(n,i,`DELETE FROM `+i.storeName+` WHERE key = ?`,[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function ze(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Ne(t,r,`DELETE FROM `+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function Be(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Ne(t,r,`SELECT COUNT(key) as c FROM `+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function Ve(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Ne(n,i,`SELECT key FROM `+i.storeName+` WHERE id = ? LIMIT 1`,[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function He(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Ne(t,r,`SELECT key FROM `+r.storeName,[],function(t,n){for(var r=[],i=0;i '__WebKitDatabaseInfoTable__'`,[],function(n,r){for(var i=[],a=0;a0}function Xe(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=qe(e,t._defaultConfig),Ye()?(t._dbInfo=n,n.serializer=Ae,l.resolve()):l.reject()}function Ze(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);r.indexOf(e)===0&&localStorage.removeItem(r)}});return u(n,e),n}function Qe(e,t){var n=this;e=f(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&=t.serializer.deserialize(r),r});return u(r,t),r}function $e(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,a=localStorage.length,o=1,s=0;s=0;t--){var n=localStorage.key(t);n.indexOf(e)===0&&localStorage.removeItem(n)}}):l.reject(`Invalid arguments`),u(i,t),i}var ot={_driver:`localStorageWrapper`,_initStorage:Xe,_support:Ke(),iterate:$e,getItem:Qe,setItem:it,removeItem:rt,clear:Ze,length:nt,key:et,keys:tt,dropInstance:at},st=function(e,t){return e===t||typeof e==`number`&&typeof t==`number`&&isNaN(e)&&isNaN(t)},ct=function(e,t){for(var n=e.length,r=0;r=0;f--){var p=d[f],m=this.recursiveFindHit(e,p,n,r,c);if(m){if(!p.parent)continue;c=!1,m&&(e.target&&(r=!1),s=!0)}}return i&&(r&&!e.target&&!t.hitArea&&t.containsPoint&&t.containsPoint(o)&&(s=!0),t.interactive&&(s&&!e.target&&(e.target=t),n&&n(e,t,!!s))),s},e.prototype.findHit=function(e,t,n,r){this.recursiveFindHit(e,t,n,r,!1)},e}(),Gd={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor===`pointer`},set buttonMode(e){e?this.cursor=`pointer`:this.cursor===`pointer`&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};fc.mixin(Gd);var Kd=1,qd={target:null,data:{global:null}},Jd=function(e){Vd(t,e);function t(t,n){var r=e.call(this)||this;return n||={},r.renderer=t,r.autoPreventDefault=n.autoPreventDefault===void 0?!0:n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new zd,r.mouse.identifier=Kd,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[Kd]=r.mouse,r.interactionDataPool=[],r.eventData=new Hd,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!(`PointerEvent`in globalThis),r.supportsTouchEvents=`ontouchstart`in globalThis,r.supportsPointerEvents=!!globalThis.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:`inherit`,pointer:`pointer`},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new Wd,r._tempDisplayObject=new pc,r._eventListenerOptions={capture:!0,passive:!1},r._useSystemTicker=n.useSystemTicker===void 0?!0:n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return Object.defineProperty(t.prototype,`useSystemTicker`,{get:function(){return this._useSystemTicker},set:function(e){this._useSystemTicker=e,e?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lastObjectRendered`,{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),t.prototype.hitTest=function(e,t){return qd.target=null,qd.data.global=e,t||=this.lastObjectRendered,this.processInteractive(qd,t,null,!0),qd.target},t.prototype.setTargetElement=function(e,t){t===void 0&&(t=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=e,this.resolution=t,this.addEvents(),this.addTickerListener()},t.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(Pi.system.add(this.tickerUpdate,this,Mi.INTERACTION),this.tickerAdded=!0)},t.prototype.removeTickerListener=function(){this.tickerAdded&&(Pi.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},t.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=`none`,e.msTouchAction=`none`):this.supportsPointerEvents&&(e.touchAction=`none`),this.supportsPointerEvents?(globalThis.document.addEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},t.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=``,e.msTouchAction=``):this.supportsPointerEvents&&(e.touchAction=``),this.supportsPointerEvents?(globalThis.document.removeEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},t.prototype.tickerUpdate=function(e){this._deltaTime+=e,!(this._deltaTime0&&(a=e.composedPath()[0]);for(var o=a===this.interactionDOMElement?``:`outside`,s=0;s 0.0) { + c.rgb /= c.a; + + vec3 rgb = pow(c.rgb, vec3(1. / gamma)); + rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast); + rgb.r *= red; + rgb.g *= green; + rgb.b *= blue; + c.rgb = rgb * brightness; + + c.rgb *= c.a; + } + + gl_FragColor = c * alpha; +} +`,$d=function(e){Xd(t,e);function t(t){var n=e.call(this,Zd,Qd)||this;return n.gamma=1,n.saturation=1,n.contrast=1,n.brightness=1,n.red=1,n.green=1,n.blue=1,n.alpha=1,Object.assign(n,t),n}return t.prototype.apply=function(e,t,n,r){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,n,r)},t}(Jo),ef=function(e,t){return ef=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ef(e,t)};function tf(e,t){ef(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var nf=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,rf=` +varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec2 uOffset; + +void main(void) +{ + vec4 color = vec4(0.0); + + // Sample top left pixel + color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y)); + + // Sample top right pixel + color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y)); + + // Sample bottom right pixel + color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y)); + + // Sample bottom left pixel + color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y)); + + // Average + color *= 0.25; + + gl_FragColor = color; +}`,af=` +varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec2 uOffset; +uniform vec4 filterClamp; + +void main(void) +{ + vec4 color = vec4(0.0); + + // Sample top left pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Sample top right pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Sample bottom right pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Sample bottom left pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Average + color *= 0.25; + + gl_FragColor = color; +} +`,sf=function(e){tf(t,e);function t(t,n,r){t===void 0&&(t=4),n===void 0&&(n=3),r===void 0&&(r=!1);var i=e.call(this,nf,r?af:rf)||this;return i._kernels=[],i._blur=4,i._quality=3,i.uniforms.uOffset=new Float32Array(2),i._pixelSize=new Bi,i.pixelSize=1,i._clamp=r,Array.isArray(t)?i.kernels=t:(i._blur=t,i.quality=n),i}return t.prototype.apply=function(e,t,n,r){var i=this._pixelSize.x/t._frame.width,a=this._pixelSize.y/t._frame.height,o;if(this._quality===1||this._blur===0)o=this._kernels[0]+.5,this.uniforms.uOffset[0]=o*i,this.uniforms.uOffset[1]=o*a,e.applyFilter(this,t,n,r);else{for(var s=e.getFilterTexture(),c=t,l=s,u=void 0,d=this._quality-1,f=0;f0)for(var r=e,i=e/t,a=1;a0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`clamp`,{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`pixelSize`,{get:function(){return this._pixelSize},set:function(e){typeof e==`number`?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof Bi?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`quality`,{get:function(){return this._quality},set:function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`blur`,{get:function(){return this._blur},set:function(e){this._blur=e,this._generateKernels()},enumerable:!1,configurable:!0}),t}(Jo),cf=function(e,t){return cf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},cf(e,t)};function lf(e,t){cf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var uf=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,df=` +uniform sampler2D uSampler; +varying vec2 vTextureCoord; + +uniform float threshold; + +void main() { + vec4 color = texture2D(uSampler, vTextureCoord); + + // A simple & fast algorithm for getting brightness. + // It's inaccuracy , but good enought for this feature. + float _max = max(max(color.r, color.g), color.b); + float _min = min(min(color.r, color.g), color.b); + float brightness = (_max + _min) * 0.5; + + if(brightness > threshold) { + gl_FragColor = color; + } else { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); + } +} +`,ff=function(e){lf(t,e);function t(t){t===void 0&&(t=.5);var n=e.call(this,uf,df)||this;return n.threshold=t,n}return Object.defineProperty(t.prototype,`threshold`,{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),t}(Jo),pf=`uniform sampler2D uSampler; +varying vec2 vTextureCoord; + +uniform sampler2D bloomTexture; +uniform float bloomScale; +uniform float brightness; + +void main() { + vec4 color = texture2D(uSampler, vTextureCoord); + color.rgb *= brightness; + vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0); + bloomColor.rgb *= bloomScale; + gl_FragColor = color + bloomColor; +} +`,mf=function(e){lf(t,e);function t(n){var r=e.call(this,uf,pf)||this;r.bloomScale=1,r.brightness=1,r._resolution=zr.FILTER_RESOLUTION,typeof n==`number`&&(n={threshold:n});var i=Object.assign(t.defaults,n);r.bloomScale=i.bloomScale,r.brightness=i.brightness;var a=i.kernels,o=i.blur,s=i.quality,c=i.pixelSize,l=i.resolution;return r._extractFilter=new ff(i.threshold),r._extractFilter.resolution=l,r._blurFilter=a?new sf(a):new sf(o,s),r.pixelSize=c,r.resolution=l,r}return t.prototype.apply=function(e,t,n,r,i){var a=e.getFilterTexture();this._extractFilter.apply(e,t,a,1,i);var o=e.getFilterTexture();this._blurFilter.apply(e,a,o,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=o,e.applyFilter(this,t,n,r),e.returnFilterTexture(o),e.returnFilterTexture(a)},Object.defineProperty(t.prototype,`resolution`,{get:function(){return this._resolution},set:function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`threshold`,{get:function(){return this._extractFilter.threshold},set:function(e){this._extractFilter.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`kernels`,{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`blur`,{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`quality`,{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`pixelSize`,{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),t.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:zr.FILTER_RESOLUTION},t}(Jo),hf=function(e,t){return hf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},hf(e,t)};function gf(e,t){hf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var _f=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,vf=`varying vec2 vTextureCoord; + +uniform vec4 filterArea; +uniform float pixelSize; +uniform sampler2D uSampler; + +vec2 mapCoord( vec2 coord ) +{ + coord *= filterArea.xy; + coord += filterArea.zw; + + return coord; +} + +vec2 unmapCoord( vec2 coord ) +{ + coord -= filterArea.zw; + coord /= filterArea.xy; + + return coord; +} + +vec2 pixelate(vec2 coord, vec2 size) +{ + return floor( coord / size ) * size; +} + +vec2 getMod(vec2 coord, vec2 size) +{ + return mod( coord , size) / size; +} + +float character(float n, vec2 p) +{ + p = floor(p*vec2(4.0, -4.0) + 2.5); + + if (clamp(p.x, 0.0, 4.0) == p.x) + { + if (clamp(p.y, 0.0, 4.0) == p.y) + { + if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0; + } + } + return 0.0; +} + +void main() +{ + vec2 coord = mapCoord(vTextureCoord); + + // get the rounded color.. + vec2 pixCoord = pixelate(coord, vec2(pixelSize)); + pixCoord = unmapCoord(pixCoord); + + vec4 color = texture2D(uSampler, pixCoord); + + // determine the character to use + float gray = (color.r + color.g + color.b) / 3.0; + + float n = 65536.0; // . + if (gray > 0.2) n = 65600.0; // : + if (gray > 0.3) n = 332772.0; // * + if (gray > 0.4) n = 15255086.0; // o + if (gray > 0.5) n = 23385164.0; // & + if (gray > 0.6) n = 15252014.0; // 8 + if (gray > 0.7) n = 13199452.0; // @ + if (gray > 0.8) n = 11512810.0; // # + + // get the mod.. + vec2 modd = getMod(coord, vec2(pixelSize)); + + gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0); + +} +`,yf=function(e){gf(t,e);function t(t){t===void 0&&(t=8);var n=e.call(this,_f,vf)||this;return n.size=t,n}return Object.defineProperty(t.prototype,`size`,{get:function(){return this.uniforms.pixelSize},set:function(e){this.uniforms.pixelSize=e},enumerable:!1,configurable:!0}),t}(Jo),bf=function(e,t){return bf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},bf(e,t)};function xf(e,t){bf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Sf=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Cf=`precision mediump float; + +varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; + +uniform float transformX; +uniform float transformY; +uniform vec3 lightColor; +uniform float lightAlpha; +uniform vec3 shadowColor; +uniform float shadowAlpha; + +void main(void) { + vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY); + vec4 color = texture2D(uSampler, vTextureCoord); + float light = texture2D(uSampler, vTextureCoord - transform).a; + float shadow = texture2D(uSampler, vTextureCoord + transform).a; + + color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0)); + color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0)); + gl_FragColor = vec4(color.rgb * color.a, color.a); +} +`,wf=function(e){xf(t,e);function t(t){var n=e.call(this,Sf,Cf)||this;return n._thickness=2,n._angle=0,n.uniforms.lightColor=new Float32Array(3),n.uniforms.shadowColor=new Float32Array(3),Object.assign(n,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},t),n.padding=1,n}return t.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(t.prototype,`rotation`,{get:function(){return this._angle/Ri},set:function(e){this._angle=e*Ri,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`thickness`,{get:function(){return this._thickness},set:function(e){this._thickness=e,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lightColor`,{get:function(){return si(this.uniforms.lightColor)},set:function(e){ai(e,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lightAlpha`,{get:function(){return this.uniforms.lightAlpha},set:function(e){this.uniforms.lightAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`shadowColor`,{get:function(){return si(this.uniforms.shadowColor)},set:function(e){ai(e,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`shadowAlpha`,{get:function(){return this.uniforms.shadowAlpha},set:function(e){this.uniforms.shadowAlpha=e},enumerable:!1,configurable:!0}),t}(Jo),Tf=function(e,t){return Tf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Tf(e,t)};function Ef(e,t){Tf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Df=`varying vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform float uAlpha; + +void main(void) +{ + gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha; +} +`,Of=function(e){Ef(t,e);function t(t){t===void 0&&(t=1);var n=e.call(this,Ks,Df,{uAlpha:1})||this;return n.alpha=t,n}return Object.defineProperty(t.prototype,`alpha`,{get:function(){return this.uniforms.uAlpha},set:function(e){this.uniforms.uAlpha=e},enumerable:!1,configurable:!0}),t}(Jo),kf=function(e,t){return kf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},kf(e,t)};function Af(e,t){kf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var jf=` + attribute vec2 aVertexPosition; + + uniform mat3 projectionMatrix; + + uniform float strength; + + varying vec2 vBlurTexCoords[%size%]; + + uniform vec4 inputSize; + uniform vec4 outputFrame; + + vec4 filterVertexPosition( void ) + { + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); + } + + vec2 filterTextureCoord( void ) + { + return aVertexPosition * (outputFrame.zw * inputSize.zw); + } + + void main(void) + { + gl_Position = filterVertexPosition(); + + vec2 textureCoord = filterTextureCoord(); + %blur% + }`;function Mf(e,t){var n=Math.ceil(e/2),r=jf,i=``,a;a=t?`vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);`:`vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);`;for(var o=0;o=n&&(o=e-s-1),c=c.replace(`%value%`,t[o].toString()),i+=c,i+=` +`}return r=r.replace(`%blur%`,i),r=r.replace(`%size%`,e.toString()),r}var If=function(e){Af(t,e);function t(t,n,r,i,a){n===void 0&&(n=8),r===void 0&&(r=4),i===void 0&&(i=zr.FILTER_RESOLUTION),a===void 0&&(a=5);var o=this,s=Mf(a,t),c=Ff(a);return o=e.call(this,s,c)||this,o.horizontal=t,o.resolution=i,o._quality=0,o.quality=r,o.blur=n,o}return t.prototype.apply=function(e,t,n,r){if(n?this.horizontal?this.uniforms.strength=1/n.width*(n.width/t.width):this.uniforms.strength=1/n.height*(n.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,n,r);else{var i=e.getFilterTexture(),a=e.renderer,o=t,s=i;this.state.blend=!1,e.applyFilter(this,o,s,ur.CLEAR);for(var c=1;c 0.0) { + coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75); + } else { + coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent); + } + } + coord += center * dimensions.xy; + coord /= filterArea.xy; + vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw); + vec4 color = texture2D(uSampler, clampedCoord); + if (coord != clampedCoord) { + color *= max(0.0, 1.0 - length(coord - clampedCoord)); + } + + gl_FragColor = color; +} +`,Gf=function(e){Hf(t,e);function t(n){var r=e.call(this,Uf,Wf)||this;return r.uniforms.dimensions=new Float32Array(2),Object.assign(r,t.defaults,n),r}return t.prototype.apply=function(e,t,n,r){var i=t.filterFrame,a=i.width,o=i.height;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=o,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`strength`,{get:function(){return this.uniforms.strength},set:function(e){this.uniforms.strength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`center`,{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),t.defaults={center:[.5,.5],radius:100,strength:1},t}(Jo),Kf=function(e,t){return Kf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Kf(e,t)};function qf(e,t){Kf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Jf=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Yf=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform sampler2D colorMap; +uniform float _mix; +uniform float _size; +uniform float _sliceSize; +uniform float _slicePixelSize; +uniform float _sliceInnerSize; +void main() { + vec4 color = texture2D(uSampler, vTextureCoord.xy); + + vec4 adjusted; + if (color.a > 0.0) { + color.rgb /= color.a; + float innerWidth = _size - 1.0; + float zSlice0 = min(floor(color.b * innerWidth), innerWidth); + float zSlice1 = min(zSlice0 + 1.0, innerWidth); + float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize; + float s0 = xOffset + (zSlice0 * _sliceSize); + float s1 = xOffset + (zSlice1 * _sliceSize); + float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize); + vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset)); + vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset)); + float zOffset = fract(color.b * innerWidth); + adjusted = mix(slice0Color, slice1Color, zOffset); + + color.rgb *= color.a; + } + gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a); + +}`,Xf=function(e){qf(t,e);function t(t,n,r){n===void 0&&(n=!1),r===void 0&&(r=1);var i=e.call(this,Jf,Yf)||this;return i.mix=1,i._size=0,i._sliceSize=0,i._slicePixelSize=0,i._sliceInnerSize=0,i._nearest=!1,i._scaleMode=null,i._colorMap=null,i._scaleMode=null,i.nearest=n,i.mix=r,i.colorMap=t,i}return t.prototype.apply=function(e,t,n,r){this.uniforms._mix=this.mix,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`colorSize`,{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`colorMap`,{get:function(){return this._colorMap},set:function(e){var t;e&&(e instanceof ja||(e=ja.from(e)),(t=e)?.baseTexture&&(e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=cr.OFF,this._size=e.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=e),this._colorMap=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`nearest`,{get:function(){return this._nearest},set:function(e){this._nearest=e,this._scaleMode=e?or.NEAREST:or.LINEAR;var t=this._colorMap;t&&t.baseTexture&&(t.baseTexture._glTextures={},t.baseTexture.scaleMode=this._scaleMode,t.baseTexture.mipmap=cr.OFF,t._updateID++,t.baseTexture.emit(`update`,t.baseTexture))},enumerable:!1,configurable:!0}),t.prototype.updateColorMap=function(){var e=this._colorMap;e&&e.baseTexture&&(e._updateID++,e.baseTexture.emit(`update`,e.baseTexture),this.colorMap=e)},t.prototype.destroy=function(t){t===void 0&&(t=!1),this._colorMap&&this._colorMap.destroy(t),e.prototype.destroy.call(this)},t}(Jo),Zf=function(e,t){return Zf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Zf(e,t)};function Qf(e,t){Zf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var $f=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,ep=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec3 color; +uniform float alpha; + +void main(void) { + vec4 currentColor = texture2D(uSampler, vTextureCoord); + gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a); +} +`,tp=function(e){Qf(t,e);function t(t,n){t===void 0&&(t=0),n===void 0&&(n=1);var r=e.call(this,$f,ep)||this;return r._color=0,r._alpha=1,r.uniforms.color=new Float32Array(3),r.color=t,r.alpha=n,r}return Object.defineProperty(t.prototype,`color`,{get:function(){return this._color},set:function(e){var t=this.uniforms.color;typeof e==`number`?(ai(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._color=si(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`alpha`,{get:function(){return this._alpha},set:function(e){this.uniforms.alpha=e,this._alpha=e},enumerable:!1,configurable:!0}),t}(Jo),np=function(e,t){return np=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},np(e,t)};function rp(e,t){np(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ip=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,ap=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec3 originalColor; +uniform vec3 newColor; +uniform float epsilon; +void main(void) { + vec4 currentColor = texture2D(uSampler, vTextureCoord); + vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001)); + float colorDistance = length(colorDiff); + float doReplace = step(colorDistance, epsilon); + gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a); +} +`,op=function(e){rp(t,e);function t(t,n,r){t===void 0&&(t=16711680),n===void 0&&(n=0),r===void 0&&(r=.4);var i=e.call(this,ip,ap)||this;return i._originalColor=16711680,i._newColor=0,i.uniforms.originalColor=new Float32Array(3),i.uniforms.newColor=new Float32Array(3),i.originalColor=t,i.newColor=n,i.epsilon=r,i}return Object.defineProperty(t.prototype,`originalColor`,{get:function(){return this._originalColor},set:function(e){var t=this.uniforms.originalColor;typeof e==`number`?(ai(e,t),this._originalColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._originalColor=si(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`newColor`,{get:function(){return this._newColor},set:function(e){var t=this.uniforms.newColor;typeof e==`number`?(ai(e,t),this._newColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._newColor=si(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`epsilon`,{get:function(){return this.uniforms.epsilon},set:function(e){this.uniforms.epsilon=e},enumerable:!1,configurable:!0}),t}(Jo),sp=function(e,t){return sp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},sp(e,t)};function cp(e,t){sp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var lp=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,up=`precision mediump float; + +varying mediump vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform vec2 texelSize; +uniform float matrix[9]; + +void main(void) +{ + vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left + vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center + vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right + + vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left + vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center + vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right + + vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left + vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center + vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right + + gl_FragColor = + c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] + + c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] + + c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8]; + + gl_FragColor.a = c22.a; +} +`,dp=function(e){cp(t,e);function t(t,n,r){n===void 0&&(n=200),r===void 0&&(r=200);var i=e.call(this,lp,up)||this;return i.uniforms.texelSize=new Float32Array(2),i.uniforms.matrix=new Float32Array(9),t!==void 0&&(i.matrix=t),i.width=n,i.height=r,i}return Object.defineProperty(t.prototype,`matrix`,{get:function(){return this.uniforms.matrix},set:function(e){var t=this;e.forEach(function(e,n){t.uniforms.matrix[n]=e})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`width`,{get:function(){return 1/this.uniforms.texelSize[0]},set:function(e){this.uniforms.texelSize[0]=1/e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return 1/this.uniforms.texelSize[1]},set:function(e){this.uniforms.texelSize[1]=1/e},enumerable:!1,configurable:!0}),t}(Jo),fp=function(e,t){return fp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},fp(e,t)};function pp(e,t){fp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var mp=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,hp=`precision mediump float; + +varying vec2 vTextureCoord; + +uniform sampler2D uSampler; + +void main(void) +{ + float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb); + + gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); + + if (lum < 1.00) + { + if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } + + if (lum < 0.75) + { + if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } + + if (lum < 0.50) + { + if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } + + if (lum < 0.3) + { + if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } +} +`,gp=function(e){pp(t,e);function t(){return e.call(this,mp,hp)||this}return t}(Jo),_p=function(e,t){return _p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},_p(e,t)};function vp(e,t){_p(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var yp=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,bp=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec4 filterArea; +uniform vec2 dimensions; + +const float SQRT_2 = 1.414213; + +const float light = 1.0; + +uniform float curvature; +uniform float lineWidth; +uniform float lineContrast; +uniform bool verticalLine; +uniform float noise; +uniform float noiseSize; + +uniform float vignetting; +uniform float vignettingAlpha; +uniform float vignettingBlur; + +uniform float seed; +uniform float time; + +float rand(vec2 co) { + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main(void) +{ + vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; + vec2 dir = vec2(vTextureCoord.xy * filterArea.xy / dimensions - vec2(0.5, 0.5)); + + gl_FragColor = texture2D(uSampler, vTextureCoord); + vec3 rgb = gl_FragColor.rgb; + + if (noise > 0.0 && noiseSize > 0.0) + { + pixelCoord.x = floor(pixelCoord.x / noiseSize); + pixelCoord.y = floor(pixelCoord.y / noiseSize); + float _noise = rand(pixelCoord * noiseSize * seed) - 0.5; + rgb += _noise * noise; + } + + if (lineWidth > 0.0) + { + float _c = curvature > 0. ? curvature : 1.; + float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.; + vec2 uv = dir * k; + + float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c; + float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast; + rgb *= j; + float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.); + rgb *= 0.99 + ceil(segment) * 0.015; + } + + if (vignetting > 0.0) + { + float outter = SQRT_2 - vignetting * SQRT_2; + float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0); + rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha); + } + + gl_FragColor.rgb = rgb; +} +`,xp=function(e){vp(t,e);function t(n){var r=e.call(this,yp,bp)||this;return r.time=0,r.seed=0,r.uniforms.dimensions=new Float32Array(2),Object.assign(r,t.defaults,n),r}return t.prototype.apply=function(e,t,n,r){var i=t.filterFrame,a=i.width,o=i.height;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=o,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`curvature`,{get:function(){return this.uniforms.curvature},set:function(e){this.uniforms.curvature=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lineWidth`,{get:function(){return this.uniforms.lineWidth},set:function(e){this.uniforms.lineWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lineContrast`,{get:function(){return this.uniforms.lineContrast},set:function(e){this.uniforms.lineContrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`verticalLine`,{get:function(){return this.uniforms.verticalLine},set:function(e){this.uniforms.verticalLine=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`noise`,{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`noiseSize`,{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignetting`,{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignettingAlpha`,{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignettingBlur`,{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),t.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},t}(Jo),Sp=function(e,t){return Sp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Sp(e,t)};function Cp(e,t){Sp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var wp=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Tp=`precision mediump float; + +varying vec2 vTextureCoord; +varying vec4 vColor; + +uniform vec4 filterArea; +uniform sampler2D uSampler; + +uniform float angle; +uniform float scale; + +float pattern() +{ + float s = sin(angle), c = cos(angle); + vec2 tex = vTextureCoord * filterArea.xy; + vec2 point = vec2( + c * tex.x - s * tex.y, + s * tex.x + c * tex.y + ) * scale; + return (sin(point.x) * sin(point.y)) * 4.0; +} + +void main() +{ + vec4 color = texture2D(uSampler, vTextureCoord); + float average = (color.r + color.g + color.b) / 3.0; + gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a); +} +`,Ep=function(e){Cp(t,e);function t(t,n){t===void 0&&(t=1),n===void 0&&(n=5);var r=e.call(this,wp,Tp)||this;return r.scale=t,r.angle=n,r}return Object.defineProperty(t.prototype,`scale`,{get:function(){return this.uniforms.scale},set:function(e){this.uniforms.scale=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`angle`,{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),t}(Jo),Dp=function(e,t){return Dp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Dp(e,t)};function Op(e,t){Dp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var kp=function(){return kp=Object.assign||function(e){for(var t=arguments,n,r=1,i=arguments.length;r 1.0 || coord.y > 1.0) { + return; + } + + float cx = coord.x - 0.5; + float cy = (coord.y - 0.5) * aspect; + float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5; + + // displacementMap: repeat + // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny); + + // displacementMap: mirror + ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny); + + vec4 dc = texture2D(displacementMap, vec2(0.5, ny)); + + float displacement = (dc.r - dc.g) * (offset / filterArea.x); + + coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect); + + if (fillMode == CLAMP) { + coord = clamp(coord, filterClamp.xy, filterClamp.zw); + } else { + if( coord.x > filterClamp.z ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.x -= filterClamp.z; + } else if (fillMode == MIRROR) { + coord.x = filterClamp.z * 2.0 - coord.x; + } + } else if( coord.x < filterClamp.x ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.x += filterClamp.z; + } else if (fillMode == MIRROR) { + coord.x *= -filterClamp.z; + } + } + + if( coord.y > filterClamp.w ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.y -= filterClamp.w; + } else if (fillMode == MIRROR) { + coord.y = filterClamp.w * 2.0 - coord.y; + } + } else if( coord.y < filterClamp.y ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.y += filterClamp.w; + } else if (fillMode == MIRROR) { + coord.y *= -filterClamp.w; + } + } + } + + gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r; + gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g; + gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b; + gl_FragColor.a = texture2D(uSampler, coord).a; +} +`,Hp=function(e){zp(t,e);function t(n){var r=e.call(this,Bp,Vp)||this;return r.offset=100,r.fillMode=t.TRANSPARENT,r.average=!1,r.seed=0,r.minSize=8,r.sampleSize=512,r._slices=0,r._offsets=new Float32Array(1),r._sizes=new Float32Array(1),r._direction=-1,r.uniforms.dimensions=new Float32Array(2),r._canvas=document.createElement(`canvas`),r._canvas.width=4,r._canvas.height=r.sampleSize,r.texture=ja.from(r._canvas,{scaleMode:or.NEAREST}),Object.assign(r,t.defaults,n),r}return t.prototype.apply=function(e,t,n,r){var i=t.filterFrame,a=i.width,o=i.height;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=o,this.uniforms.aspect=o/a,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,t,n,r)},t.prototype._randomizeSizes=function(){var e=this._sizes,t=this._slices-1,n=this.sampleSize,r=Math.min(this.minSize/n,.9/this._slices);if(this.average){for(var i=this._slices,a=1,o=0;o0;n--){var r=Math.random()*n>>0,i=e[n];e[n]=e[r],e[r]=i}},t.prototype._randomizeOffsets=function(){for(var e=0;e0?r:0,c=r<0?-r:0;n.fillStyle=`rgba(`+s+`, `+c+`, 0, 1)`,n.fillRect(0,i>>0,e,o+1>>0),i+=o}t.baseTexture.update(),this.uniforms.displacementMap=t},Object.defineProperty(t.prototype,`sizes`,{get:function(){return this._sizes},set:function(e){for(var t=Math.min(this._slices,e.length),n=0;n>0)+1},Object.defineProperty(t.prototype,`offset`,{get:function(){return this.uniforms.uOffset},set:function(e){this.uniforms.uOffset=e},enumerable:!1,configurable:!0}),t}(Jo),am=function(e,t){return am=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},am(e,t)};function om(e,t){am(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var sm=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,cm=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform float epsilon; + +const int MAX_COLORS = %maxColors%; + +uniform vec3 originalColors[MAX_COLORS]; +uniform vec3 targetColors[MAX_COLORS]; + +void main(void) +{ + gl_FragColor = texture2D(uSampler, vTextureCoord); + + float alpha = gl_FragColor.a; + if (alpha < 0.0001) + { + return; + } + + vec3 color = gl_FragColor.rgb / alpha; + + for(int i = 0; i < MAX_COLORS; i++) + { + vec3 origColor = originalColors[i]; + if (origColor.r < 0.0) + { + break; + } + vec3 colorDiff = origColor - color; + if (length(colorDiff) < epsilon) + { + vec3 targetColor = targetColors[i]; + gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha); + return; + } + } +} +`,lm=function(e){om(t,e);function t(t,n,r){n===void 0&&(n=.05),r===void 0&&(r=t.length);var i=e.call(this,sm,cm.replace(/%maxColors%/g,r.toFixed(0)))||this;return i._replacements=[],i._maxColors=0,i.epsilon=n,i._maxColors=r,i.uniforms.originalColors=new Float32Array(r*3),i.uniforms.targetColors=new Float32Array(r*3),i.replacements=t,i}return Object.defineProperty(t.prototype,`replacements`,{get:function(){return this._replacements},set:function(e){var t=this.uniforms.originalColors,n=this.uniforms.targetColors,r=e.length;if(r>this._maxColors)throw Error(`Length of replacements (`+r+`) exceeds the maximum colors length (`+this._maxColors+`)`);t[r*3]=-1;for(var i=0;i 0.5) then: 1 - 2 * (1 - dst) * (1 - src) + return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)), + (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)), + (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z))); +} + + +void main() +{ + gl_FragColor = texture2D(uSampler, vTextureCoord); + vec3 color = gl_FragColor.rgb; + + if (sepia > 0.0) + { + float gray = (color.x + color.y + color.z) / 3.0; + vec3 grayscale = vec3(gray); + + color = Overlay(SEPIA_RGB, grayscale); + + color = grayscale + sepia * (color - grayscale); + } + + vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy; + + if (vignetting > 0.0) + { + float outter = SQRT_2 - vignetting * SQRT_2; + vec2 dir = vec2(vec2(0.5, 0.5) - coord); + dir.y *= dimensions.y / dimensions.x; + float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0); + color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha); + } + + if (scratchDensity > seed && scratch != 0.0) + { + float phase = seed * 256.0; + float s = mod(floor(phase), 2.0); + float dist = 1.0 / scratchDensity; + float d = distance(coord, vec2(seed * dist, abs(s - seed * dist))); + if (d < seed * 0.6 + 0.4) + { + highp float period = scratchDensity * 10.0; + + float xx = coord.x * period + phase; + float aa = abs(mod(xx, 0.5) * 4.0); + float bb = mod(floor(xx / 0.5), 2.0); + float yy = (1.0 - bb) * aa + bb * (2.0 - aa); + + float kk = 2.0 * period; + float dw = scratchWidth / dimensions.x * (0.75 + seed); + float dh = dw * kk; + + float tine = (yy - (2.0 - dh)); + + if (tine > 0.0) { + float _sign = sign(scratch); + + tine = s * tine / period + scratch + 0.1; + tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5); + + color.rgb *= tine; + } + } + } + + if (noise > 0.0 && noiseSize > 0.0) + { + vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; + pixelCoord.x = floor(pixelCoord.x / noiseSize); + pixelCoord.y = floor(pixelCoord.y / noiseSize); + // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0); + // float _noise = snoise(d) * 0.5; + float _noise = rand(pixelCoord * noiseSize * seed) - 0.5; + color += _noise * noise; + } + + gl_FragColor.rgb = color; +} +`,mm=function(e){dm(t,e);function t(n,r){r===void 0&&(r=0);var i=e.call(this,fm,pm)||this;return i.seed=0,i.uniforms.dimensions=new Float32Array(2),typeof n==`number`?(i.seed=n,n=void 0):i.seed=r,Object.assign(i,t.defaults,n),i}return t.prototype.apply=function(e,t,n,r){var i,a;this.uniforms.dimensions[0]=(i=t.filterFrame)?.width,this.uniforms.dimensions[1]=(a=t.filterFrame)?.height,this.uniforms.seed=this.seed,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`sepia`,{get:function(){return this.uniforms.sepia},set:function(e){this.uniforms.sepia=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`noise`,{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`noiseSize`,{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scratch`,{get:function(){return this.uniforms.scratch},set:function(e){this.uniforms.scratch=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scratchDensity`,{get:function(){return this.uniforms.scratchDensity},set:function(e){this.uniforms.scratchDensity=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scratchWidth`,{get:function(){return this.uniforms.scratchWidth},set:function(e){this.uniforms.scratchWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignetting`,{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignettingAlpha`,{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`vignettingBlur`,{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),t.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},t}(Jo),hm=function(e,t){return hm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},hm(e,t)};function gm(e,t){hm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var _m=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,vm=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec2 thickness; +uniform vec4 outlineColor; +uniform vec4 filterClamp; + +const float DOUBLE_PI = 3.14159265358979323846264 * 2.; + +void main(void) { + vec4 ownColor = texture2D(uSampler, vTextureCoord); + vec4 curColor; + float maxAlpha = 0.; + vec2 displaced; + for (float angle = 0.; angle <= DOUBLE_PI; angle += \${angleStep}) { + displaced.x = vTextureCoord.x + thickness.x * cos(angle); + displaced.y = vTextureCoord.y + thickness.y * sin(angle); + curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw)); + maxAlpha = max(maxAlpha, curColor.a); + } + float resultAlpha = max(maxAlpha, ownColor.a); + gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha); +} +`,ym=function(e){gm(t,e);function t(n,r,i){n===void 0&&(n=1),r===void 0&&(r=0),i===void 0&&(i=.1);var a=e.call(this,_m,vm.replace(/\$\{angleStep\}/,t.getAngleStep(i)))||this;return a._thickness=1,a.uniforms.thickness=new Float32Array([0,0]),a.uniforms.outlineColor=new Float32Array([0,0,0,1]),Object.assign(a,{thickness:n,color:r,quality:i}),a}return t.getAngleStep=function(e){var n=Math.max(e*t.MAX_SAMPLES,t.MIN_SAMPLES);return(Math.PI*2/n).toFixed(7)},t.prototype.apply=function(e,t,n,r){this.uniforms.thickness[0]=this._thickness/t._frame.width,this.uniforms.thickness[1]=this._thickness/t._frame.height,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`color`,{get:function(){return si(this.uniforms.outlineColor)},set:function(e){ai(e,this.uniforms.outlineColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`thickness`,{get:function(){return this._thickness},set:function(e){this._thickness=e,this.padding=e},enumerable:!1,configurable:!0}),t.MIN_SAMPLES=1,t.MAX_SAMPLES=100,t}(Jo),bm=function(e,t){return bm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},bm(e,t)};function xm(e,t){bm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Sm=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Cm=`precision mediump float; + +varying vec2 vTextureCoord; + +uniform vec2 size; +uniform sampler2D uSampler; + +uniform vec4 filterArea; + +vec2 mapCoord( vec2 coord ) +{ + coord *= filterArea.xy; + coord += filterArea.zw; + + return coord; +} + +vec2 unmapCoord( vec2 coord ) +{ + coord -= filterArea.zw; + coord /= filterArea.xy; + + return coord; +} + +vec2 pixelate(vec2 coord, vec2 size) +{ + return floor( coord / size ) * size; +} + +void main(void) +{ + vec2 coord = mapCoord(vTextureCoord); + + coord = pixelate(coord, size); + + coord = unmapCoord(coord); + + gl_FragColor = texture2D(uSampler, coord); +} +`,wm=function(e){xm(t,e);function t(t){t===void 0&&(t=10);var n=e.call(this,Sm,Cm)||this;return n.size=t,n}return Object.defineProperty(t.prototype,`size`,{get:function(){return this.uniforms.size},set:function(e){typeof e==`number`&&(e=[e,e]),this.uniforms.size=e},enumerable:!1,configurable:!0}),t}(Jo),Tm=function(e,t){return Tm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Tm(e,t)};function Em(e,t){Tm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Dm=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Om=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; + +uniform float uRadian; +uniform vec2 uCenter; +uniform float uRadius; +uniform int uKernelSize; + +const int MAX_KERNEL_SIZE = 2048; + +void main(void) +{ + vec4 color = texture2D(uSampler, vTextureCoord); + + if (uKernelSize == 0) + { + gl_FragColor = color; + return; + } + + float aspect = filterArea.y / filterArea.x; + vec2 center = uCenter.xy / filterArea.xy; + float gradient = uRadius / filterArea.x * 0.3; + float radius = uRadius / filterArea.x - gradient * 0.5; + int k = uKernelSize - 1; + + vec2 coord = vTextureCoord; + vec2 dir = vec2(center - coord); + float dist = length(vec2(dir.x, dir.y * aspect)); + + float radianStep = uRadian; + if (radius >= 0.0 && dist > radius) { + float delta = dist - radius; + float gap = gradient; + float scale = 1.0 - abs(delta / gap); + if (scale <= 0.0) { + gl_FragColor = color; + return; + } + radianStep *= scale; + } + radianStep /= float(k); + + float s = sin(radianStep); + float c = cos(radianStep); + mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c)); + + for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) { + if (i == k) { + break; + } + + coord -= center; + coord.y *= aspect; + coord = rotationMatrix * coord; + coord.y /= aspect; + coord += center; + + vec4 sample = texture2D(uSampler, coord); + + // switch to pre-multiplied alpha to correctly blur transparent images + // sample.rgb *= sample.a; + + color += sample; + } + + gl_FragColor = color / float(uKernelSize); +} +`,km=function(e){Em(t,e);function t(t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=[0,0]),r===void 0&&(r=5),i===void 0&&(i=-1);var a=e.call(this,Dm,Om)||this;return a._angle=0,a.angle=t,a.center=n,a.kernelSize=r,a.radius=i,a}return t.prototype.apply=function(e,t,n,r){this.uniforms.uKernelSize=this._angle===0?0:this.kernelSize,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`angle`,{get:function(){return this._angle},set:function(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`center`,{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),t}(Jo),Am=function(e,t){return Am=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Am(e,t)};function jm(e,t){Am(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Mm=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Nm=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec4 filterArea; +uniform vec4 filterClamp; +uniform vec2 dimensions; + +uniform bool mirror; +uniform float boundary; +uniform vec2 amplitude; +uniform vec2 waveLength; +uniform vec2 alpha; +uniform float time; + +float rand(vec2 co) { + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main(void) +{ + vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; + vec2 coord = pixelCoord / dimensions; + + if (coord.y < boundary) { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + + float k = (coord.y - boundary) / (1. - boundary + 0.0001); + float areaY = boundary * dimensions.y / filterArea.y; + float v = areaY + areaY - vTextureCoord.y; + float y = mirror ? v : vTextureCoord.y; + + float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x; + float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y; + float _alpha = (alpha.y - alpha.x) * k + alpha.x; + + float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude; + x = clamp(x, filterClamp.x, filterClamp.z); + + vec4 color = texture2D(uSampler, vec2(x, y)); + + gl_FragColor = color * _alpha; +} +`,Pm=function(e){jm(t,e);function t(n){var r=e.call(this,Mm,Nm)||this;return r.time=0,r.uniforms.amplitude=new Float32Array(2),r.uniforms.waveLength=new Float32Array(2),r.uniforms.alpha=new Float32Array(2),r.uniforms.dimensions=new Float32Array(2),Object.assign(r,t.defaults,n),r}return t.prototype.apply=function(e,t,n,r){var i,a;this.uniforms.dimensions[0]=(i=t.filterFrame)?.width,this.uniforms.dimensions[1]=(a=t.filterFrame)?.height,this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`mirror`,{get:function(){return this.uniforms.mirror},set:function(e){this.uniforms.mirror=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`boundary`,{get:function(){return this.uniforms.boundary},set:function(e){this.uniforms.boundary=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`amplitude`,{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`waveLength`,{get:function(){return this.uniforms.waveLength},set:function(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`alpha`,{get:function(){return this.uniforms.alpha},set:function(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]},enumerable:!1,configurable:!0}),t.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},t}(Jo),Fm=function(e,t){return Fm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Fm(e,t)};function Im(e,t){Fm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Lm=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Rm=`precision mediump float; + +varying vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform vec4 filterArea; +uniform vec2 red; +uniform vec2 green; +uniform vec2 blue; + +void main(void) +{ + gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r; + gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g; + gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b; + gl_FragColor.a = texture2D(uSampler, vTextureCoord).a; +} +`,zm=function(e){Im(t,e);function t(t,n,r){t===void 0&&(t=[-10,0]),n===void 0&&(n=[0,10]),r===void 0&&(r=[0,0]);var i=e.call(this,Lm,Rm)||this;return i.red=t,i.green=n,i.blue=r,i}return Object.defineProperty(t.prototype,`red`,{get:function(){return this.uniforms.red},set:function(e){this.uniforms.red=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`green`,{get:function(){return this.uniforms.green},set:function(e){this.uniforms.green=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`blue`,{get:function(){return this.uniforms.blue},set:function(e){this.uniforms.blue=e},enumerable:!1,configurable:!0}),t}(Jo),Bm=function(e,t){return Bm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Bm(e,t)};function Vm(e,t){Bm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Hm=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Um=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; +uniform vec4 filterClamp; + +uniform vec2 center; + +uniform float amplitude; +uniform float wavelength; +// uniform float power; +uniform float brightness; +uniform float speed; +uniform float radius; + +uniform float time; + +const float PI = 3.14159; + +void main() +{ + float halfWavelength = wavelength * 0.5 / filterArea.x; + float maxRadius = radius / filterArea.x; + float currentRadius = time * speed / filterArea.x; + + float fade = 1.0; + + if (maxRadius > 0.0) { + if (currentRadius > maxRadius) { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + fade = 1.0 - pow(currentRadius / maxRadius, 2.0); + } + + vec2 dir = vec2(vTextureCoord - center / filterArea.xy); + dir.y *= filterArea.y / filterArea.x; + float dist = length(dir); + + if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + + vec2 diffUV = normalize(dir); + + float diff = (dist - currentRadius) / halfWavelength; + + float p = 1.0 - pow(abs(diff), 2.0); + + // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade ); + float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade ); + + vec2 offset = diffUV * powDiff / filterArea.xy; + + // Do clamp : + vec2 coord = vTextureCoord + offset; + vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw); + vec4 color = texture2D(uSampler, clampedCoord); + if (coord != clampedCoord) { + color *= max(0.0, 1.0 - length(coord - clampedCoord)); + } + + // No clamp : + // gl_FragColor = texture2D(uSampler, vTextureCoord + offset); + + color.rgb *= 1.0 + (brightness - 1.0) * p * fade; + + gl_FragColor = color; +} +`,Wm=function(e){Vm(t,e);function t(n,r,i){n===void 0&&(n=[0,0]),i===void 0&&(i=0);var a=e.call(this,Hm,Um)||this;return a.center=n,Object.assign(a,t.defaults,r),a.time=i,a}return t.prototype.apply=function(e,t,n,r){this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`center`,{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`amplitude`,{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`wavelength`,{get:function(){return this.uniforms.wavelength},set:function(e){this.uniforms.wavelength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`brightness`,{get:function(){return this.uniforms.brightness},set:function(e){this.uniforms.brightness=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`speed`,{get:function(){return this.uniforms.speed},set:function(e){this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),t.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},t}(Jo),Gm=function(e,t){return Gm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Gm(e,t)};function Km(e,t){Gm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var qm=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Jm=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform sampler2D uLightmap; +uniform vec4 filterArea; +uniform vec2 dimensions; +uniform vec4 ambientColor; +void main() { + vec4 diffuseColor = texture2D(uSampler, vTextureCoord); + vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions; + vec4 light = texture2D(uLightmap, lightCoord); + vec3 ambient = ambientColor.rgb * ambientColor.a; + vec3 intensity = ambient + light.rgb; + vec3 finalColor = diffuseColor.rgb * intensity; + gl_FragColor = vec4(finalColor, diffuseColor.a); +} +`,Ym=function(e){Km(t,e);function t(t,n,r){n===void 0&&(n=0),r===void 0&&(r=1);var i=e.call(this,qm,Jm)||this;return i._color=0,i.uniforms.dimensions=new Float32Array(2),i.uniforms.ambientColor=new Float32Array([0,0,0,r]),i.texture=t,i.color=n,i}return t.prototype.apply=function(e,t,n,r){var i,a;this.uniforms.dimensions[0]=(i=t.filterFrame)?.width,this.uniforms.dimensions[1]=(a=t.filterFrame)?.height,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`texture`,{get:function(){return this.uniforms.uLightmap},set:function(e){this.uniforms.uLightmap=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`color`,{get:function(){return this._color},set:function(e){var t=this.uniforms.ambientColor;typeof e==`number`?(ai(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],this._color=si(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`alpha`,{get:function(){return this.uniforms.ambientColor[3]},set:function(e){this.uniforms.ambientColor[3]=e},enumerable:!1,configurable:!0}),t}(Jo),Xm=function(e,t){return Xm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Xm(e,t)};function Zm(e,t){Xm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Qm=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,$m=`varying vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform float blur; +uniform float gradientBlur; +uniform vec2 start; +uniform vec2 end; +uniform vec2 delta; +uniform vec2 texSize; + +float random(vec3 scale, float seed) +{ + return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed); +} + +void main(void) +{ + vec4 color = vec4(0.0); + float total = 0.0; + + float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0); + vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x)); + float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur; + + for (float t = -30.0; t <= 30.0; t++) + { + float percent = (t + offset - 0.5) / 30.0; + float weight = 1.0 - abs(percent); + vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius); + sample.rgb *= sample.a; + color += sample * weight; + total += weight; + } + + color /= total; + color.rgb /= color.a + 0.00001; + + gl_FragColor = color; +} +`,eh=function(e){Zm(t,e);function t(t,n,r,i){t===void 0&&(t=100),n===void 0&&(n=600);var a=e.call(this,Qm,$m)||this;return a.uniforms.blur=t,a.uniforms.gradientBlur=n,a.uniforms.start=r||new Bi(0,window.innerHeight/2),a.uniforms.end=i||new Bi(600,window.innerHeight/2),a.uniforms.delta=new Bi(30,30),a.uniforms.texSize=new Bi(window.innerWidth,window.innerHeight),a.updateDelta(),a}return t.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},Object.defineProperty(t.prototype,`blur`,{get:function(){return this.uniforms.blur},set:function(e){this.uniforms.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`gradientBlur`,{get:function(){return this.uniforms.gradientBlur},set:function(e){this.uniforms.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`start`,{get:function(){return this.uniforms.start},set:function(e){this.uniforms.start=e,this.updateDelta()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`end`,{get:function(){return this.uniforms.end},set:function(e){this.uniforms.end=e,this.updateDelta()},enumerable:!1,configurable:!0}),t}(Jo),th=function(e){Zm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=e/n,this.uniforms.delta.y=t/n},t}(eh),nh=function(e){Zm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=-t/n,this.uniforms.delta.y=e/n},t}(eh),rh=function(e){Zm(t,e);function t(t,n,r,i){t===void 0&&(t=100),n===void 0&&(n=600);var a=e.call(this)||this;return a.tiltShiftXFilter=new th(t,n,r,i),a.tiltShiftYFilter=new nh(t,n,r,i),a}return t.prototype.apply=function(e,t,n,r){var i=e.getFilterTexture();this.tiltShiftXFilter.apply(e,t,i,1),this.tiltShiftYFilter.apply(e,i,n,r),e.returnFilterTexture(i)},Object.defineProperty(t.prototype,`blur`,{get:function(){return this.tiltShiftXFilter.blur},set:function(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`gradientBlur`,{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`start`,{get:function(){return this.tiltShiftXFilter.start},set:function(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`end`,{get:function(){return this.tiltShiftXFilter.end},set:function(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e},enumerable:!1,configurable:!0}),t}(Jo),ih=function(e,t){return ih=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ih(e,t)};function ah(e,t){ih(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var oh=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,sh=`varying vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform float radius; +uniform float angle; +uniform vec2 offset; +uniform vec4 filterArea; + +vec2 mapCoord( vec2 coord ) +{ + coord *= filterArea.xy; + coord += filterArea.zw; + + return coord; +} + +vec2 unmapCoord( vec2 coord ) +{ + coord -= filterArea.zw; + coord /= filterArea.xy; + + return coord; +} + +vec2 twist(vec2 coord) +{ + coord -= offset; + + float dist = length(coord); + + if (dist < radius) + { + float ratioDist = (radius - dist) / radius; + float angleMod = ratioDist * ratioDist * angle; + float s = sin(angleMod); + float c = cos(angleMod); + coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c); + } + + coord += offset; + + return coord; +} + +void main(void) +{ + + vec2 coord = mapCoord(vTextureCoord); + + coord = twist(coord); + + coord = unmapCoord(coord); + + gl_FragColor = texture2D(uSampler, coord ); + +} +`,ch=function(e){ah(t,e);function t(n){var r=e.call(this,oh,sh)||this;return Object.assign(r,t.defaults,n),r}return Object.defineProperty(t.prototype,`offset`,{get:function(){return this.uniforms.offset},set:function(e){this.uniforms.offset=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`angle`,{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),t.defaults={radius:200,angle:4,padding:20,offset:new Bi},t}(Jo),lh=function(e,t){return lh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},lh(e,t)};function uh(e,t){lh(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function dh(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);i= 0.0 && dist > radius) { // radius < 0 means it's infinity + delta = dist - radius; + gap = gradient; + } + + if (delta > 0.0) { + float normalCount = gap / filterArea.x; + delta = (normalCount - delta) / normalCount; + countLimit *= delta; + strength *= delta; + if (countLimit < 1.0) + { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + } + + // randomize the lookup values to hide the fixed number of samples + float offset = rand(vTextureCoord, 0.0); + + float total = 0.0; + vec4 color = vec4(0.0); + + dir *= strength; + + for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) { + float percent = (t + offset) / MAX_KERNEL_SIZE; + float weight = 4.0 * (percent - percent * percent); + vec2 p = vTextureCoord + dir * percent; + vec4 sample = texture2D(uSampler, p); + + // switch to pre-multiplied alpha to correctly blur transparent images + // sample.rgb *= sample.a; + + color += sample * weight; + total += weight; + + if (t > countLimit){ + break; + } + } + + color /= total; + // switch back from pre-multiplied alpha + // color.rgb /= color.a + 0.00001; + + gl_FragColor = color; +} +`,mh=function(e){uh(t,e);function t(n){var r=this,i=Object.assign(t.defaults,n),a=i.maxKernelSize,o=dh(i,[`maxKernelSize`]);return r=e.call(this,fh,ph.replace("${maxKernelSize}",a.toFixed(1)))||this,Object.assign(r,o),r}return Object.defineProperty(t.prototype,`center`,{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`strength`,{get:function(){return this.uniforms.uStrength},set:function(e){this.uniforms.uStrength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`innerRadius`,{get:function(){return this.uniforms.uInnerRadius},set:function(e){this.uniforms.uInnerRadius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),t.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},t}(Jo);function hh(){let e=-1,t,n=-1;function r(r,i){(i>=e||i({x:0,y:0})},disableFocusAt:{type:Boolean,default:!1},xOffset:{},yOffset:{},scale:{default:1}},emits:[`modelLoaded`],setup(e,{expose:t,emit:n}){let r=e,i=n;function a(){let e=Number.parseFloat(String(r.xOffset))||0,t=Number.parseFloat(String(r.yOffset))||0;return String(r.xOffset).endsWith(`%`)&&(e=Number.parseFloat(String(r.xOffset).replace(`%`,``))/100*r.width),String(r.yOffset).endsWith(`%`)&&(t=Number.parseFloat(String(r.yOffset).replace(`%`,``))/100*r.height),{xOffset:e,yOffset:t}}let o=jn(()=>a()),s=Hn(()=>r.app),c=Hn(()=>r.paused),l=Hn(()=>r.focusAt),u=H(),d=H(0),f=H(0),p=jn(()=>Math.max(0,Math.min(100,r.mouthOpenSize))),m=w(),h=C(T),g=jn(()=>h.between(`sm`,`md`).value||h.smaller(`sm`).value),_=hh(),v=dn(new Mp({alpha:.2,blur:0,distance:20,rotation:45}));function y(){return u.value.internalModel.coreModel}function x(){if(!u.value)return;let e=2.2;g.value&&(e=2.2);let t=r.height*.95/f.value*e,n=r.width*.95/d.value*e,i=Math.min(t,n);u.value.scale.set(i*r.scale,i*r.scale),u.value.x=r.width/2+o.value.xOffset,u.value.y=r.height+o.value.yOffset}let{modelFile:E,loadingModel:D,currentMotion:O,availableMotions:k,loadSource:A,modelUrl:j}=S(Wn()),{themeColorsHue:ee,themeColorsHueDynamic:P}=S(Un()),F=H({group:`Idle`,index:0});async function I(){if(!s.value)return;u.value&&(s.value.stage.removeChild(u.value),u.value.destroy(),u.value=void 0);let e=new xd;A.value===`file`?await pd.setupLive2DModel(e,[E.value],{autoInteract:!1}):A.value===`url`&&await pd.setupLive2DModel(e,j.value,{autoInteract:!1}),u.value=e,s.value.stage.addChild(u.value),d.value=u.value.width,f.value=u.value.height,u.value.anchor.set(.5,.5),x(),u.value.on(`hit`,e=>{u.value&&e.includes(`body`)&&u.value.motion(`tap_body`)});let t=u.value.internalModel,n=t.coreModel,r=t.motionManager;n.setParameterValueById(`ParamMouthOpenY`,p.value),k.value=Object.entries(r.definitions).flatMap(([e,t])=>t?t.map((t,n)=>({motionName:e,motionIndex:n,fileName:t.File})):[]).filter(Boolean),r.groups.idle&&r.motionGroups[r.groups.idle]?.forEach(e=>{e._motionData.curves.forEach(e=>{(e.id===`ParamEyeBallX`||e.id===`ParamEyeBallY`)&&(e.id=`_${e.id}`)})});let a=r.update;r.update=function(e,n){return a?.call(this,e,n),r.state.currentGroup===r.groups.idle&&_.update(t,n),!0},r.on(`motionStart`,(e,t)=>{F.value={group:e,index:t}}),E.value&&await gh.default.setItem(`live2dModel`,E.value),i(`modelLoaded`),D.value=!1}async function L(){if(!s.value)return;xd.registerTicker(Pi),Ai.add(Fi),Ai.add(Jd);let e=await gh.default.getItem(`live2dModel`);if(e){E.value=e,A.value=`file`,D.value=!0;return}if(j.value){A.value=`url`,D.value=!0;return}D.value=!1}async function R(e,t){await u.value?.motion(e,t,Wu.FORCE)}let z=N(x,100),te=H(),B=H(0);function ne(){if(u.value){let e=getComputedStyle(te.value).backgroundColor;v.value.color=Number(b(e).replace(`#`,`0x`)),u.value.filters=[v.value]}}W([()=>r.width,()=>r.height],()=>z()),W(m,ne,{immediate:!0}),W([u,ee],ne),W(o,x),W(()=>r.scale,x);function re(){ne(),B.value=requestAnimationFrame(re)}W(P,()=>{P.value?B.value=requestAnimationFrame(re):(cancelAnimationFrame(B.value),B.value=0)},{immediate:!0}),W(p,e=>y().setParameterValueById(`ParamMouthOpenY`,e)),W(s,L),W(O,e=>R(e.group,e.index)),W(c,e=>e?s.value?.stop():s.value?.start()),W(l,e=>{u.value&&(r.disableFocusAt||u.value.focus(e.x,e.y))}),M(D,e=>{e&&I()},{debounce:1e3}),nn(ne),un(()=>{cancelAnimationFrame(B.value),u.value&&s.value?.stage.removeChild(u.value)});function ie(){return k.value}return t({setMotion:R,listMotionGroups:ie}),(e,t)=>(G(),cn(An,null,[U(`div`,{ref_key:`dropShadowColorComputer`,ref:te,hidden:``,bg:`primary-400 dark:primary-500`},null,512),Dn(e.$slots,`default`)],64))}}),vh=_h,yh=yn((exports,t)=>{ +/*! + +JSZip v3.10.1 - A JavaScript class for generating and reading zip files + + +(c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/main/LICENSE +*/ +(function(n){typeof exports==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof Sn==`function`&&Sn;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var l=Error(`Cannot find module '`+o+`'`);throw l.code=`MODULE_NOT_FOUND`,l}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var a=typeof Sn==`function`&&Sn,o=0;o>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` +\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){"use strict";var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{var e=function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){"use strict";for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function F(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,P(e.strm)}function I(e,t){e.pending_buf[e.pending++]=t}function L(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function R(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function z(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(z(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,F(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(F(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(F(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(F(e,!1),e.strm.avail_out),O)}),new ne(4,4,8,4,te),new ne(4,5,16,8,te),new ne(4,6,32,32,te),new ne(4,4,16,16,B),new ne(8,16,32,32,B),new ne(8,16,128,128,B),new ne(8,32,128,256,B),new ne(32,128,258,1024,B),new ne(32,258,258,4096,B)],n.deflateInit=function(e,t){return oe(e,t,g,15,8,0)},n.deflateInit2=oe,n.deflateReset=ae,n.deflateResetKeep=ie,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),I(i,i.gzhead.time>>16&255),I(i,i.gzhead.time>>24&255),I(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),I(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(I(i,255&i.gzhead.extra.length),I(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(I(i,0),I(i,0),I(i,0),I(i,0),I(i,0),I(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),I(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,L(i,p),i.strstart!==0&&(L(i,e.adler>>>16),L(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),P(e),o=i.pending,i.pending!==i.pending_buf_size));)I(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),P(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),P(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&P(e),i.pending+2<=i.pending_buf_size&&(I(i,255&e.adler),I(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(P(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(z(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(F(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(F(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(F(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(z(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(F(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(F(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(F(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(ee(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),P(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(I(i,255&e.adler),I(i,e.adler>>8&255),I(i,e.adler>>16&255),I(i,e.adler>>24&255),I(i,255&e.total_in),I(i,e.total_in>>8&255),I(i,e.total_in>>16&255),I(i,e.total_in>>24&255)):(L(i,e.adler>>>16),L(i,65535&e.adler)),P(e),0=n.w_size&&(s===0&&(ee(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,z(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,z,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,P=8+(15&(b>>>=4)),n.wbits===0)n.wbits=P;else if(P>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=a(n.check,z,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,z[2]=b>>>16&255,z[3]=b>>>24&255,n.check=a(n.check,z,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=a(n.check,z,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,z,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,P)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;P=p[g+ E++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P)),P&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[te[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,I={bits:n.lenbits},F=s(0,n.lens,0,19,n.lencode,0,n.work,I),n.lenbits=I.bits,F){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&R,!((k=R>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(L=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}P=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(L=k+3;x>>=k)),b>>>=3,x-=3}else{for(L=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=P}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,I={bits:n.lenbits},F=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,I),n.lenbits=I.bits,F){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,I={bits:n.distbits},F=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,I),n.distbits=I.bits,F){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(R=n.lencode[b&(1<>>16&255,j=65535&R,!((k=R>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&R,!(M+(k=R>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(L=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(R=n.distcode[b&(1<>>16&255,j=65535&R,!((k=R>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&R,!(M+(k=R>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(L=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=I[L+d[w]],N[ee+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--P[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function I(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function L(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function te(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=z(a[s]++,s))}}function B(e){var t;for(t=0;t>1;1<=n;n--)ie(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ie(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,ie(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?ue(e,t,n,r):e.strategy===4||s===o?(L(e,2+(r?1:0),3),ae(e,T,E)):(L(e,4+(r?1:0),3),function(e,t,n,r){var i;for(L(e,t-257,5),L(e,n-1,5),L(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*F(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){L(e,2,3),R(e,_,T),function(e){e.bi_valid===16?(I(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){"use strict";if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}),bh=Cn(yh());Td.zipReader=(e,t)=>bh.default.loadAsync(e);const xh=Td.createSettings;Td.createSettings=async e=>{let t=Object.keys(e.files);return t.find(e=>Sh(e))?xh(e):Th(t)};function Sh(e){return e.endsWith(`model3.json`)}function Ch(e){return e.endsWith(`.moc3`)}function wh(e){return e.split(/[\\/]/).pop()}function Th(e){let t=e.filter(e=>Ch(e));if(t.length!==1){let e=t.length?`(${t.map(e=>`"${e}"`).join(`,`)})`:``;throw Error(`Expected exactly one moc file, got ${t.length} ${e}`)}let n=t[0],r=wh(n).replace(/\.moc3?/,``),i=e.filter(e=>e.endsWith(`.png`));if(!i.length)throw Error(`Textures not found`);let a=e.filter(e=>e.endsWith(`.mtn`)||e.endsWith(`.motion3.json`)),o=e.find(e=>e.includes(`physics`)),s=e.find(e=>e.includes(`pose`)),c=new Dd({url:`${r}.model3.json`,Version:3,FileReferences:{Moc:n,Textures:i,Physics:o,Pose:s,Motions:a.length?{"":a.map(e=>({File:e}))}:void 0}});return c.name=r,c._objectURL=`example://${c.url}`,c}Td.readText=(e,t)=>{let n=e.file(t);if(!n)throw Error(`Cannot find file: ${t}`);return n.async(`text`)},Td.getFilePaths=e=>{let t=[];return e.forEach(e=>t.push(e)),Promise.resolve(t)},Td.getFiles=(e,t)=>Promise.all(t.map(async t=>{let n=t.slice(t.lastIndexOf(`/`)+1),r=await e.file(t).async(`blob`);return new File([r],n)}));const Eh={absolute:``,bottom:`3`,right:`3`},Dh={flex:`~ row`,"cursor-pointer":``},Oh=[`checked`,`aria-checked`],kh={key:0,"min-w":`50vw`,z:`(G(),En(v,{relative:``},{default:sn(({width:a,height:o})=>[Fn(Ld,{width:a,height:o,resolution:2,"max-h":`100dvh`},{default:sn(({app:t})=>[Fn(vh,{app:t,"mouth-open-size":e.mouthOpenSize,width:a,height:o,paused:e.paused,"focus-at":e.focusAt,"x-offset":e.xOffset,"y-offset":e.yOffset,scale:e.scale},null,8,[`app`,`mouth-open-size`,`width`,`height`,`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`])]),_:2},1032,[`width`,`height`]),U(`div`,Eh,[U(`div`,Dh,[U(`label`,{class:_n([n.value?`bg-neutral-300 dark:bg-neutral-200`:`bg-neutral-100 dark:bg-neutral-700`]),transition:`all ease-in-out duration-500`,text:`lg neutral-500 dark:neutral-400`,"m-1":``,"h-fit":``,"w-fit":``,"cursor-pointer":``,"appearance-none":``,"gap-1":``,"rounded-lg":``,"rounded-md":``,"border-none":``,"p-2":``,"outline-none":``},[On(U(`input`,{"onUpdate:modelValue":i[0]||=e=>n.value=e,checked:n.value,"aria-checked":n.value,name:`showLive2DViewerInspector`,type:`checkbox`,"appearance-none":``,"outline-none":``,hidden:``},null,8,Oh),[[kt,n.value]]),i[8]||=U(`div`,{"select-none":``},[U(`div`,{"i-solar:bug-bold-duotone":``})],-1)],2)]),Fn(K(D),null,{default:sn(()=>[n.value?(G(),cn(`div`,kh,[U(`div`,Ah,[U(`div`,jh,[U(`span`,null,gn(K(t)(`stage.viewers.debug-menu.emotions`)),1)]),U(`div`,Mh,[U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[1]||=e=>r.value={group:`Surprise`,index:0}},gn(K(t)(`stage.viewers.debug-menu.emotions-btn.surprised`)),1),U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[2]||=e=>r.value={group:`Sad`,index:0}},gn(K(t)(`stage.viewers.debug-menu.emotions-btn.sad`)),1),U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[3]||=e=>r.value={group:`Angry`,index:0}},gn(K(t)(`stage.viewers.debug-menu.emotions-btn.angry`)),1),U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[4]||=e=>r.value={group:`Happy`,index:0}},gn(K(t)(`stage.viewers.debug-menu.emotions-btn.happy`)),1),U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[5]||=e=>r.value={group:`Awkward`,index:0}},gn(K(t)(`stage.viewers.debug-menu.emotions-btn.awkward`)),1),U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[6]||=e=>r.value={group:`Question`,index:0}},gn(K(t)(`stage.viewers.debug-menu.emotions-btn.question`)),1),U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:i[7]||=e=>r.value={group:`Think`,index:0}},gn(K(t)(`stage.viewers.debug-menu.emotions-btn.think`)),1)])])])):on(``,!0)]),_:1})])]),_:1}))}}),Ph=Nh;function Fh(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 Ih(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 Lh(e){return this instanceof Lh?(this.v=e,this):new Lh(e)}function Rh(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 Lh?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 zh(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:Lh(e[r](t)),done:!1}:i?i(t):t}:i}}function Bh(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Ih==`function`?Ih(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 Vh=new TextDecoder(`utf-8`),Hh=e=>Vh.decode(e),Uh=new TextEncoder,Wh=e=>Uh.encode(e),Gh=e=>typeof e==`number`,Kh=e=>typeof e==`boolean`,qh=e=>typeof e==`function`,Jh=e=>e!=null&&Object(e)===e,Yh=e=>Jh(e)&&qh(e.then),Xh=e=>Jh(e)&&qh(e[Symbol.iterator]),Zh=e=>Jh(e)&&qh(e[Symbol.asyncIterator]),Qh=e=>Jh(e)&&Jh(e.schema),$h=e=>Jh(e)&&`done`in e&&`value`in e,eg=e=>Jh(e)&&qh(e.stat)&&Gh(e.fd),tg=e=>Jh(e)&&ig(e.body),ng=e=>`_getDOMStream`in e&&`_getNodeStream`in e,rg=e=>Jh(e)&&qh(e.abort)&&qh(e.getWriter)&&!ng(e),ig=e=>Jh(e)&&qh(e.cancel)&&qh(e.getReader)&&!ng(e),ag=e=>Jh(e)&&qh(e.end)&&qh(e.write)&&Kh(e.writable)&&!ng(e),og=e=>Jh(e)&&qh(e.read)&&qh(e.pipe)&&Kh(e.readable)&&!ng(e),sg=e=>Jh(e)&&qh(e.clear)&&qh(e.bytes)&&qh(e.position)&&qh(e.setPosition)&&qh(e.capacity)&&qh(e.getBufferIdentifier)&&qh(e.createLong),cg=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function lg(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;++cfg(Int32Array,e),mg=e=>fg(BigInt64Array,e),hg=e=>fg(Uint8Array,e),gg=e=>(e.next(),e);function*_g(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof cg?n(t):Xh(t)?t:n(t);return yield*gg(function*(t){let n=null;do n=t.next(yield fg(e,n));while(!n.done)}(r[Symbol.iterator]())),new e}const vg=e=>_g(Uint8Array,e);function yg(e,t){return Rh(this,arguments,function*(){if(Yh(t))return yield Lh(yield Lh(yield*zh(Bh(yg(e,yield Lh(t))))));let n=function(e){return Rh(this,arguments,function*(){yield yield Lh(yield Lh(e))})},r=function(e){return Rh(this,arguments,function*(){yield Lh(yield*zh(Bh(gg(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 cg?n(t):Xh(t)?r(t):Zh(t)?t:n(t);return yield Lh(yield*zh(Bh(gg(function(t){return Rh(this,arguments,function*(){let n=null;do n=yield Lh(t.next(yield yield Lh(fg(e,n))));while(!n.done)})}(i[Symbol.asyncIterator]()))))),yield Lh(new e)})}const bg=e=>yg(Uint8Array,e);function xg(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*Tg(e){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?dg(r,o)[0]:([i,r,s]=dg(r,o),i)}({cmd:a,size:o}=(yield(()=>null)())||{cmd:`read`,size:0});let l=vg(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=bg(e)[Symbol.asyncIterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?yield Lh(l.next()):yield Lh(l.next(o-s)),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield Lh(c()));while(onull)()))||{cmd:`read`,size:0});let l=new Og(e);try{do if({done:t,value:i}=Number.isNaN(o-s)?yield Lh(l.read()):yield Lh(l.read(o-s)),!t&&i.byteLength>0&&(r.push(hg(i)),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield Lh(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 Fh(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 Fh(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=hg(t)),t})}};const kg=(e,t)=>{let n=e=>r([t,e]),r;return[t,n,new Promise(i=>(r=i)&&e.once(t,n))]};function Ag(e){return Rh(this,arguments,function*(){let t=[],n=`error`,r=!1,i=null,a,o,s=0,c=[],l;function u(){return a===`peek`?dg(c,o)[0]:([l,c,s]=dg(c,o),l)}if({cmd:a,size:o}=(yield yield Lh((()=>null)()))||{cmd:`read`,size:0},e.isTTY)return yield yield Lh(new Uint8Array),yield Lh(null);try{t[0]=kg(e,`end`),t[1]=kg(e,`error`);do{if(t[2]=kg(e,`readable`),[n,i]=yield Lh(Promise.race(t.map(e=>e[2]))),n===`error`)break;if((r=n===`end`)||(Number.isFinite(o-s)?(l=hg(e.read(o-s)),l.byteLength0&&(c.push(l),s+=l.byteLength)),r||o<=s)do({cmd:a,size:o}=yield yield Lh(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 jg;(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`})(jg||={});var Mg;(function(e){e[e.Sparse=0]=`Sparse`,e[e.Dense=1]=`Dense`})(Mg||={});var Ng;(function(e){e[e.HALF=0]=`HALF`,e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`})(Ng||={});var Pg;(function(e){e[e.DAY=0]=`DAY`,e[e.MILLISECOND=1]=`MILLISECOND`})(Pg||={});var Fg;(function(e){e[e.SECOND=0]=`SECOND`,e[e.MILLISECOND=1]=`MILLISECOND`,e[e.MICROSECOND=2]=`MICROSECOND`,e[e.NANOSECOND=3]=`NANOSECOND`})(Fg||={});var Ig;(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`})(Ig||={});const Lg=2,Rg=4,zg=4,Bg=4,Vg=new Int32Array(2),Hg=new Float32Array(Vg.buffer),Ug=new Float64Array(Vg.buffer),Wg=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var Gg;(function(e){e[e.UTF8_BYTES=1]=`UTF8_BYTES`,e[e.UTF16_STRING=2]=`UTF16_STRING`})(Gg||={});var Kg=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){Hg[0]=t,this.writeInt32(e,Vg[0])}writeFloat64(e,t){Ug[0]=t,this.writeInt32(e,Vg[Wg?0:1]),this.writeInt32(e+4,Vg[Wg?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)*Lg;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,Rg+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)}},w_=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()+Bg),(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)}},T_;(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`})(T_||={});var E_=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()+Bg),(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):T_.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 i_).__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 a_).__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,T_.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}},D_=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()+Bg),(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):t_.Little}fields(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new E_).__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 a_).__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,t_.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)}},O_;(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`})(O_||={});var q;(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`})(q||={});var k_;(function(e){e[e.OFFSET=0]=`OFFSET`,e[e.DATA=1]=`DATA`,e[e.VALIDITY=2]=`VALIDITY`,e[e.TYPE=3]=`TYPE`})(k_||={});const A_=void 0;function j_(e){if(e===null)return`null`;if(e===A_)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=>j_(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function M_(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 N_(e,t){return M_(e/t)+M_(e%t)/M_(t)}const P_=Symbol.for(`isArrowBigNum`);function F_(e,...t){return t.length===0?Object.setPrototypeOf(fg(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}F_.prototype[P_]=!0,F_.prototype.toJSON=function(){return`"${H_(this)}"`},F_.prototype.valueOf=function(e){return V_(this,e)},F_.prototype.toString=function(){return H_(this)},F_.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return V_(this);case`string`:return H_(this);case`default`:return U_(this)}return H_(this)};function I_(...e){return F_.apply(this,e)}function L_(...e){return F_.apply(this,e)}function R_(...e){return F_.apply(this,e)}Object.setPrototypeOf(I_.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(L_.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(R_.prototype,Object.create(Uint32Array.prototype)),Object.assign(I_.prototype,F_.prototype,{constructor:I_,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(L_.prototype,F_.prototype,{constructor:L_,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(R_.prototype,F_.prototype,{constructor:R_,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const z_=BigInt(4294967296)*BigInt(4294967296),B_=z_-BigInt(1);function V_(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 W_(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`))(mv.prototype);var hv=class extends mv{constructor(){super(q.Null)}toString(){return`Null`}};q_=Symbol.toStringTag,hv[q_]=(e=>e[Symbol.toStringTag]=`Null`)(hv.prototype);var gv=class extends mv{constructor(e,t){super(q.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}`}};J_=Symbol.toStringTag,gv[J_]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(gv.prototype);var _v=class extends gv{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},vv=class extends gv{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},yv=class extends gv{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},bv=class extends gv{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},xv=class extends gv{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Sv=class extends gv{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},Cv=class extends gv{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},wv=class extends gv{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(_v.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(vv.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(yv.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(bv.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(xv.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(Sv.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Cv.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(wv.prototype,`ArrayType`,{value:BigUint64Array});var Tv=class extends mv{constructor(e){super(q.Float),this.precision=e}get ArrayType(){switch(this.precision){case Ng.HALF:return Uint16Array;case Ng.SINGLE:return Float32Array;case Ng.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};Y_=Symbol.toStringTag,Tv[Y_]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(Tv.prototype);var Ev=class extends Tv{constructor(){super(Ng.HALF)}},Dv=class extends Tv{constructor(){super(Ng.SINGLE)}},Ov=class extends Tv{constructor(){super(Ng.DOUBLE)}};Object.defineProperty(Ev.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Dv.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(Ov.prototype,`ArrayType`,{value:Float64Array});var kv=class extends mv{constructor(){super(q.Binary)}toString(){return`Binary`}};X_=Symbol.toStringTag,kv[X_]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(kv.prototype);var Av=class extends mv{constructor(){super(q.LargeBinary)}toString(){return`LargeBinary`}};Z_=Symbol.toStringTag,Av[Z_]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(Av.prototype);var jv=class extends mv{constructor(){super(q.Utf8)}toString(){return`Utf8`}};Q_=Symbol.toStringTag,jv[Q_]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(jv.prototype);var Mv=class extends mv{constructor(){super(q.LargeUtf8)}toString(){return`LargeUtf8`}};$_=Symbol.toStringTag,Mv[$_]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(Mv.prototype);var Nv=class extends mv{constructor(){super(q.Bool)}toString(){return`Bool`}};ev=Symbol.toStringTag,Nv[ev]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(Nv.prototype);var Pv=class extends mv{constructor(e,t,n=128){super(q.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};tv=Symbol.toStringTag,Pv[tv]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(Pv.prototype);var Fv=class extends mv{constructor(e){super(q.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${Pg[this.unit]}>`}get ArrayType(){return this.unit===Pg.DAY?Int32Array:BigInt64Array}};nv=Symbol.toStringTag,Fv[nv]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(Fv.prototype);var Iv=class extends mv{constructor(e,t){super(q.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${Fg[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};rv=Symbol.toStringTag,Iv[rv]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(Iv.prototype);var Lv=class extends mv{constructor(e,t){super(q.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${Fg[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};iv=Symbol.toStringTag,Lv[iv]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(Lv.prototype);var Rv=class extends mv{constructor(e){super(q.Interval),this.unit=e}toString(){return`Interval<${Ig[this.unit]}>`}};av=Symbol.toStringTag,Rv[av]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(Rv.prototype);var zv=class extends mv{constructor(e){super(q.Duration),this.unit=e}toString(){return`Duration<${Fg[this.unit]}>`}};ov=Symbol.toStringTag,zv[ov]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(zv.prototype);var Bv=class extends mv{constructor(e){super(q.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}};sv=Symbol.toStringTag,Bv[sv]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(Bv.prototype);var Vv=class extends mv{constructor(e){super(q.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};cv=Symbol.toStringTag,Vv[cv]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(Vv.prototype);var Hv=class extends mv{constructor(e,t,n){super(q.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(` | `)}>`}};lv=Symbol.toStringTag,Hv[lv]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(Hv.prototype);var Uv=class extends mv{constructor(e){super(q.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};uv=Symbol.toStringTag,Uv[uv]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(Uv.prototype);var Wv=class extends mv{constructor(e,t){super(q.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}>`}};dv=Symbol.toStringTag,Wv[dv]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(Wv.prototype);var Gv=class extends mv{constructor(e,t=!1){var n,r,i;if(super(q.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(`, `)}}>`}};fv=Symbol.toStringTag,Gv[fv]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(Gv.prototype);const Kv=(e=>()=>++e)(-1);var qv=class extends mv{constructor(e,t,n,r){super(q.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?Kv():M_(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}>`}};pv=Symbol.toStringTag,qv[pv]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(qv.prototype);function Jv(e){let t=e;switch(e.typeId){case q.Decimal:return e.bitWidth/32;case q.Interval:return 1+t.unit;case q.FixedSizeList:return t.listSize;case q.FixedSizeBinary:return t.byteWidth;default:return 1}}var Yv=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 Xv(this,e,t)}getVisitFnByTypeId(e,t=!0){return Zv(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 Xv(e,t,n=!0){return typeof t==`number`?Zv(e,t,n):typeof t==`string`&&t in q?Zv(e,q[t],n):t&&t instanceof mv?Zv(e,Qv(t),n):t?.type&&t.type instanceof mv?Zv(e,Qv(t.type),n):Zv(e,q.NONE,n)}function Zv(e,t,n=!0){let r=null;switch(t){case q.Null:r=e.visitNull;break;case q.Bool:r=e.visitBool;break;case q.Int:r=e.visitInt;break;case q.Int8:r=e.visitInt8||e.visitInt;break;case q.Int16:r=e.visitInt16||e.visitInt;break;case q.Int32:r=e.visitInt32||e.visitInt;break;case q.Int64:r=e.visitInt64||e.visitInt;break;case q.Uint8:r=e.visitUint8||e.visitInt;break;case q.Uint16:r=e.visitUint16||e.visitInt;break;case q.Uint32:r=e.visitUint32||e.visitInt;break;case q.Uint64:r=e.visitUint64||e.visitInt;break;case q.Float:r=e.visitFloat;break;case q.Float16:r=e.visitFloat16||e.visitFloat;break;case q.Float32:r=e.visitFloat32||e.visitFloat;break;case q.Float64:r=e.visitFloat64||e.visitFloat;break;case q.Utf8:r=e.visitUtf8;break;case q.LargeUtf8:r=e.visitLargeUtf8;break;case q.Binary:r=e.visitBinary;break;case q.LargeBinary:r=e.visitLargeBinary;break;case q.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case q.Date:r=e.visitDate;break;case q.DateDay:r=e.visitDateDay||e.visitDate;break;case q.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case q.Timestamp:r=e.visitTimestamp;break;case q.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case q.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case q.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case q.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case q.Time:r=e.visitTime;break;case q.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case q.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case q.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case q.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case q.Decimal:r=e.visitDecimal;break;case q.List:r=e.visitList;break;case q.Struct:r=e.visitStruct;break;case q.Union:r=e.visitUnion;break;case q.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case q.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case q.Dictionary:r=e.visitDictionary;break;case q.Interval:r=e.visitInterval;break;case q.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case q.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case q.Duration:r=e.visitDuration;break;case q.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case q.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case q.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case q.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case q.FixedSizeList:r=e.visitFixedSizeList;break;case q.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${q[t]}'`)}function Qv(e){switch(e.typeId){case q.Null:return q.Null;case q.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?q.Int8:q.Uint8;case 16:return n?q.Int16:q.Uint16;case 32:return n?q.Int32:q.Uint32;case 64:return n?q.Int64:q.Uint64}return q.Int}case q.Float:switch(e.precision){case Ng.HALF:return q.Float16;case Ng.SINGLE:return q.Float32;case Ng.DOUBLE:return q.Float64}return q.Float;case q.Binary:return q.Binary;case q.LargeBinary:return q.LargeBinary;case q.Utf8:return q.Utf8;case q.LargeUtf8:return q.LargeUtf8;case q.Bool:return q.Bool;case q.Decimal:return q.Decimal;case q.Time:switch(e.unit){case Fg.SECOND:return q.TimeSecond;case Fg.MILLISECOND:return q.TimeMillisecond;case Fg.MICROSECOND:return q.TimeMicrosecond;case Fg.NANOSECOND:return q.TimeNanosecond}return q.Time;case q.Timestamp:switch(e.unit){case Fg.SECOND:return q.TimestampSecond;case Fg.MILLISECOND:return q.TimestampMillisecond;case Fg.MICROSECOND:return q.TimestampMicrosecond;case Fg.NANOSECOND:return q.TimestampNanosecond}return q.Timestamp;case q.Date:switch(e.unit){case Pg.DAY:return q.DateDay;case Pg.MILLISECOND:return q.DateMillisecond}return q.Date;case q.Interval:switch(e.unit){case Ig.DAY_TIME:return q.IntervalDayTime;case Ig.YEAR_MONTH:return q.IntervalYearMonth}return q.Interval;case q.Duration:switch(e.unit){case Fg.SECOND:return q.DurationSecond;case Fg.MILLISECOND:return q.DurationMillisecond;case Fg.MICROSECOND:return q.DurationMicrosecond;case Fg.NANOSECOND:return q.DurationNanosecond}return q.Duration;case q.Map:return q.Map;case q.List:return q.List;case q.Struct:return q.Struct;case q.Union:switch(e.mode){case Mg.Dense:return q.DenseUnion;case Mg.Sparse:return q.SparseUnion}return q.Union;case q.FixedSizeBinary:return q.FixedSizeBinary;case q.FixedSizeList:return q.FixedSizeList;case q.Dictionary:return q.Dictionary}throw Error(`Unrecognized type '${q[e.typeId]}'`)}Yv.prototype.visitInt8=null,Yv.prototype.visitInt16=null,Yv.prototype.visitInt32=null,Yv.prototype.visitInt64=null,Yv.prototype.visitUint8=null,Yv.prototype.visitUint16=null,Yv.prototype.visitUint32=null,Yv.prototype.visitUint64=null,Yv.prototype.visitFloat16=null,Yv.prototype.visitFloat32=null,Yv.prototype.visitFloat64=null,Yv.prototype.visitDateDay=null,Yv.prototype.visitDateMillisecond=null,Yv.prototype.visitTimestampSecond=null,Yv.prototype.visitTimestampMillisecond=null,Yv.prototype.visitTimestampMicrosecond=null,Yv.prototype.visitTimestampNanosecond=null,Yv.prototype.visitTimeSecond=null,Yv.prototype.visitTimeMillisecond=null,Yv.prototype.visitTimeMicrosecond=null,Yv.prototype.visitTimeNanosecond=null,Yv.prototype.visitDenseUnion=null,Yv.prototype.visitSparseUnion=null,Yv.prototype.visitIntervalDayTime=null,Yv.prototype.visitIntervalYearMonth=null,Yv.prototype.visitDuration=null,Yv.prototype.visitDurationSecond=null,Yv.prototype.visitDurationMillisecond=null,Yv.prototype.visitDurationMicrosecond=null,Yv.prototype.visitDurationNanosecond=null;const $v=new Float64Array(1),ey=new Uint32Array($v.buffer);function ty(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 ny(e){if(e!==e)return 32256;$v[0]=e;let t=(ey[1]&2147483648)>>16&65535,n=ey[1]&2146435072,r=0;return n>=1089470464?ey[0]>0?n=31744:(n=(n&2080374784)>>16,r=(ey[1]&1048575)>>10):n<=1056964608?(r=1048576+(ey[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(ey[1]&1048575)+512>>10),t|n|r&65535}var ry=class extends Yv{};function iy(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const ay=(e,t,n)=>{e[t]=Math.floor(n/864e5)},oy=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},ly=({values:e},t,n)=>{e[t]=n},uy=({values:e},t,n)=>{e[t]=ny(n)},dy=(e,t,n)=>{switch(e.type.precision){case Ng.HALF:return uy(e,t,n);case Ng.SINGLE:case Ng.DOUBLE:return ly(e,t,n)}},fy=({values:e},t,n)=>{ay(e,t,n.valueOf())},py=({values:e},t,n)=>{e[t]=BigInt(n)},my=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},hy=({values:e,valueOffsets:t},n,r)=>oy(e,t,n,r),gy=({values:e,valueOffsets:t},n,r)=>oy(e,t,n,Wh(r)),_y=(e,t,n)=>{e.type.unit===Pg.DAY?fy(e,t,n):py(e,t,n)},vy=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},yy=({values:e},t,n)=>{e[t]=BigInt(n)},by=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},xy=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},Sy=(e,t,n)=>{switch(e.type.unit){case Fg.SECOND:return vy(e,t,n);case Fg.MILLISECOND:return yy(e,t,n);case Fg.MICROSECOND:return by(e,t,n);case Fg.NANOSECOND:return xy(e,t,n)}},Cy=({values:e},t,n)=>{e[t]=n},wy=({values:e},t,n)=>{e[t]=n},Ty=({values:e},t,n)=>{e[t]=n},Ey=({values:e},t,n)=>{e[t]=n},Dy=(e,t,n)=>{switch(e.type.unit){case Fg.SECOND:return Cy(e,t,n);case Fg.MILLISECOND:return wy(e,t,n);case Fg.MICROSECOND:return Ty(e,t,n);case Fg.NANOSECOND:return Ey(e,t,n)}},Oy=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},ky=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=Yy.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=Yy.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},jy=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),My=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),Ny=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),Py=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),Fy=(e,t,n)=>{let r=e.type.children.map(e=>Yy.getVisitFn(e.type)),i=n instanceof Map?Ny(t,n):n instanceof Jx?My(t,n):Array.isArray(n)?jy(t,n):Py(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},Iy=(e,t,n)=>{e.type.mode===Mg.Dense?Ly(e,t,n):Ry(e,t,n)},Ly=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Yy.visit(i,e.valueOffsets[t],n)},Ry=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Yy.visit(i,t,n)},zy=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},By=(e,t,n)=>{e.type.unit===Ig.DAY_TIME?Vy(e,t,n):Hy(e,t,n)},Vy=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},Hy=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},Uy=({values:e},t,n)=>{e[t]=n},Wy=({values:e},t,n)=>{e[t]=n},Gy=({values:e},t,n)=>{e[t]=n},Ky=({values:e},t,n)=>{e[t]=n},qy=(e,t,n)=>{switch(e.type.unit){case Fg.SECOND:return Uy(e,t,n);case Fg.MILLISECOND:return Wy(e,t,n);case Fg.MICROSECOND:return Gy(e,t,n);case Fg.NANOSECOND:return Ky(e,t,n)}},Jy=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=Yy.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${j_(e)}: ${j_(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new $y(this[Xy],this[Zy])}},$y=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[Xy].type.children.findIndex(e=>e.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[Xy].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[Xy].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=Gb.visit(e[Xy].children[n],e[Zy]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[Xy].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(Yy.visit(e[Xy].children[r],e[Zy],n),Reflect.set(e,t,n))}},tb=class extends Yv{};function nb(e){return(t,n)=>t.getValid(n)?e(t,n):null}const rb=(e,t)=>864e5*e[t],ib=(e,t)=>null,ab=(e,t,n)=>{if(n+1>=t.length)return null;let r=M_(t[n]),i=M_(t[n+1]);return e.subarray(r,i)},ob=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<rb(e,t),cb=({values:e},t)=>M_(e[t]),lb=({stride:e,values:t},n)=>t[e*n],ub=({stride:e,values:t},n)=>ty(t[e*n]),db=({values:e},t)=>e[t],fb=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),pb=({values:e,valueOffsets:t},n)=>ab(e,t,n),mb=({values:e,valueOffsets:t},n)=>{let r=ab(e,t,n);return r===null?null:Hh(r)},hb=({values:e},t)=>e[t],gb=({type:e,values:t},n)=>e.precision===Ng.HALF?ty(t[n]):t[n],_b=(e,t)=>e.type.unit===Pg.DAY?sb(e,t):cb(e,t),vb=({values:e},t)=>1e3*M_(e[t]),yb=({values:e},t)=>M_(e[t]),bb=({values:e},t)=>N_(e[t],BigInt(1e3)),xb=({values:e},t)=>N_(e[t],BigInt(1e6)),Sb=(e,t)=>{switch(e.type.unit){case Fg.SECOND:return vb(e,t);case Fg.MILLISECOND:return yb(e,t);case Fg.MICROSECOND:return bb(e,t);case Fg.NANOSECOND:return xb(e,t)}},Cb=({values:e},t)=>e[t],wb=({values:e},t)=>e[t],Tb=({values:e},t)=>e[t],Eb=({values:e},t)=>e[t],Db=(e,t)=>{switch(e.type.unit){case Fg.SECOND:return Cb(e,t);case Fg.MILLISECOND:return wb(e,t);case Fg.MICROSECOND:return Tb(e,t);case Fg.NANOSECOND:return Eb(e,t)}},Ob=({values:e,stride:t},n)=>G_.decimal(e.subarray(t*n,t*(n+1))),kb=(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 Jx([c])},Ab=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new Xb(o.slice(i,a-i))},jb=(e,t)=>new Qy(e,t),Mb=(e,t)=>e.type.mode===Mg.Dense?Nb(e,t):Pb(e,t),Nb=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return Gb.visit(r,e.valueOffsets[t])},Pb=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return Gb.visit(r,t)},Fb=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},Ib=(e,t)=>e.type.unit===Ig.DAY_TIME?Lb(e,t):Rb(e,t),Lb=({values:e},t)=>e.subarray(2*t,2*(t+1)),Rb=({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},zb=({values:e},t)=>e[t],Bb=({values:e},t)=>e[t],Vb=({values:e},t)=>e[t],Hb=({values:e},t)=>e[t],Ub=(e,t)=>{switch(e.type.unit){case Fg.SECOND:return zb(e,t);case Fg.MILLISECOND:return Bb(e,t);case Fg.MICROSECOND:return Vb(e,t);case Fg.NANOSECOND:return Hb(e,t)}},Wb=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new Jx([a])};tb.prototype.visitNull=nb(ib),tb.prototype.visitBool=nb(ob),tb.prototype.visitInt=nb(hb),tb.prototype.visitInt8=nb(lb),tb.prototype.visitInt16=nb(lb),tb.prototype.visitInt32=nb(lb),tb.prototype.visitInt64=nb(db),tb.prototype.visitUint8=nb(lb),tb.prototype.visitUint16=nb(lb),tb.prototype.visitUint32=nb(lb),tb.prototype.visitUint64=nb(db),tb.prototype.visitFloat=nb(gb),tb.prototype.visitFloat16=nb(ub),tb.prototype.visitFloat32=nb(lb),tb.prototype.visitFloat64=nb(lb),tb.prototype.visitUtf8=nb(mb),tb.prototype.visitLargeUtf8=nb(mb),tb.prototype.visitBinary=nb(pb),tb.prototype.visitLargeBinary=nb(pb),tb.prototype.visitFixedSizeBinary=nb(fb),tb.prototype.visitDate=nb(_b),tb.prototype.visitDateDay=nb(sb),tb.prototype.visitDateMillisecond=nb(cb),tb.prototype.visitTimestamp=nb(Sb),tb.prototype.visitTimestampSecond=nb(vb),tb.prototype.visitTimestampMillisecond=nb(yb),tb.prototype.visitTimestampMicrosecond=nb(bb),tb.prototype.visitTimestampNanosecond=nb(xb),tb.prototype.visitTime=nb(Db),tb.prototype.visitTimeSecond=nb(Cb),tb.prototype.visitTimeMillisecond=nb(wb),tb.prototype.visitTimeMicrosecond=nb(Tb),tb.prototype.visitTimeNanosecond=nb(Eb),tb.prototype.visitDecimal=nb(Ob),tb.prototype.visitList=nb(kb),tb.prototype.visitStruct=nb(jb),tb.prototype.visitUnion=nb(Mb),tb.prototype.visitDenseUnion=nb(Nb),tb.prototype.visitSparseUnion=nb(Pb),tb.prototype.visitDictionary=nb(Fb),tb.prototype.visitInterval=nb(Ib),tb.prototype.visitIntervalDayTime=nb(Lb),tb.prototype.visitIntervalYearMonth=nb(Rb),tb.prototype.visitDuration=nb(Ub),tb.prototype.visitDurationSecond=nb(zb),tb.prototype.visitDurationMillisecond=nb(Bb),tb.prototype.visitDurationMicrosecond=nb(Vb),tb.prototype.visitDurationNanosecond=nb(Hb),tb.prototype.visitFixedSizeList=nb(Wb),tb.prototype.visitMap=nb(Ab);const Gb=new tb,Kb=Symbol.for(`keys`),qb=Symbol.for(`vals`),Jb=Symbol.for(`kKeysAsStrings`),Yb=Symbol.for(`_kKeysAsStrings`);var Xb=class{constructor(e){return this[Kb]=new Jx([e.children[0]]).memoize(),this[qb]=e.children[1],new Proxy(this,new Qb)}get[Jb](){return this[Yb]||(this[Yb]=Array.from(this[Kb].toArray(),String))}[Symbol.iterator](){return new Zb(this[Kb],this[qb])}get size(){return this[Kb].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[Kb],t=this[qb],n={};for(let r=-1,i=e.length;++r`${j_(e)}: ${j_(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},Zb=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),Gb.visit(this.vals,e)]})}},Qb=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[Jb]}has(e,t){return e[Jb].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[Jb].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[Jb].indexOf(t);if(n!==-1){let r=Gb.visit(Reflect.get(e,qb),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[Jb].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(Yy.visit(Reflect.get(e,qb),r,n),Reflect.set(e,t,n))}};Object.defineProperties(Xb.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[Kb]:{writable:!0,enumerable:!1,configurable:!1,value:null},[qb]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Yb]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let $b;function ex(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 tx=(e,t)=>e<0?t+e:e,nx=e=>e!==e;function rx(e){let t=typeof e;if(t!==`object`||e===null)return nx(e)?nx: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?Sg(e,t):!1:e instanceof Map?ax(e):Array.isArray(e)?ix(e):e instanceof Jx?ox(e):sx(e,!0)}function ix(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 lx(e,n);case Map:return dx(e,n,n.keys());case Xb:case Qy:case Object:case void 0:return dx(e,n,t||Object.keys(n))}return n instanceof Jx?ux(e,n):!1}}function lx(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++r>r}function mx(e,t,n){let r=n.byteLength+7&-8;if(e>0||n.byteLength>3):hx(new gx(n,e,t,null,fx)).subarray(0,r)),i}return n}function hx(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 gx=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 _x(e,t,i)+_x(e,r,n)+vx(e,i>>3,r-i>>3)}function vx(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+=yx(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=yx(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=yx(a.getUint8(i)),i+=1;return r}function yx(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const bx=-1;var xx=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 mv.isSparseUnion(e)||mv.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(mv.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=bx&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-_x(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=Jv(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(mv.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===Mg.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(mx(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===q.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(mx(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[k_.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[k_.TYPE])&&(a[k_.TYPE]=i.subarray(e,e+t)),(i=a[k_.OFFSET])&&(a[k_.OFFSET]=i.subarray(e,e+t+1))||(i=a[k_.DATA])&&(a[k_.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};xx.prototype.children=Object.freeze([]);var Sx=class e extends Yv{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new xx(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=hg(e.data),i=hg(e.nullBitmap),a=pg(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xx(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=hg(e.data),i=hg(e.nullBitmap),a=mg(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xx(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=hg(e.data),i=hg(e.nullBitmap),a=pg(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xx(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=hg(e.data),i=hg(e.nullBitmap),a=mg(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xx(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=hg(e.nullBitmap),a=pg(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xx(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=hg(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=fg(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(mv.isSparseUnion(t))return new xx(t,n,a,o,[void 0,void 0,void 0,i],r);let s=pg(e.valueOffsets);return new xx(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=hg(t.nullBitmap),a=fg(n.indices.ArrayType,t.data),{dictionary:o=new Jx([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new xx(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length/Jv(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xx(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=hg(e.nullBitmap),i=fg(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xx(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=hg(t.nullBitmap),{length:o=i.length/Jv(n),nullCount:s=t.nullBitmap?-1:0}=t;return new xx(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=hg(t.nullBitmap),o=pg(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new xx(n,r,s,c,[o,void 0,a],[i])}};const Cx=new Sx;function wx(e){return Cx.visit(e)}var Tx=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 Dx(e){return e.reduce((e,t)=>e+t.nullCount,0)}function Ox(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function kx(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 Ax(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function Lx(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new gx(n,e.offset+(t||0),e.length,n,fx)){if(!i)return r;++r}return-1}function Rx(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case q.Union:break;case q.Dictionary:break;default:return Lx(e,n)}let r=Gb.getVisitFn(e),i=rx(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 Tx(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new Ux(a)})}var Ux=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof xx)))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}=Kx[o.typeId],r=a[0];this.isValid=e=>jx(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,qx[o.typeId]),this._offsets=Ox(a);break}this.data=a,this.type=o,this.stride=Jv(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 Ex(this.data)}get nullCount(){return Dx(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${q[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(tx(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return Wx.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(ex(this,t,n,({data:e,_offsets:t},n,r)=>kx(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case q.Int:case q.Float:case q.Decimal:case q.Time:case q.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 mv.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(mv.isDictionary(this.type)){let t=new Yx(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new Yx(this)}unmemoize(){if(mv.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}};Gx=Symbol.toStringTag,Jx[Gx]=(e=>{e.type=mv.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(q).map(e=>q[e]).filter(e=>typeof e==`number`&&e!==q.NONE);for(let n of t){let t=Gb.getVisitFnByTypeId(n),r=Yy.getVisitFnByTypeId(n),i=Bx.getVisitFnByTypeId(n);Kx[n]={get:t,set:r,indexOf:i},qx[n]=Object.create(e,{isValid:{value:Mx(jx)},get:{value:Mx(Gb.getVisitFnByTypeId(n))},set:{value:Nx(Yy.getVisitFnByTypeId(n))},indexOf:{value:Px(Bx.getVisitFnByTypeId(n))}})}return`Vector`})(Jx.prototype);var Yx=class e extends Jx{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 Jx(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},Xx=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()}},Zx=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()+Bg),(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):jg.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new D_).__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 Xx).__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 Xx).__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 a_).__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,jg.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)}},Qx=class e{constructor(e=[],t,n,r=jg.V5){this.fields=e||[],this.metadata=t||new Map,n||=tS(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=eS(eS(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:eS(eS(new Map,r[t].metadata),e.metadata)}))&&!1:!0}),o=tS(a,new Map);return new e([...r,...a],i,new Map([...this.dictionaries,...o]))}};Qx.prototype.fields=null,Qx.prototype.metadata=null,Qx.prototype.dictionaries=null;var $x=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)}};$x.prototype.type=null,$x.prototype.name=null,$x.prototype.nullable=null,$x.prototype.metadata=null;function eS(e,t){return new Map([...e||new Map,...t||new Map])}function tS(e,t=new Map){for(let n=-1,r=e.length;++n0&&tS(i.children,t)}return t}var nS=qg,rS=Kg,iS=class{static decode(e){e=new rS(hg(e));let t=Zx.getRootAsFooter(e),n=Qx.decode(t.schema(),new Map,t.version());return new aS(n,t)}static encode(e){let t=new nS,n=Qx.encode(t,e.schema);Zx.startRecordBatchesVector(t,e.numRecordBatches);for(let n of[...e.recordBatches()].slice().reverse())oS.encode(t,n);let r=t.endVector();Zx.startDictionariesVector(t,e.numDictionaries);for(let n of[...e.dictionaryBatches()].slice().reverse())oS.encode(t,n);let i=t.endVector();return Zx.startFooter(t),Zx.addSchema(t,n),Zx.addVersion(t,jg.V5),Zx.addRecordBatches(t,r),Zx.addDictionaries(t,i),Zx.finishFooterBuffer(t,Zx.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=jg.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 Fh(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(sS);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Cg.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Cg.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return Fh(this,void 0,void 0,function*(){return yield this.abort(e),sS})}return(e){return Fh(this,void 0,void 0,function*(){return yield this.close(),sS})}read(e){return Fh(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return Fh(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(sS)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw Error(`AsyncQueue is closed`)}},dS=class extends uS{write(e){if((e=hg(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?Hh(this.toUint8Array(!0)):this.toUint8Array(!1).then(Hh)}toUint8Array(e=!1){return e?dg(this._values)[0]:(()=>Fh(this,void 0,void 0,function*(){var e,t,n,r;let i=[],a=0;try{for(var o=!0,s=Bh(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 dg(i,a)[0]}))()}},fS=class{constructor(e){e&&(this.source=new mS(Cg.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)}},pS=class e{constructor(t){t instanceof e?this.source=t.source:t instanceof dS?this.source=new hS(Cg.fromAsyncIterable(t)):og(t)?this.source=new hS(Cg.fromNodeStream(t)):ig(t)?this.source=new hS(Cg.fromDOMStream(t)):tg(t)?this.source=new hS(Cg.fromDOMStream(t.body)):Xh(t)?this.source=new hS(Cg.fromIterable(t)):(Yh(t)||Zh(t))&&(this.source=new hS(Cg.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)}},mS=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)||sS)}return(e){return Object.create(this.source.return&&this.source.return(e)||sS)}},hS=class{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(e){return Fh(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return Fh(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return Fh(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(e){return Fh(this,arguments,void 0,function*(e,t=`read`){return yield this.source.next({cmd:t,size:e})})}throw(e){return Fh(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||sS;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return Fh(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||sS;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},gS=class extends fS{constructor(e,t){super(),this.position=0,this.buffer=hg(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),eFh(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return Fh(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 Fh(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`${yS(this.buffer[3])} ${yS(this.buffer[2])} ${yS(this.buffer[1])} ${yS(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)}},DS=class extends ES{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:hx(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return fg(Uint8Array,fg(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return fg(Uint8Array,fg(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:n}=this;return mv.isTimestamp(e)||(mv.isInt(e)||mv.isTime(e))&&e.bitWidth===64||mv.isDuration(e)||mv.isDate(e)&&e.unit===Pg.MILLISECOND?fg(Uint8Array,wS.convertArray(n[t])):mv.isDecimal(e)?fg(Uint8Array,TS.convertArray(n[t])):mv.isBinary(e)||mv.isLargeBinary(e)||mv.isFixedSizeBinary(e)?OS(n[t]):mv.isBool(e)?hx(n[t]):mv.isUtf8(e)||mv.isLargeUtf8(e)?Wh(n[t].join(``)):fg(Uint8Array,fg(e.ArrayType,n[t].map(e=>+e)))}};function OS(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 kS=class extends Yv{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 AS(e,t){return t instanceof e.constructor}function jS(e,t){return e===t||AS(e,t)}function MS(e,t){return e===t||AS(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function NS(e,t){return e===t||AS(e,t)&&e.precision===t.precision}function PS(e,t){return e===t||AS(e,t)&&e.byteWidth===t.byteWidth}function FS(e,t){return e===t||AS(e,t)&&e.unit===t.unit}function IS(e,t){return e===t||AS(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function LS(e,t){return e===t||AS(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function RS(e,t){return e===t||AS(e,t)&&e.children.length===t.children.length&&KS.compareManyFields(e.children,t.children)}function zS(e,t){return e===t||AS(e,t)&&e.children.length===t.children.length&&KS.compareManyFields(e.children,t.children)}function BS(e,t){return e===t||AS(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&KS.compareManyFields(e.children,t.children)}function VS(e,t){return e===t||AS(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&KS.visit(e.indices,t.indices)&&KS.visit(e.dictionary,t.dictionary)}function HS(e,t){return e===t||AS(e,t)&&e.unit===t.unit}function US(e,t){return e===t||AS(e,t)&&e.unit===t.unit}function WS(e,t){return e===t||AS(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&KS.compareManyFields(e.children,t.children)}function GS(e,t){return e===t||AS(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&KS.compareManyFields(e.children,t.children)}kS.prototype.visitNull=jS,kS.prototype.visitBool=jS,kS.prototype.visitInt=MS,kS.prototype.visitInt8=MS,kS.prototype.visitInt16=MS,kS.prototype.visitInt32=MS,kS.prototype.visitInt64=MS,kS.prototype.visitUint8=MS,kS.prototype.visitUint16=MS,kS.prototype.visitUint32=MS,kS.prototype.visitUint64=MS,kS.prototype.visitFloat=NS,kS.prototype.visitFloat16=NS,kS.prototype.visitFloat32=NS,kS.prototype.visitFloat64=NS,kS.prototype.visitUtf8=jS,kS.prototype.visitLargeUtf8=jS,kS.prototype.visitBinary=jS,kS.prototype.visitLargeBinary=jS,kS.prototype.visitFixedSizeBinary=PS,kS.prototype.visitDate=FS,kS.prototype.visitDateDay=FS,kS.prototype.visitDateMillisecond=FS,kS.prototype.visitTimestamp=IS,kS.prototype.visitTimestampSecond=IS,kS.prototype.visitTimestampMillisecond=IS,kS.prototype.visitTimestampMicrosecond=IS,kS.prototype.visitTimestampNanosecond=IS,kS.prototype.visitTime=LS,kS.prototype.visitTimeSecond=LS,kS.prototype.visitTimeMillisecond=LS,kS.prototype.visitTimeMicrosecond=LS,kS.prototype.visitTimeNanosecond=LS,kS.prototype.visitDecimal=jS,kS.prototype.visitList=RS,kS.prototype.visitStruct=zS,kS.prototype.visitUnion=BS,kS.prototype.visitDenseUnion=BS,kS.prototype.visitSparseUnion=BS,kS.prototype.visitDictionary=VS,kS.prototype.visitInterval=HS,kS.prototype.visitIntervalDayTime=HS,kS.prototype.visitIntervalYearMonth=HS,kS.prototype.visitDuration=US,kS.prototype.visitDurationSecond=US,kS.prototype.visitDurationMillisecond=US,kS.prototype.visitDurationMicrosecond=US,kS.prototype.visitDurationNanosecond=US,kS.prototype.visitFixedSizeList=WS,kS.prototype.visitMap=GS;const KS=new kS;function qS(e,t){return KS.compareSchemas(e,t)}function JS(e,t){return YS(e,t.map(e=>e.data.concat()))}function YS(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++]=wx({type:new Vv(n),length:o,nullCount:0,children:u.slice()})))}return[e=e.assign(n),r.map(t=>new eC(e,t))]}function XS(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))??wx({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return n}var ZS,QS=class e{constructor(...t){var n,r;if(t.length===0)return this.batches=[],this.schema=new Qx([]),this._offsets=[0],this;let i,a;t[0]instanceof Qx&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(a=t.pop());let o=t=>{if(t){if(t instanceof eC)return[t];if(t instanceof e)return t.batches;if(t instanceof xx){if(t.type instanceof Vv)return[new eC(new Qx(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 Jx([t[e]])),r=i??new Qx(e.map((e,t)=>new $x(String(e),n[t].type,n[t].nullable))),[,a]=JS(r,n);return a.length===0?[new eC(t)]:a}}return[]},s=t.flatMap(e=>o(e));if(i=(r=i??(n=s[0])?.schema)??new Qx([]),!(i instanceof Qx))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);for(let e of s){if(!(e instanceof eC))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);if(!qS(i,e.schema))throw TypeError(`Table and inner RecordBatch schemas must be equivalent.`)}this.schema=i,this.batches=s,this._offsets=a??Ox(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=Dx(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(tx(e,this.numRows))}set(e,t){}indexOf(e,t){return-1}[Symbol.iterator](){return this.batches.length>0?Wx.visit(new Jx(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 eC(n,e)))}slice(t,n){let r=this.schema;[t,n]=ex({length:this.numRows},t,n);let i=kx(this.data,this._offsets,t,n);return new e(r,i.map(e=>new eC(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=wx({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new Jx(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]=JS(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(...JS(a,o))}};ZS=Symbol.toStringTag,QS[ZS]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=Mx(jx),e.get=Mx(Gb.getVisitFn(q.Struct)),e.set=Nx(Yy.getVisitFn(q.Struct)),e.indexOf=Px(Bx.getVisitFn(q.Struct)),`Table`))(QS.prototype);var $S,eC=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof Qx)||([,this.data=wx({nullCount:0,type:new Vv(this.schema.fields),children:this.schema.fields.map(e=>wx({type:e.type,nullCount:0}))})]=e,!(this.data instanceof xx)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=tC(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]=$x.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new Qx(n),o=wx({type:new Vv(n),length:i,children:r,nullCount:0});[this.schema,this.data]=tC(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||=nC(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 Gb.visit(this.data,e)}at(e){return this.get(tx(e,this.numRows))}set(e,t){return Yy.visit(this.data,e,t)}indexOf(e,t){return Bx.visit(this.data,e,t)}[Symbol.iterator](){return Wx.visit(new Jx([this.data]))}toArray(){return[...this]}concat(...e){return new QS(this.schema,[this,...e])}slice(t,n){let[r]=new Jx([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,wx({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=wx({type:new Vv(n.fields),length:this.numRows,children:r});return new e(n,i)}};$S=Symbol.toStringTag,eC[$S]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(eC.prototype);function tC(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))??wx({type:c.type,length:n,nullCount:n,nullBitmap:new Uint8Array(o)}))}return[e.assign(i),wx({type:new Vv(i),length:n,children:a})]}function nC(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;++rwx({type:e.type})),n=wx({type:new Vv(e.fields),nullCount:0,children:t});super(e,n)}},iC=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()+Bg),(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):jg.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):O_.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 a_).__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,jg.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,O_.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)}},aC=class extends Yv{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return y_.startNull(t),y_.endNull(t)}visitInt(e,t){return r_.startInt(t),r_.addBitWidth(t,e.bitWidth),r_.addIsSigned(t,e.isSigned),r_.endInt(t)}visitFloat(e,t){return p_.startFloatingPoint(t),p_.addPrecision(t,e.precision),p_.endFloatingPoint(t)}visitBinary(e,t){return o_.startBinary(t),o_.endBinary(t)}visitLargeBinary(e,t){return h_.startLargeBinary(t),h_.endLargeBinary(t)}visitBool(e,t){return s_.startBool(t),s_.endBool(t)}visitUtf8(e,t){return w_.startUtf8(t),w_.endUtf8(t)}visitLargeUtf8(e,t){return g_.startLargeUtf8(t),g_.endLargeUtf8(t)}visitDecimal(e,t){return l_.startDecimal(t),l_.addScale(t,e.scale),l_.addPrecision(t,e.precision),l_.addBitWidth(t,e.bitWidth),l_.endDecimal(t)}visitDate(e,t){return c_.startDate(t),c_.addUnit(t,e.unit),c_.endDate(t)}visitTime(e,t){return x_.startTime(t),x_.addUnit(t,e.unit),x_.addBitWidth(t,e.bitWidth),x_.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return S_.startTimestamp(t),S_.addUnit(t,e.unit),n!==void 0&&S_.addTimezone(t,n),S_.endTimestamp(t)}visitInterval(e,t){return m_.startInterval(t),m_.addUnit(t,e.unit),m_.endInterval(t)}visitDuration(e,t){return u_.startDuration(t),u_.addUnit(t,e.unit),u_.endDuration(t)}visitList(e,t){return __.startList(t),__.endList(t)}visitStruct(e,t){return b_.startStruct_(t),b_.endStruct_(t)}visitUnion(e,t){C_.startTypeIdsVector(t,e.typeIds.length);let n=C_.createTypeIdsVector(t,e.typeIds);return C_.startUnion(t),C_.addMode(t,e.mode),C_.addTypeIds(t,n),C_.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return i_.startDictionaryEncoding(t),i_.addId(t,BigInt(e.id)),i_.addIsOrdered(t,e.isOrdered),n!==void 0&&i_.addIndexType(t,n),i_.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return d_.startFixedSizeBinary(t),d_.addByteWidth(t,e.byteWidth),d_.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return f_.startFixedSizeList(t),f_.addListSize(t,e.listSize),f_.endFixedSizeList(t)}visitMap(e,t){return v_.startMap(t),v_.addKeysSorted(t,e.keysSorted),v_.endMap(t)}};const oC=new aC;function sC(e,t=new Map){return new Qx(uC(e,t),gC(e.metadata),t)}function cC(e){return new SC(e.count,fC(e.columns),pC(e.columns))}function lC(e){return new CC(cC(e.data),e.id,e.isDelta)}function uC(e,t){return(e.fields||[]).filter(Boolean).map(e=>$x.fromJSON(e,t))}function dC(e,t){return(e.children||[]).filter(Boolean).map(e=>$x.fromJSON(e,t))}function fC(e){return(e||[]).reduce((e,t)=>[...e,new TC(t.count,mC(t.VALIDITY)),...fC(t.children)],[])}function pC(e,t=[]){for(let n=-1,r=(e||[]).length;++ne+ +(t===0),0)}function hC(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=vC(e,dC(e,t)),i=new $x(e.name,o,e.nullable,gC(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?_C(r):new yv,s=new qv(t.get(n),r,n,a.isOrdered),i=new $x(e.name,s,e.nullable,gC(e.metadata))):(r=(r=a.indexType)?_C(r):new yv,t.set(n,o=vC(e,dC(e,t))),s=new qv(o,r,n,a.isOrdered),i=new $x(e.name,s,e.nullable,gC(e.metadata))),i||null}function gC(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function _C(e){return new gv(e.isSigned,e.bitWidth)}function vC(e,t){let n=e.type.name;switch(n){case`NONE`:return new hv;case`null`:return new hv;case`binary`:return new kv;case`largebinary`:return new Av;case`utf8`:return new jv;case`largeutf8`:return new Mv;case`bool`:return new Nv;case`list`:return new Bv((t||[])[0]);case`struct`:return new Vv(t||[]);case`struct_`:return new Vv(t||[])}switch(n){case`int`:{let t=e.type;return new gv(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new Tv(Ng[t.precision])}case`decimal`:{let t=e.type;return new Pv(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new Fv(Pg[t.unit])}case`time`:{let t=e.type;return new Iv(Fg[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new Lv(Fg[t.unit],t.timezone)}case`interval`:{let t=e.type;return new Rv(Ig[t.unit])}case`duration`:{let t=e.type;return new zv(Fg[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase(),a=r.toUpperCase()+i.join(``);return new Hv(Mg[a],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new Uv(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new Wv(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new Gv((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var yC=qg,bC=Kg,xC=class e{static fromJSON(t,n){let r=new e(0,jg.V5,n);return r._createHeader=EC(t,n),r}static decode(t){t=new bC(hg(t));let n=iC.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=DC(n,a),o}static encode(e){let t=new yC,n=-1;return e.isSchema()?n=Qx.encode(t,e.header()):e.isRecordBatch()?n=SC.encode(t,e.header()):e.isDictionaryBatch()&&(n=CC.encode(t,e.header())),iC.startMessage(t),iC.addVersion(t,jg.V5),iC.addHeader(t,n),iC.addHeaderType(t,e.headerType),iC.addBodyLength(t,BigInt(e.bodyLength)),iC.finishMessageBuffer(t,iC.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof Qx)return new e(0,jg.V5,O_.Schema,t);if(t instanceof SC)return new e(n,jg.V5,O_.RecordBatch,t);if(t instanceof CC)return new e(n,jg.V5,O_.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===O_.Schema}isRecordBatch(){return this.headerType===O_.RecordBatch}isDictionaryBatch(){return this.headerType===O_.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=M_(e)}},SC=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=M_(e)}},CC=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=M_(t)}},wC=class{constructor(e,t){this.offset=M_(e),this.length=M_(t)}},TC=class{constructor(e,t){this.length=M_(e),this.nullCount=M_(t)}};function EC(e,t){return()=>{switch(t){case O_.Schema:return Qx.fromJSON(e);case O_.RecordBatch:return SC.fromJSON(e);case O_.DictionaryBatch:return CC.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${O_[t]}, type: ${t} }`)}}function DC(e,t){return()=>{switch(t){case O_.Schema:return Qx.decode(e.header(new D_),new Map,e.version());case O_.RecordBatch:return SC.decode(e.header(new $g),e.version());case O_.DictionaryBatch:return CC.decode(e.header(new e_),e.version())}throw Error(`Unrecognized Message type: { name: ${O_[t]}, type: ${t} }`)}}$x.encode=HC,$x.decode=LC,$x.fromJSON=hC,Qx.encode=VC,Qx.decode=OC,Qx.fromJSON=sC,SC.encode=UC,SC.decode=kC,SC.fromJSON=cC,CC.encode=WC,CC.decode=AC,CC.fromJSON=lC,TC.encode=GC,TC.decode=MC,wC.encode=KC,wC.decode=jC;function OC(e,t=new Map,n=jg.V5){let r=FC(e,t);return new Qx(r,RC(e),t,n)}function kC(e,t=jg.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new SC(e.length(),NC(e),PC(e,t))}function AC(e,t=jg.V5){return new CC(SC.decode(e.data(),t),e.id(),e.isDelta())}function jC(e){return new wC(e.offset(),e.length())}function MC(e){return new TC(e.length(),e.nullCount())}function NC(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++r$x.encode(e,t));D_.startFieldsVector(e,n.length);let r=D_.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?D_.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return a_.startKeyValue(e),a_.addKey(e,r),a_.addValue(e,i),a_.endKeyValue(e)})):-1;return D_.startSchema(e),D_.addFields(e,r),D_.addEndianness(e,qC?t_.Little:t_.Big),i!==-1&&D_.addCustomMetadata(e,i),D_.endSchema(e)}function HC(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;mv.isDictionary(a)?(o=a.dictionary.typeId,i=oC.visit(a,e),r=oC.visit(a.dictionary,e)):r=oC.visit(a,e);let s=(a.children||[]).map(t=>$x.encode(e,t)),c=E_.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?E_.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return a_.startKeyValue(e),a_.addKey(e,r),a_.addValue(e,i),a_.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),E_.startField(e),E_.addType(e,r),E_.addTypeType(e,o),E_.addChildren(e,c),E_.addNullable(e,!!t.nullable),n!==-1&&E_.addName(e,n),i!==-1&&E_.addDictionary(e,i),l!==-1&&E_.addCustomMetadata(e,l),E_.endField(e)}function UC(e,t){let n=t.nodes||[],r=t.buffers||[];$g.startNodesVector(e,n.length);for(let t of n.slice().reverse())TC.encode(e,t);let i=e.endVector();$g.startBuffersVector(e,r.length);for(let t of r.slice().reverse())wC.encode(e,t);let a=e.endVector();return $g.startRecordBatch(e),$g.addLength(e,BigInt(t.length)),$g.addNodes(e,i),$g.addBuffers(e,a),$g.endRecordBatch(e)}function WC(e,t){let n=SC.encode(e,t.data);return e_.startDictionaryBatch(e),e_.addId(e,BigInt(t.id)),e_.addIsDelta(e,t.isDelta),e_.addData(e,n),e_.endDictionaryBatch(e)}function GC(e,t){return Qg.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function KC(e,t){return Zg.createBuffer(e,BigInt(t.offset),BigInt(t.length))}const qC=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),JC=e=>`Expected ${O_[e]} Message in stream, but was null or length 0.`,YC=e=>`Header pointer of flatbuffer-encoded ${O_[e]} Message is null or length 0.`,XC=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,ZC=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;var QC=class{constructor(e){this.source=e instanceof fS?e:new fS(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?sS: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(JC(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=hg(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(JC(e));return t.value}readSchema(){let e=O_.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(YC(e));return n}};const tw=4,nw=`ARROW1`,rw=new Uint8Array(6);for(let e=0;e<6;e+=1)rw[e]=nw.codePointAt(e);function iw(e,t=0){for(let n=-1,r=rw.length;++nthis):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 Cg.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Cg.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:Qh(t)?Sw(t):eg(t)?Tw(t):Yh(t)?(()=>Fh(this,void 0,void 0,function*(){return yield e.from(yield t)}))():tg(t)||ig(t)||og(t)||Zh(t)?ww(new pS(t)):Cw(new fS(t))}static readAll(t){return t instanceof e?t.isSync()?bw(t):xw(t):Qh(t)||ArrayBuffer.isView(t)||Xh(t)||$h(t)?bw(t):xw(t)}},lw=class extends cw{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Rh(this,arguments,function*(){yield Lh(yield*zh(Bh(this[Symbol.iterator]())))})}},uw=class extends cw{constructor(e){super(e),this._impl=e}readAll(){return Fh(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=Bh(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]()}},dw=class extends lw{constructor(e){super(e),this._impl=e}},fw=class extends uw{constructor(e){super(e),this._impl=e}},pw=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=wx({type:new Vv(this.schema.fields),length:e.length,children:n});return new eC(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 Jx(c)):new Jx(c)).memoize()}_loadVectors(e,t,n){return new ES(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},mw=class extends pw{constructor(e,t){super(t),this._reader=Qh(e)?new ew(this._handle=e):new QC(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=yw(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):sS}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):sS}next(){if(this.closed)return sS;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 rC(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},hw=class extends pw{constructor(e,t){super(t),this._reader=new $C(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Fh(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 Fh(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=yw(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Fh(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):sS})}return(e){return Fh(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):sS})}next(){return Fh(this,void 0,void 0,function*(){if(this.closed)return sS;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 rC(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Fh(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},gw=class extends mw{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 gS?e:new gS(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(O_.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(O_.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-ow,n=e.readInt32(t),r=e.readAt(t-n,n);return iS.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Fh(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 Fh(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(O_.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 Fh(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(O_.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 Fh(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-ow,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return iS.decode(r)})}_readNextMessageAndValidate(e){return Fh(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?iw(t)?new dw(new gw(e.read())):new lw(new mw(e)):new lw(new mw(function*(){}()))}function ww(e){return Fh(this,void 0,void 0,function*(){let t=yield e.peek(aw+7&-8);return t&&t.byteLength>=4?iw(t)?new dw(new gw(yield e.read())):new uw(new hw(e)):new uw(new hw(function(){return Rh(this,arguments,function*(){})}()))})}function Tw(e){return Fh(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new _S(e,t);return t>=sw&&iw(yield n.readAt(0,aw+7&-8))?new fw(new _w(n)):new uw(new hw(n))})}var Ew=class e extends Yv{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof eC?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 Jx)return this.visitMany(e.data),this;let{type:t}=e;if(!mv.isDictionary(t)){let{length:n}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);if(mv.isUnion(t))this.nodes.push(new TC(n,0));else{let{nullCount:r}=e;mv.isNull(t)||Dw.call(this,r<=0?new Uint8Array:mx(e.offset,n,e.nullBitmap)),this.nodes.push(new TC(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 Dw(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new wC(this._byteLength,t)),this._byteLength+=t,this}function Ow(e){var t;let{type:n,length:r,typeIds:i,valueOffsets:a}=e;if(Dw.call(this,i),n.mode===Mg.Sparse)return Nw.call(this,e);if(n.mode===Mg.Dense){if(e.offset<=0)return Dw.call(this,a),Nw.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 kw(e){let t;return e.nullCount>=e.length?Dw.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?Dw.call(this,mx(e.offset,e.length,t)):Dw.call(this,hx(e.values))}function Aw(e){return Dw.call(this,e.values.subarray(0,e.length*e.stride))}function jw(e){let{length:t,values:n,valueOffsets:r}=e,i=M_(r[0]),a=M_(r[t]),o=Math.min(a-i,n.byteLength-i);return Dw.call(this,xg(-i,t+1,r)),Dw.call(this,n.subarray(i,i+o)),this}function Mw(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return Dw.call(this,xg(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function Nw(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}Ew.prototype.visitBool=kw,Ew.prototype.visitInt=Aw,Ew.prototype.visitFloat=Aw,Ew.prototype.visitUtf8=jw,Ew.prototype.visitLargeUtf8=jw,Ew.prototype.visitBinary=jw,Ew.prototype.visitLargeBinary=jw,Ew.prototype.visitFixedSizeBinary=Aw,Ew.prototype.visitDate=Aw,Ew.prototype.visitTimestamp=Aw,Ew.prototype.visitTime=Aw,Ew.prototype.visitDecimal=Aw,Ew.prototype.visitList=Mw,Ew.prototype.visitStruct=Nw,Ew.prototype.visitUnion=Ow,Ew.prototype.visitInterval=Aw,Ew.prototype.visitDuration=Aw,Ew.prototype.visitFixedSizeList=Mw,Ew.prototype.visitMap=Mw;var Pw=class extends lS{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 dS,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Jh(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 Yh(e)?e.then(e=>this.writeAll(e)):Zh(e)?Rw(this,e):Lw(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 dS?this._sink=e:(this._sink=new dS,e&&rg(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&ag(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||!qS(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 QS&&!(t=e.schema)||e instanceof eC&&!(t=e.schema))return this.finish()&&void 0}else throw Error(`RecordBatchWriter is closed`);if(t&&!qS(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof eC?e instanceof rC||this._writeRecordBatch(e):e instanceof QS?this.writeAll(e.batches):Xh(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=xC.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===O_.RecordBatch?this._recordBatchBlocks.push(new oS(o,e.bodyLength,this._position)):e.headerType===O_.DictionaryBatch&&this._dictionaryBlocks.push(new oS(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=hg(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(xC.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(rw)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=Ew.assemble(e),a=new SC(e.numRows,n,r),o=xC.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}=Ew.assemble(new Jx([e])),s=new SC(e.length,i,a),c=new CC(s,t,n),l=xC.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)):Zh(t)?Rw(r,t):Lw(r,t)}},Iw=class e extends Pw{static writeAll(t){let n=new e;return Yh(t)?t.then(e=>n.writeAll(e)):Zh(t)?Rw(n,t):Lw(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=iS.encode(new iS(e,jg.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function Lw(e,t){let n=t;t instanceof QS&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function Rw(e,t){return Fh(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=Bh(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 zw(e,t=`stream`){return(t===`stream`?Fw:Iw).writeAll(e).toUint8Array(!0)}var Bw=Object.create,Vw=Object.defineProperty,Hw=Object.getOwnPropertyDescriptor,Uw=Object.getOwnPropertyNames,Ww=Object.getPrototypeOf,Gw=Object.prototype.hasOwnProperty,Kw=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qw=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Uw(t))!Gw.call(e,i)&&i!==n&&Vw(e,i,{get:()=>t[i],enumerable:!(r=Hw(t,i))||r.enumerable});return e},Jw=(e,t,n)=>(n=e==null?{}:Bw(Ww(e)),qw(t||!e||!e.__esModule?Vw(n,`default`,{value:e,enumerable:!0}):n,e)),Yw=Kw((e,t)=>{t.exports=Worker}),Xw=(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))(Xw||{}),Zw=(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))(Zw||{}),Qw=(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))(Qw||{}),$w=(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))($w||{}),eT=(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))(eT||{}),tT=(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))(tT||{}),nT=class{log(e){}},rT=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},iT=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e))(iT||{}),aT=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=cw.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new QS(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 oT(this._bindings,this._conn,n),i=await cw.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 sT(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=zw(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)}},oT=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}},sT=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=cw.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new QS(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new oT(this.bindings,this.connectionId,t),r=await cw.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},cT=(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))(cT||{}),lT=(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))(lT||{}),uT=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 dT(e){switch(e.typeId){case q.Binary:return{sqlType:`binary`};case q.Bool:return{sqlType:`bool`};case q.Date:return{sqlType:`date`};case q.DateDay:return{sqlType:`date32[d]`};case q.DateMillisecond:return{sqlType:`date64[ms]`};case q.Decimal:{let t=e;return{sqlType:`decimal`,precision:t.precision,scale:t.scale}}case q.Float:return{sqlType:`float`};case q.Float16:return{sqlType:`float16`};case q.Float32:return{sqlType:`float32`};case q.Float64:return{sqlType:`float64`};case q.Int:return{sqlType:`int32`};case q.Int16:return{sqlType:`int16`};case q.Int32:return{sqlType:`int32`};case q.Int64:return{sqlType:`int64`};case q.Uint16:return{sqlType:`uint16`};case q.Uint32:return{sqlType:`uint32`};case q.Uint64:return{sqlType:`uint64`};case q.Uint8:return{sqlType:`uint8`};case q.IntervalDayTime:return{sqlType:`interval[dt]`};case q.IntervalYearMonth:return{sqlType:`interval[m]`};case q.List:return{sqlType:`list`,valueType:dT(e.valueType)};case q.FixedSizeBinary:return{sqlType:`fixedsizebinary`,byteWidth:e.byteWidth};case q.Null:return{sqlType:`null`};case q.Utf8:return{sqlType:`utf8`};case q.Struct:return{sqlType:`struct`,fields:e.children.map(e=>fT(e.name,e.type))};case q.Map:{let t=e;return{sqlType:`map`,keyType:dT(t.keyType),valueType:dT(t.valueType)}}case q.Time:return{sqlType:`time[s]`};case q.TimeMicrosecond:return{sqlType:`time[us]`};case q.TimeMillisecond:return{sqlType:`time[ms]`};case q.TimeNanosecond:return{sqlType:`time[ns]`};case q.TimeSecond:return{sqlType:`time[s]`};case q.Timestamp:return{sqlType:`timestamp`,timezone:e.timezone||void 0};case q.TimestampSecond:return{sqlType:`timestamp[s]`,timezone:e.timezone||void 0};case q.TimestampMicrosecond:return{sqlType:`timestamp[us]`,timezone:e.timezone||void 0};case q.TimestampNanosecond:return{sqlType:`timestamp[ns]`,timezone:e.timezone||void 0};case q.TimestampMillisecond:return{sqlType:`timestamp[ms]`,timezone:e.timezone||void 0}}throw Error(`unsupported arrow type: ${e.toString()}`)}function fT(e,t){let n=dT(t);return n.name=e,n}var pT=new TextEncoder,mT=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 uT(`RESET`,null);return await this.postTask(e)}async ping(){let e=new uT(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new uT(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new uT(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new uT(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new uT(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new uT(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new uT(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new uT(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new uT(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new uT(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new aT(this,e)}async disconnect(e){let t=new uT(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new uT(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new uT(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new uT(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new uT(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new uT(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new uT(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new uT(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new uT(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new uT(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new uT(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new uT(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=pT.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new uT(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new uT(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new uT(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new uT(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new uT(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new uT(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new uT(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new uT(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new uT(`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(fT(t,r))}n.columnsFlat=e,delete n.columns}let r=new uT(`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(fT(t,r))}n.columnsFlat=e,delete n.columns}let r=new uT(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function hT(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}var gT=hT(),_T=(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))(_T||{}),vT=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])),yT=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])),bT=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])),xT=()=>(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])),ST={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`}}},CT=ST.name,wT=ST.version,TT=ST.version.split(`.`),ET=TT[0],DT=TT[1],OT=TT[2],kT=()=>typeof navigator>`u`,AT=()=>kT()?`node`:navigator.userAgent,jT=()=>AT().includes(`Firefox`),MT=()=>/^((?!chrome|android).)*safari/i.test(AT()),NT=null,PT=null,FT=null,IT=null,LT=null;async function RT(){return NT??=typeof BigInt64Array<`u`,PT??=await yT(),FT??=await xT(),IT??=await bT(),LT??=await vT(),{bigInt64Array:NT,crossOriginIsolated:kT()||globalThis.crossOriginIsolated||!1,wasmExceptions:PT,wasmSIMD:IT,wasmThreads:FT,wasmBulkMemory:LT}}async function zT(e){let t=await RT();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 BT=Jw(Yw());const VT=Symbol.for(`constructDateFrom`),HT={},UT={};function WT(e,t){try{let n=HT[e]||=new Intl.DateTimeFormat(`en-GB`,{timeZone:e,hour:`numeric`,timeZoneName:`longOffset`}).format,r=n(t).split(`GMT`)[1]||``;return r in UT?UT[r]:KT(r,r.split(`:`))}catch{if(e in UT)return UT[e];let t=e?.match(GT);return t?KT(e,t.slice(1)):NaN}}const GT=/([+-]\d\d):?(\d\d)?/;function KT(e,t){let n=+t[0],r=+(t[1]||0);return UT[e]=n>0?n*60+r:n*60-r}var qT=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(WT(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)),ZT(this,NaN),YT(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-WT(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),YT(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};const JT=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!JT.test(e))return;let t=e.replace(JT,`$1UTC`);qT.prototype[t]&&(e.startsWith(`get`)?qT.prototype[e]=function(){return this.internal[t]()}:(qT.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),XT(this),+this},qT.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),YT(this),+this}))});function YT(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function XT(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()),ZT(e)}function ZT(e){let t=WT(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=WT(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=WT(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 QT=class e extends qT{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} (${$T(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 $T(e,t){return new Intl.DateTimeFormat(`en-GB`,{timeZone:e,timeZoneName:`long`}).format(t).slice(12)}const eE=new TextDecoder(`utf-8`),tE=e=>eE.decode(e),nE=new TextEncoder,rE=e=>nE.encode(e),iE=e=>typeof e==`function`,aE=e=>e!=null&&Object(e)===e,oE=e=>aE(e)&&iE(e.then),sE=e=>aE(e)&&iE(e[Symbol.iterator]),cE=e=>aE(e)&&iE(e[Symbol.asyncIterator]),lE=e=>aE(e)&&`done`in e&&`value`in e,uE=e=>aE(e)&&iE(e.clear)&&iE(e.bytes)&&iE(e.position)&&iE(e.setPosition)&&iE(e.capacity)&&iE(e.getBufferIdentifier)&&iE(e.createLong);var dE={};bn(dE,{compareArrayLike:()=>XE,joinUint8Arrays:()=>hE,memcpy:()=>mE,rebaseValueOffsets:()=>YE,toArrayBufferView:()=>gE,toArrayBufferViewAsyncIterator:()=>zE,toArrayBufferViewIterator:()=>kE,toBigInt64Array:()=>bE,toBigUint64Array:()=>wE,toFloat32Array:()=>TE,toFloat32ArrayAsyncIterator:()=>KE,toFloat32ArrayIterator:()=>IE,toFloat64Array:()=>EE,toFloat64ArrayAsyncIterator:()=>qE,toFloat64ArrayIterator:()=>LE,toInt16Array:()=>vE,toInt16ArrayAsyncIterator:()=>VE,toInt16ArrayIterator:()=>jE,toInt32Array:()=>yE,toInt32ArrayAsyncIterator:()=>HE,toInt32ArrayIterator:()=>ME,toInt8Array:()=>_E,toInt8ArrayAsyncIterator:()=>BE,toInt8ArrayIterator:()=>AE,toUint16Array:()=>SE,toUint16ArrayAsyncIterator:()=>WE,toUint16ArrayIterator:()=>PE,toUint32Array:()=>CE,toUint32ArrayAsyncIterator:()=>GE,toUint32ArrayIterator:()=>FE,toUint8Array:()=>xE,toUint8ArrayAsyncIterator:()=>UE,toUint8ArrayIterator:()=>NE,toUint8ClampedArray:()=>DE,toUint8ClampedArrayAsyncIterator:()=>JE,toUint8ClampedArrayIterator:()=>RE});const fE=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function pE(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;++cgE(Int8Array,e),vE=e=>gE(Int16Array,e),yE=e=>gE(Int32Array,e),bE=e=>gE(BigInt64Array,e),xE=e=>gE(Uint8Array,e),SE=e=>gE(Uint16Array,e),CE=e=>gE(Uint32Array,e),wE=e=>gE(BigUint64Array,e),TE=e=>gE(Float32Array,e),EE=e=>gE(Float64Array,e),DE=e=>gE(Uint8ClampedArray,e),OE=e=>(e.next(),e);function*kE(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof fE?n(t):sE(t)?t:n(t);return yield*OE(function*(t){let n=null;do n=t.next(yield gE(e,n));while(!n.done)}(r[Symbol.iterator]())),new e}const AE=e=>kE(Int8Array,e),jE=e=>kE(Int16Array,e),ME=e=>kE(Int32Array,e),NE=e=>kE(Uint8Array,e),PE=e=>kE(Uint16Array,e),FE=e=>kE(Uint32Array,e),IE=e=>kE(Float32Array,e),LE=e=>kE(Float64Array,e),RE=e=>kE(Uint8ClampedArray,e);function zE(e,t){return Rh(this,arguments,function*(){if(oE(t))return yield Lh(yield Lh(yield*zh(Bh(zE(e,yield Lh(t))))));let n=function(e){return Rh(this,arguments,function*(){yield yield Lh(yield Lh(e))})},r=function(e){return Rh(this,arguments,function*(){yield Lh(yield*zh(Bh(OE(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 fE?n(t):sE(t)?r(t):cE(t)?t:n(t);return yield Lh(yield*zh(Bh(OE(function(t){return Rh(this,arguments,function*(){let n=null;do n=yield Lh(t.next(yield yield Lh(gE(e,n))));while(!n.done)})}(i[Symbol.asyncIterator]()))))),yield Lh(new e)})}const BE=e=>zE(Int8Array,e),VE=e=>zE(Int16Array,e),HE=e=>zE(Int32Array,e),UE=e=>zE(Uint8Array,e),WE=e=>zE(Uint16Array,e),GE=e=>zE(Uint32Array,e),KE=e=>zE(Float32Array,e),qE=e=>zE(Float64Array,e),JE=e=>zE(Uint8ClampedArray,e);function YE(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(++naD});const iD=void 0;function aD(e){if(e===null)return`null`;if(e===iD)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=>aD(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function oD(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 sD(e,t){return oD(e/t)+oD(e%t)/oD(t)}var cD={};bn(cD,{BN:()=>bD,bigNumToBigInt:()=>vD,bigNumToNumber:()=>gD,bigNumToString:()=>_D,isArrowBigNumSymbol:()=>lD});const lD=Symbol.for(`isArrowBigNum`);function uD(e,...t){return t.length===0?Object.setPrototypeOf(gE(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}uD.prototype[lD]=!0,uD.prototype.toJSON=function(){return`"${_D(this)}"`},uD.prototype.valueOf=function(e){return gD(this,e)},uD.prototype.toString=function(){return _D(this)},uD.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return gD(this);case`string`:return _D(this);case`default`:return vD(this)}return _D(this)};function dD(...e){return uD.apply(this,e)}function fD(...e){return uD.apply(this,e)}function pD(...e){return uD.apply(this,e)}Object.setPrototypeOf(dD.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(fD.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(pD.prototype,Object.create(Uint32Array.prototype)),Object.assign(dD.prototype,uD.prototype,{constructor:dD,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(fD.prototype,uD.prototype,{constructor:fD,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(pD.prototype,uD.prototype,{constructor:pD,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const mD=BigInt(4294967296)*BigInt(4294967296),hD=mD-BigInt(1);function gD(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=oD(n),a=`${r}`.padStart(t,`0`),o=s&&i===0?`-`:``;return+`${o}${i}.${a}`}return oD(c)}function _D(e){if(e.byteLength===8){let t=new e.BigIntArray(e.buffer,e.byteOffset,1);return`${t[0]}`}if(!e.signed)return yD(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=new Int16Array([t.at(-1)])[0];if(n>=0)return yD(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`))(UD.prototype);var WD=class extends UD{constructor(){super(J.Null)}toString(){return`Null`}};SD=Symbol.toStringTag,WD[SD]=(e=>e[Symbol.toStringTag]=`Null`)(WD.prototype);var GD=class extends UD{constructor(e,t){super(J.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}`}};CD=Symbol.toStringTag,GD[CD]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(GD.prototype);var KD=class extends GD{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},qD=class extends GD{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},JD=class extends GD{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},YD=class extends GD{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},XD=class extends GD{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},ZD=class extends GD{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},QD=class extends GD{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},$D=class extends GD{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(KD.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(qD.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(JD.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(YD.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(XD.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(ZD.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(QD.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty($D.prototype,`ArrayType`,{value:BigUint64Array});var eO=class extends UD{constructor(e){super(J.Float),this.precision=e}get ArrayType(){switch(this.precision){case QE.HALF:return Uint16Array;case QE.SINGLE:return Float32Array;case QE.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};wD=Symbol.toStringTag,eO[wD]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(eO.prototype);var tO=class extends eO{constructor(){super(QE.HALF)}},nO=class extends eO{constructor(){super(QE.SINGLE)}},rO=class extends eO{constructor(){super(QE.DOUBLE)}};Object.defineProperty(tO.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(nO.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(rO.prototype,`ArrayType`,{value:Float64Array});var iO=class extends UD{constructor(){super(J.Binary)}toString(){return`Binary`}};TD=Symbol.toStringTag,iO[TD]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(iO.prototype);var aO=class extends UD{constructor(){super(J.LargeBinary)}toString(){return`LargeBinary`}};ED=Symbol.toStringTag,aO[ED]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(aO.prototype);var oO=class extends UD{constructor(){super(J.Utf8)}toString(){return`Utf8`}};DD=Symbol.toStringTag,oO[DD]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(oO.prototype);var sO=class extends UD{constructor(){super(J.LargeUtf8)}toString(){return`LargeUtf8`}};OD=Symbol.toStringTag,sO[OD]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(sO.prototype);var cO=class extends UD{constructor(){super(J.Bool)}toString(){return`Bool`}};kD=Symbol.toStringTag,cO[kD]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(cO.prototype);var lO=class extends UD{constructor(e,t,n=128){super(J.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};AD=Symbol.toStringTag,lO[AD]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(lO.prototype);var uO=class extends UD{constructor(e){super(J.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${$E[this.unit]}>`}get ArrayType(){return this.unit===$E.DAY?Int32Array:BigInt64Array}};jD=Symbol.toStringTag,uO[jD]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(uO.prototype);var dO=class extends UD{constructor(e,t){super(J.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${eD[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};MD=Symbol.toStringTag,dO[MD]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(dO.prototype);var fO=class extends UD{constructor(e,t){super(J.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${eD[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};ND=Symbol.toStringTag,fO[ND]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(fO.prototype);var pO=class extends UD{constructor(e){super(J.Interval),this.unit=e}toString(){return`Interval<${tD[this.unit]}>`}};PD=Symbol.toStringTag,pO[PD]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(pO.prototype);var mO=class extends UD{constructor(e){super(J.Duration),this.unit=e}toString(){return`Duration<${eD[this.unit]}>`}};FD=Symbol.toStringTag,mO[FD]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(mO.prototype);var hO=class extends UD{constructor(e){super(J.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}};ID=Symbol.toStringTag,hO[ID]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(hO.prototype);var gO=class extends UD{constructor(e){super(J.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};LD=Symbol.toStringTag,gO[LD]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(gO.prototype);var _O=class extends UD{constructor(e,t,n){super(J.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(` | `)}>`}};RD=Symbol.toStringTag,_O[RD]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(_O.prototype);var vO=class extends UD{constructor(e){super(J.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};zD=Symbol.toStringTag,vO[zD]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(vO.prototype);var yO=class extends UD{constructor(e,t){super(J.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}>`}};BD=Symbol.toStringTag,yO[BD]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(yO.prototype);var bO=class extends UD{constructor(e,t=!1){var n,r,i;if(super(J.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(`, `)}}>`}};VD=Symbol.toStringTag,bO[VD]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(bO.prototype);const xO=(e=>()=>++e)(-1);var SO=class extends UD{constructor(e,t,n,r){super(J.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?xO():oD(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}>`}};HD=Symbol.toStringTag,SO[HD]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(SO.prototype);function CO(e){let t=e;switch(e.typeId){case J.Decimal:return e.bitWidth/32;case J.Interval:return t.unit===tD.MONTH_DAY_NANO?4:1+t.unit;case J.FixedSizeList:return t.listSize;case J.FixedSizeBinary:return t.byteWidth;default:return 1}}var wO=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 TO(this,e,t)}getVisitFnByTypeId(e,t=!0){return EO(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 TO(e,t,n=!0){return typeof t==`number`?EO(e,t,n):typeof t==`string`&&t in J?EO(e,J[t],n):t&&t instanceof UD?EO(e,DO(t),n):t?.type&&t.type instanceof UD?EO(e,DO(t.type),n):EO(e,J.NONE,n)}function EO(e,t,n=!0){let r=null;switch(t){case J.Null:r=e.visitNull;break;case J.Bool:r=e.visitBool;break;case J.Int:r=e.visitInt;break;case J.Int8:r=e.visitInt8||e.visitInt;break;case J.Int16:r=e.visitInt16||e.visitInt;break;case J.Int32:r=e.visitInt32||e.visitInt;break;case J.Int64:r=e.visitInt64||e.visitInt;break;case J.Uint8:r=e.visitUint8||e.visitInt;break;case J.Uint16:r=e.visitUint16||e.visitInt;break;case J.Uint32:r=e.visitUint32||e.visitInt;break;case J.Uint64:r=e.visitUint64||e.visitInt;break;case J.Float:r=e.visitFloat;break;case J.Float16:r=e.visitFloat16||e.visitFloat;break;case J.Float32:r=e.visitFloat32||e.visitFloat;break;case J.Float64:r=e.visitFloat64||e.visitFloat;break;case J.Utf8:r=e.visitUtf8;break;case J.LargeUtf8:r=e.visitLargeUtf8;break;case J.Binary:r=e.visitBinary;break;case J.LargeBinary:r=e.visitLargeBinary;break;case J.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case J.Date:r=e.visitDate;break;case J.DateDay:r=e.visitDateDay||e.visitDate;break;case J.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case J.Timestamp:r=e.visitTimestamp;break;case J.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case J.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case J.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case J.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case J.Time:r=e.visitTime;break;case J.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case J.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case J.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case J.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case J.Decimal:r=e.visitDecimal;break;case J.List:r=e.visitList;break;case J.Struct:r=e.visitStruct;break;case J.Union:r=e.visitUnion;break;case J.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case J.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case J.Dictionary:r=e.visitDictionary;break;case J.Interval:r=e.visitInterval;break;case J.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case J.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case J.IntervalMonthDayNano:r=e.visitIntervalMonthDayNano||e.visitInterval;break;case J.Duration:r=e.visitDuration;break;case J.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case J.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case J.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case J.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case J.FixedSizeList:r=e.visitFixedSizeList;break;case J.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${J[t]}'`)}function DO(e){switch(e.typeId){case J.Null:return J.Null;case J.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?J.Int8:J.Uint8;case 16:return n?J.Int16:J.Uint16;case 32:return n?J.Int32:J.Uint32;case 64:return n?J.Int64:J.Uint64}return J.Int}case J.Float:switch(e.precision){case QE.HALF:return J.Float16;case QE.SINGLE:return J.Float32;case QE.DOUBLE:return J.Float64}return J.Float;case J.Binary:return J.Binary;case J.LargeBinary:return J.LargeBinary;case J.Utf8:return J.Utf8;case J.LargeUtf8:return J.LargeUtf8;case J.Bool:return J.Bool;case J.Decimal:return J.Decimal;case J.Time:switch(e.unit){case eD.SECOND:return J.TimeSecond;case eD.MILLISECOND:return J.TimeMillisecond;case eD.MICROSECOND:return J.TimeMicrosecond;case eD.NANOSECOND:return J.TimeNanosecond}return J.Time;case J.Timestamp:switch(e.unit){case eD.SECOND:return J.TimestampSecond;case eD.MILLISECOND:return J.TimestampMillisecond;case eD.MICROSECOND:return J.TimestampMicrosecond;case eD.NANOSECOND:return J.TimestampNanosecond}return J.Timestamp;case J.Date:switch(e.unit){case $E.DAY:return J.DateDay;case $E.MILLISECOND:return J.DateMillisecond}return J.Date;case J.Interval:switch(e.unit){case tD.DAY_TIME:return J.IntervalDayTime;case tD.YEAR_MONTH:return J.IntervalYearMonth;case tD.MONTH_DAY_NANO:return J.IntervalMonthDayNano}return J.Interval;case J.Duration:switch(e.unit){case eD.SECOND:return J.DurationSecond;case eD.MILLISECOND:return J.DurationMillisecond;case eD.MICROSECOND:return J.DurationMicrosecond;case eD.NANOSECOND:return J.DurationNanosecond}return J.Duration;case J.Map:return J.Map;case J.List:return J.List;case J.Struct:return J.Struct;case J.Union:switch(e.mode){case ZE.Dense:return J.DenseUnion;case ZE.Sparse:return J.SparseUnion}return J.Union;case J.FixedSizeBinary:return J.FixedSizeBinary;case J.FixedSizeList:return J.FixedSizeList;case J.Dictionary:return J.Dictionary}throw Error(`Unrecognized type '${J[e.typeId]}'`)}wO.prototype.visitInt8=null,wO.prototype.visitInt16=null,wO.prototype.visitInt32=null,wO.prototype.visitInt64=null,wO.prototype.visitUint8=null,wO.prototype.visitUint16=null,wO.prototype.visitUint32=null,wO.prototype.visitUint64=null,wO.prototype.visitFloat16=null,wO.prototype.visitFloat32=null,wO.prototype.visitFloat64=null,wO.prototype.visitDateDay=null,wO.prototype.visitDateMillisecond=null,wO.prototype.visitTimestampSecond=null,wO.prototype.visitTimestampMillisecond=null,wO.prototype.visitTimestampMicrosecond=null,wO.prototype.visitTimestampNanosecond=null,wO.prototype.visitTimeSecond=null,wO.prototype.visitTimeMillisecond=null,wO.prototype.visitTimeMicrosecond=null,wO.prototype.visitTimeNanosecond=null,wO.prototype.visitDenseUnion=null,wO.prototype.visitSparseUnion=null,wO.prototype.visitIntervalDayTime=null,wO.prototype.visitIntervalYearMonth=null,wO.prototype.visitIntervalMonthDayNano=null,wO.prototype.visitDuration=null,wO.prototype.visitDurationSecond=null,wO.prototype.visitDurationMillisecond=null,wO.prototype.visitDurationMicrosecond=null,wO.prototype.visitDurationNanosecond=null;var OO={};bn(OO,{float64ToUint16:()=>MO,uint16ToFloat64:()=>jO});const kO=new Float64Array(1),AO=new Uint32Array(kO.buffer);function jO(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 MO(e){if(e!==e)return 32256;kO[0]=e;let t=(AO[1]&2147483648)>>16&65535,n=AO[1]&2146435072,r=0;return n>=1089470464?AO[0]>0?n=31744:(n=(n&2080374784)>>16,r=(AO[1]&1048575)>>10):n<=1056964608?(r=1048576+(AO[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(AO[1]&1048575)+512>>10),t|n|r&65535}var NO=class extends wO{};function PO(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const FO=(e,t,n)=>{e[t]=Math.floor(n/864e5)},IO=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},zO=({values:e},t,n)=>{e[t]=n},BO=({values:e},t,n)=>{e[t]=MO(n)},VO=(e,t,n)=>{switch(e.type.precision){case QE.HALF:return BO(e,t,n);case QE.SINGLE:case QE.DOUBLE:return zO(e,t,n)}},HO=({values:e},t,n)=>{FO(e,t,n.valueOf())},UO=({values:e},t,n)=>{e[t]=BigInt(n)},WO=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},GO=({values:e,valueOffsets:t},n,r)=>IO(e,t,n,r),KO=({values:e,valueOffsets:t},n,r)=>IO(e,t,n,rE(r)),qO=(e,t,n)=>{e.type.unit===$E.DAY?HO(e,t,n):UO(e,t,n)},JO=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},YO=({values:e},t,n)=>{e[t]=BigInt(n)},XO=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},ZO=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},QO=(e,t,n)=>{switch(e.type.unit){case eD.SECOND:return JO(e,t,n);case eD.MILLISECOND:return YO(e,t,n);case eD.MICROSECOND:return XO(e,t,n);case eD.NANOSECOND:return ZO(e,t,n)}},$O=({values:e},t,n)=>{e[t]=n},ek=({values:e},t,n)=>{e[t]=n},tk=({values:e},t,n)=>{e[t]=n},nk=({values:e},t,n)=>{e[t]=n},rk=(e,t,n)=>{switch(e.type.unit){case eD.SECOND:return $O(e,t,n);case eD.MILLISECOND:return ek(e,t,n);case eD.MICROSECOND:return tk(e,t,n);case eD.NANOSECOND:return nk(e,t,n)}},ik=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},ak=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=Ek.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=Ek.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},sk=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),ck=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),lk=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),uk=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),dk=(e,t,n)=>{let r=e.type.children.map(e=>Ek.getVisitFn(e.type)),i=n instanceof Map?lk(t,n):n instanceof kj?ck(t,n):Array.isArray(n)?sk(t,n):uk(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},fk=(e,t,n)=>{e.type.mode===ZE.Dense?pk(e,t,n):mk(e,t,n)},pk=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Ek.visit(i,e.valueOffsets[t],n)},mk=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Ek.visit(i,t,n)},hk=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},gk=(e,t,n)=>{switch(e.type.unit){case tD.YEAR_MONTH:return vk(e,t,n);case tD.DAY_TIME:return _k(e,t,n);case tD.MONTH_DAY_NANO:return yk(e,t,n)}},_k=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},vk=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},yk=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},bk=({values:e},t,n)=>{e[t]=n},xk=({values:e},t,n)=>{e[t]=n},Sk=({values:e},t,n)=>{e[t]=n},Ck=({values:e},t,n)=>{e[t]=n},wk=(e,t,n)=>{switch(e.type.unit){case eD.SECOND:return bk(e,t,n);case eD.MILLISECOND:return xk(e,t,n);case eD.MICROSECOND:return Sk(e,t,n);case eD.NANOSECOND:return Ck(e,t,n)}},Tk=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=Ek.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${aD(e)}: ${aD(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new Ak(this[Dk],this[Ok])}},Ak=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[Dk].type.children.some(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(e[Dk].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[Dk].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=wA.visit(e[Dk].children[n],e[Ok]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[Dk].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(Ek.visit(e[Dk].children[r],e[Ok],n),Reflect.set(e,t,n))}};const Mk=new jk;var Nk=class extends wO{};function Pk(e){return(t,n)=>t.getValid(n)?e(t,n):null}const Fk=(e,t)=>864e5*e[t],Ik=(e,t)=>null,Lk=(e,t,n)=>{if(n+1>=t.length)return null;let r=oD(t[n]),i=oD(t[n+1]);return e.subarray(r,i)},Rk=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<Fk(e,t),Bk=({values:e},t)=>oD(e[t]),Vk=({stride:e,values:t},n)=>t[e*n],Hk=({stride:e,values:t},n)=>jO(t[e*n]),Uk=({values:e},t)=>e[t],Wk=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),Gk=({values:e,valueOffsets:t},n)=>Lk(e,t,n),Kk=({values:e,valueOffsets:t},n)=>{let r=Lk(e,t,n);return r===null?null:tE(r)},qk=({values:e},t)=>e[t],Jk=({type:e,values:t},n)=>e.precision===QE.HALF?jO(t[n]):t[n],Yk=(e,t)=>e.type.unit===$E.DAY?zk(e,t):Bk(e,t),Xk=({values:e},t)=>1e3*oD(e[t]),Zk=({values:e},t)=>oD(e[t]),Qk=({values:e},t)=>sD(e[t],BigInt(1e3)),$k=({values:e},t)=>sD(e[t],BigInt(1e6)),eA=(e,t)=>{switch(e.type.unit){case eD.SECOND:return Xk(e,t);case eD.MILLISECOND:return Zk(e,t);case eD.MICROSECOND:return Qk(e,t);case eD.NANOSECOND:return $k(e,t)}},tA=({values:e},t)=>e[t],nA=({values:e},t)=>e[t],rA=({values:e},t)=>e[t],iA=({values:e},t)=>e[t],aA=(e,t)=>{switch(e.type.unit){case eD.SECOND:return tA(e,t);case eD.MILLISECOND:return nA(e,t);case eD.MICROSECOND:return rA(e,t);case eD.NANOSECOND:return iA(e,t)}},oA=({values:e,stride:t},n)=>bD.decimal(e.subarray(t*n,t*(n+1))),sA=(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 kj([c])},cA=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new kA(o.slice(i,a-i))},lA=(e,t)=>new kk(e,t),uA=(e,t)=>e.type.mode===ZE.Dense?dA(e,t):fA(e,t),dA=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return wA.visit(r,e.valueOffsets[t])},fA=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return wA.visit(r,t)},pA=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},mA=(e,t)=>e.type.unit===tD.MONTH_DAY_NANO?_A(e,t):e.type.unit===tD.DAY_TIME?hA(e,t):gA(e,t),hA=({values:e},t)=>e.subarray(2*t,2*(t+1)),gA=({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},_A=({values:e},t)=>e.subarray(4*t,4*(t+1)),vA=({values:e},t)=>e[t],yA=({values:e},t)=>e[t],bA=({values:e},t)=>e[t],xA=({values:e},t)=>e[t],SA=(e,t)=>{switch(e.type.unit){case eD.SECOND:return vA(e,t);case eD.MILLISECOND:return yA(e,t);case eD.MICROSECOND:return bA(e,t);case eD.NANOSECOND:return xA(e,t)}},CA=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new kj([a])};Nk.prototype.visitNull=Pk(Ik),Nk.prototype.visitBool=Pk(Rk),Nk.prototype.visitInt=Pk(qk),Nk.prototype.visitInt8=Pk(Vk),Nk.prototype.visitInt16=Pk(Vk),Nk.prototype.visitInt32=Pk(Vk),Nk.prototype.visitInt64=Pk(Uk),Nk.prototype.visitUint8=Pk(Vk),Nk.prototype.visitUint16=Pk(Vk),Nk.prototype.visitUint32=Pk(Vk),Nk.prototype.visitUint64=Pk(Uk),Nk.prototype.visitFloat=Pk(Jk),Nk.prototype.visitFloat16=Pk(Hk),Nk.prototype.visitFloat32=Pk(Vk),Nk.prototype.visitFloat64=Pk(Vk),Nk.prototype.visitUtf8=Pk(Kk),Nk.prototype.visitLargeUtf8=Pk(Kk),Nk.prototype.visitBinary=Pk(Gk),Nk.prototype.visitLargeBinary=Pk(Gk),Nk.prototype.visitFixedSizeBinary=Pk(Wk),Nk.prototype.visitDate=Pk(Yk),Nk.prototype.visitDateDay=Pk(zk),Nk.prototype.visitDateMillisecond=Pk(Bk),Nk.prototype.visitTimestamp=Pk(eA),Nk.prototype.visitTimestampSecond=Pk(Xk),Nk.prototype.visitTimestampMillisecond=Pk(Zk),Nk.prototype.visitTimestampMicrosecond=Pk(Qk),Nk.prototype.visitTimestampNanosecond=Pk($k),Nk.prototype.visitTime=Pk(aA),Nk.prototype.visitTimeSecond=Pk(tA),Nk.prototype.visitTimeMillisecond=Pk(nA),Nk.prototype.visitTimeMicrosecond=Pk(rA),Nk.prototype.visitTimeNanosecond=Pk(iA),Nk.prototype.visitDecimal=Pk(oA),Nk.prototype.visitList=Pk(sA),Nk.prototype.visitStruct=Pk(lA),Nk.prototype.visitUnion=Pk(uA),Nk.prototype.visitDenseUnion=Pk(dA),Nk.prototype.visitSparseUnion=Pk(fA),Nk.prototype.visitDictionary=Pk(pA),Nk.prototype.visitInterval=Pk(mA),Nk.prototype.visitIntervalDayTime=Pk(hA),Nk.prototype.visitIntervalYearMonth=Pk(gA),Nk.prototype.visitIntervalMonthDayNano=Pk(_A),Nk.prototype.visitDuration=Pk(SA),Nk.prototype.visitDurationSecond=Pk(vA),Nk.prototype.visitDurationMillisecond=Pk(yA),Nk.prototype.visitDurationMicrosecond=Pk(bA),Nk.prototype.visitDurationNanosecond=Pk(xA),Nk.prototype.visitFixedSizeList=Pk(CA),Nk.prototype.visitMap=Pk(cA);const wA=new Nk,TA=Symbol.for(`keys`),EA=Symbol.for(`vals`),DA=Symbol.for(`kKeysAsStrings`),OA=Symbol.for(`_kKeysAsStrings`);var kA=class{constructor(e){return this[TA]=new kj([e.children[0]]).memoize(),this[EA]=e.children[1],new Proxy(this,new jA)}get[DA](){return this[OA]||(this[OA]=Array.from(this[TA].toArray(),String))}[Symbol.iterator](){return new AA(this[TA],this[EA])}get size(){return this[TA].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[TA],t=this[EA],n={};for(let r=-1,i=e.length;++r`${aD(e)}: ${aD(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},AA=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),wA.visit(this.vals,e)]})}},jA=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[DA]}has(e,t){return e[DA].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[DA].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[DA].indexOf(t);if(n!==-1){let r=wA.visit(Reflect.get(e,EA),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[DA].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(Ek.visit(Reflect.get(e,EA),r,n),Reflect.set(e,t,n))}};Object.defineProperties(kA.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[TA]:{writable:!0,enumerable:!1,configurable:!1,value:null},[EA]:{writable:!0,enumerable:!1,configurable:!1,value:null},[OA]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var MA={};bn(MA,{clampRange:()=>PA,createElementComparator:()=>LA,wrapIndex:()=>FA});let NA;function PA(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 FA=(e,t)=>e<0?t+e:e,IA=e=>e!==e;function LA(e){let t=typeof e;if(t!==`object`||e===null)return IA(e)?IA: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?XE(e,t):!1:e instanceof Map?zA(e):Array.isArray(e)?RA(e):e instanceof kj?BA(e):VA(e,!0)}function RA(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 UA(e,n);case Map:return GA(e,n,n.keys());case kA:case kk:case Object:case void 0:return GA(e,n,t||Object.keys(n))}return n instanceof kj?WA(e,n):!1}}function UA(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++rQA,getBit:()=>JA,getBool:()=>qA,packBools:()=>ZA,popcnt_array:()=>ej,popcnt_bit_range:()=>$A,popcnt_uint32:()=>tj,setBool:()=>YA,truncateBitmap:()=>XA});function qA(e,t,n,r){return(n&1<>r}function YA(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):ZA(new QA(n,e,t,null,qA)).subarray(0,r)),i}return n}function ZA(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 QA=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 $A(e,t,i)+$A(e,r,n)+ej(e,i>>3,r-i>>3)}function ej(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+=tj(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=tj(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=tj(a.getUint8(i)),i+=1;return r}function tj(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const nj=-1;var rj=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 UD.isSparseUnion(e)||UD.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(UD.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=nj&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-$A(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=CO(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(UD.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===ZE.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(XA(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===J.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(XA(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[nD.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[nD.TYPE])&&(a[nD.TYPE]=i.subarray(e,e+t)),(i=a[nD.OFFSET])&&(a[nD.OFFSET]=i.subarray(e,e+t+1))||(i=a[nD.DATA])&&(a[nD.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};rj.prototype.children=Object.freeze([]);var ij=class e extends wO{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new rj(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=xE(e.data),i=xE(e.nullBitmap),a=yE(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new rj(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=xE(e.data),i=xE(e.nullBitmap),a=bE(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new rj(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=xE(e.data),i=xE(e.nullBitmap),a=yE(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new rj(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=xE(e.data),i=xE(e.nullBitmap),a=bE(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new rj(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=xE(e.nullBitmap),a=yE(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new rj(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=xE(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=gE(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(UD.isSparseUnion(t))return new rj(t,n,a,o,[void 0,void 0,void 0,i],r);let s=yE(e.valueOffsets);return new rj(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=xE(t.nullBitmap),a=gE(n.indices.ArrayType,t.data),{dictionary:o=new kj([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new rj(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length/CO(t),nullCount:o=e.nullBitmap?-1:0}=e;return new rj(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=xE(e.nullBitmap),i=gE(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new rj(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=xE(t.nullBitmap),{length:o=i.length/CO(n),nullCount:s=t.nullBitmap?-1:0}=t;return new rj(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=xE(t.nullBitmap),o=yE(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new rj(n,r,s,c,[o,void 0,a],[i])}};const aj=new ij;var oj=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 cj(e){return e.reduce((e,t)=>e+t.nullCount,0)}function lj(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function uj(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 dj(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function vj(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new QA(n,e.offset+(t||0),e.length,n,qA)){if(!i)return r;++r}return-1}function yj(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case J.Union:break;case J.Dictionary:break;default:return vj(e,n)}let r=wA.getVisitFn(e),i=LA(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 oj(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new wj(a)})}var wj=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof rj)))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}=Dj[o.typeId],r=a[0];this.isValid=e=>fj(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,Oj[o.typeId]),this._offsets=lj(a);break}this.data=a,this.type=o,this.stride=CO(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 sj(this.data)}get nullCount(){return cj(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${J[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(FA(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return Tj.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(PA(this,t,n,({data:e,_offsets:t},n,r)=>uj(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case J.Int:case J.Float:case J.Decimal:case J.Time:case J.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 UD.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(UD.isDictionary(this.type)){let t=new Aj(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new Aj(this)}unmemoize(){if(UD.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}};Ej=Symbol.toStringTag,kj[Ej]=(e=>{e.type=UD.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(J).map(e=>J[e]).filter(e=>typeof e==`number`&&e!==J.NONE);for(let n of t){let t=wA.getVisitFnByTypeId(n),r=Ek.getVisitFnByTypeId(n),i=xj.getVisitFnByTypeId(n);Dj[n]={get:t,set:r,indexOf:i},Oj[n]=Object.create(e,{isValid:{value:pj(fj)},get:{value:pj(wA.getVisitFnByTypeId(n))},set:{value:mj(Ek.getVisitFnByTypeId(n))},indexOf:{value:hj(xj.getVisitFnByTypeId(n))}})}return`Vector`})(kj.prototype);var Aj=class e extends kj{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 kj(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},jj={};bn(jj,{BaseInt64:()=>Ij,Int128:()=>zj,Int64:()=>Rj,Uint64:()=>Lj});const Mj=65536;function Nj(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const Pj=8,Fj=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];var Ij=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`${Nj(this.buffer[3])} ${Nj(this.buffer[2])} ${Nj(this.buffer[1])} ${Nj(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;nVj,toIntervalDayTimeObjects:()=>Uj,toIntervalMonthDayNanoInt32Array:()=>Hj,toIntervalMonthDayNanoObjects:()=>Wj});function Vj(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 Uj(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 Gj=class extends wO{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 Kj(e,t){return t instanceof e.constructor}function qj(e,t){return e===t||Kj(e,t)}function Jj(e,t){return e===t||Kj(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function Yj(e,t){return e===t||Kj(e,t)&&e.precision===t.precision}function Xj(e,t){return e===t||Kj(e,t)&&e.byteWidth===t.byteWidth}function Zj(e,t){return e===t||Kj(e,t)&&e.unit===t.unit}function Qj(e,t){return e===t||Kj(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function $j(e,t){return e===t||Kj(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function eM(e,t){return e===t||Kj(e,t)&&e.children.length===t.children.length&&cM.compareManyFields(e.children,t.children)}function tM(e,t){return e===t||Kj(e,t)&&e.children.length===t.children.length&&cM.compareManyFields(e.children,t.children)}function nM(e,t){return e===t||Kj(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&cM.compareManyFields(e.children,t.children)}function rM(e,t){return e===t||Kj(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&cM.visit(e.indices,t.indices)&&cM.visit(e.dictionary,t.dictionary)}function iM(e,t){return e===t||Kj(e,t)&&e.unit===t.unit}function aM(e,t){return e===t||Kj(e,t)&&e.unit===t.unit}function oM(e,t){return e===t||Kj(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&cM.compareManyFields(e.children,t.children)}function sM(e,t){return e===t||Kj(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&cM.compareManyFields(e.children,t.children)}Gj.prototype.visitNull=qj,Gj.prototype.visitBool=qj,Gj.prototype.visitInt=Jj,Gj.prototype.visitInt8=Jj,Gj.prototype.visitInt16=Jj,Gj.prototype.visitInt32=Jj,Gj.prototype.visitInt64=Jj,Gj.prototype.visitUint8=Jj,Gj.prototype.visitUint16=Jj,Gj.prototype.visitUint32=Jj,Gj.prototype.visitUint64=Jj,Gj.prototype.visitFloat=Yj,Gj.prototype.visitFloat16=Yj,Gj.prototype.visitFloat32=Yj,Gj.prototype.visitFloat64=Yj,Gj.prototype.visitUtf8=qj,Gj.prototype.visitLargeUtf8=qj,Gj.prototype.visitBinary=qj,Gj.prototype.visitLargeBinary=qj,Gj.prototype.visitFixedSizeBinary=Xj,Gj.prototype.visitDate=Zj,Gj.prototype.visitDateDay=Zj,Gj.prototype.visitDateMillisecond=Zj,Gj.prototype.visitTimestamp=Qj,Gj.prototype.visitTimestampSecond=Qj,Gj.prototype.visitTimestampMillisecond=Qj,Gj.prototype.visitTimestampMicrosecond=Qj,Gj.prototype.visitTimestampNanosecond=Qj,Gj.prototype.visitTime=$j,Gj.prototype.visitTimeSecond=$j,Gj.prototype.visitTimeMillisecond=$j,Gj.prototype.visitTimeMicrosecond=$j,Gj.prototype.visitTimeNanosecond=$j,Gj.prototype.visitDecimal=qj,Gj.prototype.visitList=eM,Gj.prototype.visitStruct=tM,Gj.prototype.visitUnion=nM,Gj.prototype.visitDenseUnion=nM,Gj.prototype.visitSparseUnion=nM,Gj.prototype.visitDictionary=rM,Gj.prototype.visitInterval=iM,Gj.prototype.visitIntervalDayTime=iM,Gj.prototype.visitIntervalYearMonth=iM,Gj.prototype.visitIntervalMonthDayNano=iM,Gj.prototype.visitDuration=aM,Gj.prototype.visitDurationSecond=aM,Gj.prototype.visitDurationMillisecond=aM,Gj.prototype.visitDurationMicrosecond=aM,Gj.prototype.visitDurationNanosecond=aM,Gj.prototype.visitFixedSizeList=oM,Gj.prototype.visitMap=sM;const cM=new Gj;function lM(e,t){return cM.compareSchemas(e,t)}function uM(e,t){return cM.compareFields(e,t)}function dM(e,t){return cM.visit(e,t)}const fM=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},cD),jj),KA),OO),dE),MA),rD),Bj),{compareSchemas:lM,compareFields:uM,compareTypes:dM}),pM=365.2425,mM=10**8*24*60*60*1e3,hM=6048e5,gM=864e5,_M=3600,vM=_M*24,yM=vM*7,bM=vM*pM,xM=bM/12,SM=xM*3,CM=Symbol.for(`constructDateFrom`);function wM(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&CM in e?e[CM](t):e instanceof Date?new e.constructor(t):new Date(t)}function TM(e,t){return wM(t||e,e)}let EM={};function DM(){return EM}function OM(e,t){let n=DM(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=TM(e,t?.in),a=i.getDay(),o=(a=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function jM(e){let t=TM(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 MM(e,...t){let n=wM.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function NM(e,t){let n=TM(e,t?.in);return n.setHours(0,0,0,0),n}function PM(e,t,n){let[r,i]=MM(n?.in,e,t),a=NM(r),o=NM(i),s=+a-jM(a),c=+o-jM(o);return Math.round((s-c)/gM)}function FM(e,t){let n=AM(e,t),r=wM(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),kM(r)}function IM(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function LM(e){return!(!IM(e)&&typeof e!=`number`||isNaN(+TM(e)))}function RM(e,t){let n=TM(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const zM={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`}},BM=(e,t,n)=>{let r,i=zM[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 VM(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}const HM={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},UM={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},WM={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},GM={date:VM({formats:HM,defaultWidth:`full`}),time:VM({formats:UM,defaultWidth:`full`}),dateTime:VM({formats:WM,defaultWidth:`full`})},KM={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},qM=(e,t,n,r)=>KM[e];function JM(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 YM={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},XM={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},ZM={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`]},QM={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`]},$M={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`}},eN={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`}},tN=(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`},nN={ordinalNumber:tN,era:JM({values:YM,defaultWidth:`wide`}),quarter:JM({values:XM,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:JM({values:ZM,defaultWidth:`wide`}),day:JM({values:QM,defaultWidth:`wide`}),dayPeriod:JM({values:$M,defaultWidth:`wide`,formattingValues:eN,defaultFormattingWidth:`wide`})};function rN(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)?aN(s,e=>e.test(o)):iN(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 iN(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function aN(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 sN=/^(\d+)(th|st|nd|rd)?/i,cN=/\d+/i,lN={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},uN={any:[/^b/i,/^(a|c)/i]},dN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fN={any:[/1/i,/2/i,/3/i,/4/i]},pN={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},mN={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]},hN={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},gN={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]},_N={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},vN={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}},yN={ordinalNumber:oN({matchPattern:sN,parsePattern:cN,valueCallback:e=>parseInt(e,10)}),era:rN({matchPatterns:lN,defaultMatchWidth:`wide`,parsePatterns:uN,defaultParseWidth:`any`}),quarter:rN({matchPatterns:dN,defaultMatchWidth:`wide`,parsePatterns:fN,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:rN({matchPatterns:pN,defaultMatchWidth:`wide`,parsePatterns:mN,defaultParseWidth:`any`}),day:rN({matchPatterns:hN,defaultMatchWidth:`wide`,parsePatterns:gN,defaultParseWidth:`any`}),dayPeriod:rN({matchPatterns:_N,defaultMatchWidth:`any`,parsePatterns:vN,defaultParseWidth:`any`})},bN={code:`en-US`,formatDistance:BM,formatLong:GM,formatRelative:qM,localize:nN,match:yN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function xN(e,t){let n=TM(e,t?.in),r=PM(n,RM(n)),i=r+1;return i}function SN(e,t){let n=TM(e,t?.in),r=kM(n)-+FM(n);return Math.round(r/hM)+1}function CN(e,t){let n=TM(e,t?.in),r=n.getFullYear(),i=DM(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=wM(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=OM(o,t),c=wM(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=OM(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function wN(e,t){let n=DM(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=CN(e,t),a=wM(t?.in||e,0);a.setFullYear(i,0,r),a.setHours(0,0,0,0);let o=OM(a,t);return o}function TN(e,t){let n=TM(e,t?.in),r=OM(n,t)-+wN(n,t);return Math.round(r/hM)+1}function EN(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString().padStart(t,`0`);return n+r}const DN={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return EN(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):EN(n+1,2)},d(e,t){return EN(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 EN(e.getHours()%12||12,t.length)},H(e,t){return EN(e.getHours(),t.length)},m(e,t){return EN(e.getMinutes(),t.length)},s(e,t){return EN(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*10**(n-3));return EN(i,t.length)}},ON={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},kN={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 DN.y(e,t)},Y:function(e,t,n,r){let i=CN(e,r),a=i>0?i:1-i;if(t===`YY`){let e=a%100;return EN(e,2)}return t===`Yo`?n.ordinalNumber(a,{unit:`year`}):EN(a,t.length)},R:function(e,t){let n=AM(e);return EN(n,t.length)},u:function(e,t){let n=e.getFullYear();return EN(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 EN(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 EN(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 DN.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 EN(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=TN(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):EN(i,t.length)},I:function(e,t,n){let r=SN(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):EN(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):DN.d(e,t)},D:function(e,t,n){let r=xN(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):EN(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 EN(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 EN(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 EN(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?ON.noon:r===0?ON.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?ON.evening:r>=12?ON.afternoon:r>=4?ON.morning:ON.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 DN.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):DN.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):EN(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):EN(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):DN.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):DN.s(e,t)},S:function(e,t){return DN.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return jN(r);case`XXXX`:case`XX`:return MN(r);case`XXXXX`:case`XXX`:default:return MN(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return jN(r);case`xxxx`:case`xx`:return MN(r);case`xxxxx`:case`xxx`:default:return MN(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+AN(r,`:`);case`OOOO`:default:return`GMT`+MN(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+AN(r,`:`);case`zzzz`:default:return`GMT`+MN(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return EN(r,t.length)},T:function(e,t,n){return EN(+e,t.length)}};function AN(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+EN(a,2)}function jN(e,t){if(e%60==0){let t=e>0?`-`:`+`;return t+EN(Math.abs(e)/60,2)}return MN(e,t)}function MN(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=EN(Math.trunc(r/60),2),a=EN(r%60,2);return n+i+t+a}const NN=(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`})}},PN=(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`})}},FN=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return NN(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}}`,NN(r,t)).replace(`{{time}}`,PN(i,t))},IN={p:PN,P:FN},LN=/^D+$/,RN=/^Y+$/,zN=[`D`,`DD`,`YY`,`YYYY`];function BN(e){return LN.test(e)}function VN(e){return RN.test(e)}function HN(e,t,n){let r=UN(e,t,n);if(console.warn(r),zN.includes(e))throw RangeError(r)}function UN(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 WN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,GN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,KN=/^'([^]*?)'?$/,qN=/''/g,JN=/[a-zA-Z]/;function YN(e,t,n){let r=DM(),i=n?.locale??r.locale??bN,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=TM(e,n?.in);if(!LM(s))throw RangeError(`Invalid time value`);let c=t.match(GN).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=IN[t];return n(e,i.formatLong)}return e}).join(``).match(WN).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:XN(e)};if(kN[t])return{isToken:!0,value:e};if(t.match(JN))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&VN(a)||!n?.useAdditionalDayOfYearTokens&&BN(a))&&HN(a,t,String(e));let o=kN[a[0]];return o(s,a,i.localize,l)}).join(``)}function XN(e){let t=e.match(KN);return t?t[1].replace(qN,`'`):e}function ZN(e,t){return TM(e*1e3,t?.in)}function QN(e,t){let n=$N(t)?new t(0):wM(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function $N(e){return typeof e==`function`&&e.prototype?.constructor===e}function eP(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 tP(e){return e==null}function nP(e){return e!=null}async function rP(){if(typeof window<`u`&&window!==null)return`browser`;try{let e=await x(()=>import(`./__vite-browser-external-Dm87haFe.js`).then(xn(1)),__vite__mapDeps([0,1,2]));return e!==void 0&&e.versions!=null&&e.versions.node!=null?`node`:`unknown`}catch{return`unknown`}}function iP(e){return tP(e)?!1:UD.isInt(e.type)&&!uP(e)||aP(e)}function aP(e){return tP(e)?!1:UD.isInt(e.type)&&e.type.isSigned===!1}function oP(e){return tP(e)?!1:UD.isFloat(e.type)??!1}function sP(e){return tP(e)?!1:UD.isDecimal(e.type)}function cP(e){return tP(e)?!1:UD.isBool(e.type)}function lP(e){return tP(e)?!1:UD.isDuration(e.type)}function uP(e){return tP(e)?!1:UD.isInt(e.type)&&e.metadata.get(`ARROW:extension:name`)===`period`}function dP(e){return tP(e)?!1:UD.isTimestamp(e.type)}function fP(e){return tP(e)?!1:UD.isDate(e.type)}function pP(e){return tP(e)?!1:UD.isTime(e.type)}function mP(e){return tP(e)?!1:UD.isList(e.type)||UD.isFixedSizeList(e.type)}function hP(e){return tP(e)?!1:UD.isStruct(e.type)||UD.isMap(e.type)}function gP(e){return tP(e)?!1:UD.isStruct(e.type)&&e.metadata.get(`ARROW:extension:name`)===`interval`||UD.isInterval(e.type)}const _P=new Date(1970,0,1);function vP(e,t){let n;if(t===eD.MILLISECOND)n=1e3;else if(t===eD.MICROSECOND)n=1e3*1e3;else if(t===eD.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 yP(e,t){let n=vP(e,t?.type?.unit??eD.SECOND);return ZN(n)}function bP(e,t){let n=yP(e,t);return YN(n,n.getMilliseconds()===0?`HH:mm:ss`:`HH:mm:ss.SSS`)}function xP(e){let t=`yyyy-MM-dd`;return e instanceof Date||typeof e==`number`&&Number.isFinite(e)?YN(e,t):(console.warn(`Unsupported date value: ${e}`),String(e))}function SP(e,t){if(!(e instanceof Date||typeof e==`number`&&Number.isFinite(e)))return console.warn(`Unsupported datetime value: ${e}`),null;let n,r=t?.type?.timezone;return n=r?new qT(e,r):new qT(e),QN(n,Date)}function CP(e,t){let n=t?.type?.scale||0,r=fM.bigNumToString(new fM.BN(e)).padStart(n,`0`);if(n===0)return r;let i=``;r.startsWith(`-`)&&(i=`-`,r=r.slice(1));let a=r.slice(0,-n)||`0`,o=eP(r.slice(-n),`0`)||``;return`${i}${a}${o?`.${o}`:``}`}const wP=new Intl.NumberFormat(`en-US`,{style:`decimal`,maximumFractionDigits:4,minimumFractionDigits:4,useGrouping:!0});function TP(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 EP(e,t){if(UD.isInterval(t?.type))return TP(e);let n=t&&t.metadata.get(`ARROW:extension:name`);if(n&&n===`pandas.interval`){let n=JSON.parse(t.metadata.get(`ARROW:extension:metadata`)),{closed:r}=n,i=e.toJSON(),a=r===`both`||r===`left`?`[`:`(`,o=r===`both`||r===`right`?`]`:`)`,s=OP(i.left,t.type?.children?.[0]),c=OP(i.right,t.type?.children?.[1]);return`${a+s}, ${c+o}`}return String(e)}function DP(e,t){return t?.type instanceof gO?JSON.parse(JSON.stringify(e,(e,t)=>{if(nP(t))return typeof t==`bigint`?Number(t):t})):JSON.parse(JSON.stringify(e,(e,t)=>typeof t==`bigint`?Number(t):t))}function OP(e,t){if(tP(e))return null;let n=e instanceof Date||Number.isFinite(e);if(n&&fP(t))return xP(e);if(typeof e==`bigint`&&pP(t))return bP(Number(e),t);if(n&&dP(t))return SP(e,t);if(uP(t))throw Error(`Period type is not supported yet`);if(gP(t))return EP(e,t);if(lP(t))throw Error(`Duration type is not supported yet`);return sP(t)?CP(e,t):oP(t)&&Number.isFinite(e)||iP(t)?e:hP(t)||mP(t)?DP(e,t):cP(t)?!!e:String(e)}function kP(e){let t=(e.toArray()||[]).map(e=>e.toJSON())||[],n=t.map(t=>(e.schema.fields.forEach(e=>t[e.name]=OP(t[e.name],e)),t));return n}let AP=function(e){return e.ORIGIN_PRIVATE_FS=`origin-private-fs`,e.NODE_FS=`node-fs`,e}({});async function jP(e){let t=ee(e,{logger:!1}),n,r,i=await rP();if(i===`browser`){if(t.bundles===void 0){let{getBundles:e}=await x(async()=>{let{getBundles:e}=await import(`./default-browser-CICL74Rl.js`);return{getBundles:e}},[]);t.bundles=await e()}r=await zT(await t.bundles),n=new Worker(r.mainWorker)}else if(i===`node`){if(t.bundles===void 0){let{getBundles:e}=await x(async()=>{let{getBundles:e}=await import(`./default-node-me4M3cN3.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]));t.bundles=await e()}r=await zT(await t.bundles);let e=r.mainWorker;e.startsWith(`/@fs/`)&&(e=e.replace(`/@fs/`,`file://`));let i=await x(()=>import(`./browser-DAWwZmxu.js`),[]);n=new i.default(e,{type:`module`})}else throw Error(`Unsupported environment: ${i}`);let a;a=t.logger===!0?new rT:t.logger===!1?new nT:t.logger;let o=new mT(a,n);if(await o.instantiate(r.mainModule,r.pthreadWorker),t.storage)switch(t.storage.type){case AP.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 AP.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:kP(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:kP(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 MP(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 NP(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 Y=Symbol.for(`drizzle:entityKind`),PP=Symbol.for(`drizzle:hasOwnEntityKind`);function X(e,t){if(!e||typeof e!=`object`)return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,Y))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(Y in n&&n[Y]===t[Y])return!0;n=Object.getPrototypeOf(n)}return!1}var FP=class{constructor(e,t){this.table=e,this.config=t,this.name=t.name,this.keyAsName=t.keyAsName,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.onUpdateFn=t.onUpdateFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType,this.generated=t.generated,this.generatedIdentity=t.generatedIdentity}static[Y]=`Column`;name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!==`byDefault`}},IP=class{static[Y]=`ColumnBuilder`;config;constructor(e,t,n){this.config={name:e,keyAsName:e===``,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:t,columnType:n,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}$default=this.$defaultFn;$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===``&&(this.config.name=e)}};const LP=Symbol.for(`drizzle:Name`);var RP=class{static[Y]=`PgForeignKeyBuilder`;reference;_onUpdate=`no action`;_onDelete=`no action`;constructor(e,t){this.reference=()=>{let{name:t,columns:n,foreignColumns:r}=e();return{name:t,columns:n,foreignTable:r[0].table,foreignColumns:r}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.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 zP(e,this)}},zP=class{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static[Y]=`PgForeignKey`;reference;onUpdate;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[LP],...r,n[0].table[LP],...i];return e??`${a.join(`_`)}_fk`}};function BP(e,...t){return e(...t)}function VP(e,t){return`${e[LP]}_${t.join(`_`)}_unique`}var HP=class{constructor(e,t){this.name=t,this.columns=e}static[Y]=`PgUniqueConstraintBuilder`;columns;nullsNotDistinctConfig=!1;nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(e){return new WP(e,this.columns,this.nullsNotDistinctConfig,this.name)}},UP=class{static[Y]=`PgUniqueOnConstraintBuilder`;name;constructor(e){this.name=e}on(...e){return new HP(e,this.name)}},WP=class{constructor(e,t,n,r){this.table=e,this.columns=t,this.name=r??VP(this.table,this.columns.map(e=>e.name)),this.nullsNotDistinct=n}static[Y]=`PgUniqueConstraint`;columns;name;nullsNotDistinct=!1;getName(){return this.name}};function GP(e,t,n){for(let r=t;rArray.isArray(e)?JP(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var YP=class extends IP{foreignKeyConfigs=[];static[Y]=`PgColumnBuilder`;array(e){return new $P(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})=>BP((n,r)=>{let i=new RP(()=>{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 ZP(e,this.config)}},XP=class extends FP{constructor(e,t){t.uniqueName||=VP(e,[t.name]),super(e,t),this.table=e}static[Y]=`PgColumn`},ZP=class extends XP{static[Y]=`ExtraConfigColumn`;getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??`asc`,nulls:this.config.nulls??`last`,opClass:this.config.opClass};defaultConfig={order:`asc`,nulls:`last`,opClass:void 0};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}},QP=class{static[Y]=`IndexedColumn`;constructor(e,t,n,r){this.name=e,this.keyAsName=t,this.type=n,this.indexConfig=r}name;keyAsName;type;indexConfig},$P=class extends YP{static[Y]=`PgArrayBuilder`;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 eF(e,this.config,t)}},eF=class e extends XP{constructor(e,t,n,r){super(e,t),this.baseColumn=n,this.range=r,this.size=t.size}size;static[Y]=`PgArray`;getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==`number`?this.size:``}]`}mapFromDriverValue(e){return typeof e==`string`&&(e=qP(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(t,n=!1){let r=t.map(t=>t===null?null:X(this.baseColumn,e)?this.baseColumn.mapToDriverValue(t,!0):this.baseColumn.mapToDriverValue(t));return n?r:JP(r)}},tF=class extends YP{static[Y]=`PgEnumObjectColumnBuilder`;constructor(e,t){super(e,`string`,`PgEnumObjectColumn`),this.config.enum=t}build(e){return new nF(e,this.config)}},nF=class extends XP{static[Y]=`PgEnumObjectColumn`;enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}};const rF=Symbol.for(`drizzle:isPgEnum`);function iF(e){return!!e&&typeof e==`function`&&rF in e&&e[rF]===!0}var aF=class extends YP{static[Y]=`PgEnumColumnBuilder`;constructor(e,t){super(e,`string`,`PgEnumColumn`),this.config.enum=t}build(e){return new oF(e,this.config)}},oF=class extends XP{static[Y]=`PgEnumColumn`;enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}},sF=class{static[Y]=`Subquery`;constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},cF=class extends sF{static[Y]=`WithSubquery`},lF=`0.44.2`;let uF,dF;const fF={startActiveSpan(e,t){return uF?(dF||=uF.trace.getTracer(`drizzle-orm`,lF),BP((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()}}),uF,dF)):t()}},pF=Symbol.for(`drizzle:ViewBaseConfig`),mF=Symbol.for(`drizzle:Schema`),hF=Symbol.for(`drizzle:Columns`),gF=Symbol.for(`drizzle:ExtraConfigColumns`),_F=Symbol.for(`drizzle:OriginalName`),vF=Symbol.for(`drizzle:BaseName`),yF=Symbol.for(`drizzle:IsAlias`),bF=Symbol.for(`drizzle:ExtraConfigBuilder`),xF=Symbol.for(`drizzle:IsDrizzleTable`);var SF=class{static[Y]=`Table`;static Symbol={Name:LP,Schema:mF,OriginalName:_F,Columns:hF,ExtraConfigColumns:gF,BaseName:vF,IsAlias:yF,ExtraConfigBuilder:bF};[LP];[_F];[mF];[hF];[gF];[vF];[yF]=!1;[xF]=!0;[bF]=void 0;constructor(e,t,n){this[LP]=this[_F]=e,this[mF]=t,this[vF]=n}};function CF(e){return e[LP]}function wF(e){return`${e[mF]??`public`}.${e[LP]}`}var TF=class{static[Y]=`FakePrimitiveParam`};function EF(e){return e!=null&&typeof e.getSQL==`function`}function DF(e){let t={sql:``,params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||=[],t.typings.push(...n.typings));return t}var OF=class{static[Y]=`StringChunk`;value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new kF([this])}},kF=class e{constructor(e){this.queryChunks=e;for(let t of e)if(X(t,SF)){let e=t[SF.Symbol.Schema];this.usedTables.push(e===void 0?t[SF.Symbol.Name]:e+`.`+t[SF.Symbol.Name])}}static[Y]=`SQL`;decoder=MF;shouldInlineParams=!1;usedTables=[];append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return fF.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(t,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 DF(t.map(t=>{if(X(t,OF))return{sql:t.value.join(``),params:[]};if(X(t,AF))return{sql:a(t.value),params:[]};if(t===void 0)return{sql:``,params:[]};if(Array.isArray(t)){let e=[new OF(`(`)];for(let[n,r]of t.entries())e.push(r),ne},NF={mapToDriverValue:e=>e},PF={...MF,...NF};var FF=class{constructor(e,t=NF){this.value=e,this.encoder=t}static[Y]=`Param`;brand;getSQL(){return new kF([this])}};function Z(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new OF(e[0]));for(let[r,i]of t.entries())n.push(i,new OF(e[r+1]));return new kF(n)}(e=>{function t(){return new kF([])}e.empty=t;function n(e){return new kF(e)}e.fromList=n;function r(e){return new kF([new OF(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 kF(n)}e.join=i;function a(e){return new AF(e)}e.identifier=a;function o(e){return new IF(e)}e.placeholder=o;function s(e,t){return new FF(e,t)}e.param=s})(Z||={}),(e=>{class t{constructor(e,t){this.sql=e,this.fieldAlias=t}static[Y]=`SQL.Aliased`;isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(kF||={});var IF=class{constructor(e){this.name=e}static[Y]=`Placeholder`;getSQL(){return new kF([this])}};function LF(e,t){return e.map(e=>{if(X(e,IF)){if(!(e.name in t))throw Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(X(e,FF)&&X(e.value,IF)){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 RF=Symbol.for(`drizzle:IsDrizzleView`);var zF=class{static[Y]=`View`;[pF];[RF]=!0;constructor({name:e,schema:t,selectedFields:n,query:r}){this[pF]={name:e,originalName:e,schema:t,selectedFields:n,query:r,isExisting:!r,isAlias:!1}}getSQL(){return new kF([this])}};FP.prototype.getSQL=function(){return new kF([this])},SF.prototype.getSQL=function(){return new kF([this])},sF.prototype.getSQL=function(){return new kF([this])};var BF=class{constructor(e){this.table=e}static[Y]=`ColumnAliasProxyHandler`;get(e,t){return t===`table`?this.table:e[t]}},VF=class{constructor(e,t){this.alias=e,this.replaceOriginalName=t}static[Y]=`TableAliasProxyHandler`;get(e,t){if(t===SF.Symbol.IsAlias)return!0;if(t===SF.Symbol.Name||this.replaceOriginalName&&t===SF.Symbol.OriginalName)return this.alias;if(t===pF)return{...e[pF],name:this.alias,isAlias:!0};if(t===SF.Symbol.Columns){let t=e[SF.Symbol.Columns];if(!t)return t;let n={};return Object.keys(t).map(r=>{n[r]=new Proxy(t[r],new BF(new Proxy(e,this)))}),n}let n=e[t];return X(n,FP)?new Proxy(n,new BF(new Proxy(e,this))):n}},HF=class{constructor(e){this.alias=e}static[Y]=`RelationTableAliasProxyHandler`;get(e,t){return t===`sourceTable`?UF(e.sourceTable,this.alias):e[t]}};function UF(e,t){return new Proxy(e,new VF(t,!1))}function WF(e,t){return new Proxy(e,new BF(new Proxy(e.table,new VF(t,!1))))}function GF(e,t){return new kF.Aliased(KF(e.sql,t),e.fieldAlias)}function KF(e,t){return Z.join(e.queryChunks.map(e=>X(e,FP)?WF(e,t):X(e,kF)?KF(e,t):X(e,kF.Aliased)?GF(e,t):e))}var qF=class extends Error{static[Y]=`DrizzleError`;constructor({message:e,cause:t}){super(e),this.name=`DrizzleError`,this.cause=t}},JF=class extends qF{static[Y]=`TransactionRollbackError`;constructor(){super({message:`Rollback`})}},YF=class{static[Y]=`ConsoleLogWriter`;write(e){console.log(e)}},XF=class{static[Y]=`DefaultLogger`;writer;constructor(e){this.writer=e?.writer??new YF}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}`)}},ZF=class{static[Y]=`NoopLogger`;logQuery(){}},QF=class{static[Y]=`QueryPromise`;[Symbol.toStringTag]=`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)}};function $F(e,t){return Object.entries(e).reduce((e,[n,r])=>{if(typeof n!=`string`)return e;let i=t?[...t,n]:[n];return X(r,FP)||X(r,kF)||X(r,kF.Aliased)?e.push({path:i,field:r}):X(r,SF)?e.push(...$F(r[SF.Symbol.Columns],i)):e.push(...$F(r,i)),e},[])}function eI(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 tI(e,t){let n=Object.entries(t).filter(([,e])=>e!==void 0).map(([t,n])=>X(n,kF)||X(n,FP)?[t,n]:[t,new FF(n,e[SF.Symbol.Columns][t])]);if(n.length===0)throw Error(`No values to set`);return Object.fromEntries(n)}function nI(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 rI(e){return e[SF.Symbol.Columns]}function iI(e){return X(e,sF)?e._.alias:X(e,zF)?e[pF].name:X(e,kF)?void 0:e[SF.Symbol.IsAlias]?e[SF.Symbol.Name]:e[SF.Symbol.BaseName]}function aI(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 oI=class extends YP{static[Y]=`PgDateColumnBaseBuilder`;defaultNow(){return this.default(Z`now()`)}},sI=class extends oI{static[Y]=`PgDateBuilder`;constructor(e){super(e,`date`,`PgDate`)}build(e){return new cI(e,this.config)}},cI=class extends XP{static[Y]=`PgDate`;getSQLType(){return`date`}mapFromDriverValue(e){return new Date(e)}mapToDriverValue(e){return e.toISOString()}},lI=class extends oI{static[Y]=`PgDateStringBuilder`;constructor(e){super(e,`string`,`PgDateString`)}build(e){return new uI(e,this.config)}},uI=class extends XP{static[Y]=`PgDateString`;getSQLType(){return`date`}},dI=class extends YP{static[Y]=`PgJsonBuilder`;constructor(e){super(e,`json`,`PgJson`)}build(e){return new fI(e,this.config)}},fI=class extends XP{static[Y]=`PgJson`;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}},pI=class extends YP{static[Y]=`PgJsonbBuilder`;constructor(e){super(e,`json`,`PgJsonb`)}build(e){return new mI(e,this.config)}},mI=class extends XP{static[Y]=`PgJsonb`;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}},hI=class extends YP{static[Y]=`PgNumericBuilder`;constructor(e,t,n){super(e,`string`,`PgNumeric`),this.config.precision=t,this.config.scale=n}build(e){return new gI(e,this.config)}},gI=class extends XP{static[Y]=`PgNumeric`;precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.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})`}},_I=class extends YP{static[Y]=`PgNumericNumberBuilder`;constructor(e,t,n){super(e,`number`,`PgNumericNumber`),this.config.precision=t,this.config.scale=n}build(e){return new vI(e,this.config)}},vI=class extends XP{static[Y]=`PgNumericNumber`;precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return typeof e==`number`?e:Number(e)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},yI=class extends YP{static[Y]=`PgNumericBigIntBuilder`;constructor(e,t,n){super(e,`bigint`,`PgNumericBigInt`),this.config.precision=t,this.config.scale=n}build(e){return new bI(e,this.config)}},bI=class extends XP{static[Y]=`PgNumericBigInt`;precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},xI=class extends oI{constructor(e,t,n){super(e,`string`,`PgTime`),this.withTimezone=t,this.precision=n,this.config.withTimezone=t,this.config.precision=n}static[Y]=`PgTimeBuilder`;build(e){return new SI(e,this.config)}},SI=class extends XP{static[Y]=`PgTime`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`time${e}${this.withTimezone?` with time zone`:``}`}},CI=class extends oI{static[Y]=`PgTimestampBuilder`;constructor(e,t,n){super(e,`date`,`PgTimestamp`),this.config.withTimezone=t,this.config.precision=n}build(e){return new wI(e,this.config)}},wI=class extends XP{static[Y]=`PgTimestamp`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=this.precision===void 0?``:` (${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}mapFromDriverValue=e=>new Date(this.withTimezone?e:e+`+0000`);mapToDriverValue=e=>e.toISOString()},TI=class extends oI{static[Y]=`PgTimestampStringBuilder`;constructor(e,t,n){super(e,`string`,`PgTimestampString`),this.config.withTimezone=t,this.config.precision=n}build(e){return new EI(e,this.config)}},EI=class extends XP{static[Y]=`PgTimestampString`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},DI=class extends YP{static[Y]=`PgUUIDBuilder`;constructor(e){super(e,`string`,`PgUUID`)}defaultRandom(){return this.default(Z`gen_random_uuid()`)}build(e){return new OI(e,this.config)}},OI=class extends XP{static[Y]=`PgUUID`;getSQLType(){return`uuid`}};const kI=Symbol.for(`drizzle:PgInlineForeignKeys`),AI=Symbol.for(`drizzle:EnableRLS`);var jI=class extends SF{static[Y]=`PgTable`;static Symbol=Object.assign({},SF.Symbol,{InlineForeignKeys:kI,EnableRLS:AI});[kI]=[];[AI]=!1;[SF.Symbol.ExtraConfigBuilder]=void 0;[SF.Symbol.ExtraConfigColumns]={}},MI=class{static[Y]=`PgPrimaryKeyBuilder`;columns;name;constructor(e,t){this.columns=e,this.name=t}build(e){return new NI(e,this.columns,this.name)}},NI=class{constructor(e,t,n){this.table=e,this.columns=t,this.name=n}static[Y]=`PgPrimaryKey`;columns;name;getName(){return this.name??`${this.table[jI.Symbol.Name]}_${this.columns.map(e=>e.name).join(`_`)}_pk`}};function PI(e,t){return jF(t)&&!EF(e)&&!X(e,FF)&&!X(e,IF)&&!X(e,FP)&&!X(e,SF)&&!X(e,zF)?new FF(e,t):e}const FI=(e,t)=>Z`${e} = ${PI(t,e)}`,II=(e,t)=>Z`${e} <> ${PI(t,e)}`;function LI(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new kF(t):new kF([new OF(`(`),Z.join(t,new OF(` and `)),new OF(`)`)])}function RI(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new kF(t):new kF([new OF(`(`),Z.join(t,new OF(` or `)),new OF(`)`)])}function zI(e){return Z`not ${e}`}const BI=(e,t)=>Z`${e} > ${PI(t,e)}`,VI=(e,t)=>Z`${e} >= ${PI(t,e)}`,HI=(e,t)=>Z`${e} < ${PI(t,e)}`,UI=(e,t)=>Z`${e} <= ${PI(t,e)}`;function WI(e,t){return Array.isArray(t)?t.length===0?Z`false`:Z`${e} in ${t.map(t=>PI(t,e))}`:Z`${e} in ${PI(t,e)}`}function GI(e,t){return Array.isArray(t)?t.length===0?Z`true`:Z`${e} not in ${t.map(t=>PI(t,e))}`:Z`${e} not in ${PI(t,e)}`}function KI(e){return Z`${e} is null`}function qI(e){return Z`${e} is not null`}function JI(e){return Z`exists ${e}`}function YI(e){return Z`not exists ${e}`}function XI(e,t,n){return Z`${e} between ${PI(t,e)} and ${PI(n,e)}`}function ZI(e,t,n){return Z`${e} not between ${PI(t,e)} and ${PI(n,e)}`}function QI(e,t){return Z`${e} like ${t}`}function $I(e,t){return Z`${e} not like ${t}`}function eL(e,t){return Z`${e} ilike ${t}`}function tL(e,t){return Z`${e} not ilike ${t}`}function nL(e){return Z`${e} asc`}function rL(e){return Z`${e} desc`}var iL=class{constructor(e,t,n){this.sourceTable=e,this.referencedTable=t,this.relationName=n,this.referencedTableName=t[SF.Symbol.Name]}static[Y]=`Relation`;referencedTableName;fieldName},aL=class{constructor(e,t){this.table=e,this.config=t}static[Y]=`Relations`},oL=class e extends iL{constructor(e,t,n,r){super(e,t,n?.relationName),this.config=n,this.isNullable=r}static[Y]=`One`;withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config,this.isNullable);return n.fieldName=t,n}},sL=class e extends iL{constructor(e,t,n){super(e,t,n?.relationName),this.config=n}static[Y]=`Many`;withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config);return n.fieldName=t,n}};function cL(){return{and:LI,between:XI,eq:FI,exists:JI,gt:BI,gte:VI,ilike:eL,inArray:WI,isNull:KI,isNotNull:qI,like:QI,lt:HI,lte:UI,ne:II,not:zI,notBetween:ZI,notExists:YI,notLike:$I,notIlike:tL,notInArray:GI,or:RI,sql:Z}}function lL(){return{sql:Z,asc:nL,desc:rL}}function uL(e,t){Object.keys(e).length===1&&`default`in e&&!X(e.default,SF)&&(e=e.default);let n={},r={},i={};for(let[a,o]of Object.entries(e))if(X(o,SF)){let e=wF(o),t=r[e];n[e]=a,i[a]={tsName:a,dbName:o[SF.Symbol.Name],schema:o[SF.Symbol.Schema],columns:o[SF.Symbol.Columns],relations:t?.relations??{},primaryKey:t?.primaryKey??[]};for(let e of Object.values(o[SF.Symbol.Columns]))e.primary&&i[a].primaryKey.push(e);let s=o[SF.Symbol.ExtraConfigBuilder]?.(o[SF.Symbol.ExtraConfigColumns]);if(s)for(let e of Object.values(s))X(e,MI)&&i[a].primaryKey.push(...e.columns)}else if(X(o,aL)){let e=wF(o.table),a=n[e],s=o.config(t(o.table)),c;for(let[t,n]of Object.entries(s))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 dL(e){return function(t,n){return new oL(e,t,n,n?.fields.reduce((e,t)=>e&&t.notNull,!0)??!1)}}function fL(e){return function(t,n){return new sL(e,t,n)}}function pL(e,t,n){if(X(n,oL)&&n.config)return{fields:n.config.fields,references:n.config.references};let r=t[wF(n.referencedTable)];if(!r)throw Error(`Table "${n.referencedTable[SF.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[wF(a)];if(!o)throw Error(`Table "${a[SF.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[SF.Symbol.Name]}". Please specify relation name`);if(s[0]&&X(s[0],oL)&&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 mL(e){return{one:dL(e),many:fL(e)}}function hL(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]=X(r,oL)?l&&hL(e,e[s.relationTableTsKey],l,s.selection,i):l.map(t=>hL(e,e[s.relationTableTsKey],t,s.selection,i))}else{let e=i(n[o]),t=s.field,r;r=X(t,FP)?t:X(t,kF)?t.decoder:t.sql.decoder,a[s.tsKey]=e===null?null:r.mapFromDriverValue(e)}return a}var gL=class e{static[Y]=`SelectionProxyHandler`;config;constructor(e){this.config={...e}}get(t,n){if(n===`_`)return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(n===pF)return{...t[pF],selectedFields:new Proxy(t[pF].selectedFields,this)};if(typeof n==`symbol`)return t[n];let r=X(t,sF)?t._.selectedFields:X(t,zF)?t[pF].selectedFields:t,i=r[n];if(X(i,kF.Aliased)){if(this.config.sqlAliasedBehavior===`sql`&&!i.isSelectionField)return i.sql;let e=i.clone();return e.isSelectionField=!0,e}if(X(i,kF)){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 X(i,FP)?this.config.alias?new Proxy(i,new BF(new Proxy(i.table,new VF(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!=`object`||!i?i:new Proxy(i,new e(this.config))}};function _L(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 vL(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 yL(e){return e}var bL=class{static[Y]=`CasingCache`;cache={};cachedTables={};convert;constructor(e){this.convert=e===`snake_case`?_L:e===`camelCase`?vL:yL}getColumnCasing(e){if(!e.keyAsName)return e.name;let t=e.table[SF.Symbol.Schema]??`public`,n=e.table[SF.Symbol.OriginalName],r=`${t}.${n}.${e.name}`;return this.cache[r]||this.cacheTable(e.table),this.cache[r]}cacheTable(e){let t=e[SF.Symbol.Schema]??`public`,n=e[SF.Symbol.OriginalName],r=`${t}.${n}`;if(!this.cachedTables[r]){for(let t of Object.values(e[SF.Symbol.Columns])){let e=`${r}.${t.name}`;this.cache[e]=this.convert(t.name)}this.cachedTables[r]=!0}}clearCache(){this.cache={},this.cachedTables={}}},xL=class extends zF{static[Y]=`PgViewBase`},SL=class{static[Y]=`PgDialect`;casing;constructor(e){this.casing=new bL(e?.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=Z` + CREATE TABLE IF NOT EXISTS ${Z.identifier(i)}.${Z.identifier(r)} ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at bigint + ) + `;await t.execute(Z`CREATE SCHEMA IF NOT EXISTS ${Z.identifier(i)}`),await t.execute(a);let o=await t.all(Z`select id, hash, created_at from ${Z.identifier(i)}.${Z.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)t[e]!==void 0||n[e]?.onUpdateFn!==void 0),i=r.length;return Z.join(r.flatMap((e,r)=>{let a=n[e],o=t[e]??Z.param(a.onUpdateFn(),a),s=Z`${Z.identifier(this.casing.getColumnCasing(a))} = ${o}`;return r{let i=[];if(X(e,kF.Aliased)&&e.isSelectionField)i.push(Z.identifier(e.fieldAlias));else if(X(e,kF.Aliased)||X(e,kF)){let n=X(e,kF.Aliased)?e.sql:e;t?i.push(new kF(n.queryChunks.map(e=>X(e,XP)?Z.identifier(this.casing.getColumnCasing(e)):e))):i.push(n),X(e,kF.Aliased)&&i.push(Z` as ${Z.identifier(e.fieldAlias)}`)}else X(e,FP)&&(t?i.push(Z.identifier(this.casing.getColumnCasing(e))):i.push(e));return ro?.some(({alias:t})=>t===(e[SF.Symbol.IsAlias]?CF(e):e[SF.Symbol.BaseName])))(e.field.table)){let t=CF(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?Z` distinct`:Z` distinct on (${Z.join(f.on,Z`, `)})`);let v=this.buildSelection(m,{isSingleTable:h}),y=this.buildFromTable(a),b=this.buildJoins(o),x=r?Z` where ${r}`:void 0,S=i?Z` having ${i}`:void 0,C;s&&s.length>0&&(C=Z` order by ${Z.join(s,Z`, `)}`);let w;c&&c.length>0&&(w=Z` group by ${Z.join(c,Z`, `)}`);let T=typeof l==`object`||typeof l==`number`&&l>=0?Z` limit ${l}`:void 0,E=u?Z` offset ${u}`:void 0,D=Z.empty();if(d){let e=Z` for ${Z.raw(d.strength)}`;d.config.of&&e.append(Z` of ${Z.join(Array.isArray(d.config.of)?d.config.of:[d.config.of],Z`, `)}`),d.config.noWait?e.append(Z` nowait`):d.config.skipLocked&&e.append(Z` skip locked`),D.append(e)}let O=Z`${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=Z`(${e.getSQL()}) `,c=Z`(${r.getSQL()})`,l;if(a&&a.length>0){let e=[];for(let t of a)if(X(t,XP))e.push(Z.identifier(t.name));else if(X(t,kF)){for(let e=0;e=0?Z` limit ${i}`:void 0,d=Z.raw(`${t} ${n?`all `:``}`),f=o?Z` offset ${o}`:void 0;return Z`${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[SF.Symbol.Columns],l=Object.entries(c).filter(([e,t])=>!t.shouldDisableInsert()),u=l.map(([,e])=>Z.identifier(this.casing.getColumnCasing(e)));if(a){let e=t;X(e,kF)?s.push(e):s.push(e.getSQL())}else{let e=t;s.push(Z.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||X(i,FF)&&i.value===void 0)if(t.defaultFn!==void 0){let e=t.defaultFn(),n=X(e,kF)?e:Z.param(e,t);r.push(n)}else if(!t.default&&t.onUpdateFn!==void 0){let e=t.onUpdateFn(),n=X(e,kF)?e:Z.param(e,t);r.push(n)}else r.push(Z`default`);else r.push(i)}s.push(r),t({dbKey:t.name,tsKey:e,field:WF(t,o),relationTableTsKey:void 0,isJson:!1,selection:[]}))}else{let r=Object.fromEntries(Object.entries(i.columns).map(([e,t])=>[e,WF(t,o)]));if(a.where){let e=typeof a.where==`function`?a.where(r,cL()):a.where;p=e&&KF(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=>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:Z}):a.extras;for(let[e,t]of Object.entries(g))s.push({tsKey:e,value:GF(t,o)})}for(let{tsKey:e,value:t}of s)l.push({dbKey:X(t,kF.Aliased)?t.fieldAlias:i.columns[e].name,tsKey:e,field:X(t,FP)?WF(t,o):t,relationTableTsKey:void 0,isJson:!1,selection:[]});let _=typeof a.orderBy==`function`?a.orderBy(r,lL()):a.orderBy??[];Array.isArray(_)||(_=[_]),f=_.map(e=>X(e,FP)?WF(e,o):KF(e,o)),u=a.limit,d=a.offset;for(let{tsKey:r,queryConfig:i,relation:a}of h){let s=pL(t,n,a),c=wF(a.referencedTable),u=n[c],d=`${o}_${r}`,f=LI(...s.fields.map((e,t)=>FI(WF(s.references[t],d),WF(e,o)))),p=this.buildRelationalQueryWithoutPK({fullSchema:e,schema:t,tableNamesMap:n,table:e[u],tableConfig:t[u],queryConfig:X(a,oL)?i===!0?{limit:1}:{...i,limit:1}:i,tableAlias:d,joinOn:f,nestedQueryRelation:a}),h=Z`${Z.identifier(d)}.${Z.identifier(`data`)}`.as(r);m.push({on:Z`true`,table:new sF(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 qF({message:`No fields selected for table "${i.tsName}" ("${o}")`});let h;if(p=LI(c,p),s){let e=Z`json_build_array(${Z.join(l.map(({field:e,tsKey:t,isJson:n})=>n?Z`${Z.identifier(`${o}_${t}`)}.${Z.identifier(`data`)}`:X(e,kF.Aliased)?e.sql:e),Z`, `)})`;X(s,sL)&&(e=Z`coalesce(json_agg(${e}${f.length>0?Z` order by ${Z.join(f,Z`, `)}`: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:UF(r,o),fields:{},fieldsFlat:[{path:[],field:Z.raw(`*`)}],where:p,limit:u,offset:d,orderBy:f,setOperators:[]}),p=void 0,u=void 0,d=void 0,f=[]):h=UF(r,o),h=this.buildSelectQuery({table:X(h,jI)?h:new sF(h,{},o),fields:{},fieldsFlat:t.map(({field:e})=>({path:[],field:X(e,FP)?WF(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]})}else h=this.buildSelectQuery({table:UF(r,o),fields:{},fieldsFlat:l.map(({field:e})=>({path:[],field:X(e,FP)?WF(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]});return{tableTsKey:i.tsName,sql:h,selection:l}}},CL=class{static[Y]=`TypedQueryBuilder`;getSelectedFields(){return this._.selectedFields}},wL=class{static[Y]=`PgSelectBuilder`;fields;session;dialect;withList=[];distinct;constructor(e){this.fields=e.fields,this.session=e.session,this.dialect=e.dialect,e.withList&&(this.withList=e.withList),this.distinct=e.distinct}authToken;setToken(e){return this.authToken=e,this}from(e){let t=!!this.fields,n=e,r;return r=this.fields?this.fields:X(n,sF)?Object.fromEntries(Object.keys(n._.selectedFields).map(e=>[e,n[e]])):X(n,xL)?n[pF].selectedFields:X(n,kF)?{}:rI(n),new EL({table:n,fields:r,isPartialSelect:t,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}},TL=class extends CL{static[Y]=`PgSelectQueryBuilder`;_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:e,fields:t,isPartialSelect:n,session:r,dialect:i,withList:a,distinct:o}){super(),this.config={withList:a,table:e,fields:{...t},distinct:o,setOperators:[]},this.isPartialSelect=n,this.session=r,this.dialect=i,this._={selectedFields:t,config:this.config},this.tableName=iI(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{};for(let t of IL(e))this.usedTables.add(t)}getUsedTables(){return[...this.usedTables]}createJoin(e,t){return(n,r)=>{let i=this.tableName,a=iI(n);for(let e of IL(n))this.usedTables.add(e);if(typeof a==`string`&&this.config.joins?.some(e=>e.alias===a))throw Error(`Alias "${a}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof i==`string`&&(this.config.fields={[i]:this.config.fields}),typeof a==`string`&&!X(n,kF))){let e=X(n,sF)?n._.selectedFields:X(n,zF)?n[pF].selectedFields:n[SF.Symbol.Columns];this.config.fields[a]=e}if(typeof r==`function`&&(r=r(new Proxy(this.config.fields,new gL({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:r,table:n,joinType:e,alias:a,lateral:t}),typeof a==`string`)switch(e){case`left`:this.joinsNotNullableMap[a]=!1;break;case`right`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[a]=!0;break;case`cross`:case`inner`:this.joinsNotNullableMap[a]=!0;break;case`full`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[a]=!1;break}return this}}leftJoin=this.createJoin(`left`,!1);leftJoinLateral=this.createJoin(`left`,!0);rightJoin=this.createJoin(`right`,!1);innerJoin=this.createJoin(`inner`,!1);innerJoinLateral=this.createJoin(`inner`,!0);fullJoin=this.createJoin(`full`,!1);crossJoin=this.createJoin(`cross`,!1);crossJoinLateral=this.createJoin(`cross`,!0);createSetOperator(e,t){return n=>{let r=typeof n==`function`?n(OL()):n;if(!eI(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}}union=this.createSetOperator(`union`,!1);unionAll=this.createSetOperator(`union`,!0);intersect=this.createSetOperator(`intersect`,!1);intersectAll=this.createSetOperator(`intersect`,!0);except=this.createSetOperator(`except`,!1);exceptAll=this.createSetOperator(`except`,!0);addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new gL({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.where=e,this}having(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new gL({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 gL({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 gL({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(...IL(this.config.table)),this.config.joins)for(let e of this.config.joins)t.push(...IL(e.table));return new Proxy(new sF(this.getSQL(),this.config.fields,e,!1,[...new Set(t)]),new gL({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`}))}getSelectedFields(){return new Proxy(this.config.fields,new gL({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}},EL=class extends TL{static[Y]=`PgSelect`;_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 fF.startActiveSpan(`drizzle.prepareQuery`,()=>{let n=$F(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)}authToken;setToken(e){return this.authToken=e,this}execute=e=>fF.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))};nI(EL,[QF]);function DL(e,t){return(n,r,...i)=>{let a=[r,...i].map(n=>({type:e,isAll:t,rightSelect:n}));for(let e of a)if(!eI(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 OL=()=>({union:kL,unionAll:AL,intersect:jL,intersectAll:ML,except:NL,exceptAll:PL}),kL=DL(`union`,!1),AL=DL(`union`,!0),jL=DL(`intersect`,!1),ML=DL(`intersect`,!0),NL=DL(`except`,!1),PL=DL(`except`,!0);var FL=class{static[Y]=`PgQueryBuilder`;dialect;dialectConfig;constructor(e){this.dialect=X(e,SL)?e:void 0,this.dialectConfig=X(e,SL)?void 0:e}$with=(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(n)),new Proxy(new cF(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new gL({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};with(...e){let t=this;function n(n){return new wL({fields:n??void 0,session:void 0,dialect:t.getDialect(),withList:e})}function r(e){return new wL({fields:e??void 0,session:void 0,dialect:t.getDialect(),distinct:!0})}function i(e,n){return new wL({fields:n??void 0,session:void 0,dialect:t.getDialect(),distinct:{on:e}})}return{select:n,selectDistinct:r,selectDistinctOn:i}}select(e){return new wL({fields:e??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(e){return new wL({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(e,t){return new wL({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:e}})}getDialect(){return this.dialect||=new SL(this.dialectConfig),this.dialect}};function IL(e){return X(e,jI)?[e[mF]?`${e[mF]}.${e[SF.Symbol.BaseName]}`:e[SF.Symbol.BaseName]]:X(e,sF)?e._.usedTables??[]:X(e,kF)?e.usedTables??[]:[]}var LL=class extends QF{constructor(e,t,n,r){super(),this.session=t,this.dialect=n,this.config={table:e,withList:r}}static[Y]=`PgDelete`;config;cacheConfig;where(e){return this.config.where=e,this}returning(e=this.config.table[SF.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=$F(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return fF.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`delete`,tables:IL(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>fF.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new gL({alias:CF(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},RL=class{constructor(e,t,n,r,i){this.table=e,this.session=t,this.dialect=n,this.withList=r,this.overridingSystemValue_=i}static[Y]=`PgInsertBuilder`;authToken;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[SF.Symbol.Columns];for(let r of Object.keys(e)){let i=e[r];t[r]=X(i,kF)?i:new FF(i,n[r])}return t});return new zL(this.table,t,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(e){let t=typeof e==`function`?e(new FL):e;if(!X(t,kF)&&!eI(this.table[hF],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 zL(this.table,t,this.session,this.dialect,this.withList,!0)}},zL=class extends QF{constructor(e,t,n,r,i,a,o){super(),this.session=n,this.dialect=r,this.config={table:e,values:t,withList:i,select:a,overridingSystemValue_:o}}static[Y]=`PgInsert`;config;cacheConfig;returning(e=this.config.table[SF.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=$F(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=Z`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?Z` where ${e.where}`:void 0;this.config.onConflict=Z`(${Z.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?Z` where ${e.where}`:void 0,n=e.targetWhere?Z` where ${e.targetWhere}`:void 0,r=e.setWhere?Z` where ${e.setWhere}`:void 0,i=this.dialect.buildUpdateSet(this.config.table,tI(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=Z`(${Z.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 fF.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`insert`,tables:IL(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>fF.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new gL({alias:CF(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},BL=class extends QF{constructor(e,t,n){super(),this.session=t,this.dialect=n,this.config={view:e}}static[Y]=`PgRefreshMaterializedView`;config;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 fF.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>fF.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))},VL=class{constructor(e,t,n,r){this.table=e,this.session=t,this.dialect=n,this.withList=r}static[Y]=`PgUpdateBuilder`;authToken;setToken(e){return this.authToken=e,this}set(e){return new HL(this.table,tI(this.table,e),this.session,this.dialect,this.withList).setToken(this.authToken)}},HL=class extends QF{constructor(e,t,n,r,i){super(),this.session=n,this.dialect=r,this.config={set:t,table:e,withList:i,joins:[]},this.tableName=iI(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{}}static[Y]=`PgUpdate`;config;tableName;joinsNotNullableMap;cacheConfig;from(e){let t=e,n=iI(t);return typeof n==`string`&&(this.joinsNotNullableMap[n]=!0),this.config.from=t,this}getTableLikeFields(e){return X(e,jI)?e[SF.Symbol.Columns]:X(e,sF)?e._.selectedFields:e[pF].selectedFields}createJoin(e){return(t,n)=>{let r=iI(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&&!X(this.config.from,kF)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[SF.Symbol.Columns],new gL({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})),e&&new Proxy(e,new gL({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}}leftJoin=this.createJoin(`left`);rightJoin=this.createJoin(`right`);innerJoin=this.createJoin(`inner`);fullJoin=this.createJoin(`full`);where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[SF.Symbol.Columns]),this.config.from)){let t=iI(this.config.from);if(typeof t==`string`&&this.config.from&&!X(this.config.from,kF)){let n=this.getTableLikeFields(this.config.from);e[t]=n}for(let t of this.config.joins){let n=iI(t.table);if(typeof n==`string`&&!X(t.table,kF)){let r=this.getTableLikeFields(t.table);e[n]=r}}}return this.config.returningFields=e,this.config.returning=$F(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:IL(this.config.table)},this.cacheConfig);return t.joinsNotNullableMap=this.joinsNotNullableMap,t}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>this._prepare().execute(e,this.authToken);getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new gL({alias:CF(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},UL=class e extends kF{constructor(t){super(e.buildEmbeddedCount(t.source,t.filters).queryChunks),this.params=t,this.mapWith(Number),this.session=t.session,this.sql=e.buildCount(t.source,t.filters)}sql;token;static[Y]=`PgCountBuilder`;[Symbol.toStringTag]=`PgCountBuilder`;session;static buildEmbeddedCount(e,t){return Z`(select count(*) from ${e}${Z.raw(` where `).if(t)}${t})`}static buildCount(e,t){return Z`select count(*) as count from ${e}${Z.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})}},WL=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}static[Y]=`PgRelationalQueryBuilder`;findMany(e){return new GL(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},`many`)}findFirst(e){return new GL(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},`first`)}},GL=class extends QF{constructor(e,t,n,r,i,a,o,s,c){super(),this.fullSchema=e,this.schema=t,this.tableNamesMap=n,this.table=r,this.tableConfig=i,this.dialect=a,this.session=o,this.config=s,this.mode=c}static[Y]=`PgRelationalQuery`;_prepare(e){return fF.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=>hL(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}authToken;setToken(e){return this.authToken=e,this}execute(){return fF.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(void 0,this.authToken))}},KL=class extends QF{constructor(e,t,n,r){super(),this.execute=e,this.sql=t,this.query=n,this.mapBatchResult=r}static[Y]=`PgRaw`;getSQL(){return this.sql}getQuery(){return this.query}mapResult(e,t){return t?this.mapBatchResult(e):e}_prepare(){return this}isResponseInArrayMode(){return!1}},qL=class{constructor(e,t,n){if(this.dialect=e,this.session=t,this._=n?{schema:n.schema,fullSchema:n.fullSchema,tableNamesMap:n.tableNamesMap,session:t}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:t},this.query={},this._.schema)for(let[r,i]of Object.entries(this._.schema))this.query[r]=new WL(n.fullSchema,this._.schema,this._.tableNamesMap,n.fullSchema[r],i,e,t);this.$cache={invalidate:async e=>{}}}static[Y]=`PgDatabase`;query;$with=(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(new FL(n.dialect))),new Proxy(new cF(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new gL({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};$count(e,t){return new UL({source:e,filters:t,session:this.session})}$cache;with(...e){let t=this;function n(n){return new wL({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e})}function r(n){return new wL({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:!0})}function i(n,r){return new wL({fields:r??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:{on:n}})}function a(n){return new VL(n,t.session,t.dialect,e)}function o(n){return new RL(n,t.session,t.dialect,e)}function s(n){return new LL(n,t.session,t.dialect,e)}return{select:n,selectDistinct:r,selectDistinctOn:i,update:a,insert:o,delete:s}}select(e){return new wL({fields:e??void 0,session:this.session,dialect:this.dialect})}selectDistinct(e){return new wL({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(e,t){return new wL({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:{on:e}})}update(e){return new VL(e,this.session,this.dialect)}insert(e){return new RL(e,this.session,this.dialect)}delete(e){return new LL(e,this.session,this.dialect)}refreshMaterializedView(e){return new BL(e,this.session,this.dialect)}authToken;execute(e){let t=typeof e==`string`?Z.raw(e):e.getSQL(),n=this.dialect.sqlToQuery(t),r=this.session.prepareQuery(n,void 0,void 0,!1);return new KL(()=>r.execute(void 0,this.authToken),t,n,e=>r.mapResult(e,!0))}transaction(e,t){return this.session.transaction(e,t)}},JL=class{static[Y]=`Cache`},YL=class extends JL{strategy(){return`all`}static[Y]=`NoopCache`;async get(e){}async put(e,t,n,r){}async onMutate(e){}};async function XL(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 ZL=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)}},QL=class{constructor(e,t,n,r){this.query=e,this.cache=t,this.queryMetadata=n,this.cacheConfig=r,t&&t.strategy()===`all`&&r===void 0&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),this.cacheConfig?.enable||(this.cacheConfig=void 0)}authToken;getQuery(){return this.query}mapResult(e,t){return e}setToken(e){return this.authToken=e,this}static[Y]=`PgPreparedQuery`;joinsNotNullableMap;async queryWithCache(e,t,n){if(this.cache===void 0||X(this.cache,YL)||this.queryMetadata===void 0)try{return await n()}catch(n){throw new ZL(e,t,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await n()}catch(n){throw new ZL(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 ZL(e,t,n)}if(!this.cacheConfig)try{return await n()}catch(n){throw new ZL(e,t,n)}if(this.queryMetadata.type===`select`){let r=await this.cache.get(this.cacheConfig.tag??await XL(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 ZL(e,t,n)}return await this.cache.put(this.cacheConfig.tag??await XL(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 ZL(e,t,n)}}},$L=class{constructor(e){this.dialect=e}static[Y]=`PgSession`;execute(e,t){return fF.startActiveSpan(`drizzle.operation`,()=>{let n=fF.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)}},eR=class extends qL{constructor(e,t,n,r=0){super(e,t,n),this.schema=n,this.nestedIndex=r}static[Y]=`PgTransaction`;rollback(){throw new JF}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`),Z.raw(t.join(` `))}setTransaction(e){return this.session.execute(Z`set transaction ${this.getTransactionConfigSQL(e)}`)}};function tR(e){return typeof e==`string`&&/^true$/i.test(e)}function nR(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&&tR(r)&&(t.logger=!0);let i=n.searchParams.get(`storage`);switch(i){case AP.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:AP.ORIGIN_PRIVATE_FS,path:n.pathname.startsWith(`/`)?n.pathname.slice(1):n.pathname,...e&&tR(e)&&{accessMode:Xw.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var rR=class extends QL{static[Y]=`DuckDBWasmPreparedQuery`;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=LF(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=LF(this.params,e);this.logger.logQuery(this.queryString,t);let n=await this.client;return n.query(this.queryString,t)}},iR=class e extends $L{static[Y]=`DuckDBWasmSession`;logger;constructor(e,t,n,r={}){super(t),this.client=e,this.schema=n,this.options=r,this.logger=r.logger??new ZF}prepareQuery(e,t,n,r,i){return new rR(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(t,n){return MP(this.client,async r=>{let i=new e(r,this.dialect,this.schema,this.options),a=new aR(this.dialect,i,this.schema);return n&&await a.setTransaction(n),t(a)})}},aR=class e extends eR{static[Y]=`DuckDBWasmTransaction`;dialect;session;constructor(e,t,n,r=0){super(e,t,n,r),this.dialect=e,this.session=t}async transaction(t){return NP(this.session.client,``,async n=>{let r=new iR(n,this.dialect,this.schema,this.session.options),i=new e(this.dialect,r,this.schema);return t(i)})}},oR=class extends qL{static[Y]=`DuckDBWasmDatabase`};function sR(e,t={}){let n=new SL({casing:t.casing}),r;t.logger===!0?r=new XF:t.logger!==!1&&(r=t.logger);let i;if(t.schema){let e=uL(t.schema,mL);i={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new iR(e,n,i,{logger:r}),o=new oR(n,a,i);return o.$client=e,o}function cR(e,t){let n=nR(e),r;if(n.bundles===`import-url`){let e=async()=>{let e=await rP();switch(e){case`browser`:return(await x(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-browser-CXhM7gkL.js`);return{getImportUrlBundles:e}},__vite__mapDeps([4,5,6]))).getImportUrlBundles();case`node`:return await(await x(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-node-DcfQpSzu.js`);return{getImportUrlBundles:e}},__vite__mapDeps([7,6]))).getImportUrlBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}else{let e=async()=>{let e=await rP();switch(e){case`browser`:return(await x(async()=>{let{getBundles:e}=await import(`./default-browser-CICL74Rl.js`);return{getBundles:e}},[])).getBundles();case`node`:return await(await x(async()=>{let{getBundles:e}=await import(`./default-node-me4M3cN3.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]))).getBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}return sR(jP({bundles:r,logger:n.logger?new rT:void 0,storage:n.storage}),t)}function lR(...e){if(typeof e[0]==`string`)return cR(e[0],e[1]);if(aI(e[0])){let{connection:t,client:n,...r}=e[0];if(n)return sR(n,r);if(typeof t==`string`)return cR(t,r);if(t===void 0)throw Error(`connection option is required`);return sR(jP({bundles:t.bundles,logger:t.logger,storage:t.storage}),r)}return sR(e[0],e[1])}(function(e){function t(e){return sR({options:{parsers:{},serializers:{}}},e)}e.mock=t})(lR||={});var uR=Object.defineProperty,dR=(e,t,n)=>t in e?uR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fR=(e,t,n)=>dR(e,typeof t==`symbol`?t:t+``,n);function pR(e){return mn()?(Rn(e),!0):!1}function mR(e){return typeof e==`function`?e():K(e)}const hR=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const gR=Object.prototype.toString,_R=e=>gR.call(e)===`[object Object]`,vR=()=>{};function yR(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 bR(e,t={}){let n,r,i=vR,a=e=>{clearTimeout(e),i(),i=vR};return o=>{let s=mR(e),c=mR(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 xR(...e){let t=0,n,r=!0,i=vR,a,o,s,c,l;!Vn(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=vR)};return e=>{let d=mR(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)}}function SR(e){return Mn()}function CR(e,t=200,n={}){return yR(bR(t,n),e)}function wR(e,t=200,n=!1,r=!0,i=!1){return yR(xR(t,n,r,i),e)}function TR(e,t=!0,n){SR()?nn(e,n):t?e():rn(e)}const ER=hR?window:void 0;function DR(e){var t;let n=mR(e);return(t=n?.$el)??n}function OR(...e){let t,n,r,i;if(typeof e[0]==`string`||Array.isArray(e[0])?([n,r,i]=e,t=ER):[t,n,r,i]=e,!t)return vR;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=W(()=>[DR(t),mR(i)],([e,t])=>{if(o(),!e)return;let i=_R(t)?{...t}:t;a.push(...n.flatMap(t=>r.map(n=>s(e,t,n,i))))},{immediate:!0,flush:`post`}),l=()=>{c(),o()};return pR(l),l}function kR(){let e=H(!1),t=Mn();return t&&nn(()=>{e.value=!0},t),e}function AR(e){let t=kR();return jn(()=>(t.value,!!e()))}function jR(e,t={}){let{window:n=ER}=t,r=AR(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),i,a=H(!1),o=e=>{a.value=e.matches},s=()=>{i&&(`removeEventListener`in i?i.removeEventListener(`change`,o):i.removeListener(o))},c=Tn(()=>{r.value&&(s(),i=n.matchMedia(mR(e)),`addEventListener`in i?i.addEventListener(`change`,o):i.addListener(o),a.value=i.matches)});return pR(()=>{c(),s(),i=void 0}),a}function MR(e,t,n={}){let{window:r=ER,...i}=n,a,o=AR(()=>r&&`ResizeObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=jn(()=>{let t=mR(e);return Array.isArray(t)?t.map(e=>DR(e)):[DR(t)]}),l=W(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 pR(u),{isSupported:o,stop:u}}function NR(e,t={width:0,height:0},n={}){let{window:r=ER,box:i=`content-box`}=n,a=jn(()=>{var t,n;return(n=(t=DR(e))?.namespaceURI)?.includes(`svg`)}),o=H(t.width),s=H(t.height),{stop:c}=MR(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=DR(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=Array.isArray(n)?n:[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);TR(()=>{let n=DR(e);n&&(o.value=`offsetWidth`in n?n.offsetWidth:t.width,s.value=`offsetHeight`in n?n.offsetHeight:t.height)});let l=W(()=>DR(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}}const PR=1;function FR(e,t={}){let{throttle:n=0,idle:r=200,onStop:i=vR,onScroll:a=vR,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:s={capture:!1,passive:!0},behavior:c=`auto`,window:l=ER,onError:u=e=>{console.error(e)}}=t,d=H(0),f=H(0),p=jn({get(){return d.value},set(e){h(e,void 0)}}),m=jn({get(){return f.value},set(e){h(void 0,e)}});function h(t,n){var r,i,a,o;if(!l)return;let s=mR(e);if(!s)return;(a=s instanceof Document?l.document.body:s)==null||a.scrollTo({top:(r=mR(n))??m.value,left:(i=mR(t))??p.value,behavior:mR(c)});let u=(o=s?.document)?.documentElement||s?.documentElement||s;p!=null&&(d.value=u.scrollLeft),m!=null&&(f.value=u.scrollTop)}let g=H(!1),_=Ln({left:!0,right:!1,top:!0,bottom:!1}),v=Ln({left:!1,right:!1,top:!1,bottom:!1}),y=e=>{g.value&&(g.value=!1,v.left=!1,v.right=!1,v.top=!1,v.bottom=!1,i(e))},b=CR(y,n+r),x=e=>{var t;if(!l)return;let n=(t=e?.document)?.documentElement||e?.documentElement||DR(e),{display:r,flexDirection:i}=getComputedStyle(n),a=n.scrollLeft;v.left=ad.value;let s=Math.abs(a)<=(o.left||0),c=Math.abs(a)+n.clientWidth>=n.scrollWidth-(o.right||0)-PR;r===`flex`&&i===`row-reverse`?(_.left=c,_.right=s):(_.left=s,_.right=c),d.value=a;let u=n.scrollTop;e===l.document&&!u&&(u=l.document.body.scrollTop),v.top=uf.value;let p=Math.abs(u)<=(o.top||0),m=Math.abs(u)+n.clientHeight>=n.scrollHeight-(o.bottom||0)-PR;r===`flex`&&i===`column-reverse`?(_.top=m,_.bottom=p):(_.top=p,_.bottom=m),f.value=u},S=e=>{var t;if(!l)return;let n=(t=e.target.documentElement)??e.target;x(n),g.value=!0,b(e),a(e)};return OR(e,`scroll`,n?wR(S,n,!0,!1):S,s),TR(()=>{try{let t=mR(e);if(!t)return;x(t)}catch(e){u(e)}}),OR(e,`scrollend`,y,s),{x:p,y:m,isScrolling:g,arrivedState:_,directions:v,measure(){let t=mR(e);l&&t&&x(t)}}}const IR={ctrl:`control`,command:`meta`,cmd:`meta`,option:`alt`,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`};function LR(e={}){let{reactive:t=!1,target:n=ER,aliasMap:r=IR,passive:i=!0,onEventFired:a=vR}=e,o=Ln(new Set),s={toJSON(){return{}},current:o},c=t?Ln(s):s,l=new Set,u=new Set;function d(e,n){e in c&&(t?c[e]=n:c[e].value=n)}function f(){o.clear();for(let e of u)d(e,!1)}function p(e,t){var n,r;let i=(n=e.key)?.toLowerCase(),a=[(r=e.code)?.toLowerCase(),i].filter(Boolean);i&&(t?o.add(i):o.delete(i));for(let e of a)u.add(e),d(e,t);i===`meta`&&!t?(l.forEach(e=>{o.delete(e),d(e,!1)}),l.clear()):typeof e.getModifierState==`function`&&e.getModifierState(`Meta`)&&t&&[...o,...a].forEach(e=>l.add(e))}OR(n,`keydown`,e=>(p(e,!0),a(e)),{passive:i}),OR(n,`keyup`,e=>(p(e,!1),a(e)),{passive:i}),OR(`blur`,f,{passive:!0}),OR(`focus`,f,{passive:!0});let m=new Proxy(c,{get(e,n,i){if(typeof n!=`string`)return Reflect.get(e,n,i);if(n=n.toLowerCase(),n in r&&(n=r[n]),!(n in c))if(/[+_-]/.test(n)){let e=n.split(/[+_-]/g).map(e=>e.trim());c[n]=jn(()=>e.every(e=>mR(m[e])))}else c[n]=H(!1);let a=Reflect.get(e,n,i);return t?mR(a):a}});return m}const RR={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof Touch?null:[e.movementX,e.movementY]};function zR(e={}){let{type:t=`page`,touch:n=!0,resetOnTouchEnds:r=!1,initialValue:i={x:0,y:0},window:a=ER,target:o=a,scroll:s=!0,eventFilter:c}=e,l=null,u=0,d=0,f=H(i.x),p=H(i.y),m=H(null),h=typeof t==`function`?t:RR[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};OR(o,[`mousemove`,`dragover`],b,e),n&&t!==`movement`&&(OR(o,[`touchstart`,`touchmove`],x,e),r&&OR(o,`touchend`,y,e)),s&&t===`page`&&OR(a,`scroll`,S,{passive:!0})}return{x:f,y:p,sourceType:m}}function BR(e={}){let{window:t=ER,behavior:n=`auto`}=e;if(!t)return{x:H(0),y:H(0)};let r=H(t.scrollX),i=H(t.scrollY),a=jn({get(){return r.value},set(e){scrollTo({left:e,behavior:n})}}),o=jn({get(){return i.value},set(e){scrollTo({top:e,behavior:n})}});return OR(t,`scroll`,()=>{r.value=t.scrollX,i.value=t.scrollY},{capture:!1,passive:!0}),{x:a,y:o}}function VR(e={}){let{window:t=ER,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=H(n),c=H(r),l=()=>{t&&(o===`outer`?(s.value=t.outerWidth,c.value=t.outerHeight):a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight))};if(l(),TR(l),OR(`resize`,l,{passive:!0}),i){let e=jR(`(orientation: portrait)`);W(e,()=>l())}return{width:s,height:c}}function HR(e){let{resolution:t,renderer:n,scene:r,envMap:i,fog:a,near:o,far:s}=e;n??=P().renderer,r??=P().scene,Tn(()=>{t=Bn(e.resolution)??255,o=Bn(e.near)??.1,s=Bn(e.far)??1e3,i=Bn(e.envMap)??void 0,a=Bn(e.fog)??void 0,n=Bn(e.renderer)??n,r=Bn(e.scene)??r});let c=jn(()=>new Ze(Bn(t)));c.value.texture.type=it,pR(()=>{c.value.dispose()});let l=jn(()=>new _e(Bn(o),Bn(s),Bn(c))),u=()=>{let e=Bn(r),t=e.fog,o=e.background;e.background=Bn(i)||o,e.fog=Bn(a)||t,l.value.update(Bn(n),e),e.fog=t,e.background=o};return Tn(u),{fbo:c,camera:l,update:u}}const UR=[`object`],WR=an({__name:`component`,props:{frames:{default:1/0},resolution:{},near:{},far:{},envMap:{},fog:{},renderer:{},scene:{}},setup(e,{expose:t}){let n=e,r=dn(),{fbo:i,camera:a,update:o}=HR(n),s=0;return F().onBeforeRender(()=>{r.value&&(n.frames===1/0||s{`material`in e&&typeof e.material==`object`&&e.material&&`envMap`in e.material&&(e.material.envMap=i.value.texture)}),s++)}),t({instance:r,fbo:i,camera:a,update:o}),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`groupRef`,ref:r},[U(`primitive`,{object:K(a)},null,8,UR),Dn(e.$slots,`default`)],512))}}),GR=an({__name:`Billboard`,props:{autoUpdate:{type:Boolean,default:!0},lockX:{type:Boolean,default:!1},lockY:{type:Boolean,default:!1},lockZ:{type:Boolean,default:!1}},setup(e,{expose:t}){let n=e,r=dn(new yt),i=dn(new yt),a=new Je,o=new It;function s(e){r.value&&(!e&&(e=P().camera.value,!e)||(i.value.rotation.copy(o),r.value.updateMatrix(),r.value.updateWorldMatrix(!1,!1),r.value.getWorldQuaternion(a),e.getWorldQuaternion(i.value.quaternion).premultiply(a.invert()),n.lockX&&(i.value.rotation.x=o.x),n.lockY&&(i.value.rotation.y=o.y),n.lockZ&&(i.value.rotation.z=o.z)))}return F().onBeforeRender(({camera:e})=>{n.autoUpdate&&s(e)}),t({instance:r,update:s}),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`outerRef`,ref:r},[U(`TresGroup`,{ref_key:`innerRef`,ref:i},[Dn(e.$slots,`default`)],512)],512))}}),KR=an({name:`GlobalAudio`,props:[`src`,`loop`,`volume`,`playbackRate`,`playTrigger`,`stopTrigger`],async setup(e,{expose:t,emit:n}){var r;let{camera:i,renderer:a}=ke(),o=new lt;(r=i.value)==null||r.add(o);let s=new Re(o),c=new ge;t({instance:s}),un(()=>{s&&s.disconnect()}),W(()=>[e.playbackRate],()=>s.setPlaybackRate(e.playbackRate??1),{immediate:!0}),W(()=>[e.volume],()=>s.setVolume(e.volume??.5),{immediate:!0}),W(()=>[e.loop],()=>s.setLoop(e.loop??!1),{immediate:!0}),W(()=>[e.src],async()=>{let t=await c.loadAsync(e.src);s.setBuffer(t)},{immediate:!0});let l=document.getElementById(e.playTrigger??``)||a.value.domElement;OR(l,`click`,()=>{s.isPlaying?s.pause():s.play(),n(`isPlaying`,s.isPlaying)});let u=document.getElementById(e.stopTrigger??``);return u&&OR(u,`click`,()=>{s.stop(),n(`isPlaying`,s.isPlaying)}),null}}),qR=[`color-space`,`args`,`attach`],JR=an({__name:`GradientTexture`,props:{stops:{},colors:{},attach:{default:`map`},height:{default:1024},width:{default:16},type:{default:`linear`},innerCircleRadius:{default:0},outerCircleRadius:{default:`auto`}},setup(e,{expose:t}){let n=e,r=dn(),i=document.createElement(`canvas`);function a(e){let t=e.getContext(`2d`);e.width=n.width,e.height=n.height;let i;if(n.type===`linear`)i=t.createLinearGradient(0,0,0,n.height);else{let r=e.width/2,a=e.height/2,o=n.outerCircleRadius===`auto`?Math.sqrt(r**2+a**2):Math.abs(Number(n.outerCircleRadius));i=t.createRadialGradient(r,a,Math.abs(n.innerCircleRadius),r,a,o)}let a=new _t,o=n.stops.length;for(;o--;)i.addColorStop(n.stops[o],a.set(n.colors[o]).getStyle());t.save(),t.fillStyle=i,t.fillRect(0,0,n.width,n.height),t.restore(),r.value&&(r.value.needsUpdate=!0)}let o=P().renderer;return W(()=>[n.colors,n.stops,n.height,n.width,n.type,n.innerCircleRadius,n.outerCircleRadius],()=>{a(i)},{immediate:!0}),fn(n.colors)&&W(n.colors,()=>a(i)),fn(n.stops)&&W(n.stops,()=>a(i)),t({instance:r}),(e,t)=>(G(),cn(`TresCanvasTexture`,{ref_key:`textureRef`,ref:r,"color-space":K(o).outputColorSpace,args:[K(i)],attach:n.attach},null,8,qR))}});function YR(e,t,n,r){let i=class extends Xe{constructor(r={}){let i=Object.entries(e);super({uniforms:i.reduce((e,[t,n])=>{let r=Le.clone({[t]:{value:n}});return{...e,...r}},{}),vertexShader:t,fragmentShader:n}),fR(this,`key`,``),i.forEach(([e])=>Object.defineProperty(this,e,{get:()=>this.uniforms[e].value,set:t=>this.uniforms[e].value=t})),Object.assign(this,r)}};return i.key=fe.generateUUID(),i}const XR=YR({color:new _t(`white`),scale:new ve(1,1),imageBounds:new ve(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` + varying vec2 vUv; + varying vec2 vPos; + void main() { + gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.); + vUv = uv; + vPos = position.xy; + } + `,` + // mostly from https://gist.github.com/statico/df64c5d167362ecf7b34fca0b1459a44 + varying vec2 vUv; + varying vec2 vPos; + uniform vec2 scale; + uniform vec2 imageBounds; + uniform float resolution; + uniform vec3 color; + uniform sampler2D map; + uniform float radius; + uniform float zoom; + uniform float grayscale; + uniform float opacity; + const vec3 luma = vec3(.299, 0.587, 0.114); + vec4 toGrayscale(vec4 color, float intensity) { + return vec4(mix(color.rgb, vec3(dot(color.rgb, luma)), intensity), color.a); + } + vec2 aspect(vec2 size) { + return size / min(size.x, size.y); + } + + const float PI = 3.14159265; + + // from https://iquilezles.org/articles/distfunctions + float udRoundBox( vec2 p, vec2 b, float r ) { + return length(max(abs(p)-b+r,0.0))-r; + } + + void main() { + vec2 s = aspect(scale); + vec2 i = aspect(imageBounds); + float rs = s.x / s.y; + float ri = i.x / i.y; + vec2 new = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, i.y * s.x / i.x); + vec2 offset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new; + vec2 uv = vUv * s / new + offset; + vec2 zUv = (uv - vec2(0.5, 0.5)) / zoom + vec2(0.5, 0.5); + + vec2 res = vec2(scale * resolution); + vec2 halfRes = 0.5 * res; + float b = udRoundBox(vUv.xy * res - halfRes, halfRes, resolution * radius); + vec3 a = mix(vec3(1.0,0.0,0.0), vec3(0.0,0.0,0.0), smoothstep(0.0, 1.0, b)); + gl_FragColor = toGrayscale(texture2D(map, zUv) * vec4(color, opacity * a), grayscale); + + #include + #include + } + `),ZR=an({__name:`ImageMaterial`,setup(e,{expose:t}){De({ImageMaterial:XR});let n=dn();return t({instance:n}),(e,t)=>(G(),cn(`TresImageMaterial`,{ref_key:`materialRef`,ref:n},null,512))}}),QR=[`scale`],$R=[`args`],ez=an({__name:`component`,props:{segments:{default:1},scale:{default:1},color:{default:()=>new _t(`white`)},zoom:{default:1},radius:{default:0},grayscale:{default:0},toneMapped:{type:Boolean,default:!0},transparent:{type:Boolean,default:!1},opacity:{default:1},side:{default:nt},texture:{},url:{}},setup(e,{expose:t}){let n=e,r=dn(),i=dn(n.texture??null),a=P().sizes,o=jn(()=>Array.isArray(n.scale)?[n.scale[0],n.scale[1]]:[n.scale,n.scale]),s=jn(()=>{var e,t;return[(e=i.value)?.image.width??0,(t=i.value)?.image.height??0]}),c=jn(()=>Math.max(a.width.value,a.height.value));Tn(()=>{n.texture?i.value=n.texture:I([n.url]).then(e=>i.value=e)});let l=jn(()=>Array.isArray(n.scale)?[...n.scale,1]:n.scale);return t({instance:r}),(e,t)=>(G(),cn(`TresMesh`,{ref_key:`imageRef`,ref:r,scale:l.value},[Dn(e.$slots,`default`,{},()=>[U(`TresPlaneGeometry`,{args:[1,1,n.segments,n.segments]},null,8,$R)]),Fn(ZR,{color:n.color,map:i.value,zoom:n.zoom,grayscale:n.grayscale,opacity:n.opacity,scale:o.value,imageBounds:s.value,resolution:c.value,radius:e.radius,toneMapped:e.toneMapped,transparent:e.transparent,side:e.side},null,8,[`color`,`map`,`zoom`,`grayscale`,`opacity`,`scale`,`imageBounds`,`resolution`,`radius`,`toneMapped`,`transparent`,`side`])],8,QR))}}),tz=parseInt(Fe.replace(/\D+/g,``)),nz=tz>=125?`uv1`:`uv2`;function rz(e,t=Math.PI/3){let n=Math.cos(t),r=1.0000000001*100,i=[new V,new V,new V],a=new V,o=new V,s=new V,c=new V;function l(e){let t=~~(e.x*r),n=~~(e.y*r),i=~~(e.z*r);return`${t},${n},${i}`}let u=e.index?e.toNonIndexed():e,d=u.attributes.position,f={};for(let e=0,t=d.count/3;en&&c.add(t)}c.normalize(),m.setXYZ(t+e,c.x,c.y,c.z)}}return u.setAttribute(`normal`,m),u}var iz=Object.defineProperty,az=(e,t,n)=>t in e?iz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oz=(e,t,n)=>(az(e,t+``,n),n);async function sz(e){let t=await e.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(t)));return`data:${e.type||``};base64,${n}`}let cz,lz,uz,dz;function fz(e,t=1/0,n=null){lz||=new Et(2,2,1,1),uz||=new Xe({uniforms:{blitTexture:new en(e)},vertexShader:` + varying vec2 vUv; + void main(){ + vUv = uv; + gl_Position = vec4(position.xy * 1.0,0.,.999999); + } + `,fragmentShader:` + uniform sampler2D blitTexture; + varying vec2 vUv; + + void main(){ + gl_FragColor = vec4(vUv.xy, 0, 1); + + #ifdef IS_SRGB + gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) ); + #else + gl_FragColor = texture2D( blitTexture, vUv); + #endif + } + `}),uz.uniforms.blitTexture.value=e,uz.defines.IS_SRGB=`colorSpace`in e?e.colorSpace===`srgb`:e.encoding===3001,uz.needsUpdate=!0,dz||(dz=new be(lz,uz),dz.frustrumCulled=!1);let r=new wt,i=new ye;i.add(dz),n||=cz=new Me({antialias:!1}),n.setSize(Math.min(e.image.width,t),Math.min(e.image.height,t)),n.clear(),n.render(i,r);let a=new se(n.domElement);return a.minFilter=e.minFilter,a.magFilter=e.magFilter,a.wrapS=e.wrapS,a.wrapT=e.wrapT,a.name=e.name,cz&&(cz.dispose(),cz=null),a}const pz={POSITION:[`byte`,`byte normalized`,`unsigned byte`,`unsigned byte normalized`,`short`,`short normalized`,`unsigned short`,`unsigned short normalized`],NORMAL:[`byte normalized`,`short normalized`],TANGENT:[`byte normalized`,`short normalized`],TEXCOORD:[`byte`,`byte normalized`,`unsigned byte`,`short`,`short normalized`,`unsigned short`]};var mz=class{constructor(){this.pluginCallbacks=[],this.register(function(e){return new Fz(e)}),this.register(function(e){return new Iz(e)}),this.register(function(e){return new zz(e)}),this.register(function(e){return new Bz(e)}),this.register(function(e){return new Vz(e)}),this.register(function(e){return new Hz(e)}),this.register(function(e){return new Lz(e)}),this.register(function(e){return new Rz(e)}),this.register(function(e){return new Uz(e)}),this.register(function(e){return new Wz(e)}),this.register(function(e){return new Gz(e)})}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let i=new Pz,a=[];for(let e=0,t=this.pluginCallbacks.length;ee.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-t)<.001)return e.times.length-1;r[r.length-1]=t,r.set(e.times,0),i.set(e.values,0),i.set(a.evaluate(t),e.values.length),o=r.length-1}else for(let s=0;st){r.set(e.times.slice(0,s+1),0),r[s+1]=t,r.set(e.times.slice(s+1),s+2),i.set(e.values.slice(0,(s+1)*n),0),i.set(a.evaluate(t),(s+1)*n),i.set(e.values.slice((s+1)*n),(s+2)*n),o=s+1;break}}return e.times=r,e.values=i,o},mergeMorphTargetTracks:function(e,t){let n=[],r={},i=e.tracks;for(let e=0;e4?n=e.array[i*e.itemSize+t]:(t===0?n=e.getX(i):t===1?n=e.getY(i):t===2?n=e.getZ(i):t===3&&(n=e.getW(i)),e.normalized===!0&&(n=fe.normalize(n,e.array))),r.min[t]=Math.min(r.min[t],n),r.max[t]=Math.max(r.max[t],n)}return r}function Az(e){return Math.ceil(e/4)*4}function jz(e,t=0){let n=Az(e.byteLength);if(n!==e.byteLength){let r=new Uint8Array(n);if(r.set(new Uint8Array(e)),t!==0)for(let i=e.byteLength;i`u`&&typeof OffscreenCanvas<`u`?new OffscreenCanvas(1,1):document.createElement(`canvas`)}function Nz(e,t){if(e.toBlob!==void 0)return new Promise(n=>e.toBlob(n,t));let n;return t===`image/jpeg`?n=.92:t===`image/webp`&&(n=.8),e.convertToBlob({type:t,quality:n})}var Pz=class{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:`2.0`,generator:`THREE.GLTFExporter`}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,t,n={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},n),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);let r=this,i=r.buffers,a=r.json;n=r.options;let o=r.extensionsUsed,s=r.extensionsRequired,c=new Blob(i,{type:`application/octet-stream`}),l=Object.keys(o),u=Object.keys(s);l.length>0&&(a.extensionsUsed=l),u.length>0&&(a.extensionsRequired=u),a.buffers&&a.buffers.length>0&&(a.buffers[0].byteLength=c.size),n.binary===!0?c.arrayBuffer().then(e=>{let n=jz(e),r=new DataView(new ArrayBuffer(Cz));r.setUint32(0,n.byteLength,!0),r.setUint32(4,Tz,!0);let i=jz(Dz(JSON.stringify(a)),32),o=new DataView(new ArrayBuffer(Cz));o.setUint32(0,i.byteLength,!0),o.setUint32(4,wz,!0);let s=new ArrayBuffer(bz),c=new DataView(s);c.setUint32(0,xz,!0),c.setUint32(4,Sz,!0);let l=bz+o.byteLength+i.byteLength+r.byteLength+n.byteLength;c.setUint32(8,l,!0),new Blob([s,o,i,r,n],{type:`application/octet-stream`}).arrayBuffer().then(t)}):a.buffers&&a.buffers.length>0?sz(c).then(e=>{a.buffers[0].uri=e,t(a)}):t(a)}serializeUserData(e,t){if(Object.keys(e.userData).length===0)return;let n=this.options,r=this.extensionsUsed;try{let i=JSON.parse(JSON.stringify(e.userData));if(n.includeCustomExtensions&&i.gltfExtensions){for(let e in t.extensions===void 0&&(t.extensions={}),i.gltfExtensions)t.extensions[e]=i.gltfExtensions[e],r[e]=!0;delete i.gltfExtensions}Object.keys(i).length>0&&(t.extras=i)}catch(t){console.warn(`THREE.GLTFExporter: userData of '`+e.name+`' won't be serialized because of JSON.stringify error - `+t.message)}}getUID(e,t=!1){if(this.uids.has(e)===!1){let t=new Map;t.set(!0,this.uid++),t.set(!1,this.uid++),this.uids.set(e,t)}return this.uids.get(e).get(t)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;let t=new V;for(let n=0,r=e.count;n5e-4)return!1;return!0}createNormalizedNormalAttribute(e){let t=this.cache;if(t.attributesNormalized.has(e))return t.attributesNormalized.get(e);let n=e.clone(),r=new V;for(let e=0,t=n.count;e4?r=e.array[i*e.itemSize+n]:(n===0?r=e.getX(i):n===1?r=e.getY(i):n===2?r=e.getZ(i):n===3&&(r=e.getW(i)),e.normalized===!0&&(r=fe.normalize(r,e.array))),t===hz.FLOAT?c.setFloat32(l,r,!0):t===hz.INT?c.setInt32(l,r,!0):t===hz.UNSIGNED_INT?c.setUint32(l,r,!0):t===hz.SHORT?c.setInt16(l,r,!0):t===hz.UNSIGNED_SHORT?c.setUint16(l,r,!0):t===hz.BYTE?c.setInt8(l,r):t===hz.UNSIGNED_BYTE&&c.setUint8(l,r),l+=o}let u={buffer:this.processBuffer(c.buffer),byteOffset:this.byteOffset,byteLength:s};return i!==void 0&&(u.target=i),i===hz.ARRAY_BUFFER&&(u.byteStride=e.itemSize*o),this.byteOffset+=s,a.bufferViews.push(u),{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){let t=this,n=t.json;return n.bufferViews||=[],e.arrayBuffer().then(e=>{let r=jz(e),i={buffer:t.processBuffer(r),byteOffset:t.byteOffset,byteLength:r.byteLength};return t.byteOffset+=r.byteLength,n.bufferViews.push(i)-1})}processAccessor(e,t,n,r){let i=this.json,a={1:`SCALAR`,2:`VEC2`,3:`VEC3`,4:`VEC4`,9:`MAT3`,16:`MAT4`},o;if(e.array.constructor===Float32Array)o=hz.FLOAT;else if(e.array.constructor===Int32Array)o=hz.INT;else if(e.array.constructor===Uint32Array)o=hz.UNSIGNED_INT;else if(e.array.constructor===Int16Array)o=hz.SHORT;else if(e.array.constructor===Uint16Array)o=hz.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)o=hz.BYTE;else if(e.array.constructor===Uint8Array)o=hz.UNSIGNED_BYTE;else throw Error(`THREE.GLTFExporter: Unsupported bufferAttribute component type: `+e.array.constructor.name);if(n===void 0&&(n=0),r===void 0&&(r=e.count),r===0)return null;let s=kz(e,n,r),c;t!==void 0&&(c=e===t.index?hz.ELEMENT_ARRAY_BUFFER:hz.ARRAY_BUFFER);let l=this.processBufferView(e,o,n,r,c),u={bufferView:l.id,byteOffset:l.byteOffset,componentType:o,count:r,max:s.max,min:s.min,type:a[e.itemSize]};return e.normalized===!0&&(u.normalized=!0),i.accessors||=[],i.accessors.push(u)-1}processImage(e,t,n,r=`image/png`){if(e!==null){let i=this,a=i.cache,o=i.json,s=i.options,c=i.pending;a.images.has(e)||a.images.set(e,{});let l=a.images.get(e),u=r+`:flipY/`+n.toString();if(l[u]!==void 0)return l[u];o.images||=[];let d={mimeType:r},f=Mz();f.width=Math.min(e.width,s.maxTextureSize),f.height=Math.min(e.height,s.maxTextureSize);let p=f.getContext(`2d`);if(n===!0&&(p.translate(0,f.height),p.scale(1,-1)),e.data!==void 0){t!==$t&&console.error(`GLTFExporter: Only RGBAFormat is supported.`,t),(e.width>s.maxTextureSize||e.height>s.maxTextureSize)&&console.warn(`GLTFExporter: Image size is bigger than maxTextureSize`,e);let n=new Uint8ClampedArray(e.height*e.width*4);for(let t=0;ti.processBufferViewImage(e)).then(e=>{d.bufferView=e})):f.toDataURL===void 0?c.push(Nz(f,r).then(sz).then(e=>{d.uri=e})):d.uri=f.toDataURL(r);let m=o.images.push(d)-1;return l[u]=m,m}else throw Error(`THREE.GLTFExporter: No valid image data found. Unable to process texture.`)}processSampler(e){let t=this.json;t.samplers||=[];let n={magFilter:_z[e.magFilter],minFilter:_z[e.minFilter],wrapS:_z[e.wrapS],wrapT:_z[e.wrapT]};return t.samplers.push(n)-1}processTexture(e){let t=this.options,n=this.cache,r=this.json;if(n.textures.has(e))return n.textures.get(e);r.textures||=[],e instanceof ut&&(e=fz(e,t.maxTextureSize));let i=e.userData.mimeType;i===`image/webp`&&(i=`image/png`);let a={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,i)};e.name&&(a.name=e.name),this._invokeAll(function(t){t.writeTexture&&t.writeTexture(e,a)});let o=r.textures.push(a)-1;return n.textures.set(e,o),o}processMaterial(e){let t=this.cache,n=this.json;if(t.materials.has(e))return t.materials.get(e);if(e.isShaderMaterial)return console.warn(`GLTFExporter: THREE.ShaderMaterial not supported.`),null;n.materials||=[];let r={pbrMetallicRoughness:{}};e.isMeshStandardMaterial!==!0&&e.isMeshBasicMaterial!==!0&&console.warn(`GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.`);let i=e.color.toArray().concat([e.opacity]);if(Ez(i,[1,1,1,1])||(r.pbrMetallicRoughness.baseColorFactor=i),e.isMeshStandardMaterial?(r.pbrMetallicRoughness.metallicFactor=e.metalness,r.pbrMetallicRoughness.roughnessFactor=e.roughness):(r.pbrMetallicRoughness.metallicFactor=.5,r.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){let t=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),n={index:this.processTexture(t),channel:t.channel};this.applyTextureTransform(n,t),r.pbrMetallicRoughness.metallicRoughnessTexture=n}if(e.map){let t={index:this.processTexture(e.map),texCoord:e.map.channel};this.applyTextureTransform(t,e.map),r.pbrMetallicRoughness.baseColorTexture=t}if(e.emissive){let t=e.emissive;if(Math.max(t.r,t.g,t.b)>0&&(r.emissiveFactor=e.emissive.toArray()),e.emissiveMap){let t={index:this.processTexture(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(t,e.emissiveMap),r.emissiveTexture=t}}if(e.normalMap){let t={index:this.processTexture(e.normalMap),texCoord:e.normalMap.channel};e.normalScale&&e.normalScale.x!==1&&(t.scale=e.normalScale.x),this.applyTextureTransform(t,e.normalMap),r.normalTexture=t}if(e.aoMap){let t={index:this.processTexture(e.aoMap),texCoord:e.aoMap.channel};e.aoMapIntensity!==1&&(t.strength=e.aoMapIntensity),this.applyTextureTransform(t,e.aoMap),r.occlusionTexture=t}e.transparent?r.alphaMode=`BLEND`:e.alphaTest>0&&(r.alphaMode=`MASK`,r.alphaCutoff=e.alphaTest),e.side===Rt&&(r.doubleSided=!0),e.name!==``&&(r.name=e.name),this.serializeUserData(e,r),this._invokeAll(function(t){t.writeMaterial&&t.writeMaterial(e,r)});let a=n.materials.push(r)-1;return t.materials.set(e,a),a}processMesh(e){let t=this.cache,n=this.json,r=[e.geometry.uuid];if(Array.isArray(e.material))for(let t=0,n=e.material.length;t=152?{uv:`TEXCOORD_0`,uv1:`TEXCOORD_1`,uv2:`TEXCOORD_2`,uv3:`TEXCOORD_3`}:{uv:`TEXCOORD_0`,uv2:`TEXCOORD_1`},color:`COLOR_0`,skinWeight:`WEIGHTS_0`,skinIndex:`JOINTS_0`},f=a.getAttribute(`normal`);f!==void 0&&!this.isNormalizedNormalAttribute(f)&&(console.warn(`THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one.`),a.setAttribute(`normal`,this.createNormalizedNormalAttribute(f)));let p=null;for(let e in a.attributes){if(e.slice(0,5)===`morph`)continue;let n=a.attributes[e];if(e=d[e]||e.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(e)||(e=`_`+e),t.attributes.has(this.getUID(n))){c[e]=t.attributes.get(this.getUID(n));continue}p=null;let r=n.array;e===`JOINTS_0`&&!(r instanceof Uint16Array)&&!(r instanceof Uint8Array)&&(console.warn(`GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.`),p=new ct(new Uint16Array(r),n.itemSize,n.normalized));let i=this.processAccessor(p||n,a);i!==null&&(e.startsWith(`_`)||this.detectMeshQuantization(e,n),c[e]=i,t.attributes.set(this.getUID(n),i))}if(f!==void 0&&a.setAttribute(`normal`,f),Object.keys(c).length===0)return null;if(e.morphTargetInfluences!==void 0&&e.morphTargetInfluences.length>0){let n=[],r=[],i={};if(e.morphTargetDictionary!==void 0)for(let t in e.morphTargetDictionary)i[e.morphTargetDictionary[t]]=t;for(let o=0;o0&&(s.extras={},s.extras.targetNames=r)}let m=Array.isArray(e.material);if(m&&a.groups.length===0)return null;let h=m?e.material:[e.material],g=m?a.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let e=0,n=g.length;e0&&(n.targets=u),a.index!==null){let r=this.getUID(a.index);(g[e].start!==void 0||g[e].count!==void 0)&&(r+=`:`+g[e].start+`:`+g[e].count),t.attributes.has(r)?n.indices=t.attributes.get(r):(n.indices=this.processAccessor(a.index,a,g[e].start,g[e].count),t.attributes.set(r,n.indices)),n.indices===null&&delete n.indices}let r=this.processMaterial(h[g[e].materialIndex]);r!==null&&(n.material=r),l.push(n)}s.primitives=l,n.meshes||=[],this._invokeAll(function(t){t.writeMesh&&t.writeMesh(e,s)});let _=n.meshes.push(s)-1;return t.meshes.set(i,_),_}detectMeshQuantization(e,t){if(this.extensionsUsed[gz])return;let n;switch(t.array.constructor){case Int8Array:n=`byte`;break;case Uint8Array:n=`unsigned byte`;break;case Int16Array:n=`short`;break;case Uint16Array:n=`unsigned short`;break;default:return}t.normalized&&(n+=` normalized`);let r=e.split(`_`,1)[0];pz[r]&&pz[r].includes(n)&&(this.extensionsUsed[gz]=!0,this.extensionsRequired[gz]=!0)}processCamera(e){let t=this.json;t.cameras||=[];let n=e.isOrthographicCamera,r={type:n?`orthographic`:`perspective`};return n?r.orthographic={xmag:e.right*2,ymag:e.top*2,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:r.perspective={aspectRatio:e.aspect,yfov:fe.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},e.name!==``&&(r.name=e.type),t.cameras.push(r)-1}processAnimation(e,t){let n=this.json,r=this.nodeMap;n.animations||=[],e=mz.Utils.mergeMorphTargetTracks(e.clone(),t);let i=e.tracks,a=[],o=[];for(let e=0;e0){let t=[];for(let r=0,i=e.children.length;r0&&(i.children=t)}this._invokeAll(function(t){t.writeNode&&t.writeNode(e,i)});let a=t.nodes.push(i)-1;return r.set(e,a),a}processScene(e){let t=this.json,n=this.options;t.scenes||(t.scenes=[],t.scene=0);let r={};e.name!==``&&(r.name=e.name),t.scenes.push(r);let i=[];for(let t=0,r=e.children.length;t0&&(r.nodes=i),this.serializeUserData(e,r)}processObjects(e){let t=new ye;t.name=`AuxScene`;for(let n=0;n0&&this.processObjects(n);for(let e=0;e0&&(a.range=e.distance)):e.isSpotLight&&(a.type=`spot`,e.distance>0&&(a.range=e.distance),a.spot={},a.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,a.spot.outerConeAngle=e.angle),e.decay!==void 0&&e.decay!==2&&console.warn(`THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2.`),e.target&&(e.target.parent!==e||e.target.position.x!==0||e.target.position.y!==0||e.target.position.z!==-1)&&console.warn(`THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1.`),i[this.name]||(r.extensions=r.extensions||{},r.extensions[this.name]={lights:[]},i[this.name]=!0);let o=r.extensions[this.name].lights;o.push(a),t.extensions=t.extensions||{},t.extensions[this.name]={light:o.length-1}}};let Iz=class{constructor(e){this.writer=e,this.name=`KHR_materials_unlit`}writeMaterial(e,t){if(!e.isMeshBasicMaterial)return;let n=this.writer.extensionsUsed;t.extensions=t.extensions||{},t.extensions[this.name]={},n[this.name]=!0,t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9}},Lz=class{constructor(e){this.writer=e,this.name=`KHR_materials_clearcoat`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.clearcoat===0)return;let n=this.writer,r=n.extensionsUsed,i={};if(i.clearcoatFactor=e.clearcoat,e.clearcoatMap){let t={index:n.processTexture(e.clearcoatMap),texCoord:e.clearcoatMap.channel};n.applyTextureTransform(t,e.clearcoatMap),i.clearcoatTexture=t}if(i.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){let t={index:n.processTexture(e.clearcoatRoughnessMap),texCoord:e.clearcoatRoughnessMap.channel};n.applyTextureTransform(t,e.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=t}if(e.clearcoatNormalMap){let t={index:n.processTexture(e.clearcoatNormalMap),texCoord:e.clearcoatNormalMap.channel};n.applyTextureTransform(t,e.clearcoatNormalMap),i.clearcoatNormalTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Rz=class{constructor(e){this.writer=e,this.name=`KHR_materials_iridescence`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.iridescence===0)return;let n=this.writer,r=n.extensionsUsed,i={};if(i.iridescenceFactor=e.iridescence,e.iridescenceMap){let t={index:n.processTexture(e.iridescenceMap),texCoord:e.iridescenceMap.channel};n.applyTextureTransform(t,e.iridescenceMap),i.iridescenceTexture=t}if(i.iridescenceIor=e.iridescenceIOR,i.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){let t={index:n.processTexture(e.iridescenceThicknessMap),texCoord:e.iridescenceThicknessMap.channel};n.applyTextureTransform(t,e.iridescenceThicknessMap),i.iridescenceThicknessTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},zz=class{constructor(e){this.writer=e,this.name=`KHR_materials_transmission`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;let n=this.writer,r=n.extensionsUsed,i={};if(i.transmissionFactor=e.transmission,e.transmissionMap){let t={index:n.processTexture(e.transmissionMap),texCoord:e.transmissionMap.channel};n.applyTextureTransform(t,e.transmissionMap),i.transmissionTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Bz=class{constructor(e){this.writer=e,this.name=`KHR_materials_volume`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;let n=this.writer,r=n.extensionsUsed,i={};if(i.thicknessFactor=e.thickness,e.thicknessMap){let t={index:n.processTexture(e.thicknessMap),texCoord:e.thicknessMap.channel};n.applyTextureTransform(t,e.thicknessMap),i.thicknessTexture=t}i.attenuationDistance=e.attenuationDistance,i.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Vz=class{constructor(e){this.writer=e,this.name=`KHR_materials_ior`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.ior===1.5)return;let n=this.writer.extensionsUsed,r={};r.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=r,n[this.name]=!0}},Hz=class{constructor(e){this.writer=e,this.name=`KHR_materials_specular`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.specularIntensity===1&&e.specularColor.equals(yz)&&!e.specularIntensityMap&&!e.specularColorTexture)return;let n=this.writer,r=n.extensionsUsed,i={};if(e.specularIntensityMap){let t={index:n.processTexture(e.specularIntensityMap),texCoord:e.specularIntensityMap.channel};n.applyTextureTransform(t,e.specularIntensityMap),i.specularTexture=t}if(e.specularColorMap){let t={index:n.processTexture(e.specularColorMap),texCoord:e.specularColorMap.channel};n.applyTextureTransform(t,e.specularColorMap),i.specularColorTexture=t}i.specularFactor=e.specularIntensity,i.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Uz=class{constructor(e){this.writer=e,this.name=`KHR_materials_sheen`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.sheen==0)return;let n=this.writer,r=n.extensionsUsed,i={};if(e.sheenRoughnessMap){let t={index:n.processTexture(e.sheenRoughnessMap),texCoord:e.sheenRoughnessMap.channel};n.applyTextureTransform(t,e.sheenRoughnessMap),i.sheenRoughnessTexture=t}if(e.sheenColorMap){let t={index:n.processTexture(e.sheenColorMap),texCoord:e.sheenColorMap.channel};n.applyTextureTransform(t,e.sheenColorMap),i.sheenColorTexture=t}i.sheenRoughnessFactor=e.sheenRoughness,i.sheenColorFactor=e.sheenColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Wz=class{constructor(e){this.writer=e,this.name=`KHR_materials_anisotropy`}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.anisotropy==0)return;let n=this.writer,r=n.extensionsUsed,i={};if(e.anisotropyMap){let t={index:n.processTexture(e.anisotropyMap)};n.applyTextureTransform(t,e.anisotropyMap),i.anisotropyTexture=t}i.anisotropyStrength=e.anisotropy,i.anisotropyRotation=e.anisotropyRotation,t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},Gz=class{constructor(e){this.writer=e,this.name=`KHR_materials_emissive_strength`}writeMaterial(e,t){if(!e.isMeshStandardMaterial||e.emissiveIntensity===1)return;let n=this.writer.extensionsUsed,r={};r.emissiveStrength=e.emissiveIntensity,t.extensions=t.extensions||{},t.extensions[this.name]=r,n[this.name]=!0}};var Kz=Uint8Array,qz=Uint16Array,Jz=Uint32Array,Yz=new Kz([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xz=new Kz([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Zz=new Kz([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Qz=function(e,t){for(var n=new qz(31),r=0;r<31;++r)n[r]=t+=1<>>1|(aB&21845)<<1;oB=(oB&52428)>>>2|(oB&13107)<<2,oB=(oB&61680)>>>4|(oB&3855)<<4,iB[aB]=((oB&65280)>>>8|(oB&255)<<8)>>>1}for(var sB=function(e,t,n){for(var r=e.length,i=0,a=new qz(t);i>>c]=l}else for(s=new qz(r),i=0;i>>15-e[i]);return s},cB=new Kz(288),aB=0;aB<144;++aB)cB[aB]=8;for(var aB=144;aB<256;++aB)cB[aB]=9;for(var aB=256;aB<280;++aB)cB[aB]=7;for(var aB=280;aB<288;++aB)cB[aB]=8;for(var lB=new Kz(32),aB=0;aB<32;++aB)lB[aB]=5;var uB=sB(cB,9,1),dB=sB(lB,5,1),fB=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},pB=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},mB=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},hB=function(e){return(e/8|0)+(e&7&&1)},gB=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof qz?qz:e instanceof Jz?Jz:Kz)(n-t);return r.set(e.subarray(t,n)),r},_B=function(e,t,n){var r=e.length;if(!r||n&&!n.l&&r<5)return t||new Kz(0);var i=!t||n,a=!n||n.i;n||={},t||=new Kz(r*3);var o=function(e){var n=t.length;if(e>n){var r=new Kz(Math.max(n*2,e));r.set(t),t=r}},s=n.f||0,c=n.p||0,l=n.b||0,u=n.l,d=n.d,f=n.m,p=n.n,m=r*8;do{if(!u){n.f=s=pB(e,c,1);var h=pB(e,c+1,3);if(c+=3,h)if(h==1)u=uB,d=dB,f=9,p=5;else if(h==2){var g=pB(e,c,31)+257,_=pB(e,c+10,15)+4,v=g+pB(e,c+5,31)+1;c+=14;for(var y=new Kz(v),b=new Kz(19),x=0;x<_;++x)b[Zz[x]]=pB(e,c+x*3,7);c+=_*3;for(var S=fB(b),C=(1<>>4;if(E<16)y[x++]=E;else{var D=0,O=0;for(E==16?(O=3+pB(e,c,3),c+=2,D=y[x-1]):E==17?(O=3+pB(e,c,7),c+=3):E==18&&(O=11+pB(e,c,127),c+=7);O--;)y[x++]=D}}var k=y.subarray(0,g),A=y.subarray(g);f=fB(k),p=fB(A),u=sB(k,f,1),d=sB(A,p,1)}else throw`invalid block type`;else{var E=hB(c)+4,j=e[E-4]|e[E-3]<<8,M=E+j;if(M>r){if(a)throw`unexpected EOF`;break}i&&o(l+j),t.set(e.subarray(E,M),l),n.b=l+=j,n.p=c=M*8;continue}if(c>m){if(a)throw`unexpected EOF`;break}}i&&o(l+131072);for(var N=(1<>>4;if(c+=D&15,c>m){if(a)throw`unexpected EOF`;break}if(!D)throw`invalid length/literal`;if(F<256)t[l++]=F;else if(F==256){P=c,u=null;break}else{var I=F-254;if(F>264){var x=F-257,L=Yz[x];I=pB(e,c,(1<>>4;if(!R)throw`invalid distance`;c+=R&15;var A=rB[z];if(z>3){var L=Xz[z];A+=mB(e,c)&(1<m){if(a)throw`unexpected EOF`;break}i&&o(l+131072);for(var te=l+I;l>>4>7||(e[0]<<8|e[1])%31)throw`invalid zlib data`;if(e[1]&32)throw`invalid zlib data: preset dictionaries not supported`},bB=typeof TextDecoder<`u`&&new TextDecoder,xB=0;try{bB.decode(vB,{stream:!0}),xB=1}catch{}var SB=Object.defineProperty,CB=(e,t,n)=>t in e?SB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wB=(e,t,n)=>(CB(e,t+``,n),n);const TB=class extends be{constructor(e,t={}){super(e),this.isReflector=!0,this.type=`Reflector`,this.camera=new wt;let n=this,r=t.color===void 0?new _t(8355711):new _t(t.color),i=t.textureWidth||512,a=t.textureHeight||512,o=t.clipBias||0,s=t.shader||TB.ReflectorShader,c=t.multisample===void 0?4:t.multisample,l=new Ge,u=new V,d=new V,f=new V,p=new ot,m=new V(0,0,-1),h=new oe,g=new V,_=new V,v=new oe,y=new ot,b=this.camera,x=new Qt(i,a,{samples:c,type:it}),S=new Xe({uniforms:Le.clone(s.uniforms),fragmentShader:s.fragmentShader,vertexShader:s.vertexShader});S.uniforms.tDiffuse.value=x.texture,S.uniforms.color.value=r,S.uniforms.textureMatrix.value=y,this.material=S,this.onBeforeRender=function(e,t,r){if(d.setFromMatrixPosition(n.matrixWorld),f.setFromMatrixPosition(r.matrixWorld),p.extractRotation(n.matrixWorld),u.set(0,0,1),u.applyMatrix4(p),g.subVectors(d,f),g.dot(u)>0)return;g.reflect(u).negate(),g.add(d),p.extractRotation(r.matrixWorld),m.set(0,0,-1),m.applyMatrix4(p),m.add(f),_.subVectors(d,m),_.reflect(u).negate(),_.add(d),b.position.copy(g),b.up.set(0,1,0),b.up.applyMatrix4(p),b.up.reflect(u),b.lookAt(_),b.far=r.far,b.updateMatrixWorld(),b.projectionMatrix.copy(r.projectionMatrix),y.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),y.multiply(b.projectionMatrix),y.multiply(b.matrixWorldInverse),y.multiply(n.matrixWorld),l.setFromNormalAndCoplanarPoint(u,d),l.applyMatrix4(b.matrixWorldInverse),h.set(l.normal.x,l.normal.y,l.normal.z,l.constant);let i=b.projectionMatrix;v.x=(Math.sign(h.x)+i.elements[8])/i.elements[0],v.y=(Math.sign(h.y)+i.elements[9])/i.elements[5],v.z=-1,v.w=(1+i.elements[10])/i.elements[14],h.multiplyScalar(2/h.dot(v)),i.elements[2]=h.x,i.elements[6]=h.y,i.elements[10]=h.z+1-o,i.elements[14]=h.w,n.visible=!1;let a=e.getRenderTarget(),s=e.xr.enabled,c=e.shadowMap.autoUpdate,S=e.toneMapping,C=!1;C=`outputColorSpace`in e?e.outputColorSpace===`srgb`:e.outputEncoding===3001,e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,`outputColorSpace`in e?e.outputColorSpace=`srgb-linear`:e.outputEncoding=3e3,e.toneMapping=Ve,e.setRenderTarget(x),e.state.buffers.depth.setMask(!0),e.autoClear===!1&&e.clear(),e.render(t,b),e.xr.enabled=s,e.shadowMap.autoUpdate=c,e.toneMapping=S,`outputColorSpace`in e?e.outputColorSpace=C?`srgb`:`srgb-linear`:e.outputEncoding=C?3001:3e3,e.setRenderTarget(a);let w=r.viewport;w!==void 0&&e.state.viewport(w),n.visible=!0},this.getRenderTarget=function(){return x},this.dispose=function(){x.dispose(),n.material.dispose()}}};let EB=TB;wB(EB,`ReflectorShader`,{uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:` + uniform mat4 textureMatrix; + varying vec4 vUv; + + #include + #include + + void main() { + + vUv = textureMatrix * vec4( position, 1.0 ); + + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + + #include + + }`,fragmentShader:` + uniform vec3 color; + uniform sampler2D tDiffuse; + varying vec4 vUv; + + #include + + float blendOverlay( float base, float blend ) { + + return( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) ); + + } + + vec3 blendOverlay( vec3 base, vec3 blend ) { + + return vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) ); + + } + + void main() { + + #include + + vec4 base = texture2DProj( tDiffuse, vUv ); + gl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 ); + + #include + #include <${tz>=154?`colorspace_fragment`:`encodings_fragment`}> + + }`});var DB=Object.defineProperty,OB=(e,t,n)=>t in e?DB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kB=(e,t,n)=>(OB(e,typeof t==`symbol`?t:t+``,n),n);const AB=new de,jB=new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,1,1,0,1,1,-1,1,0,0,1]),MB=new Nt(jB,5);AB.setIndex([0,1,2,0,2,3]),AB.setAttribute(`position`,new Se(MB,3,0,!1)),AB.setAttribute(`uv`,new Se(MB,2,3,!1));const NB=class extends be{constructor(){super(NB.Geometry,new Te({opacity:0,transparent:!0})),this.isLensflare=!0,this.type=`Lensflare`,this.frustumCulled=!1,this.renderOrder=1/0;let e=new V,t=new V,n=new xe(new Uint8Array(16*16*3),16,16,$t);n.minFilter=ft,n.magFilter=ft,n.wrapS=Jt,n.wrapT=Jt;let r=new xe(new Uint8Array(16*16*3),16,16,$t);r.minFilter=ft,r.magFilter=ft,r.wrapS=Jt,r.wrapT=Jt;let i=NB.Geometry,a=new z({uniforms:{scale:{value:null},screenPosition:{value:null}},vertexShader:` + + precision highp float; + + uniform vec3 screenPosition; + uniform vec2 scale; + + attribute vec3 position; + + void main() { + + gl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 ); + + }`,fragmentShader:` + + precision highp float; + + void main() { + + gl_FragColor = vec4( 1.0, 0.0, 1.0, 1.0 ); + + }`,depthTest:!0,depthWrite:!1,transparent:!1}),o=new z({uniforms:{map:{value:n},scale:{value:null},screenPosition:{value:null}},vertexShader:` + + precision highp float; + + uniform vec3 screenPosition; + uniform vec2 scale; + + attribute vec3 position; + attribute vec2 uv; + + varying vec2 vUV; + + void main() { + + vUV = uv; + + gl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 ); + + }`,fragmentShader:` + + precision highp float; + + uniform sampler2D map; + + varying vec2 vUV; + + void main() { + + gl_FragColor = texture2D( map, vUV ); + + }`,depthTest:!1,depthWrite:!1,transparent:!1}),s=new be(i,a),c=[],l=FB.Shader,u=new z({uniforms:{map:{value:null},occlusionMap:{value:r},color:{value:new _t(16777215)},scale:{value:new ve},screenPosition:{value:new V}},vertexShader:l.vertexShader,fragmentShader:l.fragmentShader,blending:Gt,transparent:!0,depthWrite:!1}),d=new be(i,u);this.addElement=function(e){c.push(e)};let f=new ve,p=new ve,m=new He,h=new oe;this.onBeforeRender=function(l,g,_){l.getCurrentViewport(h);let v=h.w/h.z,y=h.z/2,b=h.w/2,x=16/h.w;if(f.set(x*v,x),m.min.set(h.x,h.y),m.max.set(h.x+(h.z-16),h.y+(h.w-16)),t.setFromMatrixPosition(this.matrixWorld),t.applyMatrix4(_.matrixWorldInverse),!(t.z>0)&&(e.copy(t).applyMatrix4(_.projectionMatrix),p.x=h.x+e.x*y+y-8,p.y=h.y+e.y*b+b-8,m.containsPoint(p))){l.copyFramebufferToTexture(p,n);let t=a.uniforms;t.scale.value=f,t.screenPosition.value=e,l.renderBufferDirect(_,null,i,a,s,null),l.copyFramebufferToTexture(p,r),t=o.uniforms,t.scale.value=f,t.screenPosition.value=e,l.renderBufferDirect(_,null,i,o,s,null);let m=-e.x*2,g=-e.y*2;for(let t=0,n=c.length;t + #include + #include + #include + + void main() { + mirrorCoord = modelMatrix * vec4( position, 1.0 ); + worldPosition = mirrorCoord.xyzw; + mirrorCoord = textureMatrix * mirrorCoord; + vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); + gl_Position = projectionMatrix * mvPosition; + + #include + #include + #include + #include + #include + }`,fragmentShader:` + uniform sampler2D mirrorSampler; + uniform float alpha; + uniform float time; + uniform float size; + uniform float distortionScale; + uniform sampler2D normalSampler; + uniform vec3 sunColor; + uniform vec3 sunDirection; + uniform vec3 eye; + uniform vec3 waterColor; + + varying vec4 mirrorCoord; + varying vec4 worldPosition; + + vec4 getNoise( vec2 uv ) { + vec2 uv0 = ( uv / 103.0 ) + vec2(time / 17.0, time / 29.0); + vec2 uv1 = uv / 107.0-vec2( time / -19.0, time / 31.0 ); + vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( time / 101.0, time / 97.0 ); + vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( time / 109.0, time / -113.0 ); + vec4 noise = texture2D( normalSampler, uv0 ) + + texture2D( normalSampler, uv1 ) + + texture2D( normalSampler, uv2 ) + + texture2D( normalSampler, uv3 ); + return noise * 0.5 - 1.0; + } + + void sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) { + vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) ); + float direction = max( 0.0, dot( eyeDirection, reflection ) ); + specularColor += pow( direction, shiny ) * sunColor * spec; + diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * sunColor * diffuse; + } + + #include + #include + #include + #include + #include + #include + #include + #include + + void main() { + + #include + vec4 noise = getNoise( worldPosition.xz * size ); + vec3 surfaceNormal = normalize( noise.xzy * vec3( 1.5, 1.0, 1.5 ) ); + + vec3 diffuseLight = vec3(0.0); + vec3 specularLight = vec3(0.0); + + vec3 worldToEye = eye-worldPosition.xyz; + vec3 eyeDirection = normalize( worldToEye ); + sunLight( surfaceNormal, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight ); + + float distance = length(worldToEye); + + vec2 distortion = surfaceNormal.xz * ( 0.001 + 1.0 / distance ) * distortionScale; + vec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) ); + + float theta = max( dot( eyeDirection, surfaceNormal ), 0.0 ); + float rf0 = 0.3; + float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 ); + vec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor; + vec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance); + vec3 outgoingLight = albedo; + gl_FragColor = vec4( outgoingLight, alpha ); + + #include + #include <${parseInt(Fe.replace(/\D+/g,``))>=154?`colorspace_fragment`:`encodings_fragment`}> + #include + }`},A=new Xe({fragmentShader:k.fragmentShader,vertexShader:k.vertexShader,uniforms:Le.clone(k.uniforms),lights:!0,side:m,fog:h});A.uniforms.mirrorSampler.value=O.texture,A.uniforms.textureMatrix.value=E,A.uniforms.alpha.value=o,A.uniforms.time.value=s,A.uniforms.normalSampler.value=c,A.uniforms.sunColor.value=u,A.uniforms.waterColor.value=d,A.uniforms.sunDirection.value=l,A.uniforms.distortionScale.value=p,A.uniforms.eye.value=f,n.material=A,n.onBeforeRender=function(e,t,r){if(v.setFromMatrixPosition(n.matrixWorld),y.setFromMatrixPosition(r.matrixWorld),b.extractRotation(n.matrixWorld),_.set(0,0,1),_.applyMatrix4(b),C.subVectors(v,y),C.dot(_)>0)return;C.reflect(_).negate(),C.add(v),b.extractRotation(r.matrixWorld),x.set(0,0,-1),x.applyMatrix4(b),x.add(y),w.subVectors(v,x),w.reflect(_).negate(),w.add(v),D.position.copy(C),D.up.set(0,1,0),D.up.applyMatrix4(b),D.up.reflect(_),D.lookAt(w),D.far=r.far,D.updateMatrixWorld(),D.projectionMatrix.copy(r.projectionMatrix),E.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),E.multiply(D.projectionMatrix),E.multiply(D.matrixWorldInverse),g.setFromNormalAndCoplanarPoint(_,v),g.applyMatrix4(D.matrixWorldInverse),S.set(g.normal.x,g.normal.y,g.normal.z,g.constant);let i=D.projectionMatrix;T.x=(Math.sign(S.x)+i.elements[8])/i.elements[0],T.y=(Math.sign(S.y)+i.elements[9])/i.elements[5],T.z=-1,T.w=(1+i.elements[10])/i.elements[14],S.multiplyScalar(2/S.dot(T)),i.elements[2]=S.x,i.elements[6]=S.y,i.elements[10]=S.z+1-a,i.elements[14]=S.w,f.setFromMatrixPosition(r.matrixWorld);let o=e.getRenderTarget(),s=e.xr.enabled,c=e.shadowMap.autoUpdate;n.visible=!1,e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,e.setRenderTarget(O),e.state.buffers.depth.setMask(!0),e.autoClear===!1&&e.clear(),e.render(t,D),n.visible=!0,e.xr.enabled=s,e.shadowMap.autoUpdate=c,e.setRenderTarget(o);let l=r.viewport;l!==void 0&&e.state.viewport(l)}}},LB=Object.defineProperty,RB=(e,t,n)=>t in e?LB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zB=(e,t,n)=>(RB(e,typeof t==`symbol`?t:t+``,n),n);const BB={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new V},up:{value:new V(0,1,0)}},vertexShader:` + uniform vec3 sunPosition; + uniform float rayleigh; + uniform float turbidity; + uniform float mieCoefficient; + uniform vec3 up; + + varying vec3 vWorldPosition; + varying vec3 vSunDirection; + varying float vSunfade; + varying vec3 vBetaR; + varying vec3 vBetaM; + varying float vSunE; + + // constants for atmospheric scattering + const float e = 2.71828182845904523536028747135266249775724709369995957; + const float pi = 3.141592653589793238462643383279502884197169; + + // wavelength of used primaries, according to preetham + const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 ); + // this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function: + // (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn)) + const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 ); + + // mie stuff + // K coefficient for the primaries + const float v = 4.0; + const vec3 K = vec3( 0.686, 0.678, 0.666 ); + // MieConst = pi * pow( ( 2.0 * pi ) / lambda, vec3( v - 2.0 ) ) * K + const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 ); + + // earth shadow hack + // cutoffAngle = pi / 1.95; + const float cutoffAngle = 1.6110731556870734; + const float steepness = 1.5; + const float EE = 1000.0; + + float sunIntensity( float zenithAngleCos ) { + zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 ); + return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) ); + } + + vec3 totalMie( float T ) { + float c = ( 0.2 * T ) * 10E-18; + return 0.434 * c * MieConst; + } + + void main() { + + vec4 worldPosition = modelMatrix * vec4( position, 1.0 ); + vWorldPosition = worldPosition.xyz; + + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + gl_Position.z = gl_Position.w; // set z to camera.far + + vSunDirection = normalize( sunPosition ); + + vSunE = sunIntensity( dot( vSunDirection, up ) ); + + vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 ); + + float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) ); + + // extinction (absorbtion + out scattering) + // rayleigh coefficients + vBetaR = totalRayleigh * rayleighCoefficient; + + // mie coefficients + vBetaM = totalMie( turbidity ) * mieCoefficient; + + } + `,fragmentShader:` + varying vec3 vWorldPosition; + varying vec3 vSunDirection; + varying float vSunfade; + varying vec3 vBetaR; + varying vec3 vBetaM; + varying float vSunE; + + uniform float mieDirectionalG; + uniform vec3 up; + + const vec3 cameraPos = vec3( 0.0, 0.0, 0.0 ); + + // constants for atmospheric scattering + const float pi = 3.141592653589793238462643383279502884197169; + + const float n = 1.0003; // refractive index of air + const float N = 2.545E25; // number of molecules per unit volume for air at 288.15K and 1013mb (sea level -45 celsius) + + // optical length at zenith for molecules + const float rayleighZenithLength = 8.4E3; + const float mieZenithLength = 1.25E3; + // 66 arc seconds -> degrees, and the cosine of that + const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324; + + // 3.0 / ( 16.0 * pi ) + const float THREE_OVER_SIXTEENPI = 0.05968310365946075; + // 1.0 / ( 4.0 * pi ) + const float ONE_OVER_FOURPI = 0.07957747154594767; + + float rayleighPhase( float cosTheta ) { + return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) ); + } + + float hgPhase( float cosTheta, float g ) { + float g2 = pow( g, 2.0 ); + float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 ); + return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse ); + } + + void main() { + + vec3 direction = normalize( vWorldPosition - cameraPos ); + + // optical length + // cutoff angle at 90 to avoid singularity in next formula. + float zenithAngle = acos( max( 0.0, dot( up, direction ) ) ); + float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) ); + float sR = rayleighZenithLength * inverse; + float sM = mieZenithLength * inverse; + + // combined extinction factor + vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) ); + + // in scattering + float cosTheta = dot( direction, vSunDirection ); + + float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 ); + vec3 betaRTheta = vBetaR * rPhase; + + float mPhase = hgPhase( cosTheta, mieDirectionalG ); + vec3 betaMTheta = vBetaM * mPhase; + + vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) ); + Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) ); + + // nightsky + float theta = acos( direction.y ); // elevation --> y-axis, [-pi/2, pi/2] + float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2] + vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 ); + vec3 L0 = vec3( 0.1 ) * Fex; + + // composition + solar disc + float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta ); + L0 += ( vSunE * 19000.0 * Fex ) * sundisk; + + vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 ); + + vec3 retColor = pow( texColor, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) ); + + gl_FragColor = vec4( retColor, 1.0 ); + + #include + #include <${tz>=154?`colorspace_fragment`:`encodings_fragment`}> + + } + `},VB=new Xe({name:`SkyShader`,fragmentShader:BB.fragmentShader,vertexShader:BB.vertexShader,uniforms:Le.clone(BB.uniforms),side:jt,depthWrite:!1});var HB=class extends be{constructor(){super(new we(1,1,1),VB)}};zB(HB,`SkyShader`,BB),zB(HB,`material`,VB);const UB=new qe,WB=new V;var GB=class{constructor(e){let t=e.geometry;t.index&&(console.warn(`THREE.MeshSurfaceSampler: Converting geometry to non-indexed BufferGeometry.`),t=t.toNonIndexed()),this.geometry=t,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute(`position`),this.colorAttribute=this.geometry.getAttribute(`color`),this.weightAttribute=null,this.distribution=null}setWeightAttribute(e){return this.weightAttribute=e?this.geometry.getAttribute(e):null,this}build(){let e=this.positionAttribute,t=this.weightAttribute,n=new Float32Array(e.count/3);for(let r=0;re){i=a;break}else e1&&(i=1-i,a=1-a),UB.a.fromBufferAttribute(this.positionAttribute,e*3),UB.b.fromBufferAttribute(this.positionAttribute,e*3+1),UB.c.fromBufferAttribute(this.positionAttribute,e*3+2),t.set(0,0,0).addScaledVector(UB.a,i).addScaledVector(UB.b,a).addScaledVector(UB.c,1-(i+a)),n!==void 0&&UB.getNormal(n),r!==void 0&&this.colorAttribute!==void 0&&(UB.a.fromBufferAttribute(this.colorAttribute,e*3),UB.b.fromBufferAttribute(this.colorAttribute,e*3+1),UB.c.fromBufferAttribute(this.colorAttribute,e*3+2),WB.set(0,0,0).addScaledVector(UB.a,i).addScaledVector(UB.b,a).addScaledVector(UB.c,1-(i+a)),r.r=WB.x,r.g=WB.y,r.b=WB.z),this}},KB=Object.defineProperty,qB=(e,t,n)=>t in e?KB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t,n)=>(qB(e,typeof t==`symbol`?t:t+``,n),n),JB=class extends vt{constructor(e,t){super(),Q(this,`isTransformControls`,!0),Q(this,`visible`,!1),Q(this,`domElement`),Q(this,`raycaster`,new pe),Q(this,`gizmo`),Q(this,`plane`),Q(this,`tempVector`,new V),Q(this,`tempVector2`,new V),Q(this,`tempQuaternion`,new Je),Q(this,`unit`,{X:new V(1,0,0),Y:new V(0,1,0),Z:new V(0,0,1)}),Q(this,`pointStart`,new V),Q(this,`pointEnd`,new V),Q(this,`offset`,new V),Q(this,`rotationAxis`,new V),Q(this,`startNorm`,new V),Q(this,`endNorm`,new V),Q(this,`rotationAngle`,0),Q(this,`cameraPosition`,new V),Q(this,`cameraQuaternion`,new Je),Q(this,`cameraScale`,new V),Q(this,`parentPosition`,new V),Q(this,`parentQuaternion`,new Je),Q(this,`parentQuaternionInv`,new Je),Q(this,`parentScale`,new V),Q(this,`worldPositionStart`,new V),Q(this,`worldQuaternionStart`,new Je),Q(this,`worldScaleStart`,new V),Q(this,`worldPosition`,new V),Q(this,`worldQuaternion`,new Je),Q(this,`worldQuaternionInv`,new Je),Q(this,`worldScale`,new V),Q(this,`eye`,new V),Q(this,`positionStart`,new V),Q(this,`quaternionStart`,new Je),Q(this,`scaleStart`,new V),Q(this,`camera`),Q(this,`object`),Q(this,`enabled`,!0),Q(this,`axis`,null),Q(this,`mode`,`translate`),Q(this,`translationSnap`,null),Q(this,`rotationSnap`,null),Q(this,`scaleSnap`,null),Q(this,`space`,`world`),Q(this,`size`,1),Q(this,`dragging`,!1),Q(this,`showX`,!0),Q(this,`showY`,!0),Q(this,`showZ`,!0),Q(this,`changeEvent`,{type:`change`}),Q(this,`mouseDownEvent`,{type:`mouseDown`,mode:this.mode}),Q(this,`mouseUpEvent`,{type:`mouseUp`,mode:this.mode}),Q(this,`objectChangeEvent`,{type:`objectChange`}),Q(this,`intersectObjectWithRay`,(e,t,n)=>{let r=t.intersectObject(e,!0);for(let e=0;e(this.object=e,this.visible=!0,this)),Q(this,`detach`,()=>(this.object=void 0,this.visible=!1,this.axis=null,this)),Q(this,`reset`,()=>(this.enabled&&this.dragging&&this.object!==void 0&&(this.object.position.copy(this.positionStart),this.object.quaternion.copy(this.quaternionStart),this.object.scale.copy(this.scaleStart),this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent),this.pointStart.copy(this.pointEnd)),this)),Q(this,`updateMatrixWorld`,()=>{this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error(`TransformControls: The attached 3D object must be a part of the scene graph.`):this.object.parent.matrixWorld.decompose(this.parentPosition,this.parentQuaternion,this.parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this.worldScale),this.parentQuaternionInv.copy(this.parentQuaternion).invert(),this.worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this.cameraScale),this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld()}),Q(this,`pointerHover`,e=>{if(this.object===void 0||this.dragging===!0)return;this.raycaster.setFromCamera(e,this.camera);let t=this.intersectObjectWithRay(this.gizmo.picker[this.mode],this.raycaster);t?this.axis=t.object.name:this.axis=null}),Q(this,`pointerDown`,e=>{if(!(this.object===void 0||this.dragging===!0||e.button!==0)&&this.axis!==null){this.raycaster.setFromCamera(e,this.camera);let t=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(t){let e=this.space;if(this.mode===`scale`?e=`local`:(this.axis===`E`||this.axis===`XYZE`||this.axis===`XYZ`)&&(e=`world`),e===`local`&&this.mode===`rotate`){let e=this.rotationSnap;this.axis===`X`&&e&&(this.object.rotation.x=Math.round(this.object.rotation.x/e)*e),this.axis===`Y`&&e&&(this.object.rotation.y=Math.round(this.object.rotation.y/e)*e),this.axis===`Z`&&e&&(this.object.rotation.z=Math.round(this.object.rotation.z/e)*e)}this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.positionStart.copy(this.object.position),this.quaternionStart.copy(this.object.quaternion),this.scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this.worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)}this.dragging=!0,this.mouseDownEvent.mode=this.mode,this.dispatchEvent(this.mouseDownEvent)}}),Q(this,`pointerMove`,e=>{let t=this.axis,n=this.mode,r=this.object,i=this.space;if(n===`scale`?i=`local`:(t===`E`||t===`XYZE`||t===`XYZ`)&&(i=`world`),r===void 0||t===null||this.dragging===!1||e.button!==-1)return;this.raycaster.setFromCamera(e,this.camera);let a=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(a){if(this.pointEnd.copy(a.point).sub(this.worldPositionStart),n===`translate`)this.offset.copy(this.pointEnd).sub(this.pointStart),i===`local`&&t!==`XYZ`&&this.offset.applyQuaternion(this.worldQuaternionInv),t.indexOf(`X`)===-1&&(this.offset.x=0),t.indexOf(`Y`)===-1&&(this.offset.y=0),t.indexOf(`Z`)===-1&&(this.offset.z=0),i===`local`&&t!==`XYZ`?this.offset.applyQuaternion(this.quaternionStart).divide(this.parentScale):this.offset.applyQuaternion(this.parentQuaternionInv).divide(this.parentScale),r.position.copy(this.offset).add(this.positionStart),this.translationSnap&&(i===`local`&&(r.position.applyQuaternion(this.tempQuaternion.copy(this.quaternionStart).invert()),t.search(`X`)!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),t.search(`Y`)!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),t.search(`Z`)!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this.quaternionStart)),i===`world`&&(r.parent&&r.position.add(this.tempVector.setFromMatrixPosition(r.parent.matrixWorld)),t.search(`X`)!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),t.search(`Y`)!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),t.search(`Z`)!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(this.tempVector.setFromMatrixPosition(r.parent.matrixWorld))));else if(n===`scale`){if(t.search(`XYZ`)!==-1){let e=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(e*=-1),this.tempVector2.set(e,e,e)}else this.tempVector.copy(this.pointStart),this.tempVector2.copy(this.pointEnd),this.tempVector.applyQuaternion(this.worldQuaternionInv),this.tempVector2.applyQuaternion(this.worldQuaternionInv),this.tempVector2.divide(this.tempVector),t.search(`X`)===-1&&(this.tempVector2.x=1),t.search(`Y`)===-1&&(this.tempVector2.y=1),t.search(`Z`)===-1&&(this.tempVector2.z=1);r.scale.copy(this.scaleStart).multiply(this.tempVector2),this.scaleSnap&&this.object&&(t.search(`X`)!==-1&&(this.object.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search(`Y`)!==-1&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search(`Z`)!==-1&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(n===`rotate`){this.offset.copy(this.pointEnd).sub(this.pointStart);let e=20/this.worldPosition.distanceTo(this.tempVector.setFromMatrixPosition(this.camera.matrixWorld));t===`E`?(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this.startNorm.copy(this.pointStart).normalize(),this.endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this.endNorm.cross(this.startNorm).dot(this.eye)<0?1:-1):t===`XYZE`?(this.rotationAxis.copy(this.offset).cross(this.eye).normalize(),this.rotationAngle=this.offset.dot(this.tempVector.copy(this.rotationAxis).cross(this.eye))*e):(t===`X`||t===`Y`||t===`Z`)&&(this.rotationAxis.copy(this.unit[t]),this.tempVector.copy(this.unit[t]),i===`local`&&this.tempVector.applyQuaternion(this.worldQuaternion),this.rotationAngle=this.offset.dot(this.tempVector.cross(this.eye).normalize())*e),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),i===`local`&&t!==`E`&&t!==`XYZE`?(r.quaternion.copy(this.quaternionStart),r.quaternion.multiply(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this.parentQuaternionInv),r.quaternion.copy(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this.quaternionStart).normalize())}this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent)}}),Q(this,`pointerUp`,e=>{e.button===0&&(this.dragging&&this.axis!==null&&(this.mouseUpEvent.mode=this.mode,this.dispatchEvent(this.mouseUpEvent)),this.dragging=!1,this.axis=null)}),Q(this,`getPointer`,e=>{var t;if(this.domElement&&(t=this.domElement.ownerDocument)!=null&&t.pointerLockElement)return{x:0,y:0,button:e.button};{let t=e.changedTouches?e.changedTouches[0]:e,n=this.domElement.getBoundingClientRect();return{x:(t.clientX-n.left)/n.width*2-1,y:-(t.clientY-n.top)/n.height*2+1,button:e.button}}}),Q(this,`onPointerHover`,e=>{if(this.enabled)switch(e.pointerType){case`mouse`:case`pen`:this.pointerHover(this.getPointer(e));break}}),Q(this,`onPointerDown`,e=>{!this.enabled||!this.domElement||(this.domElement.style.touchAction=`none`,this.domElement.ownerDocument.addEventListener(`pointermove`,this.onPointerMove),this.pointerHover(this.getPointer(e)),this.pointerDown(this.getPointer(e)))}),Q(this,`onPointerMove`,e=>{this.enabled&&this.pointerMove(this.getPointer(e))}),Q(this,`onPointerUp`,e=>{!this.enabled||!this.domElement||(this.domElement.style.touchAction=``,this.domElement.ownerDocument.removeEventListener(`pointermove`,this.onPointerMove),this.pointerUp(this.getPointer(e)))}),Q(this,`getMode`,()=>this.mode),Q(this,`setMode`,e=>{this.mode=e}),Q(this,`setTranslationSnap`,e=>{this.translationSnap=e}),Q(this,`setRotationSnap`,e=>{this.rotationSnap=e}),Q(this,`setScaleSnap`,e=>{this.scaleSnap=e}),Q(this,`setSize`,e=>{this.size=e}),Q(this,`setSpace`,e=>{this.space=e}),Q(this,`update`,()=>{console.warn(`THREE.TransformControls: update function has no more functionality and therefore has been deprecated.`)}),Q(this,`connect`,e=>{e===document&&console.error(`THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.`),this.domElement=e,this.domElement.addEventListener(`pointerdown`,this.onPointerDown),this.domElement.addEventListener(`pointermove`,this.onPointerHover),this.domElement.ownerDocument.addEventListener(`pointerup`,this.onPointerUp)}),Q(this,`dispose`,()=>{var e,t,n,r,i,a;(e=this.domElement)==null||e.removeEventListener(`pointerdown`,this.onPointerDown),(t=this.domElement)==null||t.removeEventListener(`pointermove`,this.onPointerHover),(r=(n=this.domElement)?.ownerDocument)==null||r.removeEventListener(`pointermove`,this.onPointerMove),(a=(i=this.domElement)?.ownerDocument)==null||a.removeEventListener(`pointerup`,this.onPointerUp),this.traverse(e=>{let t=e;t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()})}),this.domElement=t,this.camera=e,this.gizmo=new YB,this.add(this.gizmo),this.plane=new XB,this.add(this.plane);let n=(e,t)=>{let n=t;Object.defineProperty(this,e,{get:function(){return n===void 0?t:n},set:function(t){n!==t&&(n=t,this.plane[e]=t,this.gizmo[e]=t,this.dispatchEvent({type:e+`-changed`,value:t}),this.dispatchEvent(this.changeEvent))}}),this[e]=t,this.plane[e]=t,this.gizmo[e]=t};n(`camera`,this.camera),n(`object`,this.object),n(`enabled`,this.enabled),n(`axis`,this.axis),n(`mode`,this.mode),n(`translationSnap`,this.translationSnap),n(`rotationSnap`,this.rotationSnap),n(`scaleSnap`,this.scaleSnap),n(`space`,this.space),n(`size`,this.size),n(`dragging`,this.dragging),n(`showX`,this.showX),n(`showY`,this.showY),n(`showZ`,this.showZ),n(`worldPosition`,this.worldPosition),n(`worldPositionStart`,this.worldPositionStart),n(`worldQuaternion`,this.worldQuaternion),n(`worldQuaternionStart`,this.worldQuaternionStart),n(`cameraPosition`,this.cameraPosition),n(`cameraQuaternion`,this.cameraQuaternion),n(`pointStart`,this.pointStart),n(`pointEnd`,this.pointEnd),n(`rotationAxis`,this.rotationAxis),n(`rotationAngle`,this.rotationAngle),n(`eye`,this.eye),t!==void 0&&this.connect(t)}},YB=class extends vt{constructor(){super(),Q(this,`isTransformControlsGizmo`,!0),Q(this,`type`,`TransformControlsGizmo`),Q(this,`tempVector`,new V(0,0,0)),Q(this,`tempEuler`,new It),Q(this,`alignVector`,new V(0,1,0)),Q(this,`zeroVector`,new V(0,0,0)),Q(this,`lookAtMatrix`,new ot),Q(this,`tempQuaternion`,new Je),Q(this,`tempQuaternion2`,new Je),Q(this,`identityQuaternion`,new Je),Q(this,`unitX`,new V(1,0,0)),Q(this,`unitY`,new V(0,1,0)),Q(this,`unitZ`,new V(0,0,1)),Q(this,`gizmo`),Q(this,`picker`),Q(this,`helper`),Q(this,`rotationAxis`,new V),Q(this,`cameraPosition`,new V),Q(this,`worldPositionStart`,new V),Q(this,`worldQuaternionStart`,new Je),Q(this,`worldPosition`,new V),Q(this,`worldQuaternion`,new Je),Q(this,`eye`,new V),Q(this,`camera`,null),Q(this,`enabled`,!0),Q(this,`axis`,null),Q(this,`mode`,`translate`),Q(this,`space`,`world`),Q(this,`size`,1),Q(this,`dragging`,!1),Q(this,`showX`,!0),Q(this,`showY`,!0),Q(this,`showZ`,!0),Q(this,`updateMatrixWorld`,()=>{let e=this.space;this.mode===`scale`&&(e=`local`);let t=e===`local`?this.worldQuaternion:this.identityQuaternion;this.gizmo.translate.visible=this.mode===`translate`,this.gizmo.rotate.visible=this.mode===`rotate`,this.gizmo.scale.visible=this.mode===`scale`,this.helper.translate.visible=this.mode===`translate`,this.helper.rotate.visible=this.mode===`rotate`,this.helper.scale.visible=this.mode===`scale`;let n=[];n=n.concat(this.picker[this.mode].children),n=n.concat(this.gizmo[this.mode].children),n=n.concat(this.helper[this.mode].children);for(let e=0;e.9&&(r.visible=!1)),this.axis===`Y`&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,0,Math.PI/2)),r.quaternion.copy(t).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye))>.9&&(r.visible=!1)),this.axis===`Z`&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),r.quaternion.copy(t).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye))>.9&&(r.visible=!1)),this.axis===`XYZE`&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),this.alignVector.copy(this.rotationAxis),r.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.zeroVector,this.alignVector,this.unitY)),r.quaternion.multiply(this.tempQuaternion),r.visible=this.dragging),this.axis===`E`&&(r.visible=!1)):r.name===`START`?(r.position.copy(this.worldPositionStart),r.visible=this.dragging):r.name===`END`?(r.position.copy(this.worldPosition),r.visible=this.dragging):r.name===`DELTA`?(r.position.copy(this.worldPositionStart),r.quaternion.copy(this.worldQuaternionStart),this.tempVector.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),this.tempVector.applyQuaternion(this.worldQuaternionStart.clone().invert()),r.scale.copy(this.tempVector),r.visible=this.dragging):(r.quaternion.copy(t),this.dragging?r.position.copy(this.worldPositionStart):r.position.copy(this.worldPosition),this.axis&&(r.visible=this.axis.search(r.name)!==-1));continue}r.quaternion.copy(t),this.mode===`translate`||this.mode===`scale`?((r.name===`X`||r.name===`XYZX`)&&Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(t).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),(r.name===`Y`||r.name===`XYZY`)&&Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),(r.name===`Z`||r.name===`XYZZ`)&&Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`XY`&&Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`YZ`&&Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(t).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`XZ`&&Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name.search(`X`)!==-1&&(this.alignVector.copy(this.unitX).applyQuaternion(t).dot(this.eye)<0?r.tag===`fwd`?r.visible=!1:r.scale.x*=-1:r.tag===`bwd`&&(r.visible=!1)),r.name.search(`Y`)!==-1&&(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye)<0?r.tag===`fwd`?r.visible=!1:r.scale.y*=-1:r.tag===`bwd`&&(r.visible=!1)),r.name.search(`Z`)!==-1&&(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye)<0?r.tag===`fwd`?r.visible=!1:r.scale.z*=-1:r.tag===`bwd`&&(r.visible=!1))):this.mode===`rotate`&&(this.tempQuaternion2.copy(t),this.alignVector.copy(this.eye).applyQuaternion(this.tempQuaternion.copy(t).invert()),r.name.search(`E`)!==-1&&r.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.eye,this.zeroVector,this.unitY)),r.name===`X`&&(this.tempQuaternion.setFromAxisAngle(this.unitX,Math.atan2(-this.alignVector.y,this.alignVector.z)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),r.quaternion.copy(this.tempQuaternion)),r.name===`Y`&&(this.tempQuaternion.setFromAxisAngle(this.unitY,Math.atan2(this.alignVector.x,this.alignVector.z)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),r.quaternion.copy(this.tempQuaternion)),r.name===`Z`&&(this.tempQuaternion.setFromAxisAngle(this.unitZ,Math.atan2(this.alignVector.y,this.alignVector.x)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),r.quaternion.copy(this.tempQuaternion))),r.visible=r.visible&&(r.name.indexOf(`X`)===-1||this.showX),r.visible=r.visible&&(r.name.indexOf(`Y`)===-1||this.showY),r.visible=r.visible&&(r.name.indexOf(`Z`)===-1||this.showZ),r.visible=r.visible&&(r.name.indexOf(`E`)===-1||this.showX&&this.showY&&this.showZ),r.material.tempOpacity=r.material.tempOpacity||r.material.opacity,r.material.tempColor=r.material.tempColor||r.material.color.clone(),r.material.color.copy(r.material.tempColor),r.material.opacity=r.material.tempOpacity,this.enabled?this.axis&&(r.name===this.axis||this.axis.split(``).some(function(e){return r.name===e})?(r.material.opacity=1,r.material.color.lerp(new _t(1,1,1),.5)):(r.material.opacity*=.25,r.material.color.lerp(new _t(1,1,1),.5))):(r.material.opacity*=.5,r.material.color.lerp(new _t(1,1,1),.5))}super.updateMatrixWorld()});let e=new Te({depthTest:!1,depthWrite:!1,transparent:!0,side:Rt,fog:!1,toneMapped:!1}),t=new Wt({depthTest:!1,depthWrite:!1,transparent:!0,linewidth:1,fog:!1,toneMapped:!1}),n=e.clone();n.opacity=.15;let r=e.clone();r.opacity=.33;let i=e.clone();i.color.set(16711680);let a=e.clone();a.color.set(65280);let o=e.clone();o.color.set(255);let s=e.clone();s.opacity=.25;let c=s.clone();c.color.set(16776960);let l=s.clone();l.color.set(65535);let u=s.clone();u.color.set(16711935),e.clone().color.set(16776960);let d=t.clone();d.color.set(16711680);let f=t.clone();f.color.set(65280);let p=t.clone();p.color.set(255);let m=t.clone();m.color.set(65535);let h=t.clone();h.color.set(16711935);let g=t.clone();g.color.set(16776960);let _=t.clone();_.color.set(7895160);let v=g.clone();v.opacity=.25;let y=new ie(0,.05,.2,12,1,!1),b=new we(.125,.125,.125),x=new de;x.setAttribute(`position`,new mt([0,0,0,1,0,0],3));let S=(e,t)=>{let n=new de,r=[];for(let n=0;n<=64*t;++n)r.push(0,Math.cos(n/32*Math.PI)*e,Math.sin(n/32*Math.PI)*e);return n.setAttribute(`position`,new mt(r,3)),n},C=()=>{let e=new de;return e.setAttribute(`position`,new mt([0,0,0,1,1,1],3)),e},w={X:[[new be(y,i),[1,0,0],[0,0,-Math.PI/2],null,`fwd`],[new be(y,i),[1,0,0],[0,0,Math.PI/2],null,`bwd`],[new Ne(x,d)]],Y:[[new be(y,a),[0,1,0],null,null,`fwd`],[new be(y,a),[0,1,0],[Math.PI,0,0],null,`bwd`],[new Ne(x,f),null,[0,0,Math.PI/2]]],Z:[[new be(y,o),[0,0,1],[Math.PI/2,0,0],null,`fwd`],[new be(y,o),[0,0,1],[-Math.PI/2,0,0],null,`bwd`],[new Ne(x,p),null,[0,-Math.PI/2,0]]],XYZ:[[new be(new Yt(.1,0),s.clone()),[0,0,0],[0,0,0]]],XY:[[new be(new Et(.295,.295),c.clone()),[.15,.15,0]],[new Ne(x,g),[.18,.3,0],null,[.125,1,1]],[new Ne(x,g),[.3,.18,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new be(new Et(.295,.295),l.clone()),[0,.15,.15],[0,Math.PI/2,0]],[new Ne(x,m),[0,.18,.3],[0,0,Math.PI/2],[.125,1,1]],[new Ne(x,m),[0,.3,.18],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new be(new Et(.295,.295),u.clone()),[.15,0,.15],[-Math.PI/2,0,0]],[new Ne(x,h),[.18,0,.3],null,[.125,1,1]],[new Ne(x,h),[.3,0,.18],[0,-Math.PI/2,0],[.125,1,1]]]},T={X:[[new be(new ie(.2,0,1,4,1,!1),n),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new be(new ie(.2,0,1,4,1,!1),n),[0,.6,0]]],Z:[[new be(new ie(.2,0,1,4,1,!1),n),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new be(new Yt(.2,0),n)]],XY:[[new be(new Et(.4,.4),n),[.2,.2,0]]],YZ:[[new be(new Et(.4,.4),n),[0,.2,.2],[0,Math.PI/2,0]]],XZ:[[new be(new Et(.4,.4),n),[.2,0,.2],[-Math.PI/2,0,0]]]},E={START:[[new be(new Yt(.01,2),r),null,null,null,`helper`]],END:[[new be(new Yt(.01,2),r),null,null,null,`helper`]],DELTA:[[new Ne(C(),r),null,null,null,`helper`]],X:[[new Ne(x,r.clone()),[-1e3,0,0],null,[1e6,1,1],`helper`]],Y:[[new Ne(x,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],`helper`]],Z:[[new Ne(x,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],`helper`]]},D={X:[[new Ne(S(1,.5),d)],[new be(new Yt(.04,0),i),[0,0,.99],null,[1,3,1]]],Y:[[new Ne(S(1,.5),f),null,[0,0,-Math.PI/2]],[new be(new Yt(.04,0),a),[0,0,.99],null,[3,1,1]]],Z:[[new Ne(S(1,.5),p),null,[0,Math.PI/2,0]],[new be(new Yt(.04,0),o),[.99,0,0],null,[1,3,1]]],E:[[new Ne(S(1.25,1),v),null,[0,Math.PI/2,0]],[new be(new ie(.03,0,.15,4,1,!1),v),[1.17,0,0],[0,0,-Math.PI/2],[1,1,.001]],[new be(new ie(.03,0,.15,4,1,!1),v),[-1.17,0,0],[0,0,Math.PI/2],[1,1,.001]],[new be(new ie(.03,0,.15,4,1,!1),v),[0,-1.17,0],[Math.PI,0,0],[1,1,.001]],[new be(new ie(.03,0,.15,4,1,!1),v),[0,1.17,0],[0,0,0],[1,1,.001]]],XYZE:[[new Ne(S(1,1),_),null,[0,Math.PI/2,0]]]},O={AXIS:[[new Ne(x,r.clone()),[-1e3,0,0],null,[1e6,1,1],`helper`]]},k={X:[[new be(new Vt(1,.1,4,24),n),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new be(new Vt(1,.1,4,24),n),[0,0,0],[Math.PI/2,0,0]]],Z:[[new be(new Vt(1,.1,4,24),n),[0,0,0],[0,0,-Math.PI/2]]],E:[[new be(new Vt(1.25,.1,2,24),n)]],XYZE:[[new be(new We(.7,10,8),n)]]},A={X:[[new be(b,i),[.8,0,0],[0,0,-Math.PI/2]],[new Ne(x,d),null,null,[.8,1,1]]],Y:[[new be(b,a),[0,.8,0]],[new Ne(x,f),null,[0,0,Math.PI/2],[.8,1,1]]],Z:[[new be(b,o),[0,0,.8],[Math.PI/2,0,0]],[new Ne(x,p),null,[0,-Math.PI/2,0],[.8,1,1]]],XY:[[new be(b,c),[.85,.85,0],null,[2,2,.2]],[new Ne(x,g),[.855,.98,0],null,[.125,1,1]],[new Ne(x,g),[.98,.855,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new be(b,l),[0,.85,.85],null,[.2,2,2]],[new Ne(x,m),[0,.855,.98],[0,0,Math.PI/2],[.125,1,1]],[new Ne(x,m),[0,.98,.855],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new be(b,u),[.85,0,.85],null,[2,.2,2]],[new Ne(x,h),[.855,0,.98],null,[.125,1,1]],[new Ne(x,h),[.98,0,.855],[0,-Math.PI/2,0],[.125,1,1]]],XYZX:[[new be(new we(.125,.125,.125),s.clone()),[1.1,0,0]]],XYZY:[[new be(new we(.125,.125,.125),s.clone()),[0,1.1,0]]],XYZZ:[[new be(new we(.125,.125,.125),s.clone()),[0,0,1.1]]]},j={X:[[new be(new ie(.2,0,.8,4,1,!1),n),[.5,0,0],[0,0,-Math.PI/2]]],Y:[[new be(new ie(.2,0,.8,4,1,!1),n),[0,.5,0]]],Z:[[new be(new ie(.2,0,.8,4,1,!1),n),[0,0,.5],[Math.PI/2,0,0]]],XY:[[new be(b,n),[.85,.85,0],null,[3,3,.2]]],YZ:[[new be(b,n),[0,.85,.85],null,[.2,3,3]]],XZ:[[new be(b,n),[.85,0,.85],null,[3,.2,3]]],XYZX:[[new be(new we(.2,.2,.2),n),[1.1,0,0]]],XYZY:[[new be(new we(.2,.2,.2),n),[0,1.1,0]]],XYZZ:[[new be(new we(.2,.2,.2),n),[0,0,1.1]]]},M={X:[[new Ne(x,r.clone()),[-1e3,0,0],null,[1e6,1,1],`helper`]],Y:[[new Ne(x,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],`helper`]],Z:[[new Ne(x,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],`helper`]]},N=e=>{let t=new vt;for(let n in e)for(let r=e[n].length;r--;){let i=e[n][r][0].clone(),a=e[n][r][1],o=e[n][r][2],s=e[n][r][3],c=e[n][r][4];i.name=n,i.tag=c,a&&i.position.set(a[0],a[1],a[2]),o&&i.rotation.set(o[0],o[1],o[2]),s&&i.scale.set(s[0],s[1],s[2]),i.updateMatrix();let l=i.geometry.clone();l.applyMatrix4(i.matrix),i.geometry=l,i.renderOrder=1/0,i.position.set(0,0,0),i.rotation.set(0,0,0),i.scale.set(1,1,1),t.add(i)}return t};this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=N(w)),this.add(this.gizmo.rotate=N(D)),this.add(this.gizmo.scale=N(A)),this.add(this.picker.translate=N(T)),this.add(this.picker.rotate=N(k)),this.add(this.picker.scale=N(j)),this.add(this.helper.translate=N(E)),this.add(this.helper.rotate=N(O)),this.add(this.helper.scale=N(M)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}},XB=class extends be{constructor(){super(new Et(1e5,1e5,2,2),new Te({visible:!1,wireframe:!0,side:Rt,transparent:!0,opacity:.1,toneMapped:!1})),Q(this,`isTransformControlsPlane`,!0),Q(this,`type`,`TransformControlsPlane`),Q(this,`unitX`,new V(1,0,0)),Q(this,`unitY`,new V(0,1,0)),Q(this,`unitZ`,new V(0,0,1)),Q(this,`tempVector`,new V),Q(this,`dirVector`,new V),Q(this,`alignVector`,new V),Q(this,`tempMatrix`,new ot),Q(this,`identityQuaternion`,new Je),Q(this,`cameraQuaternion`,new Je),Q(this,`worldPosition`,new V),Q(this,`worldQuaternion`,new Je),Q(this,`eye`,new V),Q(this,`axis`,null),Q(this,`mode`,`translate`),Q(this,`space`,`world`),Q(this,`updateMatrixWorld`,()=>{let e=this.space;switch(this.position.copy(this.worldPosition),this.mode===`scale`&&(e=`local`),this.unitX.set(1,0,0).applyQuaternion(e===`local`?this.worldQuaternion:this.identityQuaternion),this.unitY.set(0,1,0).applyQuaternion(e===`local`?this.worldQuaternion:this.identityQuaternion),this.unitZ.set(0,0,1).applyQuaternion(e===`local`?this.worldQuaternion:this.identityQuaternion),this.alignVector.copy(this.unitY),this.mode){case`translate`:case`scale`:switch(this.axis){case`X`:this.alignVector.copy(this.eye).cross(this.unitX),this.dirVector.copy(this.unitX).cross(this.alignVector);break;case`Y`:this.alignVector.copy(this.eye).cross(this.unitY),this.dirVector.copy(this.unitY).cross(this.alignVector);break;case`Z`:this.alignVector.copy(this.eye).cross(this.unitZ),this.dirVector.copy(this.unitZ).cross(this.alignVector);break;case`XY`:this.dirVector.copy(this.unitZ);break;case`YZ`:this.dirVector.copy(this.unitX);break;case`XZ`:this.alignVector.copy(this.unitZ),this.dirVector.copy(this.unitY);break;case`XYZ`:case`E`:this.dirVector.set(0,0,0);break}break;case`rotate`:default:this.dirVector.set(0,0,0)}this.dirVector.length()===0?this.quaternion.copy(this.cameraQuaternion):(this.tempMatrix.lookAt(this.tempVector.set(0,0,0),this.dirVector,this.alignVector),this.quaternion.setFromRotationMatrix(this.tempMatrix)),super.updateMatrixWorld()})}},ZB=Object.defineProperty,QB=(e,t,n)=>t in e?ZB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$B=(e,t,n)=>(QB(e,typeof t==`symbol`?t:t+``,n),n);const eV=new It(0,0,0,`YXZ`),tV=new V,nV={type:`change`},rV={type:`lock`},iV={type:`unlock`},aV=Math.PI/2;var oV=class extends Dt{constructor(e,t){super(),$B(this,`camera`),$B(this,`domElement`),$B(this,`isLocked`),$B(this,`minPolarAngle`),$B(this,`maxPolarAngle`),$B(this,`pointerSpeed`),$B(this,`onMouseMove`,e=>{if(!this.domElement||this.isLocked===!1)return;let t=e.movementX||e.mozMovementX||e.webkitMovementX||0,n=e.movementY||e.mozMovementY||e.webkitMovementY||0;eV.setFromQuaternion(this.camera.quaternion),eV.y-=t*.002*this.pointerSpeed,eV.x-=n*.002*this.pointerSpeed,eV.x=Math.max(aV-this.maxPolarAngle,Math.min(aV-this.minPolarAngle,eV.x)),this.camera.quaternion.setFromEuler(eV),this.dispatchEvent(nV)}),$B(this,`onPointerlockChange`,()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(rV),this.isLocked=!0):(this.dispatchEvent(iV),this.isLocked=!1))}),$B(this,`onPointerlockError`,()=>{console.error(`THREE.PointerLockControls: Unable to use Pointer Lock API`)}),$B(this,`connect`,e=>{this.domElement=e||this.domElement,this.domElement&&(this.domElement.ownerDocument.addEventListener(`mousemove`,this.onMouseMove),this.domElement.ownerDocument.addEventListener(`pointerlockchange`,this.onPointerlockChange),this.domElement.ownerDocument.addEventListener(`pointerlockerror`,this.onPointerlockError))}),$B(this,`disconnect`,()=>{this.domElement&&(this.domElement.ownerDocument.removeEventListener(`mousemove`,this.onMouseMove),this.domElement.ownerDocument.removeEventListener(`pointerlockchange`,this.onPointerlockChange),this.domElement.ownerDocument.removeEventListener(`pointerlockerror`,this.onPointerlockError))}),$B(this,`dispose`,()=>{this.disconnect()}),$B(this,`getObject`,()=>this.camera),$B(this,`direction`,new V(0,0,-1)),$B(this,`getDirection`,e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion)),$B(this,`moveForward`,e=>{tV.setFromMatrixColumn(this.camera.matrix,0),tV.crossVectors(this.camera.up,tV),this.camera.position.addScaledVector(tV,e)}),$B(this,`moveRight`,e=>{tV.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector(tV,e)}),$B(this,`lock`,()=>{this.domElement&&this.domElement.requestPointerLock()}),$B(this,`unlock`,()=>{this.domElement&&this.domElement.ownerDocument.exitPointerLock()}),this.camera=e,this.domElement=t,this.isLocked=!1,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.pointerSpeed=1,t&&this.connect(t)}},sV=Object.defineProperty,cV=(e,t,n)=>t in e?sV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lV=(e,t,n)=>(cV(e,typeof t==`symbol`?t:t+``,n),n);const uV=new Bt,dV=new Ge,fV=Math.cos(70*(Math.PI/180)),pV=(e,t)=>(e%t+t)%t;var mV=class extends Dt{constructor(e,t){super(),lV(this,`object`),lV(this,`domElement`),lV(this,`enabled`,!0),lV(this,`target`,new V),lV(this,`minDistance`,0),lV(this,`maxDistance`,1/0),lV(this,`minZoom`,0),lV(this,`maxZoom`,1/0),lV(this,`minPolarAngle`,0),lV(this,`maxPolarAngle`,Math.PI),lV(this,`minAzimuthAngle`,-1/0),lV(this,`maxAzimuthAngle`,1/0),lV(this,`enableDamping`,!1),lV(this,`dampingFactor`,.05),lV(this,`enableZoom`,!0),lV(this,`zoomSpeed`,1),lV(this,`enableRotate`,!0),lV(this,`rotateSpeed`,1),lV(this,`enablePan`,!0),lV(this,`panSpeed`,1),lV(this,`screenSpacePanning`,!0),lV(this,`keyPanSpeed`,7),lV(this,`zoomToCursor`,!1),lV(this,`autoRotate`,!1),lV(this,`autoRotateSpeed`,2),lV(this,`reverseOrbit`,!1),lV(this,`reverseHorizontalOrbit`,!1),lV(this,`reverseVerticalOrbit`,!1),lV(this,`keys`,{LEFT:`ArrowLeft`,UP:`ArrowUp`,RIGHT:`ArrowRight`,BOTTOM:`ArrowDown`}),lV(this,`mouseButtons`,{LEFT:Ue.ROTATE,MIDDLE:Ue.DOLLY,RIGHT:Ue.PAN}),lV(this,`touches`,{ONE:Ke.ROTATE,TWO:Ke.DOLLY_PAN}),lV(this,`target0`),lV(this,`position0`),lV(this,`zoom0`),lV(this,`_domElementKeyEvents`,null),lV(this,`getPolarAngle`),lV(this,`getAzimuthalAngle`),lV(this,`setPolarAngle`),lV(this,`setAzimuthalAngle`),lV(this,`getDistance`),lV(this,`getZoomScale`),lV(this,`listenToKeyEvents`),lV(this,`stopListenToKeyEvents`),lV(this,`saveState`),lV(this,`reset`),lV(this,`update`),lV(this,`connect`),lV(this,`dispose`),lV(this,`dollyIn`),lV(this,`dollyOut`),lV(this,`getScale`),lV(this,`setScale`),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>l.phi,this.getAzimuthalAngle=()=>l.theta,this.setPolarAngle=e=>{let t=pV(e,2*Math.PI),r=l.phi;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i{let t=pV(e,2*Math.PI),r=l.theta;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-in.object.position.distanceTo(n.target),this.listenToKeyEvents=e=>{e.addEventListener(`keydown`,Ce),this._domElementKeyEvents=e},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener(`keydown`,Ce),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(r),n.update(),s=o.NONE},this.update=(()=>{let t=new V,i=new V(0,1,0),a=new Je().setFromUnitVectors(e.up,i),p=a.clone().invert(),m=new V,h=new Je,g=2*Math.PI;return function(){let _=n.object.position;a.setFromUnitVectors(e.up,i),p.copy(a).invert(),t.copy(_).sub(n.target),t.applyQuaternion(a),l.setFromVector3(t),n.autoRotate&&s===o.NONE&&k(D()),n.enableDamping?(l.theta+=u.theta*n.dampingFactor,l.phi+=u.phi*n.dampingFactor):(l.theta+=u.theta,l.phi+=u.phi);let v=n.minAzimuthAngle,y=n.maxAzimuthAngle;isFinite(v)&&isFinite(y)&&(v<-Math.PI?v+=g:v>Math.PI&&(v-=g),y<-Math.PI?y+=g:y>Math.PI&&(y-=g),v<=y?l.theta=Math.max(v,Math.min(y,l.theta)):l.theta=l.theta>(v+y)/2?Math.max(v,l.theta):Math.min(y,l.theta)),l.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,l.phi)),l.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(f,n.dampingFactor):n.target.add(f),n.zoomToCursor&&w||n.object.isOrthographicCamera?l.radius=L(l.radius):l.radius=L(l.radius*d),t.setFromSpherical(l),t.applyQuaternion(p),_.copy(n.target).add(t),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),n.enableDamping===!0?(u.theta*=1-n.dampingFactor,u.phi*=1-n.dampingFactor,f.multiplyScalar(1-n.dampingFactor)):(u.set(0,0,0),f.set(0,0,0));let b=!1;if(n.zoomToCursor&&w){let r=null;if(n.object instanceof wt&&n.object.isPerspectiveCamera){let e=t.length();r=L(e*d);let i=e-r;n.object.position.addScaledVector(S,i),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){let e=new V(C.x,C.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/d)),n.object.updateProjectionMatrix(),b=!0;let i=new V(C.x,C.y,0);i.unproject(n.object),n.object.position.sub(i).add(e),n.object.updateMatrixWorld(),r=t.length()}else console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.`),n.zoomToCursor=!1;r!==null&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(r).add(n.object.position):(uV.origin.copy(n.object.position),uV.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(uV.direction))c||8*(1-h.dot(n.object.quaternion))>c?(n.dispatchEvent(r),m.copy(n.object.position),h.copy(n.object.quaternion),b=!1,!0):!1}})(),this.connect=e=>{n.domElement=e,n.domElement.style.touchAction=`none`,n.domElement.addEventListener(`contextmenu`,Ee),n.domElement.addEventListener(`pointerdown`,ge),n.domElement.addEventListener(`pointercancel`,ye),n.domElement.addEventListener(`wheel`,Se)},this.dispose=()=>{var e,t,r,i,a,o;n.domElement&&(n.domElement.style.touchAction=`auto`),(e=n.domElement)==null||e.removeEventListener(`contextmenu`,Ee),(t=n.domElement)==null||t.removeEventListener(`pointerdown`,ge),(r=n.domElement)==null||r.removeEventListener(`pointercancel`,ye),(i=n.domElement)==null||i.removeEventListener(`wheel`,Se),(a=n.domElement)==null||a.ownerDocument.removeEventListener(`pointermove`,_e),(o=n.domElement)==null||o.ownerDocument.removeEventListener(`pointerup`,ye),n._domElementKeyEvents!==null&&n._domElementKeyEvents.removeEventListener(`keydown`,Ce)};let n=this,r={type:`change`},i={type:`start`},a={type:`end`},o={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},s=o.NONE,c=1e-6,l=new Pt,u=new Pt,d=1,f=new V,p=new ve,m=new ve,h=new ve,g=new ve,_=new ve,v=new ve,y=new ve,b=new ve,x=new ve,S=new V,C=new ve,w=!1,T=[],E={};function D(){return 2*Math.PI/60/60*n.autoRotateSpeed}function O(){return .95**n.zoomSpeed}function k(e){n.reverseOrbit||n.reverseHorizontalOrbit?u.theta+=e:u.theta-=e}function A(e){n.reverseOrbit||n.reverseVerticalOrbit?u.phi+=e:u.phi-=e}let j=(()=>{let e=new V;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),f.add(e)}})(),M=(()=>{let e=new V;return function(t,r){n.screenSpacePanning===!0?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),f.add(e)}})(),N=(()=>{let e=new V;return function(t,r){let i=n.domElement;if(i&&n.object instanceof wt&&n.object.isPerspectiveCamera){let a=n.object.position;e.copy(a).sub(n.target);let o=e.length();o*=Math.tan(n.object.fov/2*Math.PI/180),j(2*t*o/i.clientHeight,n.object.matrix),M(2*r*o/i.clientHeight,n.object.matrix)}else i&&n.object instanceof Ut&&n.object.isOrthographicCamera?(j(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),M(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.`),n.enablePan=!1)}})();function ee(e){n.object instanceof wt&&n.object.isPerspectiveCamera||n.object instanceof Ut&&n.object.isOrthographicCamera?d=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),n.enableZoom=!1)}function P(e){ee(d/e)}function F(e){ee(d*e)}function I(e){if(!n.zoomToCursor||!n.domElement)return;w=!0;let t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,a=t.width,o=t.height;C.x=r/a*2-1,C.y=-(i/o)*2+1,S.set(C.x,C.y,1).unproject(n.object).sub(n.object.position).normalize()}function L(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function R(e){p.set(e.clientX,e.clientY)}function z(e){I(e),y.set(e.clientX,e.clientY)}function te(e){g.set(e.clientX,e.clientY)}function B(e){m.set(e.clientX,e.clientY),h.subVectors(m,p).multiplyScalar(n.rotateSpeed);let t=n.domElement;t&&(k(2*Math.PI*h.x/t.clientHeight),A(2*Math.PI*h.y/t.clientHeight)),p.copy(m),n.update()}function ne(e){b.set(e.clientX,e.clientY),x.subVectors(b,y),x.y>0?P(O()):x.y<0&&F(O()),y.copy(b),n.update()}function re(e){_.set(e.clientX,e.clientY),v.subVectors(_,g).multiplyScalar(n.panSpeed),N(v.x,v.y),g.copy(_),n.update()}function ie(e){I(e),e.deltaY<0?F(O()):e.deltaY>0&&P(O()),n.update()}function ae(e){let t=!1;switch(e.code){case n.keys.UP:N(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:N(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:N(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:N(-n.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),n.update())}function oe(){if(T.length==1)p.set(T[0].pageX,T[0].pageY);else{let e=.5*(T[0].pageX+T[1].pageX),t=.5*(T[0].pageY+T[1].pageY);p.set(e,t)}}function se(){if(T.length==1)g.set(T[0].pageX,T[0].pageY);else{let e=.5*(T[0].pageX+T[1].pageX),t=.5*(T[0].pageY+T[1].pageY);g.set(e,t)}}function ce(){let e=T[0].pageX-T[1].pageX,t=T[0].pageY-T[1].pageY,n=Math.sqrt(e*e+t*t);y.set(0,n)}function le(){n.enableZoom&&ce(),n.enablePan&&se()}function ue(){n.enableZoom&&ce(),n.enableRotate&&oe()}function de(e){if(T.length==1)m.set(e.pageX,e.pageY);else{let t=Ae(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);m.set(n,r)}h.subVectors(m,p).multiplyScalar(n.rotateSpeed);let t=n.domElement;t&&(k(2*Math.PI*h.x/t.clientHeight),A(2*Math.PI*h.y/t.clientHeight)),p.copy(m)}function fe(e){if(T.length==1)_.set(e.pageX,e.pageY);else{let t=Ae(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);_.set(n,r)}v.subVectors(_,g).multiplyScalar(n.panSpeed),N(v.x,v.y),g.copy(_)}function pe(e){let t=Ae(e),r=e.pageX-t.x,i=e.pageY-t.y,a=Math.sqrt(r*r+i*i);b.set(0,a),x.set(0,(b.y/y.y)**+n.zoomSpeed),P(x.y),y.copy(b)}function me(e){n.enableZoom&&pe(e),n.enablePan&&fe(e)}function he(e){n.enableZoom&&pe(e),n.enableRotate&&de(e)}function ge(e){var t,r;n.enabled!==!1&&(T.length===0&&((t=n.domElement)==null||t.ownerDocument.addEventListener(`pointermove`,_e),(r=n.domElement)==null||r.ownerDocument.addEventListener(`pointerup`,ye)),De(e),e.pointerType===`touch`?we(e):be(e))}function _e(e){n.enabled!==!1&&(e.pointerType===`touch`?Te(e):xe(e))}function ye(e){var t,r,i;Oe(e),T.length===0&&((t=n.domElement)==null||t.releasePointerCapture(e.pointerId),(r=n.domElement)==null||r.ownerDocument.removeEventListener(`pointermove`,_e),(i=n.domElement)==null||i.ownerDocument.removeEventListener(`pointerup`,ye)),n.dispatchEvent(a),s=o.NONE}function be(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case Ue.DOLLY:if(n.enableZoom===!1)return;z(e),s=o.DOLLY;break;case Ue.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(n.enablePan===!1)return;te(e),s=o.PAN}else{if(n.enableRotate===!1)return;R(e),s=o.ROTATE}break;case Ue.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(n.enableRotate===!1)return;R(e),s=o.ROTATE}else{if(n.enablePan===!1)return;te(e),s=o.PAN}break;default:s=o.NONE}s!==o.NONE&&n.dispatchEvent(i)}function xe(e){if(n.enabled!==!1)switch(s){case o.ROTATE:if(n.enableRotate===!1)return;B(e);break;case o.DOLLY:if(n.enableZoom===!1)return;ne(e);break;case o.PAN:if(n.enablePan===!1)return;re(e);break}}function Se(e){n.enabled===!1||n.enableZoom===!1||s!==o.NONE&&s!==o.ROTATE||(e.preventDefault(),n.dispatchEvent(i),ie(e),n.dispatchEvent(a))}function Ce(e){n.enabled===!1||n.enablePan===!1||ae(e)}function we(e){switch(ke(e),T.length){case 1:switch(n.touches.ONE){case Ke.ROTATE:if(n.enableRotate===!1)return;oe(),s=o.TOUCH_ROTATE;break;case Ke.PAN:if(n.enablePan===!1)return;se(),s=o.TOUCH_PAN;break;default:s=o.NONE}break;case 2:switch(n.touches.TWO){case Ke.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;le(),s=o.TOUCH_DOLLY_PAN;break;case Ke.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;ue(),s=o.TOUCH_DOLLY_ROTATE;break;default:s=o.NONE}break;default:s=o.NONE}s!==o.NONE&&n.dispatchEvent(i)}function Te(e){switch(ke(e),s){case o.TOUCH_ROTATE:if(n.enableRotate===!1)return;de(e),n.update();break;case o.TOUCH_PAN:if(n.enablePan===!1)return;fe(e),n.update();break;case o.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;me(e),n.update();break;case o.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;he(e),n.update();break;default:s=o.NONE}}function Ee(e){n.enabled!==!1&&e.preventDefault()}function De(e){T.push(e)}function Oe(e){delete E[e.pointerId];for(let t=0;t{F(e),n.update()},this.dollyOut=(e=O())=>{P(e),n.update()},this.getScale=()=>d,this.setScale=e=>{ee(e),n.update()},this.getZoomScale=()=>O(),t!==void 0&&this.connect(t),this.update()}},hV=class extends mV{constructor(e,t){super(e,t),this.screenSpacePanning=!1,this.mouseButtons.LEFT=Ue.PAN,this.mouseButtons.RIGHT=Ue.ROTATE,this.touches.ONE=Ke.PAN,this.touches.TWO=Ke.DOLLY_ROTATE}};const gV=new Je,_V={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},vV={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},yV={9728:ft,9729:Pe,9984:ht,9985:Be,9986:bt,9987:Ye},bV={33071:Jt,33648:tn,10497:Kt},xV={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},SV={POSITION:`position`,NORMAL:`normal`,TANGENT:`tangent`,...tz>=152?{TEXCOORD_0:`uv`,TEXCOORD_1:`uv1`,TEXCOORD_2:`uv2`,TEXCOORD_3:`uv3`}:{TEXCOORD_0:`uv`,TEXCOORD_1:`uv2`},COLOR_0:`color`,WEIGHTS_0:`skinWeight`,JOINTS_0:`skinIndex`},CV={scale:`scale`,translation:`position`,rotation:`quaternion`,weights:`morphTargetInfluences`},wV={CUBICSPLINE:void 0,LINEAR:zt,STEP:Mt},TV={OPAQUE:`OPAQUE`,MASK:`MASK`,BLEND:`BLEND`},EV=new ot,DV=new V;function OV(e,t,n,r,i,a){let o=2*Math.PI*i/4,s=Math.max(a-2*i,0),c=Math.PI/4;DV.copy(t),DV[r]=0,DV.normalize();let l=.5*o/(o+s),u=1-DV.angleTo(e)/c;return Math.sign(DV[n])===1?u*l:s/(o+s)+l+l*(1-u)}var kV=class extends we{constructor(e=1,t=1,n=1,r=2,i=.1){if(r=r*2+1,i=Math.min(e/2,t/2,n/2,i),super(1,1,1,r,r,r),r===1)return;let a=this.toNonIndexed();this.index=null,this.attributes.position=a.attributes.position,this.attributes.normal=a.attributes.normal,this.attributes.uv=a.attributes.uv;let o=new V,s=new V,c=new V(e,t,n).divideScalar(2).subScalar(i),l=this.attributes.position.array,u=this.attributes.normal.array,d=this.attributes.uv.array,f=l.length/6,p=new V,m=.5/r;for(let r=0,a=0;rt in e?FV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LV=(e,t,n)=>(IV(e,typeof t==`symbol`?t:t+``,n),n),RV=class extends te{constructor(e){super(e)}load(e,t,n,r){let i=new pt(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,e=>{if(typeof e!=`string`)throw Error(`unsupported data type`);let n=JSON.parse(e),r=this.parse(n);t&&t(r)},n,r)}loadAsync(e,t){return super.loadAsync(e,t)}parse(e){return new zV(e)}},zV=class{constructor(e){LV(this,`data`),this.data=e}generateShapes(e,t=100,n){let r=[],i={letterSpacing:0,lineHeight:1,...n},a=BV(e,t,this.data,i);for(let e=0,t=a.length;e(a=c.indexOf(n))&&o=e.byteLength||!(l=r(e)))&&t(1,`no header found`),(u=l.match(n))||t(3,`bad initial token`),c.valid|=1,c.programtype=u[1],c.string+=l+` +`;l=r(e),l!==!1;){if(c.string+=l+` +`,l.charAt(0)===`#`){c.comments+=l+` +`;continue}if((u=l.match(i))&&(c.gamma=parseFloat(u[1])),(u=l.match(a))&&(c.exposure=parseFloat(u[1])),(u=l.match(o))&&(c.valid|=2,c.format=u[1]),(u=l.match(s))&&(c.valid|=4,c.height=parseInt(u[1],10),c.width=parseInt(u[2],10)),c.valid&2&&c.valid&4)break}return c.valid&2||t(3,`missing format specifier`),c.valid&4||t(3,`missing image size specifier`),c},a=function(e,n,r){let i=n;if(i<8||i>32767||e[0]!==2||e[1]!==2||e[2]&128)return new Uint8Array(e);i!==(e[2]<<8|e[3])&&t(3,`wrong scanline width`);let a=new Uint8Array(4*n*r);a.length||t(4,`unable to allocate buffer space`);let o=0,s=0,c=4*i,l=new Uint8Array(4),u=new Uint8Array(c),d=r;for(;d>0&&se.byteLength&&t(1),l[0]=e[s++],l[1]=e[s++],l[2]=e[s++],l[3]=e[s++],(l[0]!=2||l[1]!=2||(l[2]<<8|l[3])!=i)&&t(3,`bad rgbe scanline format`);let n=0,r;for(;n128;if(i&&(r-=128),(r===0||n+r>c)&&t(3,`bad scanline data`),i){let t=e[s++];for(let e=0;e0?F.copy(k[k.length-1]):F.identity())}function r(e){let t=new st,n=new ve,r=new ve,i=new ve,o=!0,s=!1,c=e.getAttribute(`d`);if(c===``||c===`none`)return null;let l=c.match(/[a-df-z][^a-df-z]*/gi);for(let e=0,c=l.length;e0&&(n.copy(i),t.currentPath.currentPoint.copy(n),o=!0);break;default:console.warn(c)}s=!1}return t}function i(e){if(!(!e.sheet||!e.sheet.cssRules||!e.sheet.cssRules.length))for(let t=0;te.trim());for(let e=0;ee!==``));O[r[e]]=Object.assign(O[r[e]]||{},t)}}}function a(e,t,n,r,i,a,s,c){if(t==0||n==0){e.lineTo(c.x,c.y);return}r=r*Math.PI/180,t=Math.abs(t),n=Math.abs(n);let l=(s.x-c.x)/2,u=(s.y-c.y)/2,d=Math.cos(r)*l+Math.sin(r)*u,f=-Math.sin(r)*l+Math.cos(r)*u,p=t*t,m=n*n,h=d*d,g=f*f,_=h/p+g/m;if(_>1){let e=Math.sqrt(_);t=e*t,n=e*n,p=t*t,m=n*n}let v=p*g+m*h,y=(p*m-v)/v,b=Math.sqrt(Math.max(0,y));i===a&&(b=-b);let x=b*t*f/n,S=-b*n*d/t,C=Math.cos(r)*x-Math.sin(r)*S+(s.x+c.x)/2,w=Math.sin(r)*x+Math.cos(r)*S+(s.y+c.y)/2,T=o(1,0,(d-x)/t,(f-S)/n),E=o((d-x)/t,(f-S)/n,(-d-x)/t,(-f-S)/n)%(Math.PI*2);e.currentPath.absellipse(C,w,t,n,T,T+E,a===0,r)}function o(e,t,n,r){let i=e*n+t*r,a=Math.sqrt(e*e+t*t)*Math.sqrt(n*n+r*r),o=Math.acos(Math.max(-1,Math.min(1,i/a)));return e*r-t*n<0&&(o=-o),o}function s(e){let t=v(e.getAttribute(`x`)||0),n=v(e.getAttribute(`y`)||0),r=v(e.getAttribute(`rx`)||e.getAttribute(`ry`)||0),i=v(e.getAttribute(`ry`)||e.getAttribute(`rx`)||0),a=v(e.getAttribute(`width`)),o=v(e.getAttribute(`height`)),s=.448084975506,c=new st;return c.moveTo(t+r,n),c.lineTo(t+a-r,n),(r!==0||i!==0)&&c.bezierCurveTo(t+a-r*s,n,t+a,n+i*s,t+a,n+i),c.lineTo(t+a,n+o-i),(r!==0||i!==0)&&c.bezierCurveTo(t+a,n+o-i*s,t+a-r*s,n+o,t+a-r,n+o),c.lineTo(t+r,n+o),(r!==0||i!==0)&&c.bezierCurveTo(t+r*s,n+o,t,n+o-i*s,t,n+o-i),c.lineTo(t,n+i),(r!==0||i!==0)&&c.bezierCurveTo(t,n+i*s,t+r*s,n,t+r,n),c}function c(e){function t(e,t,n){let a=v(t),o=v(n);i===0?r.moveTo(a,o):r.lineTo(a,o),i++}let n=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,r=new st,i=0;return e.getAttribute(`points`).replace(n,t),r.currentPath.autoClose=!0,r}function l(e){function t(e,t,n){let a=v(t),o=v(n);i===0?r.moveTo(a,o):r.lineTo(a,o),i++}let n=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,r=new st,i=0;return e.getAttribute(`points`).replace(n,t),r.currentPath.autoClose=!1,r}function u(e){let t=v(e.getAttribute(`cx`)||0),n=v(e.getAttribute(`cy`)||0),r=v(e.getAttribute(`r`)||0),i=new qt;i.absarc(t,n,r,0,Math.PI*2);let a=new st;return a.subPaths.push(i),a}function d(e){let t=v(e.getAttribute(`cx`)||0),n=v(e.getAttribute(`cy`)||0),r=v(e.getAttribute(`rx`)||0),i=v(e.getAttribute(`ry`)||0),a=new qt;a.absellipse(t,n,r,i,0,Math.PI*2);let o=new st;return o.subPaths.push(a),o}function f(e){let t=v(e.getAttribute(`x1`)||0),n=v(e.getAttribute(`y1`)||0),r=v(e.getAttribute(`x2`)||0),i=v(e.getAttribute(`y2`)||0),a=new st;return a.moveTo(t,n),a.lineTo(r,i),a.currentPath.autoClose=!1,a}function p(e,t){t=Object.assign({},t);let n={};if(e.hasAttribute(`class`)){let t=e.getAttribute(`class`).split(/\s/).filter(Boolean).map(e=>e.trim());for(let e=0;e0&&t.premultiply(k[k.length-1]),F.copy(t),k.push(t),t}function b(e){let t=new xt,n=A;if(e.nodeName===`use`&&(e.hasAttribute(`x`)||e.hasAttribute(`y`))){let n=v(e.getAttribute(`x`)),r=v(e.getAttribute(`y`));t.translate(n,r)}if(e.hasAttribute(`transform`)){let r=e.getAttribute(`transform`).split(`)`);for(let e=r.length-1;e>=0;e--){let i=r[e].trim();if(i===``)continue;let a=i.indexOf(`(`),o=i.length;if(a>0&&a=1){let e=t[0],r=0;t.length>=2&&(r=t[1]),n.translate(e,r)}break;case`rotate`:if(t.length>=1){let e=0,r=0,i=0;e=t[0]*Math.PI/180,t.length>=3&&(r=t[1],i=t[2]),j.makeTranslation(-r,-i),M.makeRotation(e),N.multiplyMatrices(M,j),j.makeTranslation(r,i),n.multiplyMatrices(j,N)}break;case`scale`:if(t.length>=1){let e=t[0],r=e;t.length>=2&&(r=t[1]),n.scale(e,r)}break;case`skewX`:t.length===1&&n.set(1,Math.tan(t[0]*Math.PI/180),0,0,1,0,0,0,1);break;case`skewY`:t.length===1&&n.set(1,0,0,Math.tan(t[0]*Math.PI/180),1,0,0,0,1);break;case`matrix`:t.length===6&&n.set(t[0],t[2],t[4],t[1],t[3],t[5],0,0,1);break}}t.premultiply(n)}}return t}function x(e,t){function n(e){P.set(e.x,e.y,1).applyMatrix3(t),e.set(P.x,P.y)}function r(e){let n=e.xRadius,r=e.yRadius,i=Math.cos(e.aRotation),a=Math.sin(e.aRotation),o=new V(n*i,n*a,0),s=new V(-r*a,r*i,0),c=o.applyMatrix3(t),l=s.applyMatrix3(t),u=A.set(c.x,l.x,0,c.y,l.y,0,0,0,1),d=j.copy(u).invert(),f=M.copy(d).transpose().multiply(d).elements,p=E(f[0],f[1],f[4]),m=Math.sqrt(p.rt1),h=Math.sqrt(p.rt2);if(e.xRadius=1/m,e.yRadius=1/h,e.aRotation=Math.atan2(p.sn,p.cs),!((e.aEndAngle-e.aStartAngle)%(2*Math.PI)<2**-52)){let n=j.set(m,0,0,0,h,0,0,0,1),r=M.set(p.cs,p.sn,0,-p.sn,p.cs,0,0,0,1),i=n.multiply(r).multiply(u),a=e=>{let{x:t,y:n}=new V(Math.cos(e),Math.sin(e),0).applyMatrix3(i);return Math.atan2(n,t)};e.aStartAngle=a(e.aStartAngle),e.aEndAngle=a(e.aEndAngle),S(t)&&(e.aClockwise=!e.aClockwise)}}function i(e){let n=w(t),r=T(t);e.xRadius*=n,e.yRadius*=r;let i=n>2**-52?Math.atan2(t.elements[1],t.elements[0]):Math.atan2(-t.elements[3],t.elements[4]);e.aRotation+=i,S(t)&&(e.aStartAngle*=-1,e.aEndAngle*=-1,e.aClockwise=!e.aClockwise)}let a=e.subPaths;for(let e=0,o=a.length;e2**-52}function w(e){let t=e.elements;return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function T(e){let t=e.elements;return Math.sqrt(t[3]*t[3]+t[4]*t[4])}function E(e,t,n){let r,i,a,o,s,c=e+n,l=e-n,u=Math.sqrt(l*l+4*t*t);return c>0?(r=.5*(c+u),s=1/r,i=e*s*n-t*s*t):c<0?i=.5*(c-u):(r=.5*u,i=-.5*u),a=l>0?l+u:l-u,Math.abs(a)>2*Math.abs(t)?(s=-2*t/a,o=1/Math.sqrt(1+s*s),a=s*o):Math.abs(t)===0?(a=1,o=0):(s=-.5*a/t,a=1/Math.sqrt(1+s*s),o=s*a),l>0&&(s=a,a=-o,o=s),{rt1:r,rt2:i,cs:a,sn:o}}let D=[],O={},k=[],A=new xt,j=new xt,M=new xt,N=new xt,ee=new ve,P=new V,F=new xt,I=new DOMParser().parseFromString(e,`image/svg+xml`);return n(I.documentElement,{fill:`#000`,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:`miter`,strokeLineCap:`butt`,strokeMiterLimit:4}),{paths:D,xml:I.documentElement}}static createShapes(e){let t={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},n={loc:t.ORIGIN,t:0};function r(e,r,a,o){let s=e.x,c=r.x,l=a.x,u=o.x,d=e.y,f=r.y,p=a.y,m=o.y,h=(u-l)*(d-p)-(m-p)*(s-l),g=(c-s)*(d-p)-(f-d)*(s-l),_=(m-p)*(c-s)-(u-l)*(f-d),v=h/_,y=g/_;if(_===0&&h!==0||v<=0||v>=1||y<0||y>1)return null;if(h===0&&_===0){for(let l=0;l<2;l++)if(i(l===0?a:o,e,r),n.loc==t.ORIGIN){let e=l===0?a:o;return{x:e.x,y:e.y,t:n.t}}else if(n.loc==t.BETWEEN){let e=+(s+n.t*(c-s)).toPrecision(10),t=+(d+n.t*(f-d)).toPrecision(10);return{x:e,y:t,t:n.t}}return null}else{for(let s=0;s<2;s++)if(i(s===0?a:o,e,r),n.loc==t.ORIGIN){let e=s===0?a:o;return{x:e.x,y:e.y,t:n.t}}let l=+(s+v*(c-s)).toPrecision(10),u=+(d+v*(f-d)).toPrecision(10);return{x:l,y:u,t:v}}}function i(e,r,i){let a=i.x-r.x,o=i.y-r.y,s=e.x-r.x,c=e.y-r.y,l=a*c-s*o;if(e.x===r.x&&e.y===r.y){n.loc=t.ORIGIN,n.t=0;return}if(e.x===i.x&&e.y===i.y){n.loc=t.DESTINATION,n.t=1;return}if(l<-(2**-52)){n.loc=t.LEFT;return}if(l>2**-52){n.loc=t.RIGHT;return}if(a*s<0||o*c<0){n.loc=t.BEHIND;return}if(Math.sqrt(a*a+o*o)e.t<=l.t+2**-52&&e.t>=l.t-2**-52)===void 0&&(n.push(l),i.push(new ve(l.x,l.y)))}}return i}function o(e,t,n){let r=new ve;t.getCenter(r);let i=[];return n.forEach(t=>{t.boundingBox.containsPoint(r)&&a(e,t.points).forEach(e=>{i.push({identifier:t.identifier,isCW:t.isCW,point:e})})}),i.sort((e,t)=>e.point.x-t.point.x),i}function s(e,t,n,r,i){(i==null||i===``)&&(i=`nonzero`);let a=new ve;e.boundingBox.getCenter(a);let s=[new ve(n,a.y),new ve(r,a.y)],c=o(s,e.boundingBox,t);c.sort((e,t)=>e.point.x-t.point.x);let l=[],u=[];c.forEach(t=>{t.identifier===e.identifier?l.push(t):u.push(t)});let d=l[0].point.x,f=[],p=0;for(;p0&&f[f.length-1]===u[p].identifier?f.pop():f.push(u[p].identifier),p++;if(f.push(e.identifier),i===`evenodd`){let t=f.length%2==0,n=f[f.length-2];return{identifier:e.identifier,isHole:t,for:n}}else if(i===`nonzero`){let n=!0,r=null,i=null;for(let e=0;e{let t=e.getPoints(),n=-999999999,r=999999999,i=-999999999,a=999999999;for(let e=0;en&&(n=o.y),o.yi&&(i=o.x),o.x=a&&(c=a-1),{curves:e.curves,points:t,isCW:gt.isClockWise(t),identifier:-1,boundingBox:new He(new ve(a,r),new ve(i,n))}});u=u.filter(e=>e.points.length>1);for(let e=0;es(t,u,c,l,e.userData?e.userData.style.fillRule:void 0)),f=[];return u.forEach(e=>{if(!d[e.identifier].isHole){let t=new re;t.curves=e.curves,d.filter(t=>t.isHole&&t.for===e.identifier).forEach(e=>{let n=u[e.identifier],r=new qt;r.curves=n.curves,t.holes.push(r)}),f.push(t)}}),f}static getStrokeStyle(e,t,n,r,i){return e=e===void 0?1:e,t=t===void 0?`#000`:t,n=n===void 0?`miter`:n,r=r===void 0?`butt`:r,i=i===void 0?4:i,{strokeColor:t,strokeWidth:e,strokeLineJoin:n,strokeLineCap:r,strokeMiterLimit:i}}static pointsToStroke(t,n,r,i){let a=[],o=[],s=[];if(e.pointsToStrokeWithBuffers(t,n,r,i,a,o,s)===0)return null;let c=new de;return c.setAttribute(`position`,new mt(a,3)),c.setAttribute(`normal`,new mt(o,3)),c.setAttribute(`uv`,new mt(s,2)),c}static pointsToStrokeWithBuffers(e,t,n,r,i,a,o,s){let c=new ve,l=new ve,u=new ve,d=new ve,f=new ve,p=new ve,m=new ve,h=new ve,g=new ve,_=new ve,v=new ve,y=new ve,b=new ve,x=new ve,S=new ve,C=new ve,w=new ve;n=n===void 0?12:n,r=r===void 0?.001:r,s=s===void 0?0:s,e=se(e);let T=e.length;if(T<2)return 0;let E=e[0].equals(e[T-1]),D,O=e[0],k,A=t.strokeWidth/2,j=1/(T-1),M=0,N,ee,P,F,I=!1,L=0,R=s*3,z=s*2;te(e[0],e[1],c).multiplyScalar(A),h.copy(e[0]).sub(c),g.copy(e[0]).add(c),_.copy(h),v.copy(g);for(let n=1;n2**-52){let n=A/e;u.multiplyScalar(-n),d.subVectors(D,O),f.copy(d).setLength(n).add(u),C.copy(f).negate();let r=f.length(),i=d.length();d.divideScalar(i),p.subVectors(k,D);let a=p.length();switch(p.divideScalar(a),d.dot(C)=r&&n.push(e[t]);return n.push(e[e.length-1]),n}}};const GV=new Zt,KV=new V;var qV=class extends $e{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type=`LineSegmentsGeometry`;let e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute(`position`,new mt(e,3)),this.setAttribute(`uv`,new mt(t,2))}applyMatrix4(e){let t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let n=new Ce(t,6,1);return this.setAttribute(`instanceStart`,new Se(n,3,0)),this.setAttribute(`instanceEnd`,new Se(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));let r=new Ce(n,t*2,1);return this.setAttribute(`instanceColorStart`,new Se(r,t,0)),this.setAttribute(`instanceColorEnd`,new Se(r,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new Xt(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Zt);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),GV.setFromBufferAttribute(t),this.boundingBox.union(GV))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new ze),this.boundingBox===null&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){let n=this.boundingSphere.center;this.boundingBox.getCenter(n);let r=0;for(let i=0,a=e.count;i + #include + #include + #include + + uniform float linewidth; + uniform vec2 resolution; + + attribute vec3 instanceStart; + attribute vec3 instanceEnd; + + #ifdef USE_COLOR + #ifdef USE_LINE_COLOR_ALPHA + varying vec4 vLineColor; + attribute vec4 instanceColorStart; + attribute vec4 instanceColorEnd; + #else + varying vec3 vLineColor; + attribute vec3 instanceColorStart; + attribute vec3 instanceColorEnd; + #endif + #endif + + #ifdef WORLD_UNITS + + varying vec4 worldPos; + varying vec3 worldStart; + varying vec3 worldEnd; + + #ifdef USE_DASH + + varying vec2 vUv; + + #endif + + #else + + varying vec2 vUv; + + #endif + + #ifdef USE_DASH + + uniform float dashScale; + attribute float instanceDistanceStart; + attribute float instanceDistanceEnd; + varying float vLineDistance; + + #endif + + void trimSegment( const in vec4 start, inout vec4 end ) { + + // trim end segment so it terminates between the camera plane and the near plane + + // conservative estimate of the near plane + float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column + float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column + float nearEstimate = - 0.5 * b / a; + + float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); + + end.xyz = mix( start.xyz, end.xyz, alpha ); + + } + + void main() { + + #ifdef USE_COLOR + + vLineColor = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; + + #endif + + #ifdef USE_DASH + + vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; + vUv = uv; + + #endif + + float aspect = resolution.x / resolution.y; + + // camera space + vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); + vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); + + #ifdef WORLD_UNITS + + worldStart = start.xyz; + worldEnd = end.xyz; + + #else + + vUv = uv; + + #endif + + // special case for perspective projection, and segments that terminate either in, or behind, the camera plane + // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space + // but we need to perform ndc-space calculations in the shader, so we must address this issue directly + // perhaps there is a more elegant solution -- WestLangley + + bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column + + if ( perspective ) { + + if ( start.z < 0.0 && end.z >= 0.0 ) { + + trimSegment( start, end ); + + } else if ( end.z < 0.0 && start.z >= 0.0 ) { + + trimSegment( end, start ); + + } + + } + + // clip space + vec4 clipStart = projectionMatrix * start; + vec4 clipEnd = projectionMatrix * end; + + // ndc space + vec3 ndcStart = clipStart.xyz / clipStart.w; + vec3 ndcEnd = clipEnd.xyz / clipEnd.w; + + // direction + vec2 dir = ndcEnd.xy - ndcStart.xy; + + // account for clip-space aspect ratio + dir.x *= aspect; + dir = normalize( dir ); + + #ifdef WORLD_UNITS + + // get the offset direction as perpendicular to the view vector + vec3 worldDir = normalize( end.xyz - start.xyz ); + vec3 offset; + if ( position.y < 0.5 ) { + + offset = normalize( cross( start.xyz, worldDir ) ); + + } else { + + offset = normalize( cross( end.xyz, worldDir ) ); + + } + + // sign flip + if ( position.x < 0.0 ) offset *= - 1.0; + + float forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) ); + + // don't extend the line if we're rendering dashes because we + // won't be rendering the endcaps + #ifndef USE_DASH + + // extend the line bounds to encompass endcaps + start.xyz += - worldDir * linewidth * 0.5; + end.xyz += worldDir * linewidth * 0.5; + + // shift the position of the quad so it hugs the forward edge of the line + offset.xy -= dir * forwardOffset; + offset.z += 0.5; + + #endif + + // endcaps + if ( position.y > 1.0 || position.y < 0.0 ) { + + offset.xy += dir * 2.0 * forwardOffset; + + } + + // adjust for linewidth + offset *= linewidth * 0.5; + + // set the world position + worldPos = ( position.y < 0.5 ) ? start : end; + worldPos.xyz += offset; + + // project the worldpos + vec4 clip = projectionMatrix * worldPos; + + // shift the depth of the projected points so the line + // segments overlap neatly + vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; + clip.z = clipPose.z * clip.w; + + #else + + vec2 offset = vec2( dir.y, - dir.x ); + // undo aspect ratio adjustment + dir.x /= aspect; + offset.x /= aspect; + + // sign flip + if ( position.x < 0.0 ) offset *= - 1.0; + + // endcaps + if ( position.y < 0.0 ) { + + offset += - dir; + + } else if ( position.y > 1.0 ) { + + offset += dir; + + } + + // adjust for linewidth + offset *= linewidth; + + // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... + offset /= resolution.y; + + // select end + vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; + + // back to clip space + offset *= clip.w; + + clip.xy += offset; + + #endif + + gl_Position = clip; + + vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation + + #include + #include + #include + + } + `,fragmentShader:` + uniform vec3 diffuse; + uniform float opacity; + uniform float linewidth; + + #ifdef USE_DASH + + uniform float dashOffset; + uniform float dashSize; + uniform float gapSize; + + #endif + + varying float vLineDistance; + + #ifdef WORLD_UNITS + + varying vec4 worldPos; + varying vec3 worldStart; + varying vec3 worldEnd; + + #ifdef USE_DASH + + varying vec2 vUv; + + #endif + + #else + + varying vec2 vUv; + + #endif + + #include + #include + #include + #include + + #ifdef USE_COLOR + #ifdef USE_LINE_COLOR_ALPHA + varying vec4 vLineColor; + #else + varying vec3 vLineColor; + #endif + #endif + + vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { + + float mua; + float mub; + + vec3 p13 = p1 - p3; + vec3 p43 = p4 - p3; + + vec3 p21 = p2 - p1; + + float d1343 = dot( p13, p43 ); + float d4321 = dot( p43, p21 ); + float d1321 = dot( p13, p21 ); + float d4343 = dot( p43, p43 ); + float d2121 = dot( p21, p21 ); + + float denom = d2121 * d4343 - d4321 * d4321; + + float numer = d1343 * d4321 - d1321 * d4343; + + mua = numer / denom; + mua = clamp( mua, 0.0, 1.0 ); + mub = ( d1343 + d4321 * ( mua ) ) / d4343; + mub = clamp( mub, 0.0, 1.0 ); + + return vec2( mua, mub ); + + } + + void main() { + + #include + + #ifdef USE_DASH + + if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps + + if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX + + #endif + + float alpha = opacity; + + #ifdef WORLD_UNITS + + // Find the closest points on the view ray and the line segment + vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; + vec3 lineDir = worldEnd - worldStart; + vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); + + vec3 p1 = worldStart + lineDir * params.x; + vec3 p2 = rayEnd * params.y; + vec3 delta = p1 - p2; + float len = length( delta ); + float norm = len / linewidth; + + #ifndef USE_DASH + + #ifdef USE_ALPHA_TO_COVERAGE + + float dnorm = fwidth( norm ); + alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); + + #else + + if ( norm > 0.5 ) { + + discard; + + } + + #endif + + #endif + + #else + + #ifdef USE_ALPHA_TO_COVERAGE + + // artifacts appear on some hardware if a derivative is taken within a conditional + float a = vUv.x; + float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; + float len2 = a * a + b * b; + float dlen = fwidth( len2 ); + + if ( abs( vUv.y ) > 1.0 ) { + + alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); + + } + + #else + + if ( abs( vUv.y ) > 1.0 ) { + + float a = vUv.x; + float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; + float len2 = a * a + b * b; + + if ( len2 > 1.0 ) discard; + + } + + #endif + + #endif + + vec4 diffuseColor = vec4( diffuse, alpha ); + #ifdef USE_COLOR + #ifdef USE_LINE_COLOR_ALPHA + diffuseColor *= vLineColor; + #else + diffuseColor.rgb *= vLineColor; + #endif + #endif + + #include + + gl_FragColor = diffuseColor; + + #include + #include <${parseInt(Fe.replace(/\D+/g,``))>=154?`colorspace_fragment`:`encodings_fragment`}> + #include + #include + + } + `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA=`1`:delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return`WORLD_UNITS`in this.defines},set:function(e){e===!0?this.defines.WORLD_UNITS=``:delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return`USE_DASH`in this.defines},set(e){!!e!=`USE_DASH`in this.defines&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH=``:delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return`USE_ALPHA_TO_COVERAGE`in this.defines},set:function(e){!!e!=`USE_ALPHA_TO_COVERAGE`in this.defines&&(this.needsUpdate=!0),e===!0?(this.defines.USE_ALPHA_TO_COVERAGE=``,this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}};const XV=new oe,ZV=new V,QV=new V,$V=new oe,eH=new oe,tH=new oe,nH=new V,rH=new ot,iH=new me,aH=new V,oH=new Zt,sH=new ze,cH=new oe;let lH,uH;function dH(e,t,n){return cH.set(0,0,-t,1).applyMatrix4(e.projectionMatrix),cH.multiplyScalar(1/cH.w),cH.x=uH/n.width,cH.y=uH/n.height,cH.applyMatrix4(e.projectionMatrixInverse),cH.multiplyScalar(1/cH.w),Math.abs(Math.max(cH.x,cH.y))}function fH(e,t){let n=e.matrixWorld,r=e.geometry,i=r.attributes.instanceStart,a=r.attributes.instanceEnd,o=Math.min(r.instanceCount,i.count);for(let r=0,s=o;ru&&eH.z>u)continue;if($V.z>u){let e=$V.z-eH.z,t=($V.z-u)/e;$V.lerp(eH,t)}else if(eH.z>u){let e=eH.z-$V.z,t=(eH.z-u)/e;eH.lerp($V,t)}$V.applyMatrix4(r),eH.applyMatrix4(r),$V.multiplyScalar(1/$V.w),eH.multiplyScalar(1/eH.w),$V.x*=i.x/2,$V.y*=i.y/2,eH.x*=i.x/2,eH.y*=i.y/2,iH.start.copy($V),iH.start.z=0,iH.end.copy(eH),iH.end.z=0;let o=iH.closestPointToPointParameter(nH,!0);iH.at(o,aH);let l=fe.lerp($V.z,eH.z,o),d=l>=-1&&l<=1,f=nH.distanceTo(aH)t)),o=Math.min(e.length,i);return a.slice(0,o).sort().map(t=>e[t])}shuffle(e){return e.map(e=>({value:e,sort:this._getNext()})).sort((e,t)=>e.sort-t.sort).map(({value:e})=>e)}getMulberry32(e=0){return e>0&&e<1&&(e=Math.floor(e*2**16)),()=>{e+=1831565813;let t=e;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}};const WH=[_H,vH,yH,bH,xH],GH=fe.lerp,KH=(e=0,t=BH)=>{let n=new UH(e).choice(WH);return t.map((t,r)=>{let i=new UH(e*(r*7907+1)+(typeof t.seed==`number`?t.seed:0)),a=i.int(t.length[0],t.length[1]);return Array.from({length:a}).fill(0).map(()=>{let e=n(i.rand());return{texture:i.defaultChoice(t.texture,VH.texture),size:GH(t.size[0],t.size[1],n(1-e)),distance:GH(t.distance[0],t.distance[1],e),color:i.defaultChoice(t.color,VH.color)}})}).flat()},qH=(e,t,n=void 0,r=void 0,i=VH)=>{if(e!==void 0&&e.length>0&&(typeof n==`number`||typeof r<`u`)){let a=KH(n??0,r??BH),o=a.length,s=e.length;return o>=s?a.map((n,r)=>Object.assign(n,t,rObject.assign({},i,n0){let n=Object.assign({},i,t);return e.map(e=>Object.assign({},n,e))}let a=r===void 0||r.length===0?BH:r;return KH(n??0,a).map(e=>Object.assign({},e,t))};function JH(e){return YH(e,(e,t)=>t in VH&&e!==void 0)}function YH(e,t){let n={};return Object.keys(e).forEach(r=>{t(e[r],r)&&(n[r]=e[r])}),n}const XH=an({__name:`component`,props:{scale:{default:1},elements:{default:void 0},seed:{default:void 0},seedProps:{default:void 0},color:{default:void 0},distance:{default:void 0},size:{default:void 0},texture:{default:void 0}},setup(e,{expose:t}){let n=e,r=dn(),i=dn([]),a=dn(JH(n));t({instance:r});let o=new St,s=new PB,c=[],l=()=>{for(var e,t,n;c.length;)c.pop();(e=r.value)==null||e.children.forEach(e=>{`dispose`in e&&e.dispose()}),(t=r.value)==null||t.remove(...r.value.children),(n=r.value)==null||n.dispose()},u=e=>{if(typeof e.texture==`string`){let t=e.texture;e.texture=o.load(t),e.texture.name=t}return e.color=L(e.color),e},d=()=>{for(let e=i.value.length-1;e{c[t].size=e.size*n.scale})},f=()=>{for(;i.value.length>c.length;){let e={...u(i.value[c.length])};c.push(e),s.addElement(e)}i.value.forEach((e,t)=>{let n=c[t],{texture:r,size:i,distance:a,color:s}=e;if(typeof r==`string`){if(n.texture.name!==r){n.texture.dispose();let e=r;n.texture=o.load(e),n.texture.name=e}}else n.texture!==r&&(n.texture.dispose(),n.texture=r);n.size=i,n.distance=a,n.color=L(s)}),d()};return un(()=>{l()}),nn(()=>{var e;(e=r.value)==null||e.add(s),i.value=qH(n.elements,a.value,n.seed,n.seedProps)}),W(()=>[n.color,n.distance,n.size,n.texture],()=>{a.value={color:n.color,distance:n.distance,size:n.size,texture:n.texture}}),W(()=>[a.value,n.elements,n.seed,n.seedProps],()=>{i.value=qH(n.elements,a.value,n.seed,n.seedProps)}),W(()=>n.scale,()=>{d()}),W(()=>i.value,()=>{f()}),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`lensflareRef`,ref:r},null,512))}}),ZH=an({__name:`Levioso`,props:{speed:{default:1},rotationFactor:{default:1},floatFactor:{default:1},range:{default:()=>[-.1,.1]}},setup(e,{expose:t}){let n=e,r=dn();t({instance:r});{let e=Math.random()*1e4,{onBeforeRender:t}=F(),i=e;t(({delta:e,invalidate:t})=>{if(!r.value)return;i+=e*n.speed;let a=i*.25,o=r.value;o.rotation.x=Math.cos(a)*.125*n.rotationFactor,o.rotation.y=Math.sin(a)*.125*n.rotationFactor,o.rotation.z=Math.sin(a)*.05*n.rotationFactor,o.position.y=fe.mapLinear(Math.sin(a),-1,1,n.range[0],n.range[1])*n.floatFactor,t()})}return(e,t)=>(G(),cn(`TresGroup`,Pn(e.$attrs,{ref_key:`groupRef`,ref:r}),[Dn(e.$slots,`default`)],16))}}),QH=[`render-order`],$H=an({__name:`component`,props:{id:{default:1},colorWrite:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!1}},setup(e,{expose:t}){let n=e,r=dn();function i(){var e,t;let i=Array.isArray((e=r.value)?.material)?r.value.material[0]:(t=r.value)?.material;i&&(i.colorWrite=n.colorWrite,i.depthWrite=n.depthWrite,i.stencilWrite=!0,i.stencilRef=n.id,i.stencilFunc=Ot,i.stencilFail=rt,i.stencilZFail=rt,i.stencilZPass=rt)}return Tn(i),t({instance:r}),(e,t)=>(G(),cn(`TresMesh`,{ref_key:`meshRef`,ref:r,"render-order":-n.id},[Dn(e.$slots,`default`)],8,QH))}}),eU=an({__name:`MouseParallax`,props:{disabled:{type:Boolean,default:!1},factor:{default:2.5},ease:{default:.1},local:{type:Boolean,default:!1}},setup(e){let t=e,{camera:n,renderer:r}=ke(),{disabled:i,factor:a,ease:o,local:s}=pn(t),c={};s.value&&(c.target=r.value.domElement,c.type=`client`);let{x:l,y:u}=zR(c),{width:d,height:f}=s.value?NR(r.value.domElement):VR(),p=dn(),m=H(),h=H();W([a,o],()=>{m.value=Array.isArray(a.value)?a.value:[a.value,a.value],h.value=Array.isArray(o.value)?o.value:[o.value,o.value]},{immediate:!0});let g=jn(()=>(l.value/d.value-.5)*m.value[0]),_=jn(()=>-(u.value/f.value-.5)*m.value[1]),{onBeforeRender:v}=F();return v(({delta:e,invalidate:t})=>{i.value||!p.value||Number.isNaN(g.value)||Number.isNaN(_.value)||(p.value.position.x+=(g.value-p.value.position.x)*h.value[0]*e,p.value.position.y+=(_.value-p.value.position.y)*h.value[1]*e,t())}),W(()=>p.value,e=>e?.add(n.value)),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`cameraGroupRef`,ref:p},null,512))}}),tU=YR({screenspace:!1,color:new _t(`black`),opacity:1,thickness:.05,size:new ve(1,1)},`#include + #include + #include + uniform float thickness; + uniform bool screenspace; + uniform vec2 size; + void main() { + #if defined (USE_SKINNING) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + vec4 tNormal = vec4(normal, 0.0); + vec4 tPosition = vec4(transformed, 1.0); + #ifdef USE_INSTANCING + tNormal = instanceMatrix * tNormal; + tPosition = instanceMatrix * tPosition; + #endif + if (screenspace) { + vec3 newPosition = tPosition.xyz + tNormal.xyz * thickness; + gl_Position = projectionMatrix * modelViewMatrix * vec4(newPosition, 1.0); + } else { + vec4 clipPosition = projectionMatrix * modelViewMatrix * tPosition; + vec4 clipNormal = projectionMatrix * modelViewMatrix * tNormal; + vec2 offset = normalize(clipNormal.xy) * thickness / size * clipPosition.w * 2.0; + clipPosition.xy += offset; + gl_Position = clipPosition; + } + }`,`uniform vec3 color; + uniform float opacity; + void main(){ + gl_FragColor = vec4(color, opacity); + #include + #include + }`),nU=an({__name:`component`,props:{color:{default:`black`},screenspace:{type:Boolean,default:!1},opacity:{default:1},transparent:{type:Boolean,default:!1},thickness:{default:.05},angle:{default:Math.PI},toneMapped:{type:Boolean,default:!0},polygonOffset:{type:Boolean,default:!1},polygonOffsetFactor:{default:0},renderOrder:{default:0}},setup(e,{expose:t}){let n=e,r=dn();t({instance:r});let i=new tU({...n}),a=new ve(1,1),o=0,s=null;function c(e){var t;let r=e.parent;if(!(!r||!r.geometry)&&(o!==n.angle||s!==r.geometry)){o=n.angle,s=r.geometry;let a=(t=e.children)?.[0];a&&(n.angle&&a.geometry.dispose(),e.remove(a)),r.skeleton?(a=new Ie,a.material=i,a.bind(r.skeleton,r.bindMatrix),e.add(a)):r.isInstancedMesh?(a=new ne(r.geometry,i,r.count),a.instanceMatrix=r.instanceMatrix,e.add(a)):(a=new be,a.material=i,e.add(a)),a.geometry=n.angle?rz(r.geometry,n.angle):r.geometry}}function l(){i.side=jt,i.transparent=n.transparent,i.thickness=n.thickness,i.color=L(n.color),i.opacity=n.opacity,i.size=a,i.screenspace=n.screenspace,i.toneMapped=n.toneMapped,i.polygonOffset=n.polygonOffset,i.polygonOffsetFactor=n.polygonOffsetFactor}let u=P().sizes;return W(()=>[u.width.value,u.height.value],([e,t])=>{a.set(e,t)}),W(()=>[n.angle],()=>{r.value&&c(r.value)}),W(()=>[n.transparent,n.thickness,n.color,n.opacity,a,n.screenspace,n.toneMapped,n.polygonOffset,n.polygonOffsetFactor],()=>l(),{immediate:!0}),nn(()=>c(r.value)),un(()=>{var e;let t=(e=r.value)?.children[0];t&&(t.geometry.dispose(),i.dispose(),t.removeFromParent())}),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`groupRef`,ref:r},null,512))}}),rU=[`args`],iU=an({__name:`PositionalAudio`,props:{ready:{type:Boolean,default:!1},url:{},distance:{default:2},helper:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},autoplay:{type:Boolean,default:!1},innerAngle:{default:360},outerAngle:{default:360},outerGain:{default:0}},emits:[`isPlaying`],async setup(e,{expose:t,emit:n}){let r,i,a=e,o=n,{ready:s,url:c,distance:l,helper:u,loop:d,autoplay:f,innerAngle:p,outerAngle:m,outerGain:h}=pn(a),{camera:g}=ke(),_=dn(null),v=dn(null),y=dn(null),b=zn(new lt),x=()=>{var e,t,n;(e=_?.value)!=null&&e.isPlaying||((t=_?.value)==null||t.play(),o(`isPlaying`,(n=_?.value)?.isPlaying))},S=()=>{var e,t;(e=_?.value)!=null&&e.isPlaying&&(_.value.pause(),o(`isPlaying`,(t=_?.value)?.isPlaying))},C=()=>{var e;_.value&&(_.value.stop(),o(`isPlaying`,(e=_?.value)?.isPlaying))},w=()=>{if(!(_!=null&&_.value))return;C();let e=_.value;e.source&&e.disconnect()},T=()=>{var e,t;!(_!=null&&_.value)||!(v!=null&&v.value)||((e=v?.value)==null||e.dispose(),(t=_?.value)==null||t.remove(v?.value))},E=()=>{var e;if(_.value&&(_.value.setBuffer(y.value),_.value.setRefDistance(l.value),_.value.setLoop(d.value),_.value.setDirectionalCone(p.value,m.value,h.value),(e=v?.value)==null||e.update(),v!=null&&v.value)){let e=v.value.material[0];!e.visible&&m.value!==p.value&&(e.visible=!0)}},D=()=>{var e,t;E();let n=(e=_.value)?.parent,r=new Zt().setFromObject(n),i=(r.max.z-r.min.z)*2;v.value=new gH(_.value,i,32,16),(t=_?.value)==null||t.add(v.value),v.value.update()},O=()=>{var e;(e=g?.value)==null||e.remove(b),w(),T()};return t({instance:_,play:x,stop:C,pause:S,dispose:O}),y.value=([r,i]=kn(()=>Oe(ge,c.value)),r=await r,i(),r),W(_,()=>{_!=null&&_.value&&(u.value&&D(),s.value&&f&&x())}),W(u,()=>{u.value?D():T()}),W(s,()=>{s.value&&E(),f.value&&s.value&&x(),!f.value&&s.value&&C()}),W([l,d,y,p,m,h,f],()=>{E()}),nn(()=>{var e;(e=g?.value)==null||e.add(b)}),ln(()=>{O()}),(e,t)=>(G(),cn(`TresPositionalAudio`,Pn({ref_key:`positionalAudioRef`,ref:_,args:[K(b)]},e.$attrs),null,16,rU))}}),aU=[`args`,`material-uniforms-color-value`],oU=an({__name:`Reflector`,props:{color:{default:`#333`},textureWidth:{default:512},textureHeight:{default:512},clipBias:{default:0},multisample:{default:4},shader:{default:EB.ReflectorShader}},setup(e,{expose:t}){let n=e,{extend:r,invalidate:i}=ke(),a=dn();r({Reflector:EB});let{color:o,textureWidth:s,textureHeight:c,clipBias:l,multisample:u,shader:d}=pn(n);return W(n,()=>i()),t({instance:a}),(e,t)=>(G(),cn(`TresReflector`,{ref_key:`reflectorRef`,ref:a,args:[void 0,{textureWidth:K(s),textureHeight:K(c),clipBias:K(l),multisample:K(u),shader:K(d)}],"material-uniforms-color-value":K(o)},[Dn(e.$slots,`default`,{},()=>[t[0]||=U(`TresPlaneGeometry`,{args:[5,5]},null,-1)])],8,aU))}}),sU=[`position-z`],cU=an({__name:`ScreenSpace`,props:{depth:{default:-1}},setup(e,{expose:t}){let n=dn();return F().onBeforeRender(({camera:e})=>{n.value&&(n.value.quaternion.copy(e.quaternion),n.value.position.copy(e.position))}),t({instance:n}),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`outerRef`,ref:n},[U(`TresGroup`,{"position-z":-e.depth},[Dn(e.$slots,`default`)],8,sU)],512))}}),lU=[`args`,`center`],uU=an({__name:`Text3D`,props:{font:{},text:{},size:{default:.5},height:{default:.2},curveSegments:{default:5},bevelEnabled:{type:Boolean,default:!0},bevelThickness:{default:.05},bevelSize:{default:.02},bevelOffset:{default:0},bevelSegments:{default:4},center:{type:Boolean,default:!1},needUpdates:{type:Boolean,default:!1}},async setup(e,{expose:t}){let n,r,i=e,{center:a,font:o,text:s,needUpdates:c,size:l,height:u,curveSegments:d,bevelEnabled:f,bevelThickness:p,bevelSize:m,bevelOffset:h,bevelSegments:g}=pn(i),{extend:_,invalidate:v}=ke();W(i,()=>v()),_({TextGeometry:AV});let y=new RV,b=Nn(),x=jn(()=>{var e;return s!=null&&s.value?s.value:b.default?(e=b.default()[0].children)?.trim():c.value?``:`TresJS`}),S=dn();t({instance:S});let C=([n,r]=kn(()=>new Promise((e,t)=>{try{typeof o.value==`string`?y.load(o.value,t=>{e(t)}):e(o.value)}catch(e){t(console.error(`cientos`,e))}})),n=await n,r(),n),w=jn(()=>({font:C,size:Bn(l),height:Bn(u),curveSegments:Bn(d),bevelEnabled:Bn(f),bevelThickness:Bn(p),bevelSize:Bn(m),bevelOffset:Bn(h),bevelSegments:Bn(g)}));return Tn(()=>{S.value&&c.value&&(S.value.geometry.dispose(),S.value.geometry=new AV(x.value,w.value),a.value&&S.value.geometry.center())}),(e,t)=>K(o)?(G(),cn(`TresMesh`,{key:0,ref_key:`text3DRef`,ref:S},[x.value?(G(),cn(`TresTextGeometry`,{key:0,args:[x.value,w.value],center:K(a)},null,8,lU)):on(``,!0),Dn(e.$slots,`default`)],512)):on(``,!0)}});function dU(e){let t=H(null),{height:n,width:r,settings:i,depth:a,autoRender:o=H(!0)}=fn(e)?pn(e):pn(Ln(e)),{onBeforeRender:s}=F(),{camera:c,renderer:l,scene:u,sizes:d,invalidate:f}=ke();return W(()=>[r?.value,d.width.value,n?.value,d.height.value],()=>{var e;(e=t.value)==null||e.dispose(),t.value=new Qt(r?.value||d.width.value,n?.value||d.height.value,{minFilter:Pe,magFilter:Pe,type:it,...i?.value}),a!=null&&a.value&&(t.value.depthTexture=new B(r?.value||d.width.value,n?.value||d.height.value,et)),f()},{immediate:!0}),s(()=>{o.value&&(l.value.setRenderTarget(t.value),l.value.clear(),l.value.render(u.value,c.value),l.value.setRenderTarget(null))},1/0),ln(()=>{var e;(e=t.value)==null||e.dispose()}),t}const fU=an({__name:`component`,props:{width:{},height:{},depth:{type:Boolean,default:!1},settings:{default:void 0},autoRender:{type:Boolean,default:!0}},setup(e,{expose:t}){let n=dU(e);return t({instance:n}),()=>{}}}),pU=(e,t=16,n,r,i)=>{let a=new Float32Array(t*16),o=H(new Nt(a,16));return(()=>{if(!e)return;let a=new GB(e);r&&a.setWeightAttribute(r),a.build();let s=new V,c=new V,l=new _t,u=new vt;e.updateMatrixWorld(!0);for(let r=0;ro()),Tn(()=>{var e,t;i.value=n.instanceMesh??(e=r.value)?.children.find(e=>Object.prototype.hasOwnProperty.call(e,`instanceMatrix`)),a.value=n.mesh??(t=r.value)?.children.find(e=>e.type===`Mesh`),pU(a.value,n.count,i.value,n.weight,n.transform)}),t({samplerRef:r}),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`samplerRef`,ref:r},[Dn(e.$slots,`default`)],512))}}),hU=new V,gU=new V,_U=new V,vU=(e,t,n)=>{let r=n.width/2,i=n.height/2;t.updateMatrixWorld(!1);let a=e.project(t);return a.x=a.x*r+r,a.y=-(a.y*i)+i,a},yU=(e,t,n,r=1)=>{let i=hU.set(e.x/n.width*2-1,-(e.y/n.height)*2+1,r);return i.unproject(t),i},bU=(e,t,n,r)=>{let i=vU(_U.copy(e),n,r),a=0;for(let o=0;o<2;++o){let s=gU.copy(i).setComponent(o,i.getComponent(o)+t),c=yU(s,n,r,s.z);a=Math.max(a,e.distanceTo(c))}return a},xU=an({__name:`ScreenSizer`,setup(e,{expose:t}){let n=new V,r=dn(),i=dn(),a=P().sizes,o=jn(()=>({width:a.width.value,height:a.height.value}));return F().onBeforeRender(({camera:e})=>{let t=i.value;if(!t)return;let r=bU(t.getWorldPosition(n),1,e,o.value);t.scale.setScalar(r)}),t({instance:r}),(e,t)=>(G(),cn(`TresObject3D`,{ref_key:`outerRef`,ref:r},[U(`TresObject3D`,{ref_key:`innerRef`,ref:i},[Dn(e.$slots,`default`)],512)],512))}}),SU=[`color`],CU=an({__name:`Edges`,props:{color:{default:`#ff0000`},threshold:{default:15}},setup(e,{expose:t}){let n=e,{color:r,threshold:i}=pn(n),a=dn(),o=H(null),s=H(1);return t({instance:a}),W(()=>[a.value,i.value],()=>{if(a.value){let e=a.value.parent;if(e&&`geometry`in e&&e.geometry instanceof de){let t=e.geometry;(t!==o.value||i.value!==s.value)&&(o.value=t,s.value=i.value,a.value.geometry=new ae(t,i.value))}}}),(e,t)=>(G(),cn(`TresLineSegments`,Pn({ref_key:`lineSegmentsRef`,ref:a},e.$attrs),[Dn(e.$slots,`default`,{},()=>[U(`TresLineBasicMaterial`,{color:K(r)},null,8,SU)])],16))}}),wU={sunset:`venice/venice_sunset_1k.hdr`,studio:`studio/poly_haven_studio_1k.hdr`,city:`city/canary_wharf_1k.hdr`,umbrellas:`outdoor/outdoor_umbrellas_1k.hdr`,night:`outdoor/satara_night_1k.hdr`,forest:`outood/mossy_forest_1k.hdr`,snow:`outdoor/snowy_forest_path_01_1k.hdr`,dawn:`kiara/kiara_1_dawn_1k.hdr`,hangar:`indoor/small_hangar_01_1k.hdr`,urban:`indoor/abandoned_games_room_02_1k.hdr`,modern:`city/modern_buildings_2_1k.hdr`,shangai:`city/shanghai_bund_1k.hdr`},TU=`https://raw.githubusercontent.com/Tresjs/assets/main/textures/hdr/`;function EU(e){return e instanceof It?e:Array.isArray(e)?new It(e[0],e[1],e[2]):typeof e==`number`?new It(e,e,e):e instanceof V||typeof e==`object`&&`x`in e&&`y`in e&&`z`in e?new It(e.x,e.y,e.z):null}function DU(e){e.traverse(e=>{e instanceof be&&e.material&&(e.material.needsUpdate=!0)})}async function OU(e,t){let{scene:n,invalidate:r}=ke(),{preset:i,blur:a,files:o=H([]),path:s=H(``),background:c,backgroundIntensity:l=H(1),environmentIntensity:u=H(1),backgroundRotation:d=H([0,0,0]),environmentRotation:f=H([0,0,0]),syncMaterials:p=H(!1)}=pn(e);W(e,()=>{r()});let m=H(null),h=jn(()=>Array.isArray(o.value)),g=jn(()=>h.value?Ct:HV);return W([o,s],async([e,t])=>{if(e&&e.length>0&&!(i!=null&&i.value)){try{let n=await Oe(g.value,h.value?[...K(e)]:K(e),e=>{t&&e.setPath(K(t))});m.value=Array.isArray(n)?n[0]:n}catch(e){throw Error(`Failed to load environment map: ${e}`)}m.value&&(m.value.mapping=h.value?at:Ht)}},{immediate:!0}),W(m,e=>{n.value&&e&&(n.value.environment=e)},{immediate:!0}),W([c,m],([e,r])=>{if(n.value){let i=t!=null&&t.value?t.value.texture:r;i&&(n.value.background=e?i:null)}},{immediate:!0}),W(()=>a?.value,e=>{n.value&&e&&(n.value.backgroundBlurriness=e)},{immediate:!0}),W(()=>l?.value,e=>{n.value&&(n.value.backgroundIntensity=e??1)},{immediate:!0}),W(()=>u?.value,e=>{n.value&&(n.value.environmentIntensity=e??1)},{immediate:!0}),W(()=>d?.value,e=>{if(n.value){let t=EU(e);t&&(n.value.backgroundRotation=t)}},{immediate:!0}),W(()=>f?.value,e=>{if(n.value&&!(p!=null&&p.value)){let t=EU(e);t&&(n.value.environmentRotation=t,DU(n.value))}},{immediate:!0}),W(()=>i?.value,async e=>{if(e&&e in wU){let t=TU,n=wU[e];try{let e=await Oe(HV,n,e=>{e.setPath(t)});m.value=Array.isArray(e)?e[0]:e}catch(e){throw Error(`Failed to load environment map: ${e}`)}m.value&&(m.value.mapping=Ht),r()}else if(e&&!(e in wU))throw Error(`Preset must be one of: ${Object.keys(wU).join(`, `)}`)},{immediate:!0}),W([p,d],([e,t])=>{if(e&&n.value){let e=EU(t);e&&(n.value.environmentRotation=e,DU(n.value))}},{immediate:!0}),m} +/*! +* camera-controls +* https://github.com/yomotsu/camera-controls +* (c) 2017 @yomotsu +* Released under the MIT License. +*/ +const kU={LEFT:1,RIGHT:2,MIDDLE:4},$=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),AU={NONE:0,IN:1,OUT:-1};function jU(e){return e.isPerspectiveCamera}function MU(e){return e.isOrthographicCamera}const NU=Math.PI*2,PU=Math.PI/2,FU=1e-5,IU=Math.PI/180;function LU(e,t,n){return Math.max(t,Math.min(n,e))}function RU(e,t=FU){return Math.abs(e)0==p>u&&(p=u,n.value=(p-u)/a),p}function WU(e,t,n,r,i=1/0,a,o){r=Math.max(1e-4,r);let s=2/r,c=s*a,l=1/(1+c+.48*c*c+.235*c*c*c),u=t.x,d=t.y,f=t.z,p=e.x-u,m=e.y-d,h=e.z-f,g=u,_=d,v=f,y=i*r,b=y*y,x=p*p+m*m+h*h;if(x>b){let e=Math.sqrt(x);p=p/e*y,m=m/e*y,h=h/e*y}u=e.x-p,d=e.y-m,f=e.z-h;let S=(n.x+s*p)*a,C=(n.y+s*m)*a,w=(n.z+s*h)*a;n.x=(n.x-s*S)*l,n.y=(n.y-s*C)*l,n.z=(n.z-s*w)*l,o.x=u+(p+S)*l,o.y=d+(m+C)*l,o.z=f+(h+w)*l;let T=g-e.x,E=_-e.y,D=v-e.z,O=o.x-g,k=o.y-_,A=o.z-v;return T*O+E*k+D*A>0&&(o.x=g,o.y=_,o.z=v,n.x=(o.x-g)/a,n.y=(o.y-_)/a,n.z=(o.z-v)/a),o}function GU(e,t){t.set(0,0),e.forEach(e=>{t.x+=e.clientX,t.y+=e.clientY}),t.x/=e.length,t.y/=e.length}function KU(e,t){return MU(e)?(console.warn(`${t} is not supported in OrthographicCamera`),!0):!1}var qU=class{constructor(){this._listeners={}}addEventListener(e,t){let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners[e];if(n!==void 0){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){let t=this._listeners[e.type];if(t!==void 0){e.target=this;let n=t.slice(0);for(let t=0,r=n.length;t{},this._enabled=!0,this._state=$.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=AU.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new QU.Vector3,this._focalOffsetVelocity=new QU.Vector3,this._zoomVelocity={value:0},this._truckInternal=(e,t,n)=>{let r,i;if(jU(this._camera)){let n=rW.copy(this._camera.position).sub(this._target),a=this._camera.getEffectiveFOV()*IU,o=n.length()*Math.tan(a*.5);r=this.truckSpeed*e*o/this._elementRect.height,i=this.truckSpeed*t*o/this._elementRect.height}else if(MU(this._camera)){let n=this._camera;r=e*(n.right-n.left)/n.zoom/this._elementRect.width,i=t*(n.top-n.bottom)/n.zoom/this._elementRect.height}else return;this.verticalDragToForward?(n?this.setFocalOffset(this._focalOffsetEnd.x+r,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(r,0,!0),this.forward(-i,!0)):n?this.setFocalOffset(this._focalOffsetEnd.x+r,this._focalOffsetEnd.y+i,this._focalOffsetEnd.z,!0):this.truck(r,i,!0)},this._rotateInternal=(e,t)=>{let n=NU*this.azimuthRotateSpeed*e/this._elementRect.height,r=NU*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(n,r,!0)},this._dollyInternal=(e,t,n)=>{let r=.95**(-e*this.dollySpeed),i=this._sphericalEnd.radius,a=this._sphericalEnd.radius*r,o=LU(a,this.minDistance,this.maxDistance),s=o-a;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(a,!0):(this.infinityDolly&&!this.dollyToCursor&&this.dollyInFixed(s,!0),this._dollyToNoClamp(o,!0)),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?a:o)-i,this._dollyControlCoord.set(t,n)),this._lastDollyDirection=Math.sign(-e)},this._zoomInternal=(e,t,n)=>{let r=.95**(e*this.dollySpeed),i=this._zoom,a=this._zoom*r;this.zoomTo(a,!0),this.dollyToCursor&&(this._changedZoom+=a-i,this._dollyControlCoord.set(t,n))},typeof QU>`u`&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=t,this._yAxisUpSpace=new QU.Quaternion().setFromUnitVectors(this._camera.up,eW),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=$.NONE,this._target=new QU.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new QU.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new QU.Spherical().setFromVector3(rW.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new QU.Vector3,new QU.Vector3,new QU.Vector3,new QU.Vector3],this._updateNearPlaneCorners(),this._boundary=new QU.Box3(new QU.Vector3(-1/0,-1/0,-1/0),new QU.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new QU.Vector2,this.mouseButtons={left:$.ROTATE,middle:$.DOLLY,right:$.TRUCK,wheel:jU(this._camera)?$.DOLLY:MU(this._camera)?$.ZOOM:$.NONE},this.touches={one:$.TOUCH_ROTATE,two:jU(this._camera)?$.TOUCH_DOLLY_TRUCK:MU(this._camera)?$.TOUCH_ZOOM_TRUCK:$.NONE,three:$.TOUCH_TRUCK};let r=new QU.Vector2,i=new QU.Vector2,a=new QU.Vector2,o=e=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){let t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,r=e.clientY/t.height;if(nthis._interactiveArea.right||rthis._interactiveArea.bottom)return}let t=e.pointerType===`mouse`?(e.buttons&kU.LEFT)===kU.LEFT?kU.LEFT:(e.buttons&kU.MIDDLE)===kU.MIDDLE?kU.MIDDLE:(e.buttons&kU.RIGHT)===kU.RIGHT?kU.RIGHT:null:null;if(t!==null){let e=this._findPointerByMouseButton(t);e&&this._disposePointer(e)}if((e.buttons&kU.LEFT)===kU.LEFT&&this._lockedPointer)return;let n={pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,deltaX:0,deltaY:0,mouseButton:t};this._activePointers.push(n),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this._domElement.ownerDocument.addEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.addEventListener(`pointerup`,c),this._isDragging=!0,f(e)},s=e=>{e.cancelable&&e.preventDefault();let t=e.pointerId,n=this._lockedPointer||this._findPointerById(t);if(n){if(n.clientX=e.clientX,n.clientY=e.clientY,n.deltaX=e.movementX,n.deltaY=e.movementY,this._state=0,e.pointerType===`touch`)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else (!this._isDragging&&this._lockedPointer||this._isDragging&&(e.buttons&kU.LEFT)===kU.LEFT)&&(this._state|=this.mouseButtons.left),this._isDragging&&(e.buttons&kU.MIDDLE)===kU.MIDDLE&&(this._state|=this.mouseButtons.middle),this._isDragging&&(e.buttons&kU.RIGHT)===kU.RIGHT&&(this._state|=this.mouseButtons.right);p()}},c=e=>{let t=this._findPointerById(e.pointerId);if(!(t&&t===this._lockedPointer)){if(t&&this._disposePointer(t),e.pointerType===`touch`)switch(this._activePointers.length){case 0:this._state=$.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=$.NONE;m()}},l=-1,u=e=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===$.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){let t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,r=e.clientY/t.height;if(nthis._interactiveArea.right||rthis._interactiveArea.bottom)return}if(e.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===$.ROTATE||this.mouseButtons.wheel===$.TRUCK){let e=performance.now();l-e<1e3&&this._getClientRect(this._elementRect),l=e}let t=ZU?-1:-3,n=e.deltaMode===1?e.deltaY/t:e.deltaY/(t*10),r=this.dollyToCursor?(e.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,i=this.dollyToCursor?(e.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case $.ROTATE:this._rotateInternal(e.deltaX,e.deltaY),this._isUserControllingRotate=!0;break;case $.TRUCK:this._truckInternal(e.deltaX,e.deltaY,!1),this._isUserControllingTruck=!0;break;case $.OFFSET:this._truckInternal(e.deltaX,e.deltaY,!0),this._isUserControllingOffset=!0;break;case $.DOLLY:this._dollyInternal(-n,r,i),this._isUserControllingDolly=!0;break;case $.ZOOM:this._zoomInternal(-n,r,i),this._isUserControllingZoom=!0;break}this.dispatchEvent({type:`control`})},d=t=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===e.ACTION.NONE){let e=t instanceof PointerEvent?t.pointerId:0,n=this._findPointerById(e);n&&this._disposePointer(n),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c);return}t.preventDefault()}},f=e=>{if(this._enabled){if(GU(this._activePointers,nW),this._getClientRect(this._elementRect),r.copy(nW),i.copy(nW),this._activePointers.length>=2){let e=nW.x-this._activePointers[1].clientX,t=nW.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t);a.set(0,n);let r=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,o=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(r,o)}if(this._state=0,!e)this._lockedPointer&&(this._state|=this.mouseButtons.left);else if(`pointerType`in e&&e.pointerType===`touch`)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else !this._lockedPointer&&(e.buttons&kU.LEFT)===kU.LEFT&&(this._state|=this.mouseButtons.left),(e.buttons&kU.MIDDLE)===kU.MIDDLE&&(this._state|=this.mouseButtons.middle),(e.buttons&kU.RIGHT)===kU.RIGHT&&(this._state|=this.mouseButtons.right);((this._state&$.ROTATE)===$.ROTATE||(this._state&$.TOUCH_ROTATE)===$.TOUCH_ROTATE||(this._state&$.TOUCH_DOLLY_ROTATE)===$.TOUCH_DOLLY_ROTATE||(this._state&$.TOUCH_ZOOM_ROTATE)===$.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&$.TRUCK)===$.TRUCK||(this._state&$.TOUCH_TRUCK)===$.TOUCH_TRUCK||(this._state&$.TOUCH_DOLLY_TRUCK)===$.TOUCH_DOLLY_TRUCK||(this._state&$.TOUCH_ZOOM_TRUCK)===$.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&$.DOLLY)===$.DOLLY||(this._state&$.TOUCH_DOLLY)===$.TOUCH_DOLLY||(this._state&$.TOUCH_DOLLY_TRUCK)===$.TOUCH_DOLLY_TRUCK||(this._state&$.TOUCH_DOLLY_OFFSET)===$.TOUCH_DOLLY_OFFSET||(this._state&$.TOUCH_DOLLY_ROTATE)===$.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&$.ZOOM)===$.ZOOM||(this._state&$.TOUCH_ZOOM)===$.TOUCH_ZOOM||(this._state&$.TOUCH_ZOOM_TRUCK)===$.TOUCH_ZOOM_TRUCK||(this._state&$.TOUCH_ZOOM_OFFSET)===$.TOUCH_ZOOM_OFFSET||(this._state&$.TOUCH_ZOOM_ROTATE)===$.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&$.OFFSET)===$.OFFSET||(this._state&$.TOUCH_OFFSET)===$.TOUCH_OFFSET||(this._state&$.TOUCH_DOLLY_OFFSET)===$.TOUCH_DOLLY_OFFSET||(this._state&$.TOUCH_ZOOM_OFFSET)===$.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:`controlstart`})}},p=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,GU(this._activePointers,nW);let e=this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,t=e?-e.deltaX:i.x-nW.x,n=e?-e.deltaY:i.y-nW.y;if(i.copy(nW),((this._state&$.ROTATE)===$.ROTATE||(this._state&$.TOUCH_ROTATE)===$.TOUCH_ROTATE||(this._state&$.TOUCH_DOLLY_ROTATE)===$.TOUCH_DOLLY_ROTATE||(this._state&$.TOUCH_ZOOM_ROTATE)===$.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(t,n),this._isUserControllingRotate=!0),(this._state&$.DOLLY)===$.DOLLY||(this._state&$.ZOOM)===$.ZOOM){let e=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,t=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0,i=this.dollyDragInverted?-1:1;(this._state&$.DOLLY)===$.DOLLY?(this._dollyInternal(i*n*XU,e,t),this._isUserControllingDolly=!0):(this._zoomInternal(i*n*XU,e,t),this._isUserControllingZoom=!0)}if((this._state&$.TOUCH_DOLLY)===$.TOUCH_DOLLY||(this._state&$.TOUCH_ZOOM)===$.TOUCH_ZOOM||(this._state&$.TOUCH_DOLLY_TRUCK)===$.TOUCH_DOLLY_TRUCK||(this._state&$.TOUCH_ZOOM_TRUCK)===$.TOUCH_ZOOM_TRUCK||(this._state&$.TOUCH_DOLLY_OFFSET)===$.TOUCH_DOLLY_OFFSET||(this._state&$.TOUCH_ZOOM_OFFSET)===$.TOUCH_ZOOM_OFFSET||(this._state&$.TOUCH_DOLLY_ROTATE)===$.TOUCH_DOLLY_ROTATE||(this._state&$.TOUCH_ZOOM_ROTATE)===$.TOUCH_ZOOM_ROTATE){let e=nW.x-this._activePointers[1].clientX,t=nW.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t),r=a.y-n;a.set(0,n);let o=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,s=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&$.TOUCH_DOLLY)===$.TOUCH_DOLLY||(this._state&$.TOUCH_DOLLY_ROTATE)===$.TOUCH_DOLLY_ROTATE||(this._state&$.TOUCH_DOLLY_TRUCK)===$.TOUCH_DOLLY_TRUCK||(this._state&$.TOUCH_DOLLY_OFFSET)===$.TOUCH_DOLLY_OFFSET?(this._dollyInternal(r*XU,o,s),this._isUserControllingDolly=!0):(this._zoomInternal(r*XU,o,s),this._isUserControllingZoom=!0)}((this._state&$.TRUCK)===$.TRUCK||(this._state&$.TOUCH_TRUCK)===$.TOUCH_TRUCK||(this._state&$.TOUCH_DOLLY_TRUCK)===$.TOUCH_DOLLY_TRUCK||(this._state&$.TOUCH_ZOOM_TRUCK)===$.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(t,n,!1),this._isUserControllingTruck=!0),((this._state&$.OFFSET)===$.OFFSET||(this._state&$.TOUCH_OFFSET)===$.TOUCH_OFFSET||(this._state&$.TOUCH_DOLLY_OFFSET)===$.TOUCH_DOLLY_OFFSET||(this._state&$.TOUCH_ZOOM_OFFSET)===$.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(t,n,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:`control`})},m=()=>{GU(this._activePointers,nW),i.copy(nW),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this.dispatchEvent({type:`controlend`}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener(`pointerlockchange`,h),this._domElement.ownerDocument.addEventListener(`pointerlockerror`,g),this._domElement.ownerDocument.addEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.addEventListener(`pointerup`,c),f())},this.unlockPointer=()=>{var e,t,n;this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),(e=this._domElement)==null||e.ownerDocument.exitPointerLock(),(t=this._domElement)==null||t.ownerDocument.removeEventListener(`pointerlockchange`,h),(n=this._domElement)==null||n.ownerDocument.removeEventListener(`pointerlockerror`,g),this.cancel()};let h=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},g=()=>{this.unlockPointer()};this._addAllEventListeners=e=>{this._domElement=e,this._domElement.style.touchAction=`none`,this._domElement.style.userSelect=`none`,this._domElement.style.webkitUserSelect=`none`,this._domElement.addEventListener(`pointerdown`,o),this._domElement.addEventListener(`pointercancel`,c),this._domElement.addEventListener(`wheel`,u,{passive:!1}),this._domElement.addEventListener(`contextmenu`,d)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction=``,this._domElement.style.userSelect=``,this._domElement.style.webkitUserSelect=``,this._domElement.removeEventListener(`pointerdown`,o),this._domElement.removeEventListener(`pointercancel`,c),this._domElement.removeEventListener(`wheel`,u,{passive:!1}),this._domElement.removeEventListener(`contextmenu`,d),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this._domElement.ownerDocument.removeEventListener(`pointerlockchange`,h),this._domElement.ownerDocument.removeEventListener(`pointerlockerror`,g))},this.cancel=()=>{this._state!==$.NONE&&(this._state=$.NONE,this._activePointers.length=0,m())},n&&this.connect(n),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction=`none`,this._domElement.style.userSelect=`none`,this._domElement.style.webkitUserSelect=`none`):(this.cancel(),this._domElement.style.touchAction=``,this._domElement.style.userSelect=``,this._domElement.style.webkitUserSelect=``))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=LU(e.width,0,1),this._interactiveArea.height=LU(e.height,0,1),this._interactiveArea.x=LU(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=LU(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,n=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,n=!1){this._isUserControllingRotate=!1;let r=LU(e,this.minAzimuthAngle,this.maxAzimuthAngle),i=LU(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=r,this._sphericalEnd.phi=i,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);let a=!n||zU(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&zU(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(a)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=AU.NONE,this._changedDolly=0,this._dollyToNoClamp(LU(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){let n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){let t=this._collisionTest(),r=zU(t,this._spherical.radius);if(!(n>e)&&r)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,t)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);let r=!t||zU(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(r)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(oW).multiplyScalar(e)),t||this._target.copy(this._targetEnd);let n=!t||zU(this._target.x,this._targetEnd.x,this.restThreshold)&&zU(this._target.y,this._targetEnd.y,this.restThreshold)&&zU(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=LU(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);let n=!t||zU(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t,n=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t,n=!1){this._camera.updateMatrix(),sW.setFromMatrixColumn(this._camera.matrix,0),cW.setFromMatrixColumn(this._camera.matrix,1),sW.multiplyScalar(e),cW.multiplyScalar(-t);let r=rW.copy(sW).add(cW),i=iW.copy(this._targetEnd).add(r);return this.moveTo(i.x,i.y,i.z,n)}forward(e,t=!1){rW.setFromMatrixColumn(this._camera.matrix,0),rW.crossVectors(this._camera.up,rW),rW.multiplyScalar(e);let n=iW.copy(this._targetEnd).add(rW);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return rW.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+rW.x,this._targetEnd.y+rW.y,this._targetEnd.z+rW.z,t)}moveTo(e,t,n,r=!1){this._isUserControllingTruck=!1;let i=rW.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,i,this.boundaryFriction),this._needsUpdate=!0,r||this._target.copy(this._targetEnd);let a=!r||zU(this._target.x,this._targetEnd.x,this.restThreshold)&&zU(this._target.y,this._targetEnd.y,this.restThreshold)&&zU(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(a)}lookInDirectionOf(e,t,n,r=!1){let i=rW.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);return this.setPosition(i.x,i.y,i.z,r)}fitToBox(e,t,{cover:n=!1,paddingLeft:r=0,paddingRight:i=0,paddingBottom:a=0,paddingTop:o=0}={}){let s=[],c=e.isBox3?mW.copy(e):mW.setFromObject(e);c.isEmpty()&&(console.warn(`camera-controls: fitTo() cannot be used with an empty box. Aborting`),Promise.resolve());let l=BU(this._sphericalEnd.theta,PU),u=BU(this._sphericalEnd.phi,PU);s.push(this.rotateTo(l,u,t));let d=rW.setFromSpherical(this._sphericalEnd).normalize(),f=_W.setFromUnitVectors(d,tW),p=zU(Math.abs(d.y),1);p&&f.multiply(vW.setFromAxisAngle(eW,l)),f.multiply(this._yAxisUpSpaceInverse);let m=hW.makeEmpty();iW.copy(c.min).applyQuaternion(f),m.expandByPoint(iW),iW.copy(c.min).setX(c.max.x).applyQuaternion(f),m.expandByPoint(iW),iW.copy(c.min).setY(c.max.y).applyQuaternion(f),m.expandByPoint(iW),iW.copy(c.max).setZ(c.min.z).applyQuaternion(f),m.expandByPoint(iW),iW.copy(c.min).setZ(c.max.z).applyQuaternion(f),m.expandByPoint(iW),iW.copy(c.max).setY(c.min.y).applyQuaternion(f),m.expandByPoint(iW),iW.copy(c.max).setX(c.min.x).applyQuaternion(f),m.expandByPoint(iW),iW.copy(c.max).applyQuaternion(f),m.expandByPoint(iW),m.min.x-=r,m.min.y-=a,m.max.x+=i,m.max.y+=o,f.setFromUnitVectors(tW,d),p&&f.premultiply(vW.invert()),f.premultiply(this._yAxisUpSpace);let h=m.getSize(rW),g=m.getCenter(iW).applyQuaternion(f);if(jU(this._camera)){let e=this.getDistanceToFitBox(h.x,h.y,h.z,n);s.push(this.moveTo(g.x,g.y,g.z,t)),s.push(this.dollyTo(e,t)),s.push(this.setFocalOffset(0,0,0,t))}else if(MU(this._camera)){let e=this._camera,r=e.right-e.left,i=e.top-e.bottom,a=n?Math.max(r/h.x,i/h.y):Math.min(r/h.x,i/h.y);s.push(this.moveTo(g.x,g.y,g.z,t)),s.push(this.zoomTo(a,t)),s.push(this.setFocalOffset(0,0,0,t))}return Promise.all(s)}fitToSphere(t,n){let r=[],i=`isObject3D`in t?e.createBoundingSphere(t,gW):gW.copy(t);if(r.push(this.moveTo(i.center.x,i.center.y,i.center.z,n)),jU(this._camera)){let e=this.getDistanceToFitSphere(i.radius);r.push(this.dollyTo(e,n))}else if(MU(this._camera)){let e=this._camera.right-this._camera.left,t=this._camera.top-this._camera.bottom,a=2*i.radius,o=Math.min(e/a,t/a);r.push(this.zoomTo(o,n))}return r.push(this.setFocalOffset(0,0,0,n)),Promise.all(r)}setLookAt(e,t,n,r,i,a,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=AU.NONE,this._changedDolly=0;let s=iW.set(r,i,a),c=rW.set(e,t,n);this._targetEnd.copy(s),this._sphericalEnd.setFromVector3(c.sub(s).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));let l=!o||zU(this._target.x,this._targetEnd.x,this.restThreshold)&&zU(this._target.y,this._targetEnd.y,this.restThreshold)&&zU(this._target.z,this._targetEnd.z,this.restThreshold)&&zU(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&zU(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&zU(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(l)}lerpLookAt(e,t,n,r,i,a,o,s,c,l,u,d,f,p=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=AU.NONE,this._changedDolly=0;let m=rW.set(r,i,a),h=iW.set(e,t,n);fW.setFromVector3(h.sub(m).applyQuaternion(this._yAxisUpSpace));let g=aW.set(l,u,d),_=iW.set(o,s,c);pW.setFromVector3(_.sub(g).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(m.lerp(g,f));let v=pW.theta-fW.theta,y=pW.phi-fW.phi,b=pW.radius-fW.radius;this._sphericalEnd.set(fW.radius+b*f,fW.phi+y*f,fW.theta+v*f),this.normalizeRotations(),this._needsUpdate=!0,p||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));let x=!p||zU(this._target.x,this._targetEnd.x,this.restThreshold)&&zU(this._target.y,this._targetEnd.y,this.restThreshold)&&zU(this._target.z,this._targetEnd.z,this.restThreshold)&&zU(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&zU(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&zU(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(x)}setPosition(e,t,n,r=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,r)}setTarget(e,t,n,r=!1){let i=this.getPosition(rW),a=this.setLookAt(i.x,i.y,i.z,e,t,n,r);return this._sphericalEnd.phi=LU(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),a}setFocalOffset(e,t,n,r=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,r||this._focalOffset.copy(this._focalOffsetEnd);let i=!r||zU(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&zU(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&zU(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),sW.setFromMatrixColumn(this._camera.matrixWorldInverse,0),cW.setFromMatrixColumn(this._camera.matrixWorldInverse,1),lW.setFromMatrixColumn(this._camera.matrixWorldInverse,2);let r=rW.set(e,t,n),i=r.distanceTo(this._camera.position),a=r.sub(this._camera.position);sW.multiplyScalar(a.x),cW.multiplyScalar(a.y),lW.multiplyScalar(a.z),rW.copy(sW).add(cW).add(lW),rW.z+=i,this.dollyTo(i,!1),this.setFocalOffset(-rW.x,rW.y,-rW.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,r){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new QU.Vector4,typeof e==`number`?this._viewport.set(e,t,n,r):this._viewport.copy(e)}getDistanceToFitBox(e,t,n,r=!1){if(KU(this._camera,`getDistanceToFitBox`))return this._spherical.radius;let i=e/t,a=this._camera.getEffectiveFOV()*IU,o=this._camera.aspect;return((r?i>o:it.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){let r=t.lengthSq();if(r===0)return e;let i=iW.copy(t).add(e),a=this._boundary.clampPoint(i,aW).sub(i),o=a.lengthSq();if(o===0)return e.add(t);if(o===r)return e;if(n===0)return e.add(t).add(a);{let r=1+n*o/t.dot(a);return e.add(iW.copy(t).multiplyScalar(r)).add(a.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(jU(this._camera)){let e=this._camera,t=e.near,n=e.getEffectiveFOV()*IU,r=Math.tan(n*.5)*t,i=r*e.aspect;this._nearPlaneCorners[0].set(-i,-r,0),this._nearPlaneCorners[1].set(i,-r,0),this._nearPlaneCorners[2].set(i,r,0),this._nearPlaneCorners[3].set(-i,r,0)}else if(MU(this._camera)){let e=this._camera,t=1/e.zoom,n=e.left*t,r=e.right*t,i=e.top*t,a=e.bottom*t;this._nearPlaneCorners[0].set(n,i,0),this._nearPlaneCorners[1].set(r,i,0),this._nearPlaneCorners[2].set(r,a,0),this._nearPlaneCorners[3].set(n,a,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||KU(this._camera,`_collisionTest`))return e;let t=this._getTargetDirection(oW);yW.lookAt($U,t,this._camera.up);for(let n=0;n<4;n++){let r=iW.copy(this._nearPlaneCorners[n]);r.applyMatrix4(yW);let i=aW.addVectors(this._target,r);bW.set(i,t),bW.far=this._spherical.radius+1;let a=bW.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{let t=()=>{this.removeEventListener(`rest`,t),e()};this.addEventListener(`rest`,t)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(`.dampingFactor has been deprecated. use smoothTime (in seconds) instead.`),0}set dampingFactor(e){console.warn(`.dampingFactor has been deprecated. use smoothTime (in seconds) instead.`)}get draggingDampingFactor(){return console.warn(`.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.`),0}set draggingDampingFactor(e){console.warn(`.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.`)}static createBoundingSphere(e,t=new QU.Sphere){let n=t,r=n.center;mW.makeEmpty(),e.traverseVisible(e=>{e.isMesh&&mW.expandByObject(e)}),mW.getCenter(r);let i=0;return e.traverseVisible(e=>{if(!e.isMesh)return;let t=e,n=t.geometry.clone();n.applyMatrix4(t.matrixWorld);let a=n.attributes.position;for(let e=0,t=a.count;e!!(e&&e.isPerspectiveCamera),CW=e=>!!(e&&e.isOrthographicCamera),wW=`min-polar-angle.max-polar-angle.min-azimuth-angle.max-azimuth-angle.distance.min-distance.max-distance.infinity-dolly.min-zoom.max-zoom.smooth-time.dragging-smooth-time.max-speed.azimuth-rotate-speed.polar-rotate-speed.dolly-speed.dolly-drag-inverted.truck-speed.dolly-to-cursor.drag-to-offset.vertical-drag-to-forward.boundary-friction.rest-threshold.collider-meshes.args.mouse-buttons.touches`.split(`.`),TW=(e,t)=>({left:xW.ACTION.ROTATE,middle:xW.ACTION.DOLLY,right:xW.ACTION.TRUCK,wheel:SW(e)?xW.ACTION.DOLLY:CW(e)?xW.ACTION.ZOOM:xW.ACTION.NONE,...t}),EW=(e,t)=>({one:xW.ACTION.TOUCH_ROTATE,two:SW(e)?xW.ACTION.TOUCH_DOLLY_TRUCK:CW(e)?xW.ACTION.TOUCH_ZOOM_TRUCK:xW.ACTION.NONE,three:xW.ACTION.TOUCH_TRUCK,...t}),DW=an({__name:`CameraControls`,props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},minPolarAngle:{default:0},maxPolarAngle:{default:Math.PI},minAzimuthAngle:{default:-1/0},maxAzimuthAngle:{default:1/0},distance:{default:()=>ke().camera.value.position.z},minDistance:{default:2**-52},maxDistance:{default:1/0},infinityDolly:{type:Boolean,default:!1},minZoom:{default:.01},maxZoom:{default:1/0},smoothTime:{default:.25},draggingSmoothTime:{default:.125},maxSpeed:{default:1/0},azimuthRotateSpeed:{default:1},polarRotateSpeed:{default:1},dollySpeed:{default:1},dollyDragInverted:{type:Boolean,default:!1},truckSpeed:{default:2},dollyToCursor:{type:Boolean,default:!1},dragToOffset:{type:Boolean,default:!1},verticalDragToForward:{type:Boolean,default:!1},boundaryFriction:{default:0},restThreshold:{default:.01},colliderMeshes:{default:()=>[]},mouseButtons:{default:()=>TW(ke().camera.value)},touches:{default:()=>EW(ke().camera.value)}},emits:[`change`,`start`,`end`],setup(e,{expose:t,emit:n}){let r=e,i=n,{makeDefault:a,minPolarAngle:o,maxPolarAngle:s,minAzimuthAngle:c,maxAzimuthAngle:l,distance:u,minDistance:d,maxDistance:f,infinityDolly:p,minZoom:m,maxZoom:h,smoothTime:g,draggingSmoothTime:_,maxSpeed:v,azimuthRotateSpeed:y,polarRotateSpeed:b,dollySpeed:x,dollyDragInverted:S,truckSpeed:C,dollyToCursor:w,dragToOffset:T,verticalDragToForward:E,boundaryFriction:D,restThreshold:O,colliderMeshes:k}=pn(r),A={Box3:Zt,MathUtils:{clamp:fe.clamp},Matrix4:ot,Quaternion:Je,Raycaster:pe,Sphere:ze,Spherical:Pt,Vector2:ve,Vector3:V,Vector4:oe};xW.install({THREE:A});let{camera:j,renderer:M,extend:N,controls:ee,invalidate:P}=ke();W(r,()=>{P()});let I=jn(()=>TW(r.camera||j.value,r.mouseButtons)),L=jn(()=>EW(r.camera||j.value,r.touches)),R=dn(null);N({CameraControls:xW}),Tn(()=>{z(),R.value&&a.value?ee.value=R.value:ee.value=null});function z(){OR(R.value,`update`,()=>{i(`change`,R.value),P()}),OR(R.value,`controlend`,()=>i(`end`,R.value)),OR(R.value,`controlstart`,()=>i(`start`,R.value))}let{onBeforeRender:te}=F();return te(({delta:e,invalidate:t})=>{var n,r;(n=R.value)!=null&&n.enabled&&((r=R.value)==null||r.update(e),t())}),un(()=>{R.value&&R.value.disconnect()}),t({instance:R}),(e,t)=>(e.camera||K(j))&&(e.domElement||K(M))?(G(),cn(`TresCameraControls`,{key:0,ref_key:`controlsRef`,ref:R,"min-polar-angle":K(o),"max-polar-angle":K(s),"min-azimuth-angle":K(c),"max-azimuth-angle":K(l),distance:K(u),"min-distance":K(d),"max-distance":K(f),"infinity-dolly":K(p),"min-zoom":K(m),"max-zoom":K(h),"smooth-time":K(g),"dragging-smooth-time":K(_),"max-speed":K(v),"azimuth-rotate-speed":K(y),"polar-rotate-speed":K(b),"dolly-speed":K(x),"dolly-drag-inverted":K(S),"truck-speed":K(C),"dolly-to-cursor":K(w),"drag-to-offset":K(T),"vertical-drag-to-forward":K(E),"boundary-friction":K(D),"rest-threshold":K(O),"collider-meshes":K(k),args:[e.camera||K(j),e.domElement||K(M).domElement],"mouse-buttons":I.value,touches:L.value},null,8,wW)):on(``,!0)}}),OW=an({__name:`KeyboardControls`,props:{makeDefault:{type:Boolean,default:!0},camera:{},domElement:{},moveSpeed:{default:.2},selector:{}},emits:[`isLock`,`change`],setup(e,{expose:t,emit:n}){let r=e,i=n,{moveSpeed:a}=pn(r),{camera:o,controls:s,renderer:c,invalidate:l}=ke();W(r,()=>{l()});let u=H(0),d=H(0),{KeyW:f,KeyA:p,KeyS:m,KeyD:h,Up:g,Down:_,Left:v,Right:y}=LR();Tn(()=>{p.value||v.value?u.value=-a.value:h.value||y.value?u.value=a.value:u.value=0,f.value||g.value?d.value=a.value:m.value||_.value?d.value=-a.value:d.value=0}),t({instance:s});let b=e=>i(`isLock`,e),x=e=>i(`change`,e),S=new V,C=new V,w=new Je,T=(e,t)=>{var n;if(!((n=o.value)!=null&&n.position)&&!S)return;let r=o.value,a=e*.001;r?.translateZ(-t),w.set(C.x*a,C.y*a,C.z*a,1).normalize(),r?.quaternion.multiply(w),(u.value||d.value)&&i(`change`,s.value)},{onBeforeRender:E}=F();return E(({delta:e,invalidate:t})=>{var n;s.value instanceof oV&&(n=s.value)!=null&&n.isLocked&&(T(e,d.value),s.value.moveRight(u.value),t())}),(e,t)=>(G(),En(K(PW),{selector:e.selector,"make-default":e.makeDefault,camera:e.camera||K(o),"dom-element":e.domElement||K(c).domElement,onIsLock:b,onChange:x},null,8,[`selector`,`make-default`,`camera`,`dom-element`]))}}),kW=[`args`,`auto-rotate`,`auto-rotate-speed`,`enable-damping`,`damping-factor`,`enable-pan`,`key-pan-speed`,`keys`,`max-azimuth-angle`,`min-azimuth-angle`,`max-polar-angle`,`min-polar-angle`,`min-distance`,`max-distance`,`min-zoom`,`max-zoom`,`enable-zoom`,`zoom-speed`,`enable-rotate`,`rotate-speed`],AW=an({__name:`MapControls`,props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},target:{},enableDamping:{type:Boolean,default:!0},dampingFactor:{default:.05},autoRotate:{type:Boolean,default:!1},autoRotateSpeed:{default:2},enablePan:{type:Boolean,default:!0},keyPanSpeed:{default:7},keys:{},maxAzimuthAngle:{default:1/0},minAzimuthAngle:{default:-1/0},maxPolarAngle:{default:Math.PI},minPolarAngle:{default:0},minDistance:{default:0},maxDistance:{default:1/0},minZoom:{default:0},maxZoom:{default:1/0},touches:{},enableZoom:{type:Boolean,default:!0},zoomSpeed:{default:1},enableRotate:{type:Boolean,default:!0},rotateSpeed:{default:1}},emits:[`change`,`start`,`end`],setup(e,{expose:t,emit:n}){let r=e,{autoRotate:i,autoRotateSpeed:a,enableDamping:o,dampingFactor:s,enablePan:c,keyPanSpeed:l,maxAzimuthAngle:u,minAzimuthAngle:d,maxPolarAngle:f,minPolarAngle:p,minDistance:m,maxDistance:h,minZoom:g,maxZoom:_,enableZoom:v,zoomSpeed:y,enableRotate:b,rotateSpeed:x}=pn(r),{camera:S,renderer:C,extend:w,controls:T,invalidate:E}=ke();W(r,()=>{E()});let D=dn(null);w({MapControls:hV}),W(T,e=>{e&&r.makeDefault?T.value=e:T.value=null});let{onBeforeRender:O}=F();return O(({invalidate:e})=>{D.value&&(o.value||i.value)&&(D.value.update(),e())}),un(()=>{D.value&&D.value.dispose()}),t({instance:D}),(e,t)=>(e.camera||K(S))&&(e.domElement||K(C))?(G(),cn(`TresMapControls`,{key:0,ref_key:`controlsRef`,ref:D,args:[e.camera||K(S),e.domElement||K(C).domElement],"auto-rotate":K(i),"auto-rotate-speed":K(a),"enable-damping":K(o),"damping-factor":K(s),"enable-pan":K(c),"key-pan-speed":K(l),keys:e.keys,"max-azimuth-angle":K(u),"min-azimuth-angle":K(d),"max-polar-angle":K(f),"min-polar-angle":K(p),"min-distance":K(m),"max-distance":K(h),"min-zoom":K(g),"max-zoom":K(_),"enable-zoom":K(v),"zoom-speed":K(y),"enable-rotate":K(b),"rotate-speed":K(x)},null,8,kW)):on(``,!0)}}),jW=[`target`,`auto-rotate`,`auto-rotate-speed`,`enable-damping`,`damping-factor`,`enable-pan`,`key-pan-speed`,`keys`,`max-azimuth-angle`,`min-azimuth-angle`,`max-polar-angle`,`min-polar-angle`,`min-distance`,`max-distance`,`min-zoom`,`max-zoom`,`touches`,`enable-zoom`,`zoom-speed`,`enable-rotate`,`rotate-speed`,`mouse-buttons`,`args`],MW=an({__name:`OrbitControls`,props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},target:{default:()=>[0,0,0]},enableDamping:{type:Boolean,default:!0},dampingFactor:{default:.05},autoRotate:{type:Boolean,default:!1},autoRotateSpeed:{default:2},enablePan:{type:Boolean,default:!0},keyPanSpeed:{default:7},keys:{},maxAzimuthAngle:{default:1/0},minAzimuthAngle:{default:-1/0},maxPolarAngle:{default:Math.PI},minPolarAngle:{default:0},minDistance:{default:0},maxDistance:{default:1/0},minZoom:{default:0},maxZoom:{default:1/0},touches:{default:()=>({ONE:Ke.ROTATE,TWO:Ke.DOLLY_PAN})},enableZoom:{type:Boolean,default:!0},zoomSpeed:{default:1},enableRotate:{type:Boolean,default:!0},rotateSpeed:{default:1},mouseButtons:{default:()=>({LEFT:Ue.ROTATE,MIDDLE:Ue.DOLLY,RIGHT:Ue.PAN})}},emits:[`change`,`start`,`end`],setup(e,{expose:t,emit:n}){let r=e,i=n,{makeDefault:a,autoRotate:o,autoRotateSpeed:s,enableDamping:c,dampingFactor:l,enablePan:u,keyPanSpeed:d,maxAzimuthAngle:f,minAzimuthAngle:p,maxPolarAngle:m,minPolarAngle:h,minDistance:g,maxDistance:_,minZoom:v,maxZoom:y,enableZoom:b,zoomSpeed:x,enableRotate:S,touches:C,rotateSpeed:w,target:T,mouseButtons:E}=pn(r),{camera:D,renderer:O,extend:k,controls:A,invalidate:j}=ke(),M=dn(null);k({OrbitControls:mV}),W(M,e=>{N(),e&&a.value?A.value=e:A.value=null});function N(){OR(M.value,`change`,()=>{i(`change`,M.value),j()}),OR(M.value,`start`,()=>i(`start`,M.value)),OR(M.value,`end`,()=>i(`end`,M.value))}let{onBeforeRender:ee}=F();return ee(({invalidate:e})=>{M.value&&(c.value||o.value)&&(M.value.update(),o.value&&e())}),un(()=>{M.value&&M.value.dispose()}),t({instance:M}),(e,t)=>(e.camera||K(D))&&(e.domElement||K(O))?(G(),cn(`TresOrbitControls`,{key:0,ref_key:`controlsRef`,ref:M,target:K(T),"auto-rotate":K(o),"auto-rotate-speed":K(s),"enable-damping":K(c),"damping-factor":K(l),"enable-pan":K(u),"key-pan-speed":K(d),keys:e.keys,"max-azimuth-angle":K(f),"min-azimuth-angle":K(p),"max-polar-angle":K(m),"min-polar-angle":K(h),"min-distance":K(g),"max-distance":K(_),"min-zoom":K(v),"max-zoom":K(y),touches:K(C),"enable-zoom":K(b),"zoom-speed":K(x),"enable-rotate":K(S),"rotate-speed":K(w),"mouse-buttons":K(E),args:[e.camera||K(D),e.domElement||K(O).domElement]},null,8,jW)):on(``,!0)}}),NW=[`args`],PW=an({__name:`PointerLockControls`,props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},selector:{}},emits:[`isLock`,`change`],setup(e,{expose:t,emit:n}){let r=e,i=n,{camera:a,renderer:o,extend:s,controls:c,invalidate:l}=ke();W(r,()=>{l()});let u=dn(null),d;s({PointerLockControls:oV});let f=e=>{i(`isLock`,e)};return W(u,e=>{e&&r.makeDefault?c.value=e:c.value=null,d=document.getElementById(r.selector||``)||o.value.domElement,OR(d,`click`,()=>{u.value&&(u.value.lock(),u.value.addEventListener(`lock`,()=>f(!0)),u.value.addEventListener(`unlock`,()=>f(!1)),l())})}),un(()=>{let e=u.value;e&&(e.removeEventListener(`lock`,()=>f(!0)),e.removeEventListener(`unlock`,()=>f(!1)),e.dispose())}),t({instance:c}),(e,t)=>(e.camera||K(a))&&(e.domElement||K(o))?(G(),cn(`TresPointerLockControls`,{key:0,ref_key:`controlsRef`,ref:u,args:[e.camera||K(a),e.domElement||K(o).domElement]},null,8,NW)):on(``,!0)}}),FW=an({__name:`ScrollControls`,props:{pages:{default:4},distance:{default:4},smoothScroll:{default:.1},horizontal:{type:Boolean,default:!1},htmlScroll:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{expose:t,emit:n}){let r=e,i=n,{logWarning:a}=R();r.smoothScroll<0&&a(`SmoothControl must be greater than zero`),r.pages<0&&a(`Pages must be greater than zero`);let{camera:o,controls:s,renderer:c,invalidate:l}=ke();W(r,()=>{l()});let u=dn(),d=document.createElement(`div`),{y:f}=BR(),{x:p,y:m,isScrolling:h}=FR(d),{height:g,width:_}=VR(),v=0,y=H(!1),b=H(0),x=H(0),S=H(0),C=r.horizontal?`x`:`y`,w=W(o,e=>{if(y.value){w();return}v=r.horizontal?e?.position.x||0:e?.position.y||0,y.value=!0},{immediate:!0});W(h,e=>{s.value&&(s.value.enabled=!e)},{immediate:!0}),W(f,e=>{!h.value&&!r.htmlScroll||(x.value=e/g.value/(S.value/g.value-1),b.value=-1*x.value,i(`update:modelValue`,x.value))}),W(m,e=>{x.value=e/g.value/(S.value/g.value),b.value=-1*x.value,i(`update:modelValue`,x.value)}),W(p,e=>{x.value=e/_.value/(S.value/_.value-1),b.value=+x.value,i(`update:modelValue`,x.value)}),W(c,e=>{var t,n;let i=e?.domElement;if(r.htmlScroll&&e!=null&&e.domElement)i!=null&&i.style.width&&i!=null&&i.style.position&&i!=null&&i.style.top&&i!=null&&i.style.left&&(i.style.width=`100%`,i.style.position=`fixed`,i.style.zIndex=` -99999`,i.style.top=`0`,i.style.left=`0`),S.value=document.body.scrollHeight;else{let a=document.createElement(`div`),o=document.createElement(`div`);d.style[r.horizontal?`overflowX`:`overflowY`]=`auto`,d.style[r.horizontal?`overflowY`:`overflowX`]=`hidden`,d.style.position=`absolute`,d.style.width=`100%`,d.style.height=` 100%`,d.style.top=`0`,d.style.left=`0`,d.classList.add(`scrollContainer`),a.style.position=`sticky`,a.style.top=`0px`,a.style.left=`0px`,a.style.width=`100%`,a.style.height=`100%`,a.style.overflow=`hidden`,d.appendChild(a),o.style.height=r.horizontal?`100%`:`${g.value*r.pages}px`,o.style.width=r.horizontal?`${_.value*r.pages}px`:`100vw`,o.style.pointerEvents=`none`,i.style.position=`fixed`,i.style.zIndex=`0`,i!=null&&i.style.width&&(i.style.width=`100%`),d.appendChild(o),e!=null&&e.domElement.parentNode&&(e.domElement.parentNode.style.position=`relative`),(n=(t=e?.domElement)?.parentNode)==null||n.appendChild(d),S.value=r.horizontal?_.value*r.pages:g.value*r.pages}},{immediate:!0});let{onBeforeRender:T}=F();return T(({invalidate:e})=>{var t;if((t=o.value)!=null&&t.position){let t=(b.value*r.distance-o.value.position[C]+v)*r.smoothScroll;o.value.position[C]+=t,u.value.children.length>0&&(u.value.position[C]+=t),e()}}),t({instance:u}),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`wrapperRef`,ref:u},[Dn(e.$slots,`default`)],512))}}),IW=[`object`,`args`,`mode`,`enabled`,`axis`,`translation-snap`,`rotation-snap`,`scale-snap`,`space`,`size`,`show-x`,`show-y`,`show-z`],LW=an({__name:`TransformControls`,props:{object:{},camera:{},mode:{default:`translate`},enabled:{type:Boolean,default:!0},axis:{default:`XYZ`},translationSnap:{},rotationSnap:{},scaleSnap:{},space:{default:`world`},size:{default:1},showX:{type:Boolean,default:!0},showY:{type:Boolean,default:!0},showZ:{type:Boolean,default:!0}},emits:[`dragging`,`change`,`mouseDown`,`mouseUp`,`objectChange`],setup(e,{expose:t,emit:n}){let r=e,i=n,{object:a,mode:o,enabled:s,axis:c,translationSnap:l,rotationSnap:u,scaleSnap:d,space:f,size:p,showX:m,showY:h,showZ:g}=pn(r),_=dn(null),{controls:v,camera:y,renderer:b,extend:x,invalidate:S}=ke();W([a,o,s,c,l,u,d,f,p,m,h,g],()=>{S()}),x({TransformControls:JB});let C=()=>{S(),i(`change`)},w=e=>{v.value&&(v.value.enabled=!e.value),S(),i(`dragging`,e.value)},T=()=>{S(),i(`mouseDown`)},E=()=>{S(),i(`mouseDown`)},D=()=>{S(),i(`objectChange`)};function O(){OR(_.value,`change`,C),OR(_.value,`dragging-changed`,w),OR(_.value,`mouseDown`,T),OR(_.value,`mouseUp`,E),OR(_.value,`objectChange`,D)}return W(_,e=>{e&&O()}),un(()=>{_.value&&_.value.dispose()}),t({instance:_}),(e,t)=>{var n;return(e.camera||K(y))&&K(b)?(G(),cn(`TresTransformControls`,{ref_key:`controlsRef`,ref:_,key:(n=e.camera||K(y))?.uuid,object:K(a),args:[e.camera||K(y),K(b).domElement],mode:K(o),enabled:K(s),axis:K(c),"translation-snap":K(l),"rotation-snap":K(u),"scale-snap":K(d),space:K(f),size:K(p),"show-x":K(m),"show-y":K(h),"show-z":K(g),visible:!0},null,8,IW)):on(``,!0)}}}),RW=[`geometry`,`render-order`],zW=an({__name:`component`,props:{src:{},skipStrokes:{type:Boolean,default:!1},skipFills:{type:Boolean,default:!1},fillMaterial:{},strokeMaterial:{},fillMeshProps:{},strokeMeshProps:{},depth:{default:`renderOrder`}},setup(e,{expose:t}){let n=e;class r extends WV{load(e,t,n,r){let i=Array.isArray(e)?e[0]:e;super.load(i,t,n,r)}}let{src:i,skipStrokes:a,skipFills:o,fillMaterial:s,strokeMaterial:c,fillMeshProps:l,strokeMeshProps:u,depth:d}=pn(n),f=dn(),p=dn([]),m=dn([]);t({instance:f}),Tn(async()=>h(i.value).then(e=>m.value=e.paths)),W([o,a,s,c,m],_);async function h(e){let t=e.startsWith(`e.geometry.dispose())}function _(){var e,t,r;g();let i=[],[s,c]=(()=>{let e={flat:!1,renderOrder:!1,offsetZ:!0},t={flat:0,renderOrder:0,offsetZ:.025},n=d.value;return typeof n==`number`?[!0,n]:[e[n],t[n]]})(),l=0;for(let u of m.value){let d=(e=u.userData)?.style??{},f=Object.assign({color:d.fill,opacity:d.fillOpacity,transparent:!0,side:Rt,depthWrite:s},n.fillMaterial);if(!o.value&&d.fill!==void 0&&d.fill!==`none`)for(let e of WV.createShapes(u)){let t=new ce(e);t.scale(1,-1,1),c&&t.translate(0,0,l++*c),i.push({geometry:t,material:f,isStroke:!1})}if(!a.value&&d.stroke!==void 0&&d.stroke!==`none`){let e=Object.assign({color:(t=u.userData)?.style.stroke,opacity:(r=u.userData)?.style.strokeOpacity,transparent:!0,side:Rt,depthWrite:s},n.strokeMaterial);for(let t of u.subPaths){let n=t.getPoints().map(e=>new ve(e.x,-e.y)),r=WV.pointsToStroke(n,d||`none`);c&&r.translate(0,0,l++*c),i.push({geometry:r,material:e,isStroke:!0})}}}p.value=i}return(e,t)=>(G(),cn(`TresGroup`,{ref_key:`svgRef`,ref:f},[(G(!0),cn(An,null,wn(p.value,({geometry:e,material:t,isStroke:n},r)=>(G(),cn(`TresMesh`,Pn({key:`${r}`,ref_for:!0},K(n?u:l),{geometry:e,"render-order":K(d)===`renderOrder`?r:0}),[U(`TresMeshBasicMaterial`,Pn({ref_for:!0},t),null,16)],16,RW))),128))],512))}});function BW(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function VW(e){throw Error(`Could not dynamically require "`+e+`". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.`)}var HW={exports:{}},UW;function WW(){return UW||(UW=1,function(e,t){(function(t){e.exports=t()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof VW==`function`&&VW;if(!s&&c)return c(o,!0);if(a)return a(o,!0);throw Error(`Cannot find module '`+o+`'`)}s=n[o]={exports:{}},t[o][0].call(s.exports,function(e){var n=t[o][1][e];return i(n||e)},s,s.exports,e,t,n,r)}return n[o].exports}for(var a=typeof VW==`function`&&VW,o=0;o>16),c((65280&r)>>8),c(255&r);return i==2?c(255&(r=l(e.charAt(n))<<2|l(e.charAt(n+1))>>4)):i==1&&(c((r=l(e.charAt(n))<<10|l(e.charAt(n+1))<<4|l(e.charAt(n+2))>>2)>>8&255),c(255&r)),a},e.fromByteArray=function(e){var t,n,r,i,a=e.length%3,o=``;function s(e){return`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.charAt(e)}for(t=0,r=e.length-a;t>18&63)+s(i>>12&63)+s(i>>6&63)+s(63&i);switch(a){case 1:o=(o+=s((n=e[e.length-1])>>2))+s(n<<4&63)+`==`;break;case 2:o=(o=(o+=s((n=(e[e.length-2]<<8)+e[e.length-1])>>10))+s(n>>4&63))+s(n<<2&63)+`=`}return o}})(n===void 0?this.base64js={}:n)}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js`,`/node_modules/gulp-browserify/node_modules/base64-js/lib`)},{buffer:3,lYpoI2:11}],3:[function(e,t,n){(function(t,r,i,a,o,s,c,l,u){var d=e(`base64-js`),f=e(`ieee754`);function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);var r,a,o,s,c=typeof e;if(t===`base64`&&c==`string`)for(e=(s=e).trim?s.trim():s.replace(/^\s+|\s+$/g,``);e.length%4!=0;)e+=`=`;if(c==`number`)r=A(e);else if(c==`string`)r=i.byteLength(e,t);else{if(c!=`object`)throw Error(`First argument needs to be a number, array or string.`);r=A(e.length)}if(i._useTypedArrays?a=i._augment(new Uint8Array(r)):((a=this).length=r,a._isBuffer=!0),i._useTypedArrays&&typeof e.byteLength==`number`)a._set(e);else if(j(s=e)||i.isBuffer(s)||s&&typeof s==`object`&&typeof s.length==`number`)for(o=0;o>8,n%=256,r.push(n),r.push(t);return r}(t),e,n,r)}function h(e,t,n){var r=``;n=Math.min(e.length,n);for(var i=t;i>>0)):(t+1>>0),i}function v(e,t,n,r){if(r||(z(typeof n==`boolean`,`missing or invalid endian`),z(t!=null,`missing offset`),z(t+1>>8*(r?a:1-a)}function C(e,t,n,r,i){if(i||(z(t!=null,`missing value`),z(typeof r==`boolean`,`missing or invalid endian`),z(n!=null,`missing offset`),z(n+3>>8*(r?a:3-a)&255}function w(e,t,n,r,i){i||(z(t!=null,`missing value`),z(typeof r==`boolean`,`missing or invalid endian`),z(n!=null,`missing offset`),z(n+1this.length&&(r=this.length);var a=(r=e.length-t=this.length))return this[e]},i.prototype.readUInt16LE=function(e,t){return g(this,e,!0,t)},i.prototype.readUInt16BE=function(e,t){return g(this,e,!1,t)},i.prototype.readUInt32LE=function(e,t){return _(this,e,!0,t)},i.prototype.readUInt32BE=function(e,t){return _(this,e,!1,t)},i.prototype.readInt8=function(e,t){if(t||(z(e!=null,`missing offset`),z(e=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){return v(this,e,!0,t)},i.prototype.readInt16BE=function(e,t){return v(this,e,!1,t)},i.prototype.readInt32LE=function(e,t){return y(this,e,!0,t)},i.prototype.readInt32BE=function(e,t){return y(this,e,!1,t)},i.prototype.readFloatLE=function(e,t){return b(this,e,!0,t)},i.prototype.readFloatBE=function(e,t){return b(this,e,!1,t)},i.prototype.readDoubleLE=function(e,t){return x(this,e,!0,t)},i.prototype.readDoubleBE=function(e,t){return x(this,e,!1,t)},i.prototype.writeUInt8=function(e,t,n){n||(z(e!=null,`missing value`),z(t!=null,`missing offset`),z(t=this.length||(this[t]=e)},i.prototype.writeUInt16LE=function(e,t,n){S(this,e,t,!0,n)},i.prototype.writeUInt16BE=function(e,t,n){S(this,e,t,!1,n)},i.prototype.writeUInt32LE=function(e,t,n){C(this,e,t,!0,n)},i.prototype.writeUInt32BE=function(e,t,n){C(this,e,t,!1,n)},i.prototype.writeInt8=function(e,t,n){n||(z(e!=null,`missing value`),z(t!=null,`missing offset`),z(t=this.length||(0<=e?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},i.prototype.writeInt16LE=function(e,t,n){w(this,e,t,!0,n)},i.prototype.writeInt16BE=function(e,t,n){w(this,e,t,!1,n)},i.prototype.writeInt32LE=function(e,t,n){T(this,e,t,!0,n)},i.prototype.writeInt32BE=function(e,t,n){T(this,e,t,!1,n)},i.prototype.writeFloatLE=function(e,t,n){E(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){E(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){D(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){D(this,e,t,!1,n)},i.prototype.fill=function(e,t,n){if(t||=0,n||=this.length,z(typeof(e=typeof(e||=0)==`string`?e.charCodeAt(0):e)==`number`&&!isNaN(e),`value is not a number`),z(t<=n,`end < start`),n!==t&&this.length!==0){z(0<=t&&t`},i.prototype.toArrayBuffer=function(){if(typeof Uint8Array>`u`)throw Error(`Buffer.toArrayBuffer not supported in this browser`);if(i._useTypedArrays)return new i(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function F(e){try{return decodeURIComponent(e)}catch{return`�`}}function I(e,t){z(typeof e==`number`,`cannot write a non-number as a number`),z(0<=e,`specified a negative value for writing an unsigned value`),z(e<=t,`value is larger than maximum value for type`),z(Math.floor(e)===e,`value has a fractional component`)}function L(e,t,n){z(typeof e==`number`,`cannot write a non-number as a number`),z(e<=t,`value larger than maximum allowed value`),z(n<=e,`value smaller than minimum allowed value`),z(Math.floor(e)===e,`value has a fractional component`)}function R(e,t,n){z(typeof e==`number`,`cannot write a non-number as a number`),z(e<=t,`value larger than maximum allowed value`),z(n<=e,`value smaller than minimum allowed value`)}function z(e,t){if(!e)throw Error(t||`Failed assertion`)}i._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=O.get,e.set=O.set,e.write=O.write,e.toString=O.toString,e.toLocaleString=O.toString,e.toJSON=O.toJSON,e.copy=O.copy,e.slice=O.slice,e.readUInt8=O.readUInt8,e.readUInt16LE=O.readUInt16LE,e.readUInt16BE=O.readUInt16BE,e.readUInt32LE=O.readUInt32LE,e.readUInt32BE=O.readUInt32BE,e.readInt8=O.readInt8,e.readInt16LE=O.readInt16LE,e.readInt16BE=O.readInt16BE,e.readInt32LE=O.readInt32LE,e.readInt32BE=O.readInt32BE,e.readFloatLE=O.readFloatLE,e.readFloatBE=O.readFloatBE,e.readDoubleLE=O.readDoubleLE,e.readDoubleBE=O.readDoubleBE,e.writeUInt8=O.writeUInt8,e.writeUInt16LE=O.writeUInt16LE,e.writeUInt16BE=O.writeUInt16BE,e.writeUInt32LE=O.writeUInt32LE,e.writeUInt32BE=O.writeUInt32BE,e.writeInt8=O.writeInt8,e.writeInt16LE=O.writeInt16LE,e.writeInt16BE=O.writeInt16BE,e.writeInt32LE=O.writeInt32LE,e.writeInt32BE=O.writeInt32BE,e.writeFloatLE=O.writeFloatLE,e.writeFloatBE=O.writeFloatBE,e.writeDoubleLE=O.writeDoubleLE,e.writeDoubleBE=O.writeDoubleBE,e.fill=O.fill,e.inspect=O.inspect,e.toArrayBuffer=O.toArrayBuffer,e}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/buffer/index.js`,`/node_modules/gulp-browserify/node_modules/buffer`)},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(e,t,n){(function(n,r,i,a,o,s,c,l,u){var i=e(`buffer`).Buffer,d=4,f=new i(d);f.fill(0),t.exports={hash:function(e,t,n,r){for(var a=t(function(e,t){e.length%d!=0&&(n=e.length+(d-e.length%d),e=i.concat([e,f],n));for(var n,r=[],a=t?e.readInt32BE:e.readInt32LE,o=0;oh?t=e(t):t.length>5]|=128<>>9<<4)]=t;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,o=0;o>>32-i,n)}function m(e,t,n,r,i,a,o){return p(t&n|~t&r,e,t,i,a,o)}function h(e,t,n,r,i,a,o){return p(t&r|n&~r,e,t,i,a,o)}function g(e,t,n,r,i,a,o){return p(t^n^r,e,t,i,a,o)}function _(e,t,n,r,i,a,o){return p(n^(t|~r),e,t,i,a,o)}function v(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}t.exports=function(e){return d.hash(e,f,16)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(e,t,n){(function(e,n,r,i,a,o,s,c,l){t.exports=function(e){for(var t,n=Array(e),r=0;r>>((3&r)<<3)&255;return n}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{buffer:3,lYpoI2:11}],8:[function(e,t,n){(function(n,r,i,a,o,s,c,l,u){var d=e(`./helpers`);function f(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n,r,i,a=Array(80),o=1732584193,s=-271733879,c=-1732584194,l=271733878,u=-1009589776,d=0;d>16)+(t>>16)+(n>>16)<<16|65535&n}function m(e,t){return e<>>32-t}t.exports=function(e){return d.hash(e,f,20,!0)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(e,t,n){(function(n,r,i,a,o,s,c,l,u){function d(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function f(e,t){var n,r=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],i=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],a=Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var o,s,c=0;c>>t|e<<32-t},h=function(e,t){return e>>>t};t.exports=function(e){return p.hash(e,f,32,!0)}}).call(this,e(`lYpoI2`),typeof self<`u`?self:typeof window<`u`?window:{},e(`buffer`).Buffer,arguments[3],arguments[4],arguments[5],arguments[6],`/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js`,`/node_modules/gulp-browserify/node_modules/crypto-browserify`)},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(e,t,n){(function(e,t,r,i,a,o,s,c,l){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,c=(1<>1,u=-7,d=n?i-1:0,f=n?-1:1,i=e[t+d];for(d+=f,a=i&(1<<-u)-1,i>>=-u,u+=s;0>=-u,u+=r;0>1,d=i===23?2**-24-2**-77:0,f=r?0:a-1,p=r?1:-1,a=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(r=2**-o)<1&&(o--,r*=2),2<=(t+=1<=o+u?d/r:d*2**(1-u))*r&&(o++,r/=2),l<=o+u?(s=0,o=l):1<=o+u?(s=(t*r-1)*2**i,o+=u):(s=t*2**(u-1)*2**i,o=0));8<=i;e[n+f]=255&s,f+=p,s/=256,i-=8);for(o=o<>= ++ -- << >> <= >= == != && || += -= *= /= %= &= ^^ ^= |= ( ) [ ] . ! ~ * / % + - < > & ^ | ? : = , ; { }`.split(` `)),XW}var $W,eG;function tG(){return eG||(eG=1,$W=`abs.acos.all.any.asin.atan.ceil.clamp.cos.cross.dFdx.dFdy.degrees.distance.dot.equal.exp.exp2.faceforward.floor.fract.gl_BackColor.gl_BackLightModelProduct.gl_BackLightProduct.gl_BackMaterial.gl_BackSecondaryColor.gl_ClipPlane.gl_ClipVertex.gl_Color.gl_DepthRange.gl_DepthRangeParameters.gl_EyePlaneQ.gl_EyePlaneR.gl_EyePlaneS.gl_EyePlaneT.gl_Fog.gl_FogCoord.gl_FogFragCoord.gl_FogParameters.gl_FragColor.gl_FragCoord.gl_FragData.gl_FragDepth.gl_FragDepthEXT.gl_FrontColor.gl_FrontFacing.gl_FrontLightModelProduct.gl_FrontLightProduct.gl_FrontMaterial.gl_FrontSecondaryColor.gl_LightModel.gl_LightModelParameters.gl_LightModelProducts.gl_LightProducts.gl_LightSource.gl_LightSourceParameters.gl_MaterialParameters.gl_MaxClipPlanes.gl_MaxCombinedTextureImageUnits.gl_MaxDrawBuffers.gl_MaxFragmentUniformComponents.gl_MaxLights.gl_MaxTextureCoords.gl_MaxTextureImageUnits.gl_MaxTextureUnits.gl_MaxVaryingFloats.gl_MaxVertexAttribs.gl_MaxVertexTextureImageUnits.gl_MaxVertexUniformComponents.gl_ModelViewMatrix.gl_ModelViewMatrixInverse.gl_ModelViewMatrixInverseTranspose.gl_ModelViewMatrixTranspose.gl_ModelViewProjectionMatrix.gl_ModelViewProjectionMatrixInverse.gl_ModelViewProjectionMatrixInverseTranspose.gl_ModelViewProjectionMatrixTranspose.gl_MultiTexCoord0.gl_MultiTexCoord1.gl_MultiTexCoord2.gl_MultiTexCoord3.gl_MultiTexCoord4.gl_MultiTexCoord5.gl_MultiTexCoord6.gl_MultiTexCoord7.gl_Normal.gl_NormalMatrix.gl_NormalScale.gl_ObjectPlaneQ.gl_ObjectPlaneR.gl_ObjectPlaneS.gl_ObjectPlaneT.gl_Point.gl_PointCoord.gl_PointParameters.gl_PointSize.gl_Position.gl_ProjectionMatrix.gl_ProjectionMatrixInverse.gl_ProjectionMatrixInverseTranspose.gl_ProjectionMatrixTranspose.gl_SecondaryColor.gl_TexCoord.gl_TextureEnvColor.gl_TextureMatrix.gl_TextureMatrixInverse.gl_TextureMatrixInverseTranspose.gl_TextureMatrixTranspose.gl_Vertex.greaterThan.greaterThanEqual.inversesqrt.length.lessThan.lessThanEqual.log.log2.matrixCompMult.max.min.mix.mod.normalize.not.notEqual.pow.radians.reflect.refract.sign.sin.smoothstep.sqrt.step.tan.texture2D.texture2DLod.texture2DProj.texture2DProjLod.textureCube.textureCubeLod.texture2DLodEXT.texture2DProjLodEXT.textureCubeLodEXT.texture2DGradEXT.texture2DProjGradEXT.textureCubeGradEXT`.split(`.`)),$W}var nG,rG;function iG(){if(rG)return nG;rG=1;var e=YW();return nG=e.slice().concat(`layout.centroid.smooth.case.mat2x2.mat2x3.mat2x4.mat3x2.mat3x3.mat3x4.mat4x2.mat4x3.mat4x4.uvec2.uvec3.uvec4.samplerCubeShadow.sampler2DArray.sampler2DArrayShadow.isampler2D.isampler3D.isamplerCube.isampler2DArray.usampler2D.usampler3D.usamplerCube.usampler2DArray.coherent.restrict.readonly.writeonly.resource.atomic_uint.noperspective.patch.sample.subroutine.common.partition.active.filter.image1D.image2D.image3D.imageCube.iimage1D.iimage2D.iimage3D.iimageCube.uimage1D.uimage2D.uimage3D.uimageCube.image1DArray.image2DArray.iimage1DArray.iimage2DArray.uimage1DArray.uimage2DArray.image1DShadow.image2DShadow.image1DArrayShadow.image2DArrayShadow.imageBuffer.iimageBuffer.uimageBuffer.sampler1DArray.sampler1DArrayShadow.isampler1D.isampler1DArray.usampler1D.usampler1DArray.isampler2DRect.usampler2DRect.samplerBuffer.isamplerBuffer.usamplerBuffer.sampler2DMS.isampler2DMS.usampler2DMS.sampler2DMSArray.isampler2DMSArray.usampler2DMSArray`.split(`.`)),nG}var aG,oG;function sG(){if(oG)return aG;oG=1;var e=tG();return e=e.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)}),aG=e.concat(`gl_VertexID.gl_InstanceID.gl_Position.gl_PointSize.gl_FragCoord.gl_FrontFacing.gl_FragDepth.gl_PointCoord.gl_MaxVertexAttribs.gl_MaxVertexUniformVectors.gl_MaxVertexOutputVectors.gl_MaxFragmentInputVectors.gl_MaxVertexTextureImageUnits.gl_MaxCombinedTextureImageUnits.gl_MaxTextureImageUnits.gl_MaxFragmentUniformVectors.gl_MaxDrawBuffers.gl_MinProgramTexelOffset.gl_MaxProgramTexelOffset.gl_DepthRangeParameters.gl_DepthRange.trunc.round.roundEven.isnan.isinf.floatBitsToInt.floatBitsToUint.intBitsToFloat.uintBitsToFloat.packSnorm2x16.unpackSnorm2x16.packUnorm2x16.unpackUnorm2x16.packHalf2x16.unpackHalf2x16.outerProduct.transpose.determinant.inverse.texture.textureSize.textureProj.textureLod.textureOffset.texelFetch.texelFetchOffset.textureProjOffset.textureLodOffset.textureProjLod.textureProjLodOffset.textureGrad.textureGradOffset.textureProjGrad.textureProjGradOffset`.split(`.`)),aG}var cG,lG;function uG(){if(lG)return cG;lG=1,cG=b;var e=YW(),t=QW(),n=tG(),r=iG(),i=sG(),a=999,o=9999,s=0,c=1,l=2,u=3,d=4,f=5,p=6,m=7,h=8,g=9,_=10,v=11,y=[`block-comment`,`line-comment`,`preprocessor`,`operator`,`integer`,`float`,`ident`,`builtin`,`keyword`,`whitespace`,`eof`,`integer`];function b(b){var x=0,S=0,C=a,w,T,E=[],D=[],O=1,k=0,A=0,j=!1,M=!1,N=``,ee;b||={};var P=n,F=e;b.version===`300 es`&&(P=i,F=r);for(var I={},L={},x=0;x0)continue;i=e.slice(0,1).join(``)}return R(i),A+=i.length,E=E.slice(i.length),E.length}while(!0)}function ce(){return/[^a-fA-F0-9]/.test(w)?(R(E.join(``)),C=a,x):(E.push(w),T=w,x+1)}function le(){return w===`.`||/[eE]/.test(w)?(E.push(w),C=f,T=w,x+1):w===`x`&&E.length===1&&E[0]===`0`?(C=v,E.push(w),T=w,x+1):/[^\d]/.test(w)?(R(E.join(``)),C=a,x):(E.push(w),T=w,x+1)}function ue(){return w===`f`&&(E.push(w),T=w,x+=1),/[eE]/.test(w)||(w===`-`||w===`+`)&&/[eE]/.test(T)?(E.push(w),T=w,x+1):/[^\d]/.test(w)?(R(E.join(``)),C=a,x):(E.push(w),T=w,x+1)}function de(){if(/[^\d\w_]/.test(w)){var e=E.join(``);return C=L[e]?h:I[e]?m:p,R(E.join(``)),C=a,x}return E.push(w),T=w,x+1}}return cG}var dG,fG;function pG(){if(fG)return dG;fG=1;var e=uG();dG=t;function t(t,n){var r=e(n),i=[];return i=i.concat(r(t)),i=i.concat(r(null)),i}return dG}var mG=pG();const hG=BW(mG);var gG,_G;function vG(){if(_G)return gG;_G=1,gG=e;function e(e){for(var t=[],n=0;n=0;i--){if(n(e[i]))return i;if(r&&r(e[i]))return-1}return-1}}function t(e){return function(t){return t.type===`operator`&&(!e||t.data===e)}}function n(e){return e.type!==`whitespace`}return xG}var wG=CG();const TG=BW(wG);function EG(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}function DG(e){var t=EG(e,`string`);return typeof t==`symbol`?t:String(t)}function OG(e,t,n){return t=DG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AG(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function MG(e,t){if(e==null)return{};var n=jG(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NG(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function PG(e,t){for(var n=0;n`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function VG(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return IG(e)}function HG(e){var t=BG();return function(){var n=zG(e),r;if(t){var i=zG(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return VG(this,r)}}var UG={position:`csm_Position`,positionRaw:`csm_PositionRaw`,pointSize:`csm_PointSize`,fragColor:`csm_FragColor`,diffuseColor:`csm_DiffuseColor`,normal:`csm_Normal`,roughness:`csm_Roughness`,metalness:`csm_Metalness`,emissive:`csm_Emissive`,ao:`csm_AO`,bump:`csm_Bump`,depthAlpha:`csm_DepthAlpha`},WG,GG,KG=(WG={},OG(WG,`${UG.normal}`,{"#include ":` + vec3 objectNormal = ${UG.normal}; + #ifdef USE_TANGENT + vec3 objectTangent = vec3( tangent.xyz ); + #endif + `}),OG(WG,`${UG.position}`,{"#include ":` + vec3 transformed = ${UG.position}; + `}),OG(WG,`${UG.positionRaw}`,{"#include ":` + vec4 csm_internal_positionUnprojected = ${UG.positionRaw}; + mat4x4 csm_internal_unprojectMatrix = projectionMatrix * modelViewMatrix; + #ifdef USE_INSTANCING + csm_internal_unprojectMatrix = csm_internal_unprojectMatrix * instanceMatrix; + #endif + csm_internal_positionUnprojected = inverse(csm_internal_unprojectMatrix) * csm_internal_positionUnprojected; + vec3 transformed = csm_internal_positionUnprojected.xyz; + `}),OG(WG,`${UG.pointSize}`,{"gl_PointSize = size;":` + gl_PointSize = ${UG.pointSize}; + `}),OG(WG,`${UG.diffuseColor}`,{"#include ":` + #include + diffuseColor = ${UG.diffuseColor}; + `}),OG(WG,`${UG.fragColor}`,{"#include ":` + #include + gl_FragColor = ${UG.fragColor}; + `}),OG(WG,`${UG.emissive}`,{"vec3 totalEmissiveRadiance = emissive;":` + vec3 totalEmissiveRadiance = ${UG.emissive}; + `}),OG(WG,`${UG.roughness}`,{"#include ":` + #include + roughnessFactor = ${UG.roughness}; + `}),OG(WG,`${UG.metalness}`,{"#include ":` + #include + metalnessFactor = ${UG.metalness}; + `}),OG(WG,`${UG.ao}`,{"#include ":` + #include + reflectedLight.indirectDiffuse *= 1. - ${UG.ao}; + `}),OG(WG,`${UG.bump}`,{"#include ":` + #include + + vec3 csm_internal_orthogonal = ${UG.bump} - (dot(${UG.bump}, normal) * normal); + vec3 csm_internal_projectedbump = mat3(csm_internal_vModelViewMatrix) * csm_internal_orthogonal; + normal = normalize(normal - csm_internal_projectedbump); + `}),OG(WG,`${UG.depthAlpha}`,{"gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );":` + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity * ${UG.depthAlpha} ); + `,"gl_FragColor = packDepthToRGBA( fragCoordZ );":` + gl_FragColor = packDepthToRGBA( fragCoordZ ); + gl_FragColor.a *= ${UG.depthAlpha}; + `}),WG),qG=(GG={},OG(GG,`${UG.position}`,{"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );":` + gl_Position = projectionMatrix * modelViewMatrix * vec4( ${UG.position}, 1.0 ); + `}),OG(GG,`${UG.positionRaw}`,{"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );":` + gl_Position = ${UG.position}; + `}),OG(GG,`${UG.diffuseColor}`,{"gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );":` + gl_FragColor = ${UG.diffuseColor}; + `}),OG(GG,`${UG.fragColor}`,{"gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );":` + gl_FragColor = ${UG.fragColor}; + `}),GG),JG=` + +#ifdef IS_VERTEX + // csm_Position & csm_PositionRaw + #ifdef IS_UNKNOWN + vec3 csm_Position = vec3(0.0); + vec4 csm_PositionRaw = vec4(0.0); + vec3 csm_Normal = vec3(0.0); + #else + vec3 csm_Position = position; + vec4 csm_PositionRaw = projectionMatrix * modelViewMatrix * vec4(position, 1.); + vec3 csm_Normal = normal; + #endif + + // csm_PointSize + #ifdef IS_POINTSMATERIAL + float csm_PointSize = size; + #endif +#else + // csm_DiffuseColor & csm_FragColor + #if defined IS_UNKNOWN || defined IS_SHADERMATERIAL || defined IS_MESHDEPTHMATERIAL || defined IS_MESHNORMALMATERIAL || defined IS_SHADOWMATERIAL + vec4 csm_DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0); + vec4 csm_FragColor = vec4(1.0, 0.0, 1.0, 1.0); + #else + #ifdef USE_MAP + vec4 _csm_sampledDiffuseColor = texture2D(map, vMapUv); + + #ifdef DECODE_VIDEO_TEXTURE + // inline sRGB decode (TODO: Remove this code when https://crbug.com/1256340 is solved) + _csm_sampledDiffuseColor = vec4(mix(pow(_csm_sampledDiffuseColor.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), _csm_sampledDiffuseColor.rgb * 0.0773993808, vec3(lessThanEqual(_csm_sampledDiffuseColor.rgb, vec3(0.04045)))), _csm_sampledDiffuseColor.w); + #endif + + vec4 csm_DiffuseColor = vec4(diffuse, opacity) * _csm_sampledDiffuseColor; + vec4 csm_FragColor = vec4(diffuse, opacity) * _csm_sampledDiffuseColor; + #else + vec4 csm_DiffuseColor = vec4(diffuse, opacity); + vec4 csm_FragColor = vec4(diffuse, opacity); + #endif + #endif + + // csm_Emissive, csm_Roughness, csm_Metalness + #if defined IS_MESHSTANDARDMATERIAL || defined IS_MESHPHYSICALMATERIAL + vec3 csm_Emissive = emissive; + float csm_Roughness = roughness; + float csm_Metalness = metalness; + #endif + + // csm_AO + #if defined IS_MESHSTANDARDMATERIAL || defined IS_MESHPHYSICALMATERIAL || defined IS_MESHBASICMATERIAL || defined IS_MESHLAMBERTMATERIAL || defined IS_MESHPHONGMATERIAL || defined IS_MESHTOONMATERIAL + float csm_AO = 0.0; + #endif + + // csm_Bump + #if defined IS_MESHLAMBERTMATERIAL || defined IS_MESHMATCAPMATERIAL || defined IS_MESHNORMALMATERIAL || defined IS_MESHPHONGMATERIAL || defined IS_MESHPHYSICALMATERIAL || defined IS_MESHSTANDARDMATERIAL || defined IS_MESHTOONMATERIAL || defined IS_SHADOWMATERIAL + vec3 csm_Bump = vec3(0.0); + #endif + + float csm_DepthAlpha = 1.0; +#endif +`,YG=` + varying mat4 csm_internal_vModelViewMatrix; +`,XG=` + csm_internal_vModelViewMatrix = modelViewMatrix; +`,ZG=` + varying mat4 csm_internal_vModelViewMatrix; +`,QG=` + +`,$G,eK=($G={},OG($G,`${UG.position}`,`*`),OG($G,`${UG.positionRaw}`,`*`),OG($G,`${UG.normal}`,`*`),OG($G,`${UG.pointSize}`,[`PointsMaterial`]),OG($G,`${UG.diffuseColor}`,`*`),OG($G,`${UG.fragColor}`,`*`),OG($G,`${UG.emissive}`,[`MeshStandardMaterial`,`MeshPhysicalMaterial`]),OG($G,`${UG.roughness}`,[`MeshStandardMaterial`,`MeshPhysicalMaterial`]),OG($G,`${UG.metalness}`,[`MeshStandardMaterial`,`MeshPhysicalMaterial`]),OG($G,`${UG.ao}`,[`MeshStandardMaterial`,`MeshPhysicalMaterial`,`MeshBasicMaterial`,`MeshLambertMaterial`,`MeshPhongMaterial`,`MeshToonMaterial`]),OG($G,`${UG.bump}`,[`MeshLambertMaterial`,`MeshMatcapMaterial`,`MeshNormalMaterial`,`MeshPhongMaterial`,`MeshPhysicalMaterial`,`MeshStandardMaterial`,`MeshToonMaterial`,`ShadowMaterial`]),OG($G,`${UG.depthAlpha}`,`*`),$G),tK=[`baseMaterial`,`fragmentShader`,`vertexShader`,`uniforms`,`patchMap`,`cacheKey`,`silent`],nK=function(e,t,n){return e.split(t).join(n)},rK=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)},iK=function(e,t){return RegExp(`\\b${rK(t)}\\b`).test(e)};function aK(e){try{new e}catch(e){if(e.message.indexOf(`is not a constructor`)>=0)return!1}return!0}function oK(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Object.assign(e,t);var r=Object.getPrototypeOf(t);Object.entries(Object.getOwnPropertyDescriptors(r)).filter(function(e){var t=typeof e[1].get==`function`,n=typeof e[1].set==`function`,r=typeof e[1].value==`function`,i=e[0]===`constructor`;return(t||n||r)&&!i}).forEach(function(t){if(typeof e[t[0]]==`function`){n||console.warn(`Function ${t[0]} already exists on CSM, renaming to base_${t[0]}`);var r=`base_${t[0]}`;e[r]=t[1].value.bind(e);return}Object.defineProperty(e,t[0],t[1])})}function sK(e){var t=e.toString().trim(),n=t.substring(t.indexOf(`{`)+1,t.lastIndexOf(`}`));return n.trim().length===0}function cK(e){return e.replace(/\s/g,``)}function lK(e,t,n){var r=e.lastIndexOf(t);return r===-1?e:e.substring(0,r)+n+e.substring(r+t.length)}var uK=function(e){RG(n,e);var t=HG(n);function n(e){var r,i=e.baseMaterial,a=e.fragmentShader,o=e.vertexShader,s=e.uniforms,c=e.patchMap,l=e.cacheKey,u=e.silent,d=MG(e,tK);NG(this,n);var f;if(aK(i)?f=new i(d):(f=i,Object.assign(f,d)),f.type===`RawShaderMaterial`)throw Error(`CustomShaderMaterial does not support RawShaderMaterial`);r=t.call(this),oK(IG(r),f,u),r.__csm={patchMap:c||{},fragmentShader:a||``,vertexShader:o||``,cacheKey:l,baseMaterial:i,instanceID:fe.generateUUID(),type:f.type,isAlreadyExtended:!sK(f.onBeforeCompile),cacheHash:``,silent:u},r.uniforms=AG(AG({},r.uniforms||{}),s||{});var p=r.__csm,m=p.fragmentShader,h=p.vertexShader,g=r.uniforms;return r.__csm.cacheHash=r.getCacheHash(),r.generateMaterial(m,h,g),r}return FG(n,[{key:`update`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.uniforms=e.uniforms||this.uniforms,Object.assign(this.__csm,e);var t=this.__csm,n=t.fragmentShader,r=t.vertexShader,i=this.uniforms,a=this.getCacheHash();this.__csm.cacheHash=a,this.generateMaterial(n,r,i)}},{key:`clone`,value:function(){var e={baseMaterial:this.__csm.baseMaterial,fragmentShader:this.__csm.fragmentShader,vertexShader:this.__csm.vertexShader,uniforms:this.uniforms,silent:this.__csm.silent,patchMap:this.__csm.patchMap,cacheKey:this.__csm.cacheKey},t=new this.constructor(e);return Object.assign(this,t),t}},{key:`getCacheHash`,value:function(){var e=this.__csm,t=e.fragmentShader,n=e.vertexShader,r=this.uniforms,i=Object.values(r).reduce(function(e,t){var n=t.value;return e+JSON.stringify(n)},``),a=cK(t)+cK(n)+i;return a.trim().length>0?KW(a):this.customProgramCacheKey()}},{key:`generateMaterial`,value:function(e,t,n){var r=this,i=this.parseShader(e),a=this.parseShader(t);this.uniforms=n||{},this.customProgramCacheKey=function(){return r.__csm.cacheHash};var o=function(e){try{if(i){var t=r.patchShader(i,e.fragmentShader,!0);e.fragmentShader=r.getMaterialDefine()+t}if(a){var n=r.patchShader(a,e.vertexShader);e.vertexShader=`#define IS_VERTEX; +`+n,e.vertexShader=r.getMaterialDefine()+e.vertexShader}e.uniforms=AG(AG({},e.uniforms),r.uniforms),r.uniforms=e.uniforms}catch(e){console.error(e)}};if(this.__csm.isAlreadyExtended){var s=this.onBeforeCompile;this.onBeforeCompile=function(e,t){s(e,t),o(e)}}else this.onBeforeCompile=o;this.needsUpdate=!0}},{key:`patchShader`,value:function(e,t,n){var r=this,i=t,a=AG(AG({},this.getPatchMapForMaterial()),this.__csm.patchMap);Object.keys(a).forEach(function(t){Object.keys(a[t]).forEach(function(n){var o=eK[t],s=r.__csm.type;if(t===`*`||iK(e.main,t))if(!o||Array.isArray(o)&&o.includes(s)||o===`*`)i=nK(i,n,a[t][n]);else throw Error(`CSM: ${t} is not available in ${s}. Shader cannot compile.`)})}),i=i.replace(`void main() {`,` + #ifndef CSM_IS_HEAD_DEFAULTS_DEFINED + ${n?ZG:YG} + #define CSM_IS_HEAD_DEFAULTS_DEFINED 1 + #endif + + ${e.header} + + void main() { + #ifndef CSM_IS_DEFAULTS_DEFINED + ${JG} + #define CSM_IS_DEFAULTS_DEFINED 1 + #endif + + #ifndef CSM_IS_MAIN_DEFAULTS_DEFINED + ${n?QG:XG} + #define CSM_IS_MAIN_DEFAULTS_DEFINED 1 + #endif + + // CSM_START + `);var o=this.__csm.isAlreadyExtended,s=i.includes(`// CSM_END`);return i=o&&s?lK(i,`// CSM_END`,` + // CSM_END + ${e.main} + // CSM_END + `):i.replace(`// CSM_START`,` + // CSM_START + ${e.main} + // CSM_END + `),i=e.defines+i,i}},{key:`parseShader`,value:function(e){if(e){var t=e.replace(/\/\*\*(.*?)\*\/|\/\/(.*?)\n/gm,``),n=hG(t),r=TG(n),i=r.map(function(e){return e.name}).indexOf(`main`),a=bG(n.slice(0,i>=0?r[i].outer[0]:void 0)),o=i>=0?this.getShaderFromIndex(n,r[i].body):``;return{defines:``,header:a,main:o}}}},{key:`getMaterialDefine`,value:function(){var e=this.__csm.type;return e?`#define IS_${e.toUpperCase()}; +`:`#define IS_UNKNOWN; +`}},{key:`getPatchMapForMaterial`,value:function(){switch(this.__csm.type){case`ShaderMaterial`:return qG;default:return KG}}},{key:`getShaderFromIndex`,value:function(e,t){return bG(e.slice(t[0],t[1]))}}]),n}(Ft),dK=class extends ue{constructor(e={}){super(e),fR(this,`_time`),fR(this,`_factor`),this.setValues(e),this._time={value:0},this._factor={value:1}}onBeforeCompile(e){e.uniforms||={},e.uniforms.time=this._time,e.uniforms.factor=this._factor,e.vertexShader=` + uniform float time; + uniform float factor; + ${e.vertexShader} + `,e.vertexShader=e.vertexShader.replace(`#include `,`float theta = sin( time + position.y ) / 2.0 * factor; + float c = cos( theta ); + float s = sin( theta ); + mat3 m = mat3( c, 0, s, 0, 1, 0, -s, 0, c ); + vec3 transformed = vec3( position ) * m; + vNormal = vNormal * m;`)}get time(){return this._time.value}set time(e){this._time.value=e}get factor(){return this._factor.value}set factor(e){this._factor.value=e}};const fK=[`factor`],pK=an({__name:`index`,props:{speed:{default:1},factor:{default:1}},setup(e,{expose:t}){let n=e,r=dn(),{extend:i,invalidate:a}=ke();i({MeshWobbleMaterial:dK}),W(n,()=>a());let{onBeforeRender:o}=F();return o(({elapsed:e,invalidate:t})=>{r.value&&(r.value.time=e*n?.speed,t())}),t({instance:r}),(e,t)=>(G(),cn(`TresMeshWobbleMaterial`,Pn({ref_key:`materialRef`,ref:r,factor:e.factor},e.$attrs),null,16,fK))}}),mK=an({name:`BakeShadows`,setup(){let{renderer:e}=ke();Tn(()=>{e.value.shadowMap.autoUpdate=!1,e.value.shadowMap.needsUpdate=!0})}});var hK=`void main() { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); +}`,gK=`#include + +void main() { + vec2 center = vec2(0., 1.); + float rotation = 0.0; + + + + float size = 0.03; + + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + + gl_Position = projectionMatrix * mvPosition; +}`;const _K=new V(0,0,0),vK=new V(0,0,0),yK=new V(0,0,0);function bK(e,t,n){let r=_K.setFromMatrixPosition(e.matrixWorld);r.project(t);let i=n.width/2,a=n.height/2;return[(Number.isNaN(r.x)?0:r.x)*i+i,-(r.y*a)+a,r.z]}function xK(e,t){let n=_K.setFromMatrixPosition(e.matrixWorld),r=vK.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),a=t.getWorldDirection(yK);return i.angleTo(a)>Math.PI/2}function SK(e,t,n,r){let i=_K.setFromMatrixPosition(e.matrixWorld),a=i.clone();a.project(t),n.setFromCamera(new ve(a.x,a.y),t);let o=n.intersectObjects(r,!0);if(o.length>0){let e=o[0].distance;return i.distanceTo(n.ray.origin)Math.abs(e)<1e-10?0:e;function EK(e,t,n=``){let r=`matrix3d(`;for(let n=0;n!==16;n++)r+=TK(t[n]*e.elements[n])+(n===15?`)`:`,`);return n+r}const DK=(e=>t=>EK(t,e))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),OK=(e=>(t,n)=>EK(t,e(n),`translate(-50%,-50%)`))(e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1]),kK=[`geometry`,`material`],AK=an({__name:`HTML`,props:{geometry:{default:new Et},material:{},as:{default:`div`},transform:{type:Boolean,default:!1},portal:{},wrapperClass:{},eps:{default:1e-4},distanceFactor:{},fullscreen:{type:Boolean},center:{type:Boolean},pointerEvents:{default:`auto`},sprite:{type:Boolean,default:!1},zIndexRange:{default:()=>[16777271,0]},occlude:{type:[Object,null,Array,Boolean,String]}},emits:[`onOcclude`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=Nn(),o=In(),s=H(),c=H(),{geometry:l,material:u,as:d,transform:f,portal:p,wrapperClass:m,eps:h,distanceFactor:g,fullscreen:_,center:v,pointerEvents:y,sprite:b,occlude:x,zIndexRange:S}=pn(r),{renderer:C,scene:w,camera:T,raycaster:E,sizes:D}=ke(),O=jn(()=>document.createElement(d.value)),k=H([0,0,0]),A=H(0),j=H(),M=jn(()=>f.value?{position:`absolute`,top:0,left:0,width:`${D.width.value}px`,height:`${D.height.value}px`,transformStyle:`preserve-3d`,pointerEvents:`none`,zIndex:2}:{position:`absolute`,transform:v.value?`translate3d(-50%,-50%,0)`:`none`,..._.value&&{top:-D.height.value/2,left:-D.width.value/2,width:`${D.width.value}px`,height:`${D.height.value}px`},zIndex:2,...Object.assign({},o.style)}),N=jn(()=>({position:`absolute`,pointerEvents:y.value})),ee=H(null),P=H(!1),I=jn(()=>x?.value&&x?.value!==`blending`||Array.isArray(x?.value)&&x?.value.length&&Vn(x.value[0]));W(()=>x,({value:e})=>{e===`blending`?(O.value.style.zIndex=`${Math.floor(S.value[0]/2)}`,O.value.style.position=`absolute`,O.value.style.pointerEvents=`none`):(O.value.style.zIndex=null,O.value.style.position=null,O.value.style.pointerEvents=null)}),W(()=>{var e;return[s.value,C.value,D.width.value,D.height.value,(e=a.default)?.call(a)]},([e,t])=>{var n,r,i,s,l,u;if(e&&t){let d=p?.value||t.domElement;if((n=w.value)==null||n.updateMatrixWorld(),f.value)O.value.style.cssText=`position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;`;else{let t=bK(e,T.value,{width:D.width.value,height:D.height.value});O.value.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${t[0]}px,${t[1]}px,0);transform-origin:0 0;`}d&&!O.value.parentNode&&((r=d.parentNode)==null||r.appendChild(O.value)),f.value?j.value=Fn(`div`,{id:`outer`,style:M.value},[Fn(`div`,{id:`inner`,style:N.value},[Fn(`div`,{key:(i=c.value)?.uuid,id:w?.value.uuid,class:o.class,style:o.style},(s=a.default)?.call(a))])]):j.value=Fn(`div`,{key:(l=c.value)?.uuid,id:w?.value.uuid,style:M.value},(u=a.default)?.call(a)),At(j.value,O.value)}}),Tn(()=>{m!=null&&m.value&&(O.value.className=m.value)});let L=H(!0),{onBeforeRender:R}=F();R(({invalidate:e})=>{var t,n,r,a,u,d,p;if(e(),s.value&&T.value&&C.value){(t=T.value)==null||t.updateMatrixWorld(),s.value.updateWorldMatrix(!0,!1);let e=f.value?k.value:bK(s.value,T.value,{width:D.width.value||0,height:D.height.value||0});if(f.value||Math.abs(A.value-T.value.zoom)>h.value||Math.abs(k.value[0]-e[0])>h.value||Math.abs(k.value[1]-e[1])>h.value||Math.abs(k.value[2]-e[2])>h.value){let t=xK(s.value,T.value),a=!1;I.value&&(Array.isArray(x?.value)?a=x?.value:x?.value!==`blending`&&(a=[w.value]));let o=L.value;if(a){let e=SK(s.value,T.value,E.value,a);L.value=e&&!t}else L.value=!t;o!==L.value&&(i(`onOcclude`,!L.value),O.value.style.display=L.value?`block`:`none`);let c=Math.floor(S.value[0]/2),l=x!=null&&x.value?I.value?[S.value[0],c]:[c-1,0]:S.value;if(O.value.style.zIndex=`${wK(s.value,T.value,l)}`,f.value){let[e,t]=[D.width.value/2,D.height.value/2],i=T.value.projectionMatrix.elements[5]*t,{isOrthographicCamera:a,top:o,left:c,bottom:l,right:u}=T.value,d=DK(T.value.matrixWorldInverse),f=a?`scale(${i})translate(${TK(-(u+c)/2)}px,${TK((o+l)/2)}px)`:`translateZ(${i}px)`,p=s.value.matrixWorld;if(b.value&&(p=T.value.matrixWorldInverse.clone().transpose().copyPosition(p).scale(s.value.scale),p.elements[3]=p.elements[7]=p.elements[11]=0,p.elements[15]=1),O.value.style.width=`${D.width.value}px`,O.value.style.height=`${D.height.value}px`,O.value.style.perspective=a?``:`${i}px`,(n=j.value)!=null&&n.el&&(r=j.value)!=null&&r.children&&Array.isArray(j.value.children)){j.value.el.style.transform=`${f}${d}translate(${e}px,${t}px)`;let n=j.value.children[0];n&&n.el&&(n.el.style.transform=OK(p,1/((g?.value||10)/400)))}}else{let t=g?.value===void 0?1:CK(s.value,T.value)*g?.value;O.value.style.transform=`translate3d(${e[0]}px,${e[1]}px,0) scale(${t})`}}k.value=e,A.value=T.value.zoom}if(!I.value&&c.value&&!P.value)if(f.value){if((a=j.value)!=null&&a.el&&(u=j.value)!=null&&u.children){let e=((d=j.value)?.children)[0];if(e!=null&&e.clientWidth&&e!=null&&e.clientHeight){let{isOrthographicCamera:t}=T.value;if(t||l)o.scale&&(Array.isArray(o.scale)?o.scale instanceof V?c.value.scale.copy(o.scale.clone().divideScalar(1)):c.value.scale.set(1/o.scale[0],1/o.scale[1],1/o.scale[2]):c.value.scale.setScalar(1/o.scale));else{let t=(g?.value||10)/400,n=e.clientWidth*t,r=e.clientHeight*t;c.value.scale.set(n,r,1)}P.value=!0}}}else{let e=O.value.children[0];if(e!=null&&e.clientWidth&&e!=null&&e.clientHeight){let t=e.clientWidth*1,n=e.clientHeight*1;c.value.scale.set(t,n,1),P.value=!0}ee.value.lookAt((p=T.value)?.position)}});let z=jn(()=>({vertexShader:f.value?void 0:gK,fragmentShader:hK})),te=jn(()=>{let e=z.value;return u.value||new Xe({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,side:Rt})});return un(()=>{te.value&&te.value.dispose(),O.value.remove()}),t({instance:s}),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`groupRef`,ref:s},[K(x)&&!I.value?(G(),cn(`TresMesh`,{key:0,ref_key:`meshRef`,ref:c,geometry:K(l),material:te.value},null,8,kK)):on(``,!0)],512))}});var jK={exports:{}},MK=jK.exports,NK;function PK(){return NK||(NK=1,function(e,t){(function(t,n){e.exports=n()})(MK,function(){var e=function(){function t(e){return i.appendChild(e.dom),e}function n(e){for(var t=0;to+1e3&&(c.update(1e3*s/(e-o),100),o=e,s=0,u)){var t=performance.memory;u.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){a=this.end()},domElement:i,setMode:n}};return e.Panel=function(e,t,n){var r=1/0,i=0,a=Math.round,o=a(window.devicePixelRatio||1),s=80*o,c=48*o,l=3*o,u=2*o,d=3*o,f=15*o,p=74*o,m=30*o,h=document.createElement(`canvas`);h.width=s,h.height=c,h.style.cssText=`width:80px;height:48px`;var g=h.getContext(`2d`);return g.font=`bold `+9*o+`px Helvetica,Arial,sans-serif`,g.textBaseline=`top`,g.fillStyle=n,g.fillRect(0,0,s,c),g.fillStyle=t,g.fillText(e,l,u),g.fillRect(d,f,p,m),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(d,f,p,m),{dom:h,update:function(c,_){r=Math.min(r,c),i=Math.max(i,c),g.fillStyle=n,g.globalAlpha=1,g.fillRect(0,0,s,f),g.fillStyle=t,g.fillText(a(c)+` `+e+` (`+a(r)+`-`+a(i)+`)`,l,u),g.drawImage(h,d+o,f,p-o,m,d,f,p-o,m),g.fillRect(d+p-o,f,o,m),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(d+p-o,f,o,a((1-c/_)*m))}}},e})}(jK)),jK.exports}var FK=PK();const IK=BW(FK),LK=an({name:`Stats`,props:{showPanel:{type:Number,default:0}},setup(e,{expose:t}){let n=new IK;t({instance:n});let r=document.body;n.showPanel(e.showPanel||0),r?.appendChild(n.dom);let{onBeforeRender:i,onAfterRender:a}=F();i(()=>n.begin(),-1/0),a(()=>n.end(),1/0),un(()=>{r?.removeChild(n.dom)})}});var RK=class{constructor(e,t,n){this.name=e,this.fg=t,this.bg=n,this.gradient=null,this.PR=Math.round(window.devicePixelRatio||1),this.WIDTH=90*this.PR,this.HEIGHT=48*this.PR,this.TEXT_X=3*this.PR,this.TEXT_Y=2*this.PR,this.GRAPH_X=3*this.PR,this.GRAPH_Y=15*this.PR,this.GRAPH_WIDTH=84*this.PR,this.GRAPH_HEIGHT=30*this.PR,this.canvas=document.createElement(`canvas`),this.canvas.width=this.WIDTH,this.canvas.height=this.HEIGHT,this.canvas.style.width=`90px`,this.canvas.style.height=`48px`,this.canvas.style.position=`absolute`,this.canvas.style.cssText=`width:90px;height:48px`,this.context=this.canvas.getContext(`2d`),this.initializeCanvas()}createGradient(){if(!this.context)throw Error(`No context`);let e=this.context.createLinearGradient(0,this.GRAPH_Y,0,this.GRAPH_Y+this.GRAPH_HEIGHT),t,n=this.fg;switch(this.fg.toLowerCase()){case`#0ff`:t=`#006666`;break;case`#0f0`:t=`#006600`;break;case`#ff0`:t=`#666600`;break;case`#e1e1e1`:t=`#666666`;break;default:t=this.bg;break}return e.addColorStop(0,t),e.addColorStop(1,n),e}initializeCanvas(){this.context&&(this.context.font=`bold `+9*this.PR+`px Helvetica,Arial,sans-serif`,this.context.textBaseline=`top`,this.gradient=this.createGradient(),this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.fg,this.context.fillText(this.name,this.TEXT_X,this.TEXT_Y),this.context.fillStyle=this.fg,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT))}update(e,t,n,r,i=0){if(!this.context||!this.gradient)return;let a=Math.min(1/0,e),o=Math.max(n,e);r=Math.max(r,t),this.context.globalAlpha=1,this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.GRAPH_Y),this.context.fillStyle=this.fg,this.context.fillText(`${e.toFixed(i)} ${this.name} (${a.toFixed(i)}-${parseFloat(o.toFixed(i))})`,this.TEXT_X,this.TEXT_Y),this.context.drawImage(this.canvas,this.GRAPH_X+this.PR,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT,this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT);let s=this.GRAPH_HEIGHT-(1-t/r)*this.GRAPH_HEIGHT;s>0&&(this.context.globalAlpha=1,this.context.fillStyle=this.gradient,this.context.fillRect(this.GRAPH_X+this.GRAPH_WIDTH-this.PR,this.GRAPH_Y+this.GRAPH_HEIGHT-s,this.PR,s))}};const zK=class e{constructor({trackGPU:t=!1,logsPerSecond:n=30,samplesLog:r=60,samplesGraph:i=10,precision:a=2,minimal:o=!1,horizontal:s=!0,mode:c=0}={}){this.gl=null,this.ext=null,this.activeQuery=null,this.gpuQueries=[],this.threeRendererPatched=!1,this.frames=0,this.renderCount=0,this.isRunningCPUProfiling=!1,this.totalCpuDuration=0,this.totalGpuDuration=0,this.totalGpuDurationCompute=0,this.totalFps=0,this.gpuPanel=null,this.gpuPanelCompute=null,this.averageFps={logs:[],graph:[]},this.averageCpu={logs:[],graph:[]},this.averageGpu={logs:[],graph:[]},this.averageGpuCompute={logs:[],graph:[]},this.handleClick=e=>{e.preventDefault(),this.showPanel(++this.mode%this.dom.children.length)},this.handleResize=()=>{this.resizePanel(this.fpsPanel,0),this.resizePanel(this.msPanel,1),this.gpuPanel&&this.resizePanel(this.gpuPanel,2),this.gpuPanelCompute&&this.resizePanel(this.gpuPanelCompute,3)},this.mode=c,this.horizontal=s,this.minimal=o,this.trackGPU=t,this.samplesLog=r,this.samplesGraph=i,this.precision=a,this.logsPerSecond=n,this.dom=document.createElement(`div`),this.initializeDOM(),this.beginTime=performance.now(),this.prevTime=this.beginTime,this.prevCpuTime=this.beginTime,this.fpsPanel=this.addPanel(new e.Panel(`FPS`,`#0ff`,`#002`),0),this.msPanel=this.addPanel(new e.Panel(`CPU`,`#0f0`,`#020`),1),this.setupEventListeners()}initializeDOM(){this.dom.style.cssText=` + position: fixed; + top: 0; + left: 0; + opacity: 0.9; + z-index: 10000; + ${this.minimal?`cursor: pointer;`:``} + `}setupEventListeners(){this.minimal?(this.dom.addEventListener(`click`,this.handleClick),this.showPanel(this.mode)):window.addEventListener(`resize`,this.handleResize)}async init(e){if(!e){console.error(`Stats: The "canvas" parameter is undefined.`);return}this.handleThreeRenderer(e)||await this.handleWebGPURenderer(e)||this.initializeWebGL(e)}handleThreeRenderer(e){return e.isWebGLRenderer&&!this.threeRendererPatched?(this.patchThreeRenderer(e),this.gl=e.getContext(),this.trackGPU&&this.initializeGPUTracking(),!0):!1}async handleWebGPURenderer(e){return e.isWebGPURenderer?(this.trackGPU&&(e.backend.trackTimestamp=!0,await e.hasFeatureAsync(`timestamp-query`)&&this.initializeWebGPUPanels()),this.info=e.info,!0):!1}initializeWebGPUPanels(){this.gpuPanel=this.addPanel(new e.Panel(`GPU`,`#ff0`,`#220`),2),this.gpuPanelCompute=this.addPanel(new e.Panel(`CPT`,`#e1e1e1`,`#212121`),3)}initializeWebGL(e){if(e instanceof WebGL2RenderingContext)this.gl=e;else if(e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas){if(this.gl=e.getContext(`webgl2`),!this.gl)return console.error(`Stats: Unable to obtain WebGL2 context.`),!1}else return console.error(`Stats: Invalid input type. Expected WebGL2RenderingContext, HTMLCanvasElement, or OffscreenCanvas.`),!1;return!0}initializeGPUTracking(){this.gl&&(this.ext=this.gl.getExtension(`EXT_disjoint_timer_query_webgl2`),this.ext&&(this.gpuPanel=this.addPanel(new e.Panel(`GPU`,`#ff0`,`#220`),2)))}begin(){this.isRunningCPUProfiling||this.beginProfiling(`cpu-started`),!(!this.gl||!this.ext)&&(this.activeQuery&&this.gl.endQuery(this.ext.TIME_ELAPSED_EXT),this.activeQuery=this.gl.createQuery(),this.activeQuery&&this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT,this.activeQuery))}end(){this.renderCount++,this.gl&&this.ext&&this.activeQuery&&(this.gl.endQuery(this.ext.TIME_ELAPSED_EXT),this.gpuQueries.push({query:this.activeQuery}),this.activeQuery=null)}update(){this.info?this.processWebGPUTimestamps():this.processGpuQueries(),this.endProfiling(`cpu-started`,`cpu-finished`,`cpu-duration`),this.updateAverages(),this.resetCounters()}processWebGPUTimestamps(){this.totalGpuDuration=this.info.render.timestamp,this.totalGpuDurationCompute=this.info.compute.timestamp,this.addToAverage(this.totalGpuDurationCompute,this.averageGpuCompute)}updateAverages(){this.addToAverage(this.totalCpuDuration,this.averageCpu),this.addToAverage(this.totalGpuDuration,this.averageGpu)}resetCounters(){this.renderCount=0,this.totalCpuDuration===0&&this.beginProfiling(`cpu-started`),this.totalCpuDuration=0,this.totalFps=0,this.beginTime=this.endInternal()}resizePanel(e,t){e.canvas.style.position=`absolute`,this.minimal?e.canvas.style.display=`none`:(e.canvas.style.display=`block`,this.horizontal?(e.canvas.style.top=`0px`,e.canvas.style.left=t*e.WIDTH/e.PR+`px`):(e.canvas.style.left=`0px`,e.canvas.style.top=t*e.HEIGHT/e.PR+`px`))}addPanel(e,t){return e.canvas&&(this.dom.appendChild(e.canvas),this.resizePanel(e,t)),e}showPanel(e){for(let t=0;t{if(this.gl){let n=this.gl.getQueryParameter(e.query,this.gl.QUERY_RESULT_AVAILABLE),r=this.gl.getParameter(this.ext.GPU_DISJOINT_EXT);if(n&&!r){let n=this.gl.getQueryParameter(e.query,this.gl.QUERY_RESULT)*1e-6;this.totalGpuDuration+=n,this.gl.deleteQuery(e.query),this.gpuQueries.splice(t,1)}}}))}endInternal(){this.frames++;let e=(performance||Date).now(),t=e-this.prevTime;if(e>=this.prevCpuTime+1e3/this.logsPerSecond){let n=Math.round(this.frames*1e3/t);this.addToAverage(n,this.averageFps),this.updatePanel(this.fpsPanel,this.averageFps,0),this.updatePanel(this.msPanel,this.averageCpu,this.precision),this.updatePanel(this.gpuPanel,this.averageGpu,this.precision),this.gpuPanelCompute&&this.updatePanel(this.gpuPanelCompute,this.averageGpuCompute),this.frames=0,this.prevCpuTime=e,this.prevTime=e}return e}addToAverage(e,t){t.logs.push(e),t.logs.length>this.samplesLog&&t.logs.shift(),t.graph.push(e),t.graph.length>this.samplesGraph&&t.graph.shift()}beginProfiling(e){window.performance&&(window.performance.mark(e),this.isRunningCPUProfiling=!0)}endProfiling(e,t,n){if(window.performance&&t&&this.isRunningCPUProfiling){window.performance.mark(t);let r=performance.measure(n,e,t);this.totalCpuDuration+=r.duration,this.isRunningCPUProfiling=!1}}updatePanel(e,t,n=2){if(t.logs.length>0){let r=0,i=.01;for(let e=0;ei&&(i=t.logs[e]);let a=0,o=.01;for(let e=0;eo&&(o=t.graph[e]);e&&e.update(r/Math.min(t.logs.length,this.samplesLog),a/Math.min(t.graph.length,this.samplesGraph),i,o,n)}}get domElement(){return this.dom}patchThreeRenderer(e){let t=e.render,n=this;e.render=function(e,r){n.begin(),t.call(this,e,r),n.end()},this.threeRendererPatched=!0}};zK.Panel=RK;let BK=zK;const VK=an({name:`StatsGl`,props:[`logsPerSecond`,`samplesLog`,`samplesGraph`,`precision`,`horizontal`,`minimal`,`mode`],setup(e,{expose:t}){let n=new BK({logsPerSecond:e.logsPerSecond,samplesLog:e.samplesLog,samplesGraph:e.samplesGraph,precision:e.precision,horizontal:e.horizontal,minimal:e.minimal,mode:e.mode});t({instance:n});let r=document.body,i=n.dom||n.container;r?.appendChild(i);let{renderer:a}=ke(),{onAfterRender:o}=F();n.init(a.value),o(()=>n.update(),1/0),un(()=>{r?.removeChild(i)})}}),{logError:HK}=R(),UK=[`args`],WK=[`color`],GK=an({__name:`Box`,props:{args:{default:()=>[1,1,1]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{invalidate:r}=ke(),{args:i,color:a}=pn(n);W(i,()=>r());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`boxRef`,ref:o},e.$attrs),[U(`TresBoxGeometry`,{args:K(i)},null,8,UK),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(a)},null,8,WK)])],16))}}),KK=[`object`],qK=an({__name:`Line2`,props:{points:{},vertexColors:{default:null},color:{default:`white`},lineWidth:{default:1},worldUnits:{type:Boolean,default:!1},alphaToCoverage:{type:Boolean,default:!1},dashed:{type:Boolean,default:!1},dashSize:{default:1},gapSize:{default:1},dashScale:{default:1},dashOffset:{default:0}},setup(e,{expose:t}){let n=e;function r(e,t){if(!e||e.length===0)return Array.from({length:t}).fill(L(n.color));if(e.length===1)return Array.from({length:t}).fill(L(e[0]));if(e.length===t)return e.map(L);let r=t-1,i=e.map(L);closed&&i.push(i[0].clone());let a=[i[0]],o=r/(i.length-1);for(let e=1;eArray.isArray(n.vertexColors));function u(e,t){e.color=L(t.color),e.linewidth=t.lineWidth,e.alphaToCoverage=t.alphaToCoverage,e.worldUnits=t.worldUnits,e.vertexColors=Array.isArray(t.vertexColors),e.dashed=t.dashed,e.dashScale=t.dashScale,e.dashSize=t.dashSize,e.dashOffset=t.dashOffset,e.gapSize=t.gapSize,e.needsUpdate=!0}function d(e,t,n){let i=t.map(e=>e instanceof V?[e.x,e.y,e.z]:e instanceof ve?[e.x,e.y,0]:Array.isArray(e)&&e.length===2?[e[0],e[1],0]:e).flat();e.setPositions(i.flat());let a=r(n,t.length).map(e=>e.toArray()).flat();e.setColors(a),o.computeLineDistances()}u(i,n),d(a,n.points,n.vertexColors),o.computeLineDistances(),W(()=>[n.color,n.lineWidth,n.alphaToCoverage,n.worldUnits,l,n.dashed,n.dashScale,n.dashSize,n.dashOffset],()=>{u(i,n),c()}),W(()=>[n.points,n.vertexColors],()=>{d(a,n.points,n.vertexColors),c()}),W(()=>[s.height,s.width],()=>{i.resolution=new ve(s.width.value,s.height.value),c()}),un(()=>{a.dispose(),i.dispose()});let f=dn();return t({instance:f}),(e,t)=>(G(),cn(`primitive`,{ref:f.value,object:K(o)},null,8,KK))}}),JK=an({__name:`CatmullRomCurve3`,props:{segments:{default:20},closed:{type:Boolean,default:!1},curveType:{default:`centripetal`},tension:{default:.5},points:{},vertexColors:{},color:{},lineWidth:{},alphaToCoverage:{type:Boolean},dashed:{type:Boolean},dashSize:{},dashScale:{},dashOffset:{},gapSize:{},worldUnits:{type:Boolean}},setup(e,{expose:t}){let n=e;function r(e,t,n,r){let i=e.map(e=>e instanceof V?e:new V(...e));return new Qe(i,t,n,r)}function i(e,t){return e.getPoints(t)}let a=jn(()=>r(n.points,n.closed,n.curveType,n.tension)),o=jn(()=>i(a.value,n.segments)),s=dn();return t({instance:s}),(e,t)=>(G(),En(qK,{ref:s.value,points:o.value,"vertex-colors":n.vertexColors,color:n.color,"line-width":n.lineWidth,"alpha-to-coverage":n.alphaToCoverage,dashed:n.dashed,"dash-size":n.dashSize,"dash-scale":n.dashScale,"dash-offset":n.dashOffset,"gap-size":n.gapSize,"world-units":n.worldUnits},null,8,[`points`,`vertex-colors`,`color`,`line-width`,`alpha-to-coverage`,`dashed`,`dash-size`,`dash-scale`,`dash-offset`,`gap-size`,`world-units`]))}}),YK=[`args`],XK=[`color`],ZK=an({__name:`Circle`,props:{args:{default:()=>[1,32,0,Math.PI*2]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`circleRef`,ref:o},e.$attrs),[U(`TresCircleGeometry`,{args:K(r)},null,8,YK),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,XK)])],16))}}),QK=[`args`],$K=[`color`],eq=an({__name:`Cone`,props:{args:{default:()=>[1,1,12,12,!1,0,Math.PI*2]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`coneRef`,ref:o},e.$attrs),[U(`TresConeGeometry`,{args:K(r)},null,8,QK),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,$K)])],16))}}),tq=[`args`],nq=[`color`],rq=an({__name:`Cylinder`,props:{args:{default:()=>[1,1,1,32,1,!1,0,Math.PI*2]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`cylinderRef`,ref:o},e.$attrs),[U(`TresCylinderGeometry`,{args:K(r)},null,8,tq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,nq)])],16))}}),iq=[`args`],aq=[`color`],oq=an({__name:`Dodecahedron`,props:{args:{default:()=>[1,0]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),a=dn(),{invalidate:o}=ke();return W(r,()=>o()),t({instance:a}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`dodecahedronRef`,ref:a},e.$attrs),[U(`TresDodecahedronGeometry`,{args:K(r)},null,8,iq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,aq)])],16))}}),sq=[`args`],cq=[`color`],lq=an({__name:`Icosahedron`,props:{args:{default:()=>[1,0]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`icosahedronRef`,ref:o},e.$attrs),[U(`TresIcosahedronGeometry`,{args:K(r)},null,8,sq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,cq)])],16))}}),uq=[`args`],dq=[`color`],fq=an({__name:`Octahedron`,props:{args:{default:()=>[1,0]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`octahedronRef`,ref:o},e.$attrs),[U(`TresOctahedronGeometry`,{args:K(r)},null,8,uq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,dq)])],16))}}),pq=[`rotation`],mq=[`args`],hq=[`color`],gq=an({__name:`Plane`,props:{args:{default:()=>[1,1]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`planeRef`,ref:o,rotation:[-Math.PI/2,0,0]},e.$attrs),[U(`TresPlaneGeometry`,{args:K(r)},null,8,mq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,hq)])],16,pq))}}),_q=[`args`],vq=[`color`],yq=an({__name:`Ring`,props:{args:{default:()=>[.5,1,32]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`ringRef`,ref:o},e.$attrs),[U(`TresRingGeometry`,{args:K(r)},null,8,_q),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,vq)])],16))}}),bq=[`args`],xq=[`color`],Sq=an({__name:`RoundedBox`,props:{args:{default:()=>[1,1,1,2,.1]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a,extend:o}=ke();o({RoundedBoxGeometry:kV}),W(r,()=>a());let s=dn();return t({instance:s}),(e,t)=>(G(),cn(`TresMesh`,{ref_key:`roundedBoxRef`,ref:s},[U(`TresRoundedBoxGeometry`,{args:K(r)},null,8,bq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,xq)])],512))}}),Cq=[`args`],wq=[`color`],Tq=an({__name:`Sphere`,props:{args:{default:()=>[2,32,16]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`sphereRef`,ref:o},e.$attrs),[U(`TresSphereGeometry`,{args:K(r)},null,8,Cq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,wq)])],16))}}),Eq=[`geometry`],Dq=[`color`],Oq=an({__name:`Superformula`,props:{widthSegments:{default:32},heightSegments:{default:32},numArmsA:{default:4},expA:{default:()=>[40,1.3,.9]},numArmsB:{default:4},expB:{default:()=>[40,1.3,.9]},color:{default:`white`}},setup(e,{expose:t}){let n=e,{invalidate:r}=ke(),{cos:i,sin:a,abs:o}=Math,s=dn(),c=dn(n.color);function l(e,t){let n=new de,r=e*t,i=new Float32Array(Array.from({length:3*r}).fill(0)),a=new Float32Array(Array.from({length:3*r}).fill(0)),o=[];for(let n=0;nn.color,()=>c.value=n.color),W(()=>[n.widthSegments,n.heightSegments],()=>{s.value&&s.value.dispose(),s.value=l(n.widthSegments,n.heightSegments),r()},{immediate:!0}),W(()=>[n.numArmsA,n.expA[0],n.expA[1],n.expA[2],n.numArmsB,n.expB[0],n.expB[1],n.expB[2]],()=>{d(s.value,n.numArmsA,n.expA[0],n.expA[1],n.expA[2],n.numArmsB,n.expB[0],n.expB[1],n.expB[2],n.widthSegments,n.heightSegments),r()},{immediate:!0}),un(()=>{s.value&&s.value.dispose()});let f=dn();return t({instance:f}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`superformulaRef`,ref:f},e.$attrs,{geometry:s.value}),[Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:c.value},null,8,Dq)])],16,Eq))}}),kq=[`rotation`],Aq=[`args`],jq=[`color`],Mq=an({__name:`Tetrahedron`,props:{args:{default:()=>[1,0]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),a=dn();return t({instance:a}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`tetrahedronRef`,ref:a,rotation:[-Math.PI/2,0,0]},e.$attrs),[U(`TresTetrahedronGeometry`,{args:K(r)},null,8,Aq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,jq)])],16,kq))}}),Nq=[`args`],Pq=[`color`],Fq=an({__name:`Torus`,props:{args:{default:()=>[1,1,16,80]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`torusRef`,ref:o},e.$attrs),[U(`TresTorusGeometry`,{args:K(r)},null,8,Nq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,Pq)])],16))}}),Iq=[`args`],Lq=[`color`],Rq=an({__name:`TorusKnot`,props:{args:{default:()=>[1,.4,64,8]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`torusKnotRef`,ref:o},e.$attrs),[U(`TresTorusKnotGeometry`,{args:K(r)},null,8,Iq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,Lq)])],16))}}),zq=[`args`],Bq=[`color`],Vq=an({__name:`Tube`,props:{args:{default:()=>[new j(new V(-1,0,0),new V(0,1,0),new V(1,0,0)),20,.2,8,!1]},color:{default:`#ffffff`}},setup(e,{expose:t}){let n=e,{args:r,color:i}=pn(n),{invalidate:a}=ke();W(r,()=>a());let o=dn();return t({instance:o}),(e,t)=>(G(),cn(`TresMesh`,Pn({ref_key:`tubeRef`,ref:o},e.$attrs),[U(`TresTubeGeometry`,{args:K(r)},null,8,zq),Dn(e.$slots,`default`,{},()=>[U(`TresMeshBasicMaterial`,{color:K(i)},null,8,Bq)])],16))}}),Hq=an({__name:`Align`,props:{top:{type:Boolean},right:{type:Boolean},bottom:{type:Boolean},left:{type:Boolean},front:{type:Boolean},back:{type:Boolean},disable:{type:Boolean},disableX:{type:Boolean},disableY:{type:Boolean},disableZ:{type:Boolean},precise:{type:Boolean,default:!0},onAlign:{},cacheKey:{default:void 0}},setup(e,{expose:t}){let n=e,r=dn(),i=dn(),a=dn(),o=new Zt,s=new V,c=new ze;function l(){if(!i.value||!a.value||!r.value)return;i.value.matrixWorld.identity(),o.setFromObject(a.value,n.precise);let e=o.max.x-o.min.x,t=o.max.y-o.min.y,l=o.max.z-o.min.z;o.getCenter(s),o.getBoundingSphere(c);let u=n.top?t/2:n.bottom?-t/2:0,d=n.left?-e/2:n.right?e/2:0,f=n.front?l/2:n.back?-l/2:0;i.value.position.set(n.disable||n.disableX?0:-s.x+d,n.disable||n.disableY?0:-s.y+u,n.disable||n.disableZ?0:-s.z+f),typeof n.onAlign<`u`&&n.onAlign({parent:r.value.parent,container:r.value,width:e,height:t,depth:l,boundingBox:o,boundingSphere:c,center:s,verticalAlignment:u,horizontalAlignment:d,depthAlignment:f})}let u=null,d=null,f=F();return Tn(()=>{u?.(),u=null;let e=Bn(n.cacheKey);e===d&&d!=null||(d=e,n.cacheKey===null||n.cacheKey===void 0?u=f.onBeforeRender(()=>{l()}).off:l())}),t({instance:r,update:l}),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`ref`,ref:r},[U(`TresGroup`,{ref_key:`outer`,ref:i},[U(`TresGroup`,{ref_key:`inner`,ref:a},[Dn(e.$slots,`default`)],512)],512)],512))}}),Uq=[`receive-shadow`,`rotation`],Wq=[`args`],Gq=an({__name:`Backdrop`,props:{floor:{default:.25},segments:{default:20},receiveShadow:{type:Boolean,default:!1}},setup(e,{expose:t}){let n=e,r=e=>e===0?0:2**(10*e-10),{floor:i,segments:a,receiveShadow:o}=pn(n),s=H(null);W([a,i,s],([e,t,n])=>{if(!n||e===null)return;let i=0,a=e/e/2,o=n.attributes.position;for(let n=0;n(G(),cn(`TresGroup`,Pn({ref_key:`backdropRef`,ref:c},e.$attrs),[U(`TresMesh`,{"receive-shadow":K(o),rotation:[-Math.PI/2,0,Math.PI/2]},[U(`TresPlaneGeometry`,{ref_key:`planeRef`,ref:s,args:[1,1,K(a),K(a)]},null,8,Wq),Dn(e.$slots,`default`,{},()=>[t[0]||=U(`TresMeshStandardMaterial`,{color:8421504,side:2},null,-1)])],8,Uq)],16))}}),Kq=[`object`],qq=an({__name:`ContactShadows`,props:{opacity:{default:1},blur:{default:1},color:{default:`#000000`},tint:{default:void 0},scale:{default:10},width:{default:1},height:{default:1},far:{default:10},smooth:{type:Boolean,default:!0},resolution:{default:512},frames:{default:1/0},depthWrite:{type:Boolean,default:!1}},setup(e,{expose:t}){let n=e;function r(e,t,n){n.blurPlane.visible=!0,n.blurPlane.material=n.horizontalBlurMaterial,n.horizontalBlurMaterial.uniforms.tDiffuse.value=n.renderTarget.texture,n.horizontalBlurMaterial.uniforms.h.value=e/256,t.setRenderTarget(n.renderTargetBlur),t.render(n.blurPlane,n.shadowCamera),n.blurPlane.material=n.verticalBlurMaterial,n.verticalBlurMaterial.uniforms.tDiffuse.value=n.renderTargetBlur.texture,n.verticalBlurMaterial.uniforms.v.value=e/256,t.setRenderTarget(n.renderTarget),t.render(n.blurPlane,n.shadowCamera),n.blurPlane.visible=!1}function i(e,t,n,i){let{renderTarget:a,shadowCamera:o,depthMaterial:s}=i,c=t.background;t.background=null,t.overrideMaterial=s;let l=n.getClearAlpha();n.setClearAlpha(0),n.setRenderTarget(a),n.render(t,o),t.overrideMaterial=null,r(e.blur,n,i),e.smooth&&r(e.blur*.4,n,i),n.setRenderTarget(null),n.setClearAlpha(l),t.background=c}function a(e){let t=new yt,n=new Qt(e.resolution,e.resolution);n.texture.generateMipmaps=!1;let r=new Qt(e.resolution,e.resolution);r.texture.generateMipmaps=!1;let i=new Et(e.width,e.height).rotateX(Math.PI/2),a=new Te({map:n.texture,opacity:e.opacity,transparent:!0,depthWrite:e.depthWrite,color:new _t(e.color??`black`)}),o=new be(i,a);t.add(o),o.scale.y=-1;let s=new be(i);s.visible=!1,t.add(s);let c=new Ut(-e.width/2,e.width/2,e.height/2,-e.height/2,0,.3);c.rotation.x=Math.PI/2,t.add(c);let l=new le,u=new Xe(jV);u.depthTest=!1;let d=new Xe(MV);return d.depthTest=!1,{renderTarget:n,renderTargetBlur:r,shadowCamera:c,depthMaterial:l,horizontalBlurMaterial:u,verticalBlurMaterial:d,shadowGroup:t,plane:o,blurPlane:s}}function o(e,t){let n=t.shadowCamera;n.left=-e.width/2,n.right=e.width/2,n.top=e.height/2,n.bottom=-e.height/2,n.far=e.far;let r=e.width*(Array.isArray(e.scale)?e.scale[0]:e.scale||1),i=e.height*(Array.isArray(e.scale)?e.scale[1]:e.scale||1);t.shadowGroup.scale.set(r,e.far,i)}function s(e,t){t.renderTarget.dispose(),t.renderTargetBlur.dispose(),t.renderTarget=new Qt(e,e),t.renderTarget.texture.generateMipmaps=!1,t.renderTargetBlur=new Qt(e,e),t.renderTargetBlur.texture.generateMipmaps=!1,t.plane.material.map=t.renderTarget.texture}function c(e,t){t.plane.material.color=new _t(e.color??`black`),t.depthMaterial.dispose(),t.depthMaterial=new le,t.depthMaterial.onBeforeCompile=function(t){let n=e.tint?new _t(e.tint):new _t(`white`),{r,g:i,b:a}=n,o=t.fragmentShader.replace(`gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );`,`gl_FragColor = vec4( ${r}, ${i}, ${a}, ( 1.0 - fragCoordZ ) * opacity);`);t.fragmentShader=o}}let{onBeforeRender:l}=F(),u=a(n),d=0,f=()=>d=d>=n.frames?n.frames-1:d;return l(({renderer:e,scene:t,invalidate:r})=>{d[n.opacity,n.depthWrite,n.blur,n.smooth],()=>{u.plane.material.opacity=n.opacity??1,u.plane.material.depthWrite=n.depthWrite??!1,f()},{immediate:!0}),W(()=>[n.color,n.tint],()=>{c(n,u),f()},{immediate:!0}),W(()=>[n.resolution],()=>{s(n.resolution,u),f()}),W(()=>[n.width,n.height,n.scale,n.far],()=>{o(n,u),f()},{immediate:!0}),un(()=>{for(let e of Object.values(u))e&&`dispose`in e&&typeof e.dispose==`function`&&e.dispose()}),t({instance:u.shadowGroup}),(e,t)=>(G(),cn(`primitive`,{object:K(u).shadowGroup},null,8,Kq))}}),Jq=an({__name:`Fit`,props:{into:{default:()=>new Zt(new V(-.5,-.5,-.5),new V(.5,.5,.5))},precise:{type:Boolean,default:!1}},setup(e,{expose:t}){let n=e,{invalidate:r}=ke(),i=dn(new yt),a=dn(new yt);function o(e,t){if(i.value.position.set(0,0,0),i.value.updateMatrixWorld(),a.value.scale.set(1,1,1),a.value.updateMatrixWorld(),!a.value.children.length||e===null)return;let{box3:n,use:o}=s(e,t),c=new Zt;a.value.children.forEach(e=>c.expandByObject(e,t));let l=c.getSize(new V),u=n.getSize(new V),d=Math.min(u.x/l.x,u.y/l.y,u.z/l.z);a.value.scale.setScalar(d===1/0?1:d),a.value.updateMatrixWorld();let f=i.value.worldToLocal(c.getCenter(new V));if(o.position){let e=i.value.worldToLocal(n.getCenter(new V));i.value.position.copy(e.sub(f.multiplyScalar(d)))}else i.value.position.copy(f.sub(f.multiplyScalar(d)));r()}function s(e,t){return typeof e==`number`?e=new V(e,e,e):Array.isArray(e)&&(e=new V(...e)),e&&`isVector3`in e&&e.isVector3?{box3:new Zt(new V(0,0,0),e),use:{position:!1}}:e&&`isBox3`in e&&e.isBox3?{box3:e,use:{position:!0}}:e&&`isObject3D`in e&&e.isObject3D?{box3:new Zt().setFromObject(e,t??!1),use:{position:!0}}:{box3:new Zt(new V(-.5,-.5,-.5),new V(.5,.5,.5)),use:{position:!0}}}W(()=>[n.into,n.precise],()=>o(n.into,n.precise)),nn(()=>{o(n.into,n.precise),rn().then(()=>{o(n.into,n.precise)})});let c=dn();return t({instance:c,fit:(e=new Zt(new V(-.5,-.5,-.5),new V(.5,.5,.5)),t=!1)=>{o(e,t)},update:()=>o(n.into,n.precise)}),(e,t)=>(G(),cn(`TresGroup`,{ref_key:`outer`,ref:c},[U(`TresGroup`,{ref_key:`middle`,ref:i},[U(`TresGroup`,{ref_key:`inner`,ref:a},[Dn(e.$slots,`default`)],512)],512)],512))}}),Yq=[`side`,`cell-size`,`section-size`,`cell-color`,`section-color`,`cell-thickness`,`section-thickness`,`fade-distance`,`fade-strength`,`fade-from`,`infinite-grid`,`follow-camera`],Xq=[`args`],Zq=an({__name:`Grid`,props:{cellSize:{default:.5},cellThickness:{default:.5},cellColor:{default:`#000000`},sectionSize:{default:1},sectionThickness:{default:1},sectionColor:{default:`#0000ff`},followCamera:{type:Boolean,default:!1},infiniteGrid:{type:Boolean,default:!1},fadeDistance:{default:100},fadeStrength:{default:1},fadeFrom:{default:1},side:{default:jt},args:{}},setup(e){let t=e,n=YR({cellSize:.5,sectionSize:1,fadeDistance:100,fadeStrength:1,fadeFrom:1,cellThickness:.5,sectionThickness:1,cellColor:new _t,sectionColor:new _t,infiniteGrid:!1,followCamera:!1,worldCamProjPosition:new V,worldPlanePosition:new V},` + varying vec3 localPosition; + varying vec4 worldPosition; + + uniform vec3 worldCamProjPosition; + uniform vec3 worldPlanePosition; + uniform float fadeDistance; + uniform bool infiniteGrid; + uniform bool followCamera; + + void main() { + localPosition = position.xzy; + if (infiniteGrid) localPosition *= 1.0 + fadeDistance; + + worldPosition = modelMatrix * vec4(localPosition, 1.0); + if (followCamera) { + worldPosition.xyz += (worldCamProjPosition - worldPlanePosition); + localPosition = (inverse(modelMatrix) * worldPosition).xyz; + } + + gl_Position = projectionMatrix * viewMatrix * worldPosition; + } + `,` + varying vec3 localPosition; + varying vec4 worldPosition; + + uniform vec3 worldCamProjPosition; + uniform float cellSize; + uniform float sectionSize; + uniform vec3 cellColor; + uniform vec3 sectionColor; + uniform float fadeDistance; + uniform float fadeStrength; + uniform float fadeFrom; + uniform float cellThickness; + uniform float sectionThickness; + + float getGrid(float size, float thickness) { + vec2 r = localPosition.xz / size; + vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r); + float line = min(grid.x, grid.y) + 1.0 - thickness; + return 1.0 - min(line, 1.0); + } + + void main() { + float g1 = getGrid(cellSize, cellThickness); + float g2 = getGrid(sectionSize, sectionThickness); + + vec3 from = worldCamProjPosition*vec3(fadeFrom); + float dist = distance(from, worldPosition.xyz); + float d = 1.0 - min(dist / fadeDistance, 1.0); + vec3 color = mix(cellColor, sectionColor, min(1.0, sectionThickness * g2)); + + gl_FragColor = vec4(color, (g1 + g2) * pow(d, fadeStrength)); + gl_FragColor.a = mix(0.75 * gl_FragColor.a, gl_FragColor.a, g2); + if (gl_FragColor.a <= 0.0) discard; + + #include + #include + } + `);De({GridMaterial:n});let r=dn(new be),i=new Ge,a=new V(0,1,0),o=new V(0,0,0);return F().onBeforeRender(e=>{i.setFromNormalAndCoplanarPoint(a,o).applyMatrix4(r.value.matrixWorld);let t=r.value.material,n=t.uniforms.worldCamProjPosition,s=t.uniforms.worldPlanePosition;i.projectPoint(e.camera.position,n.value),s.value.set(0,0,0).applyMatrix4(r.value.matrixWorld)}),(e,n)=>(G(),cn(`TresMesh`,{ref_key:`ref`,ref:r,"frustum-culled":!1},[U(`TresGridMaterial`,{transparent:!0,"extensions-derivatives":!0,side:t.side,"cell-size":t.cellSize,"section-size":t.sectionSize,"cell-color":t.cellColor,"section-color":t.sectionColor,"cell-thickness":t.cellThickness,"section-thickness":t.sectionThickness,"fade-distance":t.fadeDistance,"fade-strength":t.fadeStrength,"fade-from":t.fadeFrom,"infinite-grid":t.infiniteGrid,"follow-camera":t.followCamera},null,8,Yq),U(`TresPlaneGeometry`,{args:t.args},null,8,Xq)],512))}}),Qq=[`rotation-x`,`args`],$q=an({__name:`Ocean`,props:{textureWidth:{default:512},textureHeight:{default:512},waterNormals:{default:`https://raw.githubusercontent.com/Tresjs/assets/main/textures/water-normals/Water_1_M_Normal.jpg`},sunDirection:{default:()=>new V},sunColor:{default:16777215},waterColor:{default:7695},distortionScale:{default:3.7},size:{default:1},clipBias:{default:0},alpha:{default:1},side:{default:nt}},async setup(e,{expose:t}){let n,r,i=e,{textureWidth:a,textureHeight:o,waterNormals:s,sunDirection:c,sunColor:l,waterColor:u,distortionScale:d,size:f,clipBias:p,alpha:m,side:h}=pn(i),{extend:g,scene:_}=ke();g({Water:IB});let v=dn(),y=dn(),b=_.value.fog!==void 0;t({instance:v}),_.value.traverse(e=>{Object.prototype.hasOwnProperty.call(e,`isSky`)&&(y.value=e)}),nn(async()=>{if(await rn(),y.value){let e=y.value.material.uniforms.sunPosition.value;v.value.material.uniforms.sunDirection.value.copy(e)}});let{normalMap:x}=([n,r]=kn(()=>I({normalMap:s.value})),n=await n,r(),n);x.wrapS=x.wrapT=Kt;let{onBeforeRender:S}=F();return S(({delta:e,invalidate:t})=>{v.value.material.uniforms.time.value+=e,t()}),(e,t)=>(G(),cn(`TresWater`,{ref_key:`waterRef`,ref:v,"rotation-x":-Math.PI/2,args:[void 0,{textureWidth:K(a),textureHeight:K(o),waterNormals:K(x),sunDirection:K(c),sunColor:K(l),waterColor:K(u),distortionScale:K(d),fog:b,size:K(f),clipBias:K(p),alpha:K(m),side:K(h)}]},[Dn(e.$slots,`default`,{},()=>[t[0]||=U(`TresPlaneGeometry`,{args:[1e4,1e4]},null,-1)])],8,Qq))}}),eJ=[`size`,`color`,`alpha-map`,`map`,`opacity`,`alpha-test`,`depth-write`,`transparent`,`size-attenuation`],tJ=[`position`,`velocity`],nJ=an({__name:`Precipitation`,props:{size:{default:.1},area:{default:()=>[10,10,20]},color:{default:16777215},map:{},alphaMap:{},alphaTest:{default:.01},opacity:{default:.8},count:{default:5e3},speed:{default:.1},randomness:{default:.5},depthWrite:{type:Boolean,default:!1},transparent:{type:Boolean,default:!0},sizeAttenuation:{type:Boolean,default:!0}},setup(e,{expose:t}){let n=e,{size:r,area:i,color:a,alphaMap:o,map:s,opacity:c,alphaTest:l,depthWrite:u,transparent:d,sizeAttenuation:f,count:p,speed:m,randomness:h}=pn(n),g=dn(),_=[],v=[],y=()=>{_=new Float32Array(p.value*3);for(let e=0;e{v=new Float32Array(p.value*2);for(let e=0;e{b(),y()});let x=dn(null),S=dn(null);Tn(async()=>{Tn(async()=>{if(typeof o.value==`string`){let e=await I({alphaMap:o.value});x.value=e.alphaMap}else x.value=o.value??null;if(typeof s.value==`string`){let e=await I({map:s.value});S.value=e.map}else S.value=s.value??null})});let{onBeforeRender:C}=F();C(({invalidate:e})=>{var t,n;if((t=g.value)!=null&&t.attributes.position.array&&(n=g.value)!=null&&n.attributes.position.count){let t=g.value.attributes.position.array;for(let e=0;e=i.value[0]/2)&&(t[e*3]=t[e*3]*-1),(t[e*3+1]<=-i.value[1]/2||t[e*3+1]>=i.value[1]/2)&&(t[e*3+1]=t[e*3+1]*-1)}g.value.attributes.position.needsUpdate=!0,e()}});let w=dn();return t({instance:w}),(e,t)=>(G(),cn(`TresPoints`,{ref_key:`pointsRef`,ref:w},[U(`TresPointsMaterial`,{size:K(r),color:K(a),"alpha-map":x.value,map:S.value,opacity:K(c),"alpha-test":K(l),"depth-write":K(u),transparent:K(d),"size-attenuation":K(f)},null,8,eJ),U(`TresBufferGeometry`,{ref_key:`geometryRef`,ref:g,position:[K(_),3],velocity:[K(v)]},null,8,tJ)],512))}}),rJ=[`object`,`material-uniforms-turbidity-value`,`material-uniforms-rayleigh-value`,`material-uniforms-mieCoefficient-value`,`material-uniforms-mieDirectionalG-value`,`material-uniforms-sunPosition-value`,`scale`],iJ=an({__name:`Sky`,props:{turbidity:{default:3.4},rayleigh:{default:3},mieCoefficient:{default:.005},mieDirectionalG:{default:.7},elevation:{default:.6},azimuth:{default:180},distance:{default:45e4}},setup(e,{expose:t}){let n=e,{invalidate:r}=ke();W(n,()=>r());let i=dn(),a=new HB,o=jn(()=>s(n.azimuth,n.elevation));function s(e,t){let n=fe.degToRad(90-t),r=fe.degToRad(e);return new V().setFromSphericalCoords(1,n,r)}return t({instance:i,sunPosition:o.value}),(e,t)=>(G(),cn(`primitive`,{ref_key:`skyRef`,ref:i,object:K(a),"material-uniforms-turbidity-value":n.turbidity,"material-uniforms-rayleigh-value":n.rayleigh,"material-uniforms-mieCoefficient-value":n.mieCoefficient,"material-uniforms-mieDirectionalG-value":n.mieDirectionalG,"material-uniforms-sunPosition-value":o.value,scale:n.distance},null,8,rJ))}}),aJ=[`position`],oJ=[`position`],sJ=[`scale`],cJ=[`map`,`depth-test`,`color-space`,`color`,`opacity`],lJ=an({__name:`Smoke`,props:{color:{default:`#ffffff`},opacity:{default:.5},speed:{default:.4},width:{default:10},depth:{default:1.5},segments:{default:20},texture:{default:`https://raw.githubusercontent.com/Tresjs/assets/main/textures/clouds/defaultCloud.png`},depthTest:{type:Boolean,default:!0}},async setup(e,{expose:t}){let n,r,i=e,{width:a,depth:o,segments:s,texture:c,color:l,depthTest:u,opacity:d,speed:f}=pn(i),p=dn(),m=dn();t({instance:p});let h=[s].map((e,t)=>({x:a.value/2-Math.random()*a.value,y:a.value/2-Math.random()*a.value,scale:.4+Math.sin((t+1)/s.value*Math.PI)*((.2+Math.random())*10),density:Math.max(.2,Math.random()),rotation:Math.max(.002,.005*Math.random())*f.value})),g=(e,t)=>e/6*t*d.value,{map:_}=([n,r]=kn(()=>I({map:c.value})),n=await n,r(),n),{renderer:v,camera:y}=ke(),b=jn(()=>{var e;return(e=v.value)?.outputColorSpace}),{onBeforeRender:x}=F();return x(({invalidate:e})=>{var t,n;p.value&&y.value&&m.value&&((t=m.value)==null||t.children.forEach((e,t)=>{e.rotation.z+=h[t].rotation}),p.value.lookAt((n=y.value)?.position),e())}),(e,t)=>(G(),cn(`TresGroup`,Pn({ref_key:`smokeRef`,ref:p},e.$attrs),[U(`TresGroup`,{ref_key:`groupRef`,ref:m,position:[0,0,K(s)/2*K(o)]},[(G(!0),cn(An,null,wn(K(h),({scale:e,x:t,y:n,density:r},i)=>(G(),cn(`TresMesh`,{key:`${i}`,position:[t,n,-i*K(o)]},[U(`TresPlaneGeometry`,{scale:[e,e,e],rotation:[0,0,0]},null,8,sJ),U(`TresMeshStandardMaterial`,{map:K(_),"depth-test":K(u),"color-space":b.value,color:K(l),"depth-write":!1,transparent:``,opacity:g(e,r)},null,8,cJ)],8,oJ))),128))],8,aJ)],16))}}),uJ=` +return PCSS( shadowMap, shadowCoord ); +`,dJ=an({__name:`SoftShadows`,props:{size:{default:25},samples:{default:10},focus:{default:0}},setup(e){let t=e,n=({focus:e=0,size:t=25,samples:n=10}={})=>` +#define PENUMBRA_FILTER_SIZE float(${t}) +#define RGB_NOISE_FUNCTION(uv) (randRGB(uv)) +vec3 randRGB(vec2 uv) { + return vec3( + fract(sin(dot(uv, vec2(12.75613, 38.12123))) * 13234.76575), + fract(sin(dot(uv, vec2(19.45531, 58.46547))) * 43678.23431), + fract(sin(dot(uv, vec2(23.67817, 78.23121))) * 93567.23423) + ); +} + +vec3 lowPassRandRGB(vec2 uv) { + // 3x3 convolution (average) + // can be implemented as separable with an extra buffer for a total of 6 samples instead of 9 + vec3 result = vec3(0); + result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, -1.0)); + result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, 0.0)); + result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, +1.0)); + result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, -1.0)); + result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, 0.0)); + result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, +1.0)); + result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, -1.0)); + result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, 0.0)); + result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, +1.0)); + result *= 0.111111111; // 1.0 / 9.0 + return result; +} +vec3 highPassRandRGB(vec2 uv) { + // by subtracting the low-pass signal from the original signal, we're being left with the high-pass signal + // hp(x) = x - lp(x) + return RGB_NOISE_FUNCTION(uv) - lowPassRandRGB(uv) + 0.5; +} + + +vec2 vogelDiskSample(int sampleIndex, int sampleCount, float angle) { + const float goldenAngle = 2.399963f; // radians + float r = sqrt(float(sampleIndex) + 0.5f) / sqrt(float(sampleCount)); + float theta = float(sampleIndex) * goldenAngle + angle; + float sine = sin(theta); + float cosine = cos(theta); + return vec2(cosine, sine) * r; +} +float penumbraSize( const in float zReceiver, const in float zBlocker ) { // Parallel plane estimation + return (zReceiver - zBlocker) / zBlocker; +} +float findBlocker(sampler2D shadowMap, vec2 uv, float compare, float angle) { + float texelSize = 1.0 / float(textureSize(shadowMap, 0).x); + float blockerDepthSum = float(${e}); + float blockers = 0.0; + + int j = 0; + vec2 offset = vec2(0.); + float depth = 0.; + + #pragma unroll_loop_start + for(int i = 0; i < ${n}; i ++) { + offset = (vogelDiskSample(j, ${n}, angle) * texelSize) * 2.0 * PENUMBRA_FILTER_SIZE; + depth = unpackRGBAToDepth( texture2D( shadowMap, uv + offset)); + if (depth < compare) { + blockerDepthSum += depth; + blockers++; + } + j++; + } + #pragma unroll_loop_end + + if (blockers > 0.0) { + return blockerDepthSum / blockers; + } + return -1.0; +} + + +float vogelFilter(sampler2D shadowMap, vec2 uv, float zReceiver, float filterRadius, float angle) { + float texelSize = 1.0 / float(textureSize(shadowMap, 0).x); + float shadow = 0.0f; + int j = 0; + vec2 vogelSample = vec2(0.0); + vec2 offset = vec2(0.0); + #pragma unroll_loop_start + for (int i = 0; i < ${n}; i++) { + vogelSample = vogelDiskSample(j, ${n}, angle) * texelSize; + offset = vogelSample * (1.0 + filterRadius * float(${t})); + shadow += step( zReceiver, unpackRGBAToDepth( texture2D( shadowMap, uv + offset ) ) ); + j++; + } + #pragma unroll_loop_end + return shadow * 1.0 / ${n}.0; +} + +float PCSS (sampler2D shadowMap, vec4 coords) { + vec2 uv = coords.xy; + float zReceiver = coords.z; // Assumed to be eye-space z in this code + float angle = highPassRandRGB(gl_FragCoord.xy).r * PI2; + float avgBlockerDepth = findBlocker(shadowMap, uv, zReceiver, angle); + if (avgBlockerDepth == -1.0) { + return 1.0; + } + float penumbraRatio = penumbraSize(zReceiver, avgBlockerDepth); + return vogelFilter(shadowMap, uv, zReceiver, 1.25 * penumbraRatio, angle); +}`,r=Ae.shadowmap_pars_fragment,{renderer:i,scene:a,camera:o}=P();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 )`,`${uJ} + #if defined( SHADOWMAP_TYPE_PCF )`),Ae.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 un(()=>{o.value&&(Ae.shadowmap_pars_fragment=r,c(i.value,a.value,o.value))}),W(t,()=>{o.value&&(s(i.value,t),c(i.value,a.value,o.value))},{immediate:!0}),(e,t)=>(G(),cn(`TresGroup`))}});var fJ=class extends vt{constructor(){super(),fR(this,`virtualScene`,null),this.virtualScene=new ye}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 pJ=an({__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=H(null);t({texture:a});let{extend:o,renderer:s,scene:c}=ke();o({EnvironmentScene:fJ});let l=null,u=H(null),d=null,f=H(null),p=([n,r]=kn(()=>OU(i,u)),n=await n,r(),n),{onBeforeRender:m}=F(),h=1;m(()=>{if(d&&f.value&&u.value&&(i.frames===1/0||h{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 we(1,1,1),new Te({side:jt})),r.userData.isEnvironment=!0,n.add(r)),n.background=e,n.backgroundBlurriness=i.blur}},{immediate:!0});let g=e=>{e&&l!=null&&l.length?(c.value.environment=e.texture,i.background&&(c.value.background=e.texture)):p.value&&(c.value.environment=p.value,i.background&&(c.value.background=p.value))};return W(p,()=>{u.value&&g(u.value)},{immediate:!0,deep:!0}),W(()=>Nn().default,e=>{var t;if(e&&(l=e(),Array.isArray(l)&&l.length>0)){o({EnvironmentScene:fJ}),u.value=new Ze(i.resolution),u.value.texture.type=it,d=new _e(i.near,i.far,u.value),g(u.value);return}(t=u.value)==null||t.dispose(),u.value=null,g()},{immediate:!0,deep:!0}),a.value=p.value,un(()=>{var e,t;(e=f.value)==null||e.dispose(),(t=u.value)==null||t.dispose()}),(e,t)=>u.value?(G(),cn(`TresEnvironmentScene`,{key:0,ref_key:`environmentScene`,ref:f},[Dn(e.$slots,`default`)],512)):on(``,!0)}}),mJ={key:0,args:[0,1,64]},hJ={key:1,args:[.5,1,64]},gJ={key:2},_J=[`tone-mapped`,`map`,`side`,`color`],vJ=an({__name:`index`,props:{args:{default:null},form:{default:`rect`},toneMapped:{type:Boolean,default:!1},map:{default:null},intensity:{default:1},color:{default:new _t(16777215)}},setup(e,{expose:t}){let n=e,r=H(),i=H();return Tn(()=>{r.value&&(r.value.color.copy(new _t(n.color)),r.value.color.multiplyScalar(n.intensity),r.value.needsUpdate=!0)}),t({mesh:i}),(e,t)=>(G(),cn(`TresMesh`,{ref_key:`mesh`,ref:i},[e.form===`circle`?(G(),cn(`TresRingGeometry`,mJ)):e.form===`ring`?(G(),cn(`TresRingGeometry`,hJ)):e.form===`rect`?(G(),cn(`TresPlaneGeometry`,gJ)):(G(),En(n.form,{key:3,args:e.args},null,8,[`args`])),U(`TresMeshBasicMaterial`,{ref_key:`material`,ref:r,"tone-mapped":e.toneMapped,map:e.map,side:K(Rt),color:e.color},null,8,_J)],512))}});var yJ=an({__name:`Model`,props:{model:{},idleAnimation:{},loadAnimations:{},position:{},paused:{type:Boolean}},emits:[`loadModelProgress`,`error`],setup(s,{expose:c,emit:l}){let u=s,d=l,f,p=H(),m=H(),{scene:h}=ke(),{onBeforeRender:g}=F(),_=r(),v=i(),y=H();W(()=>u.position,([e,t,n])=>{p.value&&p.value.scene.position.set(e,t,n)}),nn(async()=>{if(h.value)try{let r=await t(u.model,{scene:h.value,lookAt:!0,position:u.position,onProgress:e=>d(`loadModelProgress`,Number.parseFloat((100*(e.loaded/e.total)).toFixed(2)))});if(!r){console.warn(`No VRM model loaded`);return}let i=await a(u.idleAnimation),o=await n(r,i);if(!o){console.warn(`No VRM animation loaded`);return}m.value=new he(r.scene),m.value.clipAction(o).play(),y.value=e(r),p.value=r,f=g(({delta:e})=>{m.value?.update(e),p.value?.update(e),_.update(p.value,e),v.update(p.value,e),y.value?.update(e)}).off}catch(e){d(`error`,e)}}),un(()=>{f?.(),p.value&&(p.value.scene.removeFromParent(),o.deepDispose(p.value.scene))}),c({setExpression(e){y.value?.setEmotionWithResetAfter(e,1e3)}});let{pause:b,resume:x}=F();return W(()=>u.paused,e=>{e?b():x()}),(e,t)=>Dn(e.$slots,`default`)}}),bJ=yJ;const xJ=[`position`],SJ={absolute:``,bottom:`3`,right:`3`},CJ={flex:`~ row`,"cursor-pointer":``},wJ=[`checked`,`aria-checked`],TJ={key:0,"min-w":`50vw`,z:`{f.value?.setExpression(e)}}),(e,t)=>(G(),En(v,{relative:``},{default:sn(({height:e,width:n})=>[Fn(K(Ee),{alpha:!0,antialias:!0,width:n,height:e},{default:sn(()=>[Fn(K(MW)),U(`TresPerspectiveCamera`,{position:[o.value,s.value,c.value]},null,8,xJ),t[14]||=U(`TresDirectionalLight`,{color:16777215,intensity:1.2,position:[1,1,1]},null,-1),t[15]||=U(`TresAmbientLight`,{color:16777215,intensity:1.5},null,-1),Fn(bJ,{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`]),U(`div`,SJ,[U(`div`,CJ,[U(`label`,{class:_n([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":``},[On(U(`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,wJ),[[kt,a.value]]),t[16]||=U(`div`,{"select-none":``},[U(`div`,{"i-solar:bug-bold-duotone":``})],-1)],2)]),Fn(K(D),null,{default:sn(()=>[a.value?(G(),cn(`div`,TJ,[U(`div`,EJ,[U(`div`,DJ,[U(`span`,null,gn(K(p)(`stage.viewers.debug-menu.vrm.model.title`)),1)]),Fn(E,{"h-fit":``,"w-full":``,flex:`~ col`,border:`~ gray/25 rounded-lg`,divide:`y dashed gray/25`,"of-clip":``,"shadow-sm":``},{label:sn(()=>[U(`span`,OJ,gn(K(p)(`stage.viewers.debug-menu.vrm.camera`)),1)]),default:sn(()=>[U(`div`,kJ,[t[17]||=U(`div`,{text:`neutral-400 dark:neutral-500`},[U(`span`,null,`X`)],-1),U(`label`,AJ,[Fn(Xn,{modelValue:o.value,"onUpdate:modelValue":t[3]||=e=>o.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),U(`div`,jJ,[U(`span`,null,gn(o.value),1)]),t[18]||=U(`div`,{text:`neutral-400 dark:neutral-500`},[U(`span`,null,`Y`)],-1),U(`label`,MJ,[Fn(Xn,{modelValue:s.value,"onUpdate:modelValue":t[4]||=e=>s.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),U(`div`,NJ,[U(`span`,null,gn(s.value),1)]),t[19]||=U(`div`,{text:`neutral-400 dark:neutral-500`},[U(`span`,null,`Z`)],-1),U(`label`,PJ,[Fn(Xn,{modelValue:c.value,"onUpdate:modelValue":t[5]||=e=>c.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),U(`div`,FJ,[U(`span`,null,gn(c.value),1)])])]),_:1}),Fn(E,{"h-fit":``,"w-full":``,flex:`~ col`,border:`~ gray/25 rounded-lg`,divide:`y dashed gray/25`,"of-clip":``,"shadow-sm":``},{label:sn(()=>[U(`span`,IJ,gn(K(p)(`stage.viewers.debug-menu.vrm.model.title`)),1)]),default:sn(()=>[U(`div`,LJ,[t[20]||=U(`div`,{text:`neutral-400 dark:neutral-500`},[U(`span`,null,`X`)],-1),U(`label`,RJ,[Fn(Xn,{modelValue:l.value,"onUpdate:modelValue":t[6]||=e=>l.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),U(`div`,zJ,[U(`span`,null,gn(l.value),1)]),t[21]||=U(`div`,{text:`neutral-400 dark:neutral-500`},[U(`span`,null,`Y`)],-1),U(`label`,BJ,[Fn(Xn,{modelValue:u.value,"onUpdate:modelValue":t[7]||=e=>u.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),U(`div`,VJ,[U(`span`,null,gn(u.value),1)]),t[22]||=U(`div`,{text:`neutral-400 dark:neutral-500`},[U(`span`,null,`Z`)],-1),U(`label`,HJ,[Fn(Xn,{modelValue:d.value,"onUpdate:modelValue":t[8]||=e=>d.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),U(`div`,UJ,[U(`span`,null,gn(d.value),1)])])]),_:1}),U(`div`,WJ,[U(`span`,null,gn(K(p)(`stage.viewers.debug-menu.emotions`)),1)]),U(`div`,GJ,[U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[9]||=e=>f.value?.setExpression(`neutral`)},gn(K(p)(`stage.viewers.debug-menu.emotions-btn.neutral`)),1),U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[10]||=e=>f.value?.setExpression(`surprised`)},gn(K(p)(`stage.viewers.debug-menu.emotions-btn.surprised`)),1),U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[11]||=e=>f.value?.setExpression(`sad`)},gn(K(p)(`stage.viewers.debug-menu.emotions-btn.sad`)),1),U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[12]||=e=>f.value?.setExpression(`angry`)},gn(K(p)(`stage.viewers.debug-menu.emotions-btn.angry`)),1),U(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[13]||=e=>f.value?.setExpression(`happy`)},gn(K(p)(`stage.viewers.debug-menu.emotions-btn.happy`)),1)])])])):on(``,!0)]),_:1})])]),_:1}))}}),qJ=KJ;const JJ={relative:``},YJ={"h-full":``,"w-full":``};var XJ=an({__name:`Stage`,props:{paused:{type:Boolean,default:!1},focusAt:{},xOffset:{},yOffset:{},scale:{default:1}},setup(e){let t=H(),n=H(),{stageView:r}=S(Un()),{mouthOpenSize:i}=S(h()),{audioContext:a,calculateVolume:o}=m(),{onBeforeMessageComposed:s,onBeforeSend:c,onTokenLiteral:l,onTokenSpecial:_,onStreamEnd:v,onAssistantResponseEnd:b}=Gn(),x=qn(),C=H(),w=H(!1),T=H(!1),E=p({handlers:[e=>new Promise(t=>{let n=a.createBufferSource();n.buffer=e.data.audioBuffer,n.connect(a.destination),n.connect(C.value),w.value=!0,n.start(0),n.onended=()=>{w.value=!1,t()}})]}),D=Kn(),{ssmlEnabled:j,activeSpeechProvider:M,activeSpeechModel:N,activeSpeechVoice:ee,pitch:P}=S(D);async function F(e){try{if(!M.value){console.warn(`No active speech provider configured`);return}if(!ee.value){console.warn(`No active speech voice configured`);return}let t=x.getProviderInstance(M.value);if(!t){console.error(`Failed to initialize speech provider`);return}let n=x.getProviderConfig(M.value),r=j.value?D.generateSSML(e.data,ee.value,{...n,pitch:P.value}):e.data,i=await g({...t.speech(N.value,n),input:r,voice:ee.value.id}),o=await a.decodeAudioData(i);await E.add({audioBuffer:o,text:e.data})}catch(e){console.error(`Speech generation failed:`,e)}}let I=p({handlers:[F]});I.on(`add`,e=>{console.debug(`ttsQueue added`,e)});let L=u(I),{currentMotion:R}=S(Wn()),z=p({handlers:[async e=>{if(r.value===`3d`){let t=A[e.data];if(!t)return;await n.value.setExpression(t)}else r.value===`2d`&&(R.value={group:k[e.data]})}]}),te=d(z);te.onHandlerEvent(`emotion`,e=>{console.debug(`emotion detected`,e)});let B=f();B.onHandlerEvent(`delay`,e=>{console.debug(`delay detected`,e)});function ne(){requestAnimationFrame(ne),w.value&&(i.value=o(C.value,`linear`))}function re(){T.value||(ne(),a.resume(),T.value=!0)}function ie(){C.value||=a.createAnalyser()}return s(async()=>{ie(),re()}),c(async()=>{R.value={group:y}}),l(async e=>{await L.add(e)}),_(async e=>{await B.add(e),await te.add(e)}),v(async()=>{await B.add(O)}),b(async e=>{}),un(()=>{T.value=!1}),nn(async()=>{t.value=lR({connection:{bundles:Jn()}}),await t.value.execute(`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(e,t)=>(G(),cn(`div`,JJ,[U(`div`,YJ,[K(r)===`2d`?(G(),En(Ph,{key:0,"focus-at":e.focusAt,"mouth-open-size":K(i),"min-w":`50% (t(),r(e,{modelValue:a.value,"onUpdate:modelValue":i[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 b}; \ No newline at end of file +import{b as e}from"./Basic-1H4d_HIg.js";import{d3 as t,dd as n,de as r,ds as i}from"./index-K-hxNScn.js";var a=t({__name:`Textarea`,props:{modelValue:{default:``},modelModifiers:{}},emits:[`update:modelValue`],setup(t){let a=r(t,`modelValue`);return(t,r)=>(i(),n(e,{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 b}; \ No newline at end of file diff --git a/assets/_...all_-CBSDUE9n.js b/assets/_...all_-CBSDUE9n.js new file mode 100644 index 0000000000000000000000000000000000000000..be46acf006033d6df602743a6f43160c7fb44820 --- /dev/null +++ b/assets/_...all_-CBSDUE9n.js @@ -0,0 +1 @@ +import{aE as e,d6 as t,ds as n}from"./index-K-hxNScn.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/_...all_-kEGASjnp.js b/assets/_...all_-kEGASjnp.js deleted file mode 100644 index fe50dd787b8183d7bb7628b5356e272d24ec90da..0000000000000000000000000000000000000000 --- a/assets/_...all_-kEGASjnp.js +++ /dev/null @@ -1 +0,0 @@ -import{aE as e,d4 as t,db as n}from"./index-BOKBAzT0.js";const r={};function i(e,r){return t(),n(`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-Dcc0vk0T.js b/assets/__vite-browser-external-Dcc0vk0T.js deleted file mode 100644 index 7fcc447ad6d977d88ea136df7422d71cc91ac400..0000000000000000000000000000000000000000 --- a/assets/__vite-browser-external-Dcc0vk0T.js +++ /dev/null @@ -1 +0,0 @@ -import{dH as e}from"./index-BOKBAzT0.js";var t=e((exports,t)=>{t.exports={}});export default t(); \ No newline at end of file diff --git a/assets/__vite-browser-external-Dm87haFe.js b/assets/__vite-browser-external-Dm87haFe.js new file mode 100644 index 0000000000000000000000000000000000000000..633f625c1f2c835ddc9427a416b32e5842fdde6c --- /dev/null +++ b/assets/__vite-browser-external-Dm87haFe.js @@ -0,0 +1 @@ +import{dJ as e}from"./index-K-hxNScn.js";var t=e((exports,t)=>{t.exports={}});export default t(); \ No newline at end of file diff --git a/assets/airi-card-CSjKA-0V.js b/assets/airi-card-mY7qwyzh.js similarity index 61% rename from assets/airi-card-CSjKA-0V.js rename to assets/airi-card-mY7qwyzh.js index 6dfa5f3500c43c56a5d70a21b0486cfaa9bad995..2b731c565b979805a8081b3730dc85c40a9ed059 100644 --- a/assets/airi-card-CSjKA-0V.js +++ b/assets/airi-card-mY7qwyzh.js @@ -1 +1 @@ -import{b as e}from"./InputFile-BBWEWJbr.js";import{a6 as t,aL as n,ak as r,cU as i,d0 as a,d2 as o,d3 as s,d4 as c,d8 as l,d9 as u,dD as d,dE as f,dF as p,da as m,db as h,df as g,dg as _,di as v,dl as y,do as b,dp as x,dy as S,w as C}from"./index-BOKBAzT0.js";import{b as w}from"./route-block-D_qNAUXY.js";import{b as ee}from"./CardCreate-BjA7840r.js";import{b as te}from"./CardCreationDialog-Bazp-7BG.js";import{b as ne}from"./DeleteCardDialog-DWd1lG7D.js";import{b as re}from"./CardDetailDialog-CJ2uO9ec.js";import{b as ie}from"./CardListItem-BkR5V785.js";const ae={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},oe={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},se={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},T=[`placeholder`],E={class:`relative flex flex-row justify-start gap-2 lg:flex-col`},D={class:`top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400`},O={key:0,flex:``,"flex-col":``,"items-center":``},k={"font-medium":``,text:`neutral-600 dark:neutral-300`},A={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},j={key:1,flex:``,"flex-col":``,"items-center":``},M={"font-medium":``,text:`primary-600 dark:primary-300`},N={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`},P={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`},F={class:`flex flex-col`},I={class:`font-medium`},L={class:`text-sm text-amber-600 dark:text-amber-400`},R={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 z=l({__name:`index`,setup(l){let{t:w}=t(),z=C(),{addCard:B,removeCard:ce}=z,{cards:V,activeCardId:H}=n(z),U=d(``),W=d(!1),G=d(!1),K=d(``),q=d(`nameAsc`),J=d([]);o(J,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);U.value=B(n),W.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let Y=x(()=>Array.from(V.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),le=x(()=>{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=x(()=>{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=d(!1),Q=d(null);function ue(){Q.value&&(ce(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){let n=V.value.get(e);if(!n||!n.extensions?.airi?.modules)return`default`;let r=n.extensions.airi.modules;return t===`consciousness`?r.consciousness?.model&&r.consciousness.model.split(`-`).pop()||`default`:t===`voice`&&r.speech?.voice_id||`default`}return(t,n)=>{let o=s(`motion`);return c(),h(b,null,[g(`div`,ae,[g(`div`,oe,[g(`div`,se,[n[7]||=g(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[g(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),y(g(`input`,{"onUpdate:modelValue":n[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:S(w)(`settings.pages.card.search`)},null,8,T),[[i,K.value]])]),g(`div`,E,[g(`div`,D,f(S(w)(`settings.pages.card.sort_by`))+`: `,1),a(S(r),{modelValue:q.value,"onUpdate:modelValue":n[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:S(w)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:S(w)(`settings.pages.card.name_desc`)},{value:`recent`,label:S(w)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),g(`div`,{class:p([`mt-4`,{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":S(V).size>0}])},[a(S(e),{modelValue:J.value,"onUpdate:modelValue":n[2]||=e=>J.value=e,accept:`*.json`},{default:m(({isDragging:e})=>[e?(c(),h(`div`,j,[n[9]||=g(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),g(`p`,M,f(S(w)(`settings.pages.card.drop_here`)),1)])):(c(),h(`div`,O,[n[8]||=g(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),g(`p`,k,f(S(w)(`settings.pages.card.upload`)),1),g(`p`,A,f(S(w)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),a(ee,{onClick:pe}),S(V).size>0?(c(!0),h(b,{key:0},_(X.value,e=>(c(),v(ie,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===S(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)):u(``,!0),S(V).size===0?(c(),h(`div`,N,[n[10]||=g(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),g(`p`,null,f(S(w)(`settings.pages.card.no_cards`)),1)])):u(``,!0),K.value&&X.value.length===0?(c(),h(`div`,P,[n[11]||=g(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),g(`div`,F,[g(`span`,I,f(S(w)(`settings.pages.card.no_results`)),1),g(`span`,L,f(S(w)(`settings.pages.card.try_different_search`)),1)])])):u(``,!0)],2)]),a(ne,{modelValue:Z.value,"onUpdate:modelValue":n[3]||=e=>Z.value=e,"card-name":Q.value?S(z).getCard(Q.value)?.name:``,onConfirm:ue,onCancel:n[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),a(re,{modelValue:W.value,"onUpdate:modelValue":n[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),a(te,{modelValue:G.value,"onUpdate:modelValue":n[6]||=e=>G.value=e},null,8,[`modelValue`]),y((c(),h(`div`,R,n[12]||=[g(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[o]])],64)}}});typeof w==`function`&&w(z);var B=z;export{B as default}; \ No newline at end of file +import{b as e}from"./InputFile-CrE3SFMy.js";import{a3 as t,aL as n,ah as r,cZ as i,d3 as a,d4 as o,d5 as s,d6 as c,dA as l,dG as u,dH as d,da as f,db as p,dd as m,dg as h,dj as g,dk as _,do as v,dq as y,dr as b,ds as x,dv as S,t as C}from"./index-K-hxNScn.js";import{b as w}from"./route-block-D_qNAUXY.js";import{b as ee}from"./CardCreate-CAbaTC1Z.js";import{b as te}from"./CardCreationDialog-DtkXvIwx.js";import{b as ne}from"./DeleteCardDialog-82b70cIC.js";import{b as re}from"./CardDetailDialog-B5sM5zj1.js";import{b as ie}from"./CardListItem-DTzfNndg.js";const ae={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},oe={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},se={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},T=[`placeholder`],E={class:`relative flex flex-row justify-start gap-2 lg:flex-col`},D={class:`top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400`},O={key:0,flex:``,"flex-col":``,"items-center":``},k={"font-medium":``,text:`neutral-600 dark:neutral-300`},A={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},j={key:1,flex:``,"flex-col":``,"items-center":``},M={"font-medium":``,text:`primary-600 dark:primary-300`},N={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`},P={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`},F={class:`flex flex-col`},I={class:`font-medium`},L={class:`text-sm text-amber-600 dark:text-amber-400`},R={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 z=a({__name:`index`,setup(a){let{t:w}=t(),z=C(),{addCard:B,removeCard:ce}=z,{cards:V,activeCardId:H}=n(z),U=l(``),W=l(!1),G=l(!1),K=l(``),q=l(`nameAsc`),J=l([]);y(J,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);U.value=B(n),W.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let Y=_(()=>Array.from(V.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),le=_(()=>{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=_(()=>{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=l(!1),Q=l(null);function ue(){Q.value&&(ce(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){let n=V.value.get(e);if(!n||!n.extensions?.airi?.modules)return`default`;let r=n.extensions.airi.modules;return t===`consciousness`?r.consciousness?.model&&r.consciousness.model.split(`-`).pop()||`default`:t===`voice`&&r.speech?.voice_id||`default`}return(t,n)=>{let a=b(`motion`);return x(),c(g,null,[f(`div`,ae,[f(`div`,oe,[f(`div`,se,[n[7]||=f(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[f(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),h(f(`input`,{"onUpdate:modelValue":n[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:S(w)(`settings.pages.card.search`)},null,8,T),[[i,K.value]])]),f(`div`,E,[f(`div`,D,u(S(w)(`settings.pages.card.sort_by`))+`: `,1),v(S(r),{modelValue:q.value,"onUpdate:modelValue":n[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:S(w)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:S(w)(`settings.pages.card.name_desc`)},{value:`recent`,label:S(w)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),f(`div`,{class:d([`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))]":S(V).size>0}])},[v(S(e),{modelValue:J.value,"onUpdate:modelValue":n[2]||=e=>J.value=e,accept:`*.json`},{default:s(({isDragging:e})=>[e?(x(),c(`div`,j,[n[9]||=f(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),f(`p`,M,u(S(w)(`settings.pages.card.drop_here`)),1)])):(x(),c(`div`,O,[n[8]||=f(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),f(`p`,k,u(S(w)(`settings.pages.card.upload`)),1),f(`p`,A,u(S(w)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),v(ee,{onClick:pe}),S(V).size>0?(x(!0),c(g,{key:0},p(X.value,e=>(x(),m(ie,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===S(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)):o(``,!0),S(V).size===0?(x(),c(`div`,N,[n[10]||=f(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),f(`p`,null,u(S(w)(`settings.pages.card.no_cards`)),1)])):o(``,!0),K.value&&X.value.length===0?(x(),c(`div`,P,[n[11]||=f(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),f(`div`,F,[f(`span`,I,u(S(w)(`settings.pages.card.no_results`)),1),f(`span`,L,u(S(w)(`settings.pages.card.try_different_search`)),1)])])):o(``,!0)],2)]),v(ne,{modelValue:Z.value,"onUpdate:modelValue":n[3]||=e=>Z.value=e,"card-name":Q.value?S(z).getCard(Q.value)?.name:``,onConfirm:ue,onCancel:n[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),v(re,{modelValue:W.value,"onUpdate:modelValue":n[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),v(te,{modelValue:G.value,"onUpdate:modelValue":n[6]||=e=>G.value=e},null,8,[`modelValue`]),h((x(),c(`div`,R,n[12]||=[f(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[a]])],64)}}});typeof w==`function`&&w(z);var B=z;export{B as default}; \ No newline at end of file diff --git a/assets/alibaba-cloud-model-studio-CCuOI-7V.js b/assets/alibaba-cloud-model-studio-NFHP1r1x.js similarity index 60% rename from assets/alibaba-cloud-model-studio-CCuOI-7V.js rename to assets/alibaba-cloud-model-studio-NFHP1r1x.js index 4fec34b26df1c5ce1bb9a6f8e74e50b7efd9a567..a4dffa621603717108faaa6c33a48b1643479ae5 100644 --- a/assets/alibaba-cloud-model-studio-CCuOI-7V.js +++ b/assets/alibaba-cloud-model-studio-NFHP1r1x.js @@ -1 +1 @@ -import{$ as e,a6 as t,aL as n,ap as r,d0 as i,d2 as a,d4 as o,d6 as s,d8 as c,dD as l,da as u,df as d,di as f,dp as p,dy as m,s as h,x as g,z as _}from"./index-BOKBAzT0.js";import{b as v}from"./route-block-D_qNAUXY.js";const y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`;var S=c({__name:`alibaba-cloud-model-studio`,setup(c){let v={speed:1},S=l(0),C=l(1),w=l(0),T=g(),E=_(),{providers:D}=n(E),{t:O}=t(),k=p(()=>!!D.value[b]?.apiKey),A=p(()=>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 s(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)}),a(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),a(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),a(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),a(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}),(t,n)=>(o(),f(m(h),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":u(()=>[d(`div`,y,[i(m(r),{modelValue:S.value,"onUpdate:modelValue":n[0]||=e=>S.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:m(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`]),i(m(r),{modelValue:C.value,"onUpdate:modelValue":n[1]||=e=>C.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:m(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),i(m(r),{modelValue:w.value,"onUpdate:modelValue":n[2]||=e=>w.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:m(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:u(()=>[i(m(e),{"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{Y as e,a3 as t,aL as n,am as r,d1 as i,d3 as a,d5 as o,dA as s,da as c,dd as l,dk as u,do as d,dq as f,ds as p,dv as m,p as h,u as g,w as _}from"./index-K-hxNScn.js";import{b as v}from"./route-block-D_qNAUXY.js";const y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`;var S=a({__name:`alibaba-cloud-model-studio`,setup(a){let v={speed:1},S=s(0),C=s(1),w=s(0),T=g(),E=_(),{providers:D}=n(E),{t:O}=t(),k=u(()=>!!D.value[b]?.apiKey),A=u(()=>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 i(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)}),f(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),f(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),f(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),f(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}),(t,n)=>(p(),l(m(h),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":o(()=>[c(`div`,y,[d(m(r),{modelValue:S.value,"onUpdate:modelValue":n[0]||=e=>S.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:m(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`]),d(m(r),{modelValue:C.value,"onUpdate:modelValue":n[1]||=e=>C.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:m(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),d(m(r),{modelValue:w.value,"onUpdate:modelValue":n[2]||=e=>w.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:m(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:o(()=>[d(m(e),{"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-BxJBcQ5t.js b/assets/anthropic-BxJBcQ5t.js deleted file mode 100644 index 5173652c99f5b08cc15b5f0e4b39b38fb9c52b87..0000000000000000000000000000000000000000 --- a/assets/anthropic-BxJBcQ5t.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d5 as f,d6 as p,d8 as m,dE as h,da as g,df as _,di as v,dp as y,dy as b,z as x}from"./index-BOKBAzT0.js";import{b as S}from"./route-block-D_qNAUXY.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=m({__name:`anthropic`,setup(m){let{t:S}=a(),D=s(),O=x(),{providers:k}=c(O),A=y(()=>O.getProviderMetadata(E)),j=y({get:()=>k.value[E]?.apiKey||``,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=y({get:()=>k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});p(()=>{k.value[E]||(k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}),j.value=k.value[E]?.apiKey||``,M.value=k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`}),u([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(a,s)=>(d(),v(b(e),{"provider-name":A.value?.localizedName||`Anthropic | Claude`,"provider-icon":A.value?.icon,"on-back":()=>b(D).back()},{default:g(()=>[_(`div`,C,[_(`h2`,w,h(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),_(`p`,null,[f(h(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),_(`a`,T,h(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),f(`, `+h(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),s[2]||=_(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),f(` `+h(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),_(`p`,null,[f(h(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),s[3]||=_(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),f(` `+h(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),l(b(t),null,{default:g(()=>[l(b(n),{title:b(S)(`settings.pages.providers.common.section.basic.title`),description:b(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:g(()=>[l(b(i),{modelValue:j.value,"onUpdate:modelValue":s[0]||=e=>j.value=e,"provider-name":A.value?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(b(o),{title:b(S)(`settings.pages.providers.common.section.advanced.title`)},{default:g(()=>[l(b(r),{modelValue:M.value,"onUpdate:modelValue":s[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/anthropic-Cu-QiXIM.js b/assets/anthropic-Cu-QiXIM.js new file mode 100644 index 0000000000000000000000000000000000000000..3187d8fb1bb44f8d43273818913865f57c2f07d8 --- /dev/null +++ b/assets/anthropic-Cu-QiXIM.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d0 as l,d1 as u,d3 as d,d5 as f,dG as p,da as m,dd as h,dk as g,do as _,dq as v,ds as y,dv as b,w as x}from"./index-K-hxNScn.js";import{b as S}from"./route-block-D_qNAUXY.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=d({__name:`anthropic`,setup(d){let{t:S}=a(),D=s(),O=x(),{providers:k}=c(O),A=g(()=>O.getProviderMetadata(E)),j=g({get:()=>k.value[E]?.apiKey||``,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=g({get:()=>k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});u(()=>{k.value[E]||(k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}),j.value=k.value[E]?.apiKey||``,M.value=k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`}),v([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(a,s)=>(y(),h(b(t),{"provider-name":A.value?.localizedName||`Anthropic | Claude`,"provider-icon":A.value?.icon,"on-back":()=>b(D).back()},{default:f(()=>[m(`div`,C,[m(`h2`,w,p(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),m(`p`,null,[l(p(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),m(`a`,T,p(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),l(`, `+p(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),s[2]||=m(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),l(` `+p(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),m(`p`,null,[l(p(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),s[3]||=m(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),l(` `+p(b(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),_(b(n),null,{default:f(()=>[_(b(e),{title:b(S)(`settings.pages.providers.common.section.basic.title`),description:b(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:f(()=>[_(b(i),{modelValue:j.value,"onUpdate:modelValue":s[0]||=e=>j.value=e,"provider-name":A.value?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),_(b(o),{title:b(S)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[_(b(r),{modelValue:M.value,"onUpdate:modelValue":s[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-CxlToFOV.js b/assets/appearance-BjGIfT8s.js similarity index 59% rename from assets/appearance-CxlToFOV.js rename to assets/appearance-BjGIfT8s.js index 22049620a34a4d8d89bac55164db44eedff5fafd..2e673604a9b44b5516f37ba77083d0dfe56d9bdb 100644 --- a/assets/appearance-CxlToFOV.js +++ b/assets/appearance-BjGIfT8s.js @@ -1 +1 @@ -import{a6 as e,ah as t,d3 as n,d4 as r,d8 as i,dG as a,db as o,df as s,dg as c,di as l,dl as u,do as d,dp as f,dy as p}from"./index-BOKBAzT0.js";import{b as m}from"./route-block-D_qNAUXY.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=i({__name:`index`,setup(i){let{t:m}=e(),y=f(()=>[{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(e,i)=>{let f=n(`motion`);return r(),o(`div`,h,[i[0]||=s(`div`,null,null,-1),s(`div`,g,[(r(!0),o(d,null,c(y.value,(e,n)=>u((r(),l(p(t),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:a({transitionDelay:`${n*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[f]])),128))]),u((r(),o(`div`,_,[u(s(`div`,v,null,512),[[f]])])),[[f]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default}; \ No newline at end of file +import{a3 as e,ae as t,d3 as n,d6 as r,dI as i,da as a,db as o,dd as s,dg as c,dj as l,dk as u,dr as d,ds as f,dv as p}from"./index-K-hxNScn.js";import{b as m}from"./route-block-D_qNAUXY.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=n({__name:`index`,setup(n){let{t:m}=e(),y=u(()=>[{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(e,n)=>{let u=d(`motion`);return f(),r(`div`,h,[n[0]||=a(`div`,null,null,-1),a(`div`,g,[(f(!0),r(l,null,o(y.value,(e,n)=>c((f(),s(p(t),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:i({transitionDelay:`${n*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[u]])),128))]),c((f(),r(`div`,_,[c(a(`div`,v,null,512),[[u]])])),[[u]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default}; \ No newline at end of file diff --git a/assets/audio-5XV-uIzq.js b/assets/audio-5XV-uIzq.js deleted file mode 100644 index dd35439f04f8897cb75899e667d18f6cde5a73ba..0000000000000000000000000000000000000000 --- a/assets/audio-5XV-uIzq.js +++ /dev/null @@ -1 +0,0 @@ -import{d4 as e,d8 as t,dD as n,db as r,df as i}from"./index-BOKBAzT0.js";var a=t({__name:`audio`,setup(t){let a=n(),o=n();function s(e){if(!e)return;let t=o.value?.files?.[0];if(!t)return;let n=document.createElement(`audio`);a.value?.appendChild(n),n.src=URL.createObjectURL(t),n.controls=!0,n.load(),n.play()}return(t,n)=>(e(),r(`div`,null,[i(`div`,null,[i(`div`,{ref_key:`containerRef`,ref:a},null,512),i(`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-YpvKX-Ak.js b/assets/audio-YpvKX-Ak.js new file mode 100644 index 0000000000000000000000000000000000000000..08cb0f3ca8257a92c726db1dc486d16ff8434723 --- /dev/null +++ b/assets/audio-YpvKX-Ak.js @@ -0,0 +1 @@ +import{d3 as e,d6 as t,dA as n,da as r,ds as i}from"./index-K-hxNScn.js";var a=e({__name:`audio`,setup(e){let a=n(),o=n();function s(e){if(!e)return;let t=o.value?.files?.[0];if(!t)return;let n=document.createElement(`audio`);a.value?.appendChild(n),n.src=URL.createObjectURL(t),n.controls=!0,n.load(),n.play()}return(e,n)=>(i(),t(`div`,null,[r(`div`,null,[r(`div`,{ref_key:`containerRef`,ref:a},null,512),r(`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-DsJ9pwd8.js b/assets/audio-record-DsJ9pwd8.js new file mode 100644 index 0000000000000000000000000000000000000000..3995f944a49dd4ce39e5c58436b799238cc1a947 --- /dev/null +++ b/assets/audio-record-DsJ9pwd8.js @@ -0,0 +1 @@ +import{a$ as e,a9 as t,aN as n,aX as r,ah as i,ai as a,d0 as o,d1 as s,d3 as c,d5 as l,d6 as u,d8 as d,dA as f,dG as p,da as m,db as h,dd as g,dj as _,dk as v,do as y,dq as b,ds as x,dv as S,dy as C,dz as w}from"./index-K-hxNScn.js";function T(){let e=n({constraints:{audio:!0},requestPermissions:!1}),t=f(e.audioInputs.value[0]?.deviceId||``),i=f(),a=v(()=>e.audioInputs.value),o=f({audio:!0}),s=r({constraints:o,autoSwitch:!0,enabled:!1});async function c(){e.permissionGranted.value||e.isSupported.value&&await e.ensurePermissions()}b(t,()=>{t.value&&(o.value={audio:{deviceId:{exact:t.value}}})},{immediate:!0}),b(e.audioInputs,()=>{i.value=a.value.find(e=>e.deviceId===t.value)},{immediate:!0}),b([e.permissionGranted,a,t],async()=>{await c(),e.permissionGranted.value&&a.value.length!==0&&(i.value||=a.value[0])},{immediate:!0});async function l(){await c(),e.permissionGranted.value&&i.value&&(s.enabled.value&&s.restart(),s.start())}function u(){s.stop()}return{selectedAudioInputId:t,selectedAudioInput:i,audioInputs:a,start:l,stop:u,request:c,media:s}}function E(t,n=()=>Promise.resolve()){let r=f(),i=w(t);async function a(){if(await n(),await e(i).toBeTruthy(),!i.value){console.error(`No media media available`);return}r.value=new MediaRecorder(i.value),r.value.start()}function o(){r.value&&(r.value.stop(),r.value.ondataavailable=e=>{let t=e.data,n=URL.createObjectURL(t),r=new Audio(n);r.play()})}return{startRecord:a,stopRecord:o}}const D={class:`mt-4 w-full flex justify-center gap-2`};var O=c({__name:`audio-record`,setup(e){let{audioInputs:n,selectedAudioInputId:r,start:c,stop:f,media:v,request:b}=T(),{startRecord:w,stopRecord:O}=E(v.stream,c);return s(()=>b()),d(()=>f()),(e,s)=>(x(),u(`div`,null,[y(S(i),{modelValue:S(r),"onUpdate:modelValue":s[0]||=e=>C(r)?r.value=e:null,onChange:s[1]||=()=>S(c)()},{default:l(({value:e})=>[m(`div`,null,p(e?S(n).find(t=>t.deviceId===e)?.label:`Select Audio Input`),1)]),options:l(({hide:e})=>[(x(!0),u(_,null,h(S(n),t=>(x(),g(S(a),{key:t.deviceId,value:t.deviceId,active:t.deviceId===S(r),onClick:t=>e()},{default:l(()=>[o(p(t.label),1)]),_:2},1032,[`value`,`active`,`onClick`]))),128))]),_:1},8,[`modelValue`]),m(`div`,D,[y(S(t),{onClick:S(w)},{default:l(()=>s[2]||=[o(` Start Recording `)]),_:1,__:[2]},8,[`onClick`]),y(S(t),{onClick:S(O)},{default:l(()=>s[3]||=[o(` Stop Recording `)]),_:1,__:[3]},8,[`onClick`])])]))}}),k=O;export{k as default}; \ No newline at end of file diff --git a/assets/audio-record-k6DJ-iI-.js b/assets/audio-record-k6DJ-iI-.js deleted file mode 100644 index dfe624bae8b86b50bd6e1957c293de036eb4b926..0000000000000000000000000000000000000000 --- a/assets/audio-record-k6DJ-iI-.js +++ /dev/null @@ -1 +0,0 @@ -import{aQ as e,aY as t,a_ as n,ac as r,ak as i,al as a,d0 as o,d2 as s,d4 as c,d5 as l,d6 as u,d8 as d,dB as f,dC as p,dD as m,dE as h,da as g,db as _,dd as v,df as y,dg as b,di as x,do as S,dp as C,dy as w}from"./index-BOKBAzT0.js";function T(){let n=e({constraints:{audio:!0},requestPermissions:!1}),r=m(n.audioInputs.value[0]?.deviceId||``),i=m(),a=C(()=>n.audioInputs.value),o=m({audio:!0}),c=t({constraints:o,autoSwitch:!0,enabled:!1});async function l(){n.permissionGranted.value||n.isSupported.value&&await n.ensurePermissions()}s(r,()=>{r.value&&(o.value={audio:{deviceId:{exact:r.value}}})},{immediate:!0}),s(n.audioInputs,()=>{i.value=a.value.find(e=>e.deviceId===r.value)},{immediate:!0}),s([n.permissionGranted,a,r],async()=>{await l(),n.permissionGranted.value&&a.value.length!==0&&(i.value||=a.value[0])},{immediate:!0});async function u(){await l(),n.permissionGranted.value&&i.value&&(c.enabled.value&&c.restart(),c.start())}function d(){c.stop()}return{selectedAudioInputId:r,selectedAudioInput:i,audioInputs:a,start:u,stop:d,request:l,media:c}}function E(e,t=()=>Promise.resolve()){let r=m(),i=p(e);async function a(){if(await t(),await n(i).toBeTruthy(),!i.value){console.error(`No media media available`);return}r.value=new MediaRecorder(i.value),r.value.start()}function o(){r.value&&(r.value.stop(),r.value.ondataavailable=e=>{let t=e.data,n=URL.createObjectURL(t),r=new Audio(n);r.play()})}return{startRecord:a,stopRecord:o}}const D={class:`mt-4 w-full flex justify-center gap-2`};var O=d({__name:`audio-record`,setup(e){let{audioInputs:t,selectedAudioInputId:n,start:s,stop:d,media:p,request:m}=T(),{startRecord:C,stopRecord:O}=E(p.stream,s);return u(()=>m()),v(()=>d()),(e,u)=>(c(),_(`div`,null,[o(w(i),{modelValue:w(n),"onUpdate:modelValue":u[0]||=e=>f(n)?n.value=e:null,onChange:u[1]||=()=>w(s)()},{default:g(({value:e})=>[y(`div`,null,h(e?w(t).find(t=>t.deviceId===e)?.label:`Select Audio Input`),1)]),options:g(({hide:e})=>[(c(!0),_(S,null,b(w(t),t=>(c(),x(w(a),{key:t.deviceId,value:t.deviceId,active:t.deviceId===w(n),onClick:t=>e()},{default:g(()=>[l(h(t.label),1)]),_:2},1032,[`value`,`active`,`onClick`]))),128))]),_:1},8,[`modelValue`]),y(`div`,D,[o(w(r),{onClick:w(C)},{default:g(()=>u[2]||=[l(` Start Recording `)]),_:1,__:[2]},8,[`onClick`]),o(w(r),{onClick:w(O)},{default:g(()=>u[3]||=[l(` Stop Recording `)]),_:1,__:[3]},8,[`onClick`])])]))}}),k=O;export{k as default}; \ No newline at end of file diff --git a/assets/background-remove-CYdik4Zi.js b/assets/background-remove-BBB0u_Hq.js similarity index 61% rename from assets/background-remove-CYdik4Zi.js rename to assets/background-remove-BBB0u_Hq.js index c940bf908ec647220cf304fb492f6ae40ca34b37..71a432189e57474a8284906c502f1651e92bcf3b 100644 --- a/assets/background-remove-CYdik4Zi.js +++ b/assets/background-remove-BBB0u_Hq.js @@ -1 +1 @@ -import{b as e}from"./InputFile-BBWEWJbr.js";import{A as t,d0 as n,d4 as r,d6 as i,d8 as a,d9 as o,dD as s,dE as c,dG as l,db as u,df as d,dg as f,do as p,dp as m,dy as h}from"./index-BOKBAzT0.js";import{c as g,d as _,e as v,f as y}from"./transformers.web-DzAoitZd.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=a({__name:`background-remove`,setup(a){let N=s(),P=s(),F=s(),I=s(),L=s(!1),R=s(0),z=s(),B=s(),V=s([]),H=m(()=>V.value.map(e=>URL.createObjectURL(e)));i(async()=>{try{if(!(await t()).supported)throw Error(`WebGPU is not supported in this browser.`);let e=`Xenova/modnet`;g.backends.onnx.wasm.proxy=!1,N.value??=await v.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,i)=>(r(),u(`div`,b,[d(`button`,{bg:`neutral-100 dark:neutral-800`,"w-full":``,"cursor-pointer":``,"rounded-lg":``,"px-3":``,"py-2":``,disabled:L.value,onClick:U},c(L.value?`Processing...`:`Process`),9,x),d(`div`,S,[d(`div`,C,[(r(!0),u(p,null,f(H.value,(e,t)=>(r(),u(`img`,{key:t,src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,w))),128))]),d(`div`,T,[L.value?(r(),u(`div`,E,[d(`div`,D,c(R.value)+`% `,1),d(`div`,O,[d(`div`,{bg:`emerald-500`,"h-full":``,style:l({width:`${R.value}%`}),"transition-all":``,"duration-200":``},null,4)])])):o(``,!0),(r(!0),u(p,null,f(z.value,(e,t)=>(r(),u(`div`,{key:t,relative:``,class:`group`,"h-full":``,"w-full":``},[d(`img`,{src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,k),d(`div`,A,[d(`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)},i[1]||=[d(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[d(`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?(r(),u(`div`,M,[d(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,onClick:G},i[2]||=[d(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[d(`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)])])):o(``,!0)])]),n(h(e),{modelValue:V.value,"onUpdate:modelValue":i[0]||=e=>V.value=e,"w-full":``},null,8,[`modelValue`])]))}}),P=N;export{P as default}; \ No newline at end of file +import{b as e}from"./InputFile-CrE3SFMy.js";import{d1 as t,d3 as n,d4 as r,d6 as i,dA as a,dG as o,dI as s,da as c,db as l,dj as u,dk as d,do as f,ds as p,dv as m,x as h}from"./index-K-hxNScn.js";import{b as g,c as _,d as v,e as y}from"./transformers.web-D42P8ZMr.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=n({__name:`background-remove`,setup(n){let N=a(),P=a(),F=a(),I=a(),L=a(!1),R=a(0),z=a(),B=a(),V=a([]),H=d(()=>V.value.map(e=>URL.createObjectURL(e)));t(async()=>{try{if(!(await h()).supported)throw Error(`WebGPU is not supported in this browser.`);let e=`Xenova/modnet`;g.backends.onnx.wasm.proxy=!1,N.value??=await v.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,n)=>(p(),i(`div`,b,[c(`button`,{bg:`neutral-100 dark:neutral-800`,"w-full":``,"cursor-pointer":``,"rounded-lg":``,"px-3":``,"py-2":``,disabled:L.value,onClick:U},o(L.value?`Processing...`:`Process`),9,x),c(`div`,S,[c(`div`,C,[(p(!0),i(u,null,l(H.value,(e,t)=>(p(),i(`img`,{key:t,src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,w))),128))]),c(`div`,T,[L.value?(p(),i(`div`,E,[c(`div`,D,o(R.value)+`% `,1),c(`div`,O,[c(`div`,{bg:`emerald-500`,"h-full":``,style:s({width:`${R.value}%`}),"transition-all":``,"duration-200":``},null,4)])])):r(``,!0),(p(!0),i(u,null,l(z.value,(e,t)=>(p(),i(`div`,{key:t,relative:``,class:`group`,"h-full":``,"w-full":``},[c(`img`,{src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,k),c(`div`,A,[c(`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)},n[1]||=[c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[c(`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?(p(),i(`div`,M,[c(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,onClick:G},n[2]||=[c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[c(`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)])]),f(m(e),{modelValue:V.value,"onUpdate:modelValue":n[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-ChmJywFT.js b/assets/chat-DAlZ_Wc3.js similarity index 84% rename from assets/chat-ChmJywFT.js rename to assets/chat-DAlZ_Wc3.js index 4fa2695ab1e2a3e25e7b433b87d5ed21cce018d3..85c103722d963dcab0258beedc103d0b5458847c 100644 --- a/assets/chat-ChmJywFT.js +++ b/assets/chat-DAlZ_Wc3.js @@ -1,3 +1,3 @@ -import{E as e,aW as t,cU as n,d4 as r,d8 as i,d9 as a,dB as o,dD as s,dE as c,db as l,df as u,dg as d,dl as f,do as p,dv as m,dy as h}from"./index-BOKBAzT0.js";const g=()=>{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}}}},_=new WeakMap,v=new WeakMap;let y=0,b=0;const x=e=>{let t=`${y++}`,n={debugLabel:e?.debugLabel??t,include:e=>r.has(e),with:i=>{let a=`${b++}`,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),v.set(o,n),o}},r=new WeakSet;_.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},S=e=>typeof e==`object`&&e?_.has(e):!1,C=e=>typeof e==`object`&&e?v.get(e):void 0,w=e=>typeof e==`object`&&!!e&&`data`in e,T=e=>e!=null&&typeof e.then==`function`;function E(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 D.set(t,e),t}var A=class extends TransformStream{constructor(){super({transform:(e,t)=>{C(e)&&t.enqueue(JSON.stringify({data:e.data,uniqueId:C(e).uniqueId})+` +import{B as e,aU as t,cZ as n,d3 as r,d4 as i,d6 as a,dA as o,dF as s,dG as c,da as l,db as u,dg as d,dj as f,ds as p,dv as m,dy as h}from"./index-K-hxNScn.js";const g=()=>{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}}}},_=new WeakMap,v=new WeakMap;let y=0,b=0;const x=e=>{let t=`${y++}`,n={debugLabel:e?.debugLabel??t,include:e=>r.has(e),with:i=>{let a=`${b++}`,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),v.set(o,n),o}},r=new WeakSet;_.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},S=e=>typeof e==`object`&&e?_.has(e):!1,C=e=>typeof e==`object`&&e?v.get(e):void 0,w=e=>typeof e==`object`&&!!e&&`data`in e,T=e=>e!=null&&typeof e.then==`function`;function E(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 D.set(t,e),t}var A=class extends TransformStream{constructor(){super({transform:(e,t)=>{C(e)&&t.enqueue(JSON.stringify({data:e.data,uniqueId:C(e).uniqueId})+` `)}})}},j=class extends TransformStream{#eventMap;constructor(e){super({transform:(e,t)=>{let n=e.split(` -`).map(e=>e.trim()).filter(e=>e.length>0);n.forEach(e=>{let n=JSON.parse(e),r=Object.values(this.#eventMap).find(e=>e.uniqueId===n.uniqueId);if(r){let e=r.with(n.data);t.enqueue(e)}else console.warn(`Unknown event: ${n.uniqueId}`)})}}),this.#eventMap=e}},M=class e extends ReadableStream{#stream;#subscribable;on(e,t){return this.#subscribable.subscribe(n=>{e.include(n)&&t(n)})}constructor(e,t){if(!e&&!t)throw TypeError(`Either subscribable or root stream must be provided`);if(super(),e){this.#subscribable=e;let n;this.#stream=t??new ReadableStream({start:t=>{n=e.subscribe(e=>{t.enqueue(e)})},cancel:()=>{n()}})}else{this.#subscribable=k(),this.#stream=t.pipeThrough(new TransformStream({transform:(e,t)=>{this.#subscribable.publish(e),t.enqueue(e)}}));return}}static fromReadableStream(t){return new e(null,t.pipeThrough(new TransformStream({transform:(e,t)=>{t.enqueue(e)}})))}static fromResponse(t,n){let r=t.body;if(!r)throw Error(`Response body is not readable`);return new e(null,r.pipeThrough(new TextDecoderStream).pipeThrough(new j(n)))}toResponse(e,t=new A){return new Response(this.#stream.pipeThrough(t).pipeThrough(new TextEncoderStream),e)}get locked(){return this.#stream.locked}[Symbol.asyncIterator](){return this.#stream[Symbol.asyncIterator]()}cancel(e){return this.#stream.cancel(e)}getReader(){return this.#stream.getReader()}pipeThrough(t,n){let r=this.#stream.pipeThrough(t,n);return new e(null,r)}pipeTo(e,t){return this.#stream.pipeTo(e,t)}tee(){let[t,n]=this.#stream.tee();return[new e(this.#subscribable,t),new e(this.#subscribable,n)]}forEach(e){return this.#stream.pipeTo(new WritableStream({write:t=>{e(t)}}))}map(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(e(t))}}))}values(e){return this.#stream.values(e)}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):S(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):S(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 N=g();function P(){let e=N.getStore();if(!e)throw Error(`No current context found`);return e}const F=g(),I=new WeakMap,L=({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);F.run(l,()=>{let e=[...new Set([...O(s.__internal__call_context),...O(u.__internal__call_context)])];N.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}T(e)?(l.async=!0,l.pending=e.then(e=>(w(e)&&u.sendEvent(e),e))):w(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=E(e,i);return t.length===e.length}).map(([e,a])=>{let o=E(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=k();s.__internal__call_send_event.subscribe(n=>{let r=I.get(n);for(;r;){if(r===e){t.publish(n);break}r=r.prev}}),n=new M(t,null)}return n},get signal(){return e.abortController.signal},sendEvent:(...n)=>{n.forEach(n=>{I.set(n,e),e.outputs.push(n),t.push(n),s.__internal__call_send_event.publish(n,e),r(e)})},__internal__call_context:k(),__internal__call_send_event:k()}},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},R=()=>{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 L({listeners:e.steps})}}};function z(e,t){let n=(...e)=>{let n=t.filter(([t])=>t.every((t,n)=>t.include(e[n]))).map(([e,t])=>t),r=P(),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=P();return n(t.safeSendEvent,...e)};return e.handle(t,r)},createContext(){let t=e.createContext();return t.__internal__call_context.subscribe((e,t)=>{P().safeSendEvent=n(...e.inputs),t(e)}),t}}}async function B(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 V={flex:``,"flex-col":``,"gap-2":``},H={flex:`~ col`,"gap-2":``},U={flex:``,"flex-col":``,"gap-2":``},W={grid:``,"grid-cols-2":``,"gap-2":``},G={flex:``,"items-center":``,"gap-2":``},K={flex:``,"items-center":``,"gap-2":``},q={flex:``,"items-center":``,"gap-2":``},J={key:0},Y={key:1};var X=i({__name:`chat`,setup(i){let g=t(`settings/llm/baseUrl`,`https://openrouter.ai/api/v1/`),_=t(`settings/llm/apiKey`,``),v=t(`settings/llm/model`,`openai/gpt-4o-mini`),y=s(``),b=s([]),S=s({role:`assistant`,content:``}),C=s(!1),w=x(),T=x(),E=x(),D=x(),O=x();async function k(){C.value=!0;try{let t=z(R(),[[[w],[T,O]],[[T],[E]],[[E],[D]]]);t.handle([w],async()=>{let{sendEvent:n}=t.createContext();S.value={role:`assistant`,content:``},b.value.push({role:`user`,content:y.value}),b.value.push(S.value);let r=await e({baseURL:g.value,apiKey:_.value,model:v.value,messages:b.value.slice(0,b.value.length-1).map(e=>m(e))});for await(let e of r.chunkStream)n(T.with(e.choices[0].delta.content||``));return O.with()}),t.handle([T],async e=>{S.value.content?S.value.content+=e.data:S.value.content=e.data}),await B(t,w.with(),O)}catch(e){console.error(e)}finally{C.value=!1}}return(e,t)=>(r(),l(`div`,V,[u(`div`,H,[u(`div`,U,[t[7]||=u(`div`,null,[u(`span`,{"text-neutral-500":``,"dark:text-neutral-400":``},`LLM`)],-1),u(`div`,W,[u(`label`,G,[t[4]||=u(`span`,{"text-nowrap":``},` Base URL `,-1),f(u(`input`,{"onUpdate:modelValue":t[0]||=e=>o(g)?g.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),[[n,h(g)]])]),u(`label`,K,[t[5]||=u(`span`,{"text-nowrap":``},` API Key `,-1),f(u(`input`,{"onUpdate:modelValue":t[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),[[n,h(_)]])]),u(`label`,q,[t[6]||=u(`span`,{"text-nowrap":``},` Model `,-1),f(u(`input`,{"onUpdate:modelValue":t[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),[[n,h(v)]])])])]),u(`div`,null,[f(u(`textarea`,{"onUpdate:modelValue":t[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),[[n,y.value]])]),u(`button`,{"rounded-lg":``,bg:`blue-100 dark:blue-900`,"px-4":``,"py-2":``,onClick:k},` Send `),u(`div`,null,[(r(!0),l(p,null,d(b.value,(e,t)=>(r(),l(`div`,{key:t},[e.role===`user`?(r(),l(`div`,J,[u(`span`,null,c(e.content),1)])):a(``,!0),e.role===`assistant`?(r(),l(`div`,Y,[u(`span`,null,c(e.content),1)])):a(``,!0)]))),128))])])]))}}),Z=X;export{Z as default}; \ No newline at end of file +`).map(e=>e.trim()).filter(e=>e.length>0);n.forEach(e=>{let n=JSON.parse(e),r=Object.values(this.#eventMap).find(e=>e.uniqueId===n.uniqueId);if(r){let e=r.with(n.data);t.enqueue(e)}else console.warn(`Unknown event: ${n.uniqueId}`)})}}),this.#eventMap=e}},M=class e extends ReadableStream{#stream;#subscribable;on(e,t){return this.#subscribable.subscribe(n=>{e.include(n)&&t(n)})}constructor(e,t){if(!e&&!t)throw TypeError(`Either subscribable or root stream must be provided`);if(super(),e){this.#subscribable=e;let n;this.#stream=t??new ReadableStream({start:t=>{n=e.subscribe(e=>{t.enqueue(e)})},cancel:()=>{n()}})}else{this.#subscribable=k(),this.#stream=t.pipeThrough(new TransformStream({transform:(e,t)=>{this.#subscribable.publish(e),t.enqueue(e)}}));return}}static fromReadableStream(t){return new e(null,t.pipeThrough(new TransformStream({transform:(e,t)=>{t.enqueue(e)}})))}static fromResponse(t,n){let r=t.body;if(!r)throw Error(`Response body is not readable`);return new e(null,r.pipeThrough(new TextDecoderStream).pipeThrough(new j(n)))}toResponse(e,t=new A){return new Response(this.#stream.pipeThrough(t).pipeThrough(new TextEncoderStream),e)}get locked(){return this.#stream.locked}[Symbol.asyncIterator](){return this.#stream[Symbol.asyncIterator]()}cancel(e){return this.#stream.cancel(e)}getReader(){return this.#stream.getReader()}pipeThrough(t,n){let r=this.#stream.pipeThrough(t,n);return new e(null,r)}pipeTo(e,t){return this.#stream.pipeTo(e,t)}tee(){let[t,n]=this.#stream.tee();return[new e(this.#subscribable,t),new e(this.#subscribable,n)]}forEach(e){return this.#stream.pipeTo(new WritableStream({write:t=>{e(t)}}))}map(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(e(t))}}))}values(e){return this.#stream.values(e)}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):S(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):S(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 N=g();function P(){let e=N.getStore();if(!e)throw Error(`No current context found`);return e}const F=g(),I=new WeakMap,L=({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);F.run(l,()=>{let e=[...new Set([...O(s.__internal__call_context),...O(u.__internal__call_context)])];N.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}T(e)?(l.async=!0,l.pending=e.then(e=>(w(e)&&u.sendEvent(e),e))):w(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=E(e,i);return t.length===e.length}).map(([e,a])=>{let o=E(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=k();s.__internal__call_send_event.subscribe(n=>{let r=I.get(n);for(;r;){if(r===e){t.publish(n);break}r=r.prev}}),n=new M(t,null)}return n},get signal(){return e.abortController.signal},sendEvent:(...n)=>{n.forEach(n=>{I.set(n,e),e.outputs.push(n),t.push(n),s.__internal__call_send_event.publish(n,e),r(e)})},__internal__call_context:k(),__internal__call_send_event:k()}},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},R=()=>{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 L({listeners:e.steps})}}};function z(e,t){let n=(...e)=>{let n=t.filter(([t])=>t.every((t,n)=>t.include(e[n]))).map(([e,t])=>t),r=P(),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=P();return n(t.safeSendEvent,...e)};return e.handle(t,r)},createContext(){let t=e.createContext();return t.__internal__call_context.subscribe((e,t)=>{P().safeSendEvent=n(...e.inputs),t(e)}),t}}}async function B(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 V={flex:``,"flex-col":``,"gap-2":``},H={flex:`~ col`,"gap-2":``},U={flex:``,"flex-col":``,"gap-2":``},W={grid:``,"grid-cols-2":``,"gap-2":``},G={flex:``,"items-center":``,"gap-2":``},K={flex:``,"items-center":``,"gap-2":``},q={flex:``,"items-center":``,"gap-2":``},J={key:0},Y={key:1};var X=r({__name:`chat`,setup(r){let g=t(`settings/llm/baseUrl`,`https://openrouter.ai/api/v1/`),_=t(`settings/llm/apiKey`,``),v=t(`settings/llm/model`,`openai/gpt-4o-mini`),y=o(``),b=o([]),S=o({role:`assistant`,content:``}),C=o(!1),w=x(),T=x(),E=x(),D=x(),O=x();async function k(){C.value=!0;try{let t=z(R(),[[[w],[T,O]],[[T],[E]],[[E],[D]]]);t.handle([w],async()=>{let{sendEvent:n}=t.createContext();S.value={role:`assistant`,content:``},b.value.push({role:`user`,content:y.value}),b.value.push(S.value);let r=await e({baseURL:g.value,apiKey:_.value,model:v.value,messages:b.value.slice(0,b.value.length-1).map(e=>s(e))});for await(let e of r.chunkStream)n(T.with(e.choices[0].delta.content||``));return O.with()}),t.handle([T],async e=>{S.value.content?S.value.content+=e.data:S.value.content=e.data}),await B(t,w.with(),O)}catch(e){console.error(e)}finally{C.value=!1}}return(e,t)=>(p(),a(`div`,V,[l(`div`,H,[l(`div`,U,[t[7]||=l(`div`,null,[l(`span`,{"text-neutral-500":``,"dark:text-neutral-400":``},`LLM`)],-1),l(`div`,W,[l(`label`,G,[t[4]||=l(`span`,{"text-nowrap":``},` Base URL `,-1),d(l(`input`,{"onUpdate:modelValue":t[0]||=e=>h(g)?g.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),[[n,m(g)]])]),l(`label`,K,[t[5]||=l(`span`,{"text-nowrap":``},` API Key `,-1),d(l(`input`,{"onUpdate:modelValue":t[1]||=e=>h(_)?_.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),[[n,m(_)]])]),l(`label`,q,[t[6]||=l(`span`,{"text-nowrap":``},` Model `,-1),d(l(`input`,{"onUpdate:modelValue":t[2]||=e=>h(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),[[n,m(v)]])])])]),l(`div`,null,[d(l(`textarea`,{"onUpdate:modelValue":t[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),[[n,y.value]])]),l(`button`,{"rounded-lg":``,bg:`blue-100 dark:blue-900`,"px-4":``,"py-2":``,onClick:k},` Send `),l(`div`,null,[(p(!0),a(f,null,u(b.value,(e,t)=>(p(),a(`div`,{key:t},[e.role===`user`?(p(),a(`div`,J,[l(`span`,null,c(e.content),1)])):i(``,!0),e.role===`assistant`?(p(),a(`div`,Y,[l(`span`,null,c(e.content),1)])):i(``,!0)]))),128))])])]))}}),Z=X;export{Z as default}; \ No newline at end of file diff --git a/assets/cloudflare-workers-ai-DvT5X7zi.js b/assets/cloudflare-workers-ai-DvT5X7zi.js new file mode 100644 index 0000000000000000000000000000000000000000..1e06d945c938d78838e557258269b8390c36ea2b --- /dev/null +++ b/assets/cloudflare-workers-ai-DvT5X7zi.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a2 as r,a3 as i,a5 as a,aG as o,aL as s,d1 as c,d3 as l,d5 as u,dd as d,dk as f,do as p,dq as m,ds as h,dv as g,w as _}from"./index-K-hxNScn.js";import{b as v}from"./route-block-D_qNAUXY.js";const y=`cloudflare-workers-ai`;var b=l({__name:`cloudflare-workers-ai`,setup(l){let{t:v}=i(),b=o(),x=_(),{providers:S}=s(x),C=f(()=>x.getProviderMetadata(y)),w=f({get:()=>S.value[y]?.apiKey||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=f({get:()=>S.value[y]?.accountId||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});c(()=>{x.initializeProvider(y),w.value=S.value[y]?.apiKey||``,T.value=S.value[y]?.accountId||``}),m([w,T],()=>{S.value[y]={...S.value[y],apiKey:w.value,accountId:T.value}});function E(){S.value[y]={...C.value?.defaultOptions}}return(i,o)=>(h(),d(g(t),{"provider-name":C.value?.localizedName,"provider-icon-color":C.value?.iconColor,"on-back":()=>g(b).back()},{default:u(()=>[p(g(n),null,{default:u(()=>[p(g(e),{title:g(v)(`settings.pages.providers.common.section.basic.title`),description:g(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:u(()=>[p(g(r),{modelValue:w.value,"onUpdate:modelValue":o[0]||=e=>w.value=e,"provider-name":C.value?.localizedName,placeholder:g(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),p(g(a),{modelValue:T.value,"onUpdate:modelValue":o[1]||=e=>T.value=e,label:g(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:g(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:g(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/cloudflare-workers-ai-MVAb5rND.js b/assets/cloudflare-workers-ai-MVAb5rND.js deleted file mode 100644 index e2a1362646c3ba0962264413793ffef219b5b638..0000000000000000000000000000000000000000 --- a/assets/cloudflare-workers-ai-MVAb5rND.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a5 as r,a6 as i,a8 as a,aG as o,aL as s,d0 as c,d2 as l,d4 as u,d6 as d,d8 as f,da as p,di as m,dp as h,dy as g,z as _}from"./index-BOKBAzT0.js";import{b as v}from"./route-block-D_qNAUXY.js";const y=`cloudflare-workers-ai`;var b=f({__name:`cloudflare-workers-ai`,setup(f){let{t:v}=i(),b=o(),x=_(),{providers:S}=s(x),C=h(()=>x.getProviderMetadata(y)),w=h({get:()=>S.value[y]?.apiKey||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=h({get:()=>S.value[y]?.accountId||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});d(()=>{x.initializeProvider(y),w.value=S.value[y]?.apiKey||``,T.value=S.value[y]?.accountId||``}),l([w,T],()=>{S.value[y]={...S.value[y],apiKey:w.value,accountId:T.value}});function E(){S.value[y]={...C.value?.defaultOptions}}return(i,o)=>(u(),m(g(e),{"provider-name":C.value?.localizedName,"provider-icon-color":C.value?.iconColor,"on-back":()=>g(b).back()},{default:p(()=>[c(g(t),null,{default:p(()=>[c(g(n),{title:g(v)(`settings.pages.providers.common.section.basic.title`),description:g(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:p(()=>[c(g(r),{modelValue:w.value,"onUpdate:modelValue":o[0]||=e=>w.value=e,"provider-name":C.value?.localizedName,placeholder:g(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),c(g(a),{modelValue:T.value,"onUpdate:modelValue":o[1]||=e=>T.value=e,label:g(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:g(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:g(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-CwgGX5qJ.js b/assets/color-scheme-jmrpTVHV.js similarity index 50% rename from assets/color-scheme-CwgGX5qJ.js rename to assets/color-scheme-jmrpTVHV.js index e05458a7bb2117ac4c8332b93130528f3e19cd5e..16faf10003473a3d10fff4585b373c8e7fb78a66 100644 --- a/assets/color-scheme-CwgGX5qJ.js +++ b/assets/color-scheme-jmrpTVHV.js @@ -1 +1 @@ -import{a6 as e,aE as t,ai as n,am as r,c as i,cZ as a,d0 as o,d3 as s,d4 as c,d5 as l,d8 as u,dE as d,da as f,db as p,df as m,dg as h,di as g,dl as _,do as v,dy as y,t as b}from"./index-BOKBAzT0.js";import{b as x}from"./route-block-D_qNAUXY.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=u({__name:`color-scheme`,setup(t){let u=b(),{t:x}=e();return(e,t)=>{let b=s(`motion`);return c(),p(v,null,[_((c(),g(y(n),{"mb-2":``,title:y(x)(`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:f(()=>[_((c(),p(`div`,C,[m(`span`,w,d(e.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),m(`label`,T,[_(m(`input`,{"onUpdate:modelValue":t[0]||=e=>y(u).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[a,y(u).themeColorsHueDynamic]]),t[2]||=m(`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),l(` `+d(e.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[b]]),_(o(y(r),{modelValue:y(u).themeColorsHue,"onUpdate:modelValue":t[1]||=e=>y(u).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:6*50,disabled:y(u).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[b]]),_((c(),p(`div`,E,[t[4]||=m(`span`,{"bg-primary-50":``},`50`,-1),t[5]||=m(`span`,{"bg-primary-100":``},`100`,-1),t[6]||=m(`span`,{"bg-primary-200":``},`200`,-1),t[7]||=m(`span`,{"bg-primary-300":``},`300`,-1),t[8]||=m(`span`,{"bg-primary-400":``},`400`,-1),t[9]||=m(`span`,{"bg-primary-500":``},`500`,-1),_((c(),p(`div`,D,t[3]||=[m(`span`,{"bg-primary-600":``},`600`,-1),m(`span`,{"bg-primary-700":``},`700`,-1),m(`span`,{"bg-primary-800":``},`800`,-1),m(`span`,{"bg-primary-900":``},`900`,-1),m(`span`,{"bg-primary-950":``},`950`,-1)])),[[b]])])),[[b]]),_((c(),p(`div`,O,t[10]||=[m(`span`,{bg:`primary-500/5`},`500/5`,-1),m(`span`,{bg:`primary-500/10`},`500/10`,-1),m(`span`,{bg:`primary-500/20`},`500/20`,-1),m(`span`,{bg:`primary-500/30`},`500/30`,-1),m(`span`,{bg:`primary-500/40`},`500/40`,-1),m(`span`,{bg:`primary-500/50`},`500/50`,-1),m(`span`,{bg:`primary-500/60`},`500/60`,-1),m(`span`,{bg:`primary-500/70`},`500/70`,-1),m(`span`,{bg:`primary-500/80`},`500/80`,-1),m(`span`,{bg:`primary-500/90`},`500/90`,-1),m(`span`,{bg:`primary-500`},`500`,-1)])),[[b]])]),_:1},8,[`title`])),[[b]]),_((c(),g(y(n),{"mb-2":``,title:y(x)(`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:f(()=>[(c(!0),p(v,null,h(e.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:t,description:n,colors:r},a)=>_((c(),p(`div`,{key:a,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+a*10,delay:11*50+a*50,transition:`all ease-in-out duration-250`},[m(`div`,null,[m(`span`,A,d(e.$rt(t)),1),m(`div`,j,d(e.$rt(n)),1)]),o(y(i),{colors:r.map((t,n)=>({hex:y(S)[a][n],name:e.$rt(t)}))},null,8,[`colors`])],8,k)),[[b]])),128))]),_:1},8,[`title`])),[[b]]),_((c(),p(`div`,M,t[11]||=[m(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[b]])],64)}}});typeof x==`function`&&x(N);var P=t(N,[[`__scopeId`,`data-v-190d7273`]]);export{P as default}; \ No newline at end of file +import{a3 as e,aE as t,af as n,aj as r,b as i,cW as a,d0 as o,d3 as s,d5 as c,d6 as l,dG as u,da as d,db as f,dd as p,dg as m,dj as h,do as g,dr as _,ds as v,dv as y,q as b}from"./index-K-hxNScn.js";import{b as x}from"./route-block-D_qNAUXY.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=b(),{t:x}=e();return(e,t)=>{let b=_(`motion`);return v(),l(h,null,[m((v(),p(y(n),{"mb-2":``,title:y(x)(`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:c(()=>[m((v(),l(`div`,C,[d(`span`,w,u(e.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),d(`label`,T,[m(d(`input`,{"onUpdate:modelValue":t[0]||=e=>y(s).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[a,y(s).themeColorsHueDynamic]]),t[2]||=d(`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),o(` `+u(e.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[b]]),m(g(y(r),{modelValue:y(s).themeColorsHue,"onUpdate:modelValue":t[1]||=e=>y(s).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:6*50,disabled:y(s).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[b]]),m((v(),l(`div`,E,[t[4]||=d(`span`,{"bg-primary-50":``},`50`,-1),t[5]||=d(`span`,{"bg-primary-100":``},`100`,-1),t[6]||=d(`span`,{"bg-primary-200":``},`200`,-1),t[7]||=d(`span`,{"bg-primary-300":``},`300`,-1),t[8]||=d(`span`,{"bg-primary-400":``},`400`,-1),t[9]||=d(`span`,{"bg-primary-500":``},`500`,-1),m((v(),l(`div`,D,t[3]||=[d(`span`,{"bg-primary-600":``},`600`,-1),d(`span`,{"bg-primary-700":``},`700`,-1),d(`span`,{"bg-primary-800":``},`800`,-1),d(`span`,{"bg-primary-900":``},`900`,-1),d(`span`,{"bg-primary-950":``},`950`,-1)])),[[b]])])),[[b]]),m((v(),l(`div`,O,t[10]||=[d(`span`,{bg:`primary-500/5`},`500/5`,-1),d(`span`,{bg:`primary-500/10`},`500/10`,-1),d(`span`,{bg:`primary-500/20`},`500/20`,-1),d(`span`,{bg:`primary-500/30`},`500/30`,-1),d(`span`,{bg:`primary-500/40`},`500/40`,-1),d(`span`,{bg:`primary-500/50`},`500/50`,-1),d(`span`,{bg:`primary-500/60`},`500/60`,-1),d(`span`,{bg:`primary-500/70`},`500/70`,-1),d(`span`,{bg:`primary-500/80`},`500/80`,-1),d(`span`,{bg:`primary-500/90`},`500/90`,-1),d(`span`,{bg:`primary-500`},`500`,-1)])),[[b]])]),_:1},8,[`title`])),[[b]]),m((v(),p(y(n),{"mb-2":``,title:y(x)(`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:c(()=>[(v(!0),l(h,null,f(e.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:t,description:n,colors:r},a)=>m((v(),l(`div`,{key:a,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+a*10,delay:11*50+a*50,transition:`all ease-in-out duration-250`},[d(`div`,null,[d(`span`,A,u(e.$rt(t)),1),d(`div`,j,u(e.$rt(n)),1)]),g(y(i),{colors:r.map((t,n)=>({hex:y(S)[a][n],name:e.$rt(t)}))},null,8,[`colors`])],8,k)),[[b]])),128))]),_:1},8,[`title`])),[[b]]),m((v(),l(`div`,M,t[11]||=[d(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[b]])],64)}}});typeof x==`function`&&x(N);var P=t(N,[[`__scopeId`,`data-v-190d7273`]]);export{P as default}; \ No newline at end of file diff --git a/assets/consciousness-Em-15uM5.js b/assets/consciousness-DOb7L0Yh.js similarity index 50% rename from assets/consciousness-Em-15uM5.js rename to assets/consciousness-DOb7L0Yh.js index 30bff7b5c910de012bc1eaffa3ce81129313ac30..3006cc8c03ea9186aa2b3e75337465dd17f30df3 100644 --- a/assets/consciousness-Em-15uM5.js +++ b/assets/consciousness-DOb7L0Yh.js @@ -1 +1 @@ -import{a6 as e,aI as t,aL as n,ae as r,af as ee,cU as te,d0 as ne,d3 as re,d4 as i,d6 as a,d8 as ie,d9 as o,dB as s,dE as c,da as ae,db as l,df as u,dg as oe,di as d,dl as f,do as p,dy as m,y as se,z as ce}from"./index-BOKBAzT0.js";import{b as h}from"./route-block-D_qNAUXY.js";const le={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`},F={key:1},ue={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=ie({__name:`consciousness`,setup(ie){let h=ce(),W=se(),{configuredChatProvidersMetadata:G}=n(h),{activeProvider:K,activeModel:q,customModelName:pe,modelSearchQuery:J,supportsModelListing:Y,providerModels:X,isLoadingActiveProviderModels:Z,activeProviderModelError:Q}=n(W),{t:$}=e();a(async()=>{await W.loadModelsForProvider(K.value)});function me(e){pe.value=e}return(e,n)=>{let a=re(`motion`);return i(),l(p,null,[u(`div`,le,[u(`div`,null,[u(`div`,g,[u(`div`,null,[u(`h2`,_,c(m($)(`settings.pages.providers.title`)),1),u(`div`,v,[u(`span`,null,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),u(`div`,y,[m(G).length>0?(i(),l(`fieldset`,b,[(i(!0),l(p,null,oe(m(G),e=>(i(),d(m(r),{id:e.id,key:e.id,modelValue:m(K),"onUpdate:modelValue":n[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))])):(i(),l(`div`,x,[ne(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:ae(()=>n[4]||=[u(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),u(`div`,{class:`flex flex-col`},[u(`span`,{class:`font-medium`},`No Providers Configured`),u(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),u(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[4]})]))])])]),m(K)&&m(Y)?(i(),l(`div`,S,[u(`div`,C,[u(`div`,null,[u(`h2`,w,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),u(`div`,T,[u(`span`,null,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),m(Z)?(i(),l(`div`,E,[n[5]||=u(`div`,{class:`mr-2 animate-spin`},[u(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),u(`span`,null,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):m(Q)?(i(),l(`div`,D,[n[6]||=u(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),u(`div`,O,[u(`span`,k,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),u(`span`,A,c(m(Q)),1)])])):m(X).length===0&&!m(Z)?(i(),l(`div`,j,[n[7]||=u(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),u(`div`,M,[u(`span`,N,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),u(`span`,P,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):m(X).length>0?(i(),d(m(ee),{key:3,modelValue:m(q),"onUpdate:modelValue":n[1]||=e=>s(q)?q.value=e:null,"search-query":m(J),"onUpdate:searchQuery":n[2]||=e=>s(J)?J.value=e:null,items:m(X).sort((e,t)=>e.id===m(q)?-1:t.id===m(q)?1:0),searchable:!0,"search-placeholder":m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:m(J)}),"search-results-text":m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":m($)(`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`])):o(``,!0)])])):m(K)&&!m(Y)?(i(),l(`div`,F,[u(`div`,ue,[u(`div`,null,[u(`h2`,I,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),u(`div`,L,[u(`span`,null,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),u(`div`,R,[n[8]||=u(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),u(`div`,z,[u(`span`,B,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),u(`span`,V,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),u(`div`,H,[u(`label`,U,c(m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),f(u(`input`,{"onUpdate:modelValue":n[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:m($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,de),[[te,m(q)]])])])])):o(``,!0)]),f((i(),l(`div`,fe,n[9]||=[u(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[a]])],64)}}});typeof h==`function`&&h(W);var G=W;export{G as default}; \ No newline at end of file +import{a3 as e,aI as t,aL as n,ab as ee,ac as te,cZ as ne,d1 as r,d3 as re,d4 as i,d5 as a,d6 as o,dG as s,da as c,db as ie,dd as l,dg as u,dj as d,do as ae,dr as oe,ds as f,dv as p,dy as m,v as se,w as ce}from"./index-K-hxNScn.js";import{b as h}from"./route-block-D_qNAUXY.js";const le={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`},F={key:1},ue={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=re({__name:`consciousness`,setup(re){let h=ce(),W=se(),{configuredChatProvidersMetadata:G}=n(h),{activeProvider:K,activeModel:q,customModelName:pe,modelSearchQuery:J,supportsModelListing:Y,providerModels:X,isLoadingActiveProviderModels:Z,activeProviderModelError:Q}=n(W),{t:$}=e();r(async()=>{await W.loadModelsForProvider(K.value)});function me(e){pe.value=e}return(e,n)=>{let r=oe(`motion`);return f(),o(d,null,[c(`div`,le,[c(`div`,null,[c(`div`,g,[c(`div`,null,[c(`h2`,_,s(p($)(`settings.pages.providers.title`)),1),c(`div`,v,[c(`span`,null,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),c(`div`,y,[p(G).length>0?(f(),o(`fieldset`,b,[(f(!0),o(d,null,ie(p(G),e=>(f(),l(p(ee),{id:e.id,key:e.id,modelValue:p(K),"onUpdate:modelValue":n[0]||=e=>m(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))])):(f(),o(`div`,x,[ae(p(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:a(()=>n[4]||=[c(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),c(`div`,{class:`flex flex-col`},[c(`span`,{class:`font-medium`},`No Providers Configured`),c(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),c(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[4]})]))])])]),p(K)&&p(Y)?(f(),o(`div`,S,[c(`div`,C,[c(`div`,null,[c(`h2`,w,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),c(`div`,T,[c(`span`,null,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),p(Z)?(f(),o(`div`,E,[n[5]||=c(`div`,{class:`mr-2 animate-spin`},[c(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),c(`span`,null,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):p(Q)?(f(),o(`div`,D,[n[6]||=c(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),c(`div`,O,[c(`span`,k,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),c(`span`,A,s(p(Q)),1)])])):p(X).length===0&&!p(Z)?(f(),o(`div`,j,[n[7]||=c(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),c(`div`,M,[c(`span`,N,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),c(`span`,P,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):p(X).length>0?(f(),l(p(te),{key:3,modelValue:p(q),"onUpdate:modelValue":n[1]||=e=>m(q)?q.value=e:null,"search-query":p(J),"onUpdate:searchQuery":n[2]||=e=>m(J)?J.value=e:null,items:p(X).sort((e,t)=>e.id===p(q)?-1:t.id===p(q)?1:0),searchable:!0,"search-placeholder":p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:p(J)}),"search-results-text":p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":p($)(`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)])])):p(K)&&!p(Y)?(f(),o(`div`,F,[c(`div`,ue,[c(`div`,null,[c(`h2`,I,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),c(`div`,L,[c(`span`,null,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),c(`div`,R,[n[8]||=c(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),c(`div`,z,[c(`span`,B,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),c(`span`,V,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),c(`div`,H,[c(`label`,U,s(p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),u(c(`input`,{"onUpdate:modelValue":n[3]||=e=>m(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:p($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,de),[[ne,p(q)]])])])])):i(``,!0)]),u((f(),o(`div`,fe,n[9]||=[c(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[r]])],64)}}});typeof h==`function`&&h(W);var G=W;export{G as default}; \ No newline at end of file diff --git a/assets/deepseek-BlRSY_Z0.js b/assets/deepseek-BlRSY_Z0.js deleted file mode 100644 index ad4c6918ea58fa16d04f59617c030c90fd1ebdac..0000000000000000000000000000000000000000 --- a/assets/deepseek-BlRSY_Z0.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`deepseek`;var x=p({__name:`deepseek`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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/deepseek-BrvbO56H.js b/assets/deepseek-BrvbO56H.js new file mode 100644 index 0000000000000000000000000000000000000000..b2a0190b63869c51ab9cad2530f13e82b7b18ae9 --- /dev/null +++ b/assets/deepseek-BrvbO56H.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`deepseek`;var x=u({__name:`deepseek`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),h([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-Bwh18mCX.js b/assets/default-BcIEAl0a.js similarity index 51% rename from assets/default-Bwh18mCX.js rename to assets/default-BcIEAl0a.js index 754ac75d3e6edb2678804b3f511ead3d3a53c2b8..cf79ae37b4a9fc9a399a3dc76dd8c4c304dd9b0b 100644 --- a/assets/default-Bwh18mCX.js +++ b/assets/default-BcIEAl0a.js @@ -1 +1 @@ -import{aJ as e,d0 as t,d4 as n,d8 as r,db as i,df as a,dy as o}from"./index-BOKBAzT0.js";import{b as s}from"./HeaderLink-DoEHmasi.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=r({__name:`default`,setup(r){return(r,d)=>(n(),i(`div`,c,[a(`div`,l,[t(s)]),a(`div`,u,[t(o(e))])]))}}),f=d;export{f as default}; \ No newline at end of file +import{aJ as e,d3 as t,d6 as n,da as r,do as i,ds as a,dv as o}from"./index-K-hxNScn.js";import{b as s}from"./HeaderLink-DJwpVSTp.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=t({__name:`default`,setup(t){return(t,d)=>(a(),n(`div`,c,[r(`div`,l,[i(s)]),r(`div`,u,[i(o(e))])]))}}),f=d;export{f as default}; \ No newline at end of file diff --git a/assets/default-node-C2t2tqcG.js b/assets/default-node-me4M3cN3.js similarity index 64% rename from assets/default-node-C2t2tqcG.js rename to assets/default-node-me4M3cN3.js index 4374e1add87fe186a3dc472843b6866096061589..5d419cc9a02af9dea5a0dc122bb3ea6af757d017 100644 --- a/assets/default-node-C2t2tqcG.js +++ b/assets/default-node-me4M3cN3.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-Dcc0vk0T.js","assets/index-BOKBAzT0.js","assets/index-CsNim-Yi.css"])))=>i.map(i=>d[i]); -import{aK as e,dJ as t}from"./index-BOKBAzT0.js";async function n(){let{createRequire:n}=await e(async()=>{let{createRequire:e}=await import(`./__vite-browser-external-Dcc0vk0T.js`).then(t(1));return{createRequire:e}},__vite__mapDeps([0,1,2])),{dirname:r,resolve:i}=await e(async()=>{let{dirname:e,resolve:n}=await import(`./__vite-browser-external-Dcc0vk0T.js`).then(t(1));return{dirname:e,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-Dm87haFe.js","assets/index-K-hxNScn.js","assets/index-DMI81gkc.css"])))=>i.map(i=>d[i]); +import{aK as e,dL as t}from"./index-K-hxNScn.js";async function n(){let{createRequire:n}=await e(async()=>{let{createRequire:e}=await import(`./__vite-browser-external-Dm87haFe.js`).then(t(1));return{createRequire:e}},__vite__mapDeps([0,1,2])),{dirname:r,resolve:i}=await e(async()=>{let{dirname:e,resolve:n}=await import(`./__vite-browser-external-Dm87haFe.js`).then(t(1));return{dirname:e,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-BYTPS79J.js b/assets/delays-BYTPS79J.js deleted file mode 100644 index f0fe7cdef71d930b67f90f475dc8ef43660389f1..0000000000000000000000000000000000000000 --- a/assets/delays-BYTPS79J.js +++ /dev/null @@ -1 +0,0 @@ -import"./Basic-6PI1-eSd.js";import{b as e}from"./Textarea-vIof96sl.js";import{S as t,ax as n,d0 as r,d4 as i,d8 as a,dD as o,dE as s,db as c,df as l,dg as u,do as d,dy as f}from"./index-BOKBAzT0.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=a({__name:`delays`,setup(a){let y=o(``),b=o([]),x=o([]),S=o(!1),C=t();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(n),y.value=``,S.value=!1}return(t,n)=>(i(),c(`div`,p,[l(`div`,m,[r(f(e),{modelValue:y.value,"onUpdate:modelValue":n[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`]),l(`button`,h,s(S.value?`Processing...`:`Send`),1)]),l(`div`,g,[l(`div`,_,[n[1]||=l(`h3`,{"font-normal":``},` Emotion Message `,-1),(i(!0),c(d,null,u(b.value,e=>(i(),c(`div`,{key:e},[l(`div`,null,s(e),1)]))),128))]),l(`div`,v,[n[2]||=l(`h3`,{"font-normal":``},` Delays `,-1),(i(!0),c(d,null,u(x.value,e=>(i(),c(`div`,{key:e},[l(`div`,null,s(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/delays-hZ_G3T9g.js b/assets/delays-hZ_G3T9g.js new file mode 100644 index 0000000000000000000000000000000000000000..a69738c3c652ad42cf88f58abde7bcc1dcf071ec --- /dev/null +++ b/assets/delays-hZ_G3T9g.js @@ -0,0 +1 @@ +import"./Basic-1H4d_HIg.js";import{b as e}from"./Textarea-Bzx3P1JU.js";import{P as t,av as n,d3 as r,d6 as i,dA as a,dG as o,da as s,db as c,dj as l,do as u,ds as d,dv as f}from"./index-K-hxNScn.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=r({__name:`delays`,setup(r){let y=a(``),b=a([]),x=a([]),S=a(!1),C=t();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(n),y.value=``,S.value=!1}return(t,n)=>(d(),i(`div`,p,[s(`div`,m,[u(f(e),{modelValue:y.value,"onUpdate:modelValue":n[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`]),s(`button`,h,o(S.value?`Processing...`:`Send`),1)]),s(`div`,g,[s(`div`,_,[n[1]||=s(`h3`,{"font-normal":``},` Emotion Message `,-1),(d(!0),i(l,null,c(b.value,e=>(d(),i(`div`,{key:e},[s(`div`,null,o(e),1)]))),128))]),s(`div`,v,[n[2]||=s(`h3`,{"font-normal":``},` Delays `,-1),(d(!0),i(l,null,c(x.value,e=>(d(),i(`div`,{key:e},[s(`div`,null,o(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/developer-BQaCIb5y.js b/assets/developer-CCqYxIcY.js similarity index 52% rename from assets/developer-BQaCIb5y.js rename to assets/developer-CCqYxIcY.js index 94a6950880db6b77aaa2e1e2e2adce00b72ffad1..790c71244ec0727ebee01aafd9bc3704cd094837 100644 --- a/assets/developer-BQaCIb5y.js +++ b/assets/developer-CCqYxIcY.js @@ -1 +1 @@ -import{cV as e,cZ as t,d0 as n,d3 as r,d4 as i,d5 as a,d8 as o,d9 as s,dE as c,dF as l,da as u,db as d,de as f,df as p,dj as m,dl as h,do as g,dy as _,t as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.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=o({__name:`CheckBar`,props:f({text:{},iconOn:{},iconOff:{},description:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(r){let o=m(r,`modelValue`);return(r,f)=>(i(),d(`label`,b,[h(p(`input`,{"onUpdate:modelValue":f[0]||=e=>o.value=e,"aria-checked":o.value,type:`checkbox`,hidden:``},null,8,x),[[t,o.value]]),p(`div`,null,[a(c(r.$t(r.text))+` `,1),r.description?(i(),d(`div`,S,c(r.$t(r.description)),1)):s(``,!0)]),n(e,{name:`slide-away`,mode:`out-in`},{default:u(()=>[o.value?(i(),d(`div`,{key:0,class:l(r.iconOn),transition:`all ease-in-out duration-250`},null,2)):(i(),d(`div`,{key:1,class:l(r.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=o({__name:`developer`,setup(e){let t=v();return(e,a)=>{let o=r(`motion`);return i(),d(g,null,[h(n(w,{modelValue:_(t).disableTransitions,"onUpdate:modelValue":a[0]||=e=>_(t).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`]),[[o]]),h(n(w,{modelValue:_(t).usePageSpecificTransitions,"onUpdate:modelValue":a[1]||=e=>_(t).usePageSpecificTransitions=e,disabled:_(t).disableTransitions,"icon-on":`i-solar:running-2-line-duotone`,"icon-off":`i-solar:people-nearby-bold-duotone`,text:`settings.animations.use-page-specific-transitions.title`,description:`settings.animations.use-page-specific-transitions.description`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:450,delay:20*50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[o]]),h((i(),d(`div`,T,a[2]||=[p(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[o]])],64)}}});typeof y==`function`&&y(E);var D=E;export{D as default}; \ No newline at end of file +import{cW as e,cY as t,d0 as n,d3 as r,d4 as i,d5 as a,d6 as o,d9 as s,dG as c,dH as l,da as u,de as d,dg as f,dj as p,do as m,dr as h,ds as g,dv as _,q as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.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=r({__name:`CheckBar`,props:s({text:{},iconOn:{},iconOff:{},description:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(r){let s=d(r,`modelValue`);return(r,d)=>(g(),o(`label`,b,[f(u(`input`,{"onUpdate:modelValue":d[0]||=e=>s.value=e,"aria-checked":s.value,type:`checkbox`,hidden:``},null,8,x),[[e,s.value]]),u(`div`,null,[n(c(r.$t(r.text))+` `,1),r.description?(g(),o(`div`,S,c(r.$t(r.description)),1)):i(``,!0)]),m(t,{name:`slide-away`,mode:`out-in`},{default:a(()=>[s.value?(g(),o(`div`,{key:0,class:l(r.iconOn),transition:`all ease-in-out duration-250`},null,2)):(g(),o(`div`,{key:1,class:l(r.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=r({__name:`developer`,setup(e){let t=v();return(e,n)=>{let r=h(`motion`);return g(),o(p,null,[f(m(w,{modelValue:_(t).disableTransitions,"onUpdate:modelValue":n[0]||=e=>_(t).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`]),[[r]]),f(m(w,{modelValue:_(t).usePageSpecificTransitions,"onUpdate:modelValue":n[1]||=e=>_(t).usePageSpecificTransitions=e,disabled:_(t).disableTransitions,"icon-on":`i-solar:running-2-line-duotone`,"icon-off":`i-solar:people-nearby-bold-duotone`,text:`settings.animations.use-page-specific-transitions.title`,description:`settings.animations.use-page-specific-transitions.description`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:450,delay:20*50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[r]]),f((g(),o(`div`,T,n[2]||=[u(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[r]])],64)}}});typeof y==`function`&&y(E);var D=E;export{D as default}; \ No newline at end of file diff --git a/assets/effect-DBSVVF8G-CH9BzHgp.js b/assets/effect-DBSVVF8G-BdFsO4ps.js similarity index 72% rename from assets/effect-DBSVVF8G-CH9BzHgp.js rename to assets/effect-DBSVVF8G-BdFsO4ps.js index 6e77ff6307fe53bf5e87ab17ce9081f2ab63a90f..8b4eafce637f3b20f298b10bc8f621ef009ec8d3 100644 --- a/assets/effect-DBSVVF8G-CH9BzHgp.js +++ b/assets/effect-DBSVVF8G-BdFsO4ps.js @@ -1 +1 @@ -import{D as e,aK as t}from"./index-BOKBAzT0.js";const n=async()=>{let{JSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_effect_xsschema-Cr0zYJs-.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{A as e,aK as t}from"./index-K-hxNScn.js";const n=async()=>{let{JSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_effect_xsschema-Cr0zYJs-.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/elevenlabs-C8CGb9J2.js b/assets/elevenlabs-B1MqPQr8.js similarity index 61% rename from assets/elevenlabs-C8CGb9J2.js rename to assets/elevenlabs-B1MqPQr8.js index fa907715f557d32bea8ffdbccbbdd13de4f74540..ee345242cd29aeb3e9619c6d043b2aeeb163e71f 100644 --- a/assets/elevenlabs-C8CGb9J2.js +++ b/assets/elevenlabs-B1MqPQr8.js @@ -1 +1 @@ -import{$ as e,a6 as t,aL as n,ap as r,as as i,d0 as a,d2 as o,d4 as s,d6 as c,d8 as l,dD as u,da as d,df as f,di as p,dp as m,dy as h,s as g,x as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=l({__name:`elevenlabs`,setup(l){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=u(0),w=u(1),T=u(0),E=u(0),D=u(.5),O=u(.75),k=u(!1),A=_(),j=v(),{providers:M}=n(j),{t:N}=t(),P=m(()=>!!M.value[x]?.apiKey),F=m(()=>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 c(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)}),o(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),o(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),o(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),o(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),o(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),o(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),o(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),o(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}),(t,n)=>(s(),p(h(g),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":d(()=>[f(`div`,b,[a(h(r),{modelValue:C.value,"onUpdate:modelValue":n[0]||=e=>C.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:h(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`]),a(h(r),{modelValue:w.value,"onUpdate:modelValue":n[1]||=e=>w.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),a(h(r),{modelValue:T.value,"onUpdate:modelValue":n[2]||=e=>T.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:h(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`]),a(h(r),{modelValue:E.value,"onUpdate:modelValue":n[3]||=e=>E.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),a(h(r),{modelValue:D.value,"onUpdate:modelValue":n[4]||=e=>D.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),a(h(r),{modelValue:O.value,"onUpdate:modelValue":n[5]||=e=>O.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),a(h(i),{modelValue:k.value,"onUpdate:modelValue":n[6]||=e=>k.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:d(()=>[a(h(e),{"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{Y as e,a3 as t,aL as n,am as r,aq as i,d1 as a,d3 as o,d5 as s,dA as c,da as l,dd as u,dk as d,do as f,dq as p,ds as m,dv as h,p as g,u as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=o({__name:`elevenlabs`,setup(o){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=c(0),w=c(1),T=c(0),E=c(0),D=c(.5),O=c(.75),k=c(!1),A=_(),j=v(),{providers:M}=n(j),{t:N}=t(),P=d(()=>!!M.value[x]?.apiKey),F=d(()=>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)}),p(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),p(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),p(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),p(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),p(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),p(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),p(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),p(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}),(t,n)=>(m(),u(h(g),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":s(()=>[l(`div`,b,[f(h(r),{modelValue:C.value,"onUpdate:modelValue":n[0]||=e=>C.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:h(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`]),f(h(r),{modelValue:w.value,"onUpdate:modelValue":n[1]||=e=>w.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),f(h(r),{modelValue:T.value,"onUpdate:modelValue":n[2]||=e=>T.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:h(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`]),f(h(r),{modelValue:E.value,"onUpdate:modelValue":n[3]||=e=>E.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),f(h(r),{modelValue:D.value,"onUpdate:modelValue":n[4]||=e=>D.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),f(h(r),{modelValue:O.value,"onUpdate:modelValue":n[5]||=e=>O.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),f(h(i),{modelValue:k.value,"onUpdate:modelValue":n[6]||=e=>k.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:s(()=>[f(h(e),{"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-CYtEYKmx.js b/assets/emotions-CYtEYKmx.js deleted file mode 100644 index 5d00bee6319b22a643001964f2b96f4ef6700b58..0000000000000000000000000000000000000000 --- a/assets/emotions-CYtEYKmx.js +++ /dev/null @@ -1 +0,0 @@ -import"./Basic-6PI1-eSd.js";import{b as e}from"./Textarea-vIof96sl.js";import{R as t,T as n,ax as r,d0 as i,d4 as a,d8 as o,dD as s,dE as c,db as l,df as u,dg as d,do as f,dy as p}from"./index-BOKBAzT0.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=o({__name:`emotions`,setup(o){let b=s(``),x=s([]),S=s([]),C=s(!1),w=n({handlers:[async e=>{S.value.push(e.data)}]}),T=t(w);function E(){C.value=!0;let e=b.value.split(``);for(let t of e)T.add(t);T.add(r),b.value=``,C.value=!1}return(t,n)=>(a(),l(`div`,m,[u(`div`,h,[i(p(e),{modelValue:b.value,"onUpdate:modelValue":n[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`]),u(`button`,g,c(C.value?`Processing...`:`Send`),1)]),u(`div`,_,[u(`div`,v,[n[1]||=u(`h3`,{"font-normal":``},` Messages `,-1),(a(!0),l(f,null,d(x.value,e=>(a(),l(`div`,{key:e},[u(`div`,null,c(e),1)]))),128))]),u(`div`,y,[n[2]||=u(`h3`,{"font-normal":``},` Emotions `,-1),(a(!0),l(f,null,d(S.value,e=>(a(),l(`div`,{key:e},[u(`div`,null,c(e),1)]))),128))])])]))}}),x=b;export{x as default}; \ No newline at end of file diff --git a/assets/emotions-pdqefEJH.js b/assets/emotions-pdqefEJH.js new file mode 100644 index 0000000000000000000000000000000000000000..3f1d8de7ad6db1f11b0c85c992a808de0e453923 --- /dev/null +++ b/assets/emotions-pdqefEJH.js @@ -0,0 +1 @@ +import"./Basic-1H4d_HIg.js";import{b as e}from"./Textarea-Bzx3P1JU.js";import{O as t,Q as n,av as r,d3 as i,d6 as a,dA as o,dG as s,da as c,db as l,dj as u,do as d,ds as f,dv as p}from"./index-K-hxNScn.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=n({handlers:[async e=>{S.value.push(e.data)}]}),T=t(w);function E(){C.value=!0;let e=b.value.split(``);for(let t of e)T.add(t);T.add(r),b.value=``,C.value=!1}return(t,n)=>(f(),a(`div`,m,[c(`div`,h,[d(p(e),{modelValue:b.value,"onUpdate:modelValue":n[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`]),c(`button`,g,s(C.value?`Processing...`:`Send`),1)]),c(`div`,_,[c(`div`,v,[n[1]||=c(`h3`,{"font-normal":``},` Messages `,-1),(f(!0),a(u,null,l(x.value,e=>(f(),a(`div`,{key:e},[c(`div`,null,s(e),1)]))),128))]),c(`div`,y,[n[2]||=c(`h3`,{"font-normal":``},` Emotions `,-1),(f(!0),a(u,null,l(S.value,e=>(f(),a(`div`,{key:e},[c(`div`,null,s(e),1)]))),128))])])]))}}),x=b;export{x as default}; \ No newline at end of file diff --git a/assets/esm-BSZm-ZjW.js b/assets/esm-tBbs2cmY.js similarity index 99% rename from assets/esm-BSZm-ZjW.js rename to assets/esm-tBbs2cmY.js index bef02410e58800bc1822a24a024f322aded29e0e..7fee8b798bb0aac8077720f184d88ff88dd1e944 100644 --- a/assets/esm-BSZm-ZjW.js +++ b/assets/esm-tBbs2cmY.js @@ -1,3 +1,3 @@ -import{B as e}from"./index-BOKBAzT0.js";const t=Symbol(`Let zodToJsonSchema decide on which parser to use`),n={name:void 0,$refStrategy:`root`,basePath:[`#`],effectStrategy:`input`,pipeStrategy:`all`,dateStrategy:`format:date-time`,mapStrategy:`entries`,removeAdditionalStrategy:`passthrough`,allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:`definitions`,target:`jsonSchema7`,strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:`escape`,applyRegexFlags:!1,emailStrategy:`format:email`,base64Strategy:`contentEncoding:base64`,nameStrategy:`ref`,openAiAnyTypeName:`OpenAiAnyType`},r=e=>typeof e==`string`?{...n,name:e}:{...n,...e},i=e=>{let t=r(e),n=t.name===void 0?t.basePath:[...t.basePath,t.definitionPath,t.name];return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}};function a(e,t,n,r){r?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function o(e,t,n,r,i){e[t]=n,a(e,t,r,i)}const s=(e,t)=>{let n=0;for(;n$(e.innerType._def,t);function m(e,t,n){let r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((n,r)=>m(e,t,n))};switch(r){case`string`:case`format:date-time`:return{type:`string`,format:`date-time`};case`format:date`:return{type:`string`,format:`date`};case`integer`:return h(e,t)}}const h=(e,t)=>{let n={type:`integer`,format:`unix-time`};if(t.target===`openApi3`)return n;for(let r of e.checks)switch(r.kind){case`min`:o(n,`minimum`,r.value,r.message,t);break;case`max`:o(n,`maximum`,r.value,r.message,t);break}return n};function g(e,t){return{...$(e.innerType._def,t),default:e.defaultValue()}}function _(e,t){return t.effectStrategy===`input`?$(e.schema._def,t):c(t)}function v(e){return{type:`string`,enum:Array.from(e.values)}}const y=e=>`type`in e&&e.type===`string`?!1:`allOf`in e;function b(e,t){let n=[$(e.left._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),$(e.right._def,{...t,currentPath:[...t.currentPath,`allOf`,`1`]})].filter(e=>!!e),r=t.target===`jsonSchema2019-09`?{unevaluatedProperties:!1}:void 0,i=[];return n.forEach(e=>{if(y(e))i.push(...e.allOf),e.unevaluatedProperties===void 0&&(r=void 0);else{let t=e;if(`additionalProperties`in e&&e.additionalProperties===!1){let{additionalProperties:n,...r}=e;t=r}else r=void 0;i.push(t)}}),i.length?{allOf:i,...r}:void 0}function x(e,t){let n=typeof e.value;return n!==`bigint`&&n!==`number`&&n!==`boolean`&&n!==`string`?{type:Array.isArray(e.value)?`array`:`object`}:t.target===`openApi3`?{type:n===`bigint`?`integer`:n,enum:[e.value]}:{type:n===`bigint`?`integer`:n,const:e.value}}let S;const C={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(S===void 0&&(S=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)),S),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function w(e,t){let n={type:`string`};if(e.checks)for(let r of e.checks)switch(r.kind){case`min`:o(n,`minLength`,typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,r.message,t);break;case`max`:o(n,`maxLength`,typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case`email`:switch(t.emailStrategy){case`format:email`:O(n,`email`,r.message,t);break;case`format:idn-email`:O(n,`idn-email`,r.message,t);break;case`pattern:zod`:k(n,C.email,r.message,t);break}break;case`url`:O(n,`uri`,r.message,t);break;case`uuid`:O(n,`uuid`,r.message,t);break;case`regex`:k(n,r.regex,r.message,t);break;case`cuid`:k(n,C.cuid,r.message,t);break;case`cuid2`:k(n,C.cuid2,r.message,t);break;case`startsWith`:k(n,RegExp(`^${T(r.value,t)}`),r.message,t);break;case`endsWith`:k(n,RegExp(`${T(r.value,t)}$`),r.message,t);break;case`datetime`:O(n,`date-time`,r.message,t);break;case`date`:O(n,`date`,r.message,t);break;case`time`:O(n,`time`,r.message,t);break;case`duration`:O(n,`duration`,r.message,t);break;case`length`:o(n,`minLength`,typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,r.message,t),o(n,`maxLength`,typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case`includes`:k(n,RegExp(T(r.value,t)),r.message,t);break;case`ip`:r.version!==`v6`&&O(n,`ipv4`,r.message,t),r.version!==`v4`&&O(n,`ipv6`,r.message,t);break;case`base64url`:k(n,C.base64url,r.message,t);break;case`jwt`:k(n,C.jwt,r.message,t);break;case`cidr`:r.version!==`v6`&&k(n,C.ipv4Cidr,r.message,t),r.version!==`v4`&&k(n,C.ipv6Cidr,r.message,t);break;case`emoji`:k(n,C.emoji(),r.message,t);break;case`ulid`:k(n,C.ulid,r.message,t);break;case`base64`:switch(t.base64Strategy){case`format:binary`:O(n,`binary`,r.message,t);break;case`contentEncoding:base64`:o(n,`contentEncoding`,`base64`,r.message,t);break;case`pattern:zod`:k(n,C.base64,r.message,t);break}break;case`nanoid`:k(n,C.nanoid,r.message,t);case`toLowerCase`:case`toUpperCase`:case`trim`:break;default:(e=>{})(r)}return n}function T(e,t){return t.patternStrategy===`escape`?D(e):e}const E=new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`);function D(e){let t=``;for(let n=0;ne.format)?(e.anyOf||=[],e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):o(e,`format`,t,n,r)}function k(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||=[],e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:A(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):o(e,`pattern`,A(t,r),n,r)}function A(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes(`i`),m:e.flags.includes(`m`),s:e.flags.includes(`s`)},r=n.i?e.source.toLowerCase():e.source,i=``,a=!1,o=!1,s=!1;for(let e=0;etypeof e==`string`?{...n,name:e}:{...n,...e},i=e=>{let t=r(e),n=t.name===void 0?t.basePath:[...t.basePath,t.definitionPath,t.name];return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}};function a(e,t,n,r){r?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function o(e,t,n,r,i){e[t]=n,a(e,t,r,i)}const s=(e,t)=>{let n=0;for(;n$(e.innerType._def,t);function m(e,t,n){let r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((n,r)=>m(e,t,n))};switch(r){case`string`:case`format:date-time`:return{type:`string`,format:`date-time`};case`format:date`:return{type:`string`,format:`date`};case`integer`:return h(e,t)}}const h=(e,t)=>{let n={type:`integer`,format:`unix-time`};if(t.target===`openApi3`)return n;for(let r of e.checks)switch(r.kind){case`min`:o(n,`minimum`,r.value,r.message,t);break;case`max`:o(n,`maximum`,r.value,r.message,t);break}return n};function g(e,t){return{...$(e.innerType._def,t),default:e.defaultValue()}}function _(e,t){return t.effectStrategy===`input`?$(e.schema._def,t):c(t)}function v(e){return{type:`string`,enum:Array.from(e.values)}}const y=e=>`type`in e&&e.type===`string`?!1:`allOf`in e;function b(e,t){let n=[$(e.left._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),$(e.right._def,{...t,currentPath:[...t.currentPath,`allOf`,`1`]})].filter(e=>!!e),r=t.target===`jsonSchema2019-09`?{unevaluatedProperties:!1}:void 0,i=[];return n.forEach(e=>{if(y(e))i.push(...e.allOf),e.unevaluatedProperties===void 0&&(r=void 0);else{let t=e;if(`additionalProperties`in e&&e.additionalProperties===!1){let{additionalProperties:n,...r}=e;t=r}else r=void 0;i.push(t)}}),i.length?{allOf:i,...r}:void 0}function x(e,t){let n=typeof e.value;return n!==`bigint`&&n!==`number`&&n!==`boolean`&&n!==`string`?{type:Array.isArray(e.value)?`array`:`object`}:t.target===`openApi3`?{type:n===`bigint`?`integer`:n,enum:[e.value]}:{type:n===`bigint`?`integer`:n,const:e.value}}let S;const C={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(S===void 0&&(S=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)),S),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function w(e,t){let n={type:`string`};if(e.checks)for(let r of e.checks)switch(r.kind){case`min`:o(n,`minLength`,typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,r.message,t);break;case`max`:o(n,`maxLength`,typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case`email`:switch(t.emailStrategy){case`format:email`:O(n,`email`,r.message,t);break;case`format:idn-email`:O(n,`idn-email`,r.message,t);break;case`pattern:zod`:k(n,C.email,r.message,t);break}break;case`url`:O(n,`uri`,r.message,t);break;case`uuid`:O(n,`uuid`,r.message,t);break;case`regex`:k(n,r.regex,r.message,t);break;case`cuid`:k(n,C.cuid,r.message,t);break;case`cuid2`:k(n,C.cuid2,r.message,t);break;case`startsWith`:k(n,RegExp(`^${T(r.value,t)}`),r.message,t);break;case`endsWith`:k(n,RegExp(`${T(r.value,t)}$`),r.message,t);break;case`datetime`:O(n,`date-time`,r.message,t);break;case`date`:O(n,`date`,r.message,t);break;case`time`:O(n,`time`,r.message,t);break;case`duration`:O(n,`duration`,r.message,t);break;case`length`:o(n,`minLength`,typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,r.message,t),o(n,`maxLength`,typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case`includes`:k(n,RegExp(T(r.value,t)),r.message,t);break;case`ip`:r.version!==`v6`&&O(n,`ipv4`,r.message,t),r.version!==`v4`&&O(n,`ipv6`,r.message,t);break;case`base64url`:k(n,C.base64url,r.message,t);break;case`jwt`:k(n,C.jwt,r.message,t);break;case`cidr`:r.version!==`v6`&&k(n,C.ipv4Cidr,r.message,t),r.version!==`v4`&&k(n,C.ipv6Cidr,r.message,t);break;case`emoji`:k(n,C.emoji(),r.message,t);break;case`ulid`:k(n,C.ulid,r.message,t);break;case`base64`:switch(t.base64Strategy){case`format:binary`:O(n,`binary`,r.message,t);break;case`contentEncoding:base64`:o(n,`contentEncoding`,`base64`,r.message,t);break;case`pattern:zod`:k(n,C.base64,r.message,t);break}break;case`nanoid`:k(n,C.nanoid,r.message,t);case`toLowerCase`:case`toUpperCase`:case`trim`:break;default:(e=>{})(r)}return n}function T(e,t){return t.patternStrategy===`escape`?D(e):e}const E=new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`);function D(e){let t=``;for(let n=0;ne.format)?(e.anyOf||=[],e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):o(e,`format`,t,n,r)}function k(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||=[],e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:A(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):o(e,`pattern`,A(t,r),n,r)}function A(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes(`i`),m:e.flags.includes(`m`),s:e.flags.includes(`s`)},r=n.i?e.source.toLowerCase():e.source,i=``,a=!1,o=!1,s=!1;for(let e=0;e({...e,[r]:$(t.valueType._def,{...n,currentPath:[...n.currentPath,`properties`,r]})??c(n)}),{}),additionalProperties:n.rejectedAdditionalProperties};let r={type:`object`,additionalProperties:$(t.valueType._def,{...n,currentPath:[...n.currentPath,`additionalProperties`]})??n.allowedAdditionalProperties};if(n.target===`openApi3`)return r;if(t.keyType?._def.typeName===e.ZodString&&t.keyType._def.checks?.length){let{type:e,...i}=w(t.keyType._def,n);return{...r,propertyNames:i}}else if(t.keyType?._def.typeName===e.ZodEnum)return{...r,propertyNames:{enum:t.keyType._def.values}};else if(t.keyType?._def.typeName===e.ZodBranded&&t.keyType._def.type._def.typeName===e.ZodString&&t.keyType._def.type._def.checks?.length){let{type:e,...i}=f(t.keyType._def,n);return{...r,propertyNames:i}}return r}function M(e,t){if(t.mapStrategy===`record`)return j(e,t);let n=$(e.keyType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`0`]})||c(t),r=$(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`1`]})||c(t);return{type:`array`,maxItems:125,items:{type:`array`,items:[n,r],minItems:2,maxItems:2}}}function N(e){let t=e.values,n=Object.keys(e.values).filter(e=>typeof t[t[e]]!=`number`),r=n.map(e=>t[e]),i=Array.from(new Set(r.map(e=>typeof e)));return{type:i.length===1?i[0]===`string`?`string`:`number`:[`string`,`number`],enum:r}}function P(e){return e.target===`openAi`?void 0:{not:c({...e,currentPath:[...e.currentPath,`not`]})}}function F(e){return e.target===`openApi3`?{enum:[`null`],nullable:!0}:{type:`null`}}const I={ZodString:`string`,ZodNumber:`number`,ZodBigInt:`integer`,ZodBoolean:`boolean`,ZodNull:`null`};function L(e,t){if(t.target===`openApi3`)return R(e,t);let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in I&&(!e._def.checks||!e._def.checks.length))){let e=n.reduce((e,t)=>{let n=I[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}else if(n.every(e=>e._def.typeName===`ZodLiteral`&&!e.description)){let e=n.reduce((e,t)=>{let n=typeof t._def.value;switch(n){case`string`:case`number`:case`boolean`:return[...e,n];case`bigint`:return[...e,`integer`];case`object`:if(t._def.value===null)return[...e,`null`];case`symbol`:case`undefined`:case`function`:default:return e}},[]);if(e.length===n.length){let t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>e._def.typeName===`ZodEnum`))return{type:`string`,enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return R(e,t)}const R=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>$(e._def,{...t,currentPath:[...t.currentPath,`anyOf`,`${n}`]})).filter(e=>!!e&&(!t.strictUnions||typeof e==`object`&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function z(e,t){if([`ZodString`,`ZodNumber`,`ZodBigInt`,`ZodBoolean`,`ZodNull`].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target===`openApi3`?{type:I[e.innerType._def.typeName],nullable:!0}:{type:[I[e.innerType._def.typeName],`null`]};if(t.target===`openApi3`){let n=$(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&`$ref`in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let n=$(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`0`]});return n&&{anyOf:[n,{type:`null`}]}}function B(e,t){let n={type:`number`};if(!e.checks)return n;for(let r of e.checks)switch(r.kind){case`int`:n.type=`integer`,a(n,`type`,r.message,t);break;case`min`:t.target===`jsonSchema7`?r.inclusive?o(n,`minimum`,r.value,r.message,t):o(n,`exclusiveMinimum`,r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),o(n,`minimum`,r.value,r.message,t));break;case`max`:t.target===`jsonSchema7`?r.inclusive?o(n,`maximum`,r.value,r.message,t):o(n,`exclusiveMaximum`,r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),o(n,`maximum`,r.value,r.message,t));break;case`multipleOf`:o(n,`multipleOf`,r.value,r.message,t);break}return n}function V(e,t){let n=t.target===`openAi`,r={type:`object`,properties:{}},i=[],a=e.shape();for(let e in a){let o=a[e];if(o===void 0||o._def===void 0)continue;let s=U(o);s&&n&&(o._def.typeName===`ZodOptional`&&(o=o._def.innerType),o.isNullable()||(o=o.nullable()),s=!1);let c=$(o._def,{...t,currentPath:[...t.currentPath,`properties`,e],propertyPath:[...t.currentPath,`properties`,e]});if(c===void 0)continue;r.properties[e]=c,s||i.push(e)}i.length&&(r.required=i);let o=H(e,t);return o!==void 0&&(r.additionalProperties=o),r}function H(e,t){if(e.catchall._def.typeName!==`ZodNever`)return $(e.catchall._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]});switch(e.unknownKeys){case`passthrough`:return t.allowedAdditionalProperties;case`strict`:return t.rejectedAdditionalProperties;case`strip`:return t.removeAdditionalStrategy===`strict`?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function U(e){try{return e.isOptional()}catch{return!0}}const W=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return $(e.innerType._def,t);let n=$(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`1`]});return n?{anyOf:[{not:c(t)},n]}:c(t)},G=(e,t)=>{if(t.pipeStrategy===`input`)return $(e.in._def,t);if(t.pipeStrategy===`output`)return $(e.out._def,t);let n=$(e.in._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),r=$(e.out._def,{...t,currentPath:[...t.currentPath,`allOf`,n?`1`:`0`]});return{allOf:[n,r].filter(e=>e!==void 0)}};function K(e,t){return $(e.type._def,t)}function q(e,t){let n=$(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`]}),r={type:`array`,uniqueItems:!0,items:n};return e.minSize&&o(r,`minItems`,e.minSize.value,e.minSize.message,t),e.maxSize&&o(r,`maxItems`,e.maxSize.value,e.maxSize.message,t),r}function J(e,t){return e.rest?{type:`array`,minItems:e.items.length,items:e.items.map((e,n)=>$(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[]),additionalItems:$(e.rest._def,{...t,currentPath:[...t.currentPath,`additionalItems`]})}:{type:`array`,minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>$(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[])}}function Y(e){return{not:c(e)}}function X(e){return c(e)}const Z=(e,t)=>$(e.innerType._def,t),Q=(t,n,r)=>{switch(n){case e.ZodString:return w(t,r);case e.ZodNumber:return B(t,r);case e.ZodObject:return V(t,r);case e.ZodBigInt:return u(t,r);case e.ZodBoolean:return d();case e.ZodDate:return m(t,r);case e.ZodUndefined:return Y(r);case e.ZodNull:return F(r);case e.ZodArray:return l(t,r);case e.ZodUnion:case e.ZodDiscriminatedUnion:return L(t,r);case e.ZodIntersection:return b(t,r);case e.ZodTuple:return J(t,r);case e.ZodRecord:return j(t,r);case e.ZodLiteral:return x(t,r);case e.ZodEnum:return v(t);case e.ZodNativeEnum:return N(t);case e.ZodNullable:return z(t,r);case e.ZodOptional:return W(t,r);case e.ZodMap:return M(t,r);case e.ZodSet:return q(t,r);case e.ZodLazy:return()=>t.getter()._def;case e.ZodPromise:return K(t,r);case e.ZodNaN:case e.ZodNever:return P(r);case e.ZodEffects:return _(t,r);case e.ZodAny:return c(r);case e.ZodUnknown:return X(r);case e.ZodDefault:return g(t,r);case e.ZodBranded:return f(t,r);case e.ZodReadonly:return Z(t,r);case e.ZodCatch:return p(t,r);case e.ZodPipeline:return G(t,r);case e.ZodFunction:case e.ZodVoid:case e.ZodSymbol:return;default:return(e=>void 0)(n)}};function $(e,n,r=!1){let i=n.seen.get(e);if(n.override){let a=n.override?.(e,n,i,r);if(a!==t)return a}if(i&&!r){let e=ee(i,n);if(e!==void 0)return e}let a={def:e,path:n.currentPath,jsonSchema:void 0};n.seen.set(e,a);let o=Q(e,e.typeName,n),s=typeof o==`function`?$(o(),n):o;if(s&&te(e,n,s),n.postProcess){let t=n.postProcess(s,e,n);return a.jsonSchema=s,t}return a.jsonSchema=s,s}const ee=(e,t)=>{switch(t.$refStrategy){case`root`:return{$ref:e.path.join(`/`)};case`relative`:return{$ref:s(t.currentPath,e.path)};case`none`:case`seen`:return e.path.lengtht.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join(`/`)}! Defaulting to any`),c(t)):t.$refStrategy===`seen`?c(t):void 0}},te=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n),ne=(e,t)=>{let n=i(t),r=typeof t==`object`&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:$(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??c(n)}),{}):void 0,a=typeof t==`string`?t:t?.nameStrategy===`title`?void 0:t?.name,o=$(e._def,a===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,a]},!1)??c(n),s=typeof t==`object`&&t.name!==void 0&&t.nameStrategy===`title`?t.name:void 0;s!==void 0&&(o.title=s),n.flags.hasReferencedOpenAiAnyType&&(r||={},r[n.openAiAnyTypeName]||(r[n.openAiAnyTypeName]={type:[`string`,`number`,`integer`,`boolean`,`array`,`null`],items:{$ref:n.$refStrategy===`relative`?`1`:[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join(`/`)}}));let l=a===void 0?r?{...o,[n.definitionPath]:r}:o:{$ref:[...n.$refStrategy===`relative`?[]:n.basePath,n.definitionPath,a].join(`/`),[n.definitionPath]:{...r,[a]:o}};return n.target===`jsonSchema7`?l.$schema=`http://json-schema.org/draft-07/schema#`:(n.target===`jsonSchema2019-09`||n.target===`openAi`)&&(l.$schema=`https://json-schema.org/draft/2019-09/schema#`),n.target===`openAi`&&(`anyOf`in l||`oneOf`in l||`allOf`in l||`type`in l&&Array.isArray(l.type))&&console.warn(`Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.`),l};export{a as addErrorMessage,n as defaultOptions,r as getDefaultOptions,i as getRefs,s as getRelativePath,t as ignoreOverride,c as parseAnyDef,l as parseArrayDef,u as parseBigintDef,d as parseBooleanDef,f as parseBrandedDef,p as parseCatchDef,m as parseDateDef,$ as parseDef,g as parseDefaultDef,_ as parseEffectsDef,v as parseEnumDef,b as parseIntersectionDef,x as parseLiteralDef,M as parseMapDef,N as parseNativeEnumDef,P as parseNeverDef,F as parseNullDef,z as parseNullableDef,B as parseNumberDef,V as parseObjectDef,W as parseOptionalDef,G as parsePipelineDef,K as parsePromiseDef,Z as parseReadonlyDef,j as parseRecordDef,q as parseSetDef,w as parseStringDef,J as parseTupleDef,Y as parseUndefinedDef,L as parseUnionDef,X as parseUnknownDef,I as primitiveMappings,Q as selectParser,o as setResponseValueAndErrors,C as zodPatterns,ne as zodToJsonSchema}; \ No newline at end of file diff --git a/assets/featherless-ai-CvwPAVKd.js b/assets/featherless-ai-CvwPAVKd.js deleted file mode 100644 index c822f14c5dabe11231270ac3f14a3462718d294c..0000000000000000000000000000000000000000 --- a/assets/featherless-ai-CvwPAVKd.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`featherless-ai`;var x=p({__name:`featherless-ai`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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/featherless-ai-DTyndR9W.js b/assets/featherless-ai-DTyndR9W.js new file mode 100644 index 0000000000000000000000000000000000000000..b92e68589693b5382cf5ebe883489779317a0eed --- /dev/null +++ b/assets/featherless-ai-DTyndR9W.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`featherless-ai`;var x=u({__name:`featherless-ai`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),h([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-CpQpJgpb.js b/assets/filter-message-CpQpJgpb.js deleted file mode 100644 index cb8e0f81ea688d8c9c65d2e02db2946814717b6b..0000000000000000000000000000000000000000 --- a/assets/filter-message-CpQpJgpb.js +++ /dev/null @@ -1 +0,0 @@ -import"./Basic-6PI1-eSd.js";import{b as e}from"./Textarea-vIof96sl.js";import{W as t,d0 as n,d4 as r,d8 as i,dD as a,dE as o,db as s,df as c,dy as l}from"./index-BOKBAzT0.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=i({__name:`filter-message`,setup(i){let m=a(``),h=a(!1),g=a({content:``});async function _(){h.value=!0;let e=m.value.split(``),n=function(e){return e.Literal=`literal`,e.Special=`special`,e}({}),r=n.Literal,i=``;for(let a of e){await t(50);let e=r;a===`<`?e=n.Special:a===`>`&&(e=n.Literal),r===n.Literal&&e===n.Special&&(g.value.content+=i,i=``),r===n.Special&&e===n.Literal&&(i=``),r===n.Literal&&e===n.Literal&&(g.value.content+=a,i=``),r=e}i&&(g.value.content+=i),m.value=``,h.value=!1}return(t,i)=>(r(),s(`div`,u,[c(`div`,d,[n(l(e),{modelValue:m.value,"onUpdate:modelValue":i[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`]),c(`button`,f,o(h.value?`Processing...`:`Send`),1)]),c(`div`,p,[i[1]||=c(`h3`,{"font-normal":``},` Streaming Message `,-1),c(`div`,null,o(g.value.content),1)])]))}}),h=m;export{h as default}; \ No newline at end of file diff --git a/assets/filter-message-DCHgw6K5.js b/assets/filter-message-DCHgw6K5.js new file mode 100644 index 0000000000000000000000000000000000000000..bc8dafb30b901884b9bdda0124e52997df17863a --- /dev/null +++ b/assets/filter-message-DCHgw6K5.js @@ -0,0 +1 @@ +import"./Basic-1H4d_HIg.js";import{b as e}from"./Textarea-Bzx3P1JU.js";import{T as t,d3 as n,d6 as r,dA as i,dG as a,da as o,do as s,ds as c,dv as l}from"./index-K-hxNScn.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=n({__name:`filter-message`,setup(n){let m=i(``),h=i(!1),g=i({content:``});async function _(){h.value=!0;let e=m.value.split(``),n=function(e){return e.Literal=`literal`,e.Special=`special`,e}({}),r=n.Literal,i=``;for(let a of e){await t(50);let e=r;a===`<`?e=n.Special:a===`>`&&(e=n.Literal),r===n.Literal&&e===n.Special&&(g.value.content+=i,i=``),r===n.Special&&e===n.Literal&&(i=``),r===n.Literal&&e===n.Literal&&(g.value.content+=a,i=``),r=e}i&&(g.value.content+=i),m.value=``,h.value=!1}return(t,n)=>(c(),r(`div`,u,[o(`div`,d,[s(l(e),{modelValue:m.value,"onUpdate:modelValue":n[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`]),o(`button`,f,a(h.value?`Processing...`:`Send`),1)]),o(`div`,p,[n[1]||=o(`h3`,{"font-normal":``},` Streaming Message `,-1),o(`div`,null,a(g.value.content),1)])]))}}),h=m;export{h as default}; \ No newline at end of file diff --git a/assets/fireworks-ai-DvpnBa6B.js b/assets/fireworks-ai-DvpnBa6B.js new file mode 100644 index 0000000000000000000000000000000000000000..48ea88dc1d104e9c8c359a0c5b0143eebf95060f --- /dev/null +++ b/assets/fireworks-ai-DvpnBa6B.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`fireworks-ai`;var x=u({__name:`fireworks-ai`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),h([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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/fireworks-ai-uxjeby9e.js b/assets/fireworks-ai-uxjeby9e.js deleted file mode 100644 index 7a1a60d81d19ce09d1a975ab233a162be64e4b79..0000000000000000000000000000000000000000 --- a/assets/fireworks-ai-uxjeby9e.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`fireworks-ai`;var x=p({__name:`fireworks-ai`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-DBEEvfiB.js b/assets/general-DBEEvfiB.js deleted file mode 100644 index 6d2f925c47b04104afb59ebd3d2cc0027a9c6f48..0000000000000000000000000000000000000000 --- a/assets/general-DBEEvfiB.js +++ /dev/null @@ -1 +0,0 @@ -import{a6 as e,aU as t,ak as n,al as r,ao as i,as as a,d0 as o,d3 as s,d4 as c,d5 as l,d8 as u,dB as d,dE as f,da as p,db as m,df as h,di as g,dl as _,dy as v,t as y}from"./index-BOKBAzT0.js";import{b}from"./route-block-D_qNAUXY.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=u({__name:`general`,setup(u){let b=y(),{t:C,locale:w}=e(),T=t();return(e,t)=>{let u=s(`motion`);return c(),m(`div`,x,[_(o(v(a),{modelValue:v(T),"onUpdate:modelValue":t[0]||=e=>d(T)?T.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:2*50,label:v(C)(`settings.theme.title`),description:v(C)(`settings.theme.description`)},null,8,[`modelValue`,`label`,`description`]),[[u]]),_((c(),g(v(i),{initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:280,delay:3*50,transition:`all ease-in-out duration-250`,label:v(C)(`settings.language.title`),description:v(C)(`settings.language.description`)},{default:p(()=>[o(v(n),{modelValue:v(b).language,"onUpdate:modelValue":t[1]||=e=>v(b).language=e,transition:`all ease-in-out duration-250`,"cursor-pointer":``,"bg-transparent":``,"outline-none":``},{default:p(({value:t})=>[h(`div`,null,f(t?e.$t(`settings.language.${t}`):v(C)(`settings.language.english`)),1)]),options:p(({hide:t})=>[o(v(r),{value:`en`,active:v(w)===`en`,onClick:e=>t()},{default:p(()=>[l(f(e.$t(`settings.language.english`)),1)]),_:2},1032,[`active`,`onClick`]),o(v(r),{value:`zh-Hans`,active:v(w)===`zh-Hans`,onClick:e=>t()},{default:p(()=>[l(f(e.$t(`settings.language.chinese`)),1)]),_:2},1032,[`active`,`onClick`])]),_:1},8,[`modelValue`])]),_:1},8,[`label`,`description`])),[[u]]),_((c(),m(`div`,S,t[2]||=[h(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[u]])])}}});typeof b==`function`&&b(C);var w=C;export{w as default}; \ No newline at end of file diff --git a/assets/general-xGijmv9Q.js b/assets/general-xGijmv9Q.js new file mode 100644 index 0000000000000000000000000000000000000000..6fe77fc784d4e0016a0acca617997a21dc8cac0a --- /dev/null +++ b/assets/general-xGijmv9Q.js @@ -0,0 +1 @@ +import{a3 as e,aR as t,ah as n,ai as r,al as i,aq as a,d0 as o,d3 as s,d5 as c,d6 as l,dG as u,da as d,dd as f,dg as p,do as m,dr as h,ds as g,dv as _,dy as v,q as y}from"./index-K-hxNScn.js";import{b}from"./route-block-D_qNAUXY.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=s({__name:`general`,setup(s){let b=y(),{t:C,locale:w}=e(),T=t();return(e,t)=>{let s=h(`motion`);return g(),l(`div`,x,[p(m(_(a),{modelValue:_(T),"onUpdate:modelValue":t[0]||=e=>v(T)?T.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:2*50,label:_(C)(`settings.theme.title`),description:_(C)(`settings.theme.description`)},null,8,[`modelValue`,`label`,`description`]),[[s]]),p((g(),f(_(i),{initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:280,delay:3*50,transition:`all ease-in-out duration-250`,label:_(C)(`settings.language.title`),description:_(C)(`settings.language.description`)},{default:c(()=>[m(_(n),{modelValue:_(b).language,"onUpdate:modelValue":t[1]||=e=>_(b).language=e,transition:`all ease-in-out duration-250`,"cursor-pointer":``,"bg-transparent":``,"outline-none":``},{default:c(({value:t})=>[d(`div`,null,u(t?e.$t(`settings.language.${t}`):_(C)(`settings.language.english`)),1)]),options:c(({hide:t})=>[m(_(r),{value:`en`,active:_(w)===`en`,onClick:e=>t()},{default:c(()=>[o(u(e.$t(`settings.language.english`)),1)]),_:2},1032,[`active`,`onClick`]),m(_(r),{value:`zh-Hans`,active:_(w)===`zh-Hans`,onClick:e=>t()},{default:c(()=>[o(u(e.$t(`settings.language.chinese`)),1)]),_:2},1032,[`active`,`onClick`])]),_:1},8,[`modelValue`])]),_:1},8,[`label`,`description`])),[[s]]),p((g(),l(`div`,S,t[2]||=[d(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[s]])])}}});typeof b==`function`&&b(C);var w=C;export{w as default}; \ No newline at end of file diff --git a/assets/gesture-circle-BhrbgQjT.js b/assets/gesture-circle-BhrbgQjT.js new file mode 100644 index 0000000000000000000000000000000000000000..8566e9610d8688f5b83d41912a9e1f6d667bc5cf --- /dev/null +++ b/assets/gesture-circle-BhrbgQjT.js @@ -0,0 +1 @@ +import{aM as e,aP as t,aW as n,b0 as r,b3 as i,d3 as a,d6 as o,dA as s,dG as c,da as l,dk as u,dq as d,ds as f,dv as p}from"./index-K-hxNScn.js";import{b as m}from"./route-block-D_qNAUXY.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=a({__name:`gesture-circle`,setup(a){let m=s(),v=s(),y=s(),b=s(),{x,y:S}=e({target:y}),C=t(v,{immediate:!0,windowResize:!0}),w=u(()=>({x:x.value,y:S.value}));n(v,e=>{let t=e[0],{width:n,height:r}=t.contentRect;y.value&&(y.value.width=n,y.value.height=r)}),d(v,e=>{if(!e)return;let t=document.createElement(`canvas`);t.width=C.width.value,t.height=C.height.value,t.style.objectFit=`contain`;let n=t.getContext(`2d`);b.value=n,y.value=t,v.value?.appendChild(t)});let T=r(w,50),E=i(w,50),D=s(E.value),O=s(0),k=s(0),A=s(!1),j=s([]),M=s(!1);return d([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())}),d(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=[]}),d(T,e=>{j.value.push(e)}),(e,t)=>(f(),o(`div`,{ref_key:`containerRef`,ref:m,"h-full":``},[l(`div`,h,[l(`div`,g,[t[0]||=l(`div`,{text:`neutral-400 dark:neutral-600`},` pointThrottled: `,-1),l(`div`,null,c(p(T)),1),t[1]||=l(`div`,{text:`neutral-400 dark:neutral-600`},` pointDebounced: `,-1),l(`div`,null,c(p(E)),1),t[2]||=l(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoint: `,-1),l(`div`,null,c(D.value),1),t[3]||=l(`div`,{text:`neutral-400 dark:neutral-600`},` distance: `,-1),l(`div`,null,c(O.value),1),t[4]||=l(`div`,{text:`neutral-400 dark:neutral-600`},` count: `,-1),l(`div`,null,c(k.value),1),t[5]||=l(`div`,{text:`neutral-400 dark:neutral-600`},` show: `,-1),l(`div`,null,c(A.value),1),t[6]||=l(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoints: `,-1),l(`div`,null,c(j.value),1),t[7]||=l(`div`,{text:`neutral-400 dark:neutral-600`},` isCircle: `,-1),l(`div`,null,c(M.value),1)]),l(`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/gesture-circle-n22RrPkv.js b/assets/gesture-circle-n22RrPkv.js deleted file mode 100644 index c1c445299a59a24159c276ef9994aff5bfe28980..0000000000000000000000000000000000000000 --- a/assets/gesture-circle-n22RrPkv.js +++ /dev/null @@ -1 +0,0 @@ -import{a$ as e,aP as t,aS as n,aX as r,aZ as i,d2 as a,d4 as o,d8 as s,dD as c,dE as l,db as u,df as d,dp as f,dy as p}from"./index-BOKBAzT0.js";import{b as m}from"./route-block-D_qNAUXY.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=s({__name:`gesture-circle`,setup(s){let m=c(),v=c(),y=c(),b=c(),{x,y:S}=t({target:y}),C=n(v,{immediate:!0,windowResize:!0}),w=f(()=>({x:x.value,y:S.value}));r(v,e=>{let t=e[0],{width:n,height:r}=t.contentRect;y.value&&(y.value.width=n,y.value.height=r)}),a(v,e=>{if(!e)return;let t=document.createElement(`canvas`);t.width=C.width.value,t.height=C.height.value,t.style.objectFit=`contain`;let n=t.getContext(`2d`);b.value=n,y.value=t,v.value?.appendChild(t)});let T=e(w,50),E=i(w,50),D=c(E.value),O=c(0),k=c(0),A=c(!1),j=c([]),M=c(!1);return a([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())}),a(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=[]}),a(T,e=>{j.value.push(e)}),(e,t)=>(o(),u(`div`,{ref_key:`containerRef`,ref:m,"h-full":``},[d(`div`,h,[d(`div`,g,[t[0]||=d(`div`,{text:`neutral-400 dark:neutral-600`},` pointThrottled: `,-1),d(`div`,null,l(p(T)),1),t[1]||=d(`div`,{text:`neutral-400 dark:neutral-600`},` pointDebounced: `,-1),d(`div`,null,l(p(E)),1),t[2]||=d(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoint: `,-1),d(`div`,null,l(D.value),1),t[3]||=d(`div`,{text:`neutral-400 dark:neutral-600`},` distance: `,-1),d(`div`,null,l(O.value),1),t[4]||=d(`div`,{text:`neutral-400 dark:neutral-600`},` count: `,-1),d(`div`,null,l(k.value),1),t[5]||=d(`div`,{text:`neutral-400 dark:neutral-600`},` show: `,-1),d(`div`,null,l(A.value),1),t[6]||=d(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoints: `,-1),d(`div`,null,l(j.value),1),t[7]||=d(`div`,{text:`neutral-400 dark:neutral-600`},` isCircle: `,-1),d(`div`,null,l(M.value),1)]),d(`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-A9AGUM2m.js b/assets/google-generative-ai-A9AGUM2m.js new file mode 100644 index 0000000000000000000000000000000000000000..a778a13687e1cf1354402fe77c6f888c1efd8016 --- /dev/null +++ b/assets/google-generative-ai-A9AGUM2m.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`google-generative-ai`;var x=u({__name:`google-generative-ai`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.anthropic.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`}),h([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(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName||`Google | Gemini`,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`Google`,placeholder:`GEMINI_API_KEY`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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/google-generative-ai-CKximfd-.js b/assets/google-generative-ai-CKximfd-.js deleted file mode 100644 index 45e2a645cce62003fbc348472d3420371eba7d89..0000000000000000000000000000000000000000 --- a/assets/google-generative-ai-CKximfd-.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`google-generative-ai`;var x=p({__name:`google-generative-ai`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.anthropic.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=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(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName||`Google | Gemini`,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`Google`,placeholder:`GEMINI_API_KEY`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-BRaBstPb.js b/assets/hearing-BRaBstPb.js new file mode 100644 index 0000000000000000000000000000000000000000..6e5807cec2b2b08b32ebfc3723ebbb9515f25435 --- /dev/null +++ b/assets/hearing-BRaBstPb.js @@ -0,0 +1 @@ +import{aC as e,aF as t,aN as n,al as r,am as i,aq as a,au as o,d0 as s,d1 as c,d2 as ee,d3 as te,d4 as l,d6 as u,d8 as d,dA as f,dG as p,dH as m,da as h,dd as g,dk as _,do as v,dq as y,ds as b,dv as x}from"./index-K-hxNScn.js";import{d as S,f as C}from"./transformers.web-D42P8ZMr.js";import{b as w}from"./route-block-D_qNAUXY.js";var T=`/assets/process.worklet-CF6Ao8XG.js`,E=class{audioContext=null;audioWorkletNode=null;mediaStream=null;sourceNode=null;vad;workletInitialized=!1;constructor(e,t={}){this.vad=e,this.audioContext=new AudioContext(t.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(){this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null),this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),this.audioContext?.suspend(),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}},D=class{config;model;state;sampleRateTensor;buffer;bufferPointer=0;isRecording=!1;postSpeechSamples=0;prevBuffers=[];inferenceChain=Promise.resolve();eventListeners={};isReady=!1;constructor(e={}){let t={sampleRate:16e3,speechThreshold:.3,exitThreshold:.1,minSilenceDurationMs:400,speechPadMs:80,minSpeechDurationMs:250,maxBufferDuration:30,newBufferSize:512};this.config={...t,...e},this.buffer=new Float32Array(this.config.maxBufferDuration*this.config.sampleRate),this.sampleRateTensor=new C(`int64`,[this.config.sampleRate],[]),this.state=new C(`float32`,new Float32Array(2*1*128),[2,1,128])}async initialize(){try{this.emit(`status`,{type:`info`,message:`Loading VAD model...`}),this.model=await S.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.bufferPointerthis.model?.({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 C(`int64`,[this.config.sampleRate],[]))}getLastProbability(){return 0}isCurrentlyRecording(){return this.isRecording}};async function O(e){let t=new D(e);return await t.initialize(),t}const ne={class:`space-y-6`},re={class:`rounded-lg bg-neutral-50 p-4 dark:bg-neutral-800`},ie={class:`space-y-4`},ae={key:0,class:`space-y-3`},oe={key:1,class:`space-y-3`},se={key:2,class:`space-y-3`},ce={class:`flex items-center gap-3`},le={class:`text-sm font-medium`},ue={class:`ml-auto text-xs text-neutral-500`},de={class:`border-t border-neutral-200 pt-3 dark:border-neutral-700`},fe={key:0,class:`mt-3 space-y-2`},pe={key:0,class:`flex items-center gap-2 text-primary-600 dark:text-primary-400`},me={key:1,class:`flex items-center gap-2 text-red-600 dark:text-red-400`},he={class:`text-sm`},ge={key:2,class:`flex items-center gap-2 text-green-600 dark:text-green-400`},_e={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=te({__name:`hearing`,setup(te){let S=n({constraints:{audio:!0}}),C=_(()=>S.audioInputs.value),w=f(S.audioInputs.value[0]?.deviceId||``),D=f(!1),N=f(!1),P=f(),F=f(),I=f(),L=f(),R=f(),z=f(),B=f(0),V=f(!1),H=f(25),U=f(50),W=f(),G=f(!1),K=f(!1),q=f(``),J=f(!0),Y=f(0),X=f(.5),Z=f([]);async function ve(){if(!(G.value||K.value)){K.value=!0,q.value=``;try{let e=await O({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 E(e,{minChunkSize:512,audioContextOptions:{sampleRate:16e3,latencyHint:`interactive`}});await t.initialize(T),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(!w.value){console.warn(`No audio input device selected`);return}await $(),F.value=await navigator.mediaDevices.getUserMedia({audio:{deviceId:w.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),ye(),J.value&&(await ve(),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 ye(){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 be(){!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()))}y(w,async()=>{D.value&&await Q()}),y(N,be),y(U,()=>{L.value&&N.value&&(L.value.gain.value=U.value/100)}),y(C,()=>{!w.value&&C.value.length>0&&(w.value=C.value[0]?.deviceId)}),y(X,()=>{W.value&&G.value});async function xe(){D.value?await Q():await $()}let Se=_(()=>{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 c(()=>{S.ensurePermissions().then(()=>ee()).then(()=>{C.value.length>0&&!w.value&&(w.value=C.value[0]?.deviceId)})}),d(()=>{$(),W.value&&W.value.dispose()}),(n,c)=>(b(),u(`div`,ne,[h(`div`,null,[v(x(r),{modelValue:w.value,"onUpdate:modelValue":c[0]||=e=>w.value=e,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:C.value.map(e=>({label:e.label||e.deviceId,value:e.deviceId})),placeholder:`Select an audio input device`},null,8,[`modelValue`,`options`])]),h(`div`,re,[c[12]||=h(`h3`,{class:`mb-4 flex items-center gap-2 text-lg`},[h(`div`,{class:`text-xl`,"i-solar:volume-loud-bold-duotone":``}),s(` Monitoring `)],-1),h(`div`,ie,[v(x(a),{modelValue:D.value,"onUpdate:modelValue":[c[1]||=e=>D.value=e,xe],label:`Enable Audio Monitoring`,description:`Start monitoring audio input levels and voice activity detection`},null,8,[`modelValue`]),D.value?(b(),u(`div`,ae,[v(x(t),{level:B.value,label:`Input Level`},null,8,[`level`]),J.value&&G.value?(b(),g(x(e),{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`])):l(``,!0),J.value&&G.value?(b(),u(`div`,oe,[v(x(i),{modelValue:X.value,"onUpdate:modelValue":c[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`])])):(b(),u(`div`,se,[v(x(i),{modelValue:H.value,"onUpdate:modelValue":c[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`])])),h(`div`,ce,[h(`div`,{class:m([`h-4 w-4 rounded-full transition-all duration-200`,Se.value])},null,2),h(`span`,le,p(V.value?`Speaking Detected`:`Silence`),1),h(`span`,ue,p(J.value&&G.value?`Model Based`:`Volume Based`),1)]),h(`div`,de,[v(x(a),{modelValue:J.value,"onUpdate:modelValue":c[4]||=e=>J.value=e,label:`Model Based`,description:`Use AI models for more accurate speech detection`},null,8,[`modelValue`]),J.value?(b(),u(`div`,fe,[K.value?(b(),u(`div`,pe,c[7]||=[h(`div`,{class:`animate-spin text-sm`,"i-solar:spinner-line-duotone":``},null,-1),h(`span`,{class:`text-sm`},`Loading...`,-1)])):q.value?(b(),u(`div`,me,[c[8]||=h(`div`,{class:`text-sm`,"i-solar:close-circle-bold-duotone":``},null,-1),h(`span`,he,`Inference error: `+p(q.value),1)])):G.value?(b(),u(`div`,ge,[c[9]||=h(`div`,{class:`text-sm`,"i-solar:check-circle-bold-duotone":``},null,-1),c[10]||=h(`span`,{class:`text-sm`},`Activated`,-1),h(`span`,_e,` Probability: `+p((Y.value*100).toFixed(1))+`% `,1)])):l(``,!0)])):l(``,!0)]),J.value&&G.value?(b(),g(x(o),{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`])):l(``,!0)])):l(``,!0),D.value?(b(),u(`div`,k,[v(x(a),{modelValue:N.value,"onUpdate:modelValue":c[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?(b(),u(`div`,A,[v(x(i),{modelValue:U.value,"onUpdate:modelValue":c[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`])])):l(``,!0)])):l(``,!0),N.value?(b(),u(`div`,j,c[11]||=[h(`div`,{class:`flex items-center gap-2 text-amber-700 dark:text-amber-300`},[h(`div`,{class:`text-sm`,"i-solar:warning-circle-bold-duotone":``}),h(`span`,{class:`text-sm font-medium`},`Audio feedback warning`)],-1),h(`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)])):l(``,!0)])])]))}});typeof w==`function`&&w(N);var P=N;export{P as default}; \ No newline at end of file diff --git a/assets/hearing-M0TBmueY.js b/assets/hearing-M0TBmueY.js deleted file mode 100644 index c66867a05a2de54b0b50cda55477d9bcb6a43dd7..0000000000000000000000000000000000000000 --- a/assets/hearing-M0TBmueY.js +++ /dev/null @@ -1 +0,0 @@ -import{aC as e,aF as t,aQ as n,ao as r,ap as i,as as a,aw as o,d0 as s,d2 as c,d4 as l,d5 as ee,d6 as te,d7 as ne,d8 as re,d9 as u,dD as d,dE as f,dF as p,db as m,dd as h,df as g,di as _,dp as v,dy as y}from"./index-BOKBAzT0.js";import{b,e as x}from"./transformers.web-DzAoitZd.js";import{b as S}from"./route-block-D_qNAUXY.js";var C=`/assets/process.worklet-CF6Ao8XG.js`,ie=class{audioContext=null;audioWorkletNode=null;mediaStream=null;sourceNode=null;vad;workletInitialized=!1;constructor(e,t={}){this.vad=e,this.audioContext=new AudioContext(t.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(){this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null),this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),this.audioContext?.suspend(),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}},w=class{config;model;state;sampleRateTensor;buffer;bufferPointer=0;isRecording=!1;postSpeechSamples=0;prevBuffers=[];inferenceChain=Promise.resolve();eventListeners={};isReady=!1;constructor(e={}){let t={sampleRate:16e3,speechThreshold:.3,exitThreshold:.1,minSilenceDurationMs:400,speechPadMs:80,minSpeechDurationMs:250,maxBufferDuration:30,newBufferSize:512};this.config={...t,...e},this.buffer=new Float32Array(this.config.maxBufferDuration*this.config.sampleRate),this.sampleRateTensor=new b(`int64`,[this.config.sampleRate],[]),this.state=new b(`float32`,new Float32Array(2*1*128),[2,1,128])}async initialize(){try{this.emit(`status`,{type:`info`,message:`Loading VAD model...`}),this.model=await x.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.bufferPointerthis.model?.({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 b(`int64`,[this.config.sampleRate],[]))}getLastProbability(){return 0}isCurrentlyRecording(){return this.isRecording}};async function T(e){let t=new w(e);return await t.initialize(),t}const E={class:`space-y-6`},ae={class:`rounded-lg bg-neutral-50 p-4 dark:bg-neutral-800`},oe={class:`space-y-4`},se={key:0,class:`space-y-3`},ce={key:1,class:`space-y-3`},le={key:2,class:`space-y-3`},ue={class:`flex items-center gap-3`},de={class:`text-sm font-medium`},fe={class:`ml-auto text-xs text-neutral-500`},pe={class:`border-t border-neutral-200 pt-3 dark:border-neutral-700`},me={key:0,class:`mt-3 space-y-2`},he={key:0,class:`flex items-center gap-2 text-primary-600 dark:text-primary-400`},ge={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=re({__name:`hearing`,setup(re){let b=n({constraints:{audio:!0}}),x=v(()=>b.audioInputs.value),S=d(b.audioInputs.value[0]?.deviceId||``),w=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 ve(){if(!(G.value||K.value)){K.value=!0,q.value=``;try{let e=await T({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 ie(e,{minChunkSize:512,audioContextOptions:{sampleRate:16e3,latencyHint:`interactive`}});await t.initialize(C),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),ye(),J.value&&(await ve(),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 ye(){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 be(){!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()))}c(S,async()=>{w.value&&await Q()}),c(N,be),c(U,()=>{L.value&&N.value&&(L.value.gain.value=U.value/100)}),c(x,()=>{!S.value&&x.value.length>0&&(S.value=x.value[0]?.deviceId)}),c(X,()=>{W.value&&G.value});async function xe(){w.value?await Q():await $()}let Se=v(()=>{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 te(()=>{b.ensurePermissions().then(()=>ne()).then(()=>{x.value.length>0&&!S.value&&(S.value=x.value[0]?.deviceId)})}),h(()=>{$(),W.value&&W.value.dispose()}),(n,c)=>(l(),m(`div`,E,[g(`div`,null,[s(y(r),{modelValue:S.value,"onUpdate:modelValue":c[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`])]),g(`div`,ae,[c[12]||=g(`h3`,{class:`mb-4 flex items-center gap-2 text-lg`},[g(`div`,{class:`text-xl`,"i-solar:volume-loud-bold-duotone":``}),ee(` Monitoring `)],-1),g(`div`,oe,[s(y(a),{modelValue:w.value,"onUpdate:modelValue":[c[1]||=e=>w.value=e,xe],label:`Enable Audio Monitoring`,description:`Start monitoring audio input levels and voice activity detection`},null,8,[`modelValue`]),w.value?(l(),m(`div`,se,[s(y(t),{level:B.value,label:`Input Level`},null,8,[`level`]),J.value&&G.value?(l(),_(y(e),{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`])):u(``,!0),J.value&&G.value?(l(),m(`div`,ce,[s(y(i),{modelValue:X.value,"onUpdate:modelValue":c[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`])])):(l(),m(`div`,le,[s(y(i),{modelValue:H.value,"onUpdate:modelValue":c[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`])])),g(`div`,ue,[g(`div`,{class:p([`h-4 w-4 rounded-full transition-all duration-200`,Se.value])},null,2),g(`span`,de,f(V.value?`Speaking Detected`:`Silence`),1),g(`span`,fe,f(J.value&&G.value?`Model Based`:`Volume Based`),1)]),g(`div`,pe,[s(y(a),{modelValue:J.value,"onUpdate:modelValue":c[4]||=e=>J.value=e,label:`Model Based`,description:`Use AI models for more accurate speech detection`},null,8,[`modelValue`]),J.value?(l(),m(`div`,me,[K.value?(l(),m(`div`,he,c[7]||=[g(`div`,{class:`animate-spin text-sm`,"i-solar:spinner-line-duotone":``},null,-1),g(`span`,{class:`text-sm`},`Loading...`,-1)])):q.value?(l(),m(`div`,ge,[c[8]||=g(`div`,{class:`text-sm`,"i-solar:close-circle-bold-duotone":``},null,-1),g(`span`,_e,`Inference error: `+f(q.value),1)])):G.value?(l(),m(`div`,D,[c[9]||=g(`div`,{class:`text-sm`,"i-solar:check-circle-bold-duotone":``},null,-1),c[10]||=g(`span`,{class:`text-sm`},`Activated`,-1),g(`span`,O,` Probability: `+f((Y.value*100).toFixed(1))+`% `,1)])):u(``,!0)])):u(``,!0)]),J.value&&G.value?(l(),_(y(o),{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`])):u(``,!0)])):u(``,!0),w.value?(l(),m(`div`,k,[s(y(a),{modelValue:N.value,"onUpdate:modelValue":c[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?(l(),m(`div`,A,[s(y(i),{modelValue:U.value,"onUpdate:modelValue":c[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`])])):u(``,!0)])):u(``,!0),N.value?(l(),m(`div`,j,c[11]||=[g(`div`,{class:`flex items-center gap-2 text-amber-700 dark:text-amber-300`},[g(`div`,{class:`text-sm`,"i-solar:warning-circle-bold-duotone":``}),g(`span`,{class:`text-sm font-medium`},`Audio feedback warning`)],-1),g(`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)])):u(``,!0)])])]))}});typeof S==`function`&&S(N);var P=N;export{P as default}; \ No newline at end of file diff --git a/assets/home-DfltP_SY.js b/assets/home-DfltP_SY.js deleted file mode 100644 index eafe3f1a0a804af6ef578c58325ddaf1c9eb9cb0..0000000000000000000000000000000000000000 --- a/assets/home-DfltP_SY.js +++ /dev/null @@ -1 +0,0 @@ -import{aJ as e,d0 as t,d4 as n,d8 as r,db as i,df as a,dy as o}from"./index-BOKBAzT0.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=r({__name:`home`,setup(r){return(r,l)=>(n(),i(`div`,s,[a(`div`,c,[t(o(e))])]))}}),u=l;export{u as default}; \ No newline at end of file diff --git a/assets/home-PWxm5mNd.js b/assets/home-PWxm5mNd.js new file mode 100644 index 0000000000000000000000000000000000000000..bfb168af9aace95fe0926292aa617095d61fbb9b --- /dev/null +++ b/assets/home-PWxm5mNd.js @@ -0,0 +1 @@ +import{aJ as e,d3 as t,d6 as n,da as r,do as i,ds as a,dv as o}from"./index-K-hxNScn.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=t({__name:`home`,setup(t){return(t,l)=>(a(),n(`div`,s,[r(`div`,c,[i(o(e))])]))}}),u=l;export{u as default}; \ No newline at end of file diff --git a/assets/icon-animation-Cj5BOBLD.js b/assets/icon-animation-Cj5BOBLD.js deleted file mode 100644 index 0fbb783ffabb79468d91af92d398afd404171511..0000000000000000000000000000000000000000 --- a/assets/icon-animation-Cj5BOBLD.js +++ /dev/null @@ -1 +0,0 @@ -import{d6 as e,dD as t,dd as n,dp as r,t as i}from"./index-BOKBAzT0.js";function a(a){let o=t(!1),s=t(!1),c=t(a),l=i(),u=r(()=>s.value&&!l.disableTransitions&&l.usePageSpecificTransitions);return e(()=>{s.value=!0,requestAnimationFrame(()=>{o.value=!0})}),n(()=>{o.value=!1,s.value=!1}),{iconAnimationStarted:o,showIconAnimation:u,animationIcon:c}}export{a as b}; \ No newline at end of file diff --git a/assets/icon-animation-DYW3c7je.js b/assets/icon-animation-DYW3c7je.js new file mode 100644 index 0000000000000000000000000000000000000000..f76e041c986e283b6f56ce92d89c8d482e9479c5 --- /dev/null +++ b/assets/icon-animation-DYW3c7je.js @@ -0,0 +1 @@ +import{d1 as e,d8 as t,dA as n,dk as r,q as i}from"./index-K-hxNScn.js";function a(a){let o=n(!1),s=n(!1),c=n(a),l=i(),u=r(()=>s.value&&!l.disableTransitions&&l.usePageSpecificTransitions);return e(()=>{s.value=!0,requestAnimationFrame(()=>{o.value=!0})}),t(()=>{o.value=!1,s.value=!1}),{iconAnimationStarted:o,showIconAnimation:u,animationIcon:c}}export{a as b}; \ No newline at end of file diff --git a/assets/image-Drq3BS_B.js b/assets/image-Drq3BS_B.js new file mode 100644 index 0000000000000000000000000000000000000000..e2118de2551079918430d2c0948c75f399961820 --- /dev/null +++ b/assets/image-Drq3BS_B.js @@ -0,0 +1,2 @@ +import{aE as e,aO as t,d3 as n,d4 as r,d6 as i,dA as a,dG as o,da as s,ds as c,dv as l}from"./index-K-hxNScn.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=n({__name:`image`,setup(e){let n=a(),m=a(``),{copy:h}=t({source:m});async function g(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result?.toString()||``)},r.onerror=e=>{n(e)},r.readAsDataURL(e)})}async function _(e){let t=e.target,r=t.files?.[0];if(r){n.value=r;let e=await g(r);m.value=e}}return(e,t)=>(c(),i(`div`,null,[s(`label`,u,[s(`input`,{type:`file`,accept:`image/*`,hidden:``,onChange:_},null,32),t[1]||=s(`span`,null,`Upload Image`,-1)]),m.value?(c(),i(`div`,d,[s(`img`,{src:m.value,alt:`Uploaded Image`,"w-100":``},null,8,f),s(`pre`,p,` `+o(m.value)+` + `,1),s(`button`,{bg:`primary-500`,text:`white`,"mt-4":``,"rounded-lg":``,"px-4":``,"py-2":``,onClick:t[0]||=()=>l(h)()},` Copy Data URL `)])):r(``,!0)]))}}),h=e(m,[[`__scopeId`,`data-v-7edd53e6`]]);export{h as default}; \ No newline at end of file diff --git a/assets/image-drp9yoeo.js b/assets/image-drp9yoeo.js deleted file mode 100644 index a679ff52db68e6438126df295af35d917c0b33fa..0000000000000000000000000000000000000000 --- a/assets/image-drp9yoeo.js +++ /dev/null @@ -1,2 +0,0 @@ -import{aE as e,aR as t,d4 as n,d8 as r,d9 as i,dD as a,dE as o,db as s,df as c,dy as l}from"./index-BOKBAzT0.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=r({__name:`image`,setup(e){let r=a(),m=a(``),{copy:h}=t({source:m});async function g(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result?.toString()||``)},r.onerror=e=>{n(e)},r.readAsDataURL(e)})}async function _(e){let t=e.target,n=t.files?.[0];if(n){r.value=n;let e=await g(n);m.value=e}}return(e,t)=>(n(),s(`div`,null,[c(`label`,u,[c(`input`,{type:`file`,accept:`image/*`,hidden:``,onChange:_},null,32),t[1]||=c(`span`,null,`Upload Image`,-1)]),m.value?(n(),s(`div`,d,[c(`img`,{src:m.value,alt:`Uploaded Image`,"w-100":``},null,8,f),c(`pre`,p,` `+o(m.value)+` - `,1),c(`button`,{bg:`primary-500`,text:`white`,"mt-4":``,"rounded-lg":``,"px-4":``,"py-2":``,onClick:t[0]||=()=>l(h)()},` Copy Data URL `)])):i(``,!0)]))}}),h=e(m,[[`__scopeId`,`data-v-7edd53e6`]]);export{h as default}; \ No newline at end of file diff --git a/assets/index-CsNim-Yi.css b/assets/index-DMI81gkc.css similarity index 69% rename from assets/index-CsNim-Yi.css rename to assets/index-DMI81gkc.css index f9556fff1eada802d812f4859f2a1a04c8d77e06..8676ab3120039eb176e0c2038960d183d61dc784 100644 --- a/assets/index-CsNim-Yi.css +++ b/assets/index-DMI81gkc.css @@ -1 +1 @@ -.volumed[data-v-d8ce56aa]{transform-style:preserve-3d;width:fit-content;height:fit-content}.test-dummy-flat[data-v-28f8c660]{display:inline-block;position:relative}.test-dummy-flat .marker[data-v-28f8c660]{background:conic-gradient(#ffeb3b 0deg 90deg,#000 90deg 180deg,#ffeb3b 180deg 270deg,#000 270deg 360deg);border-radius:50%;position:absolute;inset:0;box-shadow:0 4px 12px #b9b9b933}.dark .test-dummy-flat .marker[data-v-28f8c660]{box-shadow:0 4px 12px #0003}.fade-enter-active[data-v-6b4f300d],.fade-leave-active[data-v-6b4f300d]{transition:opacity .2s}.fade-enter-from[data-v-6b4f300d],.fade-leave-to[data-v-6b4f300d]{opacity:0}.fade-enter-to[data-v-6b4f300d],.fade-leave-from[data-v-6b4f300d]{opacity:1}.form_input-range[data-v-dbfa7610]{--height:2em;min-height:var(--height);appearance:none;--thumb-width:4px;--thumb-height:var(--height);--thumb-box-shadow:0 0 0px #e6e6e6;--thumb-border:none;--thumb-border-radius:999px;--thumb-background:oklch(80% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-hover:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-active:oklch(70% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--track-height:calc(var(--height) - var(--track-value-padding)*2);--track-box-shadow:none;--track-border:solid 2px #eee;--track-border-radius:6px;--track-background:#eee9;--track-background-hover:#eee9;--track-background-active:#eee9;--track-value-background:#fff;--track-value-background-hover:#fff;--track-value-background-active:#fff;--track-value-padding:2px;background:0 0;border-radius:4px;transition:background-color .2s}.dark .form_input-range[data-v-dbfa7610]{--thumb-background:oklch(70% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-hover:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-active:oklch(80% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--track-border:solid 2px #2c2c2c;--track-background:#2c2c2cb3;--track-background-hover:#2c2c2cb3;--track-background-active:#2c2c2cb3;--track-value-background:#a4a4a4;--track-value-background-hover:#a4a4a4;--track-value-background-active:#a4a4a4}.form_input-range.slider-progress[data-v-dbfa7610]{--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min))/var(--range));--sx:calc(.5*0em + var(--ratio)*(100% - 0em))}.form_input-range[data-v-dbfa7610]:focus{outline:none}.form_input-range[data-v-dbfa7610]::-webkit-slider-thumb{appearance:none;width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:calc(var(--track-height)*.5 - var(--thumb-height)*.5 - 2px);margin-left:calc(0 - var(--track-value-padding));cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-dbfa7610]::-webkit-slider-runnable-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);box-shadow:var(--track-box-shadow);cursor:col-resize;transition:box-shadow .2s ease-in-out,border-color .2s ease-in-out;position:relative}.form_input-range[data-v-dbfa7610]::-webkit-slider-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width)*1.6);transform:scaleY(1.2)}.form_input-range[data-v-dbfa7610]:hover::-webkit-slider-runnable-track{background:var(--track-background-hover)}.form_input-range[data-v-dbfa7610]::-webkit-slider-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-dbfa7610]:active::-webkit-slider-runnable-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-dbfa7610]::-webkit-slider-runnable-track{margin-right:calc(0 - var(--track-value-padding));background:linear-gradient(var(--track-value-background),var(--track-value-background))0/var(--sx)100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-dbfa7610]:hover::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover))0/var(--sx)100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-dbfa7610]:active::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active))0/var(--sx)100% no-repeat,var(--track-background-active)}.form_input-range[data-v-dbfa7610]::-moz-range-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);box-shadow:var(--thumb-box-shadow);cursor:col-resize;margin-left:calc(0 - var(--track-value-padding));border:none;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-dbfa7610]::-moz-range-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);box-shadow:var(--track-box-shadow);cursor:col-resize;width:calc(100% - var(--track-value-padding)*2)}.form_input-range[data-v-dbfa7610]::-moz-range-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width)*1.6);transform:scaleY(1.2)}.form_input-range[data-v-dbfa7610]:hover::-moz-range-track{background:var(--track-background-hover)}.form_input-range[data-v-dbfa7610]::-moz-range-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-dbfa7610]:active::-moz-range-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-dbfa7610]::-moz-range-track{background:linear-gradient(var(--track-value-background),var(--track-value-background))0/var(--sx)100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-dbfa7610]:hover::-moz-range-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover))0/var(--sx)100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-dbfa7610]:active::-moz-range-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active))0/var(--sx)100% no-repeat,var(--track-background-active)}.form_input-range[data-v-dbfa7610]::-ms-fill-upper{background:0 0;border-color:#0000}.form_input-range[data-v-dbfa7610]::-ms-fill-lower{background:0 0;border-color:#0000}.form_input-range[data-v-dbfa7610]::-ms-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:0;margin-left:calc(0 - var(--track-value-padding));box-sizing:border-box;cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-dbfa7610]::-ms-track{height:var(--track-height);border-radius:var(--track-border-radius);background:var(--track-background);border:var(--track-border);box-shadow:var(--track-box-shadow);box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-dbfa7610]::-ms-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width)*1.6);transform:scaleY(1.2)}.form_input-range[data-v-dbfa7610]:hover::-ms-track{background:var(--track-background-hover)}.form_input-range[data-v-dbfa7610]::-ms-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-dbfa7610]:active::-ms-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-dbfa7610]::-ms-fill-lower{height:var(--track-height);border-radius:var(--track-border-radius)0 0 var(--track-border-radius);background:var(--track-value-background);margin:0;margin-left:calc(var(--track-value-padding));margin-right:calc(0 - var(--track-value-padding));border:none;border-right-width:0}.form_input-range.slider-progress[data-v-dbfa7610]:hover::-ms-fill-lower{background:var(--track-value-background-hover)}.form_input-range.slider-progress[data-v-dbfa7610]:active::-ms-fill-lower{background:var(--track-value-background-active)}.color-hue-range[data-v-3d01d2fa]{appearance:none;background:linear-gradient(90deg,#ffb2cb,#ffba76,#bedf0d,#00efd2,#90d7ff,#d8bfff,#ffb2cb);background:linear-gradient(90deg,lab(80.0841% 65.3995 .860357),lab(81.7178% 42.879 86.4545),lab(84.2289% -27.648 80.2367),lab(85.1086% -71.1664 -.472653),lab(82.2823% -19.2763 -62.1951),lab(79.7314% 41.9269 -62.2558),lab(80.0841% 65.3994 .860381));border-radius:.5rem;height:2.5rem}.color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(115 115 115/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity));background-color:rgb(38 38 38/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb:hover{width:.5rem;height:3.25rem}.dark .color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(255 255 255/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity));background-color:rgb(212 212 212/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark .color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb:hover{width:.5rem;height:3.25rem}.color-hue-range[data-v-3d01d2fa]::-moz-range-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(115 115 115/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity));background-color:rgb(38 38 38/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.color-hue-range[data-v-3d01d2fa]::-moz-range-thumb:hover{width:.5rem;height:3.25rem}.dark .color-hue-range[data-v-3d01d2fa]::-moz-range-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(255 255 255/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity));background-color:rgb(212 212 212/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark .color-hue-range[data-v-3d01d2fa]::-moz-range-thumb:hover{width:.5rem;height:3.25rem}.resize-observer[data-v-b329ee4c]{z-index:-1;pointer-events:none;opacity:0;background-color:#0000;border:none;width:100%;height:100%;display:block;position:absolute;top:0;left:0;overflow:hidden}.resize-observer[data-v-b329ee4c] object{pointer-events:none;z-index:-1;width:100%;height:100%;display:block;position:absolute;top:0;left:0;overflow:hidden}.v-popper__popper{z-index:10000;outline:none;top:0;left:0}.v-popper__arrow-container{display:none}.v-popper__inner{border:none!important}.menu-icon-item[data-v-d08788bb]{position:relative;overflow:hidden}.menu-icon-item[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:-1;opacity:0;width:25%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 30%,#0000 50%);mask-image:linear-gradient(120deg,#fff 30%,#0000 50%)}.dark .menu-icon-item[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.menu-icon-item[data-v-d08788bb]:hover:before,.menu-icon-item._hover[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .menu-icon-item[data-v-d08788bb]:hover:before,.dark .menu-icon-item._hover[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.menu-icon-item[data-v-d08788bb]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.6;z-index:-2;content:"";background-size:10px 10px;width:100%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(165deg,#fff 30%,#0000 50%);mask-image:linear-gradient(165deg,#fff 30%,#0000 50%)}.menu-icon-item[data-v-d08788bb]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .menu-icon-item[data-v-d08788bb]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.25}.dark .menu-icon-item[data-v-d08788bb]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.menu-icon-item-icon[data-v-d08788bb]{opacity:.5}.menu-icon-item:hover .menu-icon-item-title[data-v-d08788bb],.menu-icon-item._hover .menu-icon-item-title[data-v-d08788bb]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-item:hover .menu-icon-item-description[data-v-d08788bb],.menu-icon-item._hover .menu-icon-item-description[data-v-d08788bb]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.menu-icon-item:hover .menu-icon-item-icon[data-v-d08788bb],.menu-icon-item._hover .menu-icon-item-icon[data-v-d08788bb]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));scale:1.2}.dark .menu-icon-item:hover .menu-icon-item-title[data-v-d08788bb],.dark .menu-icon-item._hover .menu-icon-item-title[data-v-d08788bb]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .menu-icon-item:hover .menu-icon-item-description[data-v-d08788bb],.dark .menu-icon-item._hover .menu-icon-item-description[data-v-d08788bb]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.dark .menu-icon-item:hover .menu-icon-item-icon[data-v-d08788bb],.dark .menu-icon-item._hover .menu-icon-item-icon[data-v-d08788bb]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-status-item[data-v-93a9757f]{position:relative;overflow:hidden}.menu-icon-status-item[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .menu-icon-status-item[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.menu-icon-status-item[data-v-93a9757f]:hover:before,.menu-icon-status-item._hover[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:50%}.dark .menu-icon-status-item[data-v-93a9757f]:hover:before,.dark .menu-icon-status-item._hover[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.menu-icon-status-item-link[data-v-93a9757f]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8;z-index:-2;content:"";background-size:10px 10px;width:100%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(165deg,#fff 30%,#0000 50%);mask-image:linear-gradient(165deg,#fff 30%,#0000 50%)}.menu-icon-status-item-link[data-v-93a9757f]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .menu-icon-status-item-link[data-v-93a9757f]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.4}.dark .menu-icon-status-item-link[data-v-93a9757f]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.menu-icon-status-item-icon-color[data-v-93a9757f]{opacity:.5}.menu-icon-status-item:hover .menu-icon-status-item-title[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-title[data-v-93a9757f]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-status-item:hover .menu-icon-status-item-description[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-description[data-v-93a9757f]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-93a9757f],.menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-93a9757f]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));scale:1.2}.dark .menu-icon-status-item:hover .menu-icon-status-item-title[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-title[data-v-93a9757f]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .menu-icon-status-item:hover .menu-icon-status-item-description[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-description[data-v-93a9757f]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.dark .menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-93a9757f],.dark .menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-93a9757f]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.form_radio-card-detail[data-v-fb6236db]{position:relative;overflow:hidden}.form_radio-card-detail[data-v-fb6236db]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_radio-card-detail[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_radio-card-detail[data-v-fb6236db]:hover:before,.form_radio-card-detail._hover[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_radio-card-detail[data-v-fb6236db]:hover:before,.dark .form_radio-card-detail._hover[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_radio-card-detail-active[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:.5;width:85%}.dark .form_radio-card-detail-active[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}input[type=search][data-v-96e8e411]::-webkit-search-cancel-button{display:none}.form_radio-card-simple[data-v-880ce73f]{position:relative;overflow:hidden}.form_radio-card-simple[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_radio-card-simple[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_radio-card-simple[data-v-880ce73f]:hover:before,.form_radio-card-simple._hover[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_radio-card-simple[data-v-880ce73f]:hover:before,.dark .form_radio-card-simple._hover[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_radio-card-simple-active[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:.5;width:85%}.dark .form_radio-card-simple-active[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_voice-card[data-v-fd4023c4]{flex-direction:column;display:flex;position:relative;overflow:hidden}.form_voice-card[data-v-fd4023c4]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_voice-card[data-v-fd4023c4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_voice-card[data-v-fd4023c4]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_voice-card[data-v-fd4023c4]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}input[type=search][data-v-9ae13460]::-webkit-search-cancel-button{display:none}.voice-card[data-v-9ae13460]{flex-direction:column;display:flex;position:relative;overflow:hidden}.voice-card[data-v-9ae13460]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .voice-card[data-v-9ae13460]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.voice-card[data-v-9ae13460]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .voice-card[data-v-9ae13460]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.skeleton[data-v-fa4a54cc]{transition:all .2s ease-in-out;position:relative}.skeleton-pulse[data-v-fa4a54cc]{animation:2s ease-in-out .5s infinite skeleton-pulse-fa4a54cc}@keyframes skeleton-pulse-fa4a54cc{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.skeleton-wave[data-v-fa4a54cc]:after{content:"";border-radius:inherit;background:linear-gradient(90deg,#0000,#fff,#0000);animation:2s ease-in-out infinite skeleton-wave-fa4a54cc;position:absolute;inset:0;transform:translate(-100%)}.dark .skeleton-wave[data-v-fa4a54cc]:after{background:linear-gradient(90deg,#0000,#ffffff1a,#0000)}@keyframes skeleton-wave-fa4a54cc{0%{opacity:0;transform:translate(-100%)}60%{opacity:1;transform:translate(100%)}to{opacity:0;transform:translate(100%)}}.card-hover-effect[data-v-24a7a9d5]{transform-style:preserve-3d;transform-origin:50%;will-change:transform;transition:transform .3s cubic-bezier(.23,1,.32,1)}.card-hover-effect[data-v-24a7a9d5]:before,.card-hover-effect[data-v-24a7a9d5]:after{content:"";pointer-events:none;background-repeat:no-repeat;transition:all .33s;position:absolute;inset:0}.card-hover-effect[data-v-24a7a9d5]:before{background-position:var(--card-position-x)var(--card-position-y);background-size:300% 300%;background-image:linear-gradient(115deg,transparent 0%,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))25%,transparent 47%,transparent 53%,rgba(var(--color-primary-600),calc(.3*var(--effect-intensity)))75%,transparent 100%);opacity:calc(.5*var(--effect-intensity));filter:brightness(.5)contrast();z-index:1;mix-blend-mode:color-dodge}.card-hover-effect[data-v-24a7a9d5]:after{background-position:var(--sparkle-position-x)var(--sparkle-position-y);background-size:160%;background-image:linear-gradient(125deg,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))15%,rgba(var(--color-primary-400),calc(.25*var(--effect-intensity)))30%,rgba(var(--color-primary-300),calc(.2*var(--effect-intensity)))40%,rgba(var(--color-primary-200),calc(.1*var(--effect-intensity)))60%,rgba(var(--color-primary-400),calc(.25*var(--effect-intensity)))70%,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))85%);background-blend-mode:overlay;opacity:calc(var(--sparkle-opacity)*var(--effect-intensity));filter:brightness()contrast();z-index:2;mix-blend-mode:color-dodge}.card-hover-effect[data-v-24a7a9d5]:hover:before{opacity:calc(.88*var(--effect-intensity));filter:brightness(.66)contrast(1.33)}.card-hover-effect[data-v-24a7a9d5]:hover:after{opacity:var(--effect-intensity);filter:brightness(1.1)contrast(1.2)}.slide-next-enter-active[data-v-25cc5d94],.slide-next-leave-active[data-v-25cc5d94]{transition:transform .2s ease-in-out,opacity .2s ease-in-out}.slide-next-enter-from[data-v-25cc5d94]{opacity:0;transform:translate(100%)}.slide-next-enter-to[data-v-25cc5d94],.slide-next-leave-from[data-v-25cc5d94]{opacity:1;transform:translate(0)}.slide-next-leave-to[data-v-25cc5d94]{opacity:0;transform:translate(-100%)}.slide-prev-enter-active[data-v-25cc5d94],.slide-prev-leave-active[data-v-25cc5d94]{transition:transform .2s ease-in-out,opacity .2s ease-in-out}.slide-prev-enter-from[data-v-25cc5d94]{opacity:0;transform:translate(-100%)}.slide-prev-enter-to[data-v-25cc5d94],.slide-prev-leave-from[data-v-25cc5d94]{opacity:1;transform:translate(0)}.slide-prev-leave-to[data-v-25cc5d94]{opacity:0;transform:translate(100%)}[data-sonner-toast=""] [data-content=""]{width:100%}.stage-transition-3[data-v-17464329]{--delay:0s;--sharpness:40%;position:fixed;inset:0;overflow:hidden}.stage-transition-3[data-v-17464329]:before,.stage-transition-3[data-v-17464329]:after{content:"";animation:1s cubic-bezier(.87,.05,.02,.97) both arrowIn-17464329,1s cubic-bezier(.87,.05,.02,.97) forwards arrowOut-17464329;position:absolute;inset:0}.stage-transition-3[data-v-17464329]:before{background-color:var(--stage-transition-3-overlay-color-2);animation-delay:calc(0s + var(--delay,0s)),calc(1.4s + var(--delay,0s))}.stage-transition-3[data-v-17464329]:after{background-color:var(--stage-transition-3-overlay-color-1);animation-delay:calc(.2s + var(--delay,0s)),calc(1.2s + var(--delay,0s))}@keyframes arrowIn-17464329{0%{clip-path:polygon(calc(var(--sharpness)*-1)0,calc(var(--sharpness)*-1)0,0 50%,calc(var(--sharpness)*-1)100%,calc(var(--sharpness)*-1)100%,0 50%)}to{clip-path:polygon(calc(var(--sharpness)*-1)0,100% 0,calc(100% + var(--sharpness))50%,100% 100%,calc(var(--sharpness)*-1)100%,0 50%)}}@keyframes arrowOut-17464329{0%{clip-path:polygon(calc(var(--sharpness)*-1)0,100% 0,calc(100% + var(--sharpness))50%,100% 100%,calc(var(--sharpness)*-1)100%,0 50%)}to{clip-path:polygon(100% 0,100% 0,calc(100% + var(--sharpness))50%,100% 100%,100% 100%,calc(100% + var(--sharpness))50%)}}.circle-expansion-transition[data-v-4624be9e]{pointer-events:none;width:150vmax;height:150vmax;position:fixed;top:calc(50% - 75vmax);left:calc(50% - 75vmax)}.circle-expansion-transition div[data-v-4624be9e]{border-radius:50%;width:100%;height:100%;position:absolute;top:0;left:0;transform:scale(0)}.circle-expansion-transition div[data-v-4624be9e]:first-child{background-color:var(--circle-expansion-color-1);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + 0s)forwards}.circle-expansion-transition div[data-v-4624be9e]:nth-child(2){background-color:var(--circle-expansion-color-2);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + .15s)forwards}.circle-expansion-transition div[data-v-4624be9e]:nth-child(3){background-color:var(--circle-expansion-color-3);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + .3s)forwards}.circle-expansion-transition div[data-v-4624be9e]:nth-child(4){background-color:var(--circle-expansion-color-4);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + .45s)forwards}@keyframes circleExpand-4624be9e{0%{transform:scale(0)}to{transform:scale(1)}}.fantasy-fall-transition[data-v-826171f5]{position:fixed;inset:0;overflow:hidden}.fantasy-fall-up[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-bottom-left-radius:var(--fantasy-fall-radius-sm);border-bottom-right-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-up var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translateY(-100%)}.fantasy-fall-down[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-top-left-radius:var(--fantasy-fall-radius-sm);border-top-right-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-down var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translateY(100%)}.fantasy-fall-left[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-top-right-radius:var(--fantasy-fall-radius-sm);border-bottom-right-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-left var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translate(-100%)}.fantasy-fall-right[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-top-left-radius:var(--fantasy-fall-radius-sm);border-bottom-left-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-right var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translate(100%)}@media (min-width:768px){.fantasy-fall-up[data-v-826171f5]:before{border-bottom-left-radius:var(--fantasy-fall-radius-md);border-bottom-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-down[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-md);border-top-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-left[data-v-826171f5]:before{border-top-right-radius:var(--fantasy-fall-radius-md);border-bottom-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-right[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-md);border-bottom-left-radius:var(--fantasy-fall-radius-md)}}@media (min-width:1024px){.fantasy-fall-up[data-v-826171f5]:before{border-bottom-left-radius:var(--fantasy-fall-radius-lg);border-bottom-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-down[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-lg);border-top-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-left[data-v-826171f5]:before{border-top-right-radius:var(--fantasy-fall-radius-lg);border-bottom-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-right[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-lg);border-bottom-left-radius:var(--fantasy-fall-radius-lg)}}@keyframes fantasy-fall-up{0%{transform:translateY(-100%)}50%{transform:translateY(0%)}to{border-bottom-right-radius:0%;border-bottom-left-radius:0%;transform:translateY(0%)}}@keyframes fantasy-fall-down{0%{transform:translateY(100%)}50%{transform:translateY(0%)}to{border-top-left-radius:0%;border-top-right-radius:0%;transform:translateY(0%)}}@keyframes fantasy-fall-left{0%{transform:translate(-100%)}50%{transform:translate(0%)}to{border-top-right-radius:0%;border-bottom-right-radius:0%;transform:translate(0%)}}@keyframes fantasy-fall-right{0%{transform:translate(100%)}50%{transform:translate(0%)}to{border-top-left-radius:0%;border-bottom-left-radius:0%;transform:translate(0%)}}.stage-transition-4[data-v-4221f976]{--delay:0s;grid-template-rows:repeat(5,1fr);display:grid;position:fixed;inset:0;overflow:hidden}.stage-transition-4__block[data-v-4221f976]{width:100%;height:100%;position:relative}.stage-transition-4__block[data-v-4221f976]:before,.stage-transition-4__block[data-v-4221f976]:after{content:"";animation:.8s cubic-bezier(.87,.05,.02,.97) both slideIn-4221f976,.8s cubic-bezier(.87,.05,.02,.97) forwards slideOut-4221f976;position:absolute;inset:0}.stage-transition-4__block[data-v-4221f976]:before{background-color:var(--stage-transition-4-overlay-color-2);animation-delay:calc(0s + var(--d,0s) + var(--delay,0s)),calc(1.6s + var(--d,0s) + var(--delay,0s))}.stage-transition-4__block[data-v-4221f976]:after{background-color:var(--stage-transition-4-overlay-color-1);animation-delay:calc(.3s + var(--d,0s) + var(--delay,0s)),calc(1.3s + var(--d,0s) + var(--delay,0s))}.stage-transition-4__block[data-v-4221f976]:first-child{--d:.1s}.stage-transition-4__block[data-v-4221f976]:nth-child(2){--d:.3s}.stage-transition-4__block[data-v-4221f976]:nth-child(3){--d:0s}.stage-transition-4__block[data-v-4221f976]:nth-child(4){--d:.4s}.stage-transition-4__block[data-v-4221f976]:nth-child(5){--d:.2s}@keyframes slideIn-4221f976{0%{transform:translate(-101%)}to{transform:translate(0)}}@keyframes slideOut-4221f976{0%{transform:translate(0)}to{transform:translate(101%)}}.stage-transition-1[data-v-81c0af14]{--delay:0s;position:fixed;inset:0;overflow:hidden}.stage-transition-1[data-v-81c0af14]:before,.stage-transition-1[data-v-81c0af14]:after{content:"";animation:1s cubic-bezier(.87,.05,.02,.97) both slideIn-81c0af14,1s cubic-bezier(.87,.05,.02,.97) forwards slideOut-81c0af14;position:absolute;inset:0}.stage-transition-1[data-v-81c0af14]:before{background-color:var(--stage-transition-1-overlay-color-2);animation-delay:calc(0s + var(--delay,0s)),calc(1.4s + var(--delay,0s))}.stage-transition-1[data-v-81c0af14]:after{background-color:var(--stage-transition-1-overlay-color-1);animation-delay:calc(.2s + var(--delay,0s)),calc(1.2s + var(--delay,0s))}@keyframes slideIn-81c0af14{0%{transform:translate(-101%)}to{transform:translate(0)}}@keyframes slideOut-81c0af14{0%{transform:translate(0)}to{transform:translate(101%)}}.stage-transition-2[data-v-9e8b66c8]{--delay:0s;--skew-x:100%;position:fixed;inset:0;overflow:hidden}.stage-transition-2[data-v-9e8b66c8]:before,.stage-transition-2[data-v-9e8b66c8]:after{content:"";animation:1s cubic-bezier(.87,.05,.02,.97) both maskIn-9e8b66c8,1s cubic-bezier(.87,.05,.02,.97) forwards maskOut-9e8b66c8;position:absolute;inset:0}.stage-transition-2[data-v-9e8b66c8]:before{background-color:var(--stage-transition-2-overlay-color-2);animation-delay:calc(0s + var(--delay,0s)),calc(1.4s + var(--delay,0s))}.stage-transition-2[data-v-9e8b66c8]:after{background-color:var(--stage-transition-2-overlay-color-1);animation-delay:calc(.2s + var(--delay,0s)),calc(1.2s + var(--delay,0s))}@keyframes maskIn-9e8b66c8{0%{clip-path:polygon(0 0,0 0,calc(var(--skew-x,0)*-1)100%,calc(var(--skew-x,0)*-1)100%)}to{clip-path:polygon(0 0,calc(100% + var(--skew-x,0))0,100% 100%,calc(var(--skew-x,0)*-1)100%)}}@keyframes maskOut-9e8b66c8{0%{clip-path:polygon(0 0,calc(100% + var(--skew-x,0))0,100% 100%,calc(var(--skew-x,0)*-1)100%)}to{clip-path:polygon(calc(100% + var(--skew-x,0))0,calc(100% + var(--skew-x,0))0,100% 100%,100% 100%)}}.rectangle-rotate-transition[data-v-45ea2f7f]{position:fixed;inset:0;overflow:hidden}.rectangle[data-v-45ea2f7f]{width:100%;height:100%;position:absolute}.rectangle div[data-v-45ea2f7f]{width:100vmax;height:100vmax;position:absolute;transform:scale(0)}.rectangle-rotate-1 div[data-v-45ea2f7f]{background-color:var(--rectangle-rotate-1-color);animation:expand-rotate-45ea2f7f var(--rectangle-rotate-duration)ease calc(var(--rectangle-rotate-delay) + 0s)forwards;top:-50vmax;left:-50vmax}.rectangle-rotate-2 div[data-v-45ea2f7f]{background-color:var(--rectangle-rotate-2-color);animation:expand-rotate-45ea2f7f var(--rectangle-rotate-duration)ease calc(var(--rectangle-rotate-delay) + var(--rectangle-rotate-stagger))forwards;bottom:-50vmax;right:-50vmax}.rectangle-rotate-3 div[data-v-45ea2f7f]{background-color:var(--rectangle-rotate-3-color);animation:expand-rotate-45ea2f7f var(--rectangle-rotate-duration)ease calc(var(--rectangle-rotate-delay) + calc(var(--rectangle-rotate-stagger)*2))forwards;top:calc(50% - 50vmax);left:calc(50% - 50vmax)}@keyframes expand-rotate-45ea2f7f{0%{transform:scale(0)rotate(0)}to{transform:scale(1)rotate(var(--rectangle-rotate-rotation))}}html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%,-35%)}html[dir=rtl],[data-sonner-toaster][dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%,-35%)}[data-sonner-toaster]{width:var(--width);--gray1:#fcfcfc;--gray2:#f8f8f8;--gray3:#f3f3f3;--gray4:#ededed;--gray5:#e8e8e8;--gray6:#e2e2e2;--gray7:#dbdbdb;--gray8:#c7c7c7;--gray9:#8f8f8f;--gray10:#858585;--gray11:#6f6f6f;--gray12:#171717;--border-radius:8px;box-sizing:border-box;z-index:999999999;outline:none;margin:0;padding:0;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;list-style:none;transition:transform .4s;position:fixed}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift)*var(--gap));z-index:var(--z-index);opacity:0;transform:var(--y);touch-action:none;box-sizing:border-box;overflow-wrap:anywhere;outline:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;position:absolute}[data-sonner-toast][data-styled=true]{background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);width:var(--width);align-items:center;gap:6px;padding:16px;font-size:13px;display:flex;box-shadow:0 4px 12px #0000001a}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{--y:translateY(-100%);--lift:1;--lift-amount:calc(1*var(--gap));top:0}[data-sonner-toast][data-y-position=bottom]{--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift)*var(--gap));bottom:0}[data-sonner-toast][data-styled=true] [data-description]{color:#3f3f3f;font-weight:400;line-height:1.4}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{color:inherit;font-weight:500;line-height:1.5}[data-sonner-toast][data-styled=true] [data-icon]{width:16px;height:16px;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end);flex-shrink:0;justify-content:flex-start;align-items:center;display:flex;position:relative}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform-origin:50%;animation:.3s forwards sonner-fade-in;transform:scale(.8)}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{flex-direction:column;gap:2px;display:flex}[data-sonner-toast][data-styled=true] [data-button]{height:24px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);cursor:pointer;border:none;border-radius:4px;outline:none;flex-shrink:0;align-items:center;padding-left:8px;padding-right:8px;font-size:12px;font-weight:500;transition:opacity .4s,box-shadow .2s;display:flex}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:#00000014}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:#ffffff4d}[data-sonner-toast][data-styled=true] [data-close-button]{left:var(--toast-close-button-start);right:var(--toast-close-button-end);width:20px;height:20px;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);cursor:pointer;z-index:1;border-radius:50%;justify-content:center;align-items:center;padding:0;transition:opacity .1s,background .2s,border-color .2s;display:flex;position:absolute;top:0}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";z-index:-1;height:100%;position:absolute;left:-100%;right:-100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3)translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3)translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]:after{content:"";height:calc(var(--gap) + 1px);width:100%;position:absolute;bottom:100%;left:0}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before)*.05 + 1;--y:translateY(calc(var(--lift-amount)*var(--toasts-before)))scale(calc(-1*var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift)*var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift)*-100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift)*var(--offset) + var(--lift)*-100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y)translateY(var(--swipe-amount-y,0px))translateX(var(--swipe-amount-x,0px));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y)translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y)translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y)translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y)translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y)translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y)translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y)translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y)translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%;position:fixed}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left)*-1)}[data-sonner-toaster] [data-sonner-toast]{width:calc(100% - var(--mobile-offset-left)*2);left:0;right:0}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:#ecfdf3;--success-border:#bffcd9;--success-text:#008a2e;--info-bg:#f0f8ff;--info-border:#dde7fd;--info-text:#0973dc;--warning-bg:#fffcf0;--warning-border:#fbeeb1;--warning-text:#dc7609;--error-bg:#fff0f0;--error-border:#ffe0e1;--error-text:#e60000}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:#333;--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:#1f1f1f;--normal-border:#333;--normal-border-hover:#404040;--normal-text:var(--gray1);--success-bg:#001f0f;--success-border:#003d1c;--success-text:#59f3a6;--info-bg:#000d1f;--info-border:#19233e;--info-text:#5896f3;--warning-bg:#1d1f00;--warning-border:#2e2e00;--warning-text:#f3cf58;--error-bg:#2d0607;--error-border:#4d0408;--error-text:#ff9ea1}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);z-index:10;position:absolute;inset:0}.sonner-loading-wrapper[data-visible=false]{transform-origin:50%;animation:.2s forwards sonner-fade-out}.sonner-spinner{height:var(--size);width:var(--size);position:relative;top:50%;left:50%}.sonner-loading-bar{background:var(--gray11);border-radius:6px;width:24%;height:8%;animation:1.2s linear infinite sonner-spin;position:absolute;top:-3.9%;left:-10%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg)translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg)translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg)translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg)translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg)translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg)translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg)translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg)translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg)translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg)translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg)translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg)translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{transform-origin:50%;transition:opacity .2s,transform .2s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8)translate(-50%,-50%)}@property --chromatic-hue{syntax:"";inherits:true;initial-value:0}@keyframes hue-anim{0%{--chromatic-hue:0}to{--chromatic-hue:360}}.dynamic-hue{animation:10s linear infinite hue-anim}@font-face{font-family:cjkfonts AllSeto;font-style:normal;font-display:swap;src:url(/assets/cjkFonts_allseto_v1.11-ByBdljxl.ttf)format("truetype")}@font-face{font-family:Xiaolai SC;font-style:normal;font-display:swap;src:url(/assets/XiaolaiSC-Regular-SNWuh554.ttf)format("truetype")}*,:before,:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before,:after{--un-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.slide-away-enter-active,.slide-away-leave-active{transition:transform .3s ease-in-out,opacity .3s ease-in-out}.slide-away-enter,.slide-away-leave-to{opacity:0;transform:translateY(-10px)}.slide-away-enter-from,.slide-away-leave{opacity:0;transform:translateY(10px)}:root{--bg-color-light:#fff;--bg-color-dark:#121212;--bg-color:var(--bg-color-light)}html,body,#app{overscroll-behavior:none;height:100%;margin:0;padding:0}html{background:var(--bg-color);transition:all .3s ease-in-out}html.dark{--bg-color:var(--bg-color-dark);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}#nprogress{pointer-events:none}#nprogress .bar{background:color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))70%,#636363);opacity:.75;z-index:1031;width:100%;height:2px;position:fixed;top:0;left:0}@supports (color:lab(0% 0 0)){#nprogress .bar{background:color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))70%,lab(42% 0 0))}}.dark #nprogress .bar{background:`color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))90%,#dedede)`}@supports (color:lab(0% 0 0)){.dark #nprogress .bar{background:`color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))90%,lab(88.4% 0 0))`}}@media (display-mode:standalone){#nprogress,#nprogress .bar{display:none}}@font-face{font-family:DM Sans;font-style:normal;font-display:swap;font-weight:100 1000;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-sans:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Sans;font-style:normal;font-display:swap;font-weight:100 1000;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-sans:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:DM Serif Display;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-serif-display@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Serif Display;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-serif-display@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-300-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-400-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-500-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-300-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-400-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-500-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-800-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-ext-800-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/greek-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+1F??}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/kayah-li-wght-normal.woff2)format("woff2-variations");unicode-range:U+200C-200D,U+2010,U+25CC,U+A900-A92F}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Gugi;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/gugi@latest/korean-400-normal.woff2)format("woff2")}@font-face{font-family:Gugi;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/gugi@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Urbanist;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/urbanist:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Urbanist;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/urbanist:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-100-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-300-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-400-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-500-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-700-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-800-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-900-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-100-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-300-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-400-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-500-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-700-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-800-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-900-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-100-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-300-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-400-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-500-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-700-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-800-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-900-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-100-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-300-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-400-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-500-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-700-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-800-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-900-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-100-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-300-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-400-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-500-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-700-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-800-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-900-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-100-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-300-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-400-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-500-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-700-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-800-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-900-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-100-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-700-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-800-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-900-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-100-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-700-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-800-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-900-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-100-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-300-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-400-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-500-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-700-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-800-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-900-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}*,:before,:after,::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:root{--chromatic-hue:220.44;--chromatic-chroma:calc(.18 + (cos(var(--chromatic-hue)*3.14159/180)*.04));--chromatic-chroma-50:calc(var(--chromatic-chroma)*.3);--chromatic-chroma-100:calc(var(--chromatic-chroma)*.5);--chromatic-chroma-200:calc(var(--chromatic-chroma)*.6);--chromatic-chroma-300:calc(var(--chromatic-chroma)*.75);--chromatic-chroma-400:calc(var(--chromatic-chroma)*.85);--chromatic-chroma-500:var(--chromatic-chroma);--chromatic-chroma-600:calc(var(--chromatic-chroma)*1.15);--chromatic-chroma-700:calc(var(--chromatic-chroma)*1.1);--chromatic-chroma-800:calc(var(--chromatic-chroma)*.85);--chromatic-chroma-900:calc(var(--chromatic-chroma)*.7);--chromatic-chroma-950:calc(var(--chromatic-chroma)*.5)}.i-eos-icons\:three-dots-loading,[i-eos-icons\:three-dots-loading=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='18' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.67' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.33' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='0' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:alibabacloud{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M14.752 4.64h5.274C22.242 4.64 24 6.475 24 8.691V15.8a3.947 3.947 0 01-3.974 3.975h-5.274l1.299-1.835 3.822-1.222c.688-.23 1.146-.918 1.146-1.605v-5.81c0-.687-.458-1.375-1.146-1.605L16.05 6.475l-1.3-1.835zM2.98 15.111c0 .688.46 1.376 1.147 1.606l3.822 1.146 1.3 1.835H3.974A3.947 3.947 0 010 15.723V8.69c0-2.216 1.758-4.05 3.975-4.05h5.273L7.95 6.474 4.127 7.697c-.688.23-1.146.918-1.146 1.606v5.808z'/%3E%3Cpath d='M16.051 11.213H8.025v1.835h8.026v-1.835z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:anthropic{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:cloudflare{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cg%3E%3Cpath d='M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437'/%3E%3Cpath d='M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:deepseek{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:featherless-ai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' width='1em' height='1em' %3E%3Cg fill='currentColor'%3E%3Cpath d='M40.0866 4.68482C38.2902 3.5825 35.863 3 33.0672 3C28.7842 3 24.0653 4.35865 19.8276 6.72206L19.7979 6.71083C19.7979 6.71083 19.7937 6.73344 19.7914 6.74423C18.5086 7.4617 17.2656 8.2629 16.0981 9.15731C9.22112 14.4248 7.29519 20.6748 8.92004 24.0156C7.14142 27.0728 6.0457 30.2332 6 33.9767C9.41949 27.421 11.4719 22.108 22.6146 13.1637C19.4309 13.8501 13.9281 17.1057 10.2271 22.0459C9.87793 19.156 12.1477 14.4895 17.2033 10.6174C17.8435 10.127 18.5092 9.66864 19.1886 9.23374C18.6577 10.8934 18.8269 10.4806 17.7254 12.8076C19.3543 11.2566 20.4268 10.2995 22.035 7.64145C24.123 6.60964 26.2948 5.83844 28.4482 5.37235C28.0919 6.56071 27.4137 8.57466 26.4955 10.1669C26.4955 10.1669 28.8258 9.66435 30.7518 9.77788C29.6995 10.9459 28.7527 12.2094 27.7926 13.5012C26.4777 15.2696 25.1184 17.0983 23.3778 18.8005C23.1683 19.0054 22.968 19.1912 22.7649 19.383C20.0902 19.1254 18.3235 20.1315 16.6683 21.9089C17.9737 21.2966 19.7273 20.7924 20.8266 21.0959C18.8008 22.7579 15.6106 24.9488 12.9893 24.7684C12.4922 25.5295 12.4608 25.5528 11.9144 26.4722C16.1664 27.537 21.507 23.1905 24.6498 20.1161C26.4926 18.3131 27.8964 16.4257 29.2534 14.6012C32.0481 10.8427 34.4616 7.5974 39.8153 6.3624L42 5.85877L40.0866 4.68482Z' class='logo-mark'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:fireworks{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:gemini{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M12 24A14.304 14.304 0 000 12 14.304 14.304 0 0012 0a14.305 14.305 0 0012 12 14.305 14.305 0 00-12 12'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:huggingface{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.781 3.277c2.997 1.704 4.844 4.851 4.844 8.258 0 .995-.155 1.955-.443 2.857a1.332 1.332 0 011.125.4 1.41 1.41 0 01.2 1.723c.204.165.352.385.428.632l.017.062c.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.255.57-.893 1.018-2.128 1.5l-.202.078-.131.048c-.478.173-.89.295-1.061.345l-.086.024c-.89.243-1.808.375-2.732.394-1.32 0-2.3-.36-2.923-1.067a9.852 9.852 0 01-3.18.018C9.778 21.647 8.802 22 7.494 22a11.249 11.249 0 01-2.541-.343l-.221-.06-.273-.08a16.574 16.574 0 01-1.175-.405c-1.237-.483-1.875-.93-2.13-1.501-.186-.4-.151-.867.093-1.236a1.42 1.42 0 01-.2-1.166c.069-.273.226-.516.447-.694a1.41 1.41 0 01.2-1.722c.233-.248.557-.391.917-.407l.078-.001a9.385 9.385 0 01-.44-2.85c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0zM4.188 14.758c.125.687 2.357 2.35 2.14 2.707-.19.315-.796-.239-.948-.386l-.041-.04-.168-.147c-.561-.479-2.304-1.9-2.74-1.432-.43.46.119.859 1.055 1.42l.784.467.136.083c1.045.643 1.12.84.95 1.113-.188.295-3.07-2.1-3.34-1.083-.27 1.011 2.942 1.304 2.744 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725l.16.04.175.042c1.227.284 3.565.65 4.435-.604.673-.973.64-1.709-.248-2.61l-.057-.057c-.945-.928-1.495-2.288-1.495-2.288l-.017-.058-.025-.072c-.082-.22-.284-.639-.63-.584-.46.073-.798 1.21.12 1.933l.05.038c.977.721-.195 1.21-.573.534l-.058-.104-.143-.25c-.463-.799-1.282-2.111-1.739-2.397-.532-.332-.907-.148-.782.541zm14.842-.541c-.533.335-1.563 2.074-1.94 2.751a.613.613 0 01-.687.302.436.436 0 01-.176-.098.303.303 0 01-.049-.06l-.014-.028-.008-.02-.007-.019-.003-.013-.003-.017a.289.289 0 01-.004-.048c0-.12.071-.266.25-.427.026-.024.054-.047.084-.07l.047-.036c.022-.016.043-.032.063-.049.883-.71.573-1.81.131-1.917l-.031-.006-.056-.004a.368.368 0 00-.062.006l-.028.005-.042.014-.039.017-.028.015-.028.019-.036.027-.023.02c-.173.158-.273.428-.31.542l-.016.054s-.53 1.309-1.439 2.234l-.054.054c-.365.358-.596.69-.702 1.018-.143.437-.066.868.21 1.353.055.097.117.195.187.296.882 1.275 3.282.876 4.494.59l.286-.07.25-.074c.276-.084.736-.233 1.2-.42l.188-.077.065-.028.064-.028.124-.056.081-.038c.529-.252.964-.543.994-.827l.001-.036a.299.299 0 00-.037-.139c-.094-.176-.271-.212-.491-.168l-.045.01c-.044.01-.09.024-.136.04l-.097.035-.054.022c-.559.23-1.238.705-1.607.745h.006a.452.452 0 01-.05.003h-.024l-.024-.003-.023-.005c-.068-.016-.116-.06-.14-.142a.22.22 0 01-.005-.1c.062-.345.958-.595 1.713-.91l.066-.028c.528-.224.97-.483.985-.832v-.04a.47.47 0 00-.016-.098c-.048-.18-.175-.251-.36-.251-.785 0-2.55 1.36-2.92 1.36-.025 0-.048-.007-.058-.024a.6.6 0 01-.046-.088c-.1-.238.068-.462 1.06-1.066l.209-.126c.538-.32 1.01-.588 1.341-.831.29-.212.475-.406.503-.6l.003-.028c.008-.113-.038-.227-.147-.344a.266.266 0 00-.07-.054l-.034-.015-.013-.005a.403.403 0 00-.13-.02c-.162 0-.369.07-.595.18-.637.313-1.431.952-1.826 1.285l-.249.215-.033.033c-.08.078-.288.27-.493.386l-.071.037-.041.019a.535.535 0 01-.122.036h.005a.346.346 0 01-.031.003l.01-.001-.013.001c-.079.005-.145-.021-.19-.095a.113.113 0 01-.014-.065c.027-.465 2.034-1.991 2.152-2.642l.009-.048c.1-.65-.271-.817-.791-.493zM11.938 2.984c-4.798 0-8.688 3.829-8.688 8.55 0 .692.083 1.364.24 2.008l.008-.009c.252-.298.612-.46 1.017-.46.355.008.699.117.993.312.22.14.465.384.715.694.261-.372.69-.598 1.15-.605.852 0 1.367.728 1.562 1.383l.047.105.06.127c.192.396.595 1.139 1.143 1.68 1.06 1.04 1.324 2.115.8 3.266a8.865 8.865 0 002.024-.014c-.505-1.12-.26-2.17.74-3.186l.066-.066c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694a1.87 1.87 0 01.99-.312c.357 0 .682.126.925.36.14-.61.215-1.245.215-1.898 0-4.722-3.89-8.55-8.687-8.55zm1.857 8.926l.439-.212c.553-.264.89-.383.89.152 0 1.093-.771 3.208-3.155 3.262h-.184c-2.325-.052-3.116-2.06-3.156-3.175l-.001-.087c0-1.107 1.452.586 3.25.586.716 0 1.379-.272 1.917-.526zm4.017-3.143c.45 0 .813.358.813.8 0 .441-.364.8-.813.8a.806.806 0 01-.812-.8c0-.442.364-.8.812-.8zm-11.624 0c.448 0 .812.358.812.8 0 .441-.364.8-.812.8a.806.806 0 01-.813-.8c0-.442.364-.8.813-.8zm7.79-.841c.32-.384.846-.54 1.33-.394.483.146.83.564.878 1.06.048.495-.212.97-.659 1.203-.322.168-.447-.477-.767-.585l.002-.003c-.287-.098-.772.362-.925.079a1.215 1.215 0 01.14-1.36zm-4.323 0c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003c-.108.036-.194.134-.273.24l-.118.165c-.11.15-.22.262-.377.18a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:microsoft{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M11.49 2H2v9.492h9.492V2h-.002z'/%3E%3Cpath d='M22 2h-9.492v9.492H22V2z'/%3E%3Cpath d='M11.49 12.508H2V22h9.492v-9.492h-.002z'/%3E%3Cpath d='M22 12.508h-9.492V22H22v-9.492z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:mistral{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:moonshot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:novita{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M9.167 4.17v5.665L0 19.003h9.167v-5.666l5.666 5.666H24L9.167 4.17z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:ollama{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:openai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:openrouter{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:perplexity{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:player2{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M19.956 10.178C19.8934 10.7544 19.724 11.6784 19.1182 12.5274C18.3667 13.5817 17.3528 13.8824 16.9558 13.9746C16.6911 14.0049 16.3026 14.045 15.8323 14.0789C14.1804 14.2045 13.0525 14.1565 11.7041 14.131C10.81 14.1143 9.54304 14.1034 7.98548 14.131C7.97564 16.7493 7.96551 19.368 7.95508 21.987L5 22V15.8717C5.00358 14.6542 5.00983 12.9193 5.03397 10.7643C6.47441 10.7684 14.6905 10.7205 15.6696 10.7721C15.8672 10.7841 16.3621 10.8039 16.6764 10.4458C16.8842 10.2113 16.9696 9.83348 16.9763 9.26802C16.9835 8.82659 16.9902 8.38204 16.9763 7.94322C16.9459 6.90454 16.608 6.51472 15.7103 6.51107C12.8124 6.5069 9.91142 6.43915 7.01356 6.51107C6.60048 6.51888 5.90083 6.53087 5.02056 6.50325V3C5.43007 3.00782 6.13285 3.02397 7.00686 3.01563C11.1399 2.98436 12.7292 3.01199 15.5328 3.01563C18.3591 3.0198 19.994 4.94393 19.994 8.26009C19.9913 8.90059 20.0253 9.54944 19.956 10.178Z'/%3E%3Cpath d='M20 19H11V22H20V19Z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:together{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cg%3E%3Cpath d='M17.385 11.23a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm0 10.77a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm-10.77 0a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23z' opacity='.2'/%3E%3Ccircle cx='6.615' cy='6.615' r='4.615'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:vllm{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M0 4.973h9.324V23L0 4.973z'/%3E%3Cpath d='M13.986 4.351L22.378 0l-6.216 23H9.324l4.662-18.649z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:volcengine{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M7.29 5.36L3.148 21.737a.215.215 0 00.203.261h8.29a.214.214 0 00.215-.261L7.7 5.359a.214.214 0 00-.41 0z' fill-opacity='.5'/%3E%3Cpath clip-rule='evenodd' d='M4.553 16.18l-1.406 5.558a.214.214 0 00.203.261h2.42-4.551a.214.214 0 01-.214-.26l2.275-8.961a.214.214 0 01.409 0l.864 3.402z'/%3E%3Cpath d='M14.44.15a.214.214 0 00-.41 0L8.366 21.739a.214.214 0 00.214.261H19.9a.214.214 0 00.215-.261L14.44.151z' fill-opacity='.5'/%3E%3Cpath clip-rule='evenodd' d='M16.694 22h3.207a.215.215 0 00.214-.262l-1.839-6.993 1.164-4.592a.214.214 0 01.411 0l2.951 11.586a.214.214 0 01-.214.261h-5.894z'/%3E%3Cpath d='M10.278 7.741L6.685 21.736a.214.214 0 00.214.264h7.17a.216.216 0 00.214-.166.216.216 0 000-.098L10.687 7.742a.214.214 0 00-.409 0z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:xai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:ghost,[i-lucide\:ghost=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 10h.01M15 10h.01M12 2a8 8 0 0 0-8 8v12l3-3l2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:mic,[i-lucide\:mic=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 19v3m7-12v2a7 7 0 0 1-14 0v-2'/%3E%3Crect width='6' height='13' x='9' y='2' rx='3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:music,[i-lucide\:music=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:discord{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:elevenlabs{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.604 0v24h4.931V0zm9.86 0v24h4.933V0z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:github,[i-simple-icons\:github=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:javascript{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M0 0h24v24H0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873c-.736-.345-1.554-.585-1.797-1.14c-.091-.33-.105-.51-.046-.705c.15-.646.915-.84 1.515-.66c.39.12.75.42.976.9c1.034-.676 1.034-.676 1.755-1.125c-.27-.42-.404-.601-.586-.78c-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005c-1.14 1.291-.811 3.541.569 4.471c1.365 1.02 3.361 1.244 3.616 2.205c.24 1.17-.87 1.545-1.966 1.41c-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109c1.74 1.756 6.09 1.666 6.871-1.004c.029-.09.24-.705.074-1.65zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805c0 1.232.063 2.363-.138 2.711c-.33.689-1.18.601-1.566.48c-.396-.196-.597-.466-.83-.855c-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517c.855.51 2.004.675 3.207.405c.783-.226 1.458-.691 1.811-1.411c.51-.93.402-2.07.397-3.346c.012-2.054 0-4.109 0-6.179z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:x{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584l-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:add-circle-line-duotone,[i-solar\:add-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12h-3m0 0H9m3 0V9m0 3v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:add-square-line-duotone,[i-solar\:add-square-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12h-3m0 0H9m3 0V9m0 3v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:alt-arrow-down-linear,[i-solar\:alt-arrow-down-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19 9l-7 6l-7-6'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:alt-arrow-left-line-duotone,[i-solar\:alt-arrow-left-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m15 5l-6 7l6 7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:armchair-2-bold-duotone,[i-solar\:armchair-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.533 18H6.75v2a.75.75 0 1 1-1.5 0v-2.324c-.829-.362-1.49-1.005-1.808-1.817l-.039-.102L2.1 12.264C1.685 11.15 2.613 10 3.927 10c.81 0 1.534.453 1.81 1.134l1.098 2.706c.1.246.15.37.222.47a1.2 1.2 0 0 0 .74.463c.13.027.277.027.57.027h6.98c.569 0 .853 0 1.091-.098q.196-.082.349-.219c.184-.166.281-.405.475-.883l1.001-2.466c.276-.68 1-1.134 1.81-1.134c1.314 0 2.242 1.15 1.827 2.264l-1.12 3c-.195.524-.292.785-.421 1.008a3.43 3.43 0 0 1-1.609 1.404V20a.75.75 0 1 1-1.5 0v-2.005c-.187.005-.415.005-.717.005'/%3E%3Cpath fill='currentColor' d='M13.236 3.5h-2.472c-1.1 0-1.976 0-2.66.088c-.706.09-1.285.28-1.746.72c-.464.441-.669 1.003-.765 1.685c-.093.658-.093 1.495-.093 2.54v2.195q.147.186.237.406l1.098 2.706c.1.246.15.37.222.47a1.2 1.2 0 0 0 .74.463c.13.027.277.027.57.027h6.98c.569 0 .853 0 1.091-.098q.196-.082.349-.219c.184-.166.281-.405.475-.883l1.001-2.466q.09-.221.237-.406V8.533c0-1.045 0-1.882-.093-2.54c-.096-.682-.301-1.244-.765-1.686c-.46-.438-1.04-.629-1.745-.72c-.685-.087-1.56-.087-2.661-.087' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:arrow-right-line-duotone,[i-solar\:arrow-right-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Cpath fill='currentColor' d='M4 11.25a.75.75 0 0 0 0 1.5zm0 1.5h16v-1.5H4z' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m14 6l6 6l-6 6'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:arrow-up-outline,[i-solar\:arrow-up-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.47 3.47a.75.75 0 0 1 1.06 0l6 6a.75.75 0 1 1-1.06 1.06l-4.72-4.72V20a.75.75 0 0 1-1.5 0V5.81l-4.72 4.72a.75.75 0 1 1-1.06-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:book-bookmark-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 20.028V18H8v2.028c0 .277 0 .416.095.472s.224-.006.484-.13l1.242-.593c.088-.042.132-.063.179-.063s.091.02.179.063l1.242.593c.26.124.39.186.484.13c.095-.056.095-.195.095-.472' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8 18h-.574c-1.084 0-1.462.006-1.753.068c-.513.11-.96.347-1.285.667c-.11.108-.164.161-.291.505s-.107.489-.066.78l.022.15c.11.653.31.998.616 1.244c.307.246.737.407 1.55.494c.837.09 1.946.092 3.536.092h4.43c1.59 0 2.7-.001 3.536-.092c.813-.087 1.243-.248 1.55-.494s.506-.591.616-1.243c.091-.548.11-1.241.113-2.171h-8v2.028c0 .277 0 .416-.095.472s-.224-.006-.484-.13l-1.242-.593c-.088-.042-.132-.063-.179-.063s-.091.02-.179.063l-1.242.593c-.26.124-.39.186-.484.13C8 20.444 8 20.305 8 20.028z'/%3E%3Cpath fill='currentColor' d='M4.727 2.733c.306-.308.734-.508 1.544-.618C7.105 2.002 8.209 2 9.793 2h4.414c1.584 0 2.688.002 3.522.115c.81.11 1.238.31 1.544.618c.305.308.504.74.613 1.557c.112.84.114 1.955.114 3.552V18H7.426c-1.084 0-1.462.006-1.753.068c-.513.11-.96.347-1.285.667c-.11.108-.164.161-.291.505A1.3 1.3 0 0 0 4 19.7V7.842c0-1.597.002-2.711.114-3.552c.109-.816.308-1.249.613-1.557' opacity='.5'/%3E%3Cpath fill='currentColor' d='M7.25 7A.75.75 0 0 1 8 6.25h8a.75.75 0 0 1 0 1.5H8A.75.75 0 0 1 7.25 7M8 9.75a.75.75 0 0 0 0 1.5h5a.75.75 0 0 0 0-1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:bookmark-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M21 11.098v4.993c0 3.096 0 4.645-.734 5.321c-.35.323-.792.526-1.263.58c-.987.113-2.14-.907-4.445-2.946c-1.02-.901-1.529-1.352-2.118-1.47a2.2 2.2 0 0 0-.88 0c-.59.118-1.099.569-2.118 1.47c-2.305 2.039-3.458 3.059-4.445 2.945a2.24 2.24 0 0 1-1.263-.579C3 20.736 3 19.188 3 16.091v-4.994C3 6.81 3 4.666 4.318 3.333S7.758 2 12 2s6.364 0 7.682 1.332S21 6.81 21 11.098' opacity='.5'/%3E%3Cpath fill='currentColor' d='M9 5.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:box-minimalistic-bold-duotone,[i-solar\:box-minimalistic-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8.422 20.618C10.178 21.54 11.056 22 12 22V12L2.638 7.073l-.04.067C2 8.154 2 9.417 2 11.942v.117c0 2.524 0 3.787.597 4.801c.598 1.015 1.674 1.58 3.825 2.709z'/%3E%3Cpath fill='currentColor' d='m17.577 4.432l-2-1.05C13.822 2.461 12.944 2 12 2c-.945 0-1.822.46-3.578 1.382l-2 1.05C4.318 5.536 3.242 6.1 2.638 7.072L12 12l9.362-4.927c-.606-.973-1.68-1.537-3.785-2.641' opacity='.7'/%3E%3Cpath fill='currentColor' d='m21.403 7.14l-.041-.067L12 12v10c.944 0 1.822-.46 3.578-1.382l2-1.05c2.151-1.129 3.227-1.693 3.825-2.708c.597-1.014.597-2.277.597-4.8v-.117c0-2.525 0-3.788-.597-4.802' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:bug-bold-duotone,[i-solar\:bug-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M19 11.938V15a7 7 0 0 1-6.25 6.96V15a.75.75 0 0 0-1.5 0v6.96A7 7 0 0 1 5 15v-3.062A3.94 3.94 0 0 1 8.938 8h6.124A3.94 3.94 0 0 1 19 11.938' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M19 14.75v-1.5h3a.75.75 0 0 1 0 1.5zm-1.504 4.586c.31-.393.58-.82.801-1.276l2.538 1.27a.75.75 0 1 1-.67 1.34zM5.703 18.06q.333.684.801 1.276l-2.669 1.335a.75.75 0 0 1-.67-1.342zM5 13.25H2a.75.75 0 0 0 0 1.5h3zm12.354-4.515l2.81-1.406a.75.75 0 1 1 .671 1.341L18.42 9.88a4 4 0 0 0-1.065-1.144M6.647 8.735c-.427.306-.79.695-1.067 1.144L3.165 8.67a.75.75 0 0 1 .67-1.341zM16.5 8.27V7.5a4.5 4.5 0 1 0-9 0v.77A3.9 3.9 0 0 1 8.938 8h6.124c.508 0 .993.096 1.438.27'/%3E%3Cpath fill='currentColor' d='M6.376 1.584a.75.75 0 0 0 .208 1.04l2.36 1.573a4.5 4.5 0 0 1 1.387-.877L7.416 1.376a.75.75 0 0 0-1.04.208m8.68 2.613a4.5 4.5 0 0 0-1.387-.877l2.915-1.944a.75.75 0 1 1 .832 1.248z' opacity='.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 14.25a.75.75 0 0 1 .75.75v7h-1.5v-7a.75.75 0 0 1 .75-.75' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:card-search-broken,[i-solar\:card-search-broken=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' d='M14 4c3.771 0 5.657 0 6.828 1.172S22 8.229 22 12v1M10 4C6.229 4 4.343 4 3.172 5.172S2 8.229 2 12s0 5.657 1.172 6.828S6.229 20 10 20h3m-3-4H6'/%3E%3Ccircle cx='18' cy='17' r='3'/%3E%3Cpath stroke-linecap='round' d='m20.5 19.5l1 1M2 10h5m15 0H11'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:chat-round-line-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12c0 1.6.376 3.112 1.043 4.453c.178.356.237.763.134 1.148l-.595 2.226a1.3 1.3 0 0 0 1.591 1.592l2.226-.596a1.63 1.63 0 0 1 1.149.133A9.96 9.96 0 0 0 12 22' opacity='.5'/%3E%3Cpath fill='currentColor' d='M7.825 12.85a.825.825 0 0 0 0 1.65h6.05a.825.825 0 0 0 0-1.65zm0-3.85a.825.825 0 0 0 0 1.65h8.8a.825.825 0 0 0 0-1.65z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:chat-square-like-bold-duotone,[i-solar\:chat-square-like-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m13.629 20.472l-.542.916c-.483.816-1.69.816-2.174 0l-.542-.916c-.42-.71-.63-1.066-.968-1.262c-.338-.197-.763-.204-1.613-.219c-1.256-.021-2.043-.098-2.703-.372a5 5 0 0 1-2.706-2.706C2 14.995 2 13.83 2 11.5v-1c0-3.273 0-4.91.737-6.112a5 5 0 0 1 1.65-1.651C5.59 2 7.228 2 10.5 2h3c3.273 0 4.91 0 6.113.737a5 5 0 0 1 1.65 1.65C22 5.59 22 7.228 22 10.5v1c0 2.33 0 3.495-.38 4.413a5 5 0 0 1-2.707 2.706c-.66.274-1.447.35-2.703.372c-.85.015-1.275.022-1.613.219c-.338.196-.548.551-.968 1.262' opacity='.5'/%3E%3Cpath fill='currentColor' d='M10.99 14.308c-1.327-.978-3.49-2.84-3.49-4.593c0-2.677 2.475-3.677 4.5-1.609c2.025-2.068 4.5-1.068 4.5 1.609c0 1.752-2.163 3.615-3.49 4.593c-.454.335-.681.502-1.01.502s-.556-.167-1.01-.502'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:check-circle-bold-duotone,[i-solar\:check-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M16.03 8.97a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47l2.235-2.235L14.97 8.97a.75.75 0 0 1 1.06 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:check-circle-line-duotone,[i-solar\:check-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m8.5 12.5l2 2l5-5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:close-circle-bold-duotone,[i-solar\:close-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.97 8.97a.75.75 0 0 1 1.06 0L12 10.94l1.97-1.97a.75.75 0 1 1 1.06 1.06L13.06 12l1.97 1.97a.75.75 0 0 1-1.06 1.06L12 13.06l-1.97 1.97a.75.75 0 0 1-1.06-1.06L10.94 12l-1.97-1.97a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:close-circle-line-duotone,[i-solar\:close-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='m14.5 9.5l-5 5m0-5l5 5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:code-bold-duotone,[i-solar\:code-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.443 7.328a.75.75 0 0 1 1.059-.056l1.737 1.564c.737.663 1.347 1.212 1.767 1.71c.44.525.754 1.088.754 1.784c0 .695-.313 1.258-.754 1.782c-.42.499-1.03 1.049-1.767 1.711l-1.737 1.564a.75.75 0 1 1-1.004-1.115l1.697-1.527c.788-.709 1.319-1.19 1.663-1.598c.33-.393.402-.622.402-.817c0-.196-.072-.425-.402-.818c-.344-.409-.875-.889-1.663-1.598l-1.697-1.527a.75.75 0 0 1-.056-1.06m-8.94 1.06a.75.75 0 0 0-1.004-1.115L4.761 8.836c-.737.663-1.347 1.212-1.767 1.71c-.44.525-.754 1.088-.754 1.784c0 .695.313 1.258.754 1.782c.42.499 1.03 1.049 1.767 1.711l1.737 1.564a.75.75 0 1 0 1.004-1.115l-1.697-1.527c-.788-.709-1.319-1.19-1.663-1.598c-.33-.393-.402-.622-.402-.817c0-.196.072-.425.402-.818c.344-.409.875-.889 1.663-1.598z'/%3E%3Cpath fill='currentColor' d='M14.182 4.276a.75.75 0 0 1 .53.918l-3.974 14.83a.75.75 0 1 1-1.449-.389l3.974-14.83a.75.75 0 0 1 .919-.53' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:danger-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12s4.477 10 10 10s10-4.477 10-10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 6.25a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0V7a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:danger-triangle-bold-duotone,[i-solar\:danger-triangle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 3c-2.31 0-3.77 2.587-6.688 7.762l-.364.644c-2.425 4.3-3.638 6.45-2.542 8.022S6.214 21 11.636 21h.728c5.422 0 8.134 0 9.23-1.572s-.117-3.722-2.542-8.022l-.364-.645C15.77 5.587 14.311 3 12 3' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 7.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V8a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:dialog-2-bold-duotone,[i-solar\:dialog-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m10.404 22.48l.275-.465c.44-.745.66-1.117 1.012-1.325c.351-.207.81-.222 1.725-.252c.859-.027 1.436-.102 1.93-.306a4.24 4.24 0 0 0 2.295-2.296c.323-.779.323-1.767.323-3.743v-.848c0-2.777 0-4.165-.625-5.185c-.35-.57-.83-1.05-1.4-1.4c-1.02-.625-2.408-.625-5.185-.625H8.21c-2.777 0-4.165 0-5.185.625c-.57.35-1.05.83-1.4 1.4C1 9.08 1 10.468 1 13.245v.848c0 1.976 0 2.964.323 3.744a4.24 4.24 0 0 0 2.295 2.295c.494.204 1.07.28 1.93.306c.916.03 1.374.045 1.725.252c.35.208.571.58 1.012 1.325l.275.465c.41.692 1.434.692 1.844 0m2.789-7.963a1.06 1.06 0 1 0 0-2.12a1.06 1.06 0 0 0 0 2.12m-2.65-1.06a1.06 1.06 0 1 1-2.121 0a1.06 1.06 0 0 1 2.12 0m-4.772 1.06a1.06 1.06 0 1 0 0-2.12a1.06 1.06 0 0 0 0 2.12' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M15.486 1c1.267 0 2.274 0 3.082.077c.829.079 1.53.244 2.153.626a4.8 4.8 0 0 1 1.575 1.575c.383.624.548 1.325.627 2.153c.076.808.076 1.816.076 3.082v.866c0 .901 0 1.619-.04 2.2c-.04.595-.125 1.106-.323 1.584a4.77 4.77 0 0 1-2.67 2.617q-.21.082-.368.135h-1.65c.016-.499.016-1.093.016-1.822v-.848c0-2.777 0-4.165-.625-5.185c-.35-.57-.83-1.05-1.4-1.4c-1.02-.625-2.408-.625-5.185-.625H8.21c-.986 0-1.796 0-2.478.028v-1.65q.05-.17.13-.396q.133-.389.346-.739a4.8 4.8 0 0 1 1.576-1.575c.624-.382 1.324-.547 2.153-.626C10.745 1 11.752 1 13.019 1z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:document-text-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M3 10c0-3.771 0-5.657 1.172-6.828S7.229 2 11 2h2c3.771 0 5.657 0 6.828 1.172S21 6.229 21 10v4c0 3.771 0 5.657-1.172 6.828S16.771 22 13 22h-2c-3.771 0-5.657 0-6.828-1.172S3 17.771 3 14z'/%3E%3Cpath stroke-linecap='round' d='M8 12h8M8 8h8m-8 8h5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:emoji-funny-square-bold-duotone,[i-solar\:emoji-funny-square-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M6.504 21.52c1.633.943 3.706.387 7.853-.724s6.22-1.666 7.163-3.3s.387-3.706-.724-7.853s-1.666-6.22-3.3-7.163s-3.706-.388-7.853.724c-4.147 1.11-6.22 1.666-7.163 3.3s-.388 3.706.724 7.853c1.11 4.147 1.666 6.22 3.3 7.163' opacity='.5'/%3E%3Cpath fill='currentColor' d='M14.898 11.224c.533-.143.792-.908.578-1.708s-.821-1.333-1.355-1.19c-.533.143-.792.907-.577 1.708c.214.8.82 1.333 1.354 1.19m-5.796 1.553c.534-.143.792-.908.578-1.708s-.82-1.333-1.354-1.19s-.792.907-.578 1.708s.82 1.333 1.354 1.19m-.917 2.974a.75.75 0 0 1 .91-.545c1.13.283 2.428.287 3.746-.066c1.318-.354 2.44-1.006 3.278-1.816a.75.75 0 1 1 1.043 1.078a8.4 8.4 0 0 1-1.15.928l.159.322a1.5 1.5 0 1 1-2.693 1.322l-.196-.4l-.053.014c-1.555.417-3.112.42-4.499.073a.75.75 0 0 1-.545-.91'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:eye-closed-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.919 6.605a1 1 0 0 0-1.838.79l.002.003l.003.007l.01.021l.032.072q.04.09.12.25c.105.21.262.506.47.857c.41.687 1.027 1.6 1.872 2.52l-.797.797a1 1 0 1 0 1.414 1.414l.84-.84c.565.455 1.197.885 1.897 1.256l-.782 1.202a1 1 0 0 0 1.676 1.091l.985-1.514c.677.208 1.402.355 2.177.425V16.5a1 1 0 0 0 1 1V13c-2.748 0-4.819-1.199-6.304-2.59l-.024-.022a12 12 0 0 1-.564-.569a13.4 13.4 0 0 1-1.67-2.237a12 12 0 0 1-.516-.968zm-1.838.79L2 7c-.92.394-.919.395-.919.395' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M15.22 12.398A8.7 8.7 0 0 1 12 13v4.5a1 1 0 0 0 1-1v-1.544c.772-.07 1.497-.217 2.176-.425l.986 1.515a1 1 0 0 0 1.676-1.091l-.782-1.203c.701-.37 1.332-.8 1.897-1.256l.84.84a1 1 0 1 0 1.414-1.414l-.797-.798a15.4 15.4 0 0 0 2.302-3.296a10 10 0 0 0 .19-.395l.011-.026l.004-.008l.002-.005a1 1 0 1 0-1.838-.788l-.005.011a5 5 0 0 1-.146.302a13 13 0 0 1-2.614 3.48c-.841.79-1.87 1.517-3.095 2' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:face-scan-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.801 2.57a.71.71 0 0 1-.555.838a8.78 8.78 0 0 0-6.838 6.838a.71.71 0 1 1-1.394-.283a10.2 10.2 0 0 1 7.949-7.949a.71.71 0 0 1 .838.556M2.57 13.199a.71.71 0 0 1 .838.555a8.78 8.78 0 0 0 6.838 6.838a.71.71 0 1 1-.283 1.394a10.2 10.2 0 0 1-7.948-7.949a.71.71 0 0 1 .555-.838M13.199 2.57a.71.71 0 0 1 .838-.556a10.2 10.2 0 0 1 7.949 7.949a.711.711 0 0 1-1.394.283a8.78 8.78 0 0 0-6.838-6.838a.71.71 0 0 1-.555-.838m8.231 10.629a.71.71 0 0 1 .556.838a10.2 10.2 0 0 1-7.949 7.949a.711.711 0 0 1-.283-1.394a8.78 8.78 0 0 0 6.838-6.838a.71.71 0 0 1 .838-.555' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M12 19.583a7.583 7.583 0 1 0 0-15.166a7.583 7.583 0 0 0 0 15.166' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.94 14.539a.71.71 0 0 1 .995-.148c.59.437 1.3.69 2.065.69a3.45 3.45 0 0 0 2.065-.69a.71.71 0 1 1 .847 1.142a4.87 4.87 0 0 1-2.912.97a4.87 4.87 0 0 1-2.911-.97a.71.71 0 0 1-.148-.994m5.547-2.895c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244m-4.976 0c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:filters-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M18 8A6 6 0 1 1 6 8a6 6 0 0 1 12 0'/%3E%3Cpath fill='currentColor' d='M13.58 13.79a6 6 0 0 1-7.16-3.58a6 6 0 1 0 7.16 3.58' opacity='.7'/%3E%3Cpath fill='currentColor' d='M13.58 13.79c.271.684.42 1.43.42 2.21a6 6 0 0 1-2 4.472a6 6 0 1 0 5.58-10.262a6.01 6.01 0 0 1-4 3.58' opacity='.4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:forward-linear,[i-solar\:forward-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19.5 12l-5-5m5 5l-5 5m5-5h-10c-1.667 0-5 1-5 5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:ghost-bold-duotone,[i-solar\:ghost-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 19.206V12c0-5.523-4.477-10-10-10S2 6.477 2 12v7.206a1.727 1.727 0 0 0 2.5 1.544a2.89 2.89 0 0 1 2.896.18a2.89 2.89 0 0 0 3.208 0l.353-.234a1.88 1.88 0 0 1 2.086 0l.353.235a2.89 2.89 0 0 0 3.208 0a2.89 2.89 0 0 1 2.897-.18A1.727 1.727 0 0 0 22 19.206' opacity='.5'/%3E%3Cpath fill='currentColor' d='M15 12c.552 0 1-.672 1-1.5S15.552 9 15 9s-1 .672-1 1.5s.448 1.5 1 1.5m-5-1.5c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5S8.448 9 9 9s1 .672 1 1.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:info-circle-line-duotone,[i-solar\:info-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='12' cy='12' r='10' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='M12 17v-6'/%3E%3Ccircle cx='1' cy='1' r='1' fill='currentColor' transform='matrix(1 0 0 -1 11 9)'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:layers-bold-duotone,[i-solar\:layers-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.979 9.685C2.993 8.891 2 8.494 2 8s.993-.89 2.979-1.685l2.808-1.123C9.773 4.397 10.767 4 12 4s2.227.397 4.213 1.192l2.808 1.123C21.007 7.109 22 7.506 22 8s-.993.89-2.979 1.685l-2.808 1.124C14.227 11.603 13.233 12 12 12s-2.227-.397-4.213-1.191z'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 8c0 .494.993.89 2.979 1.685l2.808 1.124C9.773 11.603 10.767 12 12 12s2.227-.397 4.213-1.191l2.808-1.124C21.007 8.891 22 8.494 22 8s-.993-.89-2.979-1.685l-2.808-1.123C14.227 4.397 13.233 4 12 4s-2.227.397-4.213 1.192L4.98 6.315C2.993 7.109 2 7.506 2 8' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m5.766 10l-.787.315C2.993 11.109 2 11.507 2 12s.993.89 2.979 1.685l2.808 1.124C9.773 15.603 10.767 16 12 16s2.227-.397 4.213-1.191l2.808-1.124C21.007 12.891 22 12.493 22 12s-.993-.89-2.979-1.685L18.234 10l-2.021.809C14.227 11.603 13.233 12 12 12s-2.227-.397-4.213-1.191z' opacity='.7'/%3E%3Cpath fill='currentColor' d='m5.766 14l-.787.315C2.993 15.109 2 15.507 2 16s.993.89 2.979 1.685l2.808 1.124C9.773 19.603 10.767 20 12 20s2.227-.397 4.213-1.192l2.808-1.123C21.007 16.891 22 16.494 22 16c0-.493-.993-.89-2.979-1.685L18.234 14l-2.021.809C14.227 15.603 13.233 16 12 16s-2.227-.397-4.213-1.191z' opacity='.4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:leaf-bold-duotone,[i-solar\:leaf-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 22c-4.418 0-8-3.646-8-8.143c0-4.462 2.553-9.67 6.537-11.531A3.45 3.45 0 0 1 12 2z' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M13.463 2.326A3.45 3.45 0 0 0 12 2v7l4.432-4.432c-.863-.947-1.86-1.724-2.97-2.242' opacity='.3'/%3E%3Cpath fill='currentColor' d='M12 9v5.5l6.614-6.614c-.572-1.22-1.308-2.357-2.182-3.318z' opacity='.4'/%3E%3Cpath fill='currentColor' d='m12 19.5l7.811-7.811a15 15 0 0 0-1.197-3.803L12 14.5z' opacity='.6'/%3E%3Cpath fill='currentColor' d='M19.811 11.689L12 19.5V22c4.418 0 8-3.646 8-8.143c0-.71-.064-1.438-.189-2.168' opacity='.7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magic-stick-2-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.714 2.127c-.836-.43-1.922.263-4.095 1.65l-.562.36c-.618.394-.927.591-1.273.648c-.347.056-.692-.034-1.382-.215l-.628-.164C6.345 3.769 5.13 3.45 4.436 4.13s-.412 1.908.157 4.363l.147.635c.161.697.242 1.046.177 1.393c-.066.346-.27.65-.68 1.26l-.372.555c-1.439 2.145-2.158 3.217-1.753 4.067c.406.85 1.668.915 4.192 1.045l.654.033c.717.037 1.076.056 1.382.213c.306.158.524.436.962.994l.398.507c1.539 1.962 2.309 2.943 3.255 2.788c.945-.154 1.441-1.342 2.433-3.717l.257-.614c.282-.675.422-1.012.677-1.261c.255-.25.595-.382 1.274-.647l.618-.24c2.39-.933 3.586-1.4 3.765-2.345s-.777-1.744-2.688-3.342l-.495-.413c-.543-.454-.815-.68-.963-.992s-.158-.672-.175-1.393l-.016-.657c-.062-2.538-.093-3.806-.928-4.236'/%3E%3Cpath fill='currentColor' d='M15.93 16.991c.127-.268.239-.45.392-.6c.172-.167.382-.282.71-.42l4.498 4.499a.75.75 0 0 1-1.06 1.06z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magic-stick-3-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3.845 3.845a2.883 2.883 0 0 0 0 4.077L5.432 9.51c.012-.014.555.503.568.49l4-4c.013-.013-.504-.556-.49-.568L7.922 3.845a2.883 2.883 0 0 0-4.077 0m1.288 11.462a.483.483 0 0 1 .9 0l.157.4a.48.48 0 0 0 .272.273l.398.157a.486.486 0 0 1 0 .903l-.398.158a.48.48 0 0 0-.272.273l-.157.4a.483.483 0 0 1-.9 0l-.157-.4a.48.48 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.903l.398-.157a.48.48 0 0 0 .272-.274z' opacity='.5'/%3E%3Cpath fill='currentColor' d='M19.967 9.13a.483.483 0 0 1 .9 0l.156.399c.05.125.148.224.273.273l.398.158a.486.486 0 0 1 0 .902l-.398.158a.5.5 0 0 0-.273.273l-.156.4a.483.483 0 0 1-.9 0l-.157-.4a.5.5 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.902l.398-.158a.5.5 0 0 0 .272-.273z' opacity='.2'/%3E%3Cpath fill='currentColor' d='M16.1 2.307a.483.483 0 0 1 .9 0l.43 1.095a.48.48 0 0 0 .272.274l1.091.432a.486.486 0 0 1 0 .903l-1.09.432a.5.5 0 0 0-.273.273L17 6.81a.483.483 0 0 1-.9 0l-.43-1.095a.5.5 0 0 0-.273-.273l-1.09-.432a.486.486 0 0 1 0-.903l1.09-.432a.5.5 0 0 0 .273-.274z' opacity='.7'/%3E%3Cpath fill='currentColor' d='M10.568 6.49c-.012.014-.555-.503-.568-.49l-4 4c-.013.013.504.556.49.568l9.588 9.587a2.883 2.883 0 1 0 4.078-4.077z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magnifer-line-duotone,[i-solar\:magnifer-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cdefs%3E%3Cmask id='solarMagniferLineDuotone0'%3E%3Cg fill='none' stroke-width='1.5'%3E%3Ccircle cx='11.5' cy='11.5' r='9.5' stroke='gray'/%3E%3Cpath stroke='%23fff' stroke-linecap='round' d='M18.5 18.5L22 22'/%3E%3C/g%3E%3C/mask%3E%3C/defs%3E%3Cpath fill='currentColor' d='M0 0h24v24H0z' mask='url(%23solarMagniferLineDuotone0)'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:microphone-2-bold-duotone,[i-solar\:microphone-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M4 9a.75.75 0 0 1 .75.75v1a7.25 7.25 0 1 0 14.5 0v-1a.75.75 0 0 1 1.5 0v1a8.75 8.75 0 0 1-8 8.718v2.282a.75.75 0 0 1-1.5 0v-2.282a8.75 8.75 0 0 1-8-8.718v-1A.75.75 0 0 1 4 9' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M9.75 7.75A.75.75 0 0 0 9 7H6.298a5.751 5.751 0 0 1 11.404 0H13.5a.75.75 0 0 0 0 1.5h4.25V10H13.5a.75.75 0 0 0 0 1.5h4.201a5.751 5.751 0 0 1-11.403 0H9A.75.75 0 0 0 9 10H6.25V8.5H9a.75.75 0 0 0 .75-.75' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12.75 10.75c0 .414.336.75.75.75h4.201l.049-1.5H13.5a.75.75 0 0 0-.75.75m0-3c0 .414.336.75.75.75h4.25L17.701 7H13.5a.75.75 0 0 0-.75.75m-3 0A.75.75 0 0 0 9 7H6.298L6.25 8.5H9a.75.75 0 0 0 .75-.75m0 3A.75.75 0 0 0 9 10H6.25l.048 1.5H9a.75.75 0 0 0 .75-.75'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:microphone-3-bold-duotone,[i-solar\:microphone-3-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M4 9a.75.75 0 0 1 .75.75v1a7.25 7.25 0 1 0 14.5 0v-1a.75.75 0 0 1 1.5 0v1a8.75 8.75 0 0 1-8 8.718v2.282a.75.75 0 0 1-1.5 0v-2.282a8.75 8.75 0 0 1-8-8.718v-1A.75.75 0 0 1 4 9' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 2a5.75 5.75 0 0 0-5.75 5.75v3a5.75 5.75 0 0 0 11.5 0v-3A5.75 5.75 0 0 0 12 2m2 9.5a.75.75 0 0 0 0-1.5h-4a.75.75 0 0 0 0 1.5zm-.25-3.75a.75.75 0 0 1-.75.75h-2A.75.75 0 0 1 11 7h2a.75.75 0 0 1 .75.75' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M14 11.5a.75.75 0 0 0 0-1.5h-4a.75.75 0 0 0 0 1.5zm-1-3A.75.75 0 0 0 13 7h-2a.75.75 0 0 0 0 1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:minus-circle-line-duotone,[i-solar\:minus-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12H9'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:notes-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='m20.312 12.647l.517-1.932c.604-2.255.907-3.382.68-4.358a4 4 0 0 0-1.162-2.011c-.731-.685-1.859-.987-4.114-1.591c-2.255-.605-3.383-.907-4.358-.68a4 4 0 0 0-2.011 1.162c-.587.626-.893 1.543-1.348 3.209l-.244.905l-.517 1.932c-.605 2.255-.907 3.382-.68 4.358a4 4 0 0 0 1.162 2.011c.731.685 1.859.987 4.114 1.592c2.032.544 3.149.843 4.064.73q.15-.019.294-.052a4 4 0 0 0 2.011-1.16c.685-.732.987-1.86 1.592-4.115Z'/%3E%3Cpath d='M16.415 17.974a4 4 0 0 1-1.068 1.678c-.731.685-1.859.987-4.114 1.591s-3.383.907-4.358.679a4 4 0 0 1-2.011-1.161c-.685-.731-.988-1.859-1.592-4.114l-.517-1.932c-.605-2.255-.907-3.383-.68-4.358a4 4 0 0 1 1.162-2.011c.731-.685 1.859-.987 4.114-1.592q.638-.172 1.165-.309'/%3E%3Cpath stroke-linecap='round' d='m11.777 10l4.83 1.294M11 12.898l2.898.776'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:pallete-2-bold-duotone,[i-solar\:pallete-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10.847 21.934C5.867 21.362 2 17.133 2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 5.157-3.283 4.733-6.086 4.37c-1.618-.209-3.075-.397-3.652.518c-.395.626.032 1.406.555 1.929a1.673 1.673 0 0 1 0 2.366c-.523.523-1.235.836-1.97.751' opacity='.5'/%3E%3Cpath fill='currentColor' d='M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0M6.5 13a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m11 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m-3-4.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:pause-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.076 8.617C8 8.801 8 9.034 8 9.5v5c0 .466 0 .699.076.883a1 1 0 0 0 .541.54c.184.077.417.077.883.077s.699 0 .883-.076a1 1 0 0 0 .54-.541c.077-.184.077-.417.077-.883v-5c0-.466 0-.699-.076-.883a1 1 0 0 0-.541-.54C10.199 8 9.966 8 9.5 8s-.699 0-.883.076a1 1 0 0 0-.54.541m4.999 0C13 8.801 13 9.034 13 9.5v5c0 .466 0 .699.076.883a1 1 0 0 0 .541.54c.184.077.417.077.883.077s.699 0 .883-.076a1 1 0 0 0 .54-.541c.077-.184.077-.417.077-.883v-5c0-.466 0-.699-.076-.883a1 1 0 0 0-.541-.54C15.199 8 14.966 8 14.5 8s-.699 0-.883.076a1 1 0 0 0-.54.541'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:people-nearby-bold-duotone,[i-solar\:people-nearby-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19.717 20.362C21.143 19.585 22 18.587 22 17.5c0-1.152-.963-2.204-2.546-3C17.623 13.58 14.962 13 12 13s-5.623.58-7.454 1.5C2.963 15.296 2 16.348 2 17.5s.963 2.204 2.546 3C6.377 21.42 9.038 22 12 22c3.107 0 5.882-.637 7.717-1.638' opacity='.6'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M9.25 4a2.75 2.75 0 1 1 5.5 0a2.75 2.75 0 0 1-5.5 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m8.223 11.574l-2.175-.725a1.532 1.532 0 0 1 .805-2.952l1.898.407l.21.044a15 15 0 0 0 6.288-.044l1.897-.407a1.532 1.532 0 0 1 .806 2.952l-2.175.725c-.263.088-.394.132-.493.193a1 1 0 0 0-.466.986c.016.115.066.244.165.503l1.247 3.242a1.473 1.473 0 0 1-2.654 1.26L12 15l-1.576 2.757a1.473 1.473 0 0 1-2.654-1.26l1.247-3.241c.1-.259.149-.388.165-.503a1 1 0 0 0-.466-.986c-.099-.061-.23-.105-.493-.193'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:play-circle-bold-duotone,[i-solar\:play-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='m15.414 13.059l-4.72 2.787C9.934 16.294 9 15.71 9 14.786V9.214c0-.924.934-1.507 1.694-1.059l4.72 2.787c.781.462.781 1.656 0 2.118'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:play-circle-broken{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M13.888 9.935C14.963 10.812 15.5 11.25 15.5 12s-.537 1.188-1.612 2.065c-.297.242-.591.47-.862.66c-.237.167-.506.339-.784.508c-1.073.652-1.609.978-2.09.617c-.48-.36-.524-1.116-.612-2.628c-.024-.427-.04-.846-.04-1.222s.016-.795.04-1.222c.088-1.512.132-2.267.612-2.628c.481-.361 1.018-.035 2.09.617c.278.169.547.341.784.508c.27.19.565.418.862.66Z'/%3E%3Cpath stroke-linecap='round' d='M7 3.338A9.95 9.95 0 0 1 12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12c0-1.821.487-3.53 1.338-5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:refresh-bold-duotone,[i-solar\:refresh-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12.079 2.25c-4.794 0-8.734 3.663-9.118 8.333H2a.75.75 0 0 0-.528 1.283l1.68 1.666a.75.75 0 0 0 1.056 0l1.68-1.666a.75.75 0 0 0-.528-1.283h-.893c.38-3.831 3.638-6.833 7.612-6.833a7.66 7.66 0 0 1 6.537 3.643a.75.75 0 1 0 1.277-.786A9.16 9.16 0 0 0 12.08 2.25'/%3E%3Cpath fill='currentColor' d='M20.841 10.467a.75.75 0 0 0-1.054 0L18.1 12.133a.75.75 0 0 0 .527 1.284h.899c-.381 3.83-3.651 6.833-7.644 6.833a7.7 7.7 0 0 1-6.565-3.644a.75.75 0 1 0-1.276.788a9.2 9.2 0 0 0 7.84 4.356c4.809 0 8.766-3.66 9.151-8.333H22a.75.75 0 0 0 .527-1.284z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:running-2-line-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='18.5' cy='4.5' r='2.5' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='m9 17l-1 1.2c-.738.886-1.107 1.328-1.61 1.564S5.31 20 4.157 20H3'/%3E%3Cpath fill='currentColor' d='M13.65 22a.75.75 0 0 0 1.5 0zm-1.085-5.754l.453-.598zm1.184 1.015l.587-.466zm.557 1.12l.727-.186zm-.802-6.826a.75.75 0 0 0-1.009-1.11zm-2.652 1.61l.703.26zm.07 1.555l-.677.323zm2.728 5.219v2.06h1.5v-2.06zm-1.538-3.095c.663.502.887.679 1.05.884l1.174-.934c-.308-.387-.717-.69-1.319-1.146zm3.038 3.095c0-.755.006-1.264-.117-1.744l-1.453.373c.065.254.07.538.07 1.37zm-1.988-2.211c.197.247.339.534.417.84l1.454-.373a3.75 3.75 0 0 0-.697-1.4zm-.667-7.283c-.42.381-.945.836-1.354 1.224c-.21.198-.41.398-.573.586c-.149.172-.327.4-.42.649l1.407.521c-.007.021.014-.035.146-.187c.116-.134.276-.295.471-.48c.4-.38.865-.778 1.332-1.203zm.523 5.203c-.488-.37-.818-.62-1.056-.832c-.233-.208-.32-.33-.363-.418l-1.354.645c.167.35.423.63.72.894c.292.26.679.552 1.147.907zm-2.87-2.744a2.75 2.75 0 0 0 .097 2.139l1.354-.645a1.25 1.25 0 0 1-.044-.973z' opacity='.5'/%3E%3Cpath fill='currentColor' d='m5.436 8.82l-.37-.652zm-1.807.164a.75.75 0 1 0 .742 1.304zm9.778-1.627l-.286.693zm-2.96-.715l-.055-.748zM21 12.75a.75.75 0 1 0 0-1.5zm-5.232-3.213l-.67.335zM5.065 8.168l-1.436.816l.742 1.304l1.435-.816zm8.627-1.505c-1.344-.553-2.08-.857-3.3-.769l.11 1.496c.823-.06 1.255.099 2.62.66zm-7.886 2.81c2.502-1.422 3.552-2 4.695-2.083l-.109-1.496c-1.56.114-2.949.923-5.327 2.274zm13.949 3.276H21v-1.5h-1.245zm-4.658-2.878a5.21 5.21 0 0 0 4.658 2.878v-1.5A3.71 3.71 0 0 1 16.439 9.2zm1.342-.67a5.33 5.33 0 0 0-2.747-2.538l-.57 1.387c.86.354 1.564 1 1.975 1.821z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:scale-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12' opacity='.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M16.656 2.75a.75.75 0 0 1 0-1.5H22a.75.75 0 0 1 .75.75v5.344a.75.75 0 0 1-1.5 0V3.81l-7.44 7.439H16a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1-.75-.75V8a.75.75 0 0 1 1.5 0v2.19l7.44-7.44z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:settings-bold-duotone,[i-solar\:settings-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M14.279 2.152C13.909 2 13.439 2 12.5 2s-1.408 0-1.779.152a2 2 0 0 0-1.09 1.083c-.094.223-.13.484-.145.863a1.62 1.62 0 0 1-.796 1.353a1.64 1.64 0 0 1-1.579.008c-.338-.178-.583-.276-.825-.308a2.03 2.03 0 0 0-1.49.396c-.318.242-.553.646-1.022 1.453c-.47.807-.704 1.21-.757 1.605c-.07.526.074 1.058.4 1.479c.148.192.357.353.68.555c.477.297.783.803.783 1.361s-.306 1.064-.782 1.36c-.324.203-.533.364-.682.556a2 2 0 0 0-.399 1.479c.053.394.287.798.757 1.605s.704 1.21 1.022 1.453c.424.323.96.465 1.49.396c.242-.032.487-.13.825-.308a1.64 1.64 0 0 1 1.58.008c.486.28.774.795.795 1.353c.015.38.051.64.145.863c.204.49.596.88 1.09 1.083c.37.152.84.152 1.779.152s1.409 0 1.779-.152a2 2 0 0 0 1.09-1.083c.094-.223.13-.483.145-.863c.02-.558.309-1.074.796-1.353a1.64 1.64 0 0 1 1.579-.008c.338.178.583.276.825.308c.53.07 1.066-.073 1.49-.396c.318-.242.553-.646 1.022-1.453c.47-.807.704-1.21.757-1.605a2 2 0 0 0-.4-1.479c-.148-.192-.357-.353-.68-.555c-.477-.297-.783-.803-.783-1.361s.306-1.064.782-1.36c.324-.203.533-.364.682-.556a2 2 0 0 0 .399-1.479c-.053-.394-.287-.798-.757-1.605s-.704-1.21-1.022-1.453a2.03 2.03 0 0 0-1.49-.396c-.242.032-.487.13-.825.308a1.64 1.64 0 0 1-1.58-.008a1.62 1.62 0 0 1-.795-1.353c-.015-.38-.051-.64-.145-.863a2 2 0 0 0-1.09-1.083' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M15.523 12c0 1.657-1.354 3-3.023 3s-3.023-1.343-3.023-3S10.83 9 12.5 9s3.023 1.343 3.023 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:settings-minimalistic-bold-duotone,[i-solar\:settings-minimalistic-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.428 2c-1.114 0-2.129.6-4.157 1.802l-.686.406C5.555 5.41 4.542 6.011 3.985 7c-.557.99-.557 2.19-.557 4.594v.812c0 2.403 0 3.605.557 4.594s1.57 1.59 3.6 2.791l.686.407C10.299 21.399 11.314 22 12.428 22s2.128-.6 4.157-1.802l.686-.407c2.028-1.2 3.043-1.802 3.6-2.791c.557-.99.557-2.19.557-4.594v-.812c0-2.403 0-3.605-.557-4.594s-1.572-1.59-3.6-2.792l-.686-.406C14.555 2.601 13.542 2 12.428 2' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12.428 8.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:stop-circle-bold-duotone,[i-solar\:stop-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.586 8.586C8 9.172 8 10.114 8 12s0 2.828.586 3.414S10.114 16 12 16s2.828 0 3.414-.586S16 13.886 16 12s0-2.828-.586-3.414S13.886 8 12 8s-2.828 0-3.414.586'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:trash-bin-trash-linear,[i-solar\:trash-bin-trash-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' d='M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.196.81-4.856.81h-.774c-2.66 0-3.991 0-4.856-.81c-.865-.809-.954-2.136-1.13-4.79l-.46-6.9M9.5 11l.5 5m4.5-5l-.5 5'/%3E%3Cpath d='M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:tuning-square-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z'/%3E%3Ccircle cx='8' cy='10' r='2'/%3E%3Ccircle cx='2' cy='2' r='2' transform='matrix(1 0 0 -1 14 16)'/%3E%3Cpath stroke-linecap='round' d='M8 14v5m8-9V5M8 5v1m8 13v-1'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:undo-left-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7.53 3.47a.75.75 0 0 1 0 1.06L5.06 7l2.47 2.47a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m5.06 7l.75-.75h9.226c.904 0 1.633 0 2.222.053c.606.055 1.136.172 1.617.45a3.75 3.75 0 0 1 1.372 1.372c.278.481.395 1.011.45 1.617c.053.589.053 1.318.053 2.222v.072c0 .904 0 1.633-.053 2.222c-.055.606-.172 1.136-.45 1.617a3.75 3.75 0 0 1-1.372 1.373c-.481.277-1.011.394-1.617.449c-.589.053-1.318.053-2.222.053H8a.75.75 0 0 1 0-1.5h7c.948 0 1.61 0 2.122-.047c.502-.046.788-.13 1.003-.254a2.25 2.25 0 0 0 .823-.824c.125-.215.21-.5.255-1.003c.046-.512.047-1.174.047-2.122s0-1.61-.047-2.122c-.046-.503-.13-.788-.255-1.003a2.25 2.25 0 0 0-.823-.824c-.215-.124-.5-.208-1.003-.254c-.512-.046-1.174-.047-2.122-.047H5.81z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:upload-minimalistic-bold,[i-solar\:upload-minimalistic-bold=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12.554 2.494a.75.75 0 0 0-1.107 0l-4 4.375A.75.75 0 0 0 8.553 7.88l2.696-2.95V16a.75.75 0 0 0 1.5 0V4.932l2.697 2.95a.75.75 0 1 0 1.107-1.013z'/%3E%3Cpath fill='currentColor' d='M3.75 15a.75.75 0 0 0-1.5 0v.055c0 1.367 0 2.47.117 3.337c.12.9.38 1.658.981 2.26c.602.602 1.36.86 2.26.982c.867.116 1.97.116 3.337.116h6.11c1.367 0 2.47 0 3.337-.116c.9-.122 1.658-.38 2.26-.982s.86-1.36.982-2.26c.116-.867.116-1.97.116-3.337V15a.75.75 0 0 0-1.5 0c0 1.435-.002 2.436-.103 3.192c-.099.734-.28 1.122-.556 1.399c-.277.277-.665.457-1.4.556c-.755.101-1.756.103-3.191.103H9c-1.435 0-2.437-.002-3.192-.103c-.734-.099-1.122-.28-1.399-.556c-.277-.277-.457-.665-.556-1.4c-.101-.755-.103-1.756-.103-3.191'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:upload-square-line-duotone,[i-solar\:upload-square-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 17v-7m0 0l3 3m-3-3l-3 3'/%3E%3Cpath stroke-linecap='round' d='M16 7H8'/%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:user-rounded-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='6' r='4'/%3E%3Cellipse cx='12' cy='17' rx='7' ry='4'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:user-speak-rounded-bold-duotone,[i-solar\:user-speak-rounded-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='10' cy='6.75' r='4' fill='currentColor'/%3E%3Cellipse cx='10' cy='17.75' fill='currentColor' opacity='.5' rx='7' ry='4'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M18.357 2.364a.75.75 0 0 1 1.029-.257L19 2.75l.386-.643h.001l.002.002l.004.002l.01.006l.113.076c.07.049.166.12.277.212c.222.185.512.462.802.838c.582.758 1.155 1.914 1.155 3.507s-.573 2.75-1.155 3.507c-.29.376-.58.653-.802.838a4 4 0 0 1-.363.27l-.028.018l-.01.006l-.003.002l-.002.001s-.001.001-.387-.642l.386.643a.75.75 0 0 1-.776-1.283l.005-.004l.041-.027q.06-.042.177-.136c.152-.128.362-.326.573-.6c.417-.542.844-1.386.844-2.593s-.427-2.05-.844-2.593a3.8 3.8 0 0 0-.573-.6a3 3 0 0 0-.218-.163l-.005-.003a.75.75 0 0 1-.253-1.027' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M16.33 4.415a.75.75 0 0 1 1.006-.336L17 4.75l.336-.67h.001l.002.001l.004.002l.008.004l.022.012a2 2 0 0 1 .233.153c.136.102.31.254.48.467c.349.436.664 1.099.664 2.031s-.316 1.595-.664 2.031a2.7 2.7 0 0 1-.654.586l-.06.034l-.02.012l-.01.004l-.003.002l-.002.001l-.33-.657l.329.658a.75.75 0 0 1-.685-1.335l.003-.001l.052-.036c.052-.04.13-.106.209-.205c.15-.189.335-.526.335-1.094s-.184-.905-.335-1.094a1.2 1.2 0 0 0-.261-.24l-.003-.002a.75.75 0 0 1-.322-1' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:volume-loud-bold-duotone,[i-solar\:volume-loud-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2.003 11.716c.037-1.843.056-2.764.668-3.552a3 3 0 0 1 .413-.431c.752-.636 1.746-.636 3.733-.636c.71 0 1.065 0 1.403-.092q.105-.03.209-.067c.33-.121.627-.33 1.22-.746c2.338-1.645 3.508-2.467 4.489-2.11c.188.069.37.168.533.29c.848.635.913 2.115 1.042 5.073c.048 1.096.08 2.034.08 2.555s-.032 1.46-.08 2.555c-.13 2.958-.194 4.438-1.042 5.073a2.1 2.1 0 0 1-.533.29c-.982.357-2.15-.465-4.49-2.11c-.592-.416-.889-.625-1.22-.746a3 3 0 0 0-.208-.067c-.338-.092-.693-.092-1.403-.092c-1.987 0-2.98 0-3.733-.636a3 3 0 0 1-.413-.43c-.612-.79-.63-1.71-.668-3.552a14 14 0 0 1 0-.57'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M19.49 5.552a.66.66 0 0 1 .97.094l-.53.471l.53-.47h.002v.002l.004.004l.007.009l.078.112a5 5 0 0 1 .187.305c.149.265.339.652.526 1.171C21.64 8.291 22 9.851 22 12s-.36 3.71-.736 4.75c-.187.52-.377.907-.526 1.172a5 5 0 0 1-.265.417l-.007.009l-.003.003l-.001.002s-.001.001-.531-.47l.53.471a.66.66 0 0 1-.972.094a.77.77 0 0 1-.091-1.03l.003-.005l.028-.04a3 3 0 0 0 .126-.208c.11-.195.264-.506.422-.943c.314-.871.643-2.252.643-4.222c0-1.969-.329-3.35-.643-4.222a6 6 0 0 0-.422-.942a3 3 0 0 0-.126-.207l-.028-.041l-.003-.004' clip-rule='evenodd' opacity='.4'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M17.757 8.416c.333-.197.753-.07.938.286l-.603.357l.603-.357l.001.002l.002.003l.003.007l.01.018l.024.053q.028.063.07.17c.053.145.12.35.185.62c.13.54.252 1.337.252 2.425c0 1.089-.122 1.886-.252 2.426c-.065.27-.132.475-.186.619a3 3 0 0 1-.094.223l-.009.018l-.003.007l-.002.003v.002s-.001.001-.604-.356l.603.357c-.185.355-.605.483-.938.286c-.33-.196-.45-.638-.272-.991l.004-.01l.035-.085c.032-.086.08-.23.13-.438c.1-.416.208-1.09.208-2.06c0-.971-.108-1.645-.208-2.061a4 4 0 0 0-.165-.523l-.004-.01c-.179-.354-.058-.796.272-.991' clip-rule='evenodd' opacity='.7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-svg-spinners\:3-dots-fade{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='4' cy='12' r='3' fill='currentColor'%3E%3Canimate id='svgSpinners3DotsFade0' fill='freeze' attributeName='opacity' begin='0;svgSpinners3DotsFade1.end-0.25s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3' fill='currentColor' opacity='.4'%3E%3Canimate fill='freeze' attributeName='opacity' begin='svgSpinners3DotsFade0.begin+0.15s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3' fill='currentColor' opacity='.3'%3E%3Canimate id='svgSpinners3DotsFade1' fill='freeze' attributeName='opacity' begin='svgSpinners3DotsFade0.begin+0.3s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-svg-spinners\:ring-resize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg stroke='currentColor'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-linecap='round' stroke-width='3'%3E%3Canimate attributeName='stroke-dasharray' calcMode='spline' dur='1.5s' keySplines='0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1' keyTimes='0;0.475;0.95;1' repeatCount='indefinite' values='0 150;42 150;42 150;42 150'/%3E%3Canimate attributeName='stroke-dashoffset' calcMode='spline' dur='1.5s' keySplines='0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1' keyTimes='0;0.475;0.95;1' repeatCount='indefinite' values='0;-16;-59;-59'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' dur='2s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-vscode-icons\:file-type-minecraft{background:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='%2352a535' d='M30 2H2v28h28z'/%3E%3Cpath fill='%2386d562' d='M24.4 13.2h-5.6v.47h5.6zm-5.6 8.4h-5.6v.47h5.6zm2.8 2.8h-2.8v.47h2.8zm-8.4 0h-2.8v.47h2.8zm0-11.2H7.6v.47h5.6z'/%3E%3Cpath d='M24.4 13.2V7.6h-5.6v5.6h-5.6V16h-2.8v8.4h2.8v-2.8h5.6v2.8h2.8V16h-2.8v-2.8zM13.2 7.6H7.6v5.6h5.6z'/%3E%3Cpath fill='%232a641c' d='M24.4 7.6h-5.6v.47h5.6zm-5.6 5.6h-5.6v.47h5.6zm-5.6-5.6H7.6v.47h5.6zm0 8.4h-2.8v.47h2.8zm8.4 0h-2.8v.47h2.8z'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat;width:1.2em;height:1.2em}.prose :where(h1,h2,h3,h4,h5,h6):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-headings);font-weight:600;line-height:1.25}.prose :where(a):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links);font-weight:500;text-decoration:underline}.prose :where(a code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links)}.prose :where(p,ul,ol,pre):not(:where(.not-prose,.not-prose *)){margin:1em 0;line-height:1.75}.prose :where(blockquote):not(:where(.not-prose,.not-prose *)){border-left:.25em solid var(--un-prose-borders);margin:1em 0;padding-left:1em;font-style:italic}.prose :where(h1):not(:where(.not-prose,.not-prose *)){margin:1rem 0;font-size:2.25em}.prose :where(h2):not(:where(.not-prose,.not-prose *)){margin:1.75em 0 .5em;font-size:1.75em}.prose :where(h3):not(:where(.not-prose,.not-prose *)){margin:1.5em 0 .5em;font-size:1.375em}.prose :where(h4):not(:where(.not-prose,.not-prose *)){margin:1em 0;font-size:1.125em}.prose :where(img,video):not(:where(.not-prose,.not-prose *)){max-width:100%}.prose :where(figure,picture):not(:where(.not-prose,.not-prose *)){margin:1em 0}.prose :where(figcaption):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-captions);font-size:.875em}.prose :where(code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;font-weight:600}.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):before,.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):after{content:"`"}.prose :where(pre):not(:where(.not-prose,.not-prose *)){border-radius:.375rem;padding:1.25rem 1.5rem;overflow-x:auto}.prose :where(pre,code):not(:where(.not-prose,.not-prose *)){white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:4;-webkit-hyphens:none;hyphens:none;background:0 0}.prose :where(pre code):not(:where(.not-prose,.not-prose *)){font-weight:inherit}.prose :where(ol,ul):not(:where(.not-prose,.not-prose *)){padding-left:1.25em}.prose :where(ol):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ol[type=A]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ul):not(:where(.not-prose,.not-prose *)){list-style-type:disc}.prose :where(ol>li):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(ul>li):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(summary):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(hr):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-hr);margin:2em 0}.prose :where(table):not(:where(.not-prose,.not-prose *)){border-collapse:collapse;margin:1em 0;display:block;overflow-x:auto}.prose :where(tr):not(:where(.not-prose,.not-prose *)):nth-child(2n){background:var(--un-prose-bg-soft)}.prose :where(td,th):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-borders);padding:.625em 1em}.prose :where(abbr):not(:where(.not-prose,.not-prose *)){cursor:help}.prose :where(kbd):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);border:1px solid;border-radius:.25rem;padding:.25rem .5rem;font-size:.875em}.prose :where(details):not(:where(.not-prose,.not-prose *)){background:var(--un-prose-bg-soft);margin:1em 0;padding:1.25rem 1.5rem}.prose :where(summary):not(:where(.not-prose,.not-prose *)){cursor:pointer;font-weight:600}.prose{color:var(--un-prose-body);max-width:65ch}.container,[container=""]{width:100%}.scrollbar-none,[scrollbar-none=""]{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}[scrollbar-none=""]::-webkit-scrollbar{display:none}@media (min-width:640px){.container,[container=""]{max-width:640px}}@media (min-width:768px){.container,[container=""]{max-width:768px}}@media (min-width:1024px){.container,[container=""]{max-width:1024px}}@media (min-width:1280px){.container,[container=""]{max-width:1280px}}@media (min-width:1536px){.container,[container=""]{max-width:1536px}}.\[input\:checked\~\&\]{input:checked~&}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.pointer-events-none,[pointer-events-none=""],.disabled\:pointer-events-none:disabled{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.absolute,[absolute=""]{position:absolute}.fixed,[fixed=""]{position:fixed}.relative,[relative=""]{position:relative}.sticky,[sticky=""]{position:sticky}.before-position-absolute:before,[before~=absolute]:before,.after\:absolute:after,[after~=absolute]:after{position:absolute}.inset-0,[inset-0=""],.before\:inset-0:before,[before~=inset-0]:before,[after~=inset-0]:after{inset:0}.inset-x-0,[inset-x-0=""]{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0,[bottom-0=""]{bottom:0}.bottom-11,[bottom-11=""]{bottom:2.75rem}.bottom-2{bottom:.5rem}.left-0,[left-0=""]{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.right--10,[right--10=""]{right:-2.5rem}.right--15,[right--15=""]{right:-3.75rem}.right--5,[right--5=""]{right:-1.25rem}.right-0,[right-0=""],[right~="0"]{right:0}.right-2,[right-2=""]{right:.5rem}.right-4,[right-4=""]{right:1rem}.top--20,[top--20=""]{top:-5rem}.top-\[-32px\]{top:-32px}.top-0,[top-0=""],[top~="0"]{top:0}.top-1\/2,[top~="50%"]{top:50%}.top-2,[top-2=""]{top:.5rem}[bottom~="[calc(100%+8px)]"]{bottom:calc(100% + 8px)}[bottom~="3"]{bottom:.75rem}[right~="3"]{right:.75rem}[top~="[65dvh]"]{top:65dvh}[top~="[calc(100dvh-12rem)]"]{top:calc(100dvh - 12rem)}[top~="[calc(100dvh-15rem)]"]{top:calc(100dvh - 15rem)}.after\:left-\[2px\]:after{left:2px}.after\:top-\[2px\]:after{top:2px}.line-clamp-1,[line-clamp-1=""]{-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3,[line-clamp-3=""]{-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.z--1,[z--1=""]{z-index:-1}.z--2{z-index:-2}.z-\[9999\]{z-index:9999}.z-0{z-index:0}.z-1,[z-1=""]{z-index:1}.z-10,[z-10=""]{z-index:10}.z-100,[z-100=""]{z-index:100}.z-1000{z-index:1000}.z-2,[z-2=""]{z-index:2}.z-3,[z-3=""]{z-index:3}.z-30,[z-30=""]{z-index:30}.z-4,[z-4=""]{z-index:4}.z-99,[z-99=""]{z-index:99}[before~=z-0]:before{z-index:0}[after~=z--2]:after{z-index:-2}.grid,[grid=""],[grid~=\~]{display:grid}.col-span-full{grid-column:1/-1}.auto-cols-\[350px\]{grid-auto-columns:350px}.auto-cols-auto{grid-auto-columns:auto}.grid-auto-rows-\[minmax\(min-content\,max-content\)\]{grid-auto-rows:minmax(min-content,max-content)}.grid-auto-flow-dense{grid-auto-flow:dense}.grid-flow-col{grid-auto-flow:column}.grid-flow-row{grid-auto-flow:row}.cols-\[150px_1fr\],[grid~="cols-[150px_1fr]"]{grid-template-columns:150px 1fr}.cols-\[20px_1fr_60px\],[grid~="cols-[20px_1fr_60px]"]{grid-template-columns:20px 1fr 60px}.grid-cols-\[repeat\(auto-fill\,minmax\(280px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.cols-1,.grid-cols-1,[grid~=cols-1]{grid-template-columns:repeat(1,minmax(0,1fr))}.cols-2,.grid-cols-2,[grid-cols-2=""],[grid~=cols-2]{grid-template-columns:repeat(2,minmax(0,1fr))}.m-0,[m0=""]{margin:0}.m-1,[m-1=""]{margin:.25rem}.m-auto{margin:auto}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-5,[mx-5=""]{margin-left:1.25rem;margin-right:1.25rem}.mx-auto,[mx-auto=""]{margin-left:auto;margin-right:auto}.mx2,[mx2=""]{margin-left:.5rem;margin-right:.5rem}.my{margin-top:1rem;margin-bottom:1rem}.my-0,[my-0=""]{margin-top:0;margin-bottom:0}.my-5,[my-5=""]{margin-top:1.25rem;margin-bottom:1.25rem}.my-auto,[my-auto=""]{margin-top:auto;margin-bottom:auto}.-mb-px{margin-bottom:-1px}.mb-0{margin-bottom:0}.mb-1,[mb-1=""]{margin-bottom:.25rem}.mb-2,.mb2,[mb-2=""],[mb2=""]{margin-bottom:.5rem}.mb-3,[mb-3=""]{margin-bottom:.75rem}.mb-4,[mb-4=""]{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml{margin-left:1rem}.ml-0\.5,[ml-0\.5=""]{margin-left:.125rem}.ml-auto{margin-left:auto}.mr{margin-right:1rem}.mr-0\!{margin-right:0!important}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-auto{margin-right:auto}.ms{margin-inline-start:1rem}.mt-0\.5{margin-top:.125rem}.mt-1,[mt-1=""]{margin-top:.25rem}.mt-2,[mt-2=""]{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4,[mt-4=""]{margin-top:1rem}.mt-auto{margin-top:auto}[ml~="12"]{margin-left:3rem}[mr~="12"]{margin-right:3rem}[box~=border]{box-sizing:border-box}.inline,[inline=""]{display:inline}.block,[block=""]{display:block}.inline-block,[inline-block=""]{display:inline-block}.contents{display:contents}.aspect-square,[aspect-square=""]{aspect-ratio:1}.size-16,[size-16=""]{width:4rem;height:4rem}.size-2{width:.5rem;height:.5rem}.size-20,[size-20=""]{width:5rem;height:5rem}.size-24,[size-24=""],[size~="24"]{width:6rem;height:6rem}.size-3,[size-3=""]{width:.75rem;height:.75rem}.size-5{width:1.25rem;height:1.25rem}.size-6,[size-6=""],[size~="6"]{width:1.5rem;height:1.5rem}.size-60,[size-60=""]{width:15rem;height:15rem}.size-8,[size-8=""]{width:2rem;height:2rem}[size~=sm]{width:24rem;height:24rem}.h-0\.5,[h-0\.5=""]{height:.125rem}.h-0\.5lh{height:.5lh}.h-1\.5,[h-1\.5=""]{height:.375rem}.h-10{height:2.5rem}.h-100dvh,[h-100dvh=""],[h~="100dvh"]{height:100dvh}.h-12{height:3rem}.h-16{height:4rem}.h-18,[h-18=""]{height:4.5rem}.h-1lh{height:1lh}.h-2,.h2,[h-2=""]{height:.5rem}.h-24,[h-24=""]{height:6rem}.h-3\.5{height:.875rem}.h-30,[h-30=""]{height:7.5rem}.h-4,[h-4=""]{height:1rem}.h-48,[h-48=""]{height:12rem}.h-5,[h-5=""]{height:1.25rem}.h-6{height:1.5rem}.h-60,[h-60=""]{height:15rem}.h-7,[h-7=""]{height:1.75rem}.h-8,[h-8=""]{height:2rem}.h-auto,[h-auto=""],[h~=auto]{height:auto}.h-fit,[h-fit=""]{height:fit-content}.h-full,[h-full=""],[h~="100%"]{height:100%}.h1{height:.25rem}.h3{height:.75rem}.max-h-\[10lh\],[max-h~="[10lh]"]{max-height:10lh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[96\%\]{max-height:96%}.max-h-\[calc\(100dvh-17rem\)\]{max-height:calc(100dvh - 17rem)}.max-h-\[calc\(100dvh-7lh\)\]{max-height:calc(100dvh - 7lh)}.max-h-60,[max-h-60=""]{max-height:15rem}.max-h-full{max-height:100%}.max-h-none,[max-h-none=""]{max-height:none}.max-w-2xl{max-width:42rem}.max-w-6xl{max-width:72rem}.max-w-full,[max-w-full=""]{max-width:100%}.max-w-md{max-width:28rem}.min-h-\[120px\],.min-h-120px,[min-h-120px=""]{min-height:120px}.min-h-\[1lh\]{min-height:1lh}.min-h-16,[min-h-16=""]{min-height:4rem}.min-h-40px,[min-h-40px=""]{min-height:40px}.min-h-70dvh,[min-h-70dvh=""]{min-height:70dvh}.min-w-\[150px\]{min-width:150px}.min-w-\[160px\],[min-w~="[160px]"]{min-width:160px}.min-w-\[200px\]{min-width:200px}.min-w-0,[min-w-0=""]{min-width:0}.min-w-2,[min-w-2=""]{min-width:.5rem}.min-w-20,[min-w-20=""]{min-width:5rem}.min-w-20px{min-width:20px}.min-w-50,[min-w-50=""]{min-width:12.5rem}.w-\[92dvw\]{width:92dvw}.w-\[92vw\]{width:92vw}.w-0\!{width:0!important}.w-1{width:.25rem}.w-1\.5,[w-1\.5=""]{width:.375rem}.w-1\/2,[w~="[50%]"]{width:50%}.w-10\%{width:10%}.w-100,[w-100=""]{width:25rem}.w-100vw,[w-100vw=""]{width:100vw}.w-11{width:2.75rem}.w-18,[w-18=""]{width:4.5rem}.w-1lh{width:1lh}.w-2,[w-2=""]{width:.5rem}.w-25\%{width:25%}.w-3\.5{width:.875rem}.w-30,[w-30=""]{width:7.5rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-5,[w-5=""]{width:1.25rem}.w-8,[w-8=""]{width:2rem}.w-90\%{width:90%}.w-95\%{width:95%}.w-auto,[w-auto=""]{width:auto}.w-fit,[w-fit=""]{width:fit-content}.w-full,[w-full=""],[w~="100%"],[w~=full]{width:100%}[h~="[14px]"]{height:14px}[h~="[calc(1lh+4px+4px)]"]{height:calc(1lh + 8px)}[h~="300"]{height:75rem}[h~="80dvh"]{height:80dvh}[h~="85dvh"]{height:85dvh}[h~=unset]{height:unset}[max-h~="[300px]"]{max-height:300px}[max-h~="[4.5rem]"]{max-height:4.5rem}[max-h~="[85vh]"]{max-height:85vh}[max-h~="100"]{max-height:25rem}[max-h~="100dvh"]{max-height:100dvh}[max-h~="40%"]{max-height:40%}[max-h~="50"]{max-height:12.5rem}[max-w~="[calc(100dvw-1rem)]"]{max-width:calc(100dvw - 1rem)}[max-w~="500px"]{max-width:500px}[min-h~="[100px]"]{min-height:100px}[min-h~="[calc(1lh+4px+4px)]"]{min-height:calc(1lh + 8px)}[min-h~="100"]{min-height:25rem}[min-h~="120"]{min-height:30rem}[min-w~="1/2"],[min-w~="50%"]{min-width:50%}[min-w~="30%"]{min-width:30%}[min-w~="3em"]{min-width:3em}[min-w~="50vw"]{min-width:50vw}[min-w~="6"]{min-width:1.5rem}[w~="[1px]"]{width:1px}[w~="[calc(1lh+4px+4px)]"]{width:calc(1lh + 8px)}[w~="100dvw"]{width:100dvw}[w~="12.5"]{width:3.125rem}[w~="70%"]{width:70%}.hover\:h-13:hover{height:3.25rem}.hover\:w-2:hover{width:.5rem}.before\:h-full:before{height:100%}.before\:w-1:before{width:.25rem}[before~=h-full]:before{height:100%}[before~=w-25\%]:before{width:25%}.after\:h-5:after{height:1.25rem}.after\:w-5:after{width:1.25rem}[after~=h-full]:after{height:100%}[after~=w-full]:after{width:100%}.max-w-screen-xl,[max-w-screen-xl=""]{max-width:1280px}.flex,[flex=""],[flex~=\~]{display:flex}.inline-flex,[inline-flex=""],[inline-flex~=\~]{display:inline-flex}.flex-1,[flex-1=""],[flex~="1"]{flex:1}.flex-shrink-0,.shrink-0,[flex-shrink-0=""],[shrink-0=""]{flex-shrink:0}.flex-row,[flex-row=""],[flex~=row]{flex-direction:row}[flex~=row-reverse]{flex-direction:row-reverse}.flex-col,[flex-col=""],[flex~=col]{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap,[flex-wrap=""]{flex-wrap:wrap}.origin-left,[origin-left=""]{transform-origin:0}[perspective~="800"]{perspective:800px}.-translate-x-1\/2,.translate-x-\[-50\%\]{--un-translate-x:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.-translate-y-1\/2,.translate-y-\[-50\%\],[transform~="translate-y-[-50%]"]{--un-translate-y:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-x-\[50\%\],[transform~="translate-x-[50%]"]{--un-translate-x:50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y--2,[transform~=translate-y--2]{--un-translate-y:-.5rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-\[-100\%\],[transform~="translate-y-[-100%]"]{--un-translate-y:-100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-\[0\.25lh\]{--un-translate-y:.25lh;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-\[50\%\]{--un-translate-y:50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-1,[translate-y-1=""]{--un-translate-y:.25rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-2,[translate-y-2=""]{--un-translate-y:.5rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-4,[translate-y-4=""]{--un-translate-y:1rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-x~="0.5"]{--un-translate-x:.125rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-x~="data-[state=checked]:full"][data-state=checked]{--un-translate-x:100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-y~="[-80%]"]{--un-translate-y:-80%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-y~="[2px]"]{--un-translate-y:2px;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.peer:checked~.peer-checked\:after\:translate-x-full:after{--un-translate-x:100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.\[\&_\.card-cover_img\]\:hover\:translate-y-2:hover .card-cover img,[hover\:translate-y-2=""]:hover{--un-translate-y:.5rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.rotate-180{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:180deg;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-100{--un-scale-x:1;--un-scale-y:1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-125{--un-scale-x:1.25;--un-scale-y:1.25;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-150{--un-scale-x:1.5;--un-scale-y:1.5;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.\[\&_\.card-cover_img\]\:hover\:scale-102:hover .card-cover img{--un-scale-x:1.02;--un-scale-y:1.02;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.hover\:scale-110:hover{--un-scale-x:1.1;--un-scale-y:1.1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[hover~=scale-100]:hover{--un-scale-x:1;--un-scale-y:1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.transform-scale-x--100,[transform-scale-x--100=""]{--un-scale-x:-1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.preserve-3d{transform-style:preserve-3d}.transform,[transform=""]{transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-pulse,[animate-pulse=""]{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}.animate-spin{animation:1s linear infinite spin}.disabled\:cursor-default:disabled{cursor:default}.cursor-pointer,[cursor-pointer=""],[cursor~=pointer]{cursor:pointer}.cursor-not-allowed,.disabled\:cursor-not-allowed:disabled,[cursor~=disabled\:not-allowed]:disabled,[disabled\:cursor-not-allowed=""]:disabled{cursor:not-allowed}.cursor-col-resize{cursor:col-resize}.cursor-ew-resize,[cursor-ew-resize=""]{cursor:ew-resize}.select-none,[select-none=""]{-webkit-user-select:none;user-select:none}.resize-none,[resize-none=""]{resize:none}.appearance-none,[appearance-none=""]{appearance:none}.items-start,[items-start=""]{align-items:flex-start}.items-end,[items-end=""]{align-items:flex-end}.items-center,[flex~=items-center],[items-center=""]{align-items:center}.self-end,[self-end=""]{align-self:flex-end}.justify-start{justify-content:flex-start}.justify-end,[justify-end=""]{justify-content:flex-end}.justify-center,[flex~=justify-center],[justify-center=""]{justify-content:center}.justify-between,[justify-between=""]{justify-content:space-between}.gap-0\.5,[gap-0\.5=""]{gap:.125rem}.gap-1,[gap-1=""]{gap:.25rem}.gap-1\.5,[gap-1\.5=""]{gap:.375rem}.gap-2,[flex~=gap-2],[gap-2=""]{gap:.5rem}.gap-3,[flex~=gap-3],[gap-3=""]{gap:.75rem}.gap-4,[flex~=gap-4],[gap-4=""],[grid~=gap-4]{gap:1rem}.gap-5,[gap-5=""]{gap:1.25rem}.gap-6,[flex~=gap-6]{gap:1.5rem}.gap-8{gap:2rem}.gap-x-2,[flex~=gap-x-2]{column-gap:.5rem}.gap-y-0,[flex~=gap-y-0]{row-gap:0}.space-x-1>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(.25rem*calc(1 - var(--un-space-x-reverse)));margin-right:calc(.25rem*var(--un-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.5rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.5rem*var(--un-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.75rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.75rem*var(--un-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1rem*var(--un-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1.5rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1.5rem*var(--un-space-y-reverse))}[divide~=y]>:not([hidden])~:not([hidden]){--un-divide-y-reverse:0;border-top-width:calc(1px*calc(1 - var(--un-divide-y-reverse)));border-bottom-width:calc(1px*var(--un-divide-y-reverse))}[divide~=gray\/25]>:not([hidden])~:not([hidden]){border-color:#9ca3af40}[border~=dashed],[divide~=dashed]>:not([hidden])~:not([hidden]){border-style:dashed}.of-clip,[of-clip=""]{overflow:clip}.of-hidden,.overflow-hidden,[of-hidden=""],[overflow-hidden=""],[overflow~=hidden]{overflow:hidden}.overflow-auto,[overflow-auto=""]{overflow:auto}.overflow-scroll,[overflow-scroll=""]{overflow:scroll}.of-x-scroll,[of-x-scroll=""]{overflow-x:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto,[overflow-y-auto=""]{overflow-y:auto}.overflow-y-scroll,[overflow-y-scroll=""]{overflow-y:scroll}.scroll-smooth,[scroll-smooth=""]{scroll-behavior:smooth}.truncate,[truncate=""]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-ellipsis,[text-ellipsis=""]{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line,[whitespace-pre-line=""]{white-space:pre-line}.whitespace-pre-wrap,[whitespace-pre-wrap=""]{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.b,.border,[b=""],[border=""],[border~=\~]{border-width:1px}.border-2,[border-2=""],[border~="2"],[border~="2px"]{border-width:2px}[border~="4"]{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.\[\&\:checked\+div\]\:border-primary-500:checked+div,.border-primary-500{--un-border-opacity:1;border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.border-amber-200{--un-border-opacity:1;border-color:rgb(253 230 138/var(--un-border-opacity))}.border-neutral-100,[border~=neutral-100]{--un-border-opacity:1;border-color:rgb(245 245 245/var(--un-border-opacity))}.border-neutral-200,.dark [border~=dark\:neutral-200],[border-neutral-200=""],[border~=neutral-200]{--un-border-opacity:1;border-color:rgb(229 229 229/var(--un-border-opacity))}.border-neutral-300,[border-neutral-300=""],[border~="data-[state=unchecked]:neutral-300"][data-state=unchecked],[border~=neutral-300]{--un-border-opacity:1;border-color:rgb(212 212 212/var(--un-border-opacity))}.border-neutral-300\/30{border-color:#d4d4d44d}.border-neutral-400{--un-border-opacity:1;border-color:rgb(163 163 163/var(--un-border-opacity))}.border-neutral-500{--un-border-opacity:1;border-color:rgb(115 115 115/var(--un-border-opacity))}.border-primary-100,[border~=primary-100]{--un-border-opacity:1;border-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))80%,oklch(100% 0 360/var(--un-border-opacity)))}.border-primary-200,[border~="data-[state=checked]:primary-200"][data-state=checked]{--un-border-opacity:1;border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.border-primary-400,.dark .dark\:\[\&\:checked\+div\]\:border-primary-400:checked+div,.dark .dark\:border-primary-400{--un-border-opacity:1;border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.border-primary-500\/5{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.05)}.border-red-200{--un-border-opacity:1;border-color:rgb(254 202 202/var(--un-border-opacity))}.border-red-200\/30{border-color:#fecaca4d}.border-white,[border~=white]{--un-border-opacity:1;border-color:rgb(255 255 255/var(--un-border-opacity))}.dark .dark\:border-amber-800{--un-border-opacity:1;border-color:rgb(146 64 14/var(--un-border-opacity))}.dark .dark\:border-neutral-600,.dark [border~=dark\:neutral-600],.dark [dark\:border-neutral-600=""]{--un-border-opacity:1;border-color:rgb(82 82 82/var(--un-border-opacity))}.dark .dark\:border-neutral-700,.dark [border~=dark\:neutral-700],.dark [dark\:border-neutral-700=""]{--un-border-opacity:1;border-color:rgb(64 64 64/var(--un-border-opacity))}.dark .dark\:border-neutral-700\/30,.dark [border~="dark:neutral-700/30"]{border-color:#4040404d}.dark .dark\:border-neutral-800,.dark [border~=dark\:neutral-800],.dark [dark\:border-neutral-800=""],[border~=neutral-800]{--un-border-opacity:1;border-color:rgb(38 38 38/var(--un-border-opacity))}.dark .dark\:border-neutral-800\/25,.dark [border~="dark:neutral-800/25"]{border-color:#26262640}.dark .dark\:border-neutral-900,.dark [border~=dark\:neutral-900]{--un-border-opacity:1;border-color:rgb(23 23 23/var(--un-border-opacity))}.dark .dark\:border-primary-600{--un-border-opacity:1;border-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-800,.dark [border~=dark\:primary-800]{--un-border-opacity:1;border-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-900,.dark [border~=dark\:primary-900]{--un-border-opacity:1;border-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-900\/40{border-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.4)}.dark .dark\:border-red-800{--un-border-opacity:1;border-color:rgb(153 27 27/var(--un-border-opacity))}.dark .dark\:border-red-900\/30{border-color:#7f1d1d4d}.dark [border~="dark:cyan-500/50"]{border-color:#06b6d480}.dark [border~="dark:primary-400/20"]{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)}.dark [border~="dark:primary-500/50"]{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.5)}.dark [border~="dark:primary-950/10"]{border-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.1)}.dark [border~="dark:violet-500/50"]{border-color:#8b5cf680}[border~=cyan-200\/50]{border-color:#a5f3fc80}[border~=gray\/25]{border-color:#9ca3af40}[border~=neutral-200\/50]{border-color:#e5e5e580}[border~=primary-200\/20]{border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}[border~=primary-200\/50]{border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}[border~=primary-300]{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}[border~=primary-50]{--un-border-opacity:1;border-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))30%,oklch(100% 0 360/var(--un-border-opacity)))}[border~=violet-200\/50]{border-color:#ddd6fe80}.peer:checked~.peer-checked\:after\:border-white:after{--un-border-opacity:1;border-color:rgb(255 255 255/var(--un-border-opacity))}[border~=focus-within\:neutral-800]:focus-within{--un-border-opacity:1;border-color:rgb(38 38 38/var(--un-border-opacity))}.dark .dark\:hover\:border-primary-400\/30:hover{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:hover\:border-primary-700:hover{--un-border-opacity:1;border-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark [border~="dark:hover:primary-400/30"]:hover{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.hover\:border-primary-300:hover{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.hover\:border-primary-500\/30:hover,[border~="hover:primary-500/30"]:hover{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.dark [border~="dark:focus:neutral-600"]:focus{--un-border-opacity:1;border-color:rgb(82 82 82/var(--un-border-opacity))}.dark [border~="dark:focus:neutral-700"]:focus{--un-border-opacity:1;border-color:rgb(64 64 64/var(--un-border-opacity))}.dark [border~="dark:focus:primary-400/50"]:focus{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.5)}[border~=focus\:neutral-200]:focus{--un-border-opacity:1;border-color:rgb(229 229 229/var(--un-border-opacity))}[border~=focus\:neutral-400]:focus{--un-border-opacity:1;border-color:rgb(163 163 163/var(--un-border-opacity))}[border~=focus\:primary-100]:focus{--un-border-opacity:1;border-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))80%,oklch(100% 0 360/var(--un-border-opacity)))}[border~=focus\:primary-300]:focus{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.rounded,[rounded=""]{border-radius:.25rem}.rounded-2xl,[rounded-2xl=""]{border-radius:1rem}.rounded-full,[rounded-full=""]{border-radius:9999px}.rounded-lg,[border~=rounded-lg],[rounded-lg=""],[rounded~=lg]{border-radius:.5rem}.rounded-md,[rounded-md=""]{border-radius:.375rem}.rounded-sm,[rounded-sm=""]{border-radius:.125rem}.rounded-xl,[rounded-xl=""]{border-radius:.75rem}[rounded~="[1lh]"]{border-radius:1lh}.before\:rounded-full:before,.after\:rounded-full:after{border-radius:9999px}.rounded-l-xl,[rounded-l-xl=""]{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl,[rounded-r-xl=""]{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-t-xl,[rounded-t-xl=""]{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border-none,[border-none=""]{border-style:none}.border-solid,[border~=solid]{border-style:solid}.bg-amber-50{--un-bg-opacity:1;background-color:rgb(255 251 235/var(--un-bg-opacity))}.bg-amber-50\/80{background-color:#fffbebcc}.bg-black\/50,[bg~=black\/50]{background-color:#00000080}.bg-blue-50,[bg-blue-50=""]{--un-bg-opacity:1;background-color:rgb(239 246 255/var(--un-bg-opacity))}.bg-green-50,[bg-green-50=""]{--un-bg-opacity:1;background-color:rgb(240 253 244/var(--un-bg-opacity))}.bg-green-500,[bg-green-500=""],[bg~=green-500]{--un-bg-opacity:1;background-color:rgb(34 197 94/var(--un-bg-opacity))}.bg-lime-400\/10{background-color:#a3e6351a}.bg-neutral-100,[bg-neutral-100=""],[bg~=neutral-100]{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.bg-neutral-200,.dark .dark\:bg-neutral-200,[bg-neutral-200=""],[bg~=neutral-200]{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}.bg-neutral-200\/45{background-color:#e5e5e573}.bg-neutral-300,.dark [bg~=dark\:neutral-300],[bg-neutral-300=""],[bg~="data-[state=unchecked]:neutral-300"][data-state=unchecked]{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}.bg-neutral-400,.dark [bg~=dark\:neutral-400],[bg~=neutral-400]{--un-bg-opacity:1;background-color:rgb(163 163 163/var(--un-bg-opacity))}.bg-neutral-400\/15{background-color:#a3a3a326}.bg-neutral-50,[bg-neutral-50=""],[bg~=neutral-50]{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.bg-neutral-600,.dark .dark\:bg-neutral-600{--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity))}.bg-neutral-800,.dark .dark\:bg-neutral-800,.dark [bg~="dark:data-[state=unchecked]:neutral-800"][data-state=unchecked],.dark [bg~=dark\:neutral-800],.dark [dark\:bg-neutral-800=""]{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.bg-orange-400\/10{background-color:#fb923c1a}.bg-primary{--un-bg-opacity:1;background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-100,[bg-primary-100=""],[bg~=primary-100]{--un-bg-opacity:1;background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))80%,oklch(100% 0 360/var(--un-bg-opacity)))}.bg-primary-100\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.1)80%,#ffffff1a)}@supports (color:lab(0% 0 0)){.bg-primary-100\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.1)80%,lab(100% 0 0/.1))}}.bg-primary-100\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/1)80%,#fff)}@supports (color:lab(0% 0 0)){.bg-primary-100\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/1)80%,lab(100% 0 0))}}.bg-primary-100\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.2)80%,#fff3)}@supports (color:lab(0% 0 0)){.bg-primary-100\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.2)80%,lab(100% 0 0/.2))}}.bg-primary-100\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.3)80%,#ffffff4d)}@supports (color:lab(0% 0 0)){.bg-primary-100\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.3)80%,lab(100% 0 0/.3))}}.bg-primary-100\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.4)80%,#fff6)}@supports (color:lab(0% 0 0)){.bg-primary-100\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.4)80%,lab(100% 0 0/.4))}}.bg-primary-100\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.05)80%,#ffffff0d)}@supports (color:lab(0% 0 0)){.bg-primary-100\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.05)80%,lab(100% 0 0/.05))}}.bg-primary-100\/50{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.5)80%,#ffffff80)}@supports (color:lab(0% 0 0)){.bg-primary-100\/50{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.5)80%,lab(100% 0 0/.5))}}.bg-primary-100\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.6)80%,#fff9)}@supports (color:lab(0% 0 0)){.bg-primary-100\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.6)80%,lab(100% 0 0/.6))}}.bg-primary-100\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.7)80%,#ffffffb3)}@supports (color:lab(0% 0 0)){.bg-primary-100\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.7)80%,lab(100% 0 0/.7))}}.bg-primary-100\/80{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.8)80%,#fffc)}@supports (color:lab(0% 0 0)){.bg-primary-100\/80{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.8)80%,lab(100% 0 0/.8))}}.bg-primary-100\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.9)80%,#ffffffe6)}@supports (color:lab(0% 0 0)){.bg-primary-100\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.9)80%,lab(100% 0 0/.9))}}.bg-primary-200,[bg-primary-200=""]{--un-bg-opacity:1;background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-200\/10{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-200\/100{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-200\/20,[bg~=primary-200\/20]{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-200\/30{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-200\/40{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-200\/5{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-200\/50{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-200\/60{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-200\/70{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-200\/80{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-200\/90{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-300,[bg-primary-300=""]{--un-bg-opacity:1;background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-300\/10{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-300\/100{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-300\/20{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-300\/30{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-300\/40{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-300\/5{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-300\/50,.dark .dark\:bg-primary-300\/50{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-300\/60{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-300\/70{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-300\/80{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-300\/90{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-400,.dark .dark\:bg-primary-400,.dark [bg~=dark\:primary-400],[bg-primary-400=""],[bg~="data-[state=checked]:primary-400"][data-state=checked],[bg~=primary-400]{--un-bg-opacity:1;background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-400\/10{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-400\/100{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-400\/20,.dark [bg~="dark:primary-400/20"]{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-400\/30{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-400\/40{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-400\/5{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-400\/50{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-400\/60{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-400\/70{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-400\/80,.dark [bg~="data-[state=checked]:dark:primary-400/80"][data-state=checked]{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-400\/90{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-50,[bg-primary-50=""]{--un-bg-opacity:1;background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))30%,oklch(100% 0 360/var(--un-bg-opacity)))}.bg-primary-50\/10,.dark .dark\:bg-primary-50\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.1)30%,#ffffff1a)}@supports (color:lab(0% 0 0)){.bg-primary-50\/10,.dark .dark\:bg-primary-50\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.1)30%,lab(100% 0 0/.1))}}.bg-primary-50\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/1)30%,#fff)}@supports (color:lab(0% 0 0)){.bg-primary-50\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/1)30%,lab(100% 0 0))}}.bg-primary-50\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.2)30%,#fff3)}@supports (color:lab(0% 0 0)){.bg-primary-50\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.2)30%,lab(100% 0 0/.2))}}.bg-primary-50\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.3)30%,#ffffff4d)}@supports (color:lab(0% 0 0)){.bg-primary-50\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.3)30%,lab(100% 0 0/.3))}}.bg-primary-50\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.4)30%,#fff6)}@supports (color:lab(0% 0 0)){.bg-primary-50\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.4)30%,lab(100% 0 0/.4))}}.bg-primary-50\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.05)30%,#ffffff0d)}@supports (color:lab(0% 0 0)){.bg-primary-50\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.05)30%,lab(100% 0 0/.05))}}.bg-primary-50\/50,[bg~=primary-50\/50]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.5)30%,#ffffff80)}@supports (color:lab(0% 0 0)){.bg-primary-50\/50,[bg~=primary-50\/50]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.5)30%,lab(100% 0 0/.5))}}.bg-primary-50\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.6)30%,#fff9)}@supports (color:lab(0% 0 0)){.bg-primary-50\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.6)30%,lab(100% 0 0/.6))}}.bg-primary-50\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.7)30%,#ffffffb3)}@supports (color:lab(0% 0 0)){.bg-primary-50\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.7)30%,lab(100% 0 0/.7))}}.bg-primary-50\/80,[bg~=primary-50\/80]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.8)30%,#fffc)}@supports (color:lab(0% 0 0)){.bg-primary-50\/80,[bg~=primary-50\/80]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.8)30%,lab(100% 0 0/.8))}}.bg-primary-50\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.9)30%,#ffffffe6)}@supports (color:lab(0% 0 0)){.bg-primary-50\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.9)30%,lab(100% 0 0/.9))}}.bg-primary-500,.dark [bg~=dark\:primary-500],[bg-primary-500=""],[bg~=primary-500],.peer:checked~.peer-checked\:bg-primary-500{--un-bg-opacity:1;background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-500\/10,[bg~=primary-500\/10]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-500\/100{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-500\/15{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.15)}.bg-primary-500\/20,[bg~=primary-500\/20]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-500\/30,[bg~=primary-500\/30]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-500\/40,[bg~=primary-500\/40]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-500\/5,[bg~=primary-500\/5]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-500\/50,[bg~=primary-500\/50]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-500\/60,[bg~=primary-500\/60]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-500\/70,[bg~=primary-500\/70]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-500\/80,[bg~=primary-500\/80]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-500\/90,[bg~=primary-500\/90]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-600,.dark .dark\:bg-primary-600,[bg-primary-600=""]{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-600\/10{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-600\/100{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-600\/20{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-600\/30{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-600\/40{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-600\/5{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-600\/50{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-600\/60{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-600\/70{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-600\/80{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-600\/90{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-700,.dark .dark\:bg-primary-700,.dark [dark\:bg-primary-700=""],[bg-primary-700=""]{--un-bg-opacity:1;background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-700\/10{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-700\/100{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-700\/20{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-700\/30,.dark .dark\:bg-primary-700\/30{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-700\/40{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-700\/5{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-700\/50{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-700\/60{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-700\/70{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-700\/80{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-700\/90{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-800,.dark [bg~=dark\:primary-800],[bg-primary-800=""]{--un-bg-opacity:1;background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-800\/10{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-800\/100{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-800\/20{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-800\/30{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-800\/40{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-800\/5{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-800\/50{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-800\/60{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-800\/70{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-800\/80{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-800\/90{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-900,.dark .dark\:bg-primary-900,[bg-primary-900=""]{--un-bg-opacity:1;background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-900\/10,.dark .dark\:bg-primary-900\/10{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-900\/100{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-900\/20,.dark .dark\:bg-primary-900\/20{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-900\/30,.dark .dark\:bg-primary-900\/30{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-900\/40,.dark .dark\:bg-primary-900\/40,.dark [bg~="dark:primary-900/40"]{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-900\/5,.dark .dark\:bg-primary-900\/5{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-900\/50{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-900\/60{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-900\/70{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-900\/80{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-900\/90{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-950,.dark .dark\:bg-primary-950,[bg-primary-950=""]{--un-bg-opacity:1;background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-950\/10{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-950\/100{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-950\/20{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-950\/30{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-950\/40{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-950\/5{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-950\/50{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-950\/60{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-950\/70,.dark [bg~="dark:primary-950/70"]{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-950\/80,.dark [bg~="dark:primary-950/80"]{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-950\/90{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary\/10{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary\/100{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/1)}.bg-primary\/20{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary\/30{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary\/40{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary\/5{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary\/50{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary\/60{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary\/70{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary\/80{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary\/90{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.9)}.bg-red-50,[bg-red-50=""]{--un-bg-opacity:1;background-color:rgb(254 242 242/var(--un-bg-opacity))}.bg-red-500{--un-bg-opacity:1;background-color:rgb(239 68 68/var(--un-bg-opacity))}.bg-red-500\/15{background-color:#ef444426}.bg-red900,.dark [dark\:bg-red-900=""]{--un-bg-opacity:1;background-color:rgb(127 29 29/var(--un-bg-opacity))}.bg-transparent,.dark [bg~=dark\:transparent],[bg-transparent=""],[bg~=transparent]{background-color:#0000}.bg-violet-400\/10{background-color:#a78bfa1a}.bg-white,[bg-white=""],[bg~=white]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.bg-white\/60,[bg~=white\/60]{background-color:#fff9}.bg-white\/80{background-color:#fffc}.bg-yellow-500{--un-bg-opacity:1;background-color:rgb(234 179 8/var(--un-bg-opacity))}.dark .dark\:bg-amber-900\/20{background-color:#78350f33}.dark .dark\:bg-amber-900\/30{background-color:#78350f4d}.dark .dark\:bg-black\/30,.dark [bg~="dark:black/30"]{background-color:#0000004d}.dark .dark\:bg-black\/40{background-color:#0006}.dark .dark\:bg-black\/75{background-color:#000000bf}.dark .dark\:bg-blue-900\/30{background-color:#1e3a8a4d}.dark .dark\:bg-green-900\/30{background-color:#14532d4d}.dark .dark\:bg-lime-50\/10{background-color:#f7fee71a}.dark .dark\:bg-lime-900\/10{background-color:#3653141a}.dark .dark\:bg-neutral-700,.dark [bg~=dark\:neutral-700],.dark [dark\:bg-neutral-700=""],[bg~=neutral-700]{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark .dark\:bg-neutral-700\/50{background-color:#40404080}.dark .dark\:bg-neutral-700\/60{background-color:#40404099}.dark .dark\:bg-neutral-800\/50,.dark [bg~="dark:neutral-800/50"]{background-color:#26262680}.dark .dark\:bg-neutral-900,.dark [bg~=dark\:neutral-900],.dark [dark\:bg-neutral-900=""]{--un-bg-opacity:1;background-color:rgb(23 23 23/var(--un-bg-opacity))}.dark .dark\:bg-neutral-900\/20{background-color:#17171733}.dark .dark\:bg-neutral-900\/95{background-color:#171717f2}.dark .dark\:bg-orange-50\/10{background-color:#fff7ed1a}.dark .dark\:bg-orange-900\/10{background-color:#7c2d121a}.dark .dark\:bg-primary-800\/25{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.25)}.dark .dark\:bg-red-700\/30{background-color:#b91c1c4d}.dark .dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark .dark\:bg-red-900\/30{background-color:#7f1d1d4d}.dark .dark\:bg-violet-50\/10{background-color:#f5f3ff1a}.dark .dark\:bg-violet-900\/10{background-color:#4c1d951a}.dark [bg~="dark:[#4e34b9]"]{--un-bg-opacity:1;background-color:rgb(78 52 185/var(--un-bg-opacity))}.dark [bg~="dark:[#676085]"]{--un-bg-opacity:1;background-color:rgb(103 96 133/var(--un-bg-opacity))}.dark [bg~="dark:[rgba(0,0,0,0.3)]"]{--un-bg-opacity:.3;background-color:rgba(0,0,0,var(--un-bg-opacity))}.dark [bg~="dark:#181818"]{--un-bg-opacity:1;background-color:rgb(24 24 24/var(--un-bg-opacity))}.dark [bg~="dark:black/20"],.group:hover [bg~="group-hover:black/20"]{background-color:#0003}.dark [bg~=dark\:blue-900],.dark [dark\:bg-blue-900=""]{--un-bg-opacity:1;background-color:rgb(30 58 138/var(--un-bg-opacity))}.dark [bg~=dark\:complementary-800]{--un-bg-opacity:1;background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 180)/var(--un-bg-opacity))}.dark [bg~=dark\:cyan-900]{--un-bg-opacity:1;background-color:rgb(22 78 99/var(--un-bg-opacity))}.dark [bg~=dark\:green-600]{--un-bg-opacity:1;background-color:rgb(22 163 74/var(--un-bg-opacity))}.dark [bg~=dark\:neutral-500]{--un-bg-opacity:1;background-color:rgb(115 115 115/var(--un-bg-opacity))}.dark [bg~="dark:neutral-900/50"]{background-color:#17171780}.dark [bg~="dark:neutral-900/70"]{background-color:#171717b3}.dark [bg~=dark\:neutral-950]{--un-bg-opacity:1;background-color:rgb(10 10 10/var(--un-bg-opacity))}.dark [bg~="dark:orange-900/20"]{background-color:#7c2d1233}.dark [bg~=dark\:violet-800]{--un-bg-opacity:1;background-color:rgb(91 33 182/var(--un-bg-opacity))}.dark [dark\:bg-green-900=""]{--un-bg-opacity:1;background-color:rgb(20 83 45/var(--un-bg-opacity))}[bg~="[#cabeff]"]{--un-bg-opacity:1;background-color:rgb(202 190 255/var(--un-bg-opacity))}[bg~="[#e6e1fc]"]{--un-bg-opacity:1;background-color:rgb(230 225 252/var(--un-bg-opacity))}[bg~=\$bg-color]{background-color:var(--bg-color)}[bg~=black\/0]{background-color:#0000}[bg~=blue-100]{--un-bg-opacity:1;background-color:rgb(219 234 254/var(--un-bg-opacity))}[bg~=complementary-100]{--un-bg-opacity:1;background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 180)/var(--un-bg-opacity))80%,oklch(100% 0 360/var(--un-bg-opacity)))}[bg~=emerald-500]{--un-bg-opacity:1;background-color:rgb(16 185 129/var(--un-bg-opacity))}[bg~=gray-200\/30]{background-color:#e5e7eb4d}[bg~=inherit]{background-color:inherit }[bg~=neutral-100\/50]{background-color:#f5f5f580}[bg~=neutral-100\/70]{background-color:#f5f5f5b3}[bg~=neutral-200\/20]{background-color:#e5e5e533}[bg~=neutral-200\/50]{background-color:#e5e5e580}[bg~=neutral-50\/50]{background-color:#fafafa80}[bg~=orange-50]{--un-bg-opacity:1;background-color:rgb(255 247 237/var(--un-bg-opacity))}[bg~=violet-500]{--un-bg-opacity:1;background-color:rgb(139 92 246/var(--un-bg-opacity))}[bg~=white\/70]{background-color:#ffffffb3}.dark [dark\:bg-neutral-700~=default\:]:default,.dark [dark\:bg-neutral-700~=checked\:]:checked{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark .\[\&_div_span\]\:dark\:hover\:bg-cyan-300:hover div span{--un-bg-opacity:1;background-color:rgb(103 232 249/var(--un-bg-opacity))}.dark .\[\&_div_span\]\:dark\:hover\:bg-cyan-900:hover div span{--un-bg-opacity:1;background-color:rgb(22 78 99/var(--un-bg-opacity))}.dark .dark\:hover\:bg-black\/40:hover{background-color:#0006}.dark .dark\:hover\:bg-neutral-600:hover{--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity))}.dark .dark\:hover\:bg-neutral-700\/80:hover{background-color:#404040cc}.dark .dark\:hover\:bg-neutral-800:hover{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.dark .dark\:hover\:bg-primary-700\/40:hover{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.4)}.dark .dark\:hover\:bg-red-700\/40:hover{background-color:#b91c1c66}.dark [bg~="dark:hover:complementary-700"]:hover{--un-bg-opacity:1;background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 180)/var(--un-bg-opacity))}.dark [bg~="dark:hover:neutral-800"]:hover{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.dark [dark\:hover\:bg-cyan-300=""]:hover{--un-bg-opacity:1;background-color:rgb(103 232 249/var(--un-bg-opacity))}.dark [hover~="dark:bg-black/40"]:hover{background-color:#0006}.dark [hover~=dark\:bg-neutral-700]:hover{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark [hover~="dark:bg-neutral-700/50"]:hover{background-color:#40404080}.hover\:bg-neutral-100:hover{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.hover\:bg-neutral-300:hover{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}.hover\:bg-neutral-400:hover{--un-bg-opacity:1;background-color:rgb(163 163 163/var(--un-bg-opacity))}.hover\:bg-neutral-400\/20:hover{background-color:#a3a3a333}.hover\:bg-primary-500\/20:hover{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)}.hover\:bg-primary-600:hover{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.hover\:bg-red-500\/20:hover{background-color:#ef444433}.hover\:bg-white\/80:hover{background-color:#fffc}[bg~=hover\:complementary-200]:hover{--un-bg-opacity:1;background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 180)/var(--un-bg-opacity))}[bg~=hover\:emerald-600]:hover{--un-bg-opacity:1;background-color:rgb(5 150 105/var(--un-bg-opacity))}[bg~=hover\:neutral-200]:hover{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}[bg~=hover\:neutral-50]:hover{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}[hover\:bg-neutral-300=""]:hover{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}[hover\:bg-primary-600=""]:hover{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}[hover~=bg-neutral-200]:hover{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}[hover~=bg-white\/80]:hover{background-color:#fffc}.dark [bg~="dark:focus:neutral-900"]:focus{--un-bg-opacity:1;background-color:rgb(23 23 23/var(--un-bg-opacity))}[bg~=focus\:neutral-50]:focus{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.active\:bg-neutral-400\/30:active{background-color:#a3a3a34d}.active\:bg-primary-500\/30:active{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.active\:bg-red-500\/30:active{background-color:#ef44444d}.dark .dark\:active\:bg-neutral-700\/60:active{background-color:#40404099}.dark .dark\:active\:bg-primary-700\/30:active{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:active\:bg-red-700\/30:active{background-color:#b91c1c4d}.dark [bg~="dark:active:neutral-700"]:active{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}[bg~=active\:gray-50]:active{--un-bg-opacity:1;background-color:rgb(249 250 251/var(--un-bg-opacity))}[bg~=active\:neutral-300]:active{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}.dark [bg~="dark:disabled:neutral-800"]:disabled{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}[bg~=disabled\:neutral-100]:disabled{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.before\:bg-lime-400:before{--un-bg-opacity:1;background-color:rgb(163 230 53/var(--un-bg-opacity))}.before\:bg-orange-400:before{--un-bg-opacity:1;background-color:rgb(251 146 60/var(--un-bg-opacity))}.before\:bg-primary-400:before{--un-bg-opacity:1;background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.before\:bg-violet-400:before{--un-bg-opacity:1;background-color:rgb(167 139 250/var(--un-bg-opacity))}.dark .before\:dark\:bg-lime-900:before{--un-bg-opacity:1;background-color:rgb(54 83 20/var(--un-bg-opacity))}.dark .before\:dark\:bg-orange-900:before{--un-bg-opacity:1;background-color:rgb(124 45 18/var(--un-bg-opacity))}.dark .before\:dark\:bg-primary-900:before{--un-bg-opacity:1;background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.dark .before\:dark\:bg-violet-900:before{--un-bg-opacity:1;background-color:rgb(76 29 149/var(--un-bg-opacity))}.after\:bg-white:after{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.dark .dark\:from-neutral-800,.dark [dark\:from-neutral-800=""]{--un-gradient-from-position:0%;--un-gradient-from:rgb(38 38 38/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#26262600 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:from-primary-400\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:from-primary-400\/20{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-neutral-50,[from-neutral-50=""]{--un-gradient-from-position:0%;--un-gradient-from:rgb(250 250 250/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#fafafa00 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500\/20,.before\:from-primary-500\/20:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .before\:dark\:from-primary-400\/20:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark [before~="dark:from-primary-400/0"]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark [hover~="before:dark:from-primary-400/20"]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}[before~=from-primary-500\/0]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}[hover~="before:from-primary-500/20"]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:via-primary-400\/10{--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.via-primary-500\/10,.before\:via-primary-500\/10:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.dark .before\:dark\:via-primary-400\/10:before,.dark [hover~="before:dark:via-primary-400/10"]:hover:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}[hover~="before:via-primary-500/10"]:hover:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.dark .dark\:to-neutral-900{--un-gradient-to-position:100%;--un-gradient-to:rgb(23 23 23/var(--un-to-opacity,1))var(--un-gradient-to-position)}.dark .dark\:to-primary-400\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.dark .dark\:to-transparent,.to-transparent{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.to-neutral-100,[to-neutral-100=""]{--un-gradient-to-position:100%;--un-gradient-to:rgb(245 245 245/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-primary-400{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-primary-500\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.before\:to-transparent:before,.dark .before\:dark\:to-transparent:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.dark [before~="dark:to-primary-400/0"]:before{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.dark [hover~="before:dark:to-transparent"]:hover:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}[before~=to-primary-500\/0]:before{--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}[hover~=before\:to-transparent]:hover:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.bg-gradient-to-b,[bg-gradient-to-b=""]{--un-gradient-shape:to bottom in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}.bg-gradient-to-r,.before\:bg-gradient-to-r:before,[before~=bg-gradient-to-r]:before,[hover~=before\:bg-gradient-to-r]:hover:before{--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.dark .dark\:fill-neutral-800,.dark [dark\:fill-neutral-800=""]{--un-fill-opacity:1;fill:rgb(38 38 38/var(--un-fill-opacity))}.fill-white,[fill-white=""]{--un-fill-opacity:1;fill:rgb(255 255 255/var(--un-fill-opacity))}[stroke-width~="0.5"]{stroke-width:.5px}[stroke-width~="1.5"]{stroke-width:1.5px}[stroke-width~="2"]{stroke-width:2px}[stroke~="163"]{stroke-width:163px}[stroke~="175"]{stroke-width:175px}.object-cover,[object-cover=""]{object-fit:cover}.object-contain,[object-contain=""]{object-fit:contain}.p-1,[p-1=""]{padding:.25rem}.p-1\.5,[p-1\.5=""]{padding:.375rem}.p-2,.p2,[p-2=""],[p~="2"],[p2=""]{padding:.5rem}.p-2\.5,[p~="2.5"]{padding:.625rem}.p-3,[p-3=""]{padding:.75rem}.p-4,[p-4=""]{padding:1rem}.p-5,[p-5=""]{padding:1.25rem}.p-6{padding:1.5rem}.p-8,[p-8=""]{padding:2rem}.px,.px-4,[px-4=""],[px=""]{padding-left:1rem;padding-right:1rem}.px-0{padding-left:0;padding-right:0}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2,.px2,[px-2=""],[px~="2"],[px2=""]{padding-left:.5rem;padding-right:.5rem}.px-3,[px-3=""]{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py,.py-4,[py~="4"]{padding-top:1rem;padding-bottom:1rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5,[py-0\.5=""]{padding-top:.125rem;padding-bottom:.125rem}.py-1,.py1,[py-1=""],[py~="1"],[py1=""]{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5,[py-1\.5=""]{padding-top:.375rem;padding-bottom:.375rem}.py-2,[py-2=""]{padding-top:.5rem;padding-bottom:.5rem}.py-3,[py-3=""]{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-2,[pb-2=""]{padding-bottom:.5rem}.pb-4,[pb-4=""]{padding-bottom:1rem}.pb-6,[pb-6=""]{padding-bottom:1.5rem}.pl,.pl-4,[pl-4=""]{padding-left:1rem}.pl-10{padding-left:2.5rem}.pl-3,[pl-3=""]{padding-left:.75rem}.pl-5,[pl-5=""]{padding-left:1.25rem}.pr-\[20px\]{padding-right:20px}.pr-1,[pr-1=""]{padding-right:.25rem}.pr-3,[pr-3=""]{padding-right:.75rem}.pr-4,[pr-4=""]{padding-right:1rem}.pt,.pt-4,[pt-4=""]{padding-top:1rem}.pt-0{padding-top:0}.pt-10,[pt-10=""]{padding-top:2.5rem}.pt-2,[pt-2=""]{padding-top:.5rem}.pt-3{padding-top:.75rem}.text-center,[text-center=""],[text~=center]{text-align:center}.text-left,[text-left=""]{text-align:left}.text-right,[text-right=""]{text-align:right}.text-wrap,[text-wrap=""]{text-wrap:wrap}.text-nowrap,[text-nowrap=""]{text-wrap:nowrap}.text-2xl,[text-2xl=""],[text~="2xl"]{font-size:1.5rem;line-height:2rem}.text-3xl,[text-3xl=""]{font-size:1.875rem;line-height:2.25rem}.text-5xl,[text-5xl=""]{font-size:3rem;line-height:1}.text-6xl,[text-6xl=""]{font-size:3.75rem;line-height:1}.text-base,[text-base=""],[text~=base]{font-size:1rem;line-height:1.5rem}.text-lg,[text-lg=""],[text~=lg]{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""],[text~=sm]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""],[text~=xs]{font-size:.75rem;line-height:1rem}[text~="4xl"]{font-size:2.25rem;line-height:2.5rem}[text~="60"]{font-size:15rem}[default-text~="2"]:default{font-size:.5rem}.dark .dark\:text-amber-300{--un-text-opacity:1;color:rgb(252 211 77/var(--un-text-opacity))}.dark .dark\:text-amber-400{--un-text-opacity:1;color:rgb(251 191 36/var(--un-text-opacity))}.dark .dark\:text-blue-300{--un-text-opacity:1;color:rgb(147 197 253/var(--un-text-opacity))}.dark .dark\:text-green-300{--un-text-opacity:1;color:rgb(134 239 172/var(--un-text-opacity))}.dark .dark\:text-green-400{--un-text-opacity:1;color:rgb(74 222 128/var(--un-text-opacity))}.dark .dark\:text-lime-400{--un-text-opacity:1;color:rgb(163 230 53/var(--un-text-opacity))}.dark .dark\:text-neutral-100,[text~=neutral-100]{--un-text-opacity:1;color:rgb(245 245 245/var(--un-text-opacity))}.dark .dark\:text-neutral-100\/80{color:#f5f5f5cc}.dark .dark\:text-neutral-200,.dark [dark\:text-neutral-200=""],.dark [text~=dark\:neutral-200]{--un-text-opacity:1;color:rgb(229 229 229/var(--un-text-opacity))}.dark .dark\:text-neutral-300,.dark [dark\:text-neutral-300=""],.dark [text~=dark\:neutral-300],[text~=neutral-300]{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark .dark\:text-neutral-400,.dark [dark\:text-neutral-400=""],.dark [text~=dark\:neutral-400],.text-neutral-400,[text-neutral-400=""],[text~=neutral-400]{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}.dark .dark\:text-neutral-500,.dark [text~=dark\:neutral-500],.text-neutral-500,[text-neutral-500=""],[text~=neutral-500]{--un-text-opacity:1;color:rgb(115 115 115/var(--un-text-opacity))}.dark .dark\:text-neutral-600,.dark [text~=dark\:neutral-600],.text-neutral-600,[text~=neutral-600]{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}.dark .dark\:text-neutral-600\/20,.dark [text~="dark:neutral-600/20"]{color:#52525233}.dark .dark\:text-orange-400{--un-text-opacity:1;color:rgb(251 146 60/var(--un-text-opacity))}.dark .dark\:color-primary-100,.dark .dark\:text-primary-100,.dark [dark\:color-primary-100=""],.dark [text~=dark\:primary-100]{--un-text-opacity:1;color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))80%,oklch(100% 0 360/var(--un-text-opacity)))}.dark .dark\:text-primary-300,.dark [text~=dark\:primary-300],.text-primary-300,[text~=primary-300]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-primary-300\/80{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.color-primary-400,.dark .dark\:text-primary-400,.dark [text~=dark\:primary-400],.text-primary-400,[color-primary-400=""]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-primary-500,.text-primary-500,[text~=primary-500]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-primary-600,.text-primary-600,[text~=primary-600]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-red-100{--un-text-opacity:1;color:rgb(254 226 226/var(--un-text-opacity))}.dark .dark\:text-red-300{--un-text-opacity:1;color:rgb(252 165 165/var(--un-text-opacity))}.dark .dark\:text-red-400{--un-text-opacity:1;color:rgb(248 113 113/var(--un-text-opacity))}.dark .dark\:text-violet-400{--un-text-opacity:1;color:rgb(167 139 250/var(--un-text-opacity))}.dark .dark\:text-white,.dark [dark\:text-white=""],.dark [text~=dark\:white],.text-white,[text-white=""],[text~=white]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}.dark .dark\:text-white\/50{color:#ffffff80}.dark [text~="dark:cyan-600/90"]{color:#0891b2e6}.dark [text~=dark\:gray-200]{--un-text-opacity:1;color:rgb(229 231 235/var(--un-text-opacity))}.dark [text~="dark:neutral-600/50"]{color:#52525280}.dark [text~=dark\:neutral-900]{--un-text-opacity:1;color:rgb(23 23 23/var(--un-text-opacity))}.dark [text~=dark\:orange-500],.text-orange-500{--un-text-opacity:1;color:rgb(249 115 22/var(--un-text-opacity))}.dark [text~="dark:primary-300/50"]{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}.dark [text~="dark:primary-600/90"]{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.9)}.dark [text~="dark:violet-600/90"]{color:#7c3aede6}.text-amber-500{--un-text-opacity:1;color:rgb(245 158 11/var(--un-text-opacity))}.text-amber-600{--un-text-opacity:1;color:rgb(217 119 6/var(--un-text-opacity))}.text-amber-700{--un-text-opacity:1;color:rgb(180 83 9/var(--un-text-opacity))}.text-black,[text-black=""]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.text-blue-500{--un-text-opacity:1;color:rgb(59 130 246/var(--un-text-opacity))}.text-blue-700,[text-blue-700=""]{--un-text-opacity:1;color:rgb(29 78 216/var(--un-text-opacity))}.text-green-600{--un-text-opacity:1;color:rgb(22 163 74/var(--un-text-opacity))}.text-green-700,[text-green-700=""]{--un-text-opacity:1;color:rgb(21 128 61/var(--un-text-opacity))}.text-lime-500{--un-text-opacity:1;color:rgb(132 204 22/var(--un-text-opacity))}.text-neutral-200\/50,[text~=neutral-200\/50]{color:#e5e5e580}.text-neutral-400\/50,[text~=neutral-400\/50]{color:#a3a3a380}.text-neutral-500\/50,[text~=neutral-500\/50]{color:#73737380}.text-neutral-700,[text-neutral-700=""],[text~=neutral-700]{--un-text-opacity:1;color:rgb(64 64 64/var(--un-text-opacity))}.text-neutral-800{--un-text-opacity:1;color:rgb(38 38 38/var(--un-text-opacity))}.text-neutral-900\/80{color:#171717cc}.text-neutral-950{--un-text-opacity:1;color:rgb(10 10 10/var(--un-text-opacity))}.text-primary-600\/80{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}.text-primary-700{--un-text-opacity:1;color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-primary-800{--un-text-opacity:1;color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-primary-950{--un-text-opacity:1;color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-red-500{--un-text-opacity:1;color:rgb(239 68 68/var(--un-text-opacity))}.text-red-600{--un-text-opacity:1;color:rgb(220 38 38/var(--un-text-opacity))}.text-red-700,[text-red-700=""]{--un-text-opacity:1;color:rgb(185 28 28/var(--un-text-opacity))}.text-red-950{--un-text-opacity:1;color:rgb(69 10 10/var(--un-text-opacity))}.text-transparent{color:#0000}.text-violet-500,[text-violet-500=""]{--un-text-opacity:1;color:rgb(139 92 246/var(--un-text-opacity))}[text~=complementary-400]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 180)/var(--un-text-opacity))}[text~=cyan-400]{--un-text-opacity:1;color:rgb(34 211 238/var(--un-text-opacity))}[text~=cyan-400\/90]{color:#22d3eee6}[text~=gray-700]{--un-text-opacity:1;color:rgb(55 65 81/var(--un-text-opacity))}[text~=orange-700]{--un-text-opacity:1;color:rgb(194 65 12/var(--un-text-opacity))}[text~=primary-400\/90]{color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.9)}[text~=violet-400\/90]{color:#a78bfae6}.dark .dark\:hover\:text-neutral-300:hover{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark [hover~="dark:text-primary-300/80"]:hover{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.dark [text~="dark:hover:primary-200"]:hover{--un-text-opacity:1;color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="dark:hover:primary-500"]:hover{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.hover\:text-neutral-700:hover{--un-text-opacity:1;color:rgb(64 64 64/var(--un-text-opacity))}[hover~=text-primary-600\/80]:hover{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}[text~=hover\:primary-500]:hover{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}[text~=hover\:primary-600]:hover{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="dark:disabled:neutral-600"]:disabled{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}[text~=disabled\:neutral-400]:disabled{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}.dark [text~="placeholder:dark:hover:primary-400"]:hover::placeholder{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="placeholder:dark:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="placeholder:dark:primary-300"]::placeholder{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="placeholder:dark:primary-300/50"]::placeholder{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}[text~="placeholder:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}[text~=placeholder\:primary-400]::placeholder{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.font-bold,[font-bold=""]{font-weight:700}.font-medium,[font-medium=""]{font-weight:500}.font-normal,[font-normal=""]{font-weight:400}.font-semibold,[font-semibold=""]{font-weight:600}.leading-10,.lh-10{line-height:2.5rem}[leading~="[0.75]"]{line-height:.75}[leading~="[1]"]{line-height:1}.font-cuteen,[font-cuteen=""]{font-family:Sniglet}.font-jura,[font-jura=""]{font-family:Jura}.font-mono,[font-mono=""]{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-quicksand,[font-quicksand=""]{font-family:Quicksand}.font-sans,[font-sans=""]{font-family:DM Sans,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-italic,.italic,[font-italic=""]{font-style:italic}.decoration-underline,.underline,[decoration-underline=""],[underline=""]{text-decoration-line:underline}.decoration-dotted,[decoration-dotted=""]{text-decoration-style:dotted}.decoration-dashed,[decoration-dashed=""]{text-decoration-style:dashed}.tab,[aria-checked~=tab][aria-checked=true],[tab=""],[checked~=tab]:checked{tab-size:4}.text-stroke-1,[text-stroke-1=""]{-webkit-text-stroke-width:1px}.text-shadow{--un-text-shadow:0 0 1px var(--un-text-shadow-color,#0003),0 0 1px var(--un-text-shadow-color,#0100051a);text-shadow:var(--un-text-shadow)}.\[\&\:checked\+div_\.radio-dot\]\:opacity-100:checked+div .radio-dot,.opacity-100,.group:hover .group-hover\:opacity-100,.group:hover [group-hover\:opacity-100=""]{opacity:1}.op-0,.opacity-0,[opacity-0=""]{opacity:0}.op50,.opacity-50,[op50=""]{opacity:.5}.opacity-25{opacity:.25}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-95,[opacity-95=""]{opacity:.95}[hover~=opacity-100]:hover{opacity:1}.disabled\:opacity-50:disabled,[disabled\:opacity-50=""]:disabled{opacity:.5}.before\:opacity-100:before{opacity:1}[before~=opacity-0]:before{opacity:0}[hover~=before\:opacity-100]:hover:before{opacity:1}.mix-blend-screen,[mix-blend-screen=""]{mix-blend-mode:screen}.dark .dark\:shadow-lg,.shadow-lg,[shadow-lg=""]{--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.dark [shadow~=dark\:none]{--un-shadow:0 0 var(--un-shadow-color,#0000);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow{--un-shadow:var(--un-shadow-inset)0 1px 3px 0 var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 1px 2px -1px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-green-500\/50{--un-shadow-color:#22c55e80 }.shadow-md,[shadow-md=""],[shadow~=md]{--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-sm,[shadow-sm=""],[shadow~=sm]{--un-shadow:var(--un-shadow-inset)0 1px 2px 0 var(--un-shadow-color,#0000000d);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-xl,[shadow-xl=""]{--un-shadow:var(--un-shadow-inset)0 20px 25px -5px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 8px 10px -6px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-yellow-500\/30{--un-shadow-color:#eab3084d }[shadow-green-500=""]{--un-shadow-opacity:1;--un-shadow-color:rgb(34 197 94/var(--un-shadow-opacity))}[shadow~=cyan-200\/20]{--un-shadow-color:#a5f3fc33 }[shadow~=cyan-200\/50]{--un-shadow-color:#a5f3fc80 }[shadow~=primary-200\/20]{--un-shadow-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}[shadow~=primary-200\/50]{--un-shadow-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}[shadow~=violet-200\/20]{--un-shadow-color:#ddd6fe33 }[shadow~=violet-200\/50]{--un-shadow-color:#ddd6fe80 }.focus-within\:shadow-neutral-800:focus-within{--un-shadow-opacity:1;--un-shadow-color:rgb(38 38 38/var(--un-shadow-opacity))}[shadow~="focus-within:[0_0_0_1px]"]:focus-within{--un-shadow:0 0 0 1px var(--un-shadow-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.dark [hover~=dark\:shadow-lg]:hover{--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[hover~=shadow-md]:hover{--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.outline{outline-style:solid}.outline-none,[outline-none=""],[outline~=focus-within\:none]:focus-within{outline-offset:2px;outline:2px solid #0000}.focus\:ring-2:focus{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset)0 0 0 var(--un-ring-offset-width)var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset)0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width))var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.focus\:ring-offset-2:focus{--un-ring-offset-width:2px}.dark .dark\:focus\:ring-neutral-600\/30:focus{--un-ring-color:#5252524d }.dark .dark\:focus\:ring-neutral-600\/60:focus{--un-ring-color:#52525299 }.dark .dark\:focus\:ring-primary-600\/30:focus{--un-ring-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:focus\:ring-red-600\/30:focus{--un-ring-color:#dc26264d }.dark .dark\:focus\:ring-red-600\/60:focus{--un-ring-color:#dc262699 }.focus\:ring-black\/10:focus{--un-ring-color:#0000001a }.focus\:ring-neutral-300\/30:focus{--un-ring-color:#d4d4d44d }.focus\:ring-primary-300\/60:focus{--un-ring-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.6)}.focus\:ring-red-300\/30:focus{--un-ring-color:#fca5a54d }.dark .dark\:focus\:ring-offset-neutral-900:focus{--un-ring-offset-opacity:1;--un-ring-offset-color:rgb(23 23 23/var(--un-ring-offset-opacity))}.focus\:ring-offset-white:focus{--un-ring-offset-opacity:1;--un-ring-offset-color:rgb(255 255 255/var(--un-ring-offset-opacity))}.backdrop-blur-lg{--un-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-md,[backdrop-blur-md=""]{--un-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-sm,[backdrop-blur-sm=""]{--un-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-xl,[backdrop-blur-xl=""]{--un-backdrop-blur:blur(24px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.blur{--un-blur:blur(8px);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.drop-shadow{--un-drop-shadow:drop-shadow(0 1px 2px var(--un-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--un-drop-shadow-color,#0000000f));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.drop-shadow-sm,[drop-shadow-sm=""]{--un-drop-shadow:drop-shadow(0 1px 1px var(--un-drop-shadow-color,#0000000d));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~=none],.dark [drop-shadow~="dark:hover:none"]:hover{--un-drop-shadow:drop-shadow(0 0 var(--un-drop-shadow-color,#0000));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~="hover:[0px_4px_4px_rgba(220,220,220,0.4)]"]:hover{--un-drop-shadow:drop-shadow(0px 4px 4px #dcdcdc66);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~="active:[0px_0px_0px_rgba(220,220,220,0.25)]"]:active{--un-drop-shadow:drop-shadow(0px 0px 0px #dcdcdc40);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.\[\&_\.provider-icon\]\:grayscale-100 .provider-icon,.grayscale-100,[grayscale-100=""]{--un-grayscale:grayscale(1);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.\[\&_\.provider-icon\]\:hover\:grayscale-0:hover .provider-icon{--un-grayscale:grayscale(0);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.filter{filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\[width\,margin\]{transition-property:width,margin;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-100,[transition~="100"]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.1s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all,[transition-all=""],[transition~=all]{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors,[transition-colors=""],[transition~=colors]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors\,transform\,width\,height{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity,[transition-opacity=""]{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform,[transition~=transform]{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=border]{transition-property:border;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=width]{transition-property:width;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=placeholder\:all]::placeholder,[before~=transition-all]:before,.after\:transition-all:after,[after~=transition-all]:after{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,[duration-150=""]{transition-duration:.15s}.duration-200,[duration-200=""],[transition~=duration-200]{transition-duration:.2s}.duration-250,[duration-250=""],[duration~="250"],[transition~=duration-250]{transition-duration:.25s}.duration-300,[transition~=duration-300]{transition-duration:.3s}.duration-400,[transition~=duration-400]{transition-duration:.4s}.duration-500,[duration-500=""],[duration~="500"],[transition~=duration-500]{transition-duration:.5s}.duration-75{transition-duration:75ms}[duration~="10"]{transition-duration:10ms}[duration~="1000"]{transition-duration:1s}.placeholder\:duration-250::placeholder,[placeholder\:duration-250=""]::placeholder,[transition~=placeholder\:duration-250]::placeholder{transition-duration:.25s}[before~=duration-400]:before,[after~=duration-400]:after{transition-duration:.4s}[delay~="10"]{transition-delay:10ms}[delay~="100"]{transition-delay:.1s}[delay~="11"]{transition-delay:11ms}[delay~="19"]{transition-delay:19ms}[delay~="2"]{transition-delay:2ms}[delay~="20"]{transition-delay:20ms}[delay~="200"]{transition-delay:.2s}[delay~="3"]{transition-delay:3ms}[delay~="4"]{transition-delay:4ms}[delay~="5"]{transition-delay:5ms}[delay~="50"]{transition-delay:50ms}[delay~="6"]{transition-delay:6ms}[delay~="7"]{transition-delay:7ms}[delay~="8"]{transition-delay:8ms}[delay~="9"]{transition-delay:9ms}.ease,.ease-in-out,[ease-in-out=""],[transition~=ease-in-out]{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-linear,[ease-linear=""]{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:ease-in-out::placeholder,[transition~=placeholder\:ease-in-out]::placeholder,[before~=ease-in-out]:before,[after~=ease-in-out]:after{transition-timing-function:cubic-bezier(.4,0,.2,1)}.will-change-background-color,[will-change-background-color=""]{will-change:background-color}.will-change-color,[will-change-color=""]{will-change:color}.will-change-transform,[will-change-transform=""]{will-change:transform}.will-change-width,[will-change-width=""]{will-change:width}.before\:content-\[\'\'\]:before,.after\:content-\[\'\'\]:after,.content-empty,[before~=content-empty]:before,[after~=content-empty]:after{content:""}.hidden,[hidden=""]{display:none}.bg-dotted-\[neutral-200\/60\]{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.6}.bg-dotted-\[neutral-200\/80\]{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8}.dark .dark\:bg-dotted-\[neutral-700\/25\]{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.25}.dark .dark\:bg-dotted-\[neutral-700\/40\]{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.4}.dark .dark\:hover\:bg-dotted-\[primary-200\/20\]:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.hover\:bg-dotted-\[primary-300\/50\]:hover,.after\:bg-dotted-\[primary-300\/50\]:after{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .dark\:after\:bg-dotted-\[primary-200\/20\]:after,.dark [hover~="dark:after:bg-dotted-[primary-200/20]"]:hover:after{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}[after~="bg-dotted-[neutral-200/80]"]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8}[hover~="after:bg-dotted-[primary-300/50]"]:hover:after{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.transition-colors-none,.placeholder\:transition-colors-none::placeholder{transition-property:color,background-color,border-color,text-color;transition-duration:0s}@media (max-width:1023.9px){[min-w~="svg{opacity:0;transform-origin:50%;animation:.3s forwards sonner-fade-in;transform:scale(.8)}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{flex-direction:column;gap:2px;display:flex}[data-sonner-toast][data-styled=true] [data-button]{height:24px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);cursor:pointer;border:none;border-radius:4px;outline:none;flex-shrink:0;align-items:center;padding-left:8px;padding-right:8px;font-size:12px;font-weight:500;transition:opacity .4s,box-shadow .2s;display:flex}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:#00000014}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:#ffffff4d}[data-sonner-toast][data-styled=true] [data-close-button]{left:var(--toast-close-button-start);right:var(--toast-close-button-end);width:20px;height:20px;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);cursor:pointer;z-index:1;border-radius:50%;justify-content:center;align-items:center;padding:0;transition:opacity .1s,background .2s,border-color .2s;display:flex;position:absolute;top:0}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";z-index:-1;height:100%;position:absolute;left:-100%;right:-100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3)translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3)translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]:after{content:"";height:calc(var(--gap) + 1px);width:100%;position:absolute;bottom:100%;left:0}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before)*.05 + 1;--y:translateY(calc(var(--lift-amount)*var(--toasts-before)))scale(calc(-1*var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift)*var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift)*-100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift)*var(--offset) + var(--lift)*-100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y)translateY(var(--swipe-amount-y,0px))translateX(var(--swipe-amount-x,0px));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y)translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y)translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y)translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y)translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y)translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y)translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y)translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y)translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%;position:fixed}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left)*-1)}[data-sonner-toaster] [data-sonner-toast]{width:calc(100% - var(--mobile-offset-left)*2);left:0;right:0}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:#ecfdf3;--success-border:#bffcd9;--success-text:#008a2e;--info-bg:#f0f8ff;--info-border:#dde7fd;--info-text:#0973dc;--warning-bg:#fffcf0;--warning-border:#fbeeb1;--warning-text:#dc7609;--error-bg:#fff0f0;--error-border:#ffe0e1;--error-text:#e60000}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:#333;--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:#1f1f1f;--normal-border:#333;--normal-border-hover:#404040;--normal-text:var(--gray1);--success-bg:#001f0f;--success-border:#003d1c;--success-text:#59f3a6;--info-bg:#000d1f;--info-border:#19233e;--info-text:#5896f3;--warning-bg:#1d1f00;--warning-border:#2e2e00;--warning-text:#f3cf58;--error-bg:#2d0607;--error-border:#4d0408;--error-text:#ff9ea1}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);z-index:10;position:absolute;inset:0}.sonner-loading-wrapper[data-visible=false]{transform-origin:50%;animation:.2s forwards sonner-fade-out}.sonner-spinner{height:var(--size);width:var(--size);position:relative;top:50%;left:50%}.sonner-loading-bar{background:var(--gray11);border-radius:6px;width:24%;height:8%;animation:1.2s linear infinite sonner-spin;position:absolute;top:-3.9%;left:-10%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg)translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg)translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg)translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg)translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg)translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg)translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg)translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg)translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg)translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg)translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg)translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg)translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{transform-origin:50%;transition:opacity .2s,transform .2s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8)translate(-50%,-50%)}@property --chromatic-hue{syntax:"";inherits:true;initial-value:0}@keyframes hue-anim{0%{--chromatic-hue:0}to{--chromatic-hue:360}}.dynamic-hue{animation:10s linear infinite hue-anim}@font-face{font-family:cjkfonts AllSeto;font-style:normal;font-display:swap;src:url(/assets/cjkFonts_allseto_v1.11-ByBdljxl.ttf)format("truetype")}@font-face{font-family:Xiaolai SC;font-style:normal;font-display:swap;src:url(/assets/XiaolaiSC-Regular-SNWuh554.ttf)format("truetype")}*,:before,:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before,:after{--un-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.slide-away-enter-active,.slide-away-leave-active{transition:transform .3s ease-in-out,opacity .3s ease-in-out}.slide-away-enter,.slide-away-leave-to{opacity:0;transform:translateY(-10px)}.slide-away-enter-from,.slide-away-leave{opacity:0;transform:translateY(10px)}:root{--bg-color-light:#fff;--bg-color-dark:#121212;--bg-color:var(--bg-color-light)}html,body,#app{overscroll-behavior:none;height:100%;margin:0;padding:0}html{background:var(--bg-color);transition:all .3s ease-in-out}html.dark{--bg-color:var(--bg-color-dark);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}#nprogress{pointer-events:none}#nprogress .bar{background:color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))70%,#636363);opacity:.75;z-index:1031;width:100%;height:2px;position:fixed;top:0;left:0}@supports (color:lab(0% 0 0)){#nprogress .bar{background:color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))70%,lab(42% 0 0))}}.dark #nprogress .bar{background:`color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))90%,#dedede)`}@supports (color:lab(0% 0 0)){.dark #nprogress .bar{background:`color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))90%,lab(88.4% 0 0))`}}@media (display-mode:standalone){#nprogress,#nprogress .bar{display:none}}@font-face{font-family:DM Sans;font-style:normal;font-display:swap;font-weight:100 1000;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-sans:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Sans;font-style:normal;font-display:swap;font-weight:100 1000;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-sans:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:DM Serif Display;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-serif-display@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Serif Display;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-serif-display@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-300-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-400-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-500-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-300-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-400-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-500-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-800-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-ext-800-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/greek-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+1F??}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/kayah-li-wght-normal.woff2)format("woff2-variations");unicode-range:U+200C-200D,U+2010,U+25CC,U+A900-A92F}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Gugi;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/gugi@latest/korean-400-normal.woff2)format("woff2")}@font-face{font-family:Gugi;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/gugi@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Urbanist;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/urbanist:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Urbanist;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/urbanist:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-100-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-300-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-400-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-500-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-700-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-800-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-900-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-100-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-300-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-400-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-500-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-700-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-800-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-900-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-100-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-300-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-400-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-500-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-700-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-800-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-900-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-100-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-300-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-400-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-500-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-700-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-800-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-900-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-100-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-300-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-400-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-500-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-700-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-800-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-900-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-100-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-300-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-400-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-500-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-700-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-800-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-900-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-100-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-700-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-800-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-900-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-100-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-700-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-800-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-900-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-100-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-300-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-400-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-500-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-700-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-800-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-900-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}*,:before,:after,::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:root{--chromatic-hue:220.44;--chromatic-chroma:calc(.18 + (cos(var(--chromatic-hue)*3.14159/180)*.04));--chromatic-chroma-50:calc(var(--chromatic-chroma)*.3);--chromatic-chroma-100:calc(var(--chromatic-chroma)*.5);--chromatic-chroma-200:calc(var(--chromatic-chroma)*.6);--chromatic-chroma-300:calc(var(--chromatic-chroma)*.75);--chromatic-chroma-400:calc(var(--chromatic-chroma)*.85);--chromatic-chroma-500:var(--chromatic-chroma);--chromatic-chroma-600:calc(var(--chromatic-chroma)*1.15);--chromatic-chroma-700:calc(var(--chromatic-chroma)*1.1);--chromatic-chroma-800:calc(var(--chromatic-chroma)*.85);--chromatic-chroma-900:calc(var(--chromatic-chroma)*.7);--chromatic-chroma-950:calc(var(--chromatic-chroma)*.5)}.i-eos-icons\:three-dots-loading,[i-eos-icons\:three-dots-loading=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='18' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.67' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.33' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='0' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:alibabacloud{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M14.752 4.64h5.274C22.242 4.64 24 6.475 24 8.691V15.8a3.947 3.947 0 01-3.974 3.975h-5.274l1.299-1.835 3.822-1.222c.688-.23 1.146-.918 1.146-1.605v-5.81c0-.687-.458-1.375-1.146-1.605L16.05 6.475l-1.3-1.835zM2.98 15.111c0 .688.46 1.376 1.147 1.606l3.822 1.146 1.3 1.835H3.974A3.947 3.947 0 010 15.723V8.69c0-2.216 1.758-4.05 3.975-4.05h5.273L7.95 6.474 4.127 7.697c-.688.23-1.146.918-1.146 1.606v5.808z'/%3E%3Cpath d='M16.051 11.213H8.025v1.835h8.026v-1.835z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:anthropic{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:cloudflare{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cg%3E%3Cpath d='M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437'/%3E%3Cpath d='M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:deepseek{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:featherless-ai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' width='1em' height='1em' %3E%3Cg fill='currentColor'%3E%3Cpath d='M40.0866 4.68482C38.2902 3.5825 35.863 3 33.0672 3C28.7842 3 24.0653 4.35865 19.8276 6.72206L19.7979 6.71083C19.7979 6.71083 19.7937 6.73344 19.7914 6.74423C18.5086 7.4617 17.2656 8.2629 16.0981 9.15731C9.22112 14.4248 7.29519 20.6748 8.92004 24.0156C7.14142 27.0728 6.0457 30.2332 6 33.9767C9.41949 27.421 11.4719 22.108 22.6146 13.1637C19.4309 13.8501 13.9281 17.1057 10.2271 22.0459C9.87793 19.156 12.1477 14.4895 17.2033 10.6174C17.8435 10.127 18.5092 9.66864 19.1886 9.23374C18.6577 10.8934 18.8269 10.4806 17.7254 12.8076C19.3543 11.2566 20.4268 10.2995 22.035 7.64145C24.123 6.60964 26.2948 5.83844 28.4482 5.37235C28.0919 6.56071 27.4137 8.57466 26.4955 10.1669C26.4955 10.1669 28.8258 9.66435 30.7518 9.77788C29.6995 10.9459 28.7527 12.2094 27.7926 13.5012C26.4777 15.2696 25.1184 17.0983 23.3778 18.8005C23.1683 19.0054 22.968 19.1912 22.7649 19.383C20.0902 19.1254 18.3235 20.1315 16.6683 21.9089C17.9737 21.2966 19.7273 20.7924 20.8266 21.0959C18.8008 22.7579 15.6106 24.9488 12.9893 24.7684C12.4922 25.5295 12.4608 25.5528 11.9144 26.4722C16.1664 27.537 21.507 23.1905 24.6498 20.1161C26.4926 18.3131 27.8964 16.4257 29.2534 14.6012C32.0481 10.8427 34.4616 7.5974 39.8153 6.3624L42 5.85877L40.0866 4.68482Z' class='logo-mark'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:fireworks{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:gemini{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M12 24A14.304 14.304 0 000 12 14.304 14.304 0 0012 0a14.305 14.305 0 0012 12 14.305 14.305 0 00-12 12'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:huggingface{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.781 3.277c2.997 1.704 4.844 4.851 4.844 8.258 0 .995-.155 1.955-.443 2.857a1.332 1.332 0 011.125.4 1.41 1.41 0 01.2 1.723c.204.165.352.385.428.632l.017.062c.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.255.57-.893 1.018-2.128 1.5l-.202.078-.131.048c-.478.173-.89.295-1.061.345l-.086.024c-.89.243-1.808.375-2.732.394-1.32 0-2.3-.36-2.923-1.067a9.852 9.852 0 01-3.18.018C9.778 21.647 8.802 22 7.494 22a11.249 11.249 0 01-2.541-.343l-.221-.06-.273-.08a16.574 16.574 0 01-1.175-.405c-1.237-.483-1.875-.93-2.13-1.501-.186-.4-.151-.867.093-1.236a1.42 1.42 0 01-.2-1.166c.069-.273.226-.516.447-.694a1.41 1.41 0 01.2-1.722c.233-.248.557-.391.917-.407l.078-.001a9.385 9.385 0 01-.44-2.85c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0zM4.188 14.758c.125.687 2.357 2.35 2.14 2.707-.19.315-.796-.239-.948-.386l-.041-.04-.168-.147c-.561-.479-2.304-1.9-2.74-1.432-.43.46.119.859 1.055 1.42l.784.467.136.083c1.045.643 1.12.84.95 1.113-.188.295-3.07-2.1-3.34-1.083-.27 1.011 2.942 1.304 2.744 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725l.16.04.175.042c1.227.284 3.565.65 4.435-.604.673-.973.64-1.709-.248-2.61l-.057-.057c-.945-.928-1.495-2.288-1.495-2.288l-.017-.058-.025-.072c-.082-.22-.284-.639-.63-.584-.46.073-.798 1.21.12 1.933l.05.038c.977.721-.195 1.21-.573.534l-.058-.104-.143-.25c-.463-.799-1.282-2.111-1.739-2.397-.532-.332-.907-.148-.782.541zm14.842-.541c-.533.335-1.563 2.074-1.94 2.751a.613.613 0 01-.687.302.436.436 0 01-.176-.098.303.303 0 01-.049-.06l-.014-.028-.008-.02-.007-.019-.003-.013-.003-.017a.289.289 0 01-.004-.048c0-.12.071-.266.25-.427.026-.024.054-.047.084-.07l.047-.036c.022-.016.043-.032.063-.049.883-.71.573-1.81.131-1.917l-.031-.006-.056-.004a.368.368 0 00-.062.006l-.028.005-.042.014-.039.017-.028.015-.028.019-.036.027-.023.02c-.173.158-.273.428-.31.542l-.016.054s-.53 1.309-1.439 2.234l-.054.054c-.365.358-.596.69-.702 1.018-.143.437-.066.868.21 1.353.055.097.117.195.187.296.882 1.275 3.282.876 4.494.59l.286-.07.25-.074c.276-.084.736-.233 1.2-.42l.188-.077.065-.028.064-.028.124-.056.081-.038c.529-.252.964-.543.994-.827l.001-.036a.299.299 0 00-.037-.139c-.094-.176-.271-.212-.491-.168l-.045.01c-.044.01-.09.024-.136.04l-.097.035-.054.022c-.559.23-1.238.705-1.607.745h.006a.452.452 0 01-.05.003h-.024l-.024-.003-.023-.005c-.068-.016-.116-.06-.14-.142a.22.22 0 01-.005-.1c.062-.345.958-.595 1.713-.91l.066-.028c.528-.224.97-.483.985-.832v-.04a.47.47 0 00-.016-.098c-.048-.18-.175-.251-.36-.251-.785 0-2.55 1.36-2.92 1.36-.025 0-.048-.007-.058-.024a.6.6 0 01-.046-.088c-.1-.238.068-.462 1.06-1.066l.209-.126c.538-.32 1.01-.588 1.341-.831.29-.212.475-.406.503-.6l.003-.028c.008-.113-.038-.227-.147-.344a.266.266 0 00-.07-.054l-.034-.015-.013-.005a.403.403 0 00-.13-.02c-.162 0-.369.07-.595.18-.637.313-1.431.952-1.826 1.285l-.249.215-.033.033c-.08.078-.288.27-.493.386l-.071.037-.041.019a.535.535 0 01-.122.036h.005a.346.346 0 01-.031.003l.01-.001-.013.001c-.079.005-.145-.021-.19-.095a.113.113 0 01-.014-.065c.027-.465 2.034-1.991 2.152-2.642l.009-.048c.1-.65-.271-.817-.791-.493zM11.938 2.984c-4.798 0-8.688 3.829-8.688 8.55 0 .692.083 1.364.24 2.008l.008-.009c.252-.298.612-.46 1.017-.46.355.008.699.117.993.312.22.14.465.384.715.694.261-.372.69-.598 1.15-.605.852 0 1.367.728 1.562 1.383l.047.105.06.127c.192.396.595 1.139 1.143 1.68 1.06 1.04 1.324 2.115.8 3.266a8.865 8.865 0 002.024-.014c-.505-1.12-.26-2.17.74-3.186l.066-.066c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694a1.87 1.87 0 01.99-.312c.357 0 .682.126.925.36.14-.61.215-1.245.215-1.898 0-4.722-3.89-8.55-8.687-8.55zm1.857 8.926l.439-.212c.553-.264.89-.383.89.152 0 1.093-.771 3.208-3.155 3.262h-.184c-2.325-.052-3.116-2.06-3.156-3.175l-.001-.087c0-1.107 1.452.586 3.25.586.716 0 1.379-.272 1.917-.526zm4.017-3.143c.45 0 .813.358.813.8 0 .441-.364.8-.813.8a.806.806 0 01-.812-.8c0-.442.364-.8.812-.8zm-11.624 0c.448 0 .812.358.812.8 0 .441-.364.8-.812.8a.806.806 0 01-.813-.8c0-.442.364-.8.813-.8zm7.79-.841c.32-.384.846-.54 1.33-.394.483.146.83.564.878 1.06.048.495-.212.97-.659 1.203-.322.168-.447-.477-.767-.585l.002-.003c-.287-.098-.772.362-.925.079a1.215 1.215 0 01.14-1.36zm-4.323 0c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003c-.108.036-.194.134-.273.24l-.118.165c-.11.15-.22.262-.377.18a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:microsoft{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M11.49 2H2v9.492h9.492V2h-.002z'/%3E%3Cpath d='M22 2h-9.492v9.492H22V2z'/%3E%3Cpath d='M11.49 12.508H2V22h9.492v-9.492h-.002z'/%3E%3Cpath d='M22 12.508h-9.492V22H22v-9.492z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:mistral{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:moonshot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:novita{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M9.167 4.17v5.665L0 19.003h9.167v-5.666l5.666 5.666H24L9.167 4.17z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:ollama{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:openai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:openrouter{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:perplexity{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:player2{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M19.956 10.178C19.8934 10.7544 19.724 11.6784 19.1182 12.5274C18.3667 13.5817 17.3528 13.8824 16.9558 13.9746C16.6911 14.0049 16.3026 14.045 15.8323 14.0789C14.1804 14.2045 13.0525 14.1565 11.7041 14.131C10.81 14.1143 9.54304 14.1034 7.98548 14.131C7.97564 16.7493 7.96551 19.368 7.95508 21.987L5 22V15.8717C5.00358 14.6542 5.00983 12.9193 5.03397 10.7643C6.47441 10.7684 14.6905 10.7205 15.6696 10.7721C15.8672 10.7841 16.3621 10.8039 16.6764 10.4458C16.8842 10.2113 16.9696 9.83348 16.9763 9.26802C16.9835 8.82659 16.9902 8.38204 16.9763 7.94322C16.9459 6.90454 16.608 6.51472 15.7103 6.51107C12.8124 6.5069 9.91142 6.43915 7.01356 6.51107C6.60048 6.51888 5.90083 6.53087 5.02056 6.50325V3C5.43007 3.00782 6.13285 3.02397 7.00686 3.01563C11.1399 2.98436 12.7292 3.01199 15.5328 3.01563C18.3591 3.0198 19.994 4.94393 19.994 8.26009C19.9913 8.90059 20.0253 9.54944 19.956 10.178Z'/%3E%3Cpath d='M20 19H11V22H20V19Z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:together{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cg%3E%3Cpath d='M17.385 11.23a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm0 10.77a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm-10.77 0a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23z' opacity='.2'/%3E%3Ccircle cx='6.615' cy='6.615' r='4.615'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:vllm{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M0 4.973h9.324V23L0 4.973z'/%3E%3Cpath d='M13.986 4.351L22.378 0l-6.216 23H9.324l4.662-18.649z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:volcengine{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M7.29 5.36L3.148 21.737a.215.215 0 00.203.261h8.29a.214.214 0 00.215-.261L7.7 5.359a.214.214 0 00-.41 0z' fill-opacity='.5'/%3E%3Cpath clip-rule='evenodd' d='M4.553 16.18l-1.406 5.558a.214.214 0 00.203.261h2.42-4.551a.214.214 0 01-.214-.26l2.275-8.961a.214.214 0 01.409 0l.864 3.402z'/%3E%3Cpath d='M14.44.15a.214.214 0 00-.41 0L8.366 21.739a.214.214 0 00.214.261H19.9a.214.214 0 00.215-.261L14.44.151z' fill-opacity='.5'/%3E%3Cpath clip-rule='evenodd' d='M16.694 22h3.207a.215.215 0 00.214-.262l-1.839-6.993 1.164-4.592a.214.214 0 01.411 0l2.951 11.586a.214.214 0 01-.214.261h-5.894z'/%3E%3Cpath d='M10.278 7.741L6.685 21.736a.214.214 0 00.214.264h7.17a.216.216 0 00.214-.166.216.216 0 000-.098L10.687 7.742a.214.214 0 00-.409 0z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:xai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:ghost,[i-lucide\:ghost=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 10h.01M15 10h.01M12 2a8 8 0 0 0-8 8v12l3-3l2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:mic,[i-lucide\:mic=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 19v3m7-12v2a7 7 0 0 1-14 0v-2'/%3E%3Crect width='6' height='13' x='9' y='2' rx='3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:music,[i-lucide\:music=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:discord{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:elevenlabs{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.604 0v24h4.931V0zm9.86 0v24h4.933V0z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:github,[i-simple-icons\:github=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:javascript{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M0 0h24v24H0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873c-.736-.345-1.554-.585-1.797-1.14c-.091-.33-.105-.51-.046-.705c.15-.646.915-.84 1.515-.66c.39.12.75.42.976.9c1.034-.676 1.034-.676 1.755-1.125c-.27-.42-.404-.601-.586-.78c-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005c-1.14 1.291-.811 3.541.569 4.471c1.365 1.02 3.361 1.244 3.616 2.205c.24 1.17-.87 1.545-1.966 1.41c-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109c1.74 1.756 6.09 1.666 6.871-1.004c.029-.09.24-.705.074-1.65zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805c0 1.232.063 2.363-.138 2.711c-.33.689-1.18.601-1.566.48c-.396-.196-.597-.466-.83-.855c-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517c.855.51 2.004.675 3.207.405c.783-.226 1.458-.691 1.811-1.411c.51-.93.402-2.07.397-3.346c.012-2.054 0-4.109 0-6.179z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:x{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584l-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:add-circle-line-duotone,[i-solar\:add-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12h-3m0 0H9m3 0V9m0 3v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:add-square-line-duotone,[i-solar\:add-square-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12h-3m0 0H9m3 0V9m0 3v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:alt-arrow-down-linear,[i-solar\:alt-arrow-down-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19 9l-7 6l-7-6'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:alt-arrow-left-line-duotone,[i-solar\:alt-arrow-left-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m15 5l-6 7l6 7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:armchair-2-bold-duotone,[i-solar\:armchair-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.533 18H6.75v2a.75.75 0 1 1-1.5 0v-2.324c-.829-.362-1.49-1.005-1.808-1.817l-.039-.102L2.1 12.264C1.685 11.15 2.613 10 3.927 10c.81 0 1.534.453 1.81 1.134l1.098 2.706c.1.246.15.37.222.47a1.2 1.2 0 0 0 .74.463c.13.027.277.027.57.027h6.98c.569 0 .853 0 1.091-.098q.196-.082.349-.219c.184-.166.281-.405.475-.883l1.001-2.466c.276-.68 1-1.134 1.81-1.134c1.314 0 2.242 1.15 1.827 2.264l-1.12 3c-.195.524-.292.785-.421 1.008a3.43 3.43 0 0 1-1.609 1.404V20a.75.75 0 1 1-1.5 0v-2.005c-.187.005-.415.005-.717.005'/%3E%3Cpath fill='currentColor' d='M13.236 3.5h-2.472c-1.1 0-1.976 0-2.66.088c-.706.09-1.285.28-1.746.72c-.464.441-.669 1.003-.765 1.685c-.093.658-.093 1.495-.093 2.54v2.195q.147.186.237.406l1.098 2.706c.1.246.15.37.222.47a1.2 1.2 0 0 0 .74.463c.13.027.277.027.57.027h6.98c.569 0 .853 0 1.091-.098q.196-.082.349-.219c.184-.166.281-.405.475-.883l1.001-2.466q.09-.221.237-.406V8.533c0-1.045 0-1.882-.093-2.54c-.096-.682-.301-1.244-.765-1.686c-.46-.438-1.04-.629-1.745-.72c-.685-.087-1.56-.087-2.661-.087' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:arrow-right-line-duotone,[i-solar\:arrow-right-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Cpath fill='currentColor' d='M4 11.25a.75.75 0 0 0 0 1.5zm0 1.5h16v-1.5H4z' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m14 6l6 6l-6 6'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:arrow-up-outline,[i-solar\:arrow-up-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.47 3.47a.75.75 0 0 1 1.06 0l6 6a.75.75 0 1 1-1.06 1.06l-4.72-4.72V20a.75.75 0 0 1-1.5 0V5.81l-4.72 4.72a.75.75 0 1 1-1.06-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:book-bookmark-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 20.028V18H8v2.028c0 .277 0 .416.095.472s.224-.006.484-.13l1.242-.593c.088-.042.132-.063.179-.063s.091.02.179.063l1.242.593c.26.124.39.186.484.13c.095-.056.095-.195.095-.472' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8 18h-.574c-1.084 0-1.462.006-1.753.068c-.513.11-.96.347-1.285.667c-.11.108-.164.161-.291.505s-.107.489-.066.78l.022.15c.11.653.31.998.616 1.244c.307.246.737.407 1.55.494c.837.09 1.946.092 3.536.092h4.43c1.59 0 2.7-.001 3.536-.092c.813-.087 1.243-.248 1.55-.494s.506-.591.616-1.243c.091-.548.11-1.241.113-2.171h-8v2.028c0 .277 0 .416-.095.472s-.224-.006-.484-.13l-1.242-.593c-.088-.042-.132-.063-.179-.063s-.091.02-.179.063l-1.242.593c-.26.124-.39.186-.484.13C8 20.444 8 20.305 8 20.028z'/%3E%3Cpath fill='currentColor' d='M4.727 2.733c.306-.308.734-.508 1.544-.618C7.105 2.002 8.209 2 9.793 2h4.414c1.584 0 2.688.002 3.522.115c.81.11 1.238.31 1.544.618c.305.308.504.74.613 1.557c.112.84.114 1.955.114 3.552V18H7.426c-1.084 0-1.462.006-1.753.068c-.513.11-.96.347-1.285.667c-.11.108-.164.161-.291.505A1.3 1.3 0 0 0 4 19.7V7.842c0-1.597.002-2.711.114-3.552c.109-.816.308-1.249.613-1.557' opacity='.5'/%3E%3Cpath fill='currentColor' d='M7.25 7A.75.75 0 0 1 8 6.25h8a.75.75 0 0 1 0 1.5H8A.75.75 0 0 1 7.25 7M8 9.75a.75.75 0 0 0 0 1.5h5a.75.75 0 0 0 0-1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:bookmark-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M21 11.098v4.993c0 3.096 0 4.645-.734 5.321c-.35.323-.792.526-1.263.58c-.987.113-2.14-.907-4.445-2.946c-1.02-.901-1.529-1.352-2.118-1.47a2.2 2.2 0 0 0-.88 0c-.59.118-1.099.569-2.118 1.47c-2.305 2.039-3.458 3.059-4.445 2.945a2.24 2.24 0 0 1-1.263-.579C3 20.736 3 19.188 3 16.091v-4.994C3 6.81 3 4.666 4.318 3.333S7.758 2 12 2s6.364 0 7.682 1.332S21 6.81 21 11.098' opacity='.5'/%3E%3Cpath fill='currentColor' d='M9 5.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:box-minimalistic-bold-duotone,[i-solar\:box-minimalistic-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8.422 20.618C10.178 21.54 11.056 22 12 22V12L2.638 7.073l-.04.067C2 8.154 2 9.417 2 11.942v.117c0 2.524 0 3.787.597 4.801c.598 1.015 1.674 1.58 3.825 2.709z'/%3E%3Cpath fill='currentColor' d='m17.577 4.432l-2-1.05C13.822 2.461 12.944 2 12 2c-.945 0-1.822.46-3.578 1.382l-2 1.05C4.318 5.536 3.242 6.1 2.638 7.072L12 12l9.362-4.927c-.606-.973-1.68-1.537-3.785-2.641' opacity='.7'/%3E%3Cpath fill='currentColor' d='m21.403 7.14l-.041-.067L12 12v10c.944 0 1.822-.46 3.578-1.382l2-1.05c2.151-1.129 3.227-1.693 3.825-2.708c.597-1.014.597-2.277.597-4.8v-.117c0-2.525 0-3.788-.597-4.802' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:bug-bold-duotone,[i-solar\:bug-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M19 11.938V15a7 7 0 0 1-6.25 6.96V15a.75.75 0 0 0-1.5 0v6.96A7 7 0 0 1 5 15v-3.062A3.94 3.94 0 0 1 8.938 8h6.124A3.94 3.94 0 0 1 19 11.938' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M19 14.75v-1.5h3a.75.75 0 0 1 0 1.5zm-1.504 4.586c.31-.393.58-.82.801-1.276l2.538 1.27a.75.75 0 1 1-.67 1.34zM5.703 18.06q.333.684.801 1.276l-2.669 1.335a.75.75 0 0 1-.67-1.342zM5 13.25H2a.75.75 0 0 0 0 1.5h3zm12.354-4.515l2.81-1.406a.75.75 0 1 1 .671 1.341L18.42 9.88a4 4 0 0 0-1.065-1.144M6.647 8.735c-.427.306-.79.695-1.067 1.144L3.165 8.67a.75.75 0 0 1 .67-1.341zM16.5 8.27V7.5a4.5 4.5 0 1 0-9 0v.77A3.9 3.9 0 0 1 8.938 8h6.124c.508 0 .993.096 1.438.27'/%3E%3Cpath fill='currentColor' d='M6.376 1.584a.75.75 0 0 0 .208 1.04l2.36 1.573a4.5 4.5 0 0 1 1.387-.877L7.416 1.376a.75.75 0 0 0-1.04.208m8.68 2.613a4.5 4.5 0 0 0-1.387-.877l2.915-1.944a.75.75 0 1 1 .832 1.248z' opacity='.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 14.25a.75.75 0 0 1 .75.75v7h-1.5v-7a.75.75 0 0 1 .75-.75' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:card-search-broken,[i-solar\:card-search-broken=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' d='M14 4c3.771 0 5.657 0 6.828 1.172S22 8.229 22 12v1M10 4C6.229 4 4.343 4 3.172 5.172S2 8.229 2 12s0 5.657 1.172 6.828S6.229 20 10 20h3m-3-4H6'/%3E%3Ccircle cx='18' cy='17' r='3'/%3E%3Cpath stroke-linecap='round' d='m20.5 19.5l1 1M2 10h5m15 0H11'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:chat-round-line-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12c0 1.6.376 3.112 1.043 4.453c.178.356.237.763.134 1.148l-.595 2.226a1.3 1.3 0 0 0 1.591 1.592l2.226-.596a1.63 1.63 0 0 1 1.149.133A9.96 9.96 0 0 0 12 22' opacity='.5'/%3E%3Cpath fill='currentColor' d='M7.825 12.85a.825.825 0 0 0 0 1.65h6.05a.825.825 0 0 0 0-1.65zm0-3.85a.825.825 0 0 0 0 1.65h8.8a.825.825 0 0 0 0-1.65z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:chat-square-like-bold-duotone,[i-solar\:chat-square-like-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m13.629 20.472l-.542.916c-.483.816-1.69.816-2.174 0l-.542-.916c-.42-.71-.63-1.066-.968-1.262c-.338-.197-.763-.204-1.613-.219c-1.256-.021-2.043-.098-2.703-.372a5 5 0 0 1-2.706-2.706C2 14.995 2 13.83 2 11.5v-1c0-3.273 0-4.91.737-6.112a5 5 0 0 1 1.65-1.651C5.59 2 7.228 2 10.5 2h3c3.273 0 4.91 0 6.113.737a5 5 0 0 1 1.65 1.65C22 5.59 22 7.228 22 10.5v1c0 2.33 0 3.495-.38 4.413a5 5 0 0 1-2.707 2.706c-.66.274-1.447.35-2.703.372c-.85.015-1.275.022-1.613.219c-.338.196-.548.551-.968 1.262' opacity='.5'/%3E%3Cpath fill='currentColor' d='M10.99 14.308c-1.327-.978-3.49-2.84-3.49-4.593c0-2.677 2.475-3.677 4.5-1.609c2.025-2.068 4.5-1.068 4.5 1.609c0 1.752-2.163 3.615-3.49 4.593c-.454.335-.681.502-1.01.502s-.556-.167-1.01-.502'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:check-circle-bold-duotone,[i-solar\:check-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M16.03 8.97a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47l2.235-2.235L14.97 8.97a.75.75 0 0 1 1.06 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:check-circle-line-duotone,[i-solar\:check-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m8.5 12.5l2 2l5-5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:close-circle-bold-duotone,[i-solar\:close-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.97 8.97a.75.75 0 0 1 1.06 0L12 10.94l1.97-1.97a.75.75 0 1 1 1.06 1.06L13.06 12l1.97 1.97a.75.75 0 0 1-1.06 1.06L12 13.06l-1.97 1.97a.75.75 0 0 1-1.06-1.06L10.94 12l-1.97-1.97a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:close-circle-line-duotone,[i-solar\:close-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='m14.5 9.5l-5 5m0-5l5 5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:code-bold-duotone,[i-solar\:code-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.443 7.328a.75.75 0 0 1 1.059-.056l1.737 1.564c.737.663 1.347 1.212 1.767 1.71c.44.525.754 1.088.754 1.784c0 .695-.313 1.258-.754 1.782c-.42.499-1.03 1.049-1.767 1.711l-1.737 1.564a.75.75 0 1 1-1.004-1.115l1.697-1.527c.788-.709 1.319-1.19 1.663-1.598c.33-.393.402-.622.402-.817c0-.196-.072-.425-.402-.818c-.344-.409-.875-.889-1.663-1.598l-1.697-1.527a.75.75 0 0 1-.056-1.06m-8.94 1.06a.75.75 0 0 0-1.004-1.115L4.761 8.836c-.737.663-1.347 1.212-1.767 1.71c-.44.525-.754 1.088-.754 1.784c0 .695.313 1.258.754 1.782c.42.499 1.03 1.049 1.767 1.711l1.737 1.564a.75.75 0 1 0 1.004-1.115l-1.697-1.527c-.788-.709-1.319-1.19-1.663-1.598c-.33-.393-.402-.622-.402-.817c0-.196.072-.425.402-.818c.344-.409.875-.889 1.663-1.598z'/%3E%3Cpath fill='currentColor' d='M14.182 4.276a.75.75 0 0 1 .53.918l-3.974 14.83a.75.75 0 1 1-1.449-.389l3.974-14.83a.75.75 0 0 1 .919-.53' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:danger-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12s4.477 10 10 10s10-4.477 10-10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 6.25a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0V7a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:danger-triangle-bold-duotone,[i-solar\:danger-triangle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 3c-2.31 0-3.77 2.587-6.688 7.762l-.364.644c-2.425 4.3-3.638 6.45-2.542 8.022S6.214 21 11.636 21h.728c5.422 0 8.134 0 9.23-1.572s-.117-3.722-2.542-8.022l-.364-.645C15.77 5.587 14.311 3 12 3' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 7.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V8a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:dialog-2-bold-duotone,[i-solar\:dialog-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m10.404 22.48l.275-.465c.44-.745.66-1.117 1.012-1.325c.351-.207.81-.222 1.725-.252c.859-.027 1.436-.102 1.93-.306a4.24 4.24 0 0 0 2.295-2.296c.323-.779.323-1.767.323-3.743v-.848c0-2.777 0-4.165-.625-5.185c-.35-.57-.83-1.05-1.4-1.4c-1.02-.625-2.408-.625-5.185-.625H8.21c-2.777 0-4.165 0-5.185.625c-.57.35-1.05.83-1.4 1.4C1 9.08 1 10.468 1 13.245v.848c0 1.976 0 2.964.323 3.744a4.24 4.24 0 0 0 2.295 2.295c.494.204 1.07.28 1.93.306c.916.03 1.374.045 1.725.252c.35.208.571.58 1.012 1.325l.275.465c.41.692 1.434.692 1.844 0m2.789-7.963a1.06 1.06 0 1 0 0-2.12a1.06 1.06 0 0 0 0 2.12m-2.65-1.06a1.06 1.06 0 1 1-2.121 0a1.06 1.06 0 0 1 2.12 0m-4.772 1.06a1.06 1.06 0 1 0 0-2.12a1.06 1.06 0 0 0 0 2.12' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M15.486 1c1.267 0 2.274 0 3.082.077c.829.079 1.53.244 2.153.626a4.8 4.8 0 0 1 1.575 1.575c.383.624.548 1.325.627 2.153c.076.808.076 1.816.076 3.082v.866c0 .901 0 1.619-.04 2.2c-.04.595-.125 1.106-.323 1.584a4.77 4.77 0 0 1-2.67 2.617q-.21.082-.368.135h-1.65c.016-.499.016-1.093.016-1.822v-.848c0-2.777 0-4.165-.625-5.185c-.35-.57-.83-1.05-1.4-1.4c-1.02-.625-2.408-.625-5.185-.625H8.21c-.986 0-1.796 0-2.478.028v-1.65q.05-.17.13-.396q.133-.389.346-.739a4.8 4.8 0 0 1 1.576-1.575c.624-.382 1.324-.547 2.153-.626C10.745 1 11.752 1 13.019 1z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:document-text-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M3 10c0-3.771 0-5.657 1.172-6.828S7.229 2 11 2h2c3.771 0 5.657 0 6.828 1.172S21 6.229 21 10v4c0 3.771 0 5.657-1.172 6.828S16.771 22 13 22h-2c-3.771 0-5.657 0-6.828-1.172S3 17.771 3 14z'/%3E%3Cpath stroke-linecap='round' d='M8 12h8M8 8h8m-8 8h5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:emoji-funny-square-bold-duotone,[i-solar\:emoji-funny-square-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M6.504 21.52c1.633.943 3.706.387 7.853-.724s6.22-1.666 7.163-3.3s.387-3.706-.724-7.853s-1.666-6.22-3.3-7.163s-3.706-.388-7.853.724c-4.147 1.11-6.22 1.666-7.163 3.3s-.388 3.706.724 7.853c1.11 4.147 1.666 6.22 3.3 7.163' opacity='.5'/%3E%3Cpath fill='currentColor' d='M14.898 11.224c.533-.143.792-.908.578-1.708s-.821-1.333-1.355-1.19c-.533.143-.792.907-.577 1.708c.214.8.82 1.333 1.354 1.19m-5.796 1.553c.534-.143.792-.908.578-1.708s-.82-1.333-1.354-1.19s-.792.907-.578 1.708s.82 1.333 1.354 1.19m-.917 2.974a.75.75 0 0 1 .91-.545c1.13.283 2.428.287 3.746-.066c1.318-.354 2.44-1.006 3.278-1.816a.75.75 0 1 1 1.043 1.078a8.4 8.4 0 0 1-1.15.928l.159.322a1.5 1.5 0 1 1-2.693 1.322l-.196-.4l-.053.014c-1.555.417-3.112.42-4.499.073a.75.75 0 0 1-.545-.91'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:eye-closed-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.919 6.605a1 1 0 0 0-1.838.79l.002.003l.003.007l.01.021l.032.072q.04.09.12.25c.105.21.262.506.47.857c.41.687 1.027 1.6 1.872 2.52l-.797.797a1 1 0 1 0 1.414 1.414l.84-.84c.565.455 1.197.885 1.897 1.256l-.782 1.202a1 1 0 0 0 1.676 1.091l.985-1.514c.677.208 1.402.355 2.177.425V16.5a1 1 0 0 0 1 1V13c-2.748 0-4.819-1.199-6.304-2.59l-.024-.022a12 12 0 0 1-.564-.569a13.4 13.4 0 0 1-1.67-2.237a12 12 0 0 1-.516-.968zm-1.838.79L2 7c-.92.394-.919.395-.919.395' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M15.22 12.398A8.7 8.7 0 0 1 12 13v4.5a1 1 0 0 0 1-1v-1.544c.772-.07 1.497-.217 2.176-.425l.986 1.515a1 1 0 0 0 1.676-1.091l-.782-1.203c.701-.37 1.332-.8 1.897-1.256l.84.84a1 1 0 1 0 1.414-1.414l-.797-.798a15.4 15.4 0 0 0 2.302-3.296a10 10 0 0 0 .19-.395l.011-.026l.004-.008l.002-.005a1 1 0 1 0-1.838-.788l-.005.011a5 5 0 0 1-.146.302a13 13 0 0 1-2.614 3.48c-.841.79-1.87 1.517-3.095 2' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:face-scan-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.801 2.57a.71.71 0 0 1-.555.838a8.78 8.78 0 0 0-6.838 6.838a.71.71 0 1 1-1.394-.283a10.2 10.2 0 0 1 7.949-7.949a.71.71 0 0 1 .838.556M2.57 13.199a.71.71 0 0 1 .838.555a8.78 8.78 0 0 0 6.838 6.838a.71.71 0 1 1-.283 1.394a10.2 10.2 0 0 1-7.948-7.949a.71.71 0 0 1 .555-.838M13.199 2.57a.71.71 0 0 1 .838-.556a10.2 10.2 0 0 1 7.949 7.949a.711.711 0 0 1-1.394.283a8.78 8.78 0 0 0-6.838-6.838a.71.71 0 0 1-.555-.838m8.231 10.629a.71.71 0 0 1 .556.838a10.2 10.2 0 0 1-7.949 7.949a.711.711 0 0 1-.283-1.394a8.78 8.78 0 0 0 6.838-6.838a.71.71 0 0 1 .838-.555' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M12 19.583a7.583 7.583 0 1 0 0-15.166a7.583 7.583 0 0 0 0 15.166' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.94 14.539a.71.71 0 0 1 .995-.148c.59.437 1.3.69 2.065.69a3.45 3.45 0 0 0 2.065-.69a.71.71 0 1 1 .847 1.142a4.87 4.87 0 0 1-2.912.97a4.87 4.87 0 0 1-2.911-.97a.71.71 0 0 1-.148-.994m5.547-2.895c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244m-4.976 0c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:filters-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M18 8A6 6 0 1 1 6 8a6 6 0 0 1 12 0'/%3E%3Cpath fill='currentColor' d='M13.58 13.79a6 6 0 0 1-7.16-3.58a6 6 0 1 0 7.16 3.58' opacity='.7'/%3E%3Cpath fill='currentColor' d='M13.58 13.79c.271.684.42 1.43.42 2.21a6 6 0 0 1-2 4.472a6 6 0 1 0 5.58-10.262a6.01 6.01 0 0 1-4 3.58' opacity='.4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:forward-linear,[i-solar\:forward-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19.5 12l-5-5m5 5l-5 5m5-5h-10c-1.667 0-5 1-5 5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:ghost-bold-duotone,[i-solar\:ghost-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 19.206V12c0-5.523-4.477-10-10-10S2 6.477 2 12v7.206a1.727 1.727 0 0 0 2.5 1.544a2.89 2.89 0 0 1 2.896.18a2.89 2.89 0 0 0 3.208 0l.353-.234a1.88 1.88 0 0 1 2.086 0l.353.235a2.89 2.89 0 0 0 3.208 0a2.89 2.89 0 0 1 2.897-.18A1.727 1.727 0 0 0 22 19.206' opacity='.5'/%3E%3Cpath fill='currentColor' d='M15 12c.552 0 1-.672 1-1.5S15.552 9 15 9s-1 .672-1 1.5s.448 1.5 1 1.5m-5-1.5c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5S8.448 9 9 9s1 .672 1 1.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:info-circle-line-duotone,[i-solar\:info-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='12' cy='12' r='10' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='M12 17v-6'/%3E%3Ccircle cx='1' cy='1' r='1' fill='currentColor' transform='matrix(1 0 0 -1 11 9)'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:layers-bold-duotone,[i-solar\:layers-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.979 9.685C2.993 8.891 2 8.494 2 8s.993-.89 2.979-1.685l2.808-1.123C9.773 4.397 10.767 4 12 4s2.227.397 4.213 1.192l2.808 1.123C21.007 7.109 22 7.506 22 8s-.993.89-2.979 1.685l-2.808 1.124C14.227 11.603 13.233 12 12 12s-2.227-.397-4.213-1.191z'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 8c0 .494.993.89 2.979 1.685l2.808 1.124C9.773 11.603 10.767 12 12 12s2.227-.397 4.213-1.191l2.808-1.124C21.007 8.891 22 8.494 22 8s-.993-.89-2.979-1.685l-2.808-1.123C14.227 4.397 13.233 4 12 4s-2.227.397-4.213 1.192L4.98 6.315C2.993 7.109 2 7.506 2 8' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m5.766 10l-.787.315C2.993 11.109 2 11.507 2 12s.993.89 2.979 1.685l2.808 1.124C9.773 15.603 10.767 16 12 16s2.227-.397 4.213-1.191l2.808-1.124C21.007 12.891 22 12.493 22 12s-.993-.89-2.979-1.685L18.234 10l-2.021.809C14.227 11.603 13.233 12 12 12s-2.227-.397-4.213-1.191z' opacity='.7'/%3E%3Cpath fill='currentColor' d='m5.766 14l-.787.315C2.993 15.109 2 15.507 2 16s.993.89 2.979 1.685l2.808 1.124C9.773 19.603 10.767 20 12 20s2.227-.397 4.213-1.192l2.808-1.123C21.007 16.891 22 16.494 22 16c0-.493-.993-.89-2.979-1.685L18.234 14l-2.021.809C14.227 15.603 13.233 16 12 16s-2.227-.397-4.213-1.191z' opacity='.4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:leaf-bold-duotone,[i-solar\:leaf-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 22c-4.418 0-8-3.646-8-8.143c0-4.462 2.553-9.67 6.537-11.531A3.45 3.45 0 0 1 12 2z' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M13.463 2.326A3.45 3.45 0 0 0 12 2v7l4.432-4.432c-.863-.947-1.86-1.724-2.97-2.242' opacity='.3'/%3E%3Cpath fill='currentColor' d='M12 9v5.5l6.614-6.614c-.572-1.22-1.308-2.357-2.182-3.318z' opacity='.4'/%3E%3Cpath fill='currentColor' d='m12 19.5l7.811-7.811a15 15 0 0 0-1.197-3.803L12 14.5z' opacity='.6'/%3E%3Cpath fill='currentColor' d='M19.811 11.689L12 19.5V22c4.418 0 8-3.646 8-8.143c0-.71-.064-1.438-.189-2.168' opacity='.7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magic-stick-2-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.714 2.127c-.836-.43-1.922.263-4.095 1.65l-.562.36c-.618.394-.927.591-1.273.648c-.347.056-.692-.034-1.382-.215l-.628-.164C6.345 3.769 5.13 3.45 4.436 4.13s-.412 1.908.157 4.363l.147.635c.161.697.242 1.046.177 1.393c-.066.346-.27.65-.68 1.26l-.372.555c-1.439 2.145-2.158 3.217-1.753 4.067c.406.85 1.668.915 4.192 1.045l.654.033c.717.037 1.076.056 1.382.213c.306.158.524.436.962.994l.398.507c1.539 1.962 2.309 2.943 3.255 2.788c.945-.154 1.441-1.342 2.433-3.717l.257-.614c.282-.675.422-1.012.677-1.261c.255-.25.595-.382 1.274-.647l.618-.24c2.39-.933 3.586-1.4 3.765-2.345s-.777-1.744-2.688-3.342l-.495-.413c-.543-.454-.815-.68-.963-.992s-.158-.672-.175-1.393l-.016-.657c-.062-2.538-.093-3.806-.928-4.236'/%3E%3Cpath fill='currentColor' d='M15.93 16.991c.127-.268.239-.45.392-.6c.172-.167.382-.282.71-.42l4.498 4.499a.75.75 0 0 1-1.06 1.06z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magic-stick-3-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3.845 3.845a2.883 2.883 0 0 0 0 4.077L5.432 9.51c.012-.014.555.503.568.49l4-4c.013-.013-.504-.556-.49-.568L7.922 3.845a2.883 2.883 0 0 0-4.077 0m1.288 11.462a.483.483 0 0 1 .9 0l.157.4a.48.48 0 0 0 .272.273l.398.157a.486.486 0 0 1 0 .903l-.398.158a.48.48 0 0 0-.272.273l-.157.4a.483.483 0 0 1-.9 0l-.157-.4a.48.48 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.903l.398-.157a.48.48 0 0 0 .272-.274z' opacity='.5'/%3E%3Cpath fill='currentColor' d='M19.967 9.13a.483.483 0 0 1 .9 0l.156.399c.05.125.148.224.273.273l.398.158a.486.486 0 0 1 0 .902l-.398.158a.5.5 0 0 0-.273.273l-.156.4a.483.483 0 0 1-.9 0l-.157-.4a.5.5 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.902l.398-.158a.5.5 0 0 0 .272-.273z' opacity='.2'/%3E%3Cpath fill='currentColor' d='M16.1 2.307a.483.483 0 0 1 .9 0l.43 1.095a.48.48 0 0 0 .272.274l1.091.432a.486.486 0 0 1 0 .903l-1.09.432a.5.5 0 0 0-.273.273L17 6.81a.483.483 0 0 1-.9 0l-.43-1.095a.5.5 0 0 0-.273-.273l-1.09-.432a.486.486 0 0 1 0-.903l1.09-.432a.5.5 0 0 0 .273-.274z' opacity='.7'/%3E%3Cpath fill='currentColor' d='M10.568 6.49c-.012.014-.555-.503-.568-.49l-4 4c-.013.013.504.556.49.568l9.588 9.587a2.883 2.883 0 1 0 4.078-4.077z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magnifer-line-duotone,[i-solar\:magnifer-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cdefs%3E%3Cmask id='solarMagniferLineDuotone0'%3E%3Cg fill='none' stroke-width='1.5'%3E%3Ccircle cx='11.5' cy='11.5' r='9.5' stroke='gray'/%3E%3Cpath stroke='%23fff' stroke-linecap='round' d='M18.5 18.5L22 22'/%3E%3C/g%3E%3C/mask%3E%3C/defs%3E%3Cpath fill='currentColor' d='M0 0h24v24H0z' mask='url(%23solarMagniferLineDuotone0)'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:microphone-2-bold-duotone,[i-solar\:microphone-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M4 9a.75.75 0 0 1 .75.75v1a7.25 7.25 0 1 0 14.5 0v-1a.75.75 0 0 1 1.5 0v1a8.75 8.75 0 0 1-8 8.718v2.282a.75.75 0 0 1-1.5 0v-2.282a8.75 8.75 0 0 1-8-8.718v-1A.75.75 0 0 1 4 9' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M9.75 7.75A.75.75 0 0 0 9 7H6.298a5.751 5.751 0 0 1 11.404 0H13.5a.75.75 0 0 0 0 1.5h4.25V10H13.5a.75.75 0 0 0 0 1.5h4.201a5.751 5.751 0 0 1-11.403 0H9A.75.75 0 0 0 9 10H6.25V8.5H9a.75.75 0 0 0 .75-.75' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12.75 10.75c0 .414.336.75.75.75h4.201l.049-1.5H13.5a.75.75 0 0 0-.75.75m0-3c0 .414.336.75.75.75h4.25L17.701 7H13.5a.75.75 0 0 0-.75.75m-3 0A.75.75 0 0 0 9 7H6.298L6.25 8.5H9a.75.75 0 0 0 .75-.75m0 3A.75.75 0 0 0 9 10H6.25l.048 1.5H9a.75.75 0 0 0 .75-.75'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:microphone-3-bold-duotone,[i-solar\:microphone-3-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M4 9a.75.75 0 0 1 .75.75v1a7.25 7.25 0 1 0 14.5 0v-1a.75.75 0 0 1 1.5 0v1a8.75 8.75 0 0 1-8 8.718v2.282a.75.75 0 0 1-1.5 0v-2.282a8.75 8.75 0 0 1-8-8.718v-1A.75.75 0 0 1 4 9' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 2a5.75 5.75 0 0 0-5.75 5.75v3a5.75 5.75 0 0 0 11.5 0v-3A5.75 5.75 0 0 0 12 2m2 9.5a.75.75 0 0 0 0-1.5h-4a.75.75 0 0 0 0 1.5zm-.25-3.75a.75.75 0 0 1-.75.75h-2A.75.75 0 0 1 11 7h2a.75.75 0 0 1 .75.75' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M14 11.5a.75.75 0 0 0 0-1.5h-4a.75.75 0 0 0 0 1.5zm-1-3A.75.75 0 0 0 13 7h-2a.75.75 0 0 0 0 1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:minus-circle-line-duotone,[i-solar\:minus-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12H9'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:notes-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='m20.312 12.647l.517-1.932c.604-2.255.907-3.382.68-4.358a4 4 0 0 0-1.162-2.011c-.731-.685-1.859-.987-4.114-1.591c-2.255-.605-3.383-.907-4.358-.68a4 4 0 0 0-2.011 1.162c-.587.626-.893 1.543-1.348 3.209l-.244.905l-.517 1.932c-.605 2.255-.907 3.382-.68 4.358a4 4 0 0 0 1.162 2.011c.731.685 1.859.987 4.114 1.592c2.032.544 3.149.843 4.064.73q.15-.019.294-.052a4 4 0 0 0 2.011-1.16c.685-.732.987-1.86 1.592-4.115Z'/%3E%3Cpath d='M16.415 17.974a4 4 0 0 1-1.068 1.678c-.731.685-1.859.987-4.114 1.591s-3.383.907-4.358.679a4 4 0 0 1-2.011-1.161c-.685-.731-.988-1.859-1.592-4.114l-.517-1.932c-.605-2.255-.907-3.383-.68-4.358a4 4 0 0 1 1.162-2.011c.731-.685 1.859-.987 4.114-1.592q.638-.172 1.165-.309'/%3E%3Cpath stroke-linecap='round' d='m11.777 10l4.83 1.294M11 12.898l2.898.776'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:pallete-2-bold-duotone,[i-solar\:pallete-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10.847 21.934C5.867 21.362 2 17.133 2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 5.157-3.283 4.733-6.086 4.37c-1.618-.209-3.075-.397-3.652.518c-.395.626.032 1.406.555 1.929a1.673 1.673 0 0 1 0 2.366c-.523.523-1.235.836-1.97.751' opacity='.5'/%3E%3Cpath fill='currentColor' d='M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0M6.5 13a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m11 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m-3-4.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:pause-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.076 8.617C8 8.801 8 9.034 8 9.5v5c0 .466 0 .699.076.883a1 1 0 0 0 .541.54c.184.077.417.077.883.077s.699 0 .883-.076a1 1 0 0 0 .54-.541c.077-.184.077-.417.077-.883v-5c0-.466 0-.699-.076-.883a1 1 0 0 0-.541-.54C10.199 8 9.966 8 9.5 8s-.699 0-.883.076a1 1 0 0 0-.54.541m4.999 0C13 8.801 13 9.034 13 9.5v5c0 .466 0 .699.076.883a1 1 0 0 0 .541.54c.184.077.417.077.883.077s.699 0 .883-.076a1 1 0 0 0 .54-.541c.077-.184.077-.417.077-.883v-5c0-.466 0-.699-.076-.883a1 1 0 0 0-.541-.54C15.199 8 14.966 8 14.5 8s-.699 0-.883.076a1 1 0 0 0-.54.541'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:people-nearby-bold-duotone,[i-solar\:people-nearby-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19.717 20.362C21.143 19.585 22 18.587 22 17.5c0-1.152-.963-2.204-2.546-3C17.623 13.58 14.962 13 12 13s-5.623.58-7.454 1.5C2.963 15.296 2 16.348 2 17.5s.963 2.204 2.546 3C6.377 21.42 9.038 22 12 22c3.107 0 5.882-.637 7.717-1.638' opacity='.6'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M9.25 4a2.75 2.75 0 1 1 5.5 0a2.75 2.75 0 0 1-5.5 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m8.223 11.574l-2.175-.725a1.532 1.532 0 0 1 .805-2.952l1.898.407l.21.044a15 15 0 0 0 6.288-.044l1.897-.407a1.532 1.532 0 0 1 .806 2.952l-2.175.725c-.263.088-.394.132-.493.193a1 1 0 0 0-.466.986c.016.115.066.244.165.503l1.247 3.242a1.473 1.473 0 0 1-2.654 1.26L12 15l-1.576 2.757a1.473 1.473 0 0 1-2.654-1.26l1.247-3.241c.1-.259.149-.388.165-.503a1 1 0 0 0-.466-.986c-.099-.061-.23-.105-.493-.193'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:play-circle-bold-duotone,[i-solar\:play-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='m15.414 13.059l-4.72 2.787C9.934 16.294 9 15.71 9 14.786V9.214c0-.924.934-1.507 1.694-1.059l4.72 2.787c.781.462.781 1.656 0 2.118'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:play-circle-broken{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M13.888 9.935C14.963 10.812 15.5 11.25 15.5 12s-.537 1.188-1.612 2.065c-.297.242-.591.47-.862.66c-.237.167-.506.339-.784.508c-1.073.652-1.609.978-2.09.617c-.48-.36-.524-1.116-.612-2.628c-.024-.427-.04-.846-.04-1.222s.016-.795.04-1.222c.088-1.512.132-2.267.612-2.628c.481-.361 1.018-.035 2.09.617c.278.169.547.341.784.508c.27.19.565.418.862.66Z'/%3E%3Cpath stroke-linecap='round' d='M7 3.338A9.95 9.95 0 0 1 12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12c0-1.821.487-3.53 1.338-5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:refresh-bold-duotone,[i-solar\:refresh-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12.079 2.25c-4.794 0-8.734 3.663-9.118 8.333H2a.75.75 0 0 0-.528 1.283l1.68 1.666a.75.75 0 0 0 1.056 0l1.68-1.666a.75.75 0 0 0-.528-1.283h-.893c.38-3.831 3.638-6.833 7.612-6.833a7.66 7.66 0 0 1 6.537 3.643a.75.75 0 1 0 1.277-.786A9.16 9.16 0 0 0 12.08 2.25'/%3E%3Cpath fill='currentColor' d='M20.841 10.467a.75.75 0 0 0-1.054 0L18.1 12.133a.75.75 0 0 0 .527 1.284h.899c-.381 3.83-3.651 6.833-7.644 6.833a7.7 7.7 0 0 1-6.565-3.644a.75.75 0 1 0-1.276.788a9.2 9.2 0 0 0 7.84 4.356c4.809 0 8.766-3.66 9.151-8.333H22a.75.75 0 0 0 .527-1.284z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:running-2-line-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='18.5' cy='4.5' r='2.5' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='m9 17l-1 1.2c-.738.886-1.107 1.328-1.61 1.564S5.31 20 4.157 20H3'/%3E%3Cpath fill='currentColor' d='M13.65 22a.75.75 0 0 0 1.5 0zm-1.085-5.754l.453-.598zm1.184 1.015l.587-.466zm.557 1.12l.727-.186zm-.802-6.826a.75.75 0 0 0-1.009-1.11zm-2.652 1.61l.703.26zm.07 1.555l-.677.323zm2.728 5.219v2.06h1.5v-2.06zm-1.538-3.095c.663.502.887.679 1.05.884l1.174-.934c-.308-.387-.717-.69-1.319-1.146zm3.038 3.095c0-.755.006-1.264-.117-1.744l-1.453.373c.065.254.07.538.07 1.37zm-1.988-2.211c.197.247.339.534.417.84l1.454-.373a3.75 3.75 0 0 0-.697-1.4zm-.667-7.283c-.42.381-.945.836-1.354 1.224c-.21.198-.41.398-.573.586c-.149.172-.327.4-.42.649l1.407.521c-.007.021.014-.035.146-.187c.116-.134.276-.295.471-.48c.4-.38.865-.778 1.332-1.203zm.523 5.203c-.488-.37-.818-.62-1.056-.832c-.233-.208-.32-.33-.363-.418l-1.354.645c.167.35.423.63.72.894c.292.26.679.552 1.147.907zm-2.87-2.744a2.75 2.75 0 0 0 .097 2.139l1.354-.645a1.25 1.25 0 0 1-.044-.973z' opacity='.5'/%3E%3Cpath fill='currentColor' d='m5.436 8.82l-.37-.652zm-1.807.164a.75.75 0 1 0 .742 1.304zm9.778-1.627l-.286.693zm-2.96-.715l-.055-.748zM21 12.75a.75.75 0 1 0 0-1.5zm-5.232-3.213l-.67.335zM5.065 8.168l-1.436.816l.742 1.304l1.435-.816zm8.627-1.505c-1.344-.553-2.08-.857-3.3-.769l.11 1.496c.823-.06 1.255.099 2.62.66zm-7.886 2.81c2.502-1.422 3.552-2 4.695-2.083l-.109-1.496c-1.56.114-2.949.923-5.327 2.274zm13.949 3.276H21v-1.5h-1.245zm-4.658-2.878a5.21 5.21 0 0 0 4.658 2.878v-1.5A3.71 3.71 0 0 1 16.439 9.2zm1.342-.67a5.33 5.33 0 0 0-2.747-2.538l-.57 1.387c.86.354 1.564 1 1.975 1.821z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:scale-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12' opacity='.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M16.656 2.75a.75.75 0 0 1 0-1.5H22a.75.75 0 0 1 .75.75v5.344a.75.75 0 0 1-1.5 0V3.81l-7.44 7.439H16a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1-.75-.75V8a.75.75 0 0 1 1.5 0v2.19l7.44-7.44z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:settings-bold-duotone,[i-solar\:settings-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M14.279 2.152C13.909 2 13.439 2 12.5 2s-1.408 0-1.779.152a2 2 0 0 0-1.09 1.083c-.094.223-.13.484-.145.863a1.62 1.62 0 0 1-.796 1.353a1.64 1.64 0 0 1-1.579.008c-.338-.178-.583-.276-.825-.308a2.03 2.03 0 0 0-1.49.396c-.318.242-.553.646-1.022 1.453c-.47.807-.704 1.21-.757 1.605c-.07.526.074 1.058.4 1.479c.148.192.357.353.68.555c.477.297.783.803.783 1.361s-.306 1.064-.782 1.36c-.324.203-.533.364-.682.556a2 2 0 0 0-.399 1.479c.053.394.287.798.757 1.605s.704 1.21 1.022 1.453c.424.323.96.465 1.49.396c.242-.032.487-.13.825-.308a1.64 1.64 0 0 1 1.58.008c.486.28.774.795.795 1.353c.015.38.051.64.145.863c.204.49.596.88 1.09 1.083c.37.152.84.152 1.779.152s1.409 0 1.779-.152a2 2 0 0 0 1.09-1.083c.094-.223.13-.483.145-.863c.02-.558.309-1.074.796-1.353a1.64 1.64 0 0 1 1.579-.008c.338.178.583.276.825.308c.53.07 1.066-.073 1.49-.396c.318-.242.553-.646 1.022-1.453c.47-.807.704-1.21.757-1.605a2 2 0 0 0-.4-1.479c-.148-.192-.357-.353-.68-.555c-.477-.297-.783-.803-.783-1.361s.306-1.064.782-1.36c.324-.203.533-.364.682-.556a2 2 0 0 0 .399-1.479c-.053-.394-.287-.798-.757-1.605s-.704-1.21-1.022-1.453a2.03 2.03 0 0 0-1.49-.396c-.242.032-.487.13-.825.308a1.64 1.64 0 0 1-1.58-.008a1.62 1.62 0 0 1-.795-1.353c-.015-.38-.051-.64-.145-.863a2 2 0 0 0-1.09-1.083' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M15.523 12c0 1.657-1.354 3-3.023 3s-3.023-1.343-3.023-3S10.83 9 12.5 9s3.023 1.343 3.023 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:settings-minimalistic-bold-duotone,[i-solar\:settings-minimalistic-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.428 2c-1.114 0-2.129.6-4.157 1.802l-.686.406C5.555 5.41 4.542 6.011 3.985 7c-.557.99-.557 2.19-.557 4.594v.812c0 2.403 0 3.605.557 4.594s1.57 1.59 3.6 2.791l.686.407C10.299 21.399 11.314 22 12.428 22s2.128-.6 4.157-1.802l.686-.407c2.028-1.2 3.043-1.802 3.6-2.791c.557-.99.557-2.19.557-4.594v-.812c0-2.403 0-3.605-.557-4.594s-1.572-1.59-3.6-2.792l-.686-.406C14.555 2.601 13.542 2 12.428 2' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12.428 8.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:stop-circle-bold-duotone,[i-solar\:stop-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.586 8.586C8 9.172 8 10.114 8 12s0 2.828.586 3.414S10.114 16 12 16s2.828 0 3.414-.586S16 13.886 16 12s0-2.828-.586-3.414S13.886 8 12 8s-2.828 0-3.414.586'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:trash-bin-trash-linear,[i-solar\:trash-bin-trash-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' d='M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.196.81-4.856.81h-.774c-2.66 0-3.991 0-4.856-.81c-.865-.809-.954-2.136-1.13-4.79l-.46-6.9M9.5 11l.5 5m4.5-5l-.5 5'/%3E%3Cpath d='M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:tuning-square-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z'/%3E%3Ccircle cx='8' cy='10' r='2'/%3E%3Ccircle cx='2' cy='2' r='2' transform='matrix(1 0 0 -1 14 16)'/%3E%3Cpath stroke-linecap='round' d='M8 14v5m8-9V5M8 5v1m8 13v-1'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:undo-left-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7.53 3.47a.75.75 0 0 1 0 1.06L5.06 7l2.47 2.47a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m5.06 7l.75-.75h9.226c.904 0 1.633 0 2.222.053c.606.055 1.136.172 1.617.45a3.75 3.75 0 0 1 1.372 1.372c.278.481.395 1.011.45 1.617c.053.589.053 1.318.053 2.222v.072c0 .904 0 1.633-.053 2.222c-.055.606-.172 1.136-.45 1.617a3.75 3.75 0 0 1-1.372 1.373c-.481.277-1.011.394-1.617.449c-.589.053-1.318.053-2.222.053H8a.75.75 0 0 1 0-1.5h7c.948 0 1.61 0 2.122-.047c.502-.046.788-.13 1.003-.254a2.25 2.25 0 0 0 .823-.824c.125-.215.21-.5.255-1.003c.046-.512.047-1.174.047-2.122s0-1.61-.047-2.122c-.046-.503-.13-.788-.255-1.003a2.25 2.25 0 0 0-.823-.824c-.215-.124-.5-.208-1.003-.254c-.512-.046-1.174-.047-2.122-.047H5.81z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:upload-minimalistic-bold,[i-solar\:upload-minimalistic-bold=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12.554 2.494a.75.75 0 0 0-1.107 0l-4 4.375A.75.75 0 0 0 8.553 7.88l2.696-2.95V16a.75.75 0 0 0 1.5 0V4.932l2.697 2.95a.75.75 0 1 0 1.107-1.013z'/%3E%3Cpath fill='currentColor' d='M3.75 15a.75.75 0 0 0-1.5 0v.055c0 1.367 0 2.47.117 3.337c.12.9.38 1.658.981 2.26c.602.602 1.36.86 2.26.982c.867.116 1.97.116 3.337.116h6.11c1.367 0 2.47 0 3.337-.116c.9-.122 1.658-.38 2.26-.982s.86-1.36.982-2.26c.116-.867.116-1.97.116-3.337V15a.75.75 0 0 0-1.5 0c0 1.435-.002 2.436-.103 3.192c-.099.734-.28 1.122-.556 1.399c-.277.277-.665.457-1.4.556c-.755.101-1.756.103-3.191.103H9c-1.435 0-2.437-.002-3.192-.103c-.734-.099-1.122-.28-1.399-.556c-.277-.277-.457-.665-.556-1.4c-.101-.755-.103-1.756-.103-3.191'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:upload-square-line-duotone,[i-solar\:upload-square-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 17v-7m0 0l3 3m-3-3l-3 3'/%3E%3Cpath stroke-linecap='round' d='M16 7H8'/%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:user-rounded-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='6' r='4'/%3E%3Cellipse cx='12' cy='17' rx='7' ry='4'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:user-speak-rounded-bold-duotone,[i-solar\:user-speak-rounded-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='10' cy='6.75' r='4' fill='currentColor'/%3E%3Cellipse cx='10' cy='17.75' fill='currentColor' opacity='.5' rx='7' ry='4'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M18.357 2.364a.75.75 0 0 1 1.029-.257L19 2.75l.386-.643h.001l.002.002l.004.002l.01.006l.113.076c.07.049.166.12.277.212c.222.185.512.462.802.838c.582.758 1.155 1.914 1.155 3.507s-.573 2.75-1.155 3.507c-.29.376-.58.653-.802.838a4 4 0 0 1-.363.27l-.028.018l-.01.006l-.003.002l-.002.001s-.001.001-.387-.642l.386.643a.75.75 0 0 1-.776-1.283l.005-.004l.041-.027q.06-.042.177-.136c.152-.128.362-.326.573-.6c.417-.542.844-1.386.844-2.593s-.427-2.05-.844-2.593a3.8 3.8 0 0 0-.573-.6a3 3 0 0 0-.218-.163l-.005-.003a.75.75 0 0 1-.253-1.027' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M16.33 4.415a.75.75 0 0 1 1.006-.336L17 4.75l.336-.67h.001l.002.001l.004.002l.008.004l.022.012a2 2 0 0 1 .233.153c.136.102.31.254.48.467c.349.436.664 1.099.664 2.031s-.316 1.595-.664 2.031a2.7 2.7 0 0 1-.654.586l-.06.034l-.02.012l-.01.004l-.003.002l-.002.001l-.33-.657l.329.658a.75.75 0 0 1-.685-1.335l.003-.001l.052-.036c.052-.04.13-.106.209-.205c.15-.189.335-.526.335-1.094s-.184-.905-.335-1.094a1.2 1.2 0 0 0-.261-.24l-.003-.002a.75.75 0 0 1-.322-1' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:volume-loud-bold-duotone,[i-solar\:volume-loud-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2.003 11.716c.037-1.843.056-2.764.668-3.552a3 3 0 0 1 .413-.431c.752-.636 1.746-.636 3.733-.636c.71 0 1.065 0 1.403-.092q.105-.03.209-.067c.33-.121.627-.33 1.22-.746c2.338-1.645 3.508-2.467 4.489-2.11c.188.069.37.168.533.29c.848.635.913 2.115 1.042 5.073c.048 1.096.08 2.034.08 2.555s-.032 1.46-.08 2.555c-.13 2.958-.194 4.438-1.042 5.073a2.1 2.1 0 0 1-.533.29c-.982.357-2.15-.465-4.49-2.11c-.592-.416-.889-.625-1.22-.746a3 3 0 0 0-.208-.067c-.338-.092-.693-.092-1.403-.092c-1.987 0-2.98 0-3.733-.636a3 3 0 0 1-.413-.43c-.612-.79-.63-1.71-.668-3.552a14 14 0 0 1 0-.57'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M19.49 5.552a.66.66 0 0 1 .97.094l-.53.471l.53-.47h.002v.002l.004.004l.007.009l.078.112a5 5 0 0 1 .187.305c.149.265.339.652.526 1.171C21.64 8.291 22 9.851 22 12s-.36 3.71-.736 4.75c-.187.52-.377.907-.526 1.172a5 5 0 0 1-.265.417l-.007.009l-.003.003l-.001.002s-.001.001-.531-.47l.53.471a.66.66 0 0 1-.972.094a.77.77 0 0 1-.091-1.03l.003-.005l.028-.04a3 3 0 0 0 .126-.208c.11-.195.264-.506.422-.943c.314-.871.643-2.252.643-4.222c0-1.969-.329-3.35-.643-4.222a6 6 0 0 0-.422-.942a3 3 0 0 0-.126-.207l-.028-.041l-.003-.004' clip-rule='evenodd' opacity='.4'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M17.757 8.416c.333-.197.753-.07.938.286l-.603.357l.603-.357l.001.002l.002.003l.003.007l.01.018l.024.053q.028.063.07.17c.053.145.12.35.185.62c.13.54.252 1.337.252 2.425c0 1.089-.122 1.886-.252 2.426c-.065.27-.132.475-.186.619a3 3 0 0 1-.094.223l-.009.018l-.003.007l-.002.003v.002s-.001.001-.604-.356l.603.357c-.185.355-.605.483-.938.286c-.33-.196-.45-.638-.272-.991l.004-.01l.035-.085c.032-.086.08-.23.13-.438c.1-.416.208-1.09.208-2.06c0-.971-.108-1.645-.208-2.061a4 4 0 0 0-.165-.523l-.004-.01c-.179-.354-.058-.796.272-.991' clip-rule='evenodd' opacity='.7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-svg-spinners\:3-dots-fade{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='4' cy='12' r='3' fill='currentColor'%3E%3Canimate id='svgSpinners3DotsFade0' fill='freeze' attributeName='opacity' begin='0;svgSpinners3DotsFade1.end-0.25s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3' fill='currentColor' opacity='.4'%3E%3Canimate fill='freeze' attributeName='opacity' begin='svgSpinners3DotsFade0.begin+0.15s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3' fill='currentColor' opacity='.3'%3E%3Canimate id='svgSpinners3DotsFade1' fill='freeze' attributeName='opacity' begin='svgSpinners3DotsFade0.begin+0.3s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-svg-spinners\:ring-resize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg stroke='currentColor'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-linecap='round' stroke-width='3'%3E%3Canimate attributeName='stroke-dasharray' calcMode='spline' dur='1.5s' keySplines='0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1' keyTimes='0;0.475;0.95;1' repeatCount='indefinite' values='0 150;42 150;42 150;42 150'/%3E%3Canimate attributeName='stroke-dashoffset' calcMode='spline' dur='1.5s' keySplines='0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1' keyTimes='0;0.475;0.95;1' repeatCount='indefinite' values='0;-16;-59;-59'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' dur='2s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-vscode-icons\:file-type-minecraft{background:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='%2352a535' d='M30 2H2v28h28z'/%3E%3Cpath fill='%2386d562' d='M24.4 13.2h-5.6v.47h5.6zm-5.6 8.4h-5.6v.47h5.6zm2.8 2.8h-2.8v.47h2.8zm-8.4 0h-2.8v.47h2.8zm0-11.2H7.6v.47h5.6z'/%3E%3Cpath d='M24.4 13.2V7.6h-5.6v5.6h-5.6V16h-2.8v8.4h2.8v-2.8h5.6v2.8h2.8V16h-2.8v-2.8zM13.2 7.6H7.6v5.6h5.6z'/%3E%3Cpath fill='%232a641c' d='M24.4 7.6h-5.6v.47h5.6zm-5.6 5.6h-5.6v.47h5.6zm-5.6-5.6H7.6v.47h5.6zm0 8.4h-2.8v.47h2.8zm8.4 0h-2.8v.47h2.8z'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat;width:1.2em;height:1.2em}.prose :where(h1,h2,h3,h4,h5,h6):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-headings);font-weight:600;line-height:1.25}.prose :where(a):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links);font-weight:500;text-decoration:underline}.prose :where(a code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links)}.prose :where(p,ul,ol,pre):not(:where(.not-prose,.not-prose *)){margin:1em 0;line-height:1.75}.prose :where(blockquote):not(:where(.not-prose,.not-prose *)){border-left:.25em solid var(--un-prose-borders);margin:1em 0;padding-left:1em;font-style:italic}.prose :where(h1):not(:where(.not-prose,.not-prose *)){margin:1rem 0;font-size:2.25em}.prose :where(h2):not(:where(.not-prose,.not-prose *)){margin:1.75em 0 .5em;font-size:1.75em}.prose :where(h3):not(:where(.not-prose,.not-prose *)){margin:1.5em 0 .5em;font-size:1.375em}.prose :where(h4):not(:where(.not-prose,.not-prose *)){margin:1em 0;font-size:1.125em}.prose :where(img,video):not(:where(.not-prose,.not-prose *)){max-width:100%}.prose :where(figure,picture):not(:where(.not-prose,.not-prose *)){margin:1em 0}.prose :where(figcaption):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-captions);font-size:.875em}.prose :where(code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;font-weight:600}.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):before,.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):after{content:"`"}.prose :where(pre):not(:where(.not-prose,.not-prose *)){border-radius:.375rem;padding:1.25rem 1.5rem;overflow-x:auto}.prose :where(pre,code):not(:where(.not-prose,.not-prose *)){white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:4;-webkit-hyphens:none;hyphens:none;background:0 0}.prose :where(pre code):not(:where(.not-prose,.not-prose *)){font-weight:inherit}.prose :where(ol,ul):not(:where(.not-prose,.not-prose *)){padding-left:1.25em}.prose :where(ol):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ol[type=A]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ul):not(:where(.not-prose,.not-prose *)){list-style-type:disc}.prose :where(ol>li):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(ul>li):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(summary):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(hr):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-hr);margin:2em 0}.prose :where(table):not(:where(.not-prose,.not-prose *)){border-collapse:collapse;margin:1em 0;display:block;overflow-x:auto}.prose :where(tr):not(:where(.not-prose,.not-prose *)):nth-child(2n){background:var(--un-prose-bg-soft)}.prose :where(td,th):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-borders);padding:.625em 1em}.prose :where(abbr):not(:where(.not-prose,.not-prose *)){cursor:help}.prose :where(kbd):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);border:1px solid;border-radius:.25rem;padding:.25rem .5rem;font-size:.875em}.prose :where(details):not(:where(.not-prose,.not-prose *)){background:var(--un-prose-bg-soft);margin:1em 0;padding:1.25rem 1.5rem}.prose :where(summary):not(:where(.not-prose,.not-prose *)){cursor:pointer;font-weight:600}.prose{color:var(--un-prose-body);max-width:65ch}.container,[container=""]{width:100%}.scrollbar-none,[scrollbar-none=""]{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}[scrollbar-none=""]::-webkit-scrollbar{display:none}@media (min-width:640px){.container,[container=""]{max-width:640px}}@media (min-width:768px){.container,[container=""]{max-width:768px}}@media (min-width:1024px){.container,[container=""]{max-width:1024px}}@media (min-width:1280px){.container,[container=""]{max-width:1280px}}@media (min-width:1536px){.container,[container=""]{max-width:1536px}}.\[input\:checked\~\&\]{input:checked~&}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.pointer-events-none,[pointer-events-none=""],.disabled\:pointer-events-none:disabled{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.absolute,[absolute=""]{position:absolute}.fixed,[fixed=""]{position:fixed}.relative,[relative=""]{position:relative}.sticky,[sticky=""]{position:sticky}.before-position-absolute:before,[before~=absolute]:before,.after\:absolute:after,[after~=absolute]:after{position:absolute}.inset-0,[inset-0=""],.before\:inset-0:before,[before~=inset-0]:before,[after~=inset-0]:after{inset:0}.inset-x-0,[inset-x-0=""]{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0,[bottom-0=""]{bottom:0}.bottom-11,[bottom-11=""]{bottom:2.75rem}.bottom-2{bottom:.5rem}.left-0,[left-0=""]{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.right--10,[right--10=""]{right:-2.5rem}.right--15,[right--15=""]{right:-3.75rem}.right--5,[right--5=""]{right:-1.25rem}.right-0,[right-0=""],[right~="0"]{right:0}.right-2,[right-2=""]{right:.5rem}.right-4,[right-4=""]{right:1rem}.top--20,[top--20=""]{top:-5rem}.top-\[-32px\]{top:-32px}.top-0,[top-0=""],[top~="0"]{top:0}.top-1\/2,[top~="50%"]{top:50%}.top-2,[top-2=""]{top:.5rem}[bottom~="[calc(100%+8px)]"]{bottom:calc(100% + 8px)}[bottom~="3"]{bottom:.75rem}[right~="3"]{right:.75rem}[top~="[65dvh]"]{top:65dvh}[top~="[calc(100dvh-12rem)]"]{top:calc(100dvh - 12rem)}[top~="[calc(100dvh-15rem)]"]{top:calc(100dvh - 15rem)}.after\:left-\[2px\]:after{left:2px}.after\:top-\[2px\]:after{top:2px}.line-clamp-1,[line-clamp-1=""]{-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3,[line-clamp-3=""]{-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.z--1,[z--1=""]{z-index:-1}.z--2{z-index:-2}.z-\[9999\]{z-index:9999}.z-0{z-index:0}.z-1,[z-1=""]{z-index:1}.z-10,[z-10=""]{z-index:10}.z-100,[z-100=""]{z-index:100}.z-1000{z-index:1000}.z-2,[z-2=""]{z-index:2}.z-3,[z-3=""]{z-index:3}.z-30,[z-30=""]{z-index:30}.z-4,[z-4=""]{z-index:4}.z-99,[z-99=""]{z-index:99}[before~=z-0]:before{z-index:0}[after~=z--2]:after{z-index:-2}.grid,[grid=""],[grid~=\~]{display:grid}.col-span-full{grid-column:1/-1}.auto-cols-\[350px\]{grid-auto-columns:350px}.auto-cols-auto{grid-auto-columns:auto}.grid-auto-rows-\[minmax\(min-content\,max-content\)\]{grid-auto-rows:minmax(min-content,max-content)}.grid-auto-flow-dense{grid-auto-flow:dense}.grid-flow-col{grid-auto-flow:column}.grid-flow-row{grid-auto-flow:row}.cols-\[150px_1fr\],[grid~="cols-[150px_1fr]"]{grid-template-columns:150px 1fr}.cols-\[20px_1fr_60px\],[grid~="cols-[20px_1fr_60px]"]{grid-template-columns:20px 1fr 60px}.grid-cols-\[repeat\(auto-fill\,minmax\(280px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.cols-1,.grid-cols-1,[grid~=cols-1]{grid-template-columns:repeat(1,minmax(0,1fr))}.cols-2,.grid-cols-2,[grid-cols-2=""],[grid~=cols-2]{grid-template-columns:repeat(2,minmax(0,1fr))}.m-0,[m0=""]{margin:0}.m-1,[m-1=""]{margin:.25rem}.m-auto{margin:auto}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-5,[mx-5=""]{margin-left:1.25rem;margin-right:1.25rem}.mx-auto,[mx-auto=""]{margin-left:auto;margin-right:auto}.mx2,[mx2=""]{margin-left:.5rem;margin-right:.5rem}.my{margin-top:1rem;margin-bottom:1rem}.my-0,[my-0=""]{margin-top:0;margin-bottom:0}.my-5,[my-5=""]{margin-top:1.25rem;margin-bottom:1.25rem}.my-auto,[my-auto=""]{margin-top:auto;margin-bottom:auto}.-mb-px{margin-bottom:-1px}.mb-0{margin-bottom:0}.mb-1,[mb-1=""]{margin-bottom:.25rem}.mb-2,.mb2,[mb-2=""],[mb2=""]{margin-bottom:.5rem}.mb-3,[mb-3=""]{margin-bottom:.75rem}.mb-4,[mb-4=""]{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml{margin-left:1rem}.ml-0\.5,[ml-0\.5=""]{margin-left:.125rem}.ml-auto{margin-left:auto}.mr{margin-right:1rem}.mr-0\!{margin-right:0!important}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-auto{margin-right:auto}.ms{margin-inline-start:1rem}.mt-0\.5{margin-top:.125rem}.mt-1,[mt-1=""]{margin-top:.25rem}.mt-2,[mt-2=""]{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4,[mt-4=""]{margin-top:1rem}.mt-auto{margin-top:auto}[ml~="12"]{margin-left:3rem}[mr~="12"]{margin-right:3rem}[box~=border]{box-sizing:border-box}.inline,[inline=""]{display:inline}.block,[block=""]{display:block}.inline-block,[inline-block=""]{display:inline-block}.contents{display:contents}.aspect-square,[aspect-square=""]{aspect-ratio:1}.size-16,[size-16=""]{width:4rem;height:4rem}.size-2{width:.5rem;height:.5rem}.size-20,[size-20=""]{width:5rem;height:5rem}.size-24,[size-24=""],[size~="24"]{width:6rem;height:6rem}.size-3,[size-3=""]{width:.75rem;height:.75rem}.size-5{width:1.25rem;height:1.25rem}.size-6,[size-6=""],[size~="6"]{width:1.5rem;height:1.5rem}.size-60,[size-60=""]{width:15rem;height:15rem}.size-8,[size-8=""]{width:2rem;height:2rem}[size~=sm]{width:24rem;height:24rem}.h-\[calc\(100dvh-8rem\)\]{height:calc(100dvh - 8rem)}.h-0\.5,[h-0\.5=""]{height:.125rem}.h-0\.5lh{height:.5lh}.h-1\.5,[h-1\.5=""]{height:.375rem}.h-10{height:2.5rem}.h-100dvh,[h-100dvh=""],[h~="100dvh"]{height:100dvh}.h-12{height:3rem}.h-16{height:4rem}.h-18,[h-18=""]{height:4.5rem}.h-1lh{height:1lh}.h-2,.h2,[h-2=""]{height:.5rem}.h-24,[h-24=""]{height:6rem}.h-3\.5{height:.875rem}.h-30,[h-30=""]{height:7.5rem}.h-4,[h-4=""]{height:1rem}.h-48,[h-48=""]{height:12rem}.h-5,[h-5=""]{height:1.25rem}.h-6{height:1.5rem}.h-60,[h-60=""]{height:15rem}.h-7,[h-7=""]{height:1.75rem}.h-8,[h-8=""]{height:2rem}.h-auto,[h-auto=""],[h~=auto]{height:auto}.h-fit,[h-fit=""]{height:fit-content}.h-full,[h-full=""],[h~="100%"]{height:100%}.h1{height:.25rem}.h3{height:.75rem}.max-h-\[10lh\],[max-h~="[10lh]"]{max-height:10lh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[96\%\]{max-height:96%}.max-h-\[calc\(100dvh-17rem\)\]{max-height:calc(100dvh - 17rem)}.max-h-\[calc\(100dvh-7lh\)\]{max-height:calc(100dvh - 7lh)}.max-h-60,[max-h-60=""]{max-height:15rem}.max-h-full{max-height:100%}.max-h-none,[max-h-none=""]{max-height:none}.max-w-2xl{max-width:42rem}.max-w-6xl{max-width:72rem}.max-w-full,[max-w-full=""]{max-width:100%}.max-w-md{max-width:28rem}.min-h-\[120px\],.min-h-120px,[min-h-120px=""]{min-height:120px}.min-h-\[1lh\]{min-height:1lh}.min-h-16,[min-h-16=""]{min-height:4rem}.min-h-40px,[min-h-40px=""]{min-height:40px}.min-h-70dvh,[min-h-70dvh=""]{min-height:70dvh}.min-w-\[150px\]{min-width:150px}.min-w-\[160px\],[min-w~="[160px]"]{min-width:160px}.min-w-\[200px\]{min-width:200px}.min-w-0,[min-w-0=""]{min-width:0}.min-w-2,[min-w-2=""]{min-width:.5rem}.min-w-20,[min-w-20=""]{min-width:5rem}.min-w-20px{min-width:20px}.min-w-50,[min-w-50=""]{min-width:12.5rem}.w-\[92dvw\]{width:92dvw}.w-\[92vw\]{width:92vw}.w-0\!{width:0!important}.w-1{width:.25rem}.w-1\.5,[w-1\.5=""]{width:.375rem}.w-1\/2,[w~="[50%]"]{width:50%}.w-10\%{width:10%}.w-100,[w-100=""]{width:25rem}.w-100vw,[w-100vw=""]{width:100vw}.w-11{width:2.75rem}.w-18,[w-18=""]{width:4.5rem}.w-1lh{width:1lh}.w-2,[w-2=""]{width:.5rem}.w-25\%{width:25%}.w-3\.5{width:.875rem}.w-30,[w-30=""]{width:7.5rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-5,[w-5=""]{width:1.25rem}.w-8,[w-8=""]{width:2rem}.w-90\%{width:90%}.w-95\%{width:95%}.w-auto,[w-auto=""]{width:auto}.w-fit,[w-fit=""]{width:fit-content}.w-full,[w-full=""],[w~="100%"],[w~=full]{width:100%}[h~="[14px]"]{height:14px}[h~="[calc(1lh+4px+4px)]"]{height:calc(1lh + 8px)}[h~="300"]{height:75rem}[h~="80dvh"]{height:80dvh}[h~="85dvh"]{height:85dvh}[h~=unset]{height:unset}[max-h~="[300px]"]{max-height:300px}[max-h~="[4.5rem]"]{max-height:4.5rem}[max-h~="[85vh]"]{max-height:85vh}[max-h~="100"]{max-height:25rem}[max-h~="100dvh"]{max-height:100dvh}[max-h~="40%"]{max-height:40%}[max-h~="50"]{max-height:12.5rem}[max-w~="[calc(100dvw-1rem)]"]{max-width:calc(100dvw - 1rem)}[max-w~="500px"]{max-width:500px}[min-h~="[100px]"]{min-height:100px}[min-h~="[calc(1lh+4px+4px)]"]{min-height:calc(1lh + 8px)}[min-h~="100"]{min-height:25rem}[min-h~="120"]{min-height:30rem}[min-w~="1/2"],[min-w~="50%"]{min-width:50%}[min-w~="30%"]{min-width:30%}[min-w~="3em"]{min-width:3em}[min-w~="50vw"]{min-width:50vw}[min-w~="6"]{min-width:1.5rem}[w~="[1px]"]{width:1px}[w~="[calc(1lh+4px+4px)]"]{width:calc(1lh + 8px)}[w~="100dvw"]{width:100dvw}[w~="12.5"]{width:3.125rem}[w~="70%"]{width:70%}.hover\:h-13:hover{height:3.25rem}.hover\:w-2:hover{width:.5rem}.before\:h-full:before{height:100%}.before\:w-1:before{width:.25rem}[before~=h-full]:before{height:100%}[before~=w-25\%]:before{width:25%}.after\:h-5:after{height:1.25rem}.after\:w-5:after{width:1.25rem}[after~=h-full]:after{height:100%}[after~=w-full]:after{width:100%}.max-w-screen-xl,[max-w-screen-xl=""]{max-width:1280px}.flex,[flex=""],[flex~=\~]{display:flex}.inline-flex,[inline-flex=""],[inline-flex~=\~]{display:inline-flex}.flex-1,[flex-1=""],[flex~="1"]{flex:1}.flex-shrink-0,.shrink-0,[flex-shrink-0=""],[shrink-0=""]{flex-shrink:0}.flex-row,[flex-row=""],[flex~=row]{flex-direction:row}[flex~=row-reverse]{flex-direction:row-reverse}.flex-col,[flex-col=""],[flex~=col]{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap,[flex-wrap=""]{flex-wrap:wrap}.origin-left,[origin-left=""]{transform-origin:0}[perspective~="800"]{perspective:800px}.-translate-x-1\/2,.translate-x-\[-50\%\]{--un-translate-x:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.-translate-y-1\/2,.translate-y-\[-50\%\],[transform~="translate-y-[-50%]"]{--un-translate-y:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-x-\[50\%\],[transform~="translate-x-[50%]"]{--un-translate-x:50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y--2,[transform~=translate-y--2]{--un-translate-y:-.5rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-\[-100\%\],[transform~="translate-y-[-100%]"]{--un-translate-y:-100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-\[0\.25lh\]{--un-translate-y:.25lh;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-\[50\%\]{--un-translate-y:50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-1,[translate-y-1=""]{--un-translate-y:.25rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-2,[translate-y-2=""]{--un-translate-y:.5rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-4,[translate-y-4=""]{--un-translate-y:1rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-x~="0.5"]{--un-translate-x:.125rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-x~="data-[state=checked]:full"][data-state=checked]{--un-translate-x:100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-y~="[-80%]"]{--un-translate-y:-80%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-y~="[2px]"]{--un-translate-y:2px;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.peer:checked~.peer-checked\:after\:translate-x-full:after{--un-translate-x:100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.\[\&_\.card-cover_img\]\:hover\:translate-y-2:hover .card-cover img,[hover\:translate-y-2=""]:hover{--un-translate-y:.5rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.rotate-180{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:180deg;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-100{--un-scale-x:1;--un-scale-y:1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-125{--un-scale-x:1.25;--un-scale-y:1.25;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-150{--un-scale-x:1.5;--un-scale-y:1.5;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.\[\&_\.card-cover_img\]\:hover\:scale-102:hover .card-cover img{--un-scale-x:1.02;--un-scale-y:1.02;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.hover\:scale-110:hover{--un-scale-x:1.1;--un-scale-y:1.1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[hover~=scale-100]:hover{--un-scale-x:1;--un-scale-y:1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.transform-scale-x--100,[transform-scale-x--100=""]{--un-scale-x:-1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.preserve-3d{transform-style:preserve-3d}.transform,[transform=""]{transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-pulse,[animate-pulse=""]{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}.animate-spin{animation:1s linear infinite spin}.disabled\:cursor-default:disabled{cursor:default}.cursor-pointer,[cursor-pointer=""],[cursor~=pointer]{cursor:pointer}.cursor-not-allowed,.disabled\:cursor-not-allowed:disabled,[cursor~=disabled\:not-allowed]:disabled,[disabled\:cursor-not-allowed=""]:disabled{cursor:not-allowed}.cursor-col-resize{cursor:col-resize}.cursor-ew-resize,[cursor-ew-resize=""]{cursor:ew-resize}.select-none,[select-none=""]{-webkit-user-select:none;user-select:none}.resize-none,[resize-none=""]{resize:none}.appearance-none,[appearance-none=""]{appearance:none}.items-start,[items-start=""]{align-items:flex-start}.items-end,[items-end=""]{align-items:flex-end}.items-center,[flex~=items-center],[items-center=""]{align-items:center}.self-end,[self-end=""]{align-self:flex-end}.justify-start{justify-content:flex-start}.justify-end,[justify-end=""]{justify-content:flex-end}.justify-center,[flex~=justify-center],[justify-center=""]{justify-content:center}.justify-between,[justify-between=""]{justify-content:space-between}.gap-0\.5,[gap-0\.5=""]{gap:.125rem}.gap-1,[gap-1=""]{gap:.25rem}.gap-1\.5,[gap-1\.5=""]{gap:.375rem}.gap-2,[flex~=gap-2],[gap-2=""]{gap:.5rem}.gap-3,[flex~=gap-3],[gap-3=""]{gap:.75rem}.gap-4,[flex~=gap-4],[gap-4=""],[grid~=gap-4]{gap:1rem}.gap-5,[gap-5=""]{gap:1.25rem}.gap-6,[flex~=gap-6]{gap:1.5rem}.gap-8{gap:2rem}.gap-x-2,[flex~=gap-x-2]{column-gap:.5rem}.gap-y-0,[flex~=gap-y-0]{row-gap:0}.space-x-1>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(.25rem*calc(1 - var(--un-space-x-reverse)));margin-right:calc(.25rem*var(--un-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.5rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.5rem*var(--un-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.75rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.75rem*var(--un-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1rem*var(--un-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1.5rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1.5rem*var(--un-space-y-reverse))}[divide~=y]>:not([hidden])~:not([hidden]){--un-divide-y-reverse:0;border-top-width:calc(1px*calc(1 - var(--un-divide-y-reverse)));border-bottom-width:calc(1px*var(--un-divide-y-reverse))}[divide~=gray\/25]>:not([hidden])~:not([hidden]){border-color:#9ca3af40}[border~=dashed],[divide~=dashed]>:not([hidden])~:not([hidden]){border-style:dashed}.of-clip,[of-clip=""]{overflow:clip}.of-hidden,.overflow-hidden,[of-hidden=""],[overflow-hidden=""],[overflow~=hidden]{overflow:hidden}.overflow-auto,[overflow-auto=""]{overflow:auto}.overflow-scroll,[overflow-scroll=""]{overflow:scroll}.of-x-scroll,[of-x-scroll=""]{overflow-x:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto,[overflow-y-auto=""]{overflow-y:auto}.overflow-y-scroll,[overflow-y-scroll=""]{overflow-y:scroll}.scroll-smooth,[scroll-smooth=""]{scroll-behavior:smooth}.truncate,[truncate=""]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-ellipsis,[text-ellipsis=""]{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line,[whitespace-pre-line=""]{white-space:pre-line}.whitespace-pre-wrap,[whitespace-pre-wrap=""]{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.b,.border,[b=""],[border=""],[border~=\~]{border-width:1px}.border-2,[border-2=""],[border~="2"],[border~="2px"]{border-width:2px}[border~="4"]{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.\[\&\:checked\+div\]\:border-primary-500:checked+div,.border-primary-500{--un-border-opacity:1;border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.border-amber-200{--un-border-opacity:1;border-color:rgb(253 230 138/var(--un-border-opacity))}.border-neutral-100,[border~=neutral-100]{--un-border-opacity:1;border-color:rgb(245 245 245/var(--un-border-opacity))}.border-neutral-200,.dark [border~=dark\:neutral-200],[border-neutral-200=""],[border~=neutral-200]{--un-border-opacity:1;border-color:rgb(229 229 229/var(--un-border-opacity))}.border-neutral-300,[border-neutral-300=""],[border~="data-[state=unchecked]:neutral-300"][data-state=unchecked],[border~=neutral-300]{--un-border-opacity:1;border-color:rgb(212 212 212/var(--un-border-opacity))}.border-neutral-300\/30{border-color:#d4d4d44d}.border-neutral-400{--un-border-opacity:1;border-color:rgb(163 163 163/var(--un-border-opacity))}.border-neutral-500{--un-border-opacity:1;border-color:rgb(115 115 115/var(--un-border-opacity))}.border-primary-100,[border~=primary-100]{--un-border-opacity:1;border-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))80%,oklch(100% 0 360/var(--un-border-opacity)))}.border-primary-200,[border~="data-[state=checked]:primary-200"][data-state=checked]{--un-border-opacity:1;border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.border-primary-400,.dark .dark\:\[\&\:checked\+div\]\:border-primary-400:checked+div,.dark .dark\:border-primary-400{--un-border-opacity:1;border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.border-primary-500\/5{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.05)}.border-red-200{--un-border-opacity:1;border-color:rgb(254 202 202/var(--un-border-opacity))}.border-red-200\/30{border-color:#fecaca4d}.border-white,[border~=white]{--un-border-opacity:1;border-color:rgb(255 255 255/var(--un-border-opacity))}.dark .dark\:border-amber-800{--un-border-opacity:1;border-color:rgb(146 64 14/var(--un-border-opacity))}.dark .dark\:border-neutral-600,.dark [border~=dark\:neutral-600],.dark [dark\:border-neutral-600=""]{--un-border-opacity:1;border-color:rgb(82 82 82/var(--un-border-opacity))}.dark .dark\:border-neutral-700,.dark [border~=dark\:neutral-700],.dark [dark\:border-neutral-700=""]{--un-border-opacity:1;border-color:rgb(64 64 64/var(--un-border-opacity))}.dark .dark\:border-neutral-700\/30,.dark [border~="dark:neutral-700/30"]{border-color:#4040404d}.dark .dark\:border-neutral-800,.dark [border~=dark\:neutral-800],.dark [dark\:border-neutral-800=""],[border~=neutral-800]{--un-border-opacity:1;border-color:rgb(38 38 38/var(--un-border-opacity))}.dark .dark\:border-neutral-800\/25,.dark [border~="dark:neutral-800/25"]{border-color:#26262640}.dark .dark\:border-neutral-900,.dark [border~=dark\:neutral-900]{--un-border-opacity:1;border-color:rgb(23 23 23/var(--un-border-opacity))}.dark .dark\:border-primary-600{--un-border-opacity:1;border-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-800,.dark [border~=dark\:primary-800]{--un-border-opacity:1;border-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-900,.dark [border~=dark\:primary-900]{--un-border-opacity:1;border-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-900\/40{border-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.4)}.dark .dark\:border-red-800{--un-border-opacity:1;border-color:rgb(153 27 27/var(--un-border-opacity))}.dark .dark\:border-red-900\/30{border-color:#7f1d1d4d}.dark [border~="dark:cyan-500/50"]{border-color:#06b6d480}.dark [border~="dark:primary-400/20"]{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)}.dark [border~="dark:primary-500/50"]{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.5)}.dark [border~="dark:primary-950/10"]{border-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.1)}.dark [border~="dark:violet-500/50"]{border-color:#8b5cf680}[border~=cyan-200\/50]{border-color:#a5f3fc80}[border~=gray\/25]{border-color:#9ca3af40}[border~=neutral-200\/50]{border-color:#e5e5e580}[border~=primary-200\/20]{border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}[border~=primary-200\/50]{border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}[border~=primary-300]{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}[border~=primary-50]{--un-border-opacity:1;border-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))30%,oklch(100% 0 360/var(--un-border-opacity)))}[border~=violet-200\/50]{border-color:#ddd6fe80}.peer:checked~.peer-checked\:after\:border-white:after{--un-border-opacity:1;border-color:rgb(255 255 255/var(--un-border-opacity))}[border~=focus-within\:neutral-800]:focus-within{--un-border-opacity:1;border-color:rgb(38 38 38/var(--un-border-opacity))}.dark .dark\:hover\:border-primary-400\/30:hover{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:hover\:border-primary-700:hover{--un-border-opacity:1;border-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark [border~="dark:hover:primary-400/30"]:hover{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.hover\:border-primary-300:hover{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.hover\:border-primary-500\/30:hover,[border~="hover:primary-500/30"]:hover{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.dark [border~="dark:focus:neutral-600"]:focus{--un-border-opacity:1;border-color:rgb(82 82 82/var(--un-border-opacity))}.dark [border~="dark:focus:neutral-700"]:focus{--un-border-opacity:1;border-color:rgb(64 64 64/var(--un-border-opacity))}.dark [border~="dark:focus:primary-400/50"]:focus{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.5)}[border~=focus\:neutral-200]:focus{--un-border-opacity:1;border-color:rgb(229 229 229/var(--un-border-opacity))}[border~=focus\:neutral-400]:focus{--un-border-opacity:1;border-color:rgb(163 163 163/var(--un-border-opacity))}[border~=focus\:primary-100]:focus{--un-border-opacity:1;border-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))80%,oklch(100% 0 360/var(--un-border-opacity)))}[border~=focus\:primary-300]:focus{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.rounded,[rounded=""]{border-radius:.25rem}.rounded-2xl,[rounded-2xl=""]{border-radius:1rem}.rounded-full,[rounded-full=""]{border-radius:9999px}.rounded-lg,[border~=rounded-lg],[rounded-lg=""],[rounded~=lg]{border-radius:.5rem}.rounded-md,[rounded-md=""]{border-radius:.375rem}.rounded-sm,[rounded-sm=""]{border-radius:.125rem}.rounded-xl,[rounded-xl=""]{border-radius:.75rem}[rounded~="[1lh]"]{border-radius:1lh}.before\:rounded-full:before,.after\:rounded-full:after{border-radius:9999px}.rounded-l-xl,[rounded-l-xl=""]{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl,[rounded-r-xl=""]{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-t-xl,[rounded-t-xl=""]{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border-none,[border-none=""]{border-style:none}.border-solid,[border~=solid]{border-style:solid}.bg-amber-50{--un-bg-opacity:1;background-color:rgb(255 251 235/var(--un-bg-opacity))}.bg-amber-50\/80{background-color:#fffbebcc}.bg-black\/50,[bg~=black\/50]{background-color:#00000080}.bg-blue-50,[bg-blue-50=""]{--un-bg-opacity:1;background-color:rgb(239 246 255/var(--un-bg-opacity))}.bg-green-50,[bg-green-50=""]{--un-bg-opacity:1;background-color:rgb(240 253 244/var(--un-bg-opacity))}.bg-green-500,[bg-green-500=""],[bg~=green-500]{--un-bg-opacity:1;background-color:rgb(34 197 94/var(--un-bg-opacity))}.bg-lime-400\/10{background-color:#a3e6351a}.bg-neutral-100,[bg-neutral-100=""],[bg~=neutral-100]{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.bg-neutral-200,.dark .dark\:bg-neutral-200,[bg-neutral-200=""],[bg~=neutral-200]{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}.bg-neutral-200\/45{background-color:#e5e5e573}.bg-neutral-300,.dark [bg~=dark\:neutral-300],[bg-neutral-300=""],[bg~="data-[state=unchecked]:neutral-300"][data-state=unchecked]{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}.bg-neutral-400,.dark [bg~=dark\:neutral-400],[bg~=neutral-400]{--un-bg-opacity:1;background-color:rgb(163 163 163/var(--un-bg-opacity))}.bg-neutral-400\/15{background-color:#a3a3a326}.bg-neutral-50,[bg-neutral-50=""],[bg~=neutral-50]{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.bg-neutral-600,.dark .dark\:bg-neutral-600{--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity))}.bg-neutral-800,.dark .dark\:bg-neutral-800,.dark [bg~="dark:data-[state=unchecked]:neutral-800"][data-state=unchecked],.dark [bg~=dark\:neutral-800],.dark [dark\:bg-neutral-800=""]{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.bg-orange-400\/10{background-color:#fb923c1a}.bg-primary{--un-bg-opacity:1;background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-100,[bg-primary-100=""],[bg~=primary-100]{--un-bg-opacity:1;background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))80%,oklch(100% 0 360/var(--un-bg-opacity)))}.bg-primary-100\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.1)80%,#ffffff1a)}@supports (color:lab(0% 0 0)){.bg-primary-100\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.1)80%,lab(100% 0 0/.1))}}.bg-primary-100\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/1)80%,#fff)}@supports (color:lab(0% 0 0)){.bg-primary-100\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/1)80%,lab(100% 0 0))}}.bg-primary-100\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.2)80%,#fff3)}@supports (color:lab(0% 0 0)){.bg-primary-100\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.2)80%,lab(100% 0 0/.2))}}.bg-primary-100\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.3)80%,#ffffff4d)}@supports (color:lab(0% 0 0)){.bg-primary-100\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.3)80%,lab(100% 0 0/.3))}}.bg-primary-100\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.4)80%,#fff6)}@supports (color:lab(0% 0 0)){.bg-primary-100\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.4)80%,lab(100% 0 0/.4))}}.bg-primary-100\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.05)80%,#ffffff0d)}@supports (color:lab(0% 0 0)){.bg-primary-100\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.05)80%,lab(100% 0 0/.05))}}.bg-primary-100\/50{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.5)80%,#ffffff80)}@supports (color:lab(0% 0 0)){.bg-primary-100\/50{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.5)80%,lab(100% 0 0/.5))}}.bg-primary-100\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.6)80%,#fff9)}@supports (color:lab(0% 0 0)){.bg-primary-100\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.6)80%,lab(100% 0 0/.6))}}.bg-primary-100\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.7)80%,#ffffffb3)}@supports (color:lab(0% 0 0)){.bg-primary-100\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.7)80%,lab(100% 0 0/.7))}}.bg-primary-100\/80{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.8)80%,#fffc)}@supports (color:lab(0% 0 0)){.bg-primary-100\/80{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.8)80%,lab(100% 0 0/.8))}}.bg-primary-100\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.9)80%,#ffffffe6)}@supports (color:lab(0% 0 0)){.bg-primary-100\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.9)80%,lab(100% 0 0/.9))}}.bg-primary-200,[bg-primary-200=""]{--un-bg-opacity:1;background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-200\/10{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-200\/100{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-200\/20,[bg~=primary-200\/20]{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-200\/30{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-200\/40{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-200\/5{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-200\/50{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-200\/60{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-200\/70{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-200\/80{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-200\/90{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-300,[bg-primary-300=""]{--un-bg-opacity:1;background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-300\/10{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-300\/100{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-300\/20{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-300\/30{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-300\/40{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-300\/5{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-300\/50,.dark .dark\:bg-primary-300\/50{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-300\/60{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-300\/70{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-300\/80{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-300\/90{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-400,.dark .dark\:bg-primary-400,.dark [bg~=dark\:primary-400],[bg-primary-400=""],[bg~="data-[state=checked]:primary-400"][data-state=checked],[bg~=primary-400]{--un-bg-opacity:1;background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-400\/10{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-400\/100{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-400\/20,.dark [bg~="dark:primary-400/20"]{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-400\/30{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-400\/40{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-400\/5{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-400\/50{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-400\/60{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-400\/70{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-400\/80,.dark [bg~="data-[state=checked]:dark:primary-400/80"][data-state=checked]{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-400\/90{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-50,[bg-primary-50=""]{--un-bg-opacity:1;background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))30%,oklch(100% 0 360/var(--un-bg-opacity)))}.bg-primary-50\/10,.dark .dark\:bg-primary-50\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.1)30%,#ffffff1a)}@supports (color:lab(0% 0 0)){.bg-primary-50\/10,.dark .dark\:bg-primary-50\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.1)30%,lab(100% 0 0/.1))}}.bg-primary-50\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/1)30%,#fff)}@supports (color:lab(0% 0 0)){.bg-primary-50\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/1)30%,lab(100% 0 0))}}.bg-primary-50\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.2)30%,#fff3)}@supports (color:lab(0% 0 0)){.bg-primary-50\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.2)30%,lab(100% 0 0/.2))}}.bg-primary-50\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.3)30%,#ffffff4d)}@supports (color:lab(0% 0 0)){.bg-primary-50\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.3)30%,lab(100% 0 0/.3))}}.bg-primary-50\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.4)30%,#fff6)}@supports (color:lab(0% 0 0)){.bg-primary-50\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.4)30%,lab(100% 0 0/.4))}}.bg-primary-50\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.05)30%,#ffffff0d)}@supports (color:lab(0% 0 0)){.bg-primary-50\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.05)30%,lab(100% 0 0/.05))}}.bg-primary-50\/50,[bg~=primary-50\/50]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.5)30%,#ffffff80)}@supports (color:lab(0% 0 0)){.bg-primary-50\/50,[bg~=primary-50\/50]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.5)30%,lab(100% 0 0/.5))}}.bg-primary-50\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.6)30%,#fff9)}@supports (color:lab(0% 0 0)){.bg-primary-50\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.6)30%,lab(100% 0 0/.6))}}.bg-primary-50\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.7)30%,#ffffffb3)}@supports (color:lab(0% 0 0)){.bg-primary-50\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.7)30%,lab(100% 0 0/.7))}}.bg-primary-50\/80,[bg~=primary-50\/80]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.8)30%,#fffc)}@supports (color:lab(0% 0 0)){.bg-primary-50\/80,[bg~=primary-50\/80]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.8)30%,lab(100% 0 0/.8))}}.bg-primary-50\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.9)30%,#ffffffe6)}@supports (color:lab(0% 0 0)){.bg-primary-50\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.9)30%,lab(100% 0 0/.9))}}.bg-primary-500,.dark [bg~=dark\:primary-500],[bg-primary-500=""],[bg~=primary-500],.peer:checked~.peer-checked\:bg-primary-500{--un-bg-opacity:1;background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-500\/10,[bg~=primary-500\/10]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-500\/100{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-500\/15{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.15)}.bg-primary-500\/20,[bg~=primary-500\/20]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-500\/30,[bg~=primary-500\/30]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-500\/40,[bg~=primary-500\/40]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-500\/5,[bg~=primary-500\/5]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-500\/50,[bg~=primary-500\/50]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-500\/60,[bg~=primary-500\/60]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-500\/70,[bg~=primary-500\/70]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-500\/80,[bg~=primary-500\/80]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-500\/90,[bg~=primary-500\/90]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-600,.dark .dark\:bg-primary-600,[bg-primary-600=""]{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-600\/10{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-600\/100{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-600\/20{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-600\/30{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-600\/40{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-600\/5{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-600\/50{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-600\/60{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-600\/70{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-600\/80{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-600\/90{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-700,.dark .dark\:bg-primary-700,.dark [dark\:bg-primary-700=""],[bg-primary-700=""]{--un-bg-opacity:1;background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-700\/10{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-700\/100{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-700\/20{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-700\/30,.dark .dark\:bg-primary-700\/30{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-700\/40{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-700\/5{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-700\/50{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-700\/60{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-700\/70{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-700\/80{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-700\/90{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-800,.dark [bg~=dark\:primary-800],[bg-primary-800=""]{--un-bg-opacity:1;background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-800\/10{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-800\/100{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-800\/20{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-800\/30{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-800\/40{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-800\/5{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-800\/50{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-800\/60{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-800\/70{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-800\/80{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-800\/90{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-900,.dark .dark\:bg-primary-900,[bg-primary-900=""]{--un-bg-opacity:1;background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-900\/10,.dark .dark\:bg-primary-900\/10{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-900\/100{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-900\/20,.dark .dark\:bg-primary-900\/20{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-900\/30,.dark .dark\:bg-primary-900\/30{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-900\/40,.dark .dark\:bg-primary-900\/40,.dark [bg~="dark:primary-900/40"]{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-900\/5,.dark .dark\:bg-primary-900\/5{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-900\/50{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-900\/60{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-900\/70{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-900\/80{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-900\/90{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-950,.dark .dark\:bg-primary-950,[bg-primary-950=""]{--un-bg-opacity:1;background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-950\/10{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-950\/100{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-950\/20{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-950\/30{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-950\/40{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-950\/5{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-950\/50{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-950\/60{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-950\/70,.dark [bg~="dark:primary-950/70"]{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-950\/80,.dark [bg~="dark:primary-950/80"]{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-950\/90{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary\/10{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary\/100{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/1)}.bg-primary\/20{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary\/30{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary\/40{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary\/5{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary\/50{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary\/60{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary\/70{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary\/80{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary\/90{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.9)}.bg-red-50,[bg-red-50=""]{--un-bg-opacity:1;background-color:rgb(254 242 242/var(--un-bg-opacity))}.bg-red-500{--un-bg-opacity:1;background-color:rgb(239 68 68/var(--un-bg-opacity))}.bg-red-500\/15{background-color:#ef444426}.bg-red900,.dark [dark\:bg-red-900=""]{--un-bg-opacity:1;background-color:rgb(127 29 29/var(--un-bg-opacity))}.bg-transparent,.dark [bg~=dark\:transparent],[bg-transparent=""],[bg~=transparent]{background-color:#0000}.bg-violet-400\/10{background-color:#a78bfa1a}.bg-white,[bg-white=""],[bg~=white]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.bg-white\/60,[bg~=white\/60]{background-color:#fff9}.bg-white\/80{background-color:#fffc}.bg-yellow-500{--un-bg-opacity:1;background-color:rgb(234 179 8/var(--un-bg-opacity))}.dark .dark\:bg-amber-900\/20{background-color:#78350f33}.dark .dark\:bg-amber-900\/30{background-color:#78350f4d}.dark .dark\:bg-black\/30,.dark [bg~="dark:black/30"]{background-color:#0000004d}.dark .dark\:bg-black\/40{background-color:#0006}.dark .dark\:bg-black\/75{background-color:#000000bf}.dark .dark\:bg-blue-900\/30{background-color:#1e3a8a4d}.dark .dark\:bg-green-900\/30{background-color:#14532d4d}.dark .dark\:bg-lime-50\/10{background-color:#f7fee71a}.dark .dark\:bg-lime-900\/10{background-color:#3653141a}.dark .dark\:bg-neutral-700,.dark [bg~=dark\:neutral-700],.dark [dark\:bg-neutral-700=""],[bg~=neutral-700]{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark .dark\:bg-neutral-700\/50{background-color:#40404080}.dark .dark\:bg-neutral-700\/60{background-color:#40404099}.dark .dark\:bg-neutral-800\/50,.dark [bg~="dark:neutral-800/50"]{background-color:#26262680}.dark .dark\:bg-neutral-900,.dark [bg~=dark\:neutral-900],.dark [dark\:bg-neutral-900=""]{--un-bg-opacity:1;background-color:rgb(23 23 23/var(--un-bg-opacity))}.dark .dark\:bg-neutral-900\/20{background-color:#17171733}.dark .dark\:bg-neutral-900\/95{background-color:#171717f2}.dark .dark\:bg-orange-50\/10{background-color:#fff7ed1a}.dark .dark\:bg-orange-900\/10{background-color:#7c2d121a}.dark .dark\:bg-primary-800\/25{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.25)}.dark .dark\:bg-red-700\/30{background-color:#b91c1c4d}.dark .dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark .dark\:bg-red-900\/30{background-color:#7f1d1d4d}.dark .dark\:bg-violet-50\/10{background-color:#f5f3ff1a}.dark .dark\:bg-violet-900\/10{background-color:#4c1d951a}.dark [bg~="dark:[#4e34b9]"]{--un-bg-opacity:1;background-color:rgb(78 52 185/var(--un-bg-opacity))}.dark [bg~="dark:[#676085]"]{--un-bg-opacity:1;background-color:rgb(103 96 133/var(--un-bg-opacity))}.dark [bg~="dark:[rgba(0,0,0,0.3)]"]{--un-bg-opacity:.3;background-color:rgba(0,0,0,var(--un-bg-opacity))}.dark [bg~="dark:#181818"]{--un-bg-opacity:1;background-color:rgb(24 24 24/var(--un-bg-opacity))}.dark [bg~="dark:black/20"],.group:hover [bg~="group-hover:black/20"]{background-color:#0003}.dark [bg~=dark\:blue-900],.dark [dark\:bg-blue-900=""]{--un-bg-opacity:1;background-color:rgb(30 58 138/var(--un-bg-opacity))}.dark [bg~=dark\:complementary-800]{--un-bg-opacity:1;background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 180)/var(--un-bg-opacity))}.dark [bg~=dark\:cyan-900]{--un-bg-opacity:1;background-color:rgb(22 78 99/var(--un-bg-opacity))}.dark [bg~=dark\:green-600]{--un-bg-opacity:1;background-color:rgb(22 163 74/var(--un-bg-opacity))}.dark [bg~=dark\:neutral-500]{--un-bg-opacity:1;background-color:rgb(115 115 115/var(--un-bg-opacity))}.dark [bg~="dark:neutral-900/50"]{background-color:#17171780}.dark [bg~="dark:neutral-900/70"]{background-color:#171717b3}.dark [bg~=dark\:neutral-950]{--un-bg-opacity:1;background-color:rgb(10 10 10/var(--un-bg-opacity))}.dark [bg~="dark:orange-900/20"]{background-color:#7c2d1233}.dark [bg~=dark\:violet-800]{--un-bg-opacity:1;background-color:rgb(91 33 182/var(--un-bg-opacity))}.dark [dark\:bg-green-900=""]{--un-bg-opacity:1;background-color:rgb(20 83 45/var(--un-bg-opacity))}[bg~="[#cabeff]"]{--un-bg-opacity:1;background-color:rgb(202 190 255/var(--un-bg-opacity))}[bg~="[#e6e1fc]"]{--un-bg-opacity:1;background-color:rgb(230 225 252/var(--un-bg-opacity))}[bg~=\$bg-color]{background-color:var(--bg-color)}[bg~=black\/0]{background-color:#0000}[bg~=blue-100]{--un-bg-opacity:1;background-color:rgb(219 234 254/var(--un-bg-opacity))}[bg~=complementary-100]{--un-bg-opacity:1;background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 180)/var(--un-bg-opacity))80%,oklch(100% 0 360/var(--un-bg-opacity)))}[bg~=emerald-500]{--un-bg-opacity:1;background-color:rgb(16 185 129/var(--un-bg-opacity))}[bg~=gray-200\/30]{background-color:#e5e7eb4d}[bg~=inherit]{background-color:inherit }[bg~=neutral-100\/50]{background-color:#f5f5f580}[bg~=neutral-100\/70]{background-color:#f5f5f5b3}[bg~=neutral-200\/20]{background-color:#e5e5e533}[bg~=neutral-200\/50]{background-color:#e5e5e580}[bg~=neutral-50\/50]{background-color:#fafafa80}[bg~=orange-50]{--un-bg-opacity:1;background-color:rgb(255 247 237/var(--un-bg-opacity))}[bg~=violet-500]{--un-bg-opacity:1;background-color:rgb(139 92 246/var(--un-bg-opacity))}[bg~=white\/70]{background-color:#ffffffb3}.dark [dark\:bg-neutral-700~=default\:]:default,.dark [dark\:bg-neutral-700~=checked\:]:checked{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark .\[\&_div_span\]\:dark\:hover\:bg-cyan-300:hover div span{--un-bg-opacity:1;background-color:rgb(103 232 249/var(--un-bg-opacity))}.dark .\[\&_div_span\]\:dark\:hover\:bg-cyan-900:hover div span{--un-bg-opacity:1;background-color:rgb(22 78 99/var(--un-bg-opacity))}.dark .dark\:hover\:bg-black\/40:hover{background-color:#0006}.dark .dark\:hover\:bg-neutral-600:hover{--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity))}.dark .dark\:hover\:bg-neutral-700\/80:hover{background-color:#404040cc}.dark .dark\:hover\:bg-neutral-800:hover{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.dark .dark\:hover\:bg-primary-700\/40:hover{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.4)}.dark .dark\:hover\:bg-red-700\/40:hover{background-color:#b91c1c66}.dark [bg~="dark:hover:complementary-700"]:hover{--un-bg-opacity:1;background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 180)/var(--un-bg-opacity))}.dark [bg~="dark:hover:neutral-800"]:hover{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.dark [dark\:hover\:bg-cyan-300=""]:hover{--un-bg-opacity:1;background-color:rgb(103 232 249/var(--un-bg-opacity))}.dark [hover~="dark:bg-black/40"]:hover{background-color:#0006}.dark [hover~=dark\:bg-neutral-700]:hover{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark [hover~="dark:bg-neutral-700/50"]:hover{background-color:#40404080}.hover\:bg-neutral-100:hover{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.hover\:bg-neutral-300:hover{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}.hover\:bg-neutral-400:hover{--un-bg-opacity:1;background-color:rgb(163 163 163/var(--un-bg-opacity))}.hover\:bg-neutral-400\/20:hover{background-color:#a3a3a333}.hover\:bg-primary-500\/20:hover{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)}.hover\:bg-primary-600:hover{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.hover\:bg-red-500\/20:hover{background-color:#ef444433}.hover\:bg-white\/80:hover{background-color:#fffc}[bg~=hover\:complementary-200]:hover{--un-bg-opacity:1;background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 180)/var(--un-bg-opacity))}[bg~=hover\:emerald-600]:hover{--un-bg-opacity:1;background-color:rgb(5 150 105/var(--un-bg-opacity))}[bg~=hover\:neutral-200]:hover{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}[bg~=hover\:neutral-50]:hover{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}[hover\:bg-neutral-300=""]:hover{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}[hover\:bg-primary-600=""]:hover{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}[hover~=bg-neutral-200]:hover{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}[hover~=bg-white\/80]:hover{background-color:#fffc}.dark [bg~="dark:focus:neutral-900"]:focus{--un-bg-opacity:1;background-color:rgb(23 23 23/var(--un-bg-opacity))}[bg~=focus\:neutral-50]:focus{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.active\:bg-neutral-400\/30:active{background-color:#a3a3a34d}.active\:bg-primary-500\/30:active{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.active\:bg-red-500\/30:active{background-color:#ef44444d}.dark .dark\:active\:bg-neutral-700\/60:active{background-color:#40404099}.dark .dark\:active\:bg-primary-700\/30:active{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:active\:bg-red-700\/30:active{background-color:#b91c1c4d}.dark [bg~="dark:active:neutral-700"]:active{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}[bg~=active\:gray-50]:active{--un-bg-opacity:1;background-color:rgb(249 250 251/var(--un-bg-opacity))}[bg~=active\:neutral-300]:active{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}.dark [bg~="dark:disabled:neutral-800"]:disabled{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}[bg~=disabled\:neutral-100]:disabled{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.before\:bg-lime-400:before{--un-bg-opacity:1;background-color:rgb(163 230 53/var(--un-bg-opacity))}.before\:bg-orange-400:before{--un-bg-opacity:1;background-color:rgb(251 146 60/var(--un-bg-opacity))}.before\:bg-primary-400:before{--un-bg-opacity:1;background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.before\:bg-violet-400:before{--un-bg-opacity:1;background-color:rgb(167 139 250/var(--un-bg-opacity))}.dark .before\:dark\:bg-lime-900:before{--un-bg-opacity:1;background-color:rgb(54 83 20/var(--un-bg-opacity))}.dark .before\:dark\:bg-orange-900:before{--un-bg-opacity:1;background-color:rgb(124 45 18/var(--un-bg-opacity))}.dark .before\:dark\:bg-primary-900:before{--un-bg-opacity:1;background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.dark .before\:dark\:bg-violet-900:before{--un-bg-opacity:1;background-color:rgb(76 29 149/var(--un-bg-opacity))}.after\:bg-white:after{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.dark .dark\:from-neutral-800,.dark [dark\:from-neutral-800=""]{--un-gradient-from-position:0%;--un-gradient-from:rgb(38 38 38/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#26262600 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:from-primary-400\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:from-primary-400\/20{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-neutral-50,[from-neutral-50=""]{--un-gradient-from-position:0%;--un-gradient-from:rgb(250 250 250/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#fafafa00 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500\/20,.before\:from-primary-500\/20:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .before\:dark\:from-primary-400\/20:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark [before~="dark:from-primary-400/0"]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark [hover~="before:dark:from-primary-400/20"]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}[before~=from-primary-500\/0]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}[hover~="before:from-primary-500/20"]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:via-primary-400\/10{--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.via-primary-500\/10,.before\:via-primary-500\/10:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.dark .before\:dark\:via-primary-400\/10:before,.dark [hover~="before:dark:via-primary-400/10"]:hover:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}[hover~="before:via-primary-500/10"]:hover:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.dark .dark\:to-neutral-900{--un-gradient-to-position:100%;--un-gradient-to:rgb(23 23 23/var(--un-to-opacity,1))var(--un-gradient-to-position)}.dark .dark\:to-primary-400\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.dark .dark\:to-transparent,.to-transparent{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.to-neutral-100,[to-neutral-100=""]{--un-gradient-to-position:100%;--un-gradient-to:rgb(245 245 245/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-primary-400{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-primary-500\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.before\:to-transparent:before,.dark .before\:dark\:to-transparent:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.dark [before~="dark:to-primary-400/0"]:before{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.dark [hover~="before:dark:to-transparent"]:hover:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}[before~=to-primary-500\/0]:before{--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}[hover~=before\:to-transparent]:hover:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.bg-gradient-to-b,[bg-gradient-to-b=""]{--un-gradient-shape:to bottom in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}.bg-gradient-to-r,.before\:bg-gradient-to-r:before,[before~=bg-gradient-to-r]:before,[hover~=before\:bg-gradient-to-r]:hover:before{--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.dark .dark\:fill-neutral-800,.dark [dark\:fill-neutral-800=""]{--un-fill-opacity:1;fill:rgb(38 38 38/var(--un-fill-opacity))}.fill-white,[fill-white=""]{--un-fill-opacity:1;fill:rgb(255 255 255/var(--un-fill-opacity))}[stroke-width~="0.5"]{stroke-width:.5px}[stroke-width~="1.5"]{stroke-width:1.5px}[stroke-width~="2"]{stroke-width:2px}[stroke~="163"]{stroke-width:163px}[stroke~="175"]{stroke-width:175px}.object-cover,[object-cover=""]{object-fit:cover}.object-contain,[object-contain=""]{object-fit:contain}.p-1,[p-1=""]{padding:.25rem}.p-1\.5,[p-1\.5=""]{padding:.375rem}.p-2,.p2,[p-2=""],[p~="2"],[p2=""]{padding:.5rem}.p-2\.5,[p~="2.5"]{padding:.625rem}.p-3,[p-3=""]{padding:.75rem}.p-4,[p-4=""]{padding:1rem}.p-5,[p-5=""]{padding:1.25rem}.p-6{padding:1.5rem}.p-8,[p-8=""]{padding:2rem}.px,.px-4,[px-4=""],[px=""]{padding-left:1rem;padding-right:1rem}.px-0{padding-left:0;padding-right:0}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2,.px2,[px-2=""],[px~="2"],[px2=""]{padding-left:.5rem;padding-right:.5rem}.px-3,[px-3=""]{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py,.py-4,[py~="4"]{padding-top:1rem;padding-bottom:1rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5,[py-0\.5=""]{padding-top:.125rem;padding-bottom:.125rem}.py-1,.py1,[py-1=""],[py~="1"],[py1=""]{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5,[py-1\.5=""]{padding-top:.375rem;padding-bottom:.375rem}.py-2,[py-2=""]{padding-top:.5rem;padding-bottom:.5rem}.py-3,[py-3=""]{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-2,[pb-2=""]{padding-bottom:.5rem}.pb-4,[pb-4=""]{padding-bottom:1rem}.pb-6,[pb-6=""]{padding-bottom:1.5rem}.pl,.pl-4,[pl-4=""]{padding-left:1rem}.pl-10{padding-left:2.5rem}.pl-3,[pl-3=""]{padding-left:.75rem}.pl-5,[pl-5=""]{padding-left:1.25rem}.pr-\[20px\]{padding-right:20px}.pr-1,[pr-1=""]{padding-right:.25rem}.pr-3,[pr-3=""]{padding-right:.75rem}.pr-4,[pr-4=""]{padding-right:1rem}.pt,.pt-4,[pt-4=""]{padding-top:1rem}.pt-0{padding-top:0}.pt-10,[pt-10=""]{padding-top:2.5rem}.pt-2,[pt-2=""]{padding-top:.5rem}.pt-3{padding-top:.75rem}.text-center,[text-center=""],[text~=center]{text-align:center}.text-left,[text-left=""]{text-align:left}.text-right,[text-right=""]{text-align:right}.text-wrap,[text-wrap=""]{text-wrap:wrap}.text-nowrap,[text-nowrap=""]{text-wrap:nowrap}.text-2xl,[text-2xl=""],[text~="2xl"]{font-size:1.5rem;line-height:2rem}.text-3xl,[text-3xl=""]{font-size:1.875rem;line-height:2.25rem}.text-5xl,[text-5xl=""]{font-size:3rem;line-height:1}.text-6xl,[text-6xl=""]{font-size:3.75rem;line-height:1}.text-base,[text-base=""],[text~=base]{font-size:1rem;line-height:1.5rem}.text-lg,[text-lg=""],[text~=lg]{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""],[text~=sm]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""],[text~=xs]{font-size:.75rem;line-height:1rem}[text~="4xl"]{font-size:2.25rem;line-height:2.5rem}[text~="60"]{font-size:15rem}[default-text~="2"]:default{font-size:.5rem}.dark .dark\:text-amber-300{--un-text-opacity:1;color:rgb(252 211 77/var(--un-text-opacity))}.dark .dark\:text-amber-400{--un-text-opacity:1;color:rgb(251 191 36/var(--un-text-opacity))}.dark .dark\:text-blue-300{--un-text-opacity:1;color:rgb(147 197 253/var(--un-text-opacity))}.dark .dark\:text-green-300{--un-text-opacity:1;color:rgb(134 239 172/var(--un-text-opacity))}.dark .dark\:text-green-400{--un-text-opacity:1;color:rgb(74 222 128/var(--un-text-opacity))}.dark .dark\:text-lime-400{--un-text-opacity:1;color:rgb(163 230 53/var(--un-text-opacity))}.dark .dark\:text-neutral-100,[text~=neutral-100]{--un-text-opacity:1;color:rgb(245 245 245/var(--un-text-opacity))}.dark .dark\:text-neutral-100\/80{color:#f5f5f5cc}.dark .dark\:text-neutral-200,.dark [dark\:text-neutral-200=""],.dark [text~=dark\:neutral-200]{--un-text-opacity:1;color:rgb(229 229 229/var(--un-text-opacity))}.dark .dark\:text-neutral-300,.dark [dark\:text-neutral-300=""],.dark [text~=dark\:neutral-300],[text~=neutral-300]{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark .dark\:text-neutral-400,.dark [dark\:text-neutral-400=""],.dark [text~=dark\:neutral-400],.text-neutral-400,[text-neutral-400=""],[text~=neutral-400]{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}.dark .dark\:text-neutral-500,.dark [text~=dark\:neutral-500],.text-neutral-500,[text-neutral-500=""],[text~=neutral-500]{--un-text-opacity:1;color:rgb(115 115 115/var(--un-text-opacity))}.dark .dark\:text-neutral-600,.dark [text~=dark\:neutral-600],.text-neutral-600,[text~=neutral-600]{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}.dark .dark\:text-neutral-600\/20,.dark [text~="dark:neutral-600/20"]{color:#52525233}.dark .dark\:text-orange-400{--un-text-opacity:1;color:rgb(251 146 60/var(--un-text-opacity))}.dark .dark\:color-primary-100,.dark .dark\:text-primary-100,.dark [dark\:color-primary-100=""],.dark [text~=dark\:primary-100]{--un-text-opacity:1;color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))80%,oklch(100% 0 360/var(--un-text-opacity)))}.dark .dark\:text-primary-300,.dark [text~=dark\:primary-300],.text-primary-300,[text~=primary-300]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-primary-300\/80{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.color-primary-400,.dark .dark\:text-primary-400,.dark [text~=dark\:primary-400],.text-primary-400,[color-primary-400=""]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-primary-500,.text-primary-500,[text~=primary-500]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-primary-600,.text-primary-600,[text~=primary-600]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-red-100{--un-text-opacity:1;color:rgb(254 226 226/var(--un-text-opacity))}.dark .dark\:text-red-300{--un-text-opacity:1;color:rgb(252 165 165/var(--un-text-opacity))}.dark .dark\:text-red-400{--un-text-opacity:1;color:rgb(248 113 113/var(--un-text-opacity))}.dark .dark\:text-violet-400{--un-text-opacity:1;color:rgb(167 139 250/var(--un-text-opacity))}.dark .dark\:text-white,.dark [dark\:text-white=""],.dark [text~=dark\:white],.text-white,[text-white=""],[text~=white]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}.dark .dark\:text-white\/50{color:#ffffff80}.dark [text~="dark:cyan-600/90"]{color:#0891b2e6}.dark [text~=dark\:gray-200]{--un-text-opacity:1;color:rgb(229 231 235/var(--un-text-opacity))}.dark [text~="dark:neutral-600/50"]{color:#52525280}.dark [text~=dark\:neutral-900]{--un-text-opacity:1;color:rgb(23 23 23/var(--un-text-opacity))}.dark [text~=dark\:orange-500],.text-orange-500{--un-text-opacity:1;color:rgb(249 115 22/var(--un-text-opacity))}.dark [text~="dark:primary-300/50"]{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}.dark [text~="dark:primary-600/90"]{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.9)}.dark [text~="dark:violet-600/90"]{color:#7c3aede6}.text-amber-500{--un-text-opacity:1;color:rgb(245 158 11/var(--un-text-opacity))}.text-amber-600{--un-text-opacity:1;color:rgb(217 119 6/var(--un-text-opacity))}.text-amber-700{--un-text-opacity:1;color:rgb(180 83 9/var(--un-text-opacity))}.text-black,[text-black=""]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.text-blue-500{--un-text-opacity:1;color:rgb(59 130 246/var(--un-text-opacity))}.text-blue-700,[text-blue-700=""]{--un-text-opacity:1;color:rgb(29 78 216/var(--un-text-opacity))}.text-green-600{--un-text-opacity:1;color:rgb(22 163 74/var(--un-text-opacity))}.text-green-700,[text-green-700=""]{--un-text-opacity:1;color:rgb(21 128 61/var(--un-text-opacity))}.text-lime-500{--un-text-opacity:1;color:rgb(132 204 22/var(--un-text-opacity))}.text-neutral-200\/50,[text~=neutral-200\/50]{color:#e5e5e580}.text-neutral-400\/50,[text~=neutral-400\/50]{color:#a3a3a380}.text-neutral-500\/50,[text~=neutral-500\/50]{color:#73737380}.text-neutral-700,[text-neutral-700=""],[text~=neutral-700]{--un-text-opacity:1;color:rgb(64 64 64/var(--un-text-opacity))}.text-neutral-800{--un-text-opacity:1;color:rgb(38 38 38/var(--un-text-opacity))}.text-neutral-900\/80{color:#171717cc}.text-neutral-950{--un-text-opacity:1;color:rgb(10 10 10/var(--un-text-opacity))}.text-primary-600\/80{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}.text-primary-700{--un-text-opacity:1;color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-primary-800{--un-text-opacity:1;color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-primary-950{--un-text-opacity:1;color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-red-500{--un-text-opacity:1;color:rgb(239 68 68/var(--un-text-opacity))}.text-red-600{--un-text-opacity:1;color:rgb(220 38 38/var(--un-text-opacity))}.text-red-700,[text-red-700=""]{--un-text-opacity:1;color:rgb(185 28 28/var(--un-text-opacity))}.text-red-950{--un-text-opacity:1;color:rgb(69 10 10/var(--un-text-opacity))}.text-transparent{color:#0000}.text-violet-500,[text-violet-500=""]{--un-text-opacity:1;color:rgb(139 92 246/var(--un-text-opacity))}[text~=complementary-400]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 180)/var(--un-text-opacity))}[text~=cyan-400]{--un-text-opacity:1;color:rgb(34 211 238/var(--un-text-opacity))}[text~=cyan-400\/90]{color:#22d3eee6}[text~=gray-700]{--un-text-opacity:1;color:rgb(55 65 81/var(--un-text-opacity))}[text~=orange-700]{--un-text-opacity:1;color:rgb(194 65 12/var(--un-text-opacity))}[text~=primary-400\/90]{color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.9)}[text~=violet-400\/90]{color:#a78bfae6}.dark .dark\:hover\:text-neutral-300:hover{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark [hover~="dark:text-primary-300/80"]:hover{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.dark [text~="dark:hover:primary-200"]:hover{--un-text-opacity:1;color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="dark:hover:primary-500"]:hover{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.hover\:text-neutral-700:hover{--un-text-opacity:1;color:rgb(64 64 64/var(--un-text-opacity))}[hover~=text-primary-600\/80]:hover{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}[text~=hover\:primary-500]:hover{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}[text~=hover\:primary-600]:hover{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="dark:disabled:neutral-600"]:disabled{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}[text~=disabled\:neutral-400]:disabled{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}.dark [text~="placeholder:dark:hover:primary-400"]:hover::placeholder{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="placeholder:dark:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="placeholder:dark:primary-300"]::placeholder{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="placeholder:dark:primary-300/50"]::placeholder{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}[text~="placeholder:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}[text~=placeholder\:primary-400]::placeholder{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.font-bold,[font-bold=""]{font-weight:700}.font-medium,[font-medium=""]{font-weight:500}.font-normal,[font-normal=""]{font-weight:400}.font-semibold,[font-semibold=""]{font-weight:600}.leading-10,.lh-10{line-height:2.5rem}[leading~="[0.75]"]{line-height:.75}[leading~="[1]"]{line-height:1}.font-cuteen,[font-cuteen=""]{font-family:Sniglet}.font-jura,[font-jura=""]{font-family:Jura}.font-mono,[font-mono=""]{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-quicksand,[font-quicksand=""]{font-family:Quicksand}.font-sans,[font-sans=""]{font-family:DM Sans,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-italic,.italic,[font-italic=""]{font-style:italic}.decoration-underline,.underline,[decoration-underline=""],[underline=""]{text-decoration-line:underline}.decoration-dotted,[decoration-dotted=""]{text-decoration-style:dotted}.decoration-dashed,[decoration-dashed=""]{text-decoration-style:dashed}.tab,[aria-checked~=tab][aria-checked=true],[tab=""],[checked~=tab]:checked{tab-size:4}.text-stroke-1,[text-stroke-1=""]{-webkit-text-stroke-width:1px}.text-shadow{--un-text-shadow:0 0 1px var(--un-text-shadow-color,#0003),0 0 1px var(--un-text-shadow-color,#0100051a);text-shadow:var(--un-text-shadow)}.\[\&\:checked\+div_\.radio-dot\]\:opacity-100:checked+div .radio-dot,.opacity-100,.group:hover .group-hover\:opacity-100,.group:hover [group-hover\:opacity-100=""]{opacity:1}.op-0,.opacity-0,[opacity-0=""]{opacity:0}.op50,.opacity-50,[op50=""]{opacity:.5}.opacity-25{opacity:.25}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-95,[opacity-95=""]{opacity:.95}[hover~=opacity-100]:hover{opacity:1}.disabled\:opacity-50:disabled,[disabled\:opacity-50=""]:disabled{opacity:.5}.before\:opacity-100:before{opacity:1}[before~=opacity-0]:before{opacity:0}[hover~=before\:opacity-100]:hover:before{opacity:1}.mix-blend-screen,[mix-blend-screen=""]{mix-blend-mode:screen}.dark .dark\:shadow-lg,.shadow-lg,[shadow-lg=""]{--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.dark [shadow~=dark\:none]{--un-shadow:0 0 var(--un-shadow-color,#0000);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow{--un-shadow:var(--un-shadow-inset)0 1px 3px 0 var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 1px 2px -1px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-green-500\/50{--un-shadow-color:#22c55e80 }.shadow-md,[shadow-md=""],[shadow~=md]{--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-sm,[shadow-sm=""],[shadow~=sm]{--un-shadow:var(--un-shadow-inset)0 1px 2px 0 var(--un-shadow-color,#0000000d);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-xl,[shadow-xl=""]{--un-shadow:var(--un-shadow-inset)0 20px 25px -5px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 8px 10px -6px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-yellow-500\/30{--un-shadow-color:#eab3084d }[shadow-green-500=""]{--un-shadow-opacity:1;--un-shadow-color:rgb(34 197 94/var(--un-shadow-opacity))}[shadow~=cyan-200\/20]{--un-shadow-color:#a5f3fc33 }[shadow~=cyan-200\/50]{--un-shadow-color:#a5f3fc80 }[shadow~=primary-200\/20]{--un-shadow-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}[shadow~=primary-200\/50]{--un-shadow-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}[shadow~=violet-200\/20]{--un-shadow-color:#ddd6fe33 }[shadow~=violet-200\/50]{--un-shadow-color:#ddd6fe80 }.focus-within\:shadow-neutral-800:focus-within{--un-shadow-opacity:1;--un-shadow-color:rgb(38 38 38/var(--un-shadow-opacity))}[shadow~="focus-within:[0_0_0_1px]"]:focus-within{--un-shadow:0 0 0 1px var(--un-shadow-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.dark [hover~=dark\:shadow-lg]:hover{--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[hover~=shadow-md]:hover{--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.outline{outline-style:solid}.outline-none,[outline-none=""],[outline~=focus-within\:none]:focus-within{outline-offset:2px;outline:2px solid #0000}.focus\:ring-2:focus{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset)0 0 0 var(--un-ring-offset-width)var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset)0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width))var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.focus\:ring-offset-2:focus{--un-ring-offset-width:2px}.dark .dark\:focus\:ring-neutral-600\/30:focus{--un-ring-color:#5252524d }.dark .dark\:focus\:ring-neutral-600\/60:focus{--un-ring-color:#52525299 }.dark .dark\:focus\:ring-primary-600\/30:focus{--un-ring-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:focus\:ring-red-600\/30:focus{--un-ring-color:#dc26264d }.dark .dark\:focus\:ring-red-600\/60:focus{--un-ring-color:#dc262699 }.focus\:ring-black\/10:focus{--un-ring-color:#0000001a }.focus\:ring-neutral-300\/30:focus{--un-ring-color:#d4d4d44d }.focus\:ring-primary-300\/60:focus{--un-ring-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.6)}.focus\:ring-red-300\/30:focus{--un-ring-color:#fca5a54d }.dark .dark\:focus\:ring-offset-neutral-900:focus{--un-ring-offset-opacity:1;--un-ring-offset-color:rgb(23 23 23/var(--un-ring-offset-opacity))}.focus\:ring-offset-white:focus{--un-ring-offset-opacity:1;--un-ring-offset-color:rgb(255 255 255/var(--un-ring-offset-opacity))}.backdrop-blur-lg{--un-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-md,[backdrop-blur-md=""]{--un-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-sm,[backdrop-blur-sm=""]{--un-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-xl,[backdrop-blur-xl=""]{--un-backdrop-blur:blur(24px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.blur{--un-blur:blur(8px);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.drop-shadow{--un-drop-shadow:drop-shadow(0 1px 2px var(--un-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--un-drop-shadow-color,#0000000f));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.drop-shadow-sm,[drop-shadow-sm=""]{--un-drop-shadow:drop-shadow(0 1px 1px var(--un-drop-shadow-color,#0000000d));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~=none],.dark [drop-shadow~="dark:hover:none"]:hover{--un-drop-shadow:drop-shadow(0 0 var(--un-drop-shadow-color,#0000));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~="hover:[0px_4px_4px_rgba(220,220,220,0.4)]"]:hover{--un-drop-shadow:drop-shadow(0px 4px 4px #dcdcdc66);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~="active:[0px_0px_0px_rgba(220,220,220,0.25)]"]:active{--un-drop-shadow:drop-shadow(0px 0px 0px #dcdcdc40);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.\[\&_\.provider-icon\]\:grayscale-100 .provider-icon,.grayscale-100,[grayscale-100=""]{--un-grayscale:grayscale(1);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.\[\&_\.provider-icon\]\:hover\:grayscale-0:hover .provider-icon{--un-grayscale:grayscale(0);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.filter{filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\[width\,margin\]{transition-property:width,margin;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-100,[transition~="100"]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.1s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all,[transition-all=""],[transition~=all]{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors,[transition-colors=""],[transition~=colors]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors\,transform\,width\,height{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity,[transition-opacity=""]{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform,[transition~=transform]{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=border]{transition-property:border;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=width]{transition-property:width;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=placeholder\:all]::placeholder,[before~=transition-all]:before,.after\:transition-all:after,[after~=transition-all]:after{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,[duration-150=""]{transition-duration:.15s}.duration-200,[duration-200=""],[transition~=duration-200]{transition-duration:.2s}.duration-250,[duration-250=""],[duration~="250"],[transition~=duration-250]{transition-duration:.25s}.duration-300,[transition~=duration-300]{transition-duration:.3s}.duration-400,[transition~=duration-400]{transition-duration:.4s}.duration-500,[duration-500=""],[duration~="500"],[transition~=duration-500]{transition-duration:.5s}.duration-75{transition-duration:75ms}[duration~="10"]{transition-duration:10ms}[duration~="1000"]{transition-duration:1s}.placeholder\:duration-250::placeholder,[placeholder\:duration-250=""]::placeholder,[transition~=placeholder\:duration-250]::placeholder{transition-duration:.25s}[before~=duration-400]:before,[after~=duration-400]:after{transition-duration:.4s}[delay~="10"]{transition-delay:10ms}[delay~="100"]{transition-delay:.1s}[delay~="11"]{transition-delay:11ms}[delay~="19"]{transition-delay:19ms}[delay~="2"]{transition-delay:2ms}[delay~="20"]{transition-delay:20ms}[delay~="200"]{transition-delay:.2s}[delay~="3"]{transition-delay:3ms}[delay~="4"]{transition-delay:4ms}[delay~="5"]{transition-delay:5ms}[delay~="50"]{transition-delay:50ms}[delay~="6"]{transition-delay:6ms}[delay~="7"]{transition-delay:7ms}[delay~="8"]{transition-delay:8ms}[delay~="9"]{transition-delay:9ms}.ease,.ease-in-out,[ease-in-out=""],[transition~=ease-in-out]{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-linear,[ease-linear=""]{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:ease-in-out::placeholder,[transition~=placeholder\:ease-in-out]::placeholder,[before~=ease-in-out]:before,[after~=ease-in-out]:after{transition-timing-function:cubic-bezier(.4,0,.2,1)}.will-change-background-color,[will-change-background-color=""]{will-change:background-color}.will-change-color,[will-change-color=""]{will-change:color}.will-change-transform,[will-change-transform=""]{will-change:transform}.will-change-width,[will-change-width=""]{will-change:width}.before\:content-\[\'\'\]:before,.after\:content-\[\'\'\]:after,.content-empty,[before~=content-empty]:before,[after~=content-empty]:after{content:""}.hidden,[hidden=""]{display:none}.bg-dotted-\[neutral-200\/60\]{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.6}.bg-dotted-\[neutral-200\/80\]{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8}.dark .dark\:bg-dotted-\[neutral-700\/25\]{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.25}.dark .dark\:bg-dotted-\[neutral-700\/40\]{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.4}.dark .dark\:hover\:bg-dotted-\[primary-200\/20\]:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.hover\:bg-dotted-\[primary-300\/50\]:hover,.after\:bg-dotted-\[primary-300\/50\]:after{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .dark\:after\:bg-dotted-\[primary-200\/20\]:after,.dark [hover~="dark:after:bg-dotted-[primary-200/20]"]:hover:after{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}[after~="bg-dotted-[neutral-200/80]"]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8}[hover~="after:bg-dotted-[primary-300/50]"]:hover:after{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.transition-colors-none,.placeholder\:transition-colors-none::placeholder{transition-property:color,background-color,border-color,text-color;transition-duration:0s}@media (max-width:1023.9px){[min-w~="i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-BcIEAl0a.js","assets/HeaderLink-DJwpVSTp.js","assets/HeaderLink-Bxs3yYEi.css","assets/settings-DlFH7AgC.js","assets/theme-color-B66QzWnt.js","assets/pages-BAul_h40.js","assets/route-block-D_qNAUXY.js","assets/AnimatedWave-CMIzOsja.js","assets/Basic-1H4d_HIg.js","assets/AnimatedWave-Ba4PQcRS.css","assets/Scenes-D5Bedj_D.js","assets/import-url-browser-VKajNDYM.js","assets/duckdb-mvp-CIsUbAtz.js","assets/background-remove-BBB0u_Hq.js","assets/transformers.web-D42P8ZMr.js","assets/InputFile-CrE3SFMy.js","assets/gesture-circle-BhrbgQjT.js","assets/image-Drq3BS_B.js","assets/image-BhuwcwI9.css","assets/polaroid-Bs31_N5q.js","assets/vibrant-DJTnlypI.js","assets/browser-CJhr0Svl.js","assets/settings-FSKP6s04.js","assets/IconAnimation-DBKHapUf.js","assets/airi-card-mY7qwyzh.js","assets/CardCreate-CAbaTC1Z.js","assets/CardCreationDialog-DtkXvIwx.js","assets/CardCreationDialog-CG2KLbdk.css","assets/CardDetailDialog-B5sM5zj1.js","assets/DeleteCardDialog-82b70cIC.js","assets/CardListItem-DTzfNndg.js","assets/CardCreate-CEdooQmC.js","assets/CardCreationDialog-Dfq3gfrr.js","assets/CardDetailDialog-CidehlMa.js","assets/CardListItem-Bj3hdPXC.js","assets/DeleteCardDialog-CTir2p4h.js","assets/appearance-BjGIfT8s.js","assets/color-scheme-jmrpTVHV.js","assets/color-scheme-ZSHYHslH.css","assets/developer-CCqYxIcY.js","assets/general-xGijmv9Q.js","assets/memory-BnX_YReY.js","assets/models-BdKy7BTu.js","assets/icon-animation-DYW3c7je.js","assets/modules-B091BuDn.js","assets/consciousness-DOb7L0Yh.js","assets/hearing-BRaBstPb.js","assets/memory-long-term-B5wEjqtq.js","assets/memory-short-term-CxN60U-L.js","assets/speech-Dm3KkONO.js","assets/Textarea-Bzx3P1JU.js","assets/providers-CVExW2Kb.js","assets/alibaba-cloud-model-studio-NFHP1r1x.js","assets/anthropic-Cu-QiXIM.js","assets/cloudflare-workers-ai-DvT5X7zi.js","assets/deepseek-BrvbO56H.js","assets/elevenlabs-B1MqPQr8.js","assets/featherless-ai-DTyndR9W.js","assets/fireworks-ai-DvpnBa6B.js","assets/google-generative-ai-A9AGUM2m.js","assets/microsoft-speech-CRIYmLXG.js","assets/mistral-ai-Cp_MAH4V.js","assets/moonshot-ai-bUFSVmPQ.js","assets/novita-ai-DCJo9fcm.js","assets/ollama-xKcCpTx0.js","assets/openai-CQAVgiMk.js","assets/openai-audio-speech-DW1QrfRq.js","assets/openai-audio-transcription-CavrcyBE.js","assets/openrouter-ai-CnYjoQlp.js","assets/player2-Vrjn9guG.js","assets/player2-speech-rSa7i7tK.js","assets/together-ai-CFPLADAy.js","assets/volcengine-CNYLf4lq.js","assets/xai-tmPQgTKt.js","assets/scene-DsHsIafe.js","assets/stage-B5qiz8AC.js","assets/filter-message-DCHgw6K5.js","assets/delays-hZ_G3T9g.js","assets/emotions-pdqefEJH.js","assets/messages-DxJEqeNl.js"])))=>i.map(i=>d[i]); var __create=Object.create,__defProp$1=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp$1=Object.prototype.hasOwnProperty,__esmMin=(fn$6,res)=>()=>(fn$6&&(res=fn$6(fn$6=0)),res),__commonJSMin=(cb$1,mod)=>()=>(mod||cb$1((mod={exports:{}}).exports,mod),mod.exports),__export=(target$1,all$3)=>{for(var name$2 in all$3)__defProp$1(target$1,name$2,{get:all$3[name$2],enumerable:!0})},__copyProps=(to$2,from,except,desc)=>{if(from&&typeof from==`object`||typeof from==`function`)for(var keys$3=__getOwnPropNames(from),i$1=0,n$2=keys$3.length,key$1;i$1from[k$4]).bind(null,key$1),enumerable:!(desc=__getOwnPropDesc(from,key$1))||desc.enumerable});return to$2},__toESM=(mod,isNodeMode,target$1)=>(target$1=mod==null?{}:__create(__getProtoOf(mod)),__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp$1(target$1,`default`,{value:mod,enumerable:!0}):target$1,mod)),__toCommonJS=mod=>__copyProps(__defProp$1({},`__esModule`,{value:!0}),mod),__toDynamicImportESM=isNodeMode=>mod=>__toESM(mod.default,isNodeMode),__require=(x$3=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(x$3,{get:(a$2,b$4)=>(typeof require<`u`?require:a$2)[b$4]}):x$3)(function(x$3){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+x$3+"\" in an environment that doesn't expose the `require` function.")});(function(){let relList=document.createElement(`link`).relList;if(relList&&relList.supports&&relList.supports(`modulepreload`))return;for(let link$1 of document.querySelectorAll(`link[rel="modulepreload"]`))processPreload(link$1);new MutationObserver(mutations$1=>{for(let mutation of mutations$1){if(mutation.type!==`childList`)continue;for(let node$1 of mutation.addedNodes)node$1.tagName===`LINK`&&node$1.rel===`modulepreload`&&processPreload(node$1)}}).observe(document,{childList:!0,subtree:!0});function getFetchOpts(link$1){let fetchOpts={};return link$1.integrity&&(fetchOpts.integrity=link$1.integrity),link$1.referrerPolicy&&(fetchOpts.referrerPolicy=link$1.referrerPolicy),link$1.crossOrigin===`use-credentials`?fetchOpts.credentials=`include`:link$1.crossOrigin===`anonymous`?fetchOpts.credentials=`omit`:fetchOpts.credentials=`same-origin`,fetchOpts}function processPreload(link$1){if(link$1.ep)return;link$1.ep=!0;let fetchOpts=getFetchOpts(link$1);fetch(link$1.href,fetchOpts)}})(); /** * @vue/shared v3.5.17 @@ -3835,15 +3835,15 @@ void main() { }`;var WebXRDepthSensing=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(renderer$1,depthData,renderState){if(this.texture===null){let texture=new Texture,texProps=renderer$1.properties.get(texture);texProps.__webglTexture=depthData.texture,(depthData.depthNear!==renderState.depthNear||depthData.depthFar!==renderState.depthFar)&&(this.depthNear=depthData.depthNear,this.depthFar=depthData.depthFar),this.texture=texture}}getMesh(cameraXR){if(this.texture!==null&&this.mesh===null){let viewport=cameraXR.cameras[0].viewport,material=new ShaderMaterial({vertexShader:_occlusion_vertex,fragmentShader:_occlusion_fragment,uniforms:{depthColor:{value:this.texture},depthWidth:{value:viewport.z},depthHeight:{value:viewport.w}}});this.mesh=new Mesh(new PlaneGeometry(20,20),material)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},WebXRManager=class extends EventDispatcher{constructor(renderer$1,gl){super();let scope=this,session=null,framebufferScaleFactor=1,referenceSpace=null,referenceSpaceType=`local-floor`,foveation=1,customReferenceSpace=null,pose=null,glBinding=null,glProjLayer=null,glBaseLayer=null,xrFrame=null,depthSensing=new WebXRDepthSensing,attributes=gl.getContextAttributes(),initialRenderTarget=null,newRenderTarget=null,controllers=[],controllerInputSources=[],currentSize=new Vector2,currentPixelRatio=null,cameraL=new PerspectiveCamera;cameraL.viewport=new Vector4;let cameraR=new PerspectiveCamera;cameraR.viewport=new Vector4;let cameras=[cameraL,cameraR],cameraXR=new ArrayCamera,_currentDepthNear=null,_currentDepthFar=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(index$1){let controller=controllers[index$1];return controller===void 0&&(controller=new WebXRController,controllers[index$1]=controller),controller.getTargetRaySpace()},this.getControllerGrip=function(index$1){let controller=controllers[index$1];return controller===void 0&&(controller=new WebXRController,controllers[index$1]=controller),controller.getGripSpace()},this.getHand=function(index$1){let controller=controllers[index$1];return controller===void 0&&(controller=new WebXRController,controllers[index$1]=controller),controller.getHandSpace()};function onSessionEvent(event){let controllerIndex=controllerInputSources.indexOf(event.inputSource);if(controllerIndex===-1)return;let controller=controllers[controllerIndex];controller!==void 0&&(controller.update(event.inputSource,event.frame,customReferenceSpace||referenceSpace),controller.dispatchEvent({type:event.type,data:event.inputSource}))}function onSessionEnd(){session.removeEventListener(`select`,onSessionEvent),session.removeEventListener(`selectstart`,onSessionEvent),session.removeEventListener(`selectend`,onSessionEvent),session.removeEventListener(`squeeze`,onSessionEvent),session.removeEventListener(`squeezestart`,onSessionEvent),session.removeEventListener(`squeezeend`,onSessionEvent),session.removeEventListener(`end`,onSessionEnd),session.removeEventListener(`inputsourceschange`,onInputSourcesChange);for(let i$1=0;i$1=0&&(controllerInputSources[index$1]=null,controllers[index$1].disconnect(inputSource))}for(let i$1=0;i$1=controllerInputSources.length){controllerInputSources.push(inputSource),controllerIndex=i$2;break}else if(controllerInputSources[i$2]===null){controllerInputSources[i$2]=inputSource,controllerIndex=i$2;break}if(controllerIndex===-1)break}let controller=controllers[controllerIndex];controller&&controller.connect(inputSource)}}let cameraLPos=new Vector3,cameraRPos=new Vector3;function setProjectionFromUnion(camera,cameraL$1,cameraR$1){cameraLPos.setFromMatrixPosition(cameraL$1.matrixWorld),cameraRPos.setFromMatrixPosition(cameraR$1.matrixWorld);let ipd=cameraLPos.distanceTo(cameraRPos),projL=cameraL$1.projectionMatrix.elements,projR=cameraR$1.projectionMatrix.elements,near=projL[14]/(projL[10]-1),far=projL[14]/(projL[10]+1),topFov=(projL[9]+1)/projL[5],bottomFov=(projL[9]-1)/projL[5],leftFov=(projL[8]-1)/projL[0],rightFov=(projR[8]+1)/projR[0],left=near*leftFov,right=near*rightFov,zOffset=ipd/(-leftFov+rightFov),xOffset=zOffset*-leftFov;if(cameraL$1.matrixWorld.decompose(camera.position,camera.quaternion,camera.scale),camera.translateX(xOffset),camera.translateZ(zOffset),camera.matrixWorld.compose(camera.position,camera.quaternion,camera.scale),camera.matrixWorldInverse.copy(camera.matrixWorld).invert(),projL[10]===-1)camera.projectionMatrix.copy(cameraL$1.projectionMatrix),camera.projectionMatrixInverse.copy(cameraL$1.projectionMatrixInverse);else{let near2=near+zOffset,far2=far+zOffset,left2=left-xOffset,right2=right+(ipd-xOffset),top2=topFov*far/far2*near2,bottom2=bottomFov*far/far2*near2;camera.projectionMatrix.makePerspective(left2,right2,top2,bottom2,near2,far2),camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert()}}function updateCamera(camera,parent){parent===null?camera.matrixWorld.copy(camera.matrix):camera.matrixWorld.multiplyMatrices(parent.matrixWorld,camera.matrix),camera.matrixWorldInverse.copy(camera.matrixWorld).invert()}this.updateCamera=function(camera){if(session===null)return;let depthNear=camera.near,depthFar=camera.far;depthSensing.texture!==null&&(depthSensing.depthNear>0&&(depthNear=depthSensing.depthNear),depthSensing.depthFar>0&&(depthFar=depthSensing.depthFar)),cameraXR.near=cameraR.near=cameraL.near=depthNear,cameraXR.far=cameraR.far=cameraL.far=depthFar,(_currentDepthNear!==cameraXR.near||_currentDepthFar!==cameraXR.far)&&(session.updateRenderState({depthNear:cameraXR.near,depthFar:cameraXR.far}),_currentDepthNear=cameraXR.near,_currentDepthFar=cameraXR.far),cameraL.layers.mask=camera.layers.mask|2,cameraR.layers.mask=camera.layers.mask|4,cameraXR.layers.mask=cameraL.layers.mask|cameraR.layers.mask;let parent=camera.parent,cameras$1=cameraXR.cameras;updateCamera(cameraXR,parent);for(let i$1=0;i$10&&(uniforms.alphaTest.value=material.alphaTest);let materialProperties=properties.get(material),envMap=materialProperties.envMap,envMapRotation=materialProperties.envMapRotation;envMap&&(uniforms.envMap.value=envMap,_e1.copy(envMapRotation),_e1.x*=-1,_e1.y*=-1,_e1.z*=-1,envMap.isCubeTexture&&envMap.isRenderTargetTexture===!1&&(_e1.y*=-1,_e1.z*=-1),uniforms.envMapRotation.value.setFromMatrix4(_m1.makeRotationFromEuler(_e1)),uniforms.flipEnvMap.value=envMap.isCubeTexture&&envMap.isRenderTargetTexture===!1?-1:1,uniforms.reflectivity.value=material.reflectivity,uniforms.ior.value=material.ior,uniforms.refractionRatio.value=material.refractionRatio),material.lightMap&&(uniforms.lightMap.value=material.lightMap,uniforms.lightMapIntensity.value=material.lightMapIntensity,refreshTransformUniform(material.lightMap,uniforms.lightMapTransform)),material.aoMap&&(uniforms.aoMap.value=material.aoMap,uniforms.aoMapIntensity.value=material.aoMapIntensity,refreshTransformUniform(material.aoMap,uniforms.aoMapTransform))}function refreshUniformsLine(uniforms,material){uniforms.diffuse.value.copy(material.color),uniforms.opacity.value=material.opacity,material.map&&(uniforms.map.value=material.map,refreshTransformUniform(material.map,uniforms.mapTransform))}function refreshUniformsDash(uniforms,material){uniforms.dashSize.value=material.dashSize,uniforms.totalSize.value=material.dashSize+material.gapSize,uniforms.scale.value=material.scale}function refreshUniformsPoints(uniforms,material,pixelRatio,height){uniforms.diffuse.value.copy(material.color),uniforms.opacity.value=material.opacity,uniforms.size.value=material.size*pixelRatio,uniforms.scale.value=height*.5,material.map&&(uniforms.map.value=material.map,refreshTransformUniform(material.map,uniforms.uvTransform)),material.alphaMap&&(uniforms.alphaMap.value=material.alphaMap,refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)),material.alphaTest>0&&(uniforms.alphaTest.value=material.alphaTest)}function refreshUniformsSprites(uniforms,material){uniforms.diffuse.value.copy(material.color),uniforms.opacity.value=material.opacity,uniforms.rotation.value=material.rotation,material.map&&(uniforms.map.value=material.map,refreshTransformUniform(material.map,uniforms.mapTransform)),material.alphaMap&&(uniforms.alphaMap.value=material.alphaMap,refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)),material.alphaTest>0&&(uniforms.alphaTest.value=material.alphaTest)}function refreshUniformsPhong(uniforms,material){uniforms.specular.value.copy(material.specular),uniforms.shininess.value=Math.max(material.shininess,1e-4)}function refreshUniformsToon(uniforms,material){material.gradientMap&&(uniforms.gradientMap.value=material.gradientMap)}function refreshUniformsStandard(uniforms,material){uniforms.metalness.value=material.metalness,material.metalnessMap&&(uniforms.metalnessMap.value=material.metalnessMap,refreshTransformUniform(material.metalnessMap,uniforms.metalnessMapTransform)),uniforms.roughness.value=material.roughness,material.roughnessMap&&(uniforms.roughnessMap.value=material.roughnessMap,refreshTransformUniform(material.roughnessMap,uniforms.roughnessMapTransform)),material.envMap&&(uniforms.envMapIntensity.value=material.envMapIntensity)}function refreshUniformsPhysical(uniforms,material,transmissionRenderTarget){uniforms.ior.value=material.ior,material.sheen>0&&(uniforms.sheenColor.value.copy(material.sheenColor).multiplyScalar(material.sheen),uniforms.sheenRoughness.value=material.sheenRoughness,material.sheenColorMap&&(uniforms.sheenColorMap.value=material.sheenColorMap,refreshTransformUniform(material.sheenColorMap,uniforms.sheenColorMapTransform)),material.sheenRoughnessMap&&(uniforms.sheenRoughnessMap.value=material.sheenRoughnessMap,refreshTransformUniform(material.sheenRoughnessMap,uniforms.sheenRoughnessMapTransform))),material.clearcoat>0&&(uniforms.clearcoat.value=material.clearcoat,uniforms.clearcoatRoughness.value=material.clearcoatRoughness,material.clearcoatMap&&(uniforms.clearcoatMap.value=material.clearcoatMap,refreshTransformUniform(material.clearcoatMap,uniforms.clearcoatMapTransform)),material.clearcoatRoughnessMap&&(uniforms.clearcoatRoughnessMap.value=material.clearcoatRoughnessMap,refreshTransformUniform(material.clearcoatRoughnessMap,uniforms.clearcoatRoughnessMapTransform)),material.clearcoatNormalMap&&(uniforms.clearcoatNormalMap.value=material.clearcoatNormalMap,refreshTransformUniform(material.clearcoatNormalMap,uniforms.clearcoatNormalMapTransform),uniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale),material.side===BackSide&&uniforms.clearcoatNormalScale.value.negate())),material.dispersion>0&&(uniforms.dispersion.value=material.dispersion),material.iridescence>0&&(uniforms.iridescence.value=material.iridescence,uniforms.iridescenceIOR.value=material.iridescenceIOR,uniforms.iridescenceThicknessMinimum.value=material.iridescenceThicknessRange[0],uniforms.iridescenceThicknessMaximum.value=material.iridescenceThicknessRange[1],material.iridescenceMap&&(uniforms.iridescenceMap.value=material.iridescenceMap,refreshTransformUniform(material.iridescenceMap,uniforms.iridescenceMapTransform)),material.iridescenceThicknessMap&&(uniforms.iridescenceThicknessMap.value=material.iridescenceThicknessMap,refreshTransformUniform(material.iridescenceThicknessMap,uniforms.iridescenceThicknessMapTransform))),material.transmission>0&&(uniforms.transmission.value=material.transmission,uniforms.transmissionSamplerMap.value=transmissionRenderTarget.texture,uniforms.transmissionSamplerSize.value.set(transmissionRenderTarget.width,transmissionRenderTarget.height),material.transmissionMap&&(uniforms.transmissionMap.value=material.transmissionMap,refreshTransformUniform(material.transmissionMap,uniforms.transmissionMapTransform)),uniforms.thickness.value=material.thickness,material.thicknessMap&&(uniforms.thicknessMap.value=material.thicknessMap,refreshTransformUniform(material.thicknessMap,uniforms.thicknessMapTransform)),uniforms.attenuationDistance.value=material.attenuationDistance,uniforms.attenuationColor.value.copy(material.attenuationColor)),material.anisotropy>0&&(uniforms.anisotropyVector.value.set(material.anisotropy*Math.cos(material.anisotropyRotation),material.anisotropy*Math.sin(material.anisotropyRotation)),material.anisotropyMap&&(uniforms.anisotropyMap.value=material.anisotropyMap,refreshTransformUniform(material.anisotropyMap,uniforms.anisotropyMapTransform))),uniforms.specularIntensity.value=material.specularIntensity,uniforms.specularColor.value.copy(material.specularColor),material.specularColorMap&&(uniforms.specularColorMap.value=material.specularColorMap,refreshTransformUniform(material.specularColorMap,uniforms.specularColorMapTransform)),material.specularIntensityMap&&(uniforms.specularIntensityMap.value=material.specularIntensityMap,refreshTransformUniform(material.specularIntensityMap,uniforms.specularIntensityMapTransform))}function refreshUniformsMatcap(uniforms,material){material.matcap&&(uniforms.matcap.value=material.matcap)}function refreshUniformsDistance(uniforms,material){let light=properties.get(material).light;uniforms.referencePosition.value.setFromMatrixPosition(light.matrixWorld),uniforms.nearDistance.value=light.shadow.camera.near,uniforms.farDistance.value=light.shadow.camera.far}return{refreshFogUniforms,refreshMaterialUniforms}}function WebGLUniformsGroups(gl,info,capabilities,state){let buffers={},updateList={},allocatedBindingPoints=[],maxBindingPoints=gl.getParameter(gl.MAX_UNIFORM_BUFFER_BINDINGS);function bind(uniformsGroup,program){let webglProgram=program.program;state.uniformBlockBinding(uniformsGroup,webglProgram)}function update(uniformsGroup,program){let buffer$1=buffers[uniformsGroup.id];buffer$1===void 0&&(prepareUniformsGroup(uniformsGroup),buffer$1=createBuffer(uniformsGroup),buffers[uniformsGroup.id]=buffer$1,uniformsGroup.addEventListener(`dispose`,onUniformsGroupsDispose));let webglProgram=program.program;state.updateUBOMapping(uniformsGroup,webglProgram);let frame$1=info.render.frame;updateList[uniformsGroup.id]!==frame$1&&(updateBufferData(uniformsGroup),updateList[uniformsGroup.id]=frame$1)}function createBuffer(uniformsGroup){let bindingPointIndex=allocateBindingPointIndex();uniformsGroup.__bindingPointIndex=bindingPointIndex;let buffer$1=gl.createBuffer(),size$2=uniformsGroup.__size,usage=uniformsGroup.usage;return gl.bindBuffer(gl.UNIFORM_BUFFER,buffer$1),gl.bufferData(gl.UNIFORM_BUFFER,size$2,usage),gl.bindBuffer(gl.UNIFORM_BUFFER,null),gl.bindBufferBase(gl.UNIFORM_BUFFER,bindingPointIndex,buffer$1),buffer$1}function allocateBindingPointIndex(){for(let i$1=0;i$10&&(offset$2+=chunkSize-chunkOffset),uniformsGroup.__size=offset$2,uniformsGroup.__cache={},this}function getUniformSize(value$1){let info$1={boundary:0,storage:0};return typeof value$1==`number`||typeof value$1==`boolean`?(info$1.boundary=4,info$1.storage=4):value$1.isVector2?(info$1.boundary=8,info$1.storage=8):value$1.isVector3||value$1.isColor?(info$1.boundary=16,info$1.storage=12):value$1.isVector4?(info$1.boundary=16,info$1.storage=16):value$1.isMatrix3?(info$1.boundary=48,info$1.storage=48):value$1.isMatrix4?(info$1.boundary=64,info$1.storage=64):value$1.isTexture?console.warn(`THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.`):console.warn(`THREE.WebGLRenderer: Unsupported uniform value type.`,value$1),info$1}function onUniformsGroupsDispose(event){let uniformsGroup=event.target;uniformsGroup.removeEventListener(`dispose`,onUniformsGroupsDispose);let index$1=allocatedBindingPoints.indexOf(uniformsGroup.__bindingPointIndex);allocatedBindingPoints.splice(index$1,1),gl.deleteBuffer(buffers[uniformsGroup.id]),delete buffers[uniformsGroup.id],delete updateList[uniformsGroup.id]}function dispose$1(){for(let id$1 in buffers)gl.deleteBuffer(buffers[id$1]);allocatedBindingPoints=[],buffers={},updateList={}}return{bind,update,dispose:dispose$1}}var WebGLRenderer=class{constructor(parameters={}){let{canvas=createCanvasElement(),context:context$1=null,depth=!0,stencil=!1,alpha:alpha$1=!1,antialias=!1,premultipliedAlpha=!0,preserveDrawingBuffer=!1,powerPreference=`default`,failIfMajorPerformanceCaveat=!1,reverseDepthBuffer=!1}=parameters;this.isWebGLRenderer=!0;let _alpha;if(context$1!==null){if(typeof WebGLRenderingContext<`u`&&context$1 instanceof WebGLRenderingContext)throw Error(`THREE.WebGLRenderer: WebGL 1 is not supported since r163.`);_alpha=context$1.getContextAttributes().alpha}else _alpha=alpha$1;let uintClearColor=new Uint32Array(4),intClearColor=new Int32Array(4),currentRenderList=null,currentRenderState=null,renderListStack=[],renderStateStack=[];this.domElement=canvas,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=NoToneMapping,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let _this=this,_isContextLost=!1;this._outputColorSpace=SRGBColorSpace;let _currentActiveCubeFace=0,_currentActiveMipmapLevel=0,_currentRenderTarget=null,_currentMaterialId=-1,_currentCamera=null,_currentViewport=new Vector4,_currentScissor=new Vector4,_currentScissorTest=null,_currentClearColor=new Color(0),_currentClearAlpha=0,_width=canvas.width,_height=canvas.height,_pixelRatio=1,_opaqueSort=null,_transparentSort=null,_viewport=new Vector4(0,0,_width,_height),_scissor=new Vector4(0,0,_width,_height),_scissorTest=!1,_frustum$2=new Frustum,_clippingEnabled=!1,_localClippingEnabled=!1,_currentProjectionMatrix=new Matrix4,_projScreenMatrix$3=new Matrix4,_vector3$1=new Vector3,_vector4=new Vector4,_emptyScene={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},_renderBackground=!1;function getTargetPixelRatio(){return _currentRenderTarget===null?_pixelRatio:1}let _gl=context$1;function getContext$1(contextName,contextAttributes){return canvas.getContext(contextName,contextAttributes)}try{let contextAttributes={alpha:!0,depth,stencil,antialias,premultipliedAlpha,preserveDrawingBuffer,powerPreference,failIfMajorPerformanceCaveat};if(`setAttribute`in canvas&&canvas.setAttribute(`data-engine`,`three.js r${REVISION}`),canvas.addEventListener(`webglcontextlost`,onContextLost,!1),canvas.addEventListener(`webglcontextrestored`,onContextRestore,!1),canvas.addEventListener(`webglcontextcreationerror`,onContextCreationError,!1),_gl===null){let contextName=`webgl2`;if(_gl=getContext$1(contextName,contextAttributes),_gl===null)throw getContext$1(contextName)?Error(`Error creating WebGL context with your selected attributes.`):Error(`Error creating WebGL context.`)}}catch(error){throw console.error(`THREE.WebGLRenderer: `+error.message),error}let extensions,capabilities,state,info,properties,textures,cubemaps,cubeuvmaps,attributes,geometries,objects,programCache,materials,renderLists,renderStates,clipping,shadowMap,background,morphtargets,bufferRenderer,indexedBufferRenderer,utils,bindingStates,uniformsGroups;function initGLContext(){extensions=new WebGLExtensions(_gl),extensions.init(),utils=new WebGLUtils(_gl,extensions),capabilities=new WebGLCapabilities(_gl,extensions,parameters,utils),state=new WebGLState(_gl,extensions),capabilities.reverseDepthBuffer&&reverseDepthBuffer&&state.buffers.depth.setReversed(!0),info=new WebGLInfo(_gl),properties=new WebGLProperties,textures=new WebGLTextures(_gl,extensions,state,properties,capabilities,utils,info),cubemaps=new WebGLCubeMaps(_this),cubeuvmaps=new WebGLCubeUVMaps(_this),attributes=new WebGLAttributes(_gl),bindingStates=new WebGLBindingStates(_gl,attributes),geometries=new WebGLGeometries(_gl,attributes,info,bindingStates),objects=new WebGLObjects(_gl,geometries,attributes,info),morphtargets=new WebGLMorphtargets(_gl,capabilities,textures),clipping=new WebGLClipping(properties),programCache=new WebGLPrograms(_this,cubemaps,cubeuvmaps,extensions,capabilities,bindingStates,clipping),materials=new WebGLMaterials(_this,properties),renderLists=new WebGLRenderLists,renderStates=new WebGLRenderStates(extensions),background=new WebGLBackground(_this,cubemaps,cubeuvmaps,state,objects,_alpha,premultipliedAlpha),shadowMap=new WebGLShadowMap(_this,objects,capabilities),uniformsGroups=new WebGLUniformsGroups(_gl,info,capabilities,state),bufferRenderer=new WebGLBufferRenderer(_gl,extensions,info),indexedBufferRenderer=new WebGLIndexedBufferRenderer(_gl,extensions,info),info.programs=programCache.programs,_this.capabilities=capabilities,_this.extensions=extensions,_this.properties=properties,_this.renderLists=renderLists,_this.shadowMap=shadowMap,_this.state=state,_this.info=info}initGLContext();let xr$1=new WebXRManager(_this,_gl);this.xr=xr$1,this.getContext=function(){return _gl},this.getContextAttributes=function(){return _gl.getContextAttributes()},this.forceContextLoss=function(){let extension$1=extensions.get(`WEBGL_lose_context`);extension$1&&extension$1.loseContext()},this.forceContextRestore=function(){let extension$1=extensions.get(`WEBGL_lose_context`);extension$1&&extension$1.restoreContext()},this.getPixelRatio=function(){return _pixelRatio},this.setPixelRatio=function(value$1){value$1!==void 0&&(_pixelRatio=value$1,this.setSize(_width,_height,!1))},this.getSize=function(target$1){return target$1.set(_width,_height)},this.setSize=function(width,height,updateStyle=!0){if(xr$1.isPresenting){console.warn(`THREE.WebGLRenderer: Can't change size while VR device is presenting.`);return}_width=width,_height=height,canvas.width=Math.floor(width*_pixelRatio),canvas.height=Math.floor(height*_pixelRatio),updateStyle===!0&&(canvas.style.width=width+`px`,canvas.style.height=height+`px`),this.setViewport(0,0,width,height)},this.getDrawingBufferSize=function(target$1){return target$1.set(_width*_pixelRatio,_height*_pixelRatio).floor()},this.setDrawingBufferSize=function(width,height,pixelRatio){_width=width,_height=height,_pixelRatio=pixelRatio,canvas.width=Math.floor(width*pixelRatio),canvas.height=Math.floor(height*pixelRatio),this.setViewport(0,0,width,height)},this.getCurrentViewport=function(target$1){return target$1.copy(_currentViewport)},this.getViewport=function(target$1){return target$1.copy(_viewport)},this.setViewport=function(x$3,y$3,width,height){x$3.isVector4?_viewport.set(x$3.x,x$3.y,x$3.z,x$3.w):_viewport.set(x$3,y$3,width,height),state.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).round())},this.getScissor=function(target$1){return target$1.copy(_scissor)},this.setScissor=function(x$3,y$3,width,height){x$3.isVector4?_scissor.set(x$3.x,x$3.y,x$3.z,x$3.w):_scissor.set(x$3,y$3,width,height),state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).round())},this.getScissorTest=function(){return _scissorTest},this.setScissorTest=function(boolean$1){state.setScissorTest(_scissorTest=boolean$1)},this.setOpaqueSort=function(method){_opaqueSort=method},this.setTransparentSort=function(method){_transparentSort=method},this.getClearColor=function(target$1){return target$1.copy(background.getClearColor())},this.setClearColor=function(){background.setClearColor(...arguments)},this.getClearAlpha=function(){return background.getClearAlpha()},this.setClearAlpha=function(){background.setClearAlpha(...arguments)},this.clear=function(color$2=!0,depth$1=!0,stencil$1=!0){let bits=0;if(color$2){let isIntegerFormat=!1;if(_currentRenderTarget!==null){let targetFormat=_currentRenderTarget.texture.format;isIntegerFormat=targetFormat===RGBAIntegerFormat||targetFormat===RGIntegerFormat||targetFormat===RedIntegerFormat}if(isIntegerFormat){let targetType=_currentRenderTarget.texture.type,isUnsignedType=targetType===UnsignedByteType||targetType===UnsignedIntType||targetType===UnsignedShortType||targetType===UnsignedInt248Type||targetType===UnsignedShort4444Type||targetType===UnsignedShort5551Type,clearColor=background.getClearColor(),a$2=background.getClearAlpha(),r$2=clearColor.r,g$2=clearColor.g,b$4=clearColor.b;isUnsignedType?(uintClearColor[0]=r$2,uintClearColor[1]=g$2,uintClearColor[2]=b$4,uintClearColor[3]=a$2,_gl.clearBufferuiv(_gl.COLOR,0,uintClearColor)):(intClearColor[0]=r$2,intClearColor[1]=g$2,intClearColor[2]=b$4,intClearColor[3]=a$2,_gl.clearBufferiv(_gl.COLOR,0,intClearColor))}else bits|=_gl.COLOR_BUFFER_BIT}depth$1&&(bits|=_gl.DEPTH_BUFFER_BIT),stencil$1&&(bits|=_gl.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),_gl.clear(bits)},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(){canvas.removeEventListener(`webglcontextlost`,onContextLost,!1),canvas.removeEventListener(`webglcontextrestored`,onContextRestore,!1),canvas.removeEventListener(`webglcontextcreationerror`,onContextCreationError,!1),background.dispose(),renderLists.dispose(),renderStates.dispose(),properties.dispose(),cubemaps.dispose(),cubeuvmaps.dispose(),objects.dispose(),bindingStates.dispose(),uniformsGroups.dispose(),programCache.dispose(),xr$1.dispose(),xr$1.removeEventListener(`sessionstart`,onXRSessionStart),xr$1.removeEventListener(`sessionend`,onXRSessionEnd),animation.stop()};function onContextLost(event){event.preventDefault(),console.log(`THREE.WebGLRenderer: Context Lost.`),_isContextLost=!0}function onContextRestore(){console.log(`THREE.WebGLRenderer: Context Restored.`),_isContextLost=!1;let infoAutoReset=info.autoReset,shadowMapEnabled=shadowMap.enabled,shadowMapAutoUpdate=shadowMap.autoUpdate,shadowMapNeedsUpdate=shadowMap.needsUpdate,shadowMapType=shadowMap.type;initGLContext(),info.autoReset=infoAutoReset,shadowMap.enabled=shadowMapEnabled,shadowMap.autoUpdate=shadowMapAutoUpdate,shadowMap.needsUpdate=shadowMapNeedsUpdate,shadowMap.type=shadowMapType}function onContextCreationError(event){console.error(`THREE.WebGLRenderer: A WebGL context could not be created. Reason: `,event.statusMessage)}function onMaterialDispose(event){let material=event.target;material.removeEventListener(`dispose`,onMaterialDispose),deallocateMaterial(material)}function deallocateMaterial(material){releaseMaterialProgramReferences(material),properties.remove(material)}function releaseMaterialProgramReferences(material){let programs=properties.get(material).programs;programs!==void 0&&(programs.forEach(function(program){programCache.releaseProgram(program)}),material.isShaderMaterial&&programCache.releaseShaderCache(material))}this.renderBufferDirect=function(camera,scene,geometry,material,object,group){scene===null&&(scene=_emptyScene);let frontFaceCW=object.isMesh&&object.matrixWorld.determinant()<0,program=setProgram(camera,scene,geometry,material,object);state.setMaterial(material,frontFaceCW);let index$1=geometry.index,rangeFactor=1;if(material.wireframe===!0){if(index$1=geometries.getWireframeAttribute(geometry),index$1===void 0)return;rangeFactor=2}let drawRange=geometry.drawRange,position$2=geometry.attributes.position,drawStart=drawRange.start*rangeFactor,drawEnd=(drawRange.start+drawRange.count)*rangeFactor;group!==null&&(drawStart=Math.max(drawStart,group.start*rangeFactor),drawEnd=Math.min(drawEnd,(group.start+group.count)*rangeFactor)),index$1===null?position$2!=null&&(drawStart=Math.max(drawStart,0),drawEnd=Math.min(drawEnd,position$2.count)):(drawStart=Math.max(drawStart,0),drawEnd=Math.min(drawEnd,index$1.count));let drawCount=drawEnd-drawStart;if(drawCount<0||drawCount===1/0)return;bindingStates.setup(object,material,program,geometry,index$1);let attribute,renderer$1=bufferRenderer;if(index$1!==null&&(attribute=attributes.get(index$1),renderer$1=indexedBufferRenderer,renderer$1.setIndex(attribute)),object.isMesh)material.wireframe===!0?(state.setLineWidth(material.wireframeLinewidth*getTargetPixelRatio()),renderer$1.setMode(_gl.LINES)):renderer$1.setMode(_gl.TRIANGLES);else if(object.isLine){let lineWidth=material.linewidth;lineWidth===void 0&&(lineWidth=1),state.setLineWidth(lineWidth*getTargetPixelRatio()),object.isLineSegments?renderer$1.setMode(_gl.LINES):object.isLineLoop?renderer$1.setMode(_gl.LINE_LOOP):renderer$1.setMode(_gl.LINE_STRIP)}else object.isPoints?renderer$1.setMode(_gl.POINTS):object.isSprite&&renderer$1.setMode(_gl.TRIANGLES);if(object.isBatchedMesh)if(object._multiDrawInstances!==null)warnOnce$1(`THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.`),renderer$1.renderMultiDrawInstances(object._multiDrawStarts,object._multiDrawCounts,object._multiDrawCount,object._multiDrawInstances);else if(extensions.get(`WEBGL_multi_draw`))renderer$1.renderMultiDraw(object._multiDrawStarts,object._multiDrawCounts,object._multiDrawCount);else{let starts=object._multiDrawStarts,counts=object._multiDrawCounts,drawCount$1=object._multiDrawCount,bytesPerElement=index$1?attributes.get(index$1).bytesPerElement:1,uniforms=properties.get(material).currentProgram.getUniforms();for(let i$1=0;i$1{function checkMaterialsReady(){if(materials$1.forEach(function(material){let materialProperties=properties.get(material),program=materialProperties.currentProgram;program.isReady()&&materials$1.delete(material)}),materials$1.size===0){resolve$1(scene);return}setTimeout(checkMaterialsReady,10)}extensions.get(`KHR_parallel_shader_compile`)===null?setTimeout(checkMaterialsReady,10):checkMaterialsReady()})};let onAnimationFrameCallback=null;function onAnimationFrame(time){onAnimationFrameCallback&&onAnimationFrameCallback(time)}function onXRSessionStart(){animation.stop()}function onXRSessionEnd(){animation.start()}let animation=new WebGLAnimation;animation.setAnimationLoop(onAnimationFrame),typeof self<`u`&&animation.setContext(self),this.setAnimationLoop=function(callback){onAnimationFrameCallback=callback,xr$1.setAnimationLoop(callback),callback===null?animation.stop():animation.start()},xr$1.addEventListener(`sessionstart`,onXRSessionStart),xr$1.addEventListener(`sessionend`,onXRSessionEnd),this.render=function(scene,camera){if(camera!==void 0&&camera.isCamera!==!0){console.error(`THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.`);return}if(_isContextLost===!0)return;if(scene.matrixWorldAutoUpdate===!0&&scene.updateMatrixWorld(),camera.parent===null&&camera.matrixWorldAutoUpdate===!0&&camera.updateMatrixWorld(),xr$1.enabled===!0&&xr$1.isPresenting===!0&&(xr$1.cameraAutoUpdate===!0&&xr$1.updateCamera(camera),camera=xr$1.getCamera()),scene.isScene===!0&&scene.onBeforeRender(_this,scene,camera,_currentRenderTarget),currentRenderState=renderStates.get(scene,renderStateStack.length),currentRenderState.init(camera),renderStateStack.push(currentRenderState),_projScreenMatrix$3.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse),_frustum$2.setFromProjectionMatrix(_projScreenMatrix$3),_localClippingEnabled=this.localClippingEnabled,_clippingEnabled=clipping.init(this.clippingPlanes,_localClippingEnabled),currentRenderList=renderLists.get(scene,renderListStack.length),currentRenderList.init(),renderListStack.push(currentRenderList),xr$1.enabled===!0&&xr$1.isPresenting===!0){let depthSensingMesh=_this.xr.getDepthSensingMesh();depthSensingMesh!==null&&projectObject(depthSensingMesh,camera,-1/0,_this.sortObjects)}projectObject(scene,camera,0,_this.sortObjects),currentRenderList.finish(),_this.sortObjects===!0&¤tRenderList.sort(_opaqueSort,_transparentSort),_renderBackground=xr$1.enabled===!1||xr$1.isPresenting===!1||xr$1.hasDepthSensing()===!1,_renderBackground&&background.addToRenderList(currentRenderList,scene),this.info.render.frame++,_clippingEnabled===!0&&clipping.beginShadows();let shadowsArray=currentRenderState.state.shadowsArray;shadowMap.render(shadowsArray,scene,camera),_clippingEnabled===!0&&clipping.endShadows(),this.info.autoReset===!0&&this.info.reset();let opaqueObjects=currentRenderList.opaque,transmissiveObjects=currentRenderList.transmissive;if(currentRenderState.setupLights(),camera.isArrayCamera){let cameras=camera.cameras;if(transmissiveObjects.length>0)for(let i$1=0,l$1=cameras.length;i$10&&renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera),_renderBackground&&background.render(scene),renderScene(currentRenderList,scene,camera);_currentRenderTarget!==null&&_currentActiveMipmapLevel===0&&(textures.updateMultisampleRenderTarget(_currentRenderTarget),textures.updateRenderTargetMipmap(_currentRenderTarget)),scene.isScene===!0&&scene.onAfterRender(_this,scene,camera),bindingStates.resetDefaultState(),_currentMaterialId=-1,_currentCamera=null,renderStateStack.pop(),renderStateStack.length>0?(currentRenderState=renderStateStack[renderStateStack.length-1],_clippingEnabled===!0&&clipping.setGlobalState(_this.clippingPlanes,currentRenderState.state.camera)):currentRenderState=null,renderListStack.pop(),currentRenderList=renderListStack.length>0?renderListStack[renderListStack.length-1]:null};function projectObject(object,camera,groupOrder,sortObjects){if(object.visible===!1)return;let visible=object.layers.test(camera.layers);if(visible){if(object.isGroup)groupOrder=object.renderOrder;else if(object.isLOD)object.autoUpdate===!0&&object.update(camera);else if(object.isLight)currentRenderState.pushLight(object),object.castShadow&¤tRenderState.pushShadow(object);else if(object.isSprite){if(!object.frustumCulled||_frustum$2.intersectsSprite(object)){sortObjects&&_vector4.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix$3);let geometry=objects.update(object),material=object.material;material.visible&¤tRenderList.push(object,geometry,material,groupOrder,_vector4.z,null)}}else if((object.isMesh||object.isLine||object.isPoints)&&(!object.frustumCulled||_frustum$2.intersectsObject(object))){let geometry=objects.update(object),material=object.material;if(sortObjects&&(object.boundingSphere===void 0?(geometry.boundingSphere===null&&geometry.computeBoundingSphere(),_vector4.copy(geometry.boundingSphere.center)):(object.boundingSphere===null&&object.computeBoundingSphere(),_vector4.copy(object.boundingSphere.center)),_vector4.applyMatrix4(object.matrixWorld).applyMatrix4(_projScreenMatrix$3)),Array.isArray(material)){let groups=geometry.groups;for(let i$1=0,l$1=groups.length;i$10&&renderObjects(opaqueObjects,scene,camera),transmissiveObjects.length>0&&renderObjects(transmissiveObjects,scene,camera),transparentObjects.length>0&&renderObjects(transparentObjects,scene,camera),state.buffers.depth.setTest(!0),state.buffers.depth.setMask(!0),state.buffers.color.setMask(!0),state.setPolygonOffset(!1)}function renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera){let overrideMaterial=scene.isScene===!0?scene.overrideMaterial:null;if(overrideMaterial!==null)return;currentRenderState.state.transmissionRenderTarget[camera.id]===void 0&&(currentRenderState.state.transmissionRenderTarget[camera.id]=new WebGLRenderTarget(1,1,{generateMipmaps:!0,type:extensions.has(`EXT_color_buffer_half_float`)||extensions.has(`EXT_color_buffer_float`)?HalfFloatType:UnsignedByteType,minFilter:LinearMipmapLinearFilter,samples:4,stencilBuffer:stencil,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ColorManagement.workingColorSpace}));let transmissionRenderTarget=currentRenderState.state.transmissionRenderTarget[camera.id],activeViewport=camera.viewport||_currentViewport;transmissionRenderTarget.setSize(activeViewport.z*_this.transmissionResolutionScale,activeViewport.w*_this.transmissionResolutionScale);let currentRenderTarget=_this.getRenderTarget(),currentActiveCubeFace=_this.getActiveCubeFace(),currentActiveMipmapLevel=_this.getActiveMipmapLevel();_this.setRenderTarget(transmissionRenderTarget),_this.getClearColor(_currentClearColor),_currentClearAlpha=_this.getClearAlpha(),_currentClearAlpha<1&&_this.setClearColor(16777215,.5),_this.clear(),_renderBackground&&background.render(scene);let currentToneMapping=_this.toneMapping;_this.toneMapping=NoToneMapping;let currentCameraViewport=camera.viewport;if(camera.viewport!==void 0&&(camera.viewport=void 0),currentRenderState.setupLightsView(camera),_clippingEnabled===!0&&clipping.setGlobalState(_this.clippingPlanes,camera),renderObjects(opaqueObjects,scene,camera),textures.updateMultisampleRenderTarget(transmissionRenderTarget),textures.updateRenderTargetMipmap(transmissionRenderTarget),extensions.has(`WEBGL_multisampled_render_to_texture`)===!1){let renderTargetNeedsUpdate=!1;for(let i$1=0,l$1=transmissiveObjects.length;i$10),morphTargets=!!geometry.morphAttributes.position,morphNormals=!!geometry.morphAttributes.normal,morphColors=!!geometry.morphAttributes.color,toneMapping=NoToneMapping;material.toneMapped&&(_currentRenderTarget===null||_currentRenderTarget.isXRRenderTarget===!0)&&(toneMapping=_this.toneMapping);let morphAttribute=geometry.morphAttributes.position||geometry.morphAttributes.normal||geometry.morphAttributes.color,morphTargetsCount=morphAttribute===void 0?0:morphAttribute.length,materialProperties=properties.get(material),lights=currentRenderState.state.lights;if(_clippingEnabled===!0&&(_localClippingEnabled===!0||camera!==_currentCamera)){let useCache=camera===_currentCamera&&material.id===_currentMaterialId;clipping.setState(material,camera,useCache)}let needsProgramChange=!1;material.version===materialProperties.__version?materialProperties.needsLights&&materialProperties.lightsStateVersion!==lights.state.version?needsProgramChange=!0:materialProperties.outputColorSpace===colorSpace?object.isBatchedMesh&&materialProperties.batching===!1||!object.isBatchedMesh&&materialProperties.batching===!0||object.isBatchedMesh&&materialProperties.batchingColor===!0&&object.colorTexture===null||object.isBatchedMesh&&materialProperties.batchingColor===!1&&object.colorTexture!==null||object.isInstancedMesh&&materialProperties.instancing===!1||!object.isInstancedMesh&&materialProperties.instancing===!0||object.isSkinnedMesh&&materialProperties.skinning===!1||!object.isSkinnedMesh&&materialProperties.skinning===!0||object.isInstancedMesh&&materialProperties.instancingColor===!0&&object.instanceColor===null||object.isInstancedMesh&&materialProperties.instancingColor===!1&&object.instanceColor!==null||object.isInstancedMesh&&materialProperties.instancingMorph===!0&&object.morphTexture===null||object.isInstancedMesh&&materialProperties.instancingMorph===!1&&object.morphTexture!==null?needsProgramChange=!0:materialProperties.envMap===envMap?material.fog===!0&&materialProperties.fog!==fog||materialProperties.numClippingPlanes!==void 0&&(materialProperties.numClippingPlanes!==clipping.numPlanes||materialProperties.numIntersection!==clipping.numIntersection)?needsProgramChange=!0:materialProperties.vertexAlphas===vertexAlphas&&materialProperties.vertexTangents===vertexTangents&&materialProperties.morphTargets===morphTargets&&materialProperties.morphNormals===morphNormals&&materialProperties.morphColors===morphColors&&materialProperties.toneMapping===toneMapping?materialProperties.morphTargetsCount!==morphTargetsCount&&(needsProgramChange=!0):needsProgramChange=!0:needsProgramChange=!0:needsProgramChange=!0:(needsProgramChange=!0,materialProperties.__version=material.version);let program=materialProperties.currentProgram;needsProgramChange===!0&&(program=getProgram(material,scene,object));let refreshProgram=!1,refreshMaterial=!1,refreshLights=!1,p_uniforms=program.getUniforms(),m_uniforms=materialProperties.uniforms;if(state.useProgram(program.program)&&(refreshProgram=!0,refreshMaterial=!0,refreshLights=!0),material.id!==_currentMaterialId&&(_currentMaterialId=material.id,refreshMaterial=!0),refreshProgram||_currentCamera!==camera){let reverseDepthBuffer$1=state.buffers.depth.getReversed();reverseDepthBuffer$1?(_currentProjectionMatrix.copy(camera.projectionMatrix),toNormalizedProjectionMatrix(_currentProjectionMatrix),toReversedProjectionMatrix(_currentProjectionMatrix),p_uniforms.setValue(_gl,`projectionMatrix`,_currentProjectionMatrix)):p_uniforms.setValue(_gl,`projectionMatrix`,camera.projectionMatrix),p_uniforms.setValue(_gl,`viewMatrix`,camera.matrixWorldInverse);let uCamPos=p_uniforms.map.cameraPosition;uCamPos!==void 0&&uCamPos.setValue(_gl,_vector3$1.setFromMatrixPosition(camera.matrixWorld)),capabilities.logarithmicDepthBuffer&&p_uniforms.setValue(_gl,`logDepthBufFC`,2/(Math.log(camera.far+1)/Math.LN2)),(material.isMeshPhongMaterial||material.isMeshToonMaterial||material.isMeshLambertMaterial||material.isMeshBasicMaterial||material.isMeshStandardMaterial||material.isShaderMaterial)&&p_uniforms.setValue(_gl,`isOrthographic`,camera.isOrthographicCamera===!0),_currentCamera!==camera&&(_currentCamera=camera,refreshMaterial=!0,refreshLights=!0)}if(object.isSkinnedMesh){p_uniforms.setOptional(_gl,object,`bindMatrix`),p_uniforms.setOptional(_gl,object,`bindMatrixInverse`);let skeleton=object.skeleton;skeleton&&(skeleton.boneTexture===null&&skeleton.computeBoneTexture(),p_uniforms.setValue(_gl,`boneTexture`,skeleton.boneTexture,textures))}object.isBatchedMesh&&(p_uniforms.setOptional(_gl,object,`batchingTexture`),p_uniforms.setValue(_gl,`batchingTexture`,object._matricesTexture,textures),p_uniforms.setOptional(_gl,object,`batchingIdTexture`),p_uniforms.setValue(_gl,`batchingIdTexture`,object._indirectTexture,textures),p_uniforms.setOptional(_gl,object,`batchingColorTexture`),object._colorsTexture!==null&&p_uniforms.setValue(_gl,`batchingColorTexture`,object._colorsTexture,textures));let morphAttributes=geometry.morphAttributes;if((morphAttributes.position!==void 0||morphAttributes.normal!==void 0||morphAttributes.color!==void 0)&&morphtargets.update(object,geometry,program),(refreshMaterial||materialProperties.receiveShadow!==object.receiveShadow)&&(materialProperties.receiveShadow=object.receiveShadow,p_uniforms.setValue(_gl,`receiveShadow`,object.receiveShadow)),material.isMeshGouraudMaterial&&material.envMap!==null&&(m_uniforms.envMap.value=envMap,m_uniforms.flipEnvMap.value=envMap.isCubeTexture&&envMap.isRenderTargetTexture===!1?-1:1),material.isMeshStandardMaterial&&material.envMap===null&&scene.environment!==null&&(m_uniforms.envMapIntensity.value=scene.environmentIntensity),refreshMaterial&&(p_uniforms.setValue(_gl,`toneMappingExposure`,_this.toneMappingExposure),materialProperties.needsLights&&markUniformsLightsNeedsUpdate(m_uniforms,refreshLights),fog&&material.fog===!0&&materials.refreshFogUniforms(m_uniforms,fog),materials.refreshMaterialUniforms(m_uniforms,material,_pixelRatio,_height,currentRenderState.state.transmissionRenderTarget[camera.id]),WebGLUniforms.upload(_gl,getUniformList(materialProperties),m_uniforms,textures)),material.isShaderMaterial&&material.uniformsNeedUpdate===!0&&(WebGLUniforms.upload(_gl,getUniformList(materialProperties),m_uniforms,textures),material.uniformsNeedUpdate=!1),material.isSpriteMaterial&&p_uniforms.setValue(_gl,`center`,object.center),p_uniforms.setValue(_gl,`modelViewMatrix`,object.modelViewMatrix),p_uniforms.setValue(_gl,`normalMatrix`,object.normalMatrix),p_uniforms.setValue(_gl,`modelMatrix`,object.matrixWorld),material.isShaderMaterial||material.isRawShaderMaterial){let groups=material.uniformsGroups;for(let i$1=0,l$1=groups.length;i$10&&textures.useMultisampledRTT(renderTarget)===!1?properties.get(renderTarget).__webglMultisampledFramebuffer:Array.isArray(__webglFramebuffer)?__webglFramebuffer[activeMipmapLevel]:__webglFramebuffer,_currentViewport.copy(renderTarget.viewport),_currentScissor.copy(renderTarget.scissor),_currentScissorTest=renderTarget.scissorTest}else _currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor(),_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor(),_currentScissorTest=_scissorTest;activeMipmapLevel!==0&&(framebuffer=_scratchFrameBuffer);let framebufferBound=state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(framebufferBound&&useDefaultFramebuffer&&state.drawBuffers(renderTarget,framebuffer),state.viewport(_currentViewport),state.scissor(_currentScissor),state.setScissorTest(_currentScissorTest),isCube){let textureProperties=properties.get(renderTarget.texture);_gl.framebufferTexture2D(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_CUBE_MAP_POSITIVE_X+activeCubeFace,textureProperties.__webglTexture,activeMipmapLevel)}else if(isRenderTarget3D){let textureProperties=properties.get(renderTarget.texture),layer=activeCubeFace;_gl.framebufferTextureLayer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,textureProperties.__webglTexture,activeMipmapLevel,layer)}else if(renderTarget!==null&&activeMipmapLevel!==0){let textureProperties=properties.get(renderTarget.texture);_gl.framebufferTexture2D(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,textureProperties.__webglTexture,activeMipmapLevel)}_currentMaterialId=-1},this.readRenderTargetPixels=function(renderTarget,x$3,y$3,width,height,buffer$1,activeCubeFaceIndex,textureIndex=0){if(!(renderTarget&&renderTarget.isWebGLRenderTarget)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);return}let framebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget&&activeCubeFaceIndex!==void 0&&(framebuffer=framebuffer[activeCubeFaceIndex]),framebuffer){state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);try{let texture=renderTarget.textures[textureIndex],textureFormat=texture.format,textureType=texture.type;if(!capabilities.textureFormatReadable(textureFormat)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.`);return}if(!capabilities.textureTypeReadable(textureType)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.`);return}x$3>=0&&x$3<=renderTarget.width-width&&y$3>=0&&y$3<=renderTarget.height-height&&(renderTarget.textures.length>1&&_gl.readBuffer(_gl.COLOR_ATTACHMENT0+textureIndex),_gl.readPixels(x$3,y$3,width,height,utils.convert(textureFormat),utils.convert(textureType),buffer$1))}finally{let framebuffer$1=_currentRenderTarget===null?null:properties.get(_currentRenderTarget).__webglFramebuffer;state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer$1)}}},this.readRenderTargetPixelsAsync=async function(renderTarget,x$3,y$3,width,height,buffer$1,activeCubeFaceIndex,textureIndex=0){if(!(renderTarget&&renderTarget.isWebGLRenderTarget))throw Error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);let framebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget&&activeCubeFaceIndex!==void 0&&(framebuffer=framebuffer[activeCubeFaceIndex]),framebuffer)if(x$3>=0&&x$3<=renderTarget.width-width&&y$3>=0&&y$3<=renderTarget.height-height){state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);let texture=renderTarget.textures[textureIndex],textureFormat=texture.format,textureType=texture.type;if(!capabilities.textureFormatReadable(textureFormat))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.`);if(!capabilities.textureTypeReadable(textureType))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.`);let glBuffer=_gl.createBuffer();_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer),_gl.bufferData(_gl.PIXEL_PACK_BUFFER,buffer$1.byteLength,_gl.STREAM_READ),renderTarget.textures.length>1&&_gl.readBuffer(_gl.COLOR_ATTACHMENT0+textureIndex),_gl.readPixels(x$3,y$3,width,height,utils.convert(textureFormat),utils.convert(textureType),0);let currFramebuffer=_currentRenderTarget===null?null:properties.get(_currentRenderTarget).__webglFramebuffer;state.bindFramebuffer(_gl.FRAMEBUFFER,currFramebuffer);let sync$1=_gl.fenceSync(_gl.SYNC_GPU_COMMANDS_COMPLETE,0);return _gl.flush(),await probeAsync(_gl,sync$1,4),_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer),_gl.getBufferSubData(_gl.PIXEL_PACK_BUFFER,0,buffer$1),_gl.deleteBuffer(glBuffer),_gl.deleteSync(sync$1),buffer$1}else throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.`)},this.copyFramebufferToTexture=function(texture,position$2=null,level=0){let levelScale=2**-level,width=Math.floor(texture.image.width*levelScale),height=Math.floor(texture.image.height*levelScale),x$3=position$2===null?0:position$2.x,y$3=position$2===null?0:position$2.y;textures.setTexture2D(texture,0),_gl.copyTexSubImage2D(_gl.TEXTURE_2D,level,0,0,x$3,y$3,width,height),state.unbindTexture()};let _srcFramebuffer=_gl.createFramebuffer(),_dstFramebuffer=_gl.createFramebuffer();this.copyTextureToTexture=function(srcTexture,dstTexture,srcRegion=null,dstPosition=null,srcLevel=0,dstLevel=null){dstLevel===null&&(srcLevel===0?dstLevel=0:(warnOnce$1(`WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels.`),dstLevel=srcLevel,srcLevel=0));let width,height,depth$1,minX,minY,minZ,dstX,dstY,dstZ,image$1=srcTexture.isCompressedTexture?srcTexture.mipmaps[dstLevel]:srcTexture.image;if(srcRegion!==null)width=srcRegion.max.x-srcRegion.min.x,height=srcRegion.max.y-srcRegion.min.y,depth$1=srcRegion.isBox3?srcRegion.max.z-srcRegion.min.z:1,minX=srcRegion.min.x,minY=srcRegion.min.y,minZ=srcRegion.isBox3?srcRegion.min.z:0;else{let levelScale=2**-srcLevel;width=Math.floor(image$1.width*levelScale),height=Math.floor(image$1.height*levelScale),depth$1=srcTexture.isDataArrayTexture?image$1.depth:srcTexture.isData3DTexture?Math.floor(image$1.depth*levelScale):1,minX=0,minY=0,minZ=0}dstPosition===null?(dstX=0,dstY=0,dstZ=0):(dstX=dstPosition.x,dstY=dstPosition.y,dstZ=dstPosition.z);let glFormat=utils.convert(dstTexture.format),glType=utils.convert(dstTexture.type),glTarget;dstTexture.isData3DTexture?(textures.setTexture3D(dstTexture,0),glTarget=_gl.TEXTURE_3D):dstTexture.isDataArrayTexture||dstTexture.isCompressedArrayTexture?(textures.setTexture2DArray(dstTexture,0),glTarget=_gl.TEXTURE_2D_ARRAY):(textures.setTexture2D(dstTexture,0),glTarget=_gl.TEXTURE_2D),_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL,dstTexture.flipY),_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,dstTexture.premultiplyAlpha),_gl.pixelStorei(_gl.UNPACK_ALIGNMENT,dstTexture.unpackAlignment);let currentUnpackRowLen=_gl.getParameter(_gl.UNPACK_ROW_LENGTH),currentUnpackImageHeight=_gl.getParameter(_gl.UNPACK_IMAGE_HEIGHT),currentUnpackSkipPixels=_gl.getParameter(_gl.UNPACK_SKIP_PIXELS),currentUnpackSkipRows=_gl.getParameter(_gl.UNPACK_SKIP_ROWS),currentUnpackSkipImages=_gl.getParameter(_gl.UNPACK_SKIP_IMAGES);_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,image$1.width),_gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT,image$1.height),_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,minX),_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,minY),_gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES,minZ);let isSrc3D=srcTexture.isDataArrayTexture||srcTexture.isData3DTexture,isDst3D=dstTexture.isDataArrayTexture||dstTexture.isData3DTexture;if(srcTexture.isDepthTexture){let srcTextureProperties=properties.get(srcTexture),dstTextureProperties=properties.get(dstTexture),srcRenderTargetProperties=properties.get(srcTextureProperties.__renderTarget),dstRenderTargetProperties=properties.get(dstTextureProperties.__renderTarget);state.bindFramebuffer(_gl.READ_FRAMEBUFFER,srcRenderTargetProperties.__webglFramebuffer),state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,dstRenderTargetProperties.__webglFramebuffer);for(let i$1=0;i$1{fns.delete(fn$6)},clear=()=>{fns.clear()},on$2=fn$6=>{fns.add(fn$6);let offFn=()=>off(fn$6);return tryOnScopeDispose$1(offFn),{off:offFn}},trigger$1=(...args)=>Promise.all(Array.from(fns).map(fn$6=>fn$6(...args)));return{on:on$2,off,trigger:trigger$1,clear}}function createGlobalState(stateFactory){let initialized=!1,state,scope=effectScope(!0);return(...args)=>(initialized||(state=scope.run(()=>stateFactory(...args)),initialized=!0),state)}const localProvidedStateMap$1=new WeakMap,injectLocal$1=(...args)=>{var _a$3;let key$1=args[0],instance=(_a$3=getCurrentInstance())?.proxy;if(instance==null&&!hasInjectionContext())throw Error(`injectLocal must be called in setup`);return instance&&localProvidedStateMap$1.has(instance)&&key$1 in localProvidedStateMap$1.get(instance)?localProvidedStateMap$1.get(instance)[key$1]:inject(...args)};function createSharedComposable(composable){let subscribers=0,state,scope,dispose$1=()=>{--subscribers,scope&&subscribers<=0&&(scope.stop(),state=void 0,scope=void 0)};return(...args)=>(subscribers+=1,scope||(scope=effectScope(!0),state=scope.run(()=>composable(...args))),tryOnScopeDispose$1(dispose$1),state)}const isClient$1=typeof window<`u`&&typeof document<`u`,isWorker$1=typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,isDef$1=val=>val!==void 0,notNullish$1=val=>val!=null,toString$3=Object.prototype.toString,isObject$4=val=>toString$3.call(val)===`[object Object]`,noop$3=()=>{},isIOS=getIsIOS();function getIsIOS(){var _a$3,_b;return isClient$1&&(_a$3=window==null?void 0:window.navigator)?.userAgent&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(_b=window==null?void 0:window.navigator)?.maxTouchPoints>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function createFilterWrapper$1(filter$1,fn$6){function wrapper(...args){return new Promise((resolve$1,reject)=>{Promise.resolve(filter$1(()=>fn$6.apply(this,args),{fn:fn$6,thisArg:this,args})).then(resolve$1).catch(reject)})}return wrapper}function debounceFilter$1(ms$1,options$1={}){let timer,maxTimer,lastRejector=noop$3,_clearTimeout=timer2=>{clearTimeout(timer2),lastRejector(),lastRejector=noop$3},lastInvoker,filter$1=invoke$1=>{let duration=toValue$1(ms$1),maxDuration$1=toValue$1(options$1.maxWait);return timer&&_clearTimeout(timer),duration<=0||maxDuration$1!==void 0&&maxDuration$1<=0?(maxTimer&&(_clearTimeout(maxTimer),maxTimer=null),Promise.resolve(invoke$1())):new Promise((resolve$1,reject)=>{lastRejector=options$1.rejectOnCancel?reject:resolve$1,lastInvoker=invoke$1,maxDuration$1&&!maxTimer&&(maxTimer=setTimeout(()=>{timer&&_clearTimeout(timer),maxTimer=null,resolve$1(lastInvoker())},maxDuration$1)),timer=setTimeout(()=>{maxTimer&&_clearTimeout(maxTimer),maxTimer=null,resolve$1(invoke$1())},duration)})};return filter$1}function cacheStringFunction$1(fn$6){let cache$1=Object.create(null);return str=>{let hit=cache$1[str];return hit||(cache$1[str]=fn$6(str))}}const hyphenateRE$1=/\B([A-Z])/g,hyphenate$1=cacheStringFunction$1(str=>str.replace(hyphenateRE$1,`-$1`).toLowerCase()),camelizeRE$1=/-(\w)/g,camelize$2=cacheStringFunction$1(str=>str.replace(camelizeRE$1,(_$2,c$4)=>c$4?c$4.toUpperCase():``));function pxValue$1(px$2){return px$2.endsWith(`rem`)?Number.parseFloat(px$2)*16:Number.parseFloat(px$2)}function objectPick$1(obj,keys$3,omitUndefined=!1){return keys$3.reduce((n$2,k$4)=>(k$4 in obj&&(!omitUndefined||obj[k$4]!==void 0)&&(n$2[k$4]=obj[k$4]),n$2),{})}function getLifeCycleTarget$1(target$1){return target$1||getCurrentInstance()}function toArray$1(value$1){return Array.isArray(value$1)?value$1:[value$1]}function useDebounceFn$1(fn$6,ms$1=200,options$1={}){return createFilterWrapper$1(debounceFilter$1(ms$1,options$1),fn$6)}function refDebounced$1(value$1,ms$1=200,options$1={}){let debounced=ref(value$1.value),updater=useDebounceFn$1(()=>{debounced.value=value$1.value},ms$1,options$1);return watch(value$1,()=>updater()),debounced}function toRefs$2(objectRef,options$1={}){if(!isRef(objectRef))return toRefs(objectRef);let result=Array.isArray(objectRef.value)?Array.from({length:objectRef.value.length}):{};for(let key$1 in objectRef.value)result[key$1]=customRef(()=>({get(){return objectRef.value[key$1]},set(v$2){var _a$3;let replaceRef=(_a$3=toValue$1(options$1.replaceRef))??!0;if(replaceRef)if(Array.isArray(objectRef.value)){let copy=[...objectRef.value];copy[key$1]=v$2,objectRef.value=copy}else{let newObject={...objectRef.value,[key$1]:v$2};Object.setPrototypeOf(newObject,Object.getPrototypeOf(objectRef.value)),objectRef.value=newObject}else objectRef.value[key$1]=v$2}}));return result}const toValue=toValue$1;function tryOnBeforeUnmount(fn$6,target$1){let instance=getLifeCycleTarget$1(target$1);instance&&onBeforeUnmount(fn$6,target$1)}function tryOnMounted$1(fn$6,sync$1=!0,target$1){let instance=getLifeCycleTarget$1();instance?onMounted(fn$6,target$1):sync$1?fn$6():nextTick(fn$6)}function useIntervalFn$1(cb$1,interval=1e3,options$1={}){let{immediate=!0,immediateCallback=!1}=options$1,timer=null,isActive=shallowRef(!1);function clean$3(){timer&&(clearInterval(timer),timer=null)}function pause(){isActive.value=!1,clean$3()}function resume(){let intervalValue=toValue$1(interval);intervalValue<=0||(isActive.value=!0,immediateCallback&&cb$1(),clean$3(),isActive.value&&(timer=setInterval(cb$1,intervalValue)))}if(immediate&&isClient$1&&resume(),isRef(interval)||typeof interval==`function`){let stopWatch=watch(interval,()=>{isActive.value&&isClient$1&&resume()});tryOnScopeDispose$1(stopWatch)}return tryOnScopeDispose$1(pause),{isActive,pause,resume}}function watchImmediate$1(source,cb$1,options$1){return watch(source,cb$1,{...options$1,immediate:!0})}const defaultWindow=isClient$1?window:void 0,defaultDocument$1=isClient$1?window.document:void 0,defaultNavigator$1=isClient$1?window.navigator:void 0,defaultLocation$1=isClient$1?window.location:void 0;function unrefElement(elRef){var _a$3;let plain=toValue$1(elRef);return(_a$3=plain?.$el)??plain}function useEventListener(...args){let cleanups=[],cleanup=()=>{cleanups.forEach(fn$6=>fn$6()),cleanups.length=0},register=(el$1,event,listener,options$1)=>(el$1.addEventListener(event,listener,options$1),()=>el$1.removeEventListener(event,listener,options$1)),firstParamTargets=computed(()=>{let test$1=toArray$1(toValue$1(args[0])).filter(e$3=>e$3!=null);return test$1.every(e$3=>typeof e$3!=`string`)?test$1:void 0}),stopWatch=watchImmediate$1(()=>{var _a$3,_b;return[(_b=(_a$3=firstParamTargets.value)?.map(e$3=>unrefElement(e$3)))??[defaultWindow].filter(e$3=>e$3!=null),toArray$1(toValue$1(firstParamTargets.value?args[1]:args[0])),toArray$1(unref(firstParamTargets.value?args[2]:args[1])),toValue$1(firstParamTargets.value?args[3]:args[2])]},([raw_targets,raw_events,raw_listeners,raw_options])=>{if(cleanup(),!raw_targets?.length||!raw_events?.length||!raw_listeners?.length)return;let optionsClone=isObject$4(raw_options)?{...raw_options}:raw_options;cleanups.push(...raw_targets.flatMap(el$1=>raw_events.flatMap(event=>raw_listeners.map(listener=>register(el$1,event,listener,optionsClone)))))},{flush:`post`}),stop$1=()=>{stopWatch(),cleanup()};return tryOnScopeDispose$1(cleanup),stop$1}function useMounted(){let isMounted=shallowRef(!1),instance=getCurrentInstance();return instance&&onMounted(()=>{isMounted.value=!0},instance),isMounted}function useSupported$1(callback){let isMounted=useMounted();return computed(()=>(isMounted.value,!!callback()))}function useMutationObserver$1(target$1,callback,options$1={}){let{window:window$1=defaultWindow,...mutationOptions}=options$1,observer,isSupported=useSupported$1(()=>window$1&&`MutationObserver`in window$1),cleanup=()=>{observer&&(observer.disconnect(),observer=void 0)},targets=computed(()=>{let value$1=toValue$1(target$1),items=toArray$1(value$1).map(unrefElement).filter(notNullish$1);return new Set(items)}),stopWatch=watch(()=>targets.value,targets2=>{cleanup(),isSupported.value&&targets2.size&&(observer=new MutationObserver(callback),targets2.forEach(el$1=>observer.observe(el$1,mutationOptions)))},{immediate:!0,flush:`post`}),takeRecords=()=>observer?.takeRecords(),stop$1=()=>{stopWatch(),cleanup()};return tryOnScopeDispose$1(stop$1),{isSupported,stop:stop$1,takeRecords}}function createKeyPredicate(keyFilter){return typeof keyFilter==`function`?keyFilter:typeof keyFilter==`string`?event=>event.key===keyFilter:Array.isArray(keyFilter)?event=>keyFilter.includes(event.key):()=>!0}function onKeyStroke(...args){let key$1,handler,options$1={};args.length===3?(key$1=args[0],handler=args[1],options$1=args[2]):args.length===2?typeof args[1]==`object`?(key$1=!0,handler=args[0],options$1=args[1]):(key$1=args[0],handler=args[1]):(key$1=!0,handler=args[0]);let{target:target$1=defaultWindow,eventName=`keydown`,passive=!1,dedupe=!1}=options$1,predicate=createKeyPredicate(key$1),listener=e$3=>{e$3.repeat&&toValue$1(dedupe)||predicate(e$3)&&handler(e$3)};return useEventListener(target$1,eventName,listener,passive)}function useRafFn(fn$6,options$1={}){let{immediate=!0,fpsLimit=void 0,window:window$1=defaultWindow,once=!1}=options$1,isActive=shallowRef(!1),intervalLimit=computed(()=>fpsLimit?1e3/toValue$1(fpsLimit):null),previousFrameTimestamp=0,rafId=null;function loop(timestamp$2){if(!isActive.value||!window$1)return;previousFrameTimestamp||=timestamp$2;let delta=timestamp$2-previousFrameTimestamp;if(intervalLimit.value&&deltawindow$1&&`matchMedia`in window$1&&typeof window$1.matchMedia==`function`),ssrSupport=shallowRef(typeof ssrWidth==`number`),mediaQuery=shallowRef(),matches$1=shallowRef(!1),handler=event=>{matches$1.value=event.matches};return watchEffect(()=>{if(ssrSupport.value){ssrSupport.value=!isSupported.value;let queryStrings=toValue$1(query).split(`,`);matches$1.value=queryStrings.some(queryString=>{let not=queryString.includes(`not all`),minWidth=queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),maxWidth=queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),res=!!(minWidth||maxWidth);return minWidth&&res&&(res=ssrWidth>=pxValue$1(minWidth[1])),maxWidth&&res&&(res=ssrWidth<=pxValue$1(maxWidth[1])),not?!res:res});return}isSupported.value&&(mediaQuery.value=window$1.matchMedia(toValue$1(query)),matches$1.value=mediaQuery.value.matches)}),useEventListener(mediaQuery,`change`,handler,{passive:!0}),computed(()=>matches$1.value)}function cloneFnJSON(source){return JSON.parse(JSON.stringify(source))}function useDevicePixelRatio(options$1={}){let{window:window$1=defaultWindow}=options$1,pixelRatio=shallowRef(1),query=useMediaQuery$1(()=>`(resolution: ${pixelRatio.value}dppx)`,options$1),stop$1=noop$3;return window$1&&(stop$1=watchImmediate$1(query,()=>pixelRatio.value=window$1.devicePixelRatio)),{pixelRatio:readonly(pixelRatio),stop:stop$1}}function useResizeObserver$1(target$1,callback,options$1={}){let{window:window$1=defaultWindow,...observerOptions}=options$1,observer,isSupported=useSupported$1(()=>window$1&&`ResizeObserver`in window$1),cleanup=()=>{observer&&(observer.disconnect(),observer=void 0)},targets=computed(()=>{let _targets=toValue$1(target$1);return Array.isArray(_targets)?_targets.map(el$1=>unrefElement(el$1)):[unrefElement(_targets)]}),stopWatch=watch(targets,els=>{if(cleanup(),isSupported.value&&window$1){observer=new ResizeObserver(callback);for(let _el of els)_el&&observer.observe(_el,observerOptions)}},{immediate:!0,flush:`post`}),stop$1=()=>{cleanup(),stopWatch()};return tryOnScopeDispose$1(stop$1),{isSupported,stop:stop$1}}function useElementBounding$1(target$1,options$1={}){let{reset=!0,windowResize=!0,windowScroll=!0,immediate=!0,updateTiming=`sync`}=options$1,height=shallowRef(0),bottom=shallowRef(0),left=shallowRef(0),right=shallowRef(0),top=shallowRef(0),width=shallowRef(0),x$3=shallowRef(0),y$3=shallowRef(0);function recalculate(){let el$1=unrefElement(target$1);if(!el$1){reset&&(height.value=0,bottom.value=0,left.value=0,right.value=0,top.value=0,width.value=0,x$3.value=0,y$3.value=0);return}let rect=el$1.getBoundingClientRect();height.value=rect.height,bottom.value=rect.bottom,left.value=rect.left,right.value=rect.right,top.value=rect.top,width.value=rect.width,x$3.value=rect.x,y$3.value=rect.y}function update(){updateTiming===`sync`?recalculate():updateTiming===`next-frame`&&requestAnimationFrame(()=>recalculate())}return useResizeObserver$1(target$1,update),watch(()=>unrefElement(target$1),ele=>!ele&&update()),useMutationObserver$1(target$1,update,{attributeFilter:[`style`,`class`]}),windowScroll&&useEventListener(`scroll`,update,{capture:!0,passive:!0}),windowResize&&useEventListener(`resize`,update,{passive:!0}),tryOnMounted$1(()=>{immediate&&update()}),{height,bottom,left,right,top,width,x:x$3,y:y$3,update}}function useElementSize(target$1,initialSize={width:0,height:0},options$1={}){let{window:window$1=defaultWindow,box=`content-box`}=options$1,isSVG=computed(()=>{var _a$3,_b;return(_b=(_a$3=unrefElement(target$1))?.namespaceURI)?.includes(`svg`)}),width=shallowRef(initialSize.width),height=shallowRef(initialSize.height),{stop:stop1}=useResizeObserver$1(target$1,([entry])=>{let boxSize=box===`border-box`?entry.borderBoxSize:box===`content-box`?entry.contentBoxSize:entry.devicePixelContentBoxSize;if(window$1&&isSVG.value){let $elem=unrefElement(target$1);if($elem){let rect=$elem.getBoundingClientRect();width.value=rect.width,height.value=rect.height}}else if(boxSize){let formatBoxSize=toArray$1(boxSize);width.value=formatBoxSize.reduce((acc,{inlineSize})=>acc+inlineSize,0),height.value=formatBoxSize.reduce((acc,{blockSize})=>acc+blockSize,0)}else width.value=entry.contentRect.width,height.value=entry.contentRect.height},options$1);tryOnMounted$1(()=>{let ele=unrefElement(target$1);ele&&(width.value=`offsetWidth`in ele?ele.offsetWidth:initialSize.width,height.value=`offsetHeight`in ele?ele.offsetHeight:initialSize.height)});let stop2=watch(()=>unrefElement(target$1),ele=>{width.value=ele?initialSize.width:0,height.value=ele?initialSize.height:0});function stop$1(){stop1(),stop2()}return{width,height,stop:stop$1}}function useFps(options$1){var _a$3;let fps=shallowRef(0);if(typeof performance>`u`)return fps;let every=(_a$3=options$1?.every)??10,last=performance.now(),ticks=0;return useRafFn(()=>{if(ticks+=1,ticks>=every){let now=performance.now(),diff=now-last;fps.value=Math.round(1e3/(diff/ticks)),last=now,ticks=0}}),fps}function useMemory(options$1={}){let memory=ref(),isSupported=useSupported$1(()=>typeof performance<`u`&&`memory`in performance);if(isSupported.value){let{interval=1e3}=options$1;useIntervalFn$1(()=>{memory.value=performance.memory},interval,{immediate:options$1.immediate,immediateCallback:options$1.immediateCallback})}return{isSupported,memory}}const defaultState$1={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},keys$2=Object.keys(defaultState$1);function usePointer$1(options$1={}){let{target:target$1=defaultWindow}=options$1,isInside=shallowRef(!1),state=ref(options$1.initialValue||{});Object.assign(state.value,defaultState$1,state.value);let handler=event=>{isInside.value=!0,!(options$1.pointerTypes&&!options$1.pointerTypes.includes(event.pointerType))&&(state.value=objectPick$1(event,keys$2,!1))};if(target$1){let listenerOptions={passive:!0};useEventListener(target$1,[`pointerdown`,`pointermove`,`pointerup`],handler,listenerOptions),useEventListener(target$1,`pointerleave`,()=>isInside.value=!1,listenerOptions)}return{...toRefs$2(state),isInside}}const DEFAULT_UNITS$1=[{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 useVModel(props,key$1,emit$1,options$1={}){var _a$3,_b,_c$1;let{clone:clone$2=!1,passive=!1,eventName,deep=!1,defaultValue,shouldEmit}=options$1,vm$1=getCurrentInstance(),_emit=emit$1||vm$1?.emit||(_a$3=vm$1?.$emit)?.bind(vm$1)||(_c$1=(_b=vm$1?.proxy)?.$emit)?.bind(vm$1?.proxy),event=eventName;key$1||=`modelValue`,event||=`update:${key$1.toString()}`;let cloneFn=val=>clone$2?typeof clone$2==`function`?clone$2(val):cloneFnJSON(val):val,getValue$2=()=>isDef$1(props[key$1])?cloneFn(props[key$1]):defaultValue,triggerEmit=value$1=>{shouldEmit?shouldEmit(value$1)&&_emit(event,value$1):_emit(event,value$1)};if(passive){let initialValue=getValue$2(),proxy=ref(initialValue),isUpdating=!1;return watch(()=>props[key$1],v$2=>{isUpdating||(isUpdating=!0,proxy.value=cloneFn(v$2),nextTick(()=>isUpdating=!1))}),watch(proxy,v$2=>{!isUpdating&&(v$2!==props[key$1]||deep)&&triggerEmit(v$2)},{deep}),proxy}else return computed({get(){return getValue$2()},set(value$1){triggerEmit(value$1)}})}function useWindowSize$1(options$1={}){let{window:window$1=defaultWindow,initialWidth=1/0,initialHeight=1/0,listenOrientation=!0,includeScrollbar=!0,type=`inner`}=options$1,width=shallowRef(initialWidth),height=shallowRef(initialHeight),update=()=>{if(window$1)if(type===`outer`)width.value=window$1.outerWidth,height.value=window$1.outerHeight;else if(type===`visual`&&window$1.visualViewport){let{width:visualViewportWidth,height:visualViewportHeight,scale:scale$1}=window$1.visualViewport;width.value=Math.round(visualViewportWidth*scale$1),height.value=Math.round(visualViewportHeight*scale$1)}else includeScrollbar?(width.value=window$1.innerWidth,height.value=window$1.innerHeight):(width.value=window$1.document.documentElement.clientWidth,height.value=window$1.document.documentElement.clientHeight)};update(),tryOnMounted$1(update);let listenerOptions={passive:!0};if(useEventListener(`resize`,update,listenerOptions),window$1&&type===`visual`&&window$1.visualViewport&&useEventListener(window$1.visualViewport,`resize`,update,listenerOptions),listenOrientation){let matches$1=useMediaQuery$1(`(orientation: portrait)`);watch(matches$1,()=>update())}return{width,height}}var At$1=Object.defineProperty,xt$1=(e$3,t,r$2)=>t in e$3?At$1(e$3,t,{enumerable:!0,configurable:!0,writable:!0,value:r$2}):e$3[t]=r$2,de$2=(e$3,t,r$2)=>xt$1(e$3,typeof t==`symbol`?t:t+``,r$2);const gr=`@tresjs/core`,hr$1=`module`,vr$1=`4.3.6`,yr=`pnpm@10.6.3`,_r=`Declarative ThreeJS using Vue Components`,wr=`Alvaro Saburido (https://github.com/alvarosabu/)`,br=`MIT`,Mr={type:`git`,url:`git+https://github.com/Tresjs/tres.git`},Pr=[`vue`,`3d`,`threejs`,`three`,`threejs-vue`],Cr=!1,Er={".":{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`},"./*":`./*`},Tr=`./dist/tres.js`,Sr=`./dist/tres.js`,Ar=`./dist/index.d.ts`,xr=[`*.d.ts`,`dist`],kr={access:`public`},Lr={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`},Rr={three:`>=0.133`,vue:`>=3.4`},Or={"@alvarosabu/utils":`^3.2.0`,"@vue/devtools-api":`^6.6.3`,"@vueuse/core":`^12.5.0`},Dr={"@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`},jr$1={name:gr,type:hr$1,version:vr$1,packageManager:yr,description:_r,author:wr,license:br,repository:Mr,keywords:Pr,sideEffects:Cr,exports:Er,main:Tr,module:Sr,types:Ar,files:xr,publishConfig:kr,scripts:Lr,peerDependencies:Rr,dependencies:Or,devDependencies:Dr};function Br(e$3){let t={nodes:{},materials:{}};return e$3&&e$3.traverse(r$2=>{r$2.name&&(t.nodes[r$2.name]=r$2),r$2.material&&!t.materials[r$2.material.name]&&(t.materials[r$2.material.name]=r$2.material)}),t}async function Ir(e$3,t,r$2,n$2,o$1){let{logError:l$1}=Q$2(),s$1=new e$3;return o$1&&o$1(s$1),r$2&&r$2(s$1),await new Promise((a$2,c$4)=>{s$1.load(t,i$1=>{let f$3=i$1;f$3.scene&&Object.assign(f$3,Br(f$3.scene)),a$2(f$3)},n$2,i$1=>{l$1(`[useLoader] - Failed to load resource`,i$1),c$4(i$1)})})}var $r=class extends Mesh{constructor(...r$2){super(...r$2),de$2(this,`type`,`HightlightMesh`),de$2(this,`createTime`),this.createTime=Date.now()}onBeforeRender(){let n$2=(Date.now()-this.createTime)/1e3,s$1=1+.07*Math.sin(2.5*n$2);this.scale.set(s$1,s$1,s$1)}};function be$1(e$3){return typeof e$3>`u`}function ke(e$3){return Array.isArray(e$3)}function Hr(e$3){return typeof e$3==`number`}function dt$4(e$3){return typeof e$3==`string`}function Y$1(e$3){return typeof e$3==`function`}function j(e$3){return e$3===Object(e$3)&&!ke(e$3)&&!Y$1(e$3)}function N$1(e$3){return j(e$3)&&!!e$3.isObject3D}function mt$2(e$3){return j(e$3)&&!!e$3.isColor}function Ur$1(e$3){return e$3!=null&&(typeof e$3==`string`||typeof e$3==`number`||mt$2(e$3))}function Me$1(e$3){return typeof e$3==`object`&&!!e$3&&`set`in e$3&&typeof e$3.set==`function`}function Fr(e$3){return Me$1(e$3)&&`copy`in e$3&&typeof e$3.copy==`function`}function Wr$1(e$3){return!!(e$3!=null&&e$3.constructor)}function Ge$1(e$3){return e$3 instanceof Layers}function Ve(e$3){return j(e$3)&&!!e$3.isCamera}function Nr(e$3){return j(e$3)&&!!e$3.isBufferGeometry}function zr(e$3){return j(e$3)&&!!e$3.isMaterial}function Gr$1(e$3){return j(e$3)&&!!e$3.isLight}function Vr(e$3){return j(e$3)&&!!e$3.isFog}function Yr$1(e$3){return j(e$3)&&!!e$3.isScene}function ne$1(e$3){return N$1(e$3)||Nr(e$3)||zr(e$3)||Vr(e$3)}function qr$1(e$3){return j(e$3)&&!!e$3.isPrimitive}const gt$2=(e$3,t)=>{for(let r$2 of Object.keys(t))t[r$2]instanceof Object&&Object.assign(t[r$2],gt$2(e$3[r$2],t[r$2]));return Object.assign(e$3||{},t),e$3},Kr=`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`,Jr$1=Zr$1(Kr);function Ye(e$3){return e$3&&e$3.nodeType===1}function he$1(e$3){return e$3.replace(/-([a-z])/g,(t,r$2)=>r$2.toUpperCase())}const Qr$1=/\B([A-Z])/g;function Xr$1(e$3){return e$3.replace(Qr$1,`-$1`).toLowerCase()}function Zr$1(e$3,t){let r$2=Object.create(null),n$2=e$3.split(`,`);for(let o$1=0;o$1!!r$2[o$1.toLowerCase()]:o$1=>!!r$2[o$1]}const qe$1=(e$3,t)=>{if(!t)return;let r$2=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return r$2?.reduce((n$2,o$1)=>n$2&&n$2[o$1],e$3)},en$1=(e$3,t,r$2)=>{let n$2=Array.isArray(t)?t:t.match(/([^[.\]])+/g);n$2&&n$2.reduce((o$1,l$1,s$1)=>(o$1[l$1]===void 0&&(o$1[l$1]={}),s$1===n$2.length-1&&(o$1[l$1]=r$2),o$1[l$1]),e$3)};function ht$3(e$3,t){if(Ye(e$3)&&Ye(t)){let o$1=e$3.attributes,l$1=t.attributes;return o$1.length===l$1.length?Array.from(o$1).every(({name:s$1,value:a$2})=>t.getAttribute(s$1)===a$2):!1}if(e$3===t)return!0;if(typeof e$3!=`object`||!e$3||typeof t!=`object`||!t)return!1;let r$2=Object.keys(e$3),n$2=Object.keys(t);if(r$2.length!==n$2.length)return!1;for(let o$1 of r$2)if(!n$2.includes(o$1)||!ht$3(e$3[o$1],t[o$1]))return!1;return!0}function tn$1(e$3,t){if(!Array.isArray(e$3)||!Array.isArray(t)||e$3.length!==t.length)return!1;for(let r$2=0;r$2{if(c$4.uuid===t)return c$4;for(let i$1 of c$4.children){let f$3=o$1(i$1);if(f$3)return f$3}},l$1=o$1(e$3);if(!l$1){console.warn(`Object with UUID not found in the scene.`);return}let s$1=l$1;for(let c$4=0;c$4vt$3(o$1)),!(e$3 instanceof Scene)){let o$1=e$3;e$3&&((n$2=e$3.dispose)==null||n$2.call(e$3)),o$1.geometry&&o$1.geometry.dispose(),Array.isArray(o$1.material)?o$1.material.forEach(l$1=>Ke(l$1)):o$1.material&&Ke(o$1.material)}}function ln$1(e$3,t){let r$2=0;for(let n$2=0;n$2r$2===0?t:t.charAt(0).toUpperCase()+t.slice(1)).join(``)}const Qe$1=/-\d+$/;function cn$2(e$3,t,r$2){if(dt$4(r$2)){if(Qe$1.test(r$2)){let l$1=r$2.replace(Qe$1,``),{target:s$1,key:a$2}=Pe$2(e$3,l$1);if(!Array.isArray(s$1[a$2])){let c$4=s$1[a$2],i$1=[];i$1.__tresDetach=()=>{i$1.every(f$3=>be$1(f$3))&&(s$1[a$2]=c$4)},s$1[a$2]=i$1}}let{target:n$2,key:o$1}=Pe$2(e$3,r$2);t.__tres.previousAttach=n$2[o$1],n$2[o$1]=J$1(t)}else t.__tres.previousAttach=r$2(e$3,t)}function un$3(e$3,t,r$2){var n$2,o$1,l$1;if(dt$4(r$2)){let{target:s$1,key:a$2}=Pe$2(e$3,r$2),c$4=t.__tres.previousAttach;c$4===void 0?delete s$1[a$2]:s$1[a$2]=c$4,`__tresDetach`in s$1&&s$1.__tresDetach()}else (o$1=(n$2=t.__tres)?.previousAttach)==null||o$1.call(n$2,e$3,t);(l$1=t.__tres)==null||delete l$1.previousAttach}function z$2(e$3,t,r$2){let n$2=e$3;return n$2.__tres={type:`unknown`,eventCount:0,root:r$2,handlers:{},memoizedProps:{},objects:[],parent:null,previousAttach:null,...t},n$2.__tres.attach||(n$2.isMaterial?n$2.__tres.attach=`material`:n$2.isBufferGeometry?n$2.__tres.attach=`geometry`:n$2.isFog&&(n$2.__tres.attach=`fog`)),n$2}function yt$3(e$3){var r$2;let t=(r$2=e$3?.__tres)?.root;t&&t.render&&t.render.canBeInvalidated.value&&t.invalidate()}function fn$5(e$3,t,r$2){var o$1;if(!Y$1(e$3.setPixelRatio))return;let n$2=0;if(r$2&&ke(r$2)&&r$2.length>=2){let[l$1,s$1]=r$2;n$2=MathUtils.clamp(t,l$1,s$1)}else n$2=Hr(r$2)?r$2:t;n$2!==(o$1=e$3.getPixelRatio)?.call(e$3)&&e$3.setPixelRatio(n$2)}function pn$1(e$3,t,r$2,n$2,o$1){let l$1=[...t.__tres.objects],s$1=J$1(t);if(e$3=J$1(e$3),s$1===e$3)return!0;let a$2=z$2(e$3,t.__tres??{},o$1),c$4=t.parent??t.__tres.parent??null,i$1={...t.__tres.memoizedProps};delete i$1.object;for(let f$3 of l$1)_t$3(f$3,o$1),wt$3(f$3,o$1);s$1.__tres.objects=[],n$2.remove(t);for(let[f$3,v$2]of Object.entries(i$1))n$2.patchProp(a$2,f$3,a$2[f$3],v$2);r$2(e$3),n$2.insert(t,c$4);for(let f$3 of l$1)n$2.insert(f$3,t);return!0}function J$1(e$3){return qr$1(e$3)?(e$3.object.__tres=e$3.__tres,e$3.object):e$3}function _t$3(e$3,t){var n$2,o$1,l$1,s$1;let r$2=(n$2=e$3.__tres)?.parent||t.scene.value;e$3.__tres&&(e$3.__tres.parent=null),r$2&&r$2.__tres&&`objects`in r$2.__tres&&ln$1(r$2.__tres.objects,a$2=>a$2!==e$3),(o$1=e$3.__tres)!=null&&o$1.attach?un$3(r$2,e$3,e$3.__tres.attach):((s$1=(l$1=e$3.parent)?.remove)==null||s$1.call(l$1,J$1(e$3)),e$3.parent=null)}function wt$3(e$3,t){var r$2;(r$2=e$3.traverse)==null||r$2.call(e$3,n$2=>{var o$1;t.deregisterCamera(n$2),(o$1=t.eventManager)==null||o$1.deregisterPointerMissedObject(n$2)}),t.deregisterCamera(e$3),yt$3(e$3)}async function dn$1(e$3,t){let r$2=new TextureLoader(t),n$2=o$1=>new Promise((l$1,s$1)=>{r$2.load(o$1,a$2=>l$1(a$2),()=>null,()=>{s$1(Error(`[useTextures] - Failed to load texture`))})});if(rn$1(e$3)){let o$1=await Promise.all(e$3.map(l$1=>n$2(l$1)));return e$3.length>1?o$1:o$1[0]}else{let{map:o$1,displacementMap:l$1,normalMap:s$1,roughnessMap:a$2,metalnessMap:c$4,aoMap:i$1,alphaMap:f$3,matcap:v$2}=e$3;return{map:o$1?await n$2(o$1):null,displacementMap:l$1?await n$2(l$1):null,normalMap:s$1?await n$2(s$1):null,roughnessMap:a$2?await n$2(a$2):null,metalnessMap:c$4?await n$2(c$4):null,aoMap:i$1?await n$2(i$1):null,alphaMap:f$3?await n$2(f$3):null,matcap:v$2?await n$2(v$2):null}}}const to$1=defineComponent({__name:`component`,props:{map:{},displacementMap:{},normalMap:{},roughnessMap:{},metalnessMap:{},aoMap:{},alphaMap:{},matcap:{}},async setup(e$3){let t,r$2,n$2=e$3,o$1=([t,r$2]=withAsyncContext(()=>reactive(dn$1(n$2))),t=await t,r$2(),t);return(l$1,s$1)=>renderSlot(l$1.$slots,`default`,{textures:unref(o$1)})}}),mn$1=({sizes:e$3})=>{let t=ref([]),r$2=computed(()=>t.value[0]),n$2=s$1=>{let a$2=s$1 instanceof Camera?s$1:t.value.find(i$1=>i$1.uuid===s$1);if(!a$2)return;let c$4=t.value.filter(({uuid:i$1})=>i$1!==a$2.uuid);t.value=[a$2,...c$4]},o$1=(s$1,a$2=!1)=>{if(Ve(s$1)){let c$4=s$1;if(t.value.some(({uuid:i$1})=>i$1===c$4.uuid))return;a$2?n$2(c$4):t.value.push(c$4)}},l$1=s$1=>{if(Ve(s$1)){let a$2=s$1;t.value=t.value.filter(({uuid:c$4})=>c$4!==a$2.uuid)}};return watchEffect(()=>{e$3.aspectRatio.value&&t.value.forEach(s$1=>{!s$1.manual&&(s$1 instanceof PerspectiveCamera||gn$1(s$1))&&(s$1 instanceof PerspectiveCamera?s$1.aspect=e$3.aspectRatio.value:(s$1.left=e$3.width.value*-.5,s$1.right=e$3.width.value*.5,s$1.top=e$3.height.value*.5,s$1.bottom=e$3.height.value*-.5),s$1.updateProjectionMatrix())})}),onUnmounted(()=>{t.value=[]}),{camera:r$2,cameras:t,registerCamera:o$1,deregisterCamera:l$1,setCameraActive:n$2}};function gn$1(e$3){return e$3.hasOwnProperty(`isOrthographicCamera`)&&e$3.isOrthographicCamera}const ro$1=!0,fe$1=`[TresJS ▲ ■ ●] `;function hn$1(...e$3){typeof e$3[0]==`string`?e$3[0]=fe$1+e$3[0]:e$3.unshift(fe$1),console.error(...e$3)}function vn$3(...e$3){typeof e$3[0]==`string`?e$3[0]=fe$1+e$3[0]:e$3.unshift(fe$1),console.warn(...e$3)}function yn$1(e$3,t){}function Q$2(){return{logError:hn$1,logWarning:vn$3,logMessage:yn$1}}const Ce$2=ref({}),Ee$1=e$3=>Object.assign(Ce$2.value,e$3);function ve(){let e$3=new Map,t=new Set,r$2=0,n$2=!1,o$1=()=>{let i$1=Array.from(e$3.entries()).sort((f$3,v$2)=>{let u$1=f$3[1].priority-v$2[1].priority;return u$1===0?f$3[1].addI-v$2[1].addI:u$1});t.clear(),i$1.forEach(f$3=>t.add(f$3[0]))},l$1=i$1=>{e$3.delete(i$1),t.delete(i$1)};return{on:(i$1,f$3=0)=>{e$3.set(i$1,{priority:f$3,addI:r$2++});let v$2=()=>l$1(i$1);return tryOnScopeDispose$1(v$2),n$2=!0,{off:v$2}},off:l$1,trigger:(...i$1)=>{n$2&&(o$1(),n$2=!1),t.forEach(f$3=>f$3(...i$1))},dispose:()=>{e$3.clear(),t.clear()},get count(){return e$3.size}}}function _n$1(){let e$3=!0,t=!0,r$2=!1,n$2=new Clock(!1),o$1=ref(n$2.running),l$1=ref(!1),s$1,a$2=MathUtils.generateUUID(),c$4=null,i$1=ve(),f$3=ve(),v$2=ve();S$2();let u$1={};function _$2(M$1){u$1=M$1}function d$2(M$1,x$3,m$3=0){switch(x$3){case`before`:return i$1.on(M$1,m$3);case`render`:return c$4||=M$1,f$3.dispose(),f$3.on(M$1);case`after`:return v$2.on(M$1,m$3)}}function y$3(){t&&(t=!1,S$2(),E$2())}function p$5(){t=!0,S$2(),cancelAnimationFrame(s$1)}function h$3(){r$2=!1,S$2()}function P$2(){r$2=!0,S$2()}function C$3(){l$1.value=!0}function b$4(){l$1.value=!1}function E$2(){if(!e$3){s$1=requestAnimationFrame(E$2);return}let M$1=n$2.getDelta(),x$3=n$2.getElapsedTime(),m$3={camera:unref(u$1.camera),scene:unref(u$1.scene),renderer:unref(u$1.renderer),raycaster:unref(u$1.raycaster),controls:unref(u$1.controls),invalidate:u$1.invalidate,advance:u$1.advance},w$2={delta:M$1,elapsed:x$3,clock:n$2,...m$3};o$1.value&&i$1.trigger(w$2),l$1.value||(f$3.count?f$3.trigger(w$2):c$4&&c$4(w$2)),o$1.value&&v$2.trigger(w$2),s$1=requestAnimationFrame(E$2)}function S$2(){let M$1=!t&&!r$2;n$2.running!==M$1&&(n$2.running?n$2.stop():n$2.start()),o$1.value=n$2.running}return{loopId:a$2,register:(M$1,x$3,m$3)=>d$2(M$1,x$3,m$3),start:y$3,stop:p$5,pause:P$2,resume:h$3,pauseRender:C$3,resumeRender:b$4,isRenderPaused:l$1,isActive:o$1,setContext:_$2,setReady:M$1=>e$3=M$1}}function Le$1(e$3){let t=0;return e$3.traverse(r$2=>{if(r$2.isMesh&&r$2.geometry&&r$2.type!==`HightlightMesh`){let n$2=r$2.geometry,o$1=n$2.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,l$1=n$2.index?n$2.index.count*Uint32Array.BYTES_PER_ELEMENT:0,s$1=n$2.attributes.normal?n$2.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,a$2=n$2.attributes.uv?n$2.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,c$4=o$1+l$1+s$1+a$2;t+=c$4}}),t}function wn$1(e$3){return(e$3/1024).toFixed(2)}const bn$1=Number.parseInt(REVISION.replace(`dev`,``));function Mn$1(e$3){return e$3 instanceof Color?e$3:Array.isArray(e$3)?new Color(...e$3):new Color(e$3)}const oe$1={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:SRGBColorSpace,toneMapping:ACESFilmicToneMapping,toneMappingExposure:3,shadowMap:{enabled:!0,type:PCFSoftShadowMap}},flat:{toneMapping:NoToneMapping,toneMappingExposure:1}};function Pn$1({canvas:e$3,options:t,contextParts:{sizes:r$2,render:n$2,invalidate:o$1,advance:l$1}}){let s$1=computed(()=>({alpha:toValue(t.alpha)??!0,depth:toValue(t.depth),canvas:unrefElement(e$3),context:toValue(t.context),stencil:toValue(t.stencil),antialias:toValue(t.antialias)??!0,precision:toValue(t.precision),powerPreference:toValue(t.powerPreference),premultipliedAlpha:toValue(t.premultipliedAlpha),preserveDrawingBuffer:toValue(t.preserveDrawingBuffer),logarithmicDepthBuffer:toValue(t.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:toValue(t.failIfMajorPerformanceCaveat)})),a$2=shallowRef(new WebGLRenderer(s$1.value));function c$4(){t.renderMode===`on-demand`&&o$1()}watch(s$1,()=>{a$2.value.dispose(),a$2.value=new WebGLRenderer(s$1.value),c$4()}),watch([r$2.width,r$2.height],()=>{a$2.value.setSize(r$2.width.value,r$2.height.value),c$4()},{immediate:!0}),watch(()=>t.clearColor,c$4);let{pixelRatio:i$1}=useDevicePixelRatio(),{logError:f$3}=Q$2(),u$1=(()=>{let d$2=new WebGLRenderer,y$3={shadowMap:{enabled:d$2.shadowMap.enabled,type:d$2.shadowMap.type},toneMapping:d$2.toneMapping,toneMappingExposure:d$2.toneMappingExposure,outputColorSpace:d$2.outputColorSpace};return d$2.dispose(),y$3})(),_$2=toValue(t.renderMode);return _$2===`on-demand`&&o$1(),_$2===`manual`&&setTimeout(()=>{l$1()},100),watchEffect(()=>{let d$2=toValue(t.preset);d$2&&(d$2 in oe$1||f$3(`Renderer Preset must be one of these: ${Object.keys(oe$1).join(`, `)}`),gt$2(a$2.value,oe$1[d$2])),fn$5(a$2.value,i$1.value,toValue(t.dpr)),_$2===`always`&&(n$2.frames.value=Math.max(1,n$2.frames.value));let y$3=(P$2,C$3)=>{let b$4=toValue(P$2),E$2=()=>{if(d$2)return qe$1(oe$1[d$2],C$3)};if(b$4!==void 0)return b$4;let S$2=E$2();return S$2===void 0?qe$1(u$1,C$3):S$2},p$5=(P$2,C$3)=>en$1(a$2.value,C$3,y$3(P$2,C$3));p$5(t.shadows,`shadowMap.enabled`),p$5(t.toneMapping??ACESFilmicToneMapping,`toneMapping`),p$5(t.shadowMapType,`shadowMap.type`),bn$1<150&&p$5(!t.useLegacyLights,`physicallyCorrectLights`),p$5(t.outputColorSpace,`outputColorSpace`),p$5(t.toneMappingExposure,`toneMappingExposure`);let h$3=y$3(t.clearColor,`clearColor`);h$3&&a$2.value.setClearColor(h$3?Mn$1(h$3):new Color(0))}),onUnmounted(()=>{a$2.value.dispose(),a$2.value.forceContextLoss()}),{renderer:a$2}}function Cn$1(e$3,t,r$2=10){let n$2=toValue(e$3)?useWindowSize$1():useElementSize(computed(()=>toValue(t).parentElement)),o$1=readonly(refDebounced$1(n$2.width,r$2)),l$1=readonly(refDebounced$1(n$2.height,r$2)),s$1=computed(()=>o$1.value/l$1.value);return{height:l$1,width:o$1,aspectRatio:s$1}}const En$1=(e$3,t)=>{let r$2=computed(()=>t.renderer.value.domElement),n$2=shallowRef([]),{x:o$1,y:l$1}=usePointer$1({target:r$2}),s$1=0,{width:a$2,height:c$4,top:i$1,left:f$3}=useElementBounding$1(r$2),v$2=({x:g$2,y:T$1})=>{if(r$2.value)return{x:(g$2-f$3.value)/a$2.value*2-1,y:-((T$1-i$1.value)/c$4.value)*2+1}},u$1=({x:g$2,y:T$1})=>{if(t.camera.value)return t.raycaster.value.setFromCamera(new Vector2(g$2,T$1),t.camera.value),n$2.value=t.raycaster.value.intersectObjects(e$3.value,!0),n$2.value},_$2=g$2=>{let T$1=v$2({x:g$2?.clientX??o$1.value,y:g$2?.clientY??l$1.value});return T$1&&u$1(T$1)||[]},d$2=createEventHook$1(),y$3=createEventHook$1(),p$5=createEventHook$1(),h$3=createEventHook$1(),P$2=createEventHook$1(),C$3=createEventHook$1(),b$4=createEventHook$1(),E$2=createEventHook$1();function S$2(g$2){let T$1={};for(let U in g$2)typeof U!=`function`&&(T$1[U]=g$2[U]);return T$1}let M$1=(g$2,T$1)=>{var Ie,$e$2,He$2;let U=S$2(T$1),re$3=new Vector3(T$1?.clientX,T$1?.clientY,0).unproject((Ie=t.camera)?.value);g$2.trigger({...U,intersections:n$2.value,unprojectedPoint:re$3,ray:($e$2=t.raycaster)?.value.ray,camera:(He$2=t.camera)?.value,sourceEvent:T$1,delta:s$1,stopPropagating:!1})},x$3,m$3=g$2=>{_$2(g$2),M$1(p$5,g$2),x$3=g$2},w$2=()=>{x$3&&m$3(x$3)},k$4,L$1,R$3,B$2=g$2=>{var T$1;k$4=(T$1=n$2.value[0])?.object,s$1=0,L$1=new Vector2(g$2?.clientX??o$1.value,g$2?.clientY??l$1.value),M$1(P$2,g$2)},O$3,G$2=!1,Oe$2=g$2=>{var T$1,U,re$3;g$2 instanceof PointerEvent&&(n$2.value.length===0&&M$1(C$3,g$2),k$4===(T$1=n$2.value[0])?.object&&(R$3=new Vector2(g$2?.clientX??o$1.value,g$2?.clientY??l$1.value),s$1=L$1?.distanceTo(R$3),g$2.button===0?(M$1(d$2,g$2),O$3===(U=n$2.value[0])?.object?G$2=!0:(O$3=(re$3=n$2.value[0])?.object,G$2=!1)):g$2.button===2&&M$1(b$4,g$2)),M$1(h$3,g$2))},De=g$2=>{G$2&&(M$1(y$3,g$2),O$3=void 0,G$2=!1)},je$1=g$2=>M$1(p$5,g$2),Be$2=g$2=>M$1(E$2,g$2);return r$2.value.addEventListener(`pointerup`,Oe$2),r$2.value.addEventListener(`pointerdown`,B$2),r$2.value.addEventListener(`pointermove`,m$3),r$2.value.addEventListener(`pointerleave`,je$1),r$2.value.addEventListener(`dblclick`,De),r$2.value.addEventListener(`wheel`,Be$2),onUnmounted(()=>{r$2!=null&&r$2.value&&(r$2.value.removeEventListener(`pointerup`,Oe$2),r$2.value.removeEventListener(`pointerdown`,B$2),r$2.value.removeEventListener(`pointermove`,m$3),r$2.value.removeEventListener(`pointerleave`,je$1),r$2.value.removeEventListener(`dblclick`,De),r$2.value.removeEventListener(`wheel`,Be$2))}),{intersects:n$2,onClick:g$2=>d$2.on(g$2).off,onDblClick:g$2=>y$3.on(g$2).off,onContextMenu:g$2=>b$4.on(g$2).off,onPointerMove:g$2=>p$5.on(g$2).off,onPointerUp:g$2=>h$3.on(g$2).off,onPointerDown:g$2=>P$2.on(g$2).off,onPointerMissed:g$2=>C$3.on(g$2).off,onWheel:g$2=>E$2.on(g$2).off,forceUpdate:w$2}};function ye(e$3,t){if(Array.isArray(e$3))for(let r$2 of e$3)r$2(t);typeof e$3==`function`&&e$3(t)}function Tn$1(e$3,t,r$2){var x$3;let n$2=shallowRef(),o$1=shallowRef();e$3&&(n$2.value=e$3),t&&(o$1.value=t);let l$1=m$3=>{var w$2;return(w$2=m$3.__tres)?.eventCount>0},s$1=m$3=>{var w$2;return(w$2=m$3.children)?.some(k$4=>s$1(k$4))||l$1(m$3)},a$2=shallowRef(((x$3=n$2.value)?.children).filter(s$1)||[]);function c$4(m$3,w$2){let k$4=[],L$1=()=>w$2.stopPropagating=!0;w$2.stopPropagation=L$1;for(let R$3 of w$2?.intersections){if(w$2.stopPropagating)return;w$2={...w$2,...R$3};let{object:B$2}=R$3;w$2.eventObject=B$2,ye(B$2[m$3],w$2),k$4.push(B$2);let O$3=B$2.parent;for(;O$3!==null&&!w$2.stopPropagating&&!k$4.includes(O$3);)w$2.eventObject=O$3,ye(O$3[m$3],w$2),k$4.push(O$3),O$3=O$3.parent;let G$2=Xr$1(m$3.slice(2));r$2(G$2,{intersection:R$3,event:w$2})}}let{onClick:i$1,onDblClick:f$3,onContextMenu:v$2,onPointerMove:u$1,onPointerDown:_$2,onPointerUp:d$2,onPointerMissed:y$3,onWheel:p$5,forceUpdate:h$3}=En$1(a$2,t);d$2(m$3=>c$4(`onPointerUp`,m$3)),_$2(m$3=>c$4(`onPointerDown`,m$3)),i$1(m$3=>c$4(`onClick`,m$3)),f$3(m$3=>c$4(`onDoubleClick`,m$3)),v$2(m$3=>c$4(`onContextMenu`,m$3)),p$5(m$3=>c$4(`onWheel`,m$3));let P$2=[];u$1(m$3=>{let w$2=m$3.intersections.map(({object:L$1})=>L$1),k$4=m$3.intersections;P$2.forEach(({object:L$1})=>{w$2.includes(L$1)||(m$3.intersections=P$2,c$4(`onPointerLeave`,m$3),c$4(`onPointerOut`,m$3))}),m$3.intersections=k$4,m$3.intersections.forEach(({object:L$1})=>{P$2.includes(L$1)||(c$4(`onPointerEnter`,m$3),c$4(`onPointerOver`,m$3))}),c$4(`onPointerMove`,m$3),P$2=m$3.intersections});let C$3=[];y$3(m$3=>{let w$2=()=>m$3.stopPropagating=!0;m$3.stopPropagation=w$2,C$3.forEach(k$4=>{m$3.stopPropagating||(m$3.eventObject=k$4,ye(k$4.onPointerMissed,m$3))}),r$2(`pointer-missed`,{event:m$3})});function b$4(m$3){ne$1(m$3)&&N$1(m$3)&&a$2.value.push(m$3)}function E$2(m$3){if(ne$1(m$3)&&N$1(m$3)){let w$2=a$2.value.indexOf(m$3);w$2>-1&&a$2.value.splice(w$2,1)}}function S$2(m$3){ne$1(m$3)&&N$1(m$3)&&m$3.onPointerMissed&&C$3.push(m$3)}function M$1(m$3){if(ne$1(m$3)&&N$1(m$3)){let w$2=C$3.indexOf(m$3);w$2>-1&&C$3.splice(w$2,1)}}return t.eventManager={forceUpdate:h$3,registerObject:b$4,deregisterObject:E$2,registerPointerMissedObject:S$2,deregisterPointerMissedObject:M$1},{forceUpdate:h$3,registerObject:b$4,deregisterObject:E$2,registerPointerMissedObject:S$2,deregisterPointerMissedObject:M$1}}function Sn$1(e$3,t,r$2=100){r$2=r$2<=0?100:r$2;let n$2=createEventHook$1(),o$1=new Set,l$1=!1,s$1=!1,a$2=null;function c$4(){a$2&&clearTimeout(a$2),!s$1&&!l$1&&e$3()?(n$2.trigger(t),o$1.forEach(u$1=>u$1()),o$1.clear(),l$1=!0):!s$1&&!l$1&&(a$2=setTimeout(c$4,r$2))}function i$1(){s$1=!0,a$2&&clearTimeout(a$2)}c$4();let f$3=(u$1,..._$2)=>{u$1(..._$2)};return{on:u$1=>{if(l$1)return f$3(u$1,t),{off:()=>{}};{let _$2=n$2.on(u$1);return o$1.add(_$2.off),n$2.on(u$1)}},off:n$2.off,trigger:n$2.trigger,clear:n$2.clear,cancel:i$1}}const ee$2=new WeakMap;function bt$3(e$3){if(e$3||=pe$2(),ee$2.has(e$3))return ee$2.get(e$3);let t=100,r$2=Date.now(),l$1=Sn$1(()=>{if(Date.now()-r$2>=t)return!0;{let s$1=e$3.renderer.value,a$2=s$1?.domElement||{width:0,height:0};return!!(s$1&&a$2.width>0&&a$2.height>0)}},e$3);return ee$2.set(e$3,l$1),l$1}function An({scene:e$3,canvas:t,windowSize:r$2,rendererOptions:n$2,emit:o$1}){let l$1=shallowRef(e$3),s$1=Cn$1(r$2,t),{camera:a$2,cameras:c$4,registerCamera:i$1,deregisterCamera:f$3,setCameraActive:v$2}=mn$1({sizes:s$1}),u$1={mode:ref(n$2.renderMode||`always`),priority:ref(0),frames:ref(0),maxFrames:60,canBeInvalidated:computed(()=>u$1.mode.value===`on-demand`&&u$1.frames.value===0)};function _$2(R$3=1){n$2.renderMode===`on-demand`&&(u$1.frames.value=Math.min(u$1.maxFrames,u$1.frames.value+R$3))}function d$2(){n$2.renderMode===`manual`&&(u$1.frames.value=1)}let{renderer:y$3}=Pn$1({canvas:t,options:n$2,contextParts:{sizes:s$1,render:u$1,invalidate:_$2,advance:d$2}}),p$5={sizes:s$1,scene:l$1,camera:a$2,cameras:readonly(c$4),renderer:y$3,raycaster:shallowRef(new Raycaster),controls:ref(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:u$1,advance:d$2,extend:Ee$1,invalidate:_$2,registerCamera:i$1,setCameraActive:v$2,deregisterCamera:f$3,loop:_n$1()};provide(`useTres`,p$5),p$5.scene.value.__tres={root:p$5},p$5.loop.register(()=>{a$2.value&&u$1.frames.value>0&&(y$3.value.render(e$3,a$2.value),o$1(`render`,p$5.renderer.value)),u$1.priority.value=0,u$1.mode.value===`always`?u$1.frames.value=1:u$1.frames.value=Math.max(0,u$1.frames.value-1)},`render`);let{on:h$3,cancel:P$2}=bt$3(p$5);p$5.loop.setReady(!1),p$5.loop.start(),h$3(()=>{o$1(`ready`,p$5),p$5.loop.setReady(!0),Tn$1(e$3,p$5,o$1)}),onUnmounted(()=>{P$2(),p$5.loop.stop()});let C$3=100,b$4=useFps({every:C$3}),{isSupported:E$2,memory:S$2}=useMemory({interval:C$3}),M$1=160,x$3=performance.now(),m$3=({timestamp:R$3})=>{p$5.scene.value&&(p$5.perf.memory.allocatedMem=Le$1(p$5.scene.value)),R$3-x$3>=C$3&&(x$3=R$3,p$5.perf.fps.accumulator.push(b$4.value),p$5.perf.fps.accumulator.length>M$1&&p$5.perf.fps.accumulator.shift(),p$5.perf.fps.value=b$4.value,E$2.value&&S$2.value&&(p$5.perf.memory.accumulator.push(S$2.value.usedJSHeapSize/1024/1024),p$5.perf.memory.accumulator.length>M$1&&p$5.perf.memory.accumulator.shift(),p$5.perf.memory.currentMem=p$5.perf.memory.accumulator.reduce((B$2,O$3)=>B$2+O$3,0)/p$5.perf.memory.accumulator.length))},w$2=0,k$4=1,{pause:L$1}=useRafFn(({delta:R$3})=>{window.__TRES__DEVTOOLS__&&(m$3({timestamp:performance.now()}),w$2+=R$3,w$2>=k$4&&(window.__TRES__DEVTOOLS__.cb(p$5),w$2=0))},{immediate:!0});return onUnmounted(()=>{L$1()}),p$5}function pe$2(){let e$3=inject(`useTres`);if(!e$3)throw Error(`useTresContext must be used together with useTresContextProvider`);return e$3}const so$1=pe$2;function io$1(){let{camera:e$3,scene:t,renderer:r$2,loop:n$2,raycaster:o$1,controls:l$1,invalidate:s$1,advance:a$2}=pe$2();n$2.setContext({camera:e$3,scene:t,renderer:r$2,raycaster:o$1,controls:l$1,invalidate:s$1,advance:a$2});function c$4(v$2,u$1=0){return n$2.register(v$2,`before`,u$1)}function i$1(v$2){return n$2.register(v$2,`render`)}function f$3(v$2,u$1=0){return n$2.register(v$2,`after`,u$1)}return{pause:n$2.pause,resume:n$2.resume,pauseRender:n$2.pauseRender,resumeRender:n$2.resumeRender,isActive:n$2.isActive,onBeforeRender:c$4,render:i$1,onAfterRender:f$3}}const Mt$2=createEventHook$1(),Pt$2=createEventHook$1(),Re$1=createEventHook$1(),te$2=new Clock;let le$1=0,ce$1=0;const{pause:xn$1,resume:Xe,isActive:kn$1}=useRafFn(()=>{Mt$2.trigger({delta:le$1,elapsed:ce$1,clock:te$2}),Pt$2.trigger({delta:le$1,elapsed:ce$1,clock:te$2}),Re$1.trigger({delta:le$1,elapsed:ce$1,clock:te$2})},{immediate:!1});Re$1.on(()=>{le$1=te$2.getDelta(),ce$1=te$2.getElapsedTime()});function Ln(e$3,t={},r$2={}){let n$2=e$3,o$1=a$2=>{n$2=a$2},l$1=new Proxy({},{}),s$1={has(a$2,c$4){return c$4 in t||c$4 in n$2},get(a$2,c$4,i$1){return c$4 in t?t[c$4](n$2):n$2[c$4]},set(a$2,c$4,i$1){return r$2[c$4]?r$2[c$4](i$1,n$2,l$1,o$1):n$2[c$4]=i$1,!0}};return l$1=new Proxy({},s$1),l$1}const{logError:et$1}=Q$2(),tt$2=[`onClick`,`onContextMenu`,`onPointerMove`,`onPointerEnter`,`onPointerLeave`,`onPointerOver`,`onPointerOut`,`onDoubleClick`,`onPointerDown`,`onPointerUp`,`onPointerCancel`,`onPointerMissed`,`onLostPointerCapture`,`onWheel`],Rn$1=e$3=>{let t=e$3.scene.value;function r$2(i$1,f$3,v$2,u$1){if(u$1||={},u$1.args||=[],i$1===`template`||Jr$1(i$1))return null;let _$2=i$1.replace(`Tres`,``),d$2;if(i$1===`primitive`){(!j(u$1.object)||isRef(u$1.object))&&et$1(`Tres primitives need an 'object' prop, whose value is an object or shallowRef`),_$2=u$1.object.type;let y$3={};d$2=Ln(u$1.object,{object:h$3=>h$3,isPrimitive:()=>!0,__tres:()=>y$3},{object:(h$3,P$2,C$3,b$4)=>{pn$1(h$3,C$3,b$4,{patchProp:l$1,remove:o$1,insert:n$2},e$3)},__tres:h$3=>{Object.assign(y$3,h$3)}})}else{let y$3=Ce$2.value[_$2];y$3||et$1(`${_$2} is not defined on the THREE namespace. Use extend to add it to the catalog.`),d$2=new y$3(...u$1.args)}return d$2?(d$2.isCamera&&(u$1!=null&&u$1.position||d$2.position.set(3,3,3),u$1!=null&&u$1.lookAt||d$2.lookAt(0,0,0)),d$2=z$2(d$2,{...d$2.__tres,type:_$2,memoizedProps:u$1,eventCount:0,primitive:i$1===`primitive`,attach:u$1.attach},e$3),d$2):null}function n$2(i$1,f$3){var _$2,d$2,y$3;if(!i$1)return;f$3||=t;let v$2=i$1.__tres?i$1:z$2(i$1,{},e$3),u$1=f$3.__tres?f$3:z$2(f$3,{},e$3);i$1=J$1(v$2),f$3=J$1(u$1),i$1.__tres&&(_$2=i$1.__tres)?.eventCount>0&&((d$2=e$3.eventManager)==null||d$2.registerObject(i$1)),e$3.registerCamera(i$1),(y$3=e$3.eventManager)==null||y$3.registerPointerMissedObject(i$1),v$2.__tres.attach?cn$2(u$1,v$2,v$2.__tres.attach):N$1(i$1)&&N$1(u$1)&&(u$1.add(i$1),i$1.dispatchEvent({type:`added`})),v$2.__tres.parent=u$1,u$1.__tres.objects&&!u$1.__tres.objects.includes(v$2)&&u$1.__tres.objects.push(v$2)}function o$1(i$1,f$3){var d$2,y$3,p$5,h$3;if(!i$1)return;i$1!=null&&i$1.__tres&&(d$2=i$1.__tres)?.eventCount>0&&((y$3=e$3.eventManager)==null||y$3.deregisterObject(i$1)),f$3=be$1(f$3)?`default`:f$3;let v$2=(p$5=i$1.__tres)?.dispose;be$1(v$2)||(f$3=v$2===null?!1:v$2);let u$1=(h$3=i$1.__tres)?.primitive,_$2=f$3===`default`?!u$1:!!f$3;if(i$1.__tres&&`objects`in i$1.__tres&&[...i$1.__tres.objects].forEach(P$2=>o$1(P$2,f$3)),_$2&&i$1.children&&[...i$1.children].forEach(P$2=>o$1(P$2,f$3)),_t$3(i$1,e$3),wt$3(i$1,e$3),_$2&&!Yr$1(i$1)){if(Y$1(f$3))f$3(i$1);else if(Y$1(i$1.dispose))try{i$1.dispose()}catch{}}`__tres`in i$1&&delete i$1.__tres}function l$1(i$1,f$3,v$2,u$1){var P$2,C$3;if(!i$1)return;let _$2=i$1,d$2=f$3;if(i$1.__tres&&(i$1.__tres.memoizedProps[f$3]=u$1),f$3===`attach`){let b$4=(P$2=i$1.__tres)?.parent||i$1.parent;o$1(i$1),z$2(i$1,{attach:u$1},e$3),b$4&&n$2(i$1,b$4);return}if(f$3===`dispose`){i$1.__tres||(i$1=z$2(i$1,{},e$3)),i$1.__tres.dispose=u$1;return}if(N$1(i$1)&&d$2===`blocks-pointer-events`){u$1||u$1===``?i$1[d$2]=u$1:delete i$1[d$2];return}tt$2.includes(f$3)&&i$1.__tres&&(i$1.__tres.eventCount+=1);let y$3=he$1(d$2),p$5=_$2?.[y$3];if(d$2===`args`){let b$4=i$1,E$2=v$2??[],S$2=u$1??[],M$1=(C$3=i$1.__tres)?.type||i$1.type;M$1&&E$2.length&&!tn$1(E$2,S$2)&&(_$2=Object.assign(b$4,new Ce$2.value[M$1](...u$1)));return}if(_$2.type===`BufferGeometry`){if(d$2===`args`)return;_$2.setAttribute(he$1(d$2),new BufferAttribute(...u$1));return}if(d$2.includes(`-`)&&p$5===void 0){p$5=_$2;for(let b$4 of d$2.split(`-`))y$3=d$2=he$1(b$4),_$2=p$5,p$5=p$5?.[d$2]}let h$3=u$1;if(h$3===``&&(h$3=!0),Y$1(p$5)){tt$2.includes(f$3)||(ke(h$3)?i$1[y$3](...h$3):i$1[y$3](h$3)),y$3.startsWith(`on`)&&Y$1(h$3)&&(_$2[y$3]=h$3);return}Ge$1(p$5)&&Ge$1(h$3)?p$5.mask=h$3.mask:mt$2(p$5)&&Ur$1(h$3)?p$5.set(h$3):Fr(p$5)&&Wr$1(h$3)&&p$5.constructor===h$3.constructor?p$5.copy(h$3):Me$1(p$5)&&Array.isArray(h$3)?`fromArray`in p$5&&typeof p$5.fromArray==`function`?p$5.fromArray(h$3):p$5.set(...h$3):Me$1(p$5)&&typeof h$3==`number`?`setScalar`in p$5&&typeof p$5.setScalar==`function`?p$5.setScalar(h$3):p$5.set(h$3):_$2[y$3]=h$3,yt$3(i$1)}function s$1(i$1){var f$3;return(f$3=i$1?.__tres)?.parent||null}function a$2(i$1){let f$3=z$2(new Object3D,{type:`Comment`},e$3);return f$3.name=i$1,f$3}function c$4(i$1){var _$2;let f$3=s$1(i$1),v$2=(_$2=f$3?.__tres)?.objects||[],u$1=v$2.indexOf(i$1);return u$1<0||u$1>=v$2.length-1?null:v$2[u$1+1]}return{insert:n$2,remove:o$1,createElement:r$2,patchProp:l$1,parentNode:s$1,createText:()=>void 0,createComment:a$2,setText:()=>void 0,setElementText:()=>void 0,nextSibling:c$4,querySelector:()=>void 0,setScopeId:()=>void 0,cloneNode:()=>void 0,insertStaticContent:()=>void 0}};function On$1(){return Ct$2().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ct$2(){return typeof navigator<`u`&&typeof window<`u`?window:typeof globalThis<`u`?globalThis:{}}const Dn$1=typeof Proxy==`function`,jn$1=`devtools-plugin:setup`,Bn$1=`plugin:settings:set`;let V$1,Te$3;function In$1(){var e$3;return V$1!==void 0||(typeof window<`u`&&window.performance?(V$1=!0,Te$3=window.performance):typeof globalThis<`u`&&(e$3=globalThis.perf_hooks)!=null&&e$3.performance?(V$1=!0,Te$3=globalThis.perf_hooks.performance):V$1=!1),V$1}function $n$1(){return In$1()?Te$3.now():Date.now()}var Hn=class{constructor(t,r$2){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=r$2;let n$2={};if(t.settings)for(let s$1 in t.settings){let a$2=t.settings[s$1];n$2[s$1]=a$2.defaultValue}let o$1=`__vue-devtools-plugin-settings__${t.id}`,l$1=Object.assign({},n$2);try{let s$1=localStorage.getItem(o$1),a$2=JSON.parse(s$1);Object.assign(l$1,a$2)}catch{}this.fallbacks={getSettings(){return l$1},setSettings(s$1){try{localStorage.setItem(o$1,JSON.stringify(s$1))}catch{}l$1=s$1},now(){return $n$1()}},r$2&&r$2.on(Bn$1,(s$1,a$2)=>{s$1===this.plugin.id&&this.fallbacks.setSettings(a$2)}),this.proxiedOn=new Proxy({},{get:(s$1,a$2)=>this.target?this.target.on[a$2]:(...c$4)=>{this.onQueue.push({method:a$2,args:c$4})}}),this.proxiedTarget=new Proxy({},{get:(s$1,a$2)=>this.target?this.target[a$2]:a$2===`on`?this.proxiedOn:Object.keys(this.fallbacks).includes(a$2)?(...c$4)=>(this.targetQueue.push({method:a$2,args:c$4,resolve:()=>{}}),this.fallbacks[a$2](...c$4)):(...c$4)=>new Promise(i$1=>{this.targetQueue.push({method:a$2,args:c$4,resolve:i$1})})})}async setRealTarget(t){this.target=t;for(let r$2 of this.onQueue)this.target.on[r$2.method](...r$2.args);for(let r$2 of this.targetQueue)r$2.resolve(await this.target[r$2.method](...r$2.args))}};function Un$1(e$3,t){let r$2=e$3,n$2=Ct$2(),o$1=On$1(),l$1=Dn$1&&r$2.enableEarlyProxy;if(o$1&&(n$2.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!l$1))o$1.emit(jn$1,e$3,t);else{let s$1=l$1?new Hn(r$2,o$1):null;(n$2.__VUE_DEVTOOLS_PLUGINS__=n$2.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:r$2,setupFn:t,proxy:s$1}),s$1&&t(s$1.proxiedTarget)}}function Fn(e$3,t){let r$2=`▲ ■ ●${e$3}`;typeof rt$4==`function`?rt$4(r$2,t):console.log(r$2)}function rt$4(e$3,t){throw Error(e$3+t)}const Et$1=e$3=>{let t={id:e$3.uuid,label:e$3.type,children:[],tags:[]};e$3.name!==``&&t.tags.push({label:e$3.name,textColor:5750629,backgroundColor:15793395});let r$2=Le$1(e$3);return r$2>0&&t.tags.push({label:`${wn$1(r$2)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:`Memory usage`}),e$3.type.includes(`Light`)&&(Gr$1(e$3)&&t.tags.push({label:`${e$3.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:`Intensity`}),t.tags.push({label:`#${new Color(e$3.color).getHexString()}`,textColor:9738662,backgroundColor:16316922,tooltip:`Color`})),e$3.type.includes(`Camera`)&&(t.tags.push({label:`${e$3.fov}°`,textColor:9738662,backgroundColor:16316922,tooltip:`Field of view`}),t.tags.push({label:`x: ${Math.round(e$3.position.x)} y: ${Math.round(e$3.position.y)} z: ${Math.round(e$3.position.z)}`,textColor:9738662,backgroundColor:16316922,tooltip:`Position`})),t};function Tt$3(e$3,t,r$2=``){e$3.children.forEach(n$2=>{if(n$2.type===`HightlightMesh`||r$2&&!n$2.type.includes(r$2)&&!n$2.name.includes(r$2))return;let o$1=Et$1(n$2);t.children.push(o$1),Tt$3(n$2,o$1,r$2)})}const Wn$1=[],X$1=`tres:inspector`,Nn=reactive({sceneGraph:null});function zn(e$3,t){Un$1({id:`dev.esm.tres`,label:`TresJS 🪐`,logo:`https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg`,packageName:`tresjs`,homepage:`https://tresjs.org`,componentStateTypes:Wn$1,app:e$3},r$2=>{typeof r$2.now!=`function`&&Fn(`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.`),r$2.addInspector({id:X$1,label:`TresJS 🪐`,icon:`account_tree`,treeFilterPlaceholder:`Search instances`}),setInterval(()=>{r$2.sendInspectorTree(X$1)},1e3),setInterval(()=>{r$2.notifyComponentUpdate()},5e3),r$2.on.getInspectorTree(l$1=>{if(l$1.inspectorId===X$1){let s$1=Et$1(t.scene.value);Tt$3(t.scene.value,s$1,l$1.filter),Nn.sceneGraph=s$1,l$1.rootNodes=[s$1]}});let n$2=null,o$1=null;r$2.on.getInspectorState(l$1=>{var s$1;if(l$1.inspectorId===X$1){let[a$2]=t.scene.value.getObjectsByProperty(`uuid`,l$1.nodeId);if(!a$2)return;if(o$1&&n$2&&n$2.parent&&o$1.remove(n$2),a$2.isMesh){let c$4=on$1(a$2);a$2.add(c$4),n$2=c$4,o$1=a$2}l$1.state={object:Object.entries(a$2).map(([c$4,i$1])=>c$4===`children`?{key:c$4,value:i$1.filter(f$3=>f$3.type!==`HightlightMesh`)}:{key:c$4,value:i$1,editable:!0}).filter(({key:c$4})=>c$4!==`parent`)},a$2.isScene&&(l$1.state={...l$1.state,state:[{key:`Scene Info`,value:{objects:a$2.children.length,memory:Le$1(a$2),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:(s$1=t.renderer.value.info.programs)?.map(c$4=>({...c$4,programName:c$4.name}))||[]}]})}}),r$2.on.editInspectorState(l$1=>{l$1.inspectorId===X$1&&nn$1(t.scene.value,l$1.nodeId,l$1.path,l$1.state.value)})})}const Gn$1=[`data-scene`,`data-tres`],Vn$1=defineComponent({__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$3,{expose:t,emit:r$2}){let n$2=e$3,o$1=r$2,l$1=useSlots(),s$1=ref(),a$2=shallowRef(new Scene),c$4=getCurrentInstance();Ee$1(three_module_exports);let i$1=(d$2,y$3=!1)=>defineComponent({setup(){var C$3;let p$5=(C$3=getCurrentInstance())?.appContext;p$5&&(p$5.app=c$4?.appContext.app);let h$3={};function P$2(b$4){b$4&&(b$4.parent&&P$2(b$4.parent),b$4.provides&&Object.assign(h$3,b$4.provides))}return c$4!=null&&c$4.parent&&n$2.enableProvideBridge&&(P$2(c$4.parent),Reflect.ownKeys(h$3).forEach(b$4=>{provide(b$4,h$3[b$4])})),provide(`useTres`,d$2),provide(`extend`,Ee$1),typeof window<`u`&&zn(p$5?.app,d$2),()=>h(Fragment,null,y$3?[]:l$1.default())}}),f$3=(d$2,y$3=!1)=>{let p$5=i$1(d$2,y$3),{render:h$3}=createRenderer(Rn$1(d$2));h$3(h(p$5),a$2.value)},v$2=(d$2,y$3=!1)=>{vt$3(d$2.scene.value),y$3&&(d$2.renderer.value.dispose(),d$2.renderer.value.renderLists.dispose(),d$2.renderer.value.forceContextLoss()),a$2.value.__tres={root:d$2}},u$1=shallowRef(null);t({context:u$1,dispose:()=>v$2(u$1.value,!0)});let _$2=()=>{v$2(u$1.value),f$3(u$1.value,!0)};return onMounted(()=>{let d$2=s$1;u$1.value=An({scene:a$2.value,canvas:d$2,windowSize:n$2.windowSize??!1,rendererOptions:n$2,emit:o$1});let{registerCamera:y$3,camera:p$5,cameras:h$3,deregisterCamera:P$2}=u$1.value;f$3(u$1.value);let C$3=()=>{let b$4=new PerspectiveCamera(45,window.innerWidth/window.innerHeight,.1,1e3);b$4.position.set(3,3,3),b$4.lookAt(0,0,0),y$3(b$4);let E$2=watchEffect(()=>{h$3.value.length>=2&&(b$4.removeFromParent(),P$2(b$4),E$2?.())})};watch(()=>n$2.camera,(b$4,E$2)=>{b$4&&y$3(b$4),E$2&&(E$2.removeFromParent(),P$2(E$2))},{immediate:!0}),p$5.value||C$3()}),onUnmounted(_$2),(d$2,y$3)=>(openBlock(),createElementBlock(`canvas`,{ref_key:`canvas`,ref:s$1,"data-scene":a$2.value.uuid,class:normalizeClass(d$2.$attrs.class),"data-tres":`tresjs ${unref(jr$1).version}`,style:normalizeStyle({display:`block`,width:`100%`,height:`100%`,position:d$2.windowSize?`fixed`:`relative`,top:0,left:0,pointerEvents:`auto`,touchAction:`none`,...d$2.$attrs.style})},null,14,Gn$1))}}),Yn$1=[`TresCanvas`,`TresLeches`,`TresScene`],co$1={template:{compilerOptions:{isCustomElement:e$3=>e$3.startsWith(`Tres`)&&!Yn$1.includes(e$3)||e$3===`primitive`}}},{logWarning:qn$1}=Q$2();var St$3=class extends Line{constructor(t,r$2){let n$2=[1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],o$1=new BufferGeometry;o$1.setAttribute(`position`,new Float32BufferAttribute(n$2,3)),o$1.computeBoundingSphere();let l$1=new LineBasicMaterial({fog:!1});super(o$1,l$1),this.light=t,this.color=r$2,this.type=`RectAreaLightHelper`;let s$1=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],a$2=new BufferGeometry;a$2.setAttribute(`position`,new Float32BufferAttribute(s$1,3)),a$2.computeBoundingSphere(),this.add(new Mesh(a$2,new MeshBasicMaterial({side:BackSide,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 t=this.material.color,r$2=Math.max(t.r,t.g,t.b);r$2>1&&t.multiplyScalar(1/r$2),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:nt$2}=Q$2();let se,F$1;const Kn={DirectionalLight:DirectionalLightHelper,PointLight:PointLightHelper,SpotLight:SpotLightHelper,HemisphereLight:HemisphereLightHelper,RectAreaLight:St$3},fo$1={mounted:e$3=>{if(!e$3.isLight){nt$2(`${e$3.type} is not a light`);return}se=Kn[e$3.type],e$3.parent.add(new se(e$3,1,e$3.color.getHex()))},updated:e$3=>{F$1=e$3.parent.children.find(t=>t instanceof se),!(F$1 instanceof St$3)&&F$1.update()},unmounted:e$3=>{if(!e$3.isLight){nt$2(`${e$3.type} is not a light`);return}F$1=e$3.parent.children.find(t=>t instanceof se),F$1&&F$1.dispose&&F$1.dispose(),e$3.parent&&e$3.parent.remove(F$1)}},po$1={mounted:(e$3,t)=>{if(t.arg){console.log(`v-log:${t.arg}`,e$3[t.arg]);return}console.log(`v-log`,e$3)}},mo={install(e$3){e$3.component(`TresCanvas`,Vn$1)}};var require_nprogress=__commonJSMin((exports,module)=>{(function(root$3,factory){typeof define==`function`&&define.amd?define(factory):typeof exports==`object`?module.exports=factory():root$3.NProgress=factory()})(exports,function(){var NProgress$1={};NProgress$1.version=`0.2.0`;var Settings=NProgress$1.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:`
`};NProgress$1.configure=function(options$1){var key$1,value$1;for(key$1 in options$1)value$1=options$1[key$1],value$1!==void 0&&options$1.hasOwnProperty(key$1)&&(Settings[key$1]=value$1);return this},NProgress$1.status=null,NProgress$1.set=function(n$2){var started=NProgress$1.isStarted();n$2=clamp$7(n$2,Settings.minimum,1),NProgress$1.status=n$2===1?null:n$2;var progress$1=NProgress$1.render(!started),bar=progress$1.querySelector(Settings.barSelector),speed=Settings.speed,ease=Settings.easing;return progress$1.offsetWidth,queue$1(function(next){Settings.positionUsing===``&&(Settings.positionUsing=NProgress$1.getPositioningCSS()),css(bar,barPositionCSS(n$2,speed,ease)),n$2===1?(css(progress$1,{transition:`none`,opacity:1}),progress$1.offsetWidth,setTimeout(function(){css(progress$1,{transition:`all `+speed+`ms linear`,opacity:0}),setTimeout(function(){NProgress$1.remove(),next()},speed)},speed)):setTimeout(next,speed)}),this},NProgress$1.isStarted=function(){return typeof NProgress$1.status==`number`},NProgress$1.start=function(){NProgress$1.status||NProgress$1.set(0);var work=function(){setTimeout(function(){NProgress$1.status&&(NProgress$1.trickle(),work())},Settings.trickleSpeed)};return Settings.trickle&&work(),this},NProgress$1.done=function(force){return!force&&!NProgress$1.status?this:NProgress$1.inc(.3+.5*Math.random()).set(1)},NProgress$1.inc=function(amount){var n$2=NProgress$1.status;return n$2?(typeof amount!=`number`&&(amount=(1-n$2)*clamp$7(Math.random()*n$2,.1,.95)),n$2=clamp$7(n$2+amount,0,.994),NProgress$1.set(n$2)):NProgress$1.start()},NProgress$1.trickle=function(){return NProgress$1.inc(Math.random()*Settings.trickleRate)},function(){var initial=0,current=0;NProgress$1.promise=function($promise){return!$promise||$promise.state()===`resolved`?this:(current===0&&NProgress$1.start(),initial++,current++,$promise.always(function(){current--,current===0?(initial=0,NProgress$1.done()):NProgress$1.set((initial-current)/initial)}),this)}}(),NProgress$1.render=function(fromStart){if(NProgress$1.isRendered())return document.getElementById(`nprogress`);addClass(document.documentElement,`nprogress-busy`);var progress$1=document.createElement(`div`);progress$1.id=`nprogress`,progress$1.innerHTML=Settings.template;var bar=progress$1.querySelector(Settings.barSelector),perc=fromStart?`-100`:toBarPerc(NProgress$1.status||0),parent=document.querySelector(Settings.parent),spinner;return css(bar,{transition:`all 0 linear`,transform:`translate3d(`+perc+`%,0,0)`}),Settings.showSpinner||(spinner=progress$1.querySelector(Settings.spinnerSelector),spinner&&removeElement(spinner)),parent!=document.body&&addClass(parent,`nprogress-custom-parent`),parent.appendChild(progress$1),progress$1},NProgress$1.remove=function(){removeClass(document.documentElement,`nprogress-busy`),removeClass(document.querySelector(Settings.parent),`nprogress-custom-parent`);var progress$1=document.getElementById(`nprogress`);progress$1&&removeElement(progress$1)},NProgress$1.isRendered=function(){return!!document.getElementById(`nprogress`)},NProgress$1.getPositioningCSS=function(){var bodyStyle=document.body.style,vendorPrefix=`WebkitTransform`in bodyStyle?`Webkit`:`MozTransform`in bodyStyle?`Moz`:`msTransform`in bodyStyle?`ms`:`OTransform`in bodyStyle?`O`:``;return vendorPrefix+`Perspective`in bodyStyle?`translate3d`:vendorPrefix+`Transform`in bodyStyle?`translate`:`margin`};function clamp$7(n$2,min$1,max$1){return n$2max$1?max$1:n$2}function toBarPerc(n$2){return(-1+n$2)*100}function barPositionCSS(n$2,speed,ease){var barCSS;return barCSS=Settings.positionUsing===`translate3d`?{transform:`translate3d(`+toBarPerc(n$2)+`%,0,0)`}:Settings.positionUsing===`translate`?{transform:`translate(`+toBarPerc(n$2)+`%,0)`}:{"margin-left":toBarPerc(n$2)+`%`},barCSS.transition=`all `+speed+`ms `+ease,barCSS}var queue$1=function(){var pending=[];function next(){var fn$6=pending.shift();fn$6&&fn$6(next)}return function(fn$6){pending.push(fn$6),pending.length==1&&next()}}(),css=function(){var cssPrefixes=[`Webkit`,`O`,`Moz`,`ms`],cssProps={};function camelCase(string$2){return string$2.replace(/^-ms-/,`ms-`).replace(/-([\da-z])/gi,function(match,letter){return letter.toUpperCase()})}function getVendorProp(name$2){var style=document.body.style;if(name$2 in style)return name$2;for(var i$1=cssPrefixes.length,capName=name$2.charAt(0).toUpperCase()+name$2.slice(1),vendorName;i$1--;)if(vendorName=cssPrefixes[i$1]+capName,vendorName in style)return vendorName;return name$2}function getStyleProp(name$2){return name$2=camelCase(name$2),cssProps[name$2]||(cssProps[name$2]=getVendorProp(name$2))}function applyCss(element$3,prop,value$1){prop=getStyleProp(prop),element$3.style[prop]=value$1}return function(element$3,properties){var args=arguments,prop,value$1;if(args.length==2)for(prop in properties)value$1=properties[prop],value$1!==void 0&&properties.hasOwnProperty(prop)&&applyCss(element$3,prop,value$1);else applyCss(element$3,args[1],args[2])}}();function hasClass(element$3,name$2){var list$2=typeof element$3==`string`?element$3:classList(element$3);return list$2.indexOf(` `+name$2+` `)>=0}function addClass(element$3,name$2){var oldList=classList(element$3),newList=oldList+name$2;hasClass(oldList,name$2)||(element$3.className=newList.substring(1))}function removeClass(element$3,name$2){var oldList=classList(element$3),newList;hasClass(element$3,name$2)&&(newList=oldList.replace(` `+name$2+` `,` `),element$3.className=newList.substring(1,newList.length-1))}function classList(element$3){return(` `+(element$3.className||``)+` `).replace(/\s+/gi,` `)}function removeElement(element$3){element$3&&element$3.parentNode&&element$3.parentNode.removeChild(element$3)}return NProgress$1})});const parents=new Set,coords=new WeakMap,siblings$1=new WeakMap,animations=new WeakMap,intersections=new WeakMap,intervals=new WeakMap,options=new WeakMap,debounces=new WeakMap,enabled=new WeakSet;let root$2,scrollX=0,scrollY=0;const TGT=`__aa_tgt`,DEL=`__aa_del`,NEW=`__aa_new`,handleMutations=mutations$1=>{let elements=getElements(mutations$1);elements&&elements.forEach(el$1=>animate$1(el$1))},handleResizes=entries=>{entries.forEach(entry=>{entry.target===root$2&&updateAllPos(),coords.has(entry.target)&&updatePos(entry.target)})};function observePosition(el$1){let oldObserver=intersections.get(el$1);oldObserver?.disconnect();let rect=coords.get(el$1),invocations=0,buffer$1=5;rect||(rect=getCoords(el$1),coords.set(el$1,rect));let{offsetWidth,offsetHeight}=root$2,rootMargins=[rect.top-buffer$1,offsetWidth-(rect.left+buffer$1+rect.width),offsetHeight-(rect.top+buffer$1+rect.height),rect.left-buffer$1],rootMargin=rootMargins.map(px$2=>`${-1*Math.floor(px$2)}px`).join(` `),observer=new IntersectionObserver(()=>{++invocations>1&&updatePos(el$1)},{root:root$2,threshold:1,rootMargin});observer.observe(el$1),intersections.set(el$1,observer)}function updatePos(el$1){clearTimeout(debounces.get(el$1));let optionsOrPlugin=getOptions(el$1),delay=isPlugin(optionsOrPlugin)?500:optionsOrPlugin.duration;debounces.set(el$1,setTimeout(async()=>{let currentAnimation=animations.get(el$1);try{await currentAnimation?.finished,coords.set(el$1,getCoords(el$1)),observePosition(el$1)}catch{}},delay))}function updateAllPos(){clearTimeout(debounces.get(root$2)),debounces.set(root$2,setTimeout(()=>{parents.forEach(parent=>forEach(parent,el$1=>lowPriority(()=>updatePos(el$1))))},100))}function poll(el$1){setTimeout(()=>{intervals.set(el$1,setInterval(()=>lowPriority(updatePos.bind(null,el$1)),2e3))},Math.round(2e3*Math.random()))}function lowPriority(callback){typeof requestIdleCallback==`function`?requestIdleCallback(()=>callback()):requestAnimationFrame(()=>callback())}let mutations,resize;const supportedBrowser=typeof window<`u`&&`ResizeObserver`in window;supportedBrowser&&(root$2=document.documentElement,mutations=new MutationObserver(handleMutations),resize=new ResizeObserver(handleResizes),window.addEventListener(`scroll`,()=>{scrollY=window.scrollY,scrollX=window.scrollX}),resize.observe(root$2));function getElements(mutations$1){let observedNodes=mutations$1.reduce((nodes,mutation)=>[...nodes,...Array.from(mutation.addedNodes),...Array.from(mutation.removedNodes)],[]),onlyCommentNodesObserved=observedNodes.every(node$1=>node$1.nodeName===`#comment`);return onlyCommentNodesObserved?!1:mutations$1.reduce((elements,mutation)=>{if(elements===!1)return!1;if(mutation.target instanceof Element){if(target(mutation.target),!elements.has(mutation.target)){elements.add(mutation.target);for(let i$1=0;i$1callback(parent,options.has(parent)));for(let i$1=0;i$1callback(child,options.has(child)))}}function getPluginTuple(pluginReturn){return Array.isArray(pluginReturn)?pluginReturn:[pluginReturn]}function isPlugin(config){return typeof config==`function`}function remain(el$1){let oldCoords=coords.get(el$1),newCoords=getCoords(el$1);if(!isEnabled(el$1))return coords.set(el$1,newCoords);let animation;if(!oldCoords)return;let pluginOrOptions=getOptions(el$1);if(typeof pluginOrOptions!=`function`){let deltaX=oldCoords.left-newCoords.left,deltaY=oldCoords.top-newCoords.top,[widthFrom,widthTo,heightFrom,heightTo]=getTransitionSizes(el$1,oldCoords,newCoords),start={transform:`translate(${deltaX}px, ${deltaY}px)`},end={transform:`translate(0, 0)`};widthFrom!==widthTo&&(start.width=`${widthFrom}px`,end.width=`${widthTo}px`),heightFrom!==heightTo&&(start.height=`${heightFrom}px`,end.height=`${heightTo}px`),animation=el$1.animate([start,end],{duration:pluginOrOptions.duration,easing:pluginOrOptions.easing})}else{let[keyframes$3]=getPluginTuple(pluginOrOptions(el$1,`remain`,oldCoords,newCoords));animation=new Animation(keyframes$3),animation.play()}animations.set(el$1,animation),coords.set(el$1,newCoords),animation.addEventListener(`finish`,updatePos.bind(null,el$1))}function add(el$1){NEW in el$1&&delete el$1[NEW];let newCoords=getCoords(el$1);coords.set(el$1,newCoords);let pluginOrOptions=getOptions(el$1);if(!isEnabled(el$1))return;let animation;if(typeof pluginOrOptions!=`function`)animation=el$1.animate([{transform:`scale(.98)`,opacity:0},{transform:`scale(0.98)`,opacity:0,offset:.5},{transform:`scale(1)`,opacity:1}],{duration:pluginOrOptions.duration*1.5,easing:`ease-in`});else{let[keyframes$3]=getPluginTuple(pluginOrOptions(el$1,`add`,newCoords));animation=new Animation(keyframes$3),animation.play()}animations.set(el$1,animation),animation.addEventListener(`finish`,updatePos.bind(null,el$1))}function cleanUp(el$1,styles){var _a$3;el$1.remove(),coords.delete(el$1),siblings$1.delete(el$1),animations.delete(el$1),(_a$3=intersections.get(el$1))==null||_a$3.disconnect(),setTimeout(()=>{if(DEL in el$1&&delete el$1[DEL],Object.defineProperty(el$1,NEW,{value:!0,configurable:!0}),styles&&el$1 instanceof HTMLElement)for(let style in styles)el$1.style[style]=``},0)}function remove(el$1){var _a$3;if(!siblings$1.has(el$1)||!coords.has(el$1))return;let[prev,next]=siblings$1.get(el$1);Object.defineProperty(el$1,DEL,{value:!0,configurable:!0});let finalX=window.scrollX,finalY=window.scrollY;if(next&&next.parentNode&&next.parentNode instanceof Element?next.parentNode.insertBefore(el$1,next):prev&&prev.parentNode?prev.parentNode.appendChild(el$1):(_a$3=getTarget(el$1))==null||_a$3.appendChild(el$1),!isEnabled(el$1))return cleanUp(el$1);let[top,left,width,height]=deletePosition(el$1),optionsOrPlugin=getOptions(el$1),oldCoords=coords.get(el$1);(finalX!==scrollX||finalY!==scrollY)&&adjustScroll(el$1,finalX,finalY,optionsOrPlugin);let animation,styleReset={position:`absolute`,top:`${top}px`,left:`${left}px`,width:`${width}px`,height:`${height}px`,margin:`0`,pointerEvents:`none`,transformOrigin:`center`,zIndex:`100`};if(!isPlugin(optionsOrPlugin))Object.assign(el$1.style,styleReset),animation=el$1.animate([{transform:`scale(1)`,opacity:1},{transform:`scale(.98)`,opacity:0}],{duration:optionsOrPlugin.duration,easing:`ease-out`});else{let[keyframes$3,options$1]=getPluginTuple(optionsOrPlugin(el$1,`remove`,oldCoords));options$1?.styleReset!==!1&&(styleReset=options$1?.styleReset||styleReset,Object.assign(el$1.style,styleReset)),animation=new Animation(keyframes$3),animation.play()}animations.set(el$1,animation),animation.addEventListener(`finish`,cleanUp.bind(null,el$1,styleReset))}function adjustScroll(el$1,finalX,finalY,optionsOrPlugin){let scrollDeltaX=scrollX-finalX,scrollDeltaY=scrollY-finalY,scrollBefore=document.documentElement.style.scrollBehavior,scrollBehavior=getComputedStyle(root$2).scrollBehavior;if(scrollBehavior===`smooth`&&(document.documentElement.style.scrollBehavior=`auto`),window.scrollTo(window.scrollX+scrollDeltaX,window.scrollY+scrollDeltaY),!el$1.parentElement)return;let parent=el$1.parentElement,lastHeight=parent.clientHeight,lastWidth=parent.clientWidth,startScroll=performance.now();function smoothScroll(){requestAnimationFrame(()=>{if(!isPlugin(optionsOrPlugin)){let deltaY=lastHeight-parent.clientHeight,deltaX=lastWidth-parent.clientWidth;startScroll+optionsOrPlugin.duration>performance.now()?(window.scrollTo({left:window.scrollX-deltaX,top:window.scrollY-deltaY}),lastHeight=parent.clientHeight,lastWidth=parent.clientWidth,smoothScroll()):document.documentElement.style.scrollBehavior=scrollBefore}})}smoothScroll()}function deletePosition(el$1){let oldCoords=coords.get(el$1),[width,,height]=getTransitionSizes(el$1,oldCoords,getCoords(el$1)),offsetParent=el$1.parentElement;for(;offsetParent&&(getComputedStyle(offsetParent).position===`static`||offsetParent instanceof HTMLBodyElement);)offsetParent=offsetParent.parentElement;offsetParent||=document.body;let parentStyles=getComputedStyle(offsetParent),parentCoords=coords.get(offsetParent)||getCoords(offsetParent),top=Math.round(oldCoords.top-parentCoords.top)-raw$2(parentStyles.borderTopWidth),left=Math.round(oldCoords.left-parentCoords.left)-raw$2(parentStyles.borderLeftWidth);return[top,left,width,height]}function autoAnimate(el$1,config={}){if(mutations&&resize){let mediaQuery=window.matchMedia(`(prefers-reduced-motion: reduce)`),isDisabledDueToReduceMotion=mediaQuery.matches&&!isPlugin(config)&&!config.disrespectUserMotionPreference;isDisabledDueToReduceMotion||(enabled.add(el$1),getComputedStyle(el$1).position===`static`&&Object.assign(el$1.style,{position:`relative`}),forEach(el$1,updatePos,poll,element$3=>resize?.observe(element$3)),isPlugin(config)?options.set(el$1,config):options.set(el$1,{duration:250,easing:`ease-in-out`,...config}),mutations.observe(el$1,{childList:!0}),parents.add(el$1))}return Object.freeze({parent:el$1,enable:()=>{enabled.add(el$1)},disable:()=>{enabled.delete(el$1)},isEnabled:()=>enabled.has(el$1)})}const vAutoAnimate={mounted:(el$1,binding)=>{autoAnimate(el$1,binding.value||{})},getSSRProps:()=>({})},vAutoAnimate$1=vAutoAnimate,autoAnimatePlugin={install(app){app.directive(`auto-animate`,vAutoAnimate$1)}};function isPlainObject$5(value$1){if(typeof value$1!=`object`||!value$1)return!1;let prototype=Object.getPrototypeOf(value$1);return prototype!==null&&prototype!==Object.prototype&&Object.getPrototypeOf(prototype)!==null||Symbol.iterator in value$1?!1:Symbol.toStringTag in value$1?Object.prototype.toString.call(value$1)===`[object Module]`:!0}function _defu(baseObject,defaults,namespace=`.`,merger){if(!isPlainObject$5(defaults))return _defu(baseObject,{},namespace,merger);let object=Object.assign({},defaults);for(let key$1 in baseObject){if(key$1===`__proto__`||key$1===`constructor`)continue;let value$1=baseObject[key$1];if(value$1==null||merger&&merger(object,key$1,value$1,namespace))continue;Array.isArray(value$1)&&Array.isArray(object[key$1])?object[key$1]=[...value$1,...object[key$1]]:isPlainObject$5(value$1)&&isPlainObject$5(object[key$1])?object[key$1]=_defu(value$1,object[key$1],(namespace?`${namespace}.`:``)+key$1.toString(),merger):object[key$1]=value$1}return object}function createDefu(merger){return(...arguments_)=>arguments_.reduce((p$5,c$4)=>_defu(p$5,c$4,``,merger),{})}const defu=createDefu(),defuFn=createDefu((object,key$1,currentValue)=>{if(object[key$1]!==void 0&&typeof currentValue==`function`)return object[key$1]=currentValue(object[key$1]),!0}),defuArrayFn=createDefu((object,key$1,currentValue)=>{if(Array.isArray(object[key$1])&&typeof currentValue==`function`)return object[key$1]=currentValue(object[key$1]),!0});function tryOnScopeDispose(fn$6){return getCurrentScope()?(onScopeDispose(fn$6),!0):!1}function createEventHook(){let fns=new Set,off=fn$6=>{fns.delete(fn$6)},clear=()=>{fns.clear()},on$2=fn$6=>{fns.add(fn$6);let offFn=()=>off(fn$6);return tryOnScopeDispose(offFn),{off:offFn}},trigger$1=(...args)=>Promise.all(Array.from(fns).map(fn$6=>fn$6(...args)));return{on:on$2,off,trigger:trigger$1,clear}}const localProvidedStateMap=new WeakMap,injectLocal=(...args)=>{var _a$3;let key$1=args[0],instance=(_a$3=getCurrentInstance())?.proxy;if(instance==null&&!hasInjectionContext())throw Error(`injectLocal must be called in setup`);return instance&&localProvidedStateMap.has(instance)&&key$1 in localProvidedStateMap.get(instance)?localProvidedStateMap.get(instance)[key$1]:inject(...args)},isClient$2=typeof window<`u`&&typeof document<`u`,isWorker=typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,notNullish=val=>val!=null,toString$2=Object.prototype.toString,isObject$1=val=>toString$2.call(val)===`[object Object]`,noop$2=()=>{},hasOwn$2=(val,key$1)=>Object.prototype.hasOwnProperty.call(val,key$1);function toRef$1(...args){if(args.length!==1)return toRef(...args);let r$2=args[0];return typeof r$2==`function`?readonly(customRef(()=>({get:r$2,set:noop$2}))):ref(r$2)}function createFilterWrapper(filter$1,fn$6){function wrapper(...args){return new Promise((resolve$1,reject)=>{Promise.resolve(filter$1(()=>fn$6.apply(this,args),{fn:fn$6,thisArg:this,args})).then(resolve$1).catch(reject)})}return wrapper}const bypassFilter=invoke$1=>invoke$1();function debounceFilter(ms$1,options$1={}){let timer,maxTimer,lastRejector=noop$2,_clearTimeout=timer2=>{clearTimeout(timer2),lastRejector(),lastRejector=noop$2},lastInvoker,filter$1=invoke$1=>{let duration=toValue$1(ms$1),maxDuration$1=toValue$1(options$1.maxWait);return timer&&_clearTimeout(timer),duration<=0||maxDuration$1!==void 0&&maxDuration$1<=0?(maxTimer&&(_clearTimeout(maxTimer),maxTimer=void 0),Promise.resolve(invoke$1())):new Promise((resolve$1,reject)=>{lastRejector=options$1.rejectOnCancel?reject:resolve$1,lastInvoker=invoke$1,maxDuration$1&&!maxTimer&&(maxTimer=setTimeout(()=>{timer&&_clearTimeout(timer),maxTimer=void 0,resolve$1(lastInvoker())},maxDuration$1)),timer=setTimeout(()=>{maxTimer&&_clearTimeout(maxTimer),maxTimer=void 0,resolve$1(invoke$1())},duration)})};return filter$1}function throttleFilter(...args){let lastExec=0,timer,isLeading=!0,lastRejector=noop$2,lastValue,ms$1,trailing,leading,rejectOnCancel;!isRef(args[0])&&typeof args[0]==`object`?{delay:ms$1,trailing=!0,leading=!0,rejectOnCancel=!1}=args[0]:[ms$1,trailing=!0,leading=!0,rejectOnCancel=!1]=args;let clear=()=>{timer&&(clearTimeout(timer),timer=void 0,lastRejector(),lastRejector=noop$2)},filter$1=_invoke=>{let duration=toValue$1(ms$1),elapsed=Date.now()-lastExec,invoke$1=()=>lastValue=_invoke();return clear(),duration<=0?(lastExec=Date.now(),invoke$1()):(elapsed>duration&&(leading||!isLeading)?(lastExec=Date.now(),invoke$1()):trailing&&(lastValue=new Promise((resolve$1,reject)=>{lastRejector=rejectOnCancel?reject:resolve$1,timer=setTimeout(()=>{lastExec=Date.now(),isLeading=!0,resolve$1(invoke$1()),clear()},Math.max(0,duration-elapsed))})),!leading&&!timer&&(timer=setTimeout(()=>isLeading=!0,duration)),isLeading=!1,lastValue)};return filter$1}function pausableFilter(extendFilter=bypassFilter,options$1={}){let{initialState=`active`}=options$1,isActive=toRef$1(initialState===`active`);function pause(){isActive.value=!1}function resume(){isActive.value=!0}let eventFilter=(...args)=>{isActive.value&&extendFilter(...args)};return{isActive:readonly(isActive),pause,resume,eventFilter}}function promiseTimeout(ms$1,throwOnTimeout=!1,reason=`Timeout`){return new Promise((resolve$1,reject)=>{throwOnTimeout?setTimeout(()=>reject(reason),ms$1):setTimeout(resolve$1,ms$1)})}function createSingletonPromise(fn$6){let _promise;function wrapper(){return _promise||=fn$6(),_promise}return wrapper.reset=async()=>{let _prev=_promise;_promise=void 0,_prev&&await _prev},wrapper}function increaseWithUnit(target$1,delta){var _a$3;if(typeof target$1==`number`)return target$1+delta;let value$1=(_a$3=target$1.match(/^-?\d+\.?\d*/))?.[0]||``,unit=target$1.slice(value$1.length),result=Number.parseFloat(value$1)+delta;return Number.isNaN(result)?target$1:result+unit}function pxValue(px$2){return px$2.endsWith(`rem`)?Number.parseFloat(px$2)*16:Number.parseFloat(px$2)}function objectPick(obj,keys$3,omitUndefined=!1){return keys$3.reduce((n$2,k$4)=>(k$4 in obj&&(!omitUndefined||obj[k$4]!==void 0)&&(n$2[k$4]=obj[k$4]),n$2),{})}function toArray(value$1){return Array.isArray(value$1)?value$1:[value$1]}function cacheStringFunction(fn$6){let cache$1=Object.create(null);return str=>{let hit=cache$1[str];return hit||(cache$1[str]=fn$6(str))}}const hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(str=>str.replace(hyphenateRE,`-$1`).toLowerCase()),camelizeRE=/-(\w)/g,camelize$1=cacheStringFunction(str=>str.replace(camelizeRE,(_$2,c$4)=>c$4?c$4.toUpperCase():``));function getLifeCycleTarget(target$1){return target$1||getCurrentInstance()}function useDebounceFn(fn$6,ms$1=200,options$1={}){return createFilterWrapper(debounceFilter(ms$1,options$1),fn$6)}function refDebounced(value$1,ms$1=200,options$1={}){let debounced=ref(toValue$1(value$1)),updater=useDebounceFn(()=>{debounced.value=value$1.value},ms$1,options$1);return watch(value$1,()=>updater()),shallowReadonly(debounced)}function useThrottleFn(fn$6,ms$1=200,trailing=!1,leading=!0,rejectOnCancel=!1){return createFilterWrapper(throttleFilter(ms$1,trailing,leading,rejectOnCancel),fn$6)}function refThrottled(value$1,delay=200,trailing=!0,leading=!0){if(delay<=0)return value$1;let throttled=ref(toValue$1(value$1)),updater=useThrottleFn(()=>{throttled.value=value$1.value},delay,trailing,leading);return watch(value$1,()=>updater()),throttled}function watchWithFilter(source,cb$1,options$1={}){let{eventFilter=bypassFilter,...watchOptions}=options$1;return watch(source,createFilterWrapper(eventFilter,cb$1),watchOptions)}function watchPausable(source,cb$1,options$1={}){let{eventFilter:filter$1,initialState=`active`,...watchOptions}=options$1,{eventFilter,pause,resume,isActive}=pausableFilter(filter$1,{initialState}),stop$1=watchWithFilter(source,cb$1,{...watchOptions,eventFilter});return{stop:stop$1,pause,resume,isActive}}function toRefs$1(objectRef,options$1={}){if(!isRef(objectRef))return toRefs(objectRef);let result=Array.isArray(objectRef.value)?Array.from({length:objectRef.value.length}):{};for(let key$1 in objectRef.value)result[key$1]=customRef(()=>({get(){return objectRef.value[key$1]},set(v$2){var _a$3;let replaceRef=(_a$3=toValue$1(options$1.replaceRef))??!0;if(replaceRef)if(Array.isArray(objectRef.value)){let copy=[...objectRef.value];copy[key$1]=v$2,objectRef.value=copy}else{let newObject={...objectRef.value,[key$1]:v$2};Object.setPrototypeOf(newObject,Object.getPrototypeOf(objectRef.value)),objectRef.value=newObject}else objectRef.value[key$1]=v$2}}));return result}function tryOnMounted(fn$6,sync$1=!0,target$1){let instance=getLifeCycleTarget(target$1);instance?onMounted(fn$6,target$1):sync$1?fn$6():nextTick(fn$6)}function tryOnUnmounted(fn$6,target$1){let instance=getLifeCycleTarget(target$1);instance&&onUnmounted(fn$6,target$1)}function createUntil(r$2,isNot=!1){function toMatch(condition,{flush=`sync`,deep=!1,timeout,throwOnTimeout}={}){let stop$1=null,watcher=new Promise(resolve$1=>{stop$1=watch(r$2,v$2=>{condition(v$2)!==isNot&&(stop$1?stop$1():nextTick(()=>stop$1?.()),resolve$1(v$2))},{flush,deep,immediate:!0})}),promises=[watcher];return timeout!=null&&promises.push(promiseTimeout(timeout,throwOnTimeout).then(()=>toValue$1(r$2)).finally(()=>stop$1?.())),Promise.race(promises)}function toBe(value$1,options$1){if(!isRef(value$1))return toMatch(v$2=>v$2===value$1,options$1);let{flush=`sync`,deep=!1,timeout,throwOnTimeout}=options$1??{},stop$1=null,watcher=new Promise(resolve$1=>{stop$1=watch([r$2,value$1],([v1,v2])=>{isNot!==(v1===v2)&&(stop$1?stop$1():nextTick(()=>stop$1?.()),resolve$1(v1))},{flush,deep,immediate:!0})}),promises=[watcher];return timeout!=null&&promises.push(promiseTimeout(timeout,throwOnTimeout).then(()=>toValue$1(r$2)).finally(()=>(stop$1?.(),toValue$1(r$2)))),Promise.race(promises)}function toBeTruthy(options$1){return toMatch(v$2=>!!v$2,options$1)}function toBeNull(options$1){return toBe(null,options$1)}function toBeUndefined(options$1){return toBe(void 0,options$1)}function toBeNaN(options$1){return toMatch(Number.isNaN,options$1)}function toContains(value$1,options$1){return toMatch(v$2=>{let array=Array.from(v$2);return array.includes(value$1)||array.includes(toValue$1(value$1))},options$1)}function changed(options$1){return changedTimes(1,options$1)}function changedTimes(n$2=1,options$1){let count$1=-1;return toMatch(()=>(count$1+=1,count$1>=n$2),options$1)}if(Array.isArray(toValue$1(r$2))){let instance={toMatch,toContains,changed,changedTimes,get not(){return createUntil(r$2,!isNot)}};return instance}else{let instance={toMatch,toBe,toBeTruthy,toBeNull,toBeNaN,toBeUndefined,changed,changedTimes,get not(){return createUntil(r$2,!isNot)}};return instance}}function until(r$2){return createUntil(r$2)}function useTimeoutFn(cb$1,interval,options$1={}){let{immediate=!0,immediateCallback=!1}=options$1,isPending=shallowRef(!1),timer;function clear(){timer&&(clearTimeout(timer),timer=void 0)}function stop$1(){isPending.value=!1,clear()}function start(...args){immediateCallback&&cb$1(),clear(),isPending.value=!0,timer=setTimeout(()=>{isPending.value=!1,timer=void 0,cb$1(...args)},toValue$1(interval))}return immediate&&(isPending.value=!0,isClient$2&&start()),tryOnScopeDispose(stop$1),{isPending:shallowReadonly(isPending),start,stop:stop$1}}function watchDebounced(source,cb$1,options$1={}){let{debounce=0,maxWait=void 0,...watchOptions}=options$1;return watchWithFilter(source,cb$1,{...watchOptions,eventFilter:debounceFilter(debounce,{maxWait})})}function watchImmediate(source,cb$1,options$1){return watch(source,cb$1,{...options$1,immediate:!0})}function computedAsync(evaluationCallback,initialState,optionsOrRef){let options$1;options$1=isRef(optionsOrRef)?{evaluating:optionsOrRef}:optionsOrRef||{};let{lazy=!1,flush=`pre`,evaluating=void 0,shallow=!0,onError=noop$2}=options$1,started=shallowRef(!lazy),current=shallow?shallowRef(initialState):ref(initialState),counter=0;return watchEffect(async onInvalidate=>{if(!started.value)return;counter++;let counterAtBeginning=counter,hasFinished=!1;evaluating&&Promise.resolve().then(()=>{evaluating.value=!0});try{let result=await evaluationCallback(cancelCallback=>{onInvalidate(()=>{evaluating&&(evaluating.value=!1),hasFinished||cancelCallback()})});counterAtBeginning===counter&&(current.value=result)}catch(e$3){onError(e$3)}finally{evaluating&&counterAtBeginning===counter&&(evaluating.value=!1),hasFinished=!0}},{flush}),lazy?computed(()=>(started.value=!0,current.value)):current}const defaultWindow$1=isClient$2?window:void 0,defaultDocument=isClient$2?window.document:void 0,defaultNavigator=isClient$2?window.navigator:void 0,defaultLocation=isClient$2?window.location:void 0;function unrefElement$1(elRef){var _a$3;let plain=toValue$1(elRef);return(_a$3=plain?.$el)??plain}function useEventListener$1(...args){let cleanups=[],cleanup=()=>{cleanups.forEach(fn$6=>fn$6()),cleanups.length=0},register=(el$1,event,listener,options$1)=>(el$1.addEventListener(event,listener,options$1),()=>el$1.removeEventListener(event,listener,options$1)),firstParamTargets=computed(()=>{let test$1=toArray(toValue$1(args[0])).filter(e$3=>e$3!=null);return test$1.every(e$3=>typeof e$3!=`string`)?test$1:void 0}),stopWatch=watchImmediate(()=>{var _a$3,_b;return[(_b=(_a$3=firstParamTargets.value)?.map(e$3=>unrefElement$1(e$3)))??[defaultWindow$1].filter(e$3=>e$3!=null),toArray(toValue$1(firstParamTargets.value?args[1]:args[0])),toArray(unref(firstParamTargets.value?args[2]:args[1])),toValue$1(firstParamTargets.value?args[3]:args[2])]},([raw_targets,raw_events,raw_listeners,raw_options])=>{if(cleanup(),!raw_targets?.length||!raw_events?.length||!raw_listeners?.length)return;let optionsClone=isObject$1(raw_options)?{...raw_options}:raw_options;cleanups.push(...raw_targets.flatMap(el$1=>raw_events.flatMap(event=>raw_listeners.map(listener=>register(el$1,event,listener,optionsClone)))))},{flush:`post`}),stop$1=()=>{stopWatch(),cleanup()};return tryOnScopeDispose(cleanup),stop$1}function useMounted$1(){let isMounted=shallowRef(!1),instance=getCurrentInstance();return instance&&onMounted(()=>{isMounted.value=!0},instance),isMounted}function useSupported(callback){let isMounted=useMounted$1();return computed(()=>(isMounted.value,!!callback()))}function useMutationObserver(target$1,callback,options$1={}){let{window:window$1=defaultWindow$1,...mutationOptions}=options$1,observer,isSupported=useSupported(()=>window$1&&`MutationObserver`in window$1),cleanup=()=>{observer&&(observer.disconnect(),observer=void 0)},targets=computed(()=>{let value$1=toValue$1(target$1),items=toArray(value$1).map(unrefElement$1).filter(notNullish);return new Set(items)}),stopWatch=watch(()=>targets.value,targets2=>{cleanup(),isSupported.value&&targets2.size&&(observer=new MutationObserver(callback),targets2.forEach(el$1=>observer.observe(el$1,mutationOptions)))},{immediate:!0,flush:`post`}),takeRecords=()=>observer?.takeRecords(),stop$1=()=>{stopWatch(),cleanup()};return tryOnScopeDispose(stop$1),{isSupported,stop:stop$1,takeRecords}}const ssrWidthSymbol=Symbol(`vueuse-ssr-width`);function useSSRWidth(){let ssrWidth=hasInjectionContext()?injectLocal(ssrWidthSymbol,null):null;return typeof ssrWidth==`number`?ssrWidth:void 0}function useMediaQuery(query,options$1={}){let{window:window$1=defaultWindow$1,ssrWidth=useSSRWidth()}=options$1,isSupported=useSupported(()=>window$1&&`matchMedia`in window$1&&typeof window$1.matchMedia==`function`),ssrSupport=shallowRef(typeof ssrWidth==`number`),mediaQuery=shallowRef(),matches$1=shallowRef(!1),handler=event=>{matches$1.value=event.matches};return watchEffect(()=>{if(ssrSupport.value){ssrSupport.value=!isSupported.value;let queryStrings=toValue$1(query).split(`,`);matches$1.value=queryStrings.some(queryString=>{let not=queryString.includes(`not all`),minWidth=queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),maxWidth=queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),res=!!(minWidth||maxWidth);return minWidth&&res&&(res=ssrWidth>=pxValue(minWidth[1])),maxWidth&&res&&(res=ssrWidth<=pxValue(maxWidth[1])),not?!res:res});return}isSupported.value&&(mediaQuery.value=window$1.matchMedia(toValue$1(query)),matches$1.value=mediaQuery.value.matches)}),useEventListener$1(mediaQuery,`change`,handler,{passive:!0}),computed(()=>matches$1.value)}const breakpointsTailwind={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function useBreakpoints(breakpoints,options$1={}){function getValue$2(k$4,delta){let v$2=toValue$1(breakpoints[toValue$1(k$4)]);return delta!=null&&(v$2=increaseWithUnit(v$2,delta)),typeof v$2==`number`&&(v$2=`${v$2}px`),v$2}let{window:window$1=defaultWindow$1,strategy=`min-width`,ssrWidth=useSSRWidth()}=options$1,ssrSupport=typeof ssrWidth==`number`,mounted=ssrSupport?shallowRef(!1):{value:!0};ssrSupport&&tryOnMounted(()=>mounted.value=!!window$1);function match(query,size$2){return!mounted.value&&ssrSupport?query===`min`?ssrWidth>=pxValue(size$2):ssrWidth<=pxValue(size$2):window$1?window$1.matchMedia(`(${query}-width: ${size$2})`).matches:!1}let greaterOrEqual=k$4=>useMediaQuery(()=>`(min-width: ${getValue$2(k$4)})`,options$1),smallerOrEqual=k$4=>useMediaQuery(()=>`(max-width: ${getValue$2(k$4)})`,options$1),shortcutMethods=Object.keys(breakpoints).reduce((shortcuts,k$4)=>(Object.defineProperty(shortcuts,k$4,{get:()=>strategy===`min-width`?greaterOrEqual(k$4):smallerOrEqual(k$4),enumerable:!0,configurable:!0}),shortcuts),{});function current(){let points=Object.keys(breakpoints).map(k$4=>[k$4,shortcutMethods[k$4],pxValue(getValue$2(k$4))]).sort((a$2,b$4)=>a$2[2]-b$4[2]);return computed(()=>points.filter(([,v$2])=>v$2.value).map(([k$4])=>k$4))}return Object.assign(shortcutMethods,{greaterOrEqual,smallerOrEqual,greater(k$4){return useMediaQuery(()=>`(min-width: ${getValue$2(k$4,.1)})`,options$1)},smaller(k$4){return useMediaQuery(()=>`(max-width: ${getValue$2(k$4,-.1)})`,options$1)},between(a$2,b$4){return useMediaQuery(()=>`(min-width: ${getValue$2(a$2)}) and (max-width: ${getValue$2(b$4,-.1)})`,options$1)},isGreater(k$4){return match(`min`,getValue$2(k$4,.1))},isGreaterOrEqual(k$4){return match(`min`,getValue$2(k$4))},isSmaller(k$4){return match(`max`,getValue$2(k$4,-.1))},isSmallerOrEqual(k$4){return match(`max`,getValue$2(k$4))},isInBetween(a$2,b$4){return match(`min`,getValue$2(a$2))&&match(`max`,getValue$2(b$4,-.1))},current,active(){let bps=current();return computed(()=>bps.value.length===0?``:bps.value.at(strategy===`min-width`?-1:0))}})}function usePermission(permissionDesc,options$1={}){let{controls=!1,navigator:navigator$1=defaultNavigator}=options$1,isSupported=useSupported(()=>navigator$1&&`permissions`in navigator$1),permissionStatus=shallowRef(),desc=typeof permissionDesc==`string`?{name:permissionDesc}:permissionDesc,state=shallowRef(),update=()=>{var _a$3,_b;state.value=(_b=(_a$3=permissionStatus.value)?.state)??`prompt`};useEventListener$1(permissionStatus,`change`,update,{passive:!0});let query=createSingletonPromise(async()=>{if(isSupported.value){if(!permissionStatus.value)try{permissionStatus.value=await navigator$1.permissions.query(desc)}catch{permissionStatus.value=void 0}finally{update()}if(controls)return toRaw(permissionStatus.value)}});return query(),controls?{state,isSupported,query}:state}function useClipboard(options$1={}){let{navigator:navigator$1=defaultNavigator,read=!1,source,copiedDuring=1500,legacy=!1}=options$1,isClipboardApiSupported=useSupported(()=>navigator$1&&`clipboard`in navigator$1),permissionRead=usePermission(`clipboard-read`),permissionWrite=usePermission(`clipboard-write`),isSupported=computed(()=>isClipboardApiSupported.value||legacy),text$5=shallowRef(``),copied=shallowRef(!1),timeout=useTimeoutFn(()=>copied.value=!1,copiedDuring,{immediate:!1});async function updateText(){let useLegacy=!(isClipboardApiSupported.value&&isAllowed(permissionRead.value));if(!useLegacy)try{text$5.value=await navigator$1.clipboard.readText()}catch{useLegacy=!0}useLegacy&&(text$5.value=legacyRead())}isSupported.value&&read&&useEventListener$1([`copy`,`cut`],updateText,{passive:!0});async function copy(value$1=toValue$1(source)){if(isSupported.value&&value$1!=null){let useLegacy=!(isClipboardApiSupported.value&&isAllowed(permissionWrite.value));if(!useLegacy)try{await navigator$1.clipboard.writeText(value$1)}catch{useLegacy=!0}useLegacy&&legacyCopy(value$1),text$5.value=value$1,copied.value=!0,timeout.start()}}function legacyCopy(value$1){let ta$1=document.createElement(`textarea`);ta$1.value=value$1??``,ta$1.style.position=`absolute`,ta$1.style.opacity=`0`,document.body.appendChild(ta$1),ta$1.select(),document.execCommand(`copy`),ta$1.remove()}function legacyRead(){var _a$3,_b,_c$1;return(_c$1=(_b=(_a$3=document==null?void 0:document.getSelection)?.call(document))?.toString())??``}function isAllowed(status){return status===`granted`||status===`prompt`}return{isSupported,text:text$5,copied,copy}}const _global$1=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},globalKey=`__vueuse_ssr_handlers__`,handlers$2=getHandlers();function getHandlers(){return globalKey in _global$1||(_global$1[globalKey]=_global$1[globalKey]||{}),_global$1[globalKey]}function getSSRHandler(key$1,fallback){return handlers$2[key$1]||fallback}function usePreferredDark(options$1){return useMediaQuery(`(prefers-color-scheme: dark)`,options$1)}function guessSerializerType(rawInit){return rawInit==null?`any`:rawInit instanceof Set?`set`:rawInit instanceof Map?`map`:rawInit instanceof Date?`date`:typeof rawInit==`boolean`?`boolean`:typeof rawInit==`string`?`string`:typeof rawInit==`object`?`object`:Number.isNaN(rawInit)?`any`:`number`}const StorageSerializers={boolean:{read:v$2=>v$2===`true`,write:v$2=>String(v$2)},object:{read:v$2=>JSON.parse(v$2),write:v$2=>JSON.stringify(v$2)},number:{read:v$2=>Number.parseFloat(v$2),write:v$2=>String(v$2)},any:{read:v$2=>v$2,write:v$2=>String(v$2)},string:{read:v$2=>v$2,write:v$2=>String(v$2)},map:{read:v$2=>new Map(JSON.parse(v$2)),write:v$2=>JSON.stringify(Array.from(v$2.entries()))},set:{read:v$2=>new Set(JSON.parse(v$2)),write:v$2=>JSON.stringify(Array.from(v$2))},date:{read:v$2=>new Date(v$2),write:v$2=>v$2.toISOString()}},customStorageEventName=`vueuse-storage`;function useStorage(key$1,defaults,storage,options$1={}){var _a$3;let{flush=`pre`,deep=!0,listenToStorageChanges=!0,writeDefaults=!0,mergeDefaults:mergeDefaults$1=!1,shallow,window:window$1=defaultWindow$1,eventFilter,onError=e$3=>{console.error(e$3)},initOnMounted}=options$1,data$12=(shallow?shallowRef:ref)(typeof defaults==`function`?defaults():defaults),keyComputed=computed(()=>toValue$1(key$1));if(!storage)try{storage=getSSRHandler(`getDefaultStorage`,()=>{var _a2;return(_a2=defaultWindow$1)?.localStorage})()}catch(e$3){onError(e$3)}if(!storage)return data$12;let rawInit=toValue$1(defaults),type=guessSerializerType(rawInit),serializer$1=(_a$3=options$1.serializer)??StorageSerializers[type],{pause:pauseWatch,resume:resumeWatch}=watchPausable(data$12,()=>write(data$12.value),{flush,deep,eventFilter});watch(keyComputed,()=>update(),{flush});let firstMounted=!1,onStorageEvent=ev$1=>{initOnMounted&&!firstMounted||update(ev$1)},onStorageCustomEvent=ev$1=>{initOnMounted&&!firstMounted||updateFromCustomEvent(ev$1)};window$1&&listenToStorageChanges&&(storage instanceof Storage?useEventListener$1(window$1,`storage`,onStorageEvent,{passive:!0}):useEventListener$1(window$1,customStorageEventName,onStorageCustomEvent)),initOnMounted?tryOnMounted(()=>{firstMounted=!0,update()}):update();function dispatchWriteEvent(oldValue,newValue){if(window$1){let payload={key:keyComputed.value,oldValue,newValue,storageArea:storage};window$1.dispatchEvent(storage instanceof Storage?new StorageEvent(`storage`,payload):new CustomEvent(customStorageEventName,{detail:payload}))}}function write(v$2){try{let oldValue=storage.getItem(keyComputed.value);if(v$2==null)dispatchWriteEvent(oldValue,null),storage.removeItem(keyComputed.value);else{let serialized=serializer$1.write(v$2);oldValue!==serialized&&(storage.setItem(keyComputed.value,serialized),dispatchWriteEvent(oldValue,serialized))}}catch(e$3){onError(e$3)}}function read(event){let rawValue=event?event.newValue:storage.getItem(keyComputed.value);if(rawValue==null)return writeDefaults&&rawInit!=null&&storage.setItem(keyComputed.value,serializer$1.write(rawInit)),rawInit;if(!event&&mergeDefaults$1){let value$1=serializer$1.read(rawValue);return typeof mergeDefaults$1==`function`?mergeDefaults$1(value$1,rawInit):type===`object`&&!Array.isArray(value$1)?{...rawInit,...value$1}:value$1}else if(typeof rawValue!=`string`)return rawValue;else return serializer$1.read(rawValue)}function update(event){if(!(event&&event.storageArea!==storage)){if(event&&event.key==null){data$12.value=rawInit;return}if(!(event&&event.key!==keyComputed.value)){pauseWatch();try{event?.newValue!==serializer$1.write(data$12.value)&&(data$12.value=read(event))}catch(e$3){onError(e$3)}finally{event?nextTick(resumeWatch):resumeWatch()}}}}function updateFromCustomEvent(event){update(event.detail)}return data$12}const CSS_DISABLE_TRANS=`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function useColorMode(options$1={}){let{selector=`html`,attribute=`class`,initialValue=`auto`,window:window$1=defaultWindow$1,storage,storageKey=`vueuse-color-scheme`,listenToStorageChanges=!0,storageRef,emitAuto,disableTransition=!0}=options$1,modes$1={auto:``,light:`light`,dark:`dark`,...options$1.modes||{}},preferredDark=usePreferredDark({window:window$1}),system=computed(()=>preferredDark.value?`dark`:`light`),store=storageRef||(storageKey==null?toRef$1(initialValue):useStorage(storageKey,initialValue,storage,{window:window$1,listenToStorageChanges})),state=computed(()=>store.value===`auto`?system.value:store.value),updateHTMLAttrs=getSSRHandler(`updateHTMLAttrs`,(selector2,attribute2,value$1)=>{let el$1=typeof selector2==`string`?window$1?.document.querySelector(selector2):unrefElement$1(selector2);if(!el$1)return;let classesToAdd=new Set,classesToRemove=new Set,attributeToChange=null;if(attribute2===`class`){let current=value$1.split(/\s/g);Object.values(modes$1).flatMap(i$1=>(i$1||``).split(/\s/g)).filter(Boolean).forEach(v$2=>{current.includes(v$2)?classesToAdd.add(v$2):classesToRemove.add(v$2)})}else attributeToChange={key:attribute2,value:value$1};if(classesToAdd.size===0&&classesToRemove.size===0&&attributeToChange===null)return;let style;disableTransition&&(style=window$1.document.createElement(`style`),style.appendChild(document.createTextNode(CSS_DISABLE_TRANS)),window$1.document.head.appendChild(style));for(let c$4 of classesToAdd)el$1.classList.add(c$4);for(let c$4 of classesToRemove)el$1.classList.remove(c$4);attributeToChange&&el$1.setAttribute(attributeToChange.key,attributeToChange.value),disableTransition&&(window$1.getComputedStyle(style).opacity,document.head.removeChild(style))});function defaultOnChanged(mode){var _a$3;updateHTMLAttrs(selector,attribute,(_a$3=modes$1[mode])??mode)}function onChanged(mode){options$1.onChanged?options$1.onChanged(mode,defaultOnChanged):defaultOnChanged(mode)}watch(state,onChanged,{flush:`post`,immediate:!0}),tryOnMounted(()=>onChanged(state.value));let auto=computed({get(){return emitAuto?store.value:state.value},set(v$2){store.value=v$2}});return Object.assign(auto,{store,system,state})}function useCssVar(prop,target$1,options$1={}){let{window:window$1=defaultWindow$1,initialValue,observe=!1}=options$1,variable=shallowRef(initialValue),elRef=computed(()=>{var _a$3;return unrefElement$1(target$1)||(_a$3=window$1?.document)?.documentElement});function updateCssVar(){var _a$3;let key$1=toValue$1(prop),el$1=toValue$1(elRef);if(el$1&&window$1&&key$1){let value$1=(_a$3=window$1.getComputedStyle(el$1).getPropertyValue(key$1))?.trim();variable.value=value$1||variable.value||initialValue}}return observe&&useMutationObserver(elRef,updateCssVar,{attributeFilter:[`style`,`class`],window:window$1}),watch([elRef,()=>toValue$1(prop)],(_$2,old)=>{old[0]&&old[1]&&old[0].style.removeProperty(old[1]),updateCssVar()},{immediate:!0}),watch([variable,elRef],([val,el$1])=>{let raw_prop=toValue$1(prop);el$1?.style&&raw_prop&&(val==null?el$1.style.removeProperty(raw_prop):el$1.style.setProperty(raw_prop,val))},{immediate:!0}),variable}function useDark(options$1={}){let{valueDark=`dark`,valueLight=``}=options$1,mode=useColorMode({...options$1,onChanged:(mode2,defaultHandler)=>{var _a$3;options$1.onChanged?(_a$3=options$1.onChanged)==null||_a$3.call(options$1,mode2===`dark`,defaultHandler,mode2):defaultHandler(mode2)},modes:{dark:valueDark,light:valueLight}}),system=computed(()=>mode.system.value),isDark=computed({get(){return mode.value===`dark`},set(v$2){let modeVal=v$2?`dark`:`light`;system.value===modeVal?mode.value=`auto`:mode.value=modeVal}});return isDark}function useDevicesList(options$1={}){let{navigator:navigator$1=defaultNavigator,requestPermissions=!1,constraints={audio:!0,video:!0},onUpdated:onUpdated$1}=options$1,devices=ref([]),videoInputs=computed(()=>devices.value.filter(i$1=>i$1.kind===`videoinput`)),audioInputs=computed(()=>devices.value.filter(i$1=>i$1.kind===`audioinput`)),audioOutputs=computed(()=>devices.value.filter(i$1=>i$1.kind===`audiooutput`)),isSupported=useSupported(()=>navigator$1&&navigator$1.mediaDevices&&navigator$1.mediaDevices.enumerateDevices),permissionGranted=shallowRef(!1),stream;async function update(){isSupported.value&&(devices.value=await navigator$1.mediaDevices.enumerateDevices(),onUpdated$1?.(devices.value),stream&&(stream.getTracks().forEach(t=>t.stop()),stream=null))}async function ensurePermissions(){let deviceName=constraints.video?`camera`:`microphone`;if(!isSupported.value)return!1;if(permissionGranted.value)return!0;let{state,query}=usePermission(deviceName,{controls:!0});if(await query(),state.value!==`granted`){let granted=!0;try{let allDevices=await navigator$1.mediaDevices.enumerateDevices(),hasCamera=allDevices.some(device=>device.kind===`videoinput`),hasMicrophone=allDevices.some(device=>device.kind===`audioinput`||device.kind===`audiooutput`);constraints.video=hasCamera?constraints.video:!1,constraints.audio=hasMicrophone?constraints.audio:!1,stream=await navigator$1.mediaDevices.getUserMedia(constraints)}catch{stream=null,granted=!1}update(),permissionGranted.value=granted}else permissionGranted.value=!0;return permissionGranted.value}return isSupported.value&&(requestPermissions&&ensurePermissions(),useEventListener$1(navigator$1.mediaDevices,`devicechange`,update,{passive:!0}),update()),{devices,ensurePermissions,permissionGranted,videoInputs,audioInputs,audioOutputs,isSupported}}function useResizeObserver(target$1,callback,options$1={}){let{window:window$1=defaultWindow$1,...observerOptions}=options$1,observer,isSupported=useSupported(()=>window$1&&`ResizeObserver`in window$1),cleanup=()=>{observer&&(observer.disconnect(),observer=void 0)},targets=computed(()=>{let _targets=toValue$1(target$1);return Array.isArray(_targets)?_targets.map(el$1=>unrefElement$1(el$1)):[unrefElement$1(_targets)]}),stopWatch=watch(targets,els=>{if(cleanup(),isSupported.value&&window$1){observer=new ResizeObserver(callback);for(let _el of els)_el&&observer.observe(_el,observerOptions)}},{immediate:!0,flush:`post`}),stop$1=()=>{cleanup(),stopWatch()};return tryOnScopeDispose(stop$1),{isSupported,stop:stop$1}}function useElementBounding(target$1,options$1={}){let{reset=!0,windowResize=!0,windowScroll=!0,immediate=!0,updateTiming=`sync`}=options$1,height=shallowRef(0),bottom=shallowRef(0),left=shallowRef(0),right=shallowRef(0),top=shallowRef(0),width=shallowRef(0),x$3=shallowRef(0),y$3=shallowRef(0);function recalculate(){let el$1=unrefElement$1(target$1);if(!el$1){reset&&(height.value=0,bottom.value=0,left.value=0,right.value=0,top.value=0,width.value=0,x$3.value=0,y$3.value=0);return}let rect=el$1.getBoundingClientRect();height.value=rect.height,bottom.value=rect.bottom,left.value=rect.left,right.value=rect.right,top.value=rect.top,width.value=rect.width,x$3.value=rect.x,y$3.value=rect.y}function update(){updateTiming===`sync`?recalculate():updateTiming===`next-frame`&&requestAnimationFrame(()=>recalculate())}return useResizeObserver(target$1,update),watch(()=>unrefElement$1(target$1),ele=>!ele&&update()),useMutationObserver(target$1,update,{attributeFilter:[`style`,`class`]}),windowScroll&&useEventListener$1(`scroll`,update,{capture:!0,passive:!0}),windowResize&&useEventListener$1(`resize`,update,{passive:!0}),tryOnMounted(()=>{immediate&&update()}),{height,bottom,left,right,top,width,x:x$3,y:y$3,update}}function useIntersectionObserver(target$1,callback,options$1={}){let{root:root$3,rootMargin=`0px`,threshold=0,window:window$1=defaultWindow$1,immediate=!0}=options$1,isSupported=useSupported(()=>window$1&&`IntersectionObserver`in window$1),targets=computed(()=>{let _target$1=toValue$1(target$1);return toArray(_target$1).map(unrefElement$1).filter(notNullish)}),cleanup=noop$2,isActive=shallowRef(immediate),stopWatch=isSupported.value?watch(()=>[targets.value,unrefElement$1(root$3),isActive.value],([targets2,root2])=>{if(cleanup(),!isActive.value||!targets2.length)return;let observer=new IntersectionObserver(callback,{root:unrefElement$1(root2),rootMargin,threshold});targets2.forEach(el$1=>el$1&&observer.observe(el$1)),cleanup=()=>{observer.disconnect(),cleanup=noop$2}},{immediate,flush:`post`}):noop$2,stop$1=()=>{cleanup(),stopWatch(),isActive.value=!1};return tryOnScopeDispose(stop$1),{isSupported,isActive,pause(){cleanup(),isActive.value=!1},resume(){isActive.value=!0},stop:stop$1}}const DEFAULT_OPTIONS={multiple:!0,accept:`*`,reset:!1,directory:!1};function prepareInitialFiles(files){if(!files)return null;if(files instanceof FileList)return files;let dt$5=new DataTransfer;for(let file of files)dt$5.items.add(file);return dt$5.files}function useFileDialog(options$1={}){let{document:document$3=defaultDocument}=options$1,files=ref(prepareInitialFiles(options$1.initialFiles)),{on:onChange,trigger:changeTrigger}=createEventHook(),{on:onCancel,trigger:cancelTrigger}=createEventHook(),input;document$3&&(input=unrefElement$1(options$1.input)||document$3.createElement(`input`),input.type=`file`,input.onchange=event=>{let result=event.target;files.value=result.files,changeTrigger(files.value)},input.oncancel=()=>{cancelTrigger()});let reset=()=>{files.value=null,input&&input.value&&(input.value=``,changeTrigger(null))},open$1=localOptions=>{if(!input)return;let _options={...DEFAULT_OPTIONS,...options$1,...localOptions};input.multiple=_options.multiple,input.accept=_options.accept,input.webkitdirectory=_options.directory,hasOwn$2(_options,`capture`)&&(input.capture=_options.capture),_options.reset&&reset(),input.click()};return{files:readonly(files),open:open$1,reset,onCancel,onChange}}const ARRIVED_STATE_THRESHOLD_PIXELS=1;function useScroll(element$3,options$1={}){let{throttle=0,idle=200,onStop=noop$2,onScroll=noop$2,offset:offset$2={left:0,right:0,top:0,bottom:0},observe:_observe={mutation:!1},eventListenerOptions={capture:!1,passive:!0},behavior=`auto`,window:window$1=defaultWindow$1,onError=e$3=>{console.error(e$3)}}=options$1,observe=typeof _observe==`boolean`?{mutation:_observe}:_observe,internalX=shallowRef(0),internalY=shallowRef(0),x$3=computed({get(){return internalX.value},set(x2){scrollTo(x2,void 0)}}),y$3=computed({get(){return internalY.value},set(y2){scrollTo(void 0,y2)}});function scrollTo(_x$1,_y$2){var _a$3,_b,_c$1,_d$1;if(!window$1)return;let _element=toValue$1(element$3);if(!_element)return;(_c$1=_element instanceof Document?window$1.document.body:_element)==null||_c$1.scrollTo({top:(_a$3=toValue$1(_y$2))??y$3.value,left:(_b=toValue$1(_x$1))??x$3.value,behavior:toValue$1(behavior)});let scrollContainer=(_d$1=_element?.document)?.documentElement||_element?.documentElement||_element;x$3!=null&&(internalX.value=scrollContainer.scrollLeft),y$3!=null&&(internalY.value=scrollContainer.scrollTop)}let isScrolling=shallowRef(!1),arrivedState=reactive({left:!0,right:!1,top:!0,bottom:!1}),directions=reactive({left:!1,right:!1,top:!1,bottom:!1}),onScrollEnd=e$3=>{isScrolling.value&&(isScrolling.value=!1,directions.left=!1,directions.right=!1,directions.top=!1,directions.bottom=!1,onStop(e$3))},onScrollEndDebounced=useDebounceFn(onScrollEnd,throttle+idle),setArrivedState=target$1=>{var _a$3;if(!window$1)return;let el$1=(_a$3=target$1?.document)?.documentElement||target$1?.documentElement||unrefElement$1(target$1),{display,flexDirection,direction}=getComputedStyle(el$1),directionMultipler=direction===`rtl`?-1:1,scrollLeft=el$1.scrollLeft;directions.left=scrollLeftinternalX.value;let left=Math.abs(scrollLeft*directionMultipler)<=(offset$2.left||0),right=Math.abs(scrollLeft*directionMultipler)+el$1.clientWidth>=el$1.scrollWidth-(offset$2.right||0)-ARRIVED_STATE_THRESHOLD_PIXELS;display===`flex`&&flexDirection===`row-reverse`?(arrivedState.left=right,arrivedState.right=left):(arrivedState.left=left,arrivedState.right=right),internalX.value=scrollLeft;let scrollTop=el$1.scrollTop;target$1===window$1.document&&!scrollTop&&(scrollTop=window$1.document.body.scrollTop),directions.top=scrollTopinternalY.value;let top=Math.abs(scrollTop)<=(offset$2.top||0),bottom=Math.abs(scrollTop)+el$1.clientHeight>=el$1.scrollHeight-(offset$2.bottom||0)-ARRIVED_STATE_THRESHOLD_PIXELS;display===`flex`&&flexDirection===`column-reverse`?(arrivedState.top=bottom,arrivedState.bottom=top):(arrivedState.top=top,arrivedState.bottom=bottom),internalY.value=scrollTop},onScrollHandler=e$3=>{var _a$3;if(!window$1)return;let eventTarget=(_a$3=e$3.target.documentElement)??e$3.target;setArrivedState(eventTarget),isScrolling.value=!0,onScrollEndDebounced(e$3),onScroll(e$3)};return useEventListener$1(element$3,`scroll`,throttle?useThrottleFn(onScrollHandler,throttle,!0,!1):onScrollHandler,eventListenerOptions),tryOnMounted(()=>{try{let _element=toValue$1(element$3);if(!_element)return;setArrivedState(_element)}catch(e$3){onError(e$3)}}),observe?.mutation&&element$3!=null&&element$3!==window$1&&element$3!==document&&useMutationObserver(element$3,()=>{let _element=toValue$1(element$3);_element&&setArrivedState(_element)},{attributes:!0,childList:!0,subtree:!0}),useEventListener$1(element$3,`scrollend`,onScrollEnd,eventListenerOptions),{x:x$3,y:y$3,isScrolling,arrivedState,directions,measure(){let _element=toValue$1(element$3);window$1&&_element&&setArrivedState(_element)}}}function useLocalStorage(key$1,initialValue,options$1={}){let{window:window$1=defaultWindow$1}=options$1;return useStorage(key$1,initialValue,window$1?.localStorage,options$1)}const UseMouseBuiltinExtractors={page:event=>[event.pageX,event.pageY],client:event=>[event.clientX,event.clientY],screen:event=>[event.screenX,event.screenY],movement:event=>event instanceof MouseEvent?[event.movementX,event.movementY]:null};function useMouse(options$1={}){let{type=`page`,touch=!0,resetOnTouchEnds=!1,initialValue={x:0,y:0},window:window$1=defaultWindow$1,target:target$1=window$1,scroll=!0,eventFilter}=options$1,_prevMouseEvent=null,_prevScrollX=0,_prevScrollY=0,x$3=shallowRef(initialValue.x),y$3=shallowRef(initialValue.y),sourceType=shallowRef(null),extractor=typeof type==`function`?type:UseMouseBuiltinExtractors[type],mouseHandler=event=>{let result=extractor(event);_prevMouseEvent=event,result&&([x$3.value,y$3.value]=result,sourceType.value=`mouse`),window$1&&(_prevScrollX=window$1.scrollX,_prevScrollY=window$1.scrollY)},touchHandler=event=>{if(event.touches.length>0){let result=extractor(event.touches[0]);result&&([x$3.value,y$3.value]=result,sourceType.value=`touch`)}},scrollHandler=()=>{if(!_prevMouseEvent||!window$1)return;let pos=extractor(_prevMouseEvent);_prevMouseEvent instanceof MouseEvent&&pos&&(x$3.value=pos[0]+window$1.scrollX-_prevScrollX,y$3.value=pos[1]+window$1.scrollY-_prevScrollY)},reset=()=>{x$3.value=initialValue.x,y$3.value=initialValue.y},mouseHandlerWrapper=eventFilter?event=>eventFilter(()=>mouseHandler(event),{}):event=>mouseHandler(event),touchHandlerWrapper=eventFilter?event=>eventFilter(()=>touchHandler(event),{}):event=>touchHandler(event),scrollHandlerWrapper=eventFilter?()=>eventFilter(()=>scrollHandler(),{}):()=>scrollHandler();if(target$1){let listenerOptions={passive:!0};useEventListener$1(target$1,[`mousemove`,`dragover`],mouseHandlerWrapper,listenerOptions),touch&&type!==`movement`&&(useEventListener$1(target$1,[`touchstart`,`touchmove`],touchHandlerWrapper,listenerOptions),resetOnTouchEnds&&useEventListener$1(target$1,`touchend`,reset,listenerOptions)),scroll&&type===`page`&&useEventListener$1(window$1,`scroll`,scrollHandlerWrapper,listenerOptions)}return{x:x$3,y:y$3,sourceType}}function useObjectUrl(object){let url=shallowRef(),release=()=>{url.value&&URL.revokeObjectURL(url.value),url.value=void 0};return watch(()=>toValue$1(object),newObject=>{release(),newObject&&(url.value=URL.createObjectURL(newObject))},{immediate:!0}),tryOnScopeDispose(release),readonly(url)}const defaultState={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},keys$1=Object.keys(defaultState);function usePointer(options$1={}){let{target:target$1=defaultWindow$1}=options$1,isInside=shallowRef(!1),state=ref(options$1.initialValue||{});Object.assign(state.value,defaultState,state.value);let handler=event=>{isInside.value=!0,!(options$1.pointerTypes&&!options$1.pointerTypes.includes(event.pointerType))&&(state.value=objectPick(event,keys$1,!1))};if(target$1){let listenerOptions={passive:!0};useEventListener$1(target$1,[`pointerdown`,`pointermove`,`pointerup`],handler,listenerOptions),useEventListener$1(target$1,`pointerleave`,()=>isInside.value=!1,listenerOptions)}return{...toRefs$1(state),isInside}}const topVarName=`--vueuse-safe-area-top`,rightVarName=`--vueuse-safe-area-right`,bottomVarName=`--vueuse-safe-area-bottom`,leftVarName=`--vueuse-safe-area-left`;function useScreenSafeArea(){let top=shallowRef(``),right=shallowRef(``),bottom=shallowRef(``),left=shallowRef(``);if(isClient$2){let topCssVar=useCssVar(topVarName),rightCssVar=useCssVar(rightVarName),bottomCssVar=useCssVar(bottomVarName),leftCssVar=useCssVar(leftVarName);topCssVar.value=`env(safe-area-inset-top, 0px)`,rightCssVar.value=`env(safe-area-inset-right, 0px)`,bottomCssVar.value=`env(safe-area-inset-bottom, 0px)`,leftCssVar.value=`env(safe-area-inset-left, 0px)`,tryOnMounted(update),useEventListener$1(`resize`,useDebounceFn(update),{passive:!0})}function update(){top.value=getValue(topVarName),right.value=getValue(rightVarName),bottom.value=getValue(bottomVarName),left.value=getValue(leftVarName)}return{top,right,bottom,left,update}}function getValue(position$2){return getComputedStyle(document.documentElement).getPropertyValue(position$2)}const DEFAULT_UNITS=[{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 useUserMedia(options$1={}){var _a$3,_b;let enabled$1=shallowRef((_a$3=options$1.enabled)??!1),autoSwitch=shallowRef((_b=options$1.autoSwitch)??!0),constraints=ref(options$1.constraints),{navigator:navigator$1=defaultNavigator}=options$1,isSupported=useSupported(()=>{var _a2;return(_a2=navigator$1?.mediaDevices)?.getUserMedia}),stream=shallowRef();function getDeviceOptions(type){switch(type){case`video`:if(constraints.value)return constraints.value.video||!1;break;case`audio`:if(constraints.value)return constraints.value.audio||!1;break}}async function _start$1(){if(!(!isSupported.value||stream.value))return stream.value=await navigator$1.mediaDevices.getUserMedia({video:getDeviceOptions(`video`),audio:getDeviceOptions(`audio`)}),stream.value}function _stop(){var _a2;(_a2=stream.value)==null||_a2.getTracks().forEach(t=>t.stop()),stream.value=void 0}function stop$1(){_stop(),enabled$1.value=!1}async function start(){return await _start$1(),stream.value&&(enabled$1.value=!0),stream.value}async function restart(){return _stop(),await start()}return watch(enabled$1,v$2=>{v$2?_start$1():_stop()},{immediate:!0}),watch(constraints,()=>{autoSwitch.value&&stream.value&&restart()},{immediate:!0}),tryOnScopeDispose(()=>{stop$1()}),{isSupported,stream,start,stop:stop$1,restart,constraints,enabled:enabled$1,autoSwitch}}function useWebWorker(arg0,workerOptions,options$1){let{window:window$1=defaultWindow$1}=options$1??{},data$12=ref(null),worker=shallowRef(),post=(...args)=>{worker.value&&worker.value.postMessage(...args)},terminate=function(){worker.value&&worker.value.terminate()};return window$1&&(typeof arg0==`string`?worker.value=new Worker(arg0,workerOptions):typeof arg0==`function`?worker.value=arg0():worker.value=arg0,worker.value.onmessage=e$3=>{data$12.value=e$3.data},tryOnScopeDispose(()=>{worker.value&&worker.value.terminate()})),{data:data$12,post,terminate,worker}}function useWindowSize(options$1={}){let{window:window$1=defaultWindow$1,initialWidth=1/0,initialHeight=1/0,listenOrientation=!0,includeScrollbar=!0,type=`inner`}=options$1,width=shallowRef(initialWidth),height=shallowRef(initialHeight),update=()=>{if(window$1)if(type===`outer`)width.value=window$1.outerWidth,height.value=window$1.outerHeight;else if(type===`visual`&&window$1.visualViewport){let{width:visualViewportWidth,height:visualViewportHeight,scale:scale$1}=window$1.visualViewport;width.value=Math.round(visualViewportWidth*scale$1),height.value=Math.round(visualViewportHeight*scale$1)}else includeScrollbar?(width.value=window$1.innerWidth,height.value=window$1.innerHeight):(width.value=window$1.document.documentElement.clientWidth,height.value=window$1.document.documentElement.clientHeight)};update(),tryOnMounted(update);let listenerOptions={passive:!0};if(useEventListener$1(`resize`,update,listenerOptions),window$1&&type===`visual`&&window$1.visualViewport&&useEventListener$1(window$1.visualViewport,`resize`,update,listenerOptions),listenOrientation){let matches$1=useMediaQuery(`(orientation: portrait)`);watch(matches$1,()=>update())}return{width,height}}const defaultTimestep=1/60*1e3,getCurrentTime=typeof performance<`u`?()=>performance.now():()=>Date.now(),onNextFrame=typeof window<`u`?callback=>window.requestAnimationFrame(callback):callback=>setTimeout(()=>callback(getCurrentTime()),defaultTimestep);function createRenderStep(runNextFrame$1){let toRun=[],toRunNextFrame=[],numToRun=0,isProcessing$1=!1,flushNextFrame=!1,toKeepAlive=new WeakSet,step={schedule:(callback,keepAlive=!1,immediate=!1)=>{let addToCurrentFrame=immediate&&isProcessing$1,buffer$1=addToCurrentFrame?toRun:toRunNextFrame;return keepAlive&&toKeepAlive.add(callback),buffer$1.indexOf(callback)===-1&&(buffer$1.push(callback),addToCurrentFrame&&isProcessing$1&&(numToRun=toRun.length)),callback},cancel:callback=>{let index$1=toRunNextFrame.indexOf(callback);index$1!==-1&&toRunNextFrame.splice(index$1,1),toKeepAlive.delete(callback)},process:frameData=>{if(isProcessing$1){flushNextFrame=!0;return}if(isProcessing$1=!0,[toRun,toRunNextFrame]=[toRunNextFrame,toRun],toRunNextFrame.length=0,numToRun=toRun.length,numToRun)for(let i$1=0;i$1(acc[key$1]=createRenderStep(()=>runNextFrame=!0),acc),{}),sync=stepsOrder.reduce((acc,key$1)=>{let step=steps[key$1];return acc[key$1]=(process$1,keepAlive=!1,immediate=!1)=>(runNextFrame||startLoop(),step.schedule(process$1,keepAlive,immediate)),acc},{}),cancelSync=stepsOrder.reduce((acc,key$1)=>(acc[key$1]=steps[key$1].cancel,acc),{}),flushSync=stepsOrder.reduce((acc,key$1)=>(acc[key$1]=()=>steps[key$1].process(frame),acc),{}),processStep=stepId=>steps[stepId].process(frame),processFrame=timestamp$2=>{runNextFrame=!1,frame.delta=useDefaultElapsed?defaultTimestep:Math.max(Math.min(timestamp$2-frame.timestamp,maxElapsed),1),frame.timestamp=timestamp$2,isProcessing=!0,stepsOrder.forEach(processStep),isProcessing=!1,runNextFrame&&(useDefaultElapsed=!1,onNextFrame(processFrame))},startLoop=()=>{runNextFrame=!0,useDefaultElapsed=!0,isProcessing||onNextFrame(processFrame)},getFrameData=()=>frame;var es_default=sync;function __rest(s$1,e$3){var t={};for(var p$5 in s$1)Object.prototype.hasOwnProperty.call(s$1,p$5)&&e$3.indexOf(p$5)<0&&(t[p$5]=s$1[p$5]);if(s$1!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i$1=0,p$5=Object.getOwnPropertySymbols(s$1);i$1Math.min(Math.max(v$2,min$1),max$1),safeMin=.001,minDuration=.01,maxDuration=10,minDamping=.05,maxDamping=1;function findSpring({duration=800,bounce=.25,velocity=0,mass=1}){let envelope,derivative;warning(duration<=maxDuration*1e3,`Spring duration must be 10 seconds or less`);let dampingRatio=1-bounce;dampingRatio=clamp$2(minDamping,maxDamping,dampingRatio),duration=clamp$2(minDuration,maxDuration,duration/1e3),dampingRatio<1?(envelope=undampedFreq$1=>{let exponentialDecay=undampedFreq$1*dampingRatio,delta=exponentialDecay*duration,a$2=exponentialDecay-velocity,b$4=calcAngularFreq(undampedFreq$1,dampingRatio),c$4=Math.exp(-delta);return safeMin-a$2/b$4*c$4},derivative=undampedFreq$1=>{let exponentialDecay=undampedFreq$1*dampingRatio,delta=exponentialDecay*duration,d$2=delta*velocity+velocity,e$3=dampingRatio**2*undampedFreq$1**2*duration,f$3=Math.exp(-delta),g$2=calcAngularFreq(undampedFreq$1**2,dampingRatio),factor$1=-envelope(undampedFreq$1)+safeMin>0?-1:1;return factor$1*((d$2-e$3)*f$3)/g$2}):(envelope=undampedFreq$1=>{let a$2=Math.exp(-undampedFreq$1*duration),b$4=(undampedFreq$1-velocity)*duration+1;return-safeMin+a$2*b$4},derivative=undampedFreq$1=>{let a$2=Math.exp(-undampedFreq$1*duration),b$4=(velocity-undampedFreq$1)*(duration*duration);return a$2*b$4});let initialGuess=5/duration,undampedFreq=approximateRoot(envelope,derivative,initialGuess);if(duration*=1e3,isNaN(undampedFreq))return{stiffness:100,damping:10,duration};{let stiffness=undampedFreq**2*mass;return{stiffness,damping:dampingRatio*2*Math.sqrt(mass*stiffness),duration}}}const rootIterations=12;function approximateRoot(envelope,derivative,initialGuess){let result=initialGuess;for(let i$1=1;i$1options$1[key$1]!==void 0)}function getSpringOptions(options$1){let springOptions=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},options$1);if(!isSpringType(options$1,physicsKeys)&&isSpringType(options$1,durationKeys)){let derived=findSpring(options$1);springOptions=Object.assign(Object.assign(Object.assign({},springOptions),derived),{velocity:0,mass:1}),springOptions.isResolvedFromDuration=!0}return springOptions}function spring(_a$3){var{from=0,to:to$2=1,restSpeed=2,restDelta}=_a$3,options$1=__rest(_a$3,[`from`,`to`,`restSpeed`,`restDelta`]);let state={done:!1,value:from},{stiffness,damping,mass,velocity,duration,isResolvedFromDuration}=getSpringOptions(options$1),resolveSpring=zero,resolveVelocity=zero;function createSpring(){let initialVelocity=velocity?-(velocity/1e3):0,initialDelta=to$2-from,dampingRatio=damping/(2*Math.sqrt(stiffness*mass)),undampedAngularFreq=Math.sqrt(stiffness/mass)/1e3;if(restDelta===void 0&&(restDelta=Math.min(Math.abs(to$2-from)/100,.4)),dampingRatio<1){let angularFreq=calcAngularFreq(undampedAngularFreq,dampingRatio);resolveSpring=t=>{let envelope=Math.exp(-dampingRatio*undampedAngularFreq*t);return to$2-envelope*((initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)/angularFreq*Math.sin(angularFreq*t)+initialDelta*Math.cos(angularFreq*t))},resolveVelocity=t=>{let envelope=Math.exp(-dampingRatio*undampedAngularFreq*t);return dampingRatio*undampedAngularFreq*envelope*(Math.sin(angularFreq*t)*(initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)/angularFreq+initialDelta*Math.cos(angularFreq*t))-envelope*(Math.cos(angularFreq*t)*(initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)-angularFreq*initialDelta*Math.sin(angularFreq*t))}}else if(dampingRatio===1)resolveSpring=t=>to$2-Math.exp(-undampedAngularFreq*t)*(initialDelta+(initialVelocity+undampedAngularFreq*initialDelta)*t);else{let dampedAngularFreq=undampedAngularFreq*Math.sqrt(dampingRatio*dampingRatio-1);resolveSpring=t=>{let envelope=Math.exp(-dampingRatio*undampedAngularFreq*t),freqForT=Math.min(dampedAngularFreq*t,300);return to$2-envelope*((initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)*Math.sinh(freqForT)+dampedAngularFreq*initialDelta*Math.cosh(freqForT))/dampedAngularFreq}}}return createSpring(),{next:t=>{let current=resolveSpring(t);if(isResolvedFromDuration)state.done=t>=duration;else{let currentVelocity=resolveVelocity(t)*1e3,isBelowVelocityThreshold=Math.abs(currentVelocity)<=restSpeed,isBelowDisplacementThreshold=Math.abs(to$2-current)<=restDelta;state.done=isBelowVelocityThreshold&&isBelowDisplacementThreshold}return state.value=state.done?to$2:current,state},flipTarget:()=>{velocity=-velocity,[from,to$2]=[to$2,from],createSpring()}}}spring.needsInterpolation=(a$2,b$4)=>typeof a$2==`string`||typeof b$4==`string`;const zero=_t$4=>0,progress=(from,to$2,value$1)=>{let toFromDifference=to$2-from;return toFromDifference===0?1:(value$1-from)/toFromDifference},mix=(from,to$2,progress$1)=>-progress$1*from+progress$1*to$2+from,clamp$3=(min$1,max$1)=>v$2=>Math.max(Math.min(v$2,max$1),min$1),sanitize=v$2=>v$2%1?Number(v$2.toFixed(5)):v$2,floatRegex=/(-)?([\d]*\.?[\d])+/g,colorRegex=/(#[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,singleColorRegex=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function isString$1(v$2){return typeof v$2==`string`}const number$2={test:v$2=>typeof v$2==`number`,parse:parseFloat,transform:v$2=>v$2},alpha=Object.assign(Object.assign({},number$2),{transform:clamp$3(0,1)}),scale=Object.assign(Object.assign({},number$2),{default:1}),createUnitType=unit=>({test:v$2=>isString$1(v$2)&&v$2.endsWith(unit)&&v$2.split(` `).length===1,parse:parseFloat,transform:v$2=>`${v$2}${unit}`}),degrees=createUnitType(`deg`),percent=createUnitType(`%`),px=createUnitType(`px`),vh$1=createUnitType(`vh`),vw=createUnitType(`vw`),progressPercentage=Object.assign(Object.assign({},percent),{parse:v$2=>percent.parse(v$2)/100,transform:v$2=>percent.transform(v$2*100)}),isColorString=(type,testProp)=>v$2=>!!(isString$1(v$2)&&singleColorRegex.test(v$2)&&v$2.startsWith(type)||testProp&&Object.prototype.hasOwnProperty.call(v$2,testProp)),splitColor=(aName,bName,cName)=>v$2=>{if(!isString$1(v$2))return v$2;let[a$2,b$4,c$4,alpha$1]=v$2.match(floatRegex);return{[aName]:parseFloat(a$2),[bName]:parseFloat(b$4),[cName]:parseFloat(c$4),alpha:alpha$1===void 0?1:parseFloat(alpha$1)}},hsla={test:isColorString(`hsl`,`hue`),parse:splitColor(`hue`,`saturation`,`lightness`),transform:({hue:hue$2,saturation,lightness,alpha:alpha$1=1})=>`hsla(`+Math.round(hue$2)+`, `+percent.transform(sanitize(saturation))+`, `+percent.transform(sanitize(lightness))+`, `+sanitize(alpha.transform(alpha$1))+`)`},clampRgbUnit=clamp$3(0,255),rgbUnit=Object.assign(Object.assign({},number$2),{transform:v$2=>Math.round(clampRgbUnit(v$2))}),rgba={test:isColorString(`rgb`,`red`),parse:splitColor(`red`,`green`,`blue`),transform:({red,green,blue,alpha:alpha$1=1})=>`rgba(`+rgbUnit.transform(red)+`, `+rgbUnit.transform(green)+`, `+rgbUnit.transform(blue)+`, `+sanitize(alpha.transform(alpha$1))+`)`};function parseHex$1(v$2){let r$2=``,g$2=``,b$4=``,a$2=``;return v$2.length>5?(r$2=v$2.substr(1,2),g$2=v$2.substr(3,2),b$4=v$2.substr(5,2),a$2=v$2.substr(7,2)):(r$2=v$2.substr(1,1),g$2=v$2.substr(2,1),b$4=v$2.substr(3,1),a$2=v$2.substr(4,1),r$2+=r$2,g$2+=g$2,b$4+=b$4,a$2+=a$2),{red:parseInt(r$2,16),green:parseInt(g$2,16),blue:parseInt(b$4,16),alpha:a$2?parseInt(a$2,16)/255:1}}const hex$1={test:isColorString(`#`),parse:parseHex$1,transform:rgba.transform},color$1={test:v$2=>rgba.test(v$2)||hex$1.test(v$2)||hsla.test(v$2),parse:v$2=>rgba.test(v$2)?rgba.parse(v$2):hsla.test(v$2)?hsla.parse(v$2):hex$1.parse(v$2),transform:v$2=>isString$1(v$2)?v$2:v$2.hasOwnProperty(`red`)?rgba.transform(v$2):hsla.transform(v$2)},colorToken="${c}",numberToken="${n}";function test(v$2){var _a$3,_b,_c$1,_d$1;return isNaN(v$2)&&isString$1(v$2)&&((_b=(_a$3=v$2.match(floatRegex))?.length)??0)+((_d$1=(_c$1=v$2.match(colorRegex))?.length)??0)>0}function analyse$1(v$2){typeof v$2==`number`&&(v$2=`${v$2}`);let values=[],numColors=0,colors=v$2.match(colorRegex);colors&&(numColors=colors.length,v$2=v$2.replace(colorRegex,colorToken),values.push(...colors.map(color$1.parse)));let numbers=v$2.match(floatRegex);return numbers&&(v$2=v$2.replace(floatRegex,numberToken),values.push(...numbers.map(number$2.parse))),{values,numColors,tokenised:v$2}}function parse$3(v$2){return analyse$1(v$2).values}function createTransformer$1(v$2){let{values,numColors,tokenised}=analyse$1(v$2),numValues=values.length;return v$3=>{let output=tokenised;for(let i$1=0;i$1typeof v$2==`number`?0:v$2;function getAnimatableNone$2(v$2){let parsed=parse$3(v$2),transformer=createTransformer$1(v$2);return transformer(parsed.map(convertNumbersToZero))}const complex={test,parse:parse$3,createTransformer:createTransformer$1,getAnimatableNone:getAnimatableNone$2},maxDefaults=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function applyDefaultFilter(v$2){let[name$2,value$1]=v$2.slice(0,-1).split(`(`);if(name$2===`drop-shadow`)return v$2;let[number$3]=value$1.match(floatRegex)||[];if(!number$3)return v$2;let unit=value$1.replace(number$3,``),defaultValue=maxDefaults.has(name$2)?1:0;return number$3!==value$1&&(defaultValue*=100),name$2+`(`+defaultValue+unit+`)`}const functionRegex=/([a-z-]*)\(.*?\)/g,filter=Object.assign(Object.assign({},complex),{getAnimatableNone:v$2=>{let functions=v$2.match(functionRegex);return functions?functions.map(applyDefaultFilter).join(` `):v$2}});function hueToRgb(p$5,q$2,t){return t<0&&(t+=1),t>1&&--t,t<1/6?p$5+(q$2-p$5)*6*t:t<1/2?q$2:t<2/3?p$5+(q$2-p$5)*(2/3-t)*6:p$5}function hslaToRgba({hue:hue$2,saturation,lightness,alpha:alpha$1}){hue$2/=360,saturation/=100,lightness/=100;let red=0,green=0,blue=0;if(!saturation)red=green=blue=lightness;else{let q$2=lightness<.5?lightness*(1+saturation):lightness+saturation-lightness*saturation,p$5=2*lightness-q$2;red=hueToRgb(p$5,q$2,hue$2+1/3),green=hueToRgb(p$5,q$2,hue$2),blue=hueToRgb(p$5,q$2,hue$2-1/3)}return{red:Math.round(red*255),green:Math.round(green*255),blue:Math.round(blue*255),alpha:alpha$1}}const mixLinearColor=(from,to$2,v$2)=>{let fromExpo=from*from,toExpo=to$2*to$2;return Math.sqrt(Math.max(0,v$2*(toExpo-fromExpo)+fromExpo))},colorTypes=[hex$1,rgba,hsla],getColorType=v$2=>colorTypes.find(type=>type.test(v$2)),notAnimatable=color$2=>`'${color$2}' is not an animatable color. Use the equivalent color code instead.`,mixColor=(from,to$2)=>{let fromColorType=getColorType(from),toColorType=getColorType(to$2);invariant(!!fromColorType,notAnimatable(from)),invariant(!!toColorType,notAnimatable(to$2));let fromColor=fromColorType.parse(from),toColor=toColorType.parse(to$2);fromColorType===hsla&&(fromColor=hslaToRgba(fromColor),fromColorType=rgba),toColorType===hsla&&(toColor=hslaToRgba(toColor),toColorType=rgba);let blended=Object.assign({},fromColor);return v$2=>{for(let key$1 in blended)key$1!==`alpha`&&(blended[key$1]=mixLinearColor(fromColor[key$1],toColor[key$1],v$2));return blended.alpha=mix(fromColor.alpha,toColor.alpha,v$2),fromColorType.transform(blended)}},isNum=v$2=>typeof v$2==`number`,combineFunctions=(a$2,b$4)=>v$2=>b$4(a$2(v$2)),pipe=(...transformers)=>transformers.reduce(combineFunctions);function getMixer(origin,target$1){return isNum(origin)?v$2=>mix(origin,target$1,v$2):color$1.test(origin)?mixColor(origin,target$1):mixComplex(origin,target$1)}const mixArray=(from,to$2)=>{let output=[...from],numValues=output.length,blendValue=from.map((fromThis,i$1)=>getMixer(fromThis,to$2[i$1]));return v$2=>{for(let i$1=0;i$1{let output=Object.assign(Object.assign({},origin),target$1),blendValue={};for(let key$1 in output)origin[key$1]!==void 0&&target$1[key$1]!==void 0&&(blendValue[key$1]=getMixer(origin[key$1],target$1[key$1]));return v$2=>{for(let key$1 in blendValue)output[key$1]=blendValue[key$1](v$2);return output}};function analyse(value$1){let parsed=complex.parse(value$1),numValues=parsed.length,numNumbers=0,numRGB=0,numHSL=0;for(let i$1=0;i$1{let template=complex.createTransformer(target$1),originStats=analyse(origin),targetStats=analyse(target$1),canInterpolate=originStats.numHSL===targetStats.numHSL&&originStats.numRGB===targetStats.numRGB&&originStats.numNumbers>=targetStats.numNumbers;return canInterpolate?pipe(mixArray(originStats.parsed,targetStats.parsed),template):(warning(!0,`Complex values '${origin}' and '${target$1}' 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.`),p$5=>`${p$5>0?target$1:origin}`)},mixNumber=(from,to$2)=>p$5=>mix(from,to$2,p$5);function detectMixerFactory(v$2){if(typeof v$2==`number`)return mixNumber;if(typeof v$2==`string`)return color$1.test(v$2)?mixColor:mixComplex;if(Array.isArray(v$2))return mixArray;if(typeof v$2==`object`)return mixObject}function createMixers(output,ease,customMixer){let mixers=[],mixerFactory=customMixer||detectMixerFactory(output[0]),numMixers=output.length-1;for(let i$1=0;i$1mixer(progress(from,to$2,v$2))}function slowInterpolate(input,mixers){let inputLength=input.length,lastInputIndex=inputLength-1;return v$2=>{let mixerIndex=0,foundMixerIndex=!1;if(v$2<=input[0]?foundMixerIndex=!0:v$2>=input[lastInputIndex]&&(mixerIndex=lastInputIndex-1,foundMixerIndex=!0),!foundMixerIndex){let i$1=1;for(;i$1v$2||i$1===lastInputIndex);i$1++);mixerIndex=i$1-1}let progressInRange=progress(input[mixerIndex],input[mixerIndex+1],v$2);return mixers[mixerIndex](progressInRange)}}function interpolate(input,output,{clamp:isClamp=!0,ease,mixer}={}){let inputLength=input.length;invariant(inputLength===output.length,`Both input and output ranges must be the same length`),invariant(!ease||!Array.isArray(ease)||ease.length===inputLength-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),input[0]>input[inputLength-1]&&(input=[].concat(input),output=[].concat(output),input.reverse(),output.reverse());let mixers=createMixers(output,ease,mixer),interpolator=inputLength===2?fastInterpolate(input,mixers):slowInterpolate(input,mixers);return isClamp?v$2=>interpolator(clamp$2(input[0],input[inputLength-1],v$2)):interpolator}const reverseEasing=easing=>p$5=>1-easing(1-p$5),mirrorEasing=easing=>p$5=>p$5<=.5?easing(2*p$5)/2:(2-easing(2*(1-p$5)))/2,createExpoIn=power=>p$5=>p$5**+power,createBackIn=power=>p$5=>p$5*p$5*((power+1)*p$5-power),createAnticipate=power=>{let backEasing=createBackIn(power);return p$5=>(p$5*=2)<1?.5*backEasing(p$5):.5*(2-2**(-10*(p$5-1)))},DEFAULT_OVERSHOOT_STRENGTH=1.525,BOUNCE_FIRST_THRESHOLD=4/11,BOUNCE_SECOND_THRESHOLD=8/11,BOUNCE_THIRD_THRESHOLD=9/10,linear=p$5=>p$5,easeIn=createExpoIn(2),easeOut=reverseEasing(easeIn),easeInOut=mirrorEasing(easeIn),circIn=p$5=>1-Math.sin(Math.acos(p$5)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circOut),backIn=createBackIn(DEFAULT_OVERSHOOT_STRENGTH),backOut=reverseEasing(backIn),backInOut=mirrorEasing(backIn),anticipate=createAnticipate(DEFAULT_OVERSHOOT_STRENGTH),ca$1=4356/361,cb=35442/1805,cc$1=16061/1805,bounceOut=p$5=>{if(p$5===1||p$5===0)return p$5;let p2=p$5*p$5;return p$5p$5<.5?.5*(1-bounceOut(1-p$5*2)):.5*bounceOut(p$5*2-1)+.5;function defaultEasing(values,easing){return values.map(()=>easing||easeInOut).splice(0,values.length-1)}function defaultOffset(values){let numValues=values.length;return values.map((_value,i$1)=>i$1===0?0:i$1/(numValues-1))}function convertOffsetToTimes(offset$2,duration){return offset$2.map(o$1=>o$1*duration)}function keyframes$2({from=0,to:to$2=1,ease,offset:offset$2,duration=300}){let state={done:!1,value:from},values=Array.isArray(to$2)?to$2:[from,to$2],times=convertOffsetToTimes(offset$2&&offset$2.length===values.length?offset$2:defaultOffset(values),duration);function createInterpolator(){return interpolate(times,values,{ease:Array.isArray(ease)?ease:defaultEasing(values,ease)})}let interpolator=createInterpolator();return{next:t=>(state.value=interpolator(t),state.done=t>=duration,state),flipTarget:()=>{values.reverse(),interpolator=createInterpolator()}}}function decay({velocity=0,from=0,power=.8,timeConstant=350,restDelta=.5,modifyTarget}){let state={done:!1,value:from},amplitude=power*velocity,ideal=from+amplitude,target$1=modifyTarget===void 0?ideal:modifyTarget(ideal);return target$1!==ideal&&(amplitude=target$1-from),{next:t=>{let delta=-amplitude*Math.exp(-t/timeConstant);return state.done=!(delta>restDelta||delta<-restDelta),state.value=state.done?target$1:target$1+delta,state},flipTarget:()=>{}}}const types={keyframes:keyframes$2,spring,decay};function detectAnimationFromOptions(config){if(Array.isArray(config.to))return keyframes$2;if(types[config.type])return types[config.type];let keys$3=new Set(Object.keys(config));return keys$3.has(`ease`)||keys$3.has(`duration`)&&!keys$3.has(`dampingRatio`)?keyframes$2:keys$3.has(`dampingRatio`)||keys$3.has(`stiffness`)||keys$3.has(`mass`)||keys$3.has(`damping`)||keys$3.has(`restSpeed`)||keys$3.has(`restDelta`)?spring:keyframes$2}function loopElapsed(elapsed,duration,delay=0){return elapsed-duration-delay}function reverseElapsed(elapsed,duration,delay=0,isForwardPlayback=!0){return isForwardPlayback?loopElapsed(duration+-elapsed,duration,delay):duration-(elapsed-duration)+delay}function hasRepeatDelayElapsed(elapsed,duration,delay,isForwardPlayback){return isForwardPlayback?elapsed>=duration+delay:elapsed<=-delay}const framesync=update=>{let passTimestamp=({delta})=>update(delta);return{start:()=>es_default.update(passTimestamp,!0),stop:()=>cancelSync.update(passTimestamp)}};function animate(_a$3){var _b,_c$1,{from,autoplay=!0,driver=framesync,elapsed=0,repeat:repeatMax=0,repeatType=`loop`,repeatDelay=0,onPlay,onStop,onComplete,onRepeat,onUpdate}=_a$3,options$1=__rest(_a$3,[`from`,`autoplay`,`driver`,`elapsed`,`repeat`,`repeatType`,`repeatDelay`,`onPlay`,`onStop`,`onComplete`,`onRepeat`,`onUpdate`]);let{to:to$2}=options$1,driverControls,repeatCount=0,computedDuration=options$1.duration,latest,isComplete=!1,isForwardPlayback=!0,interpolateFromNumber,animator=detectAnimationFromOptions(options$1);(_c$1=(_b=animator).needsInterpolation)?.call(_b,from,to$2)&&(interpolateFromNumber=interpolate([0,100],[from,to$2],{clamp:!1}),from=0,to$2=100);let animation=animator(Object.assign(Object.assign({},options$1),{from,to:to$2}));function repeat(){repeatCount++,repeatType===`reverse`?(isForwardPlayback=repeatCount%2==0,elapsed=reverseElapsed(elapsed,computedDuration,repeatDelay,isForwardPlayback)):(elapsed=loopElapsed(elapsed,computedDuration,repeatDelay),repeatType===`mirror`&&animation.flipTarget()),isComplete=!1,onRepeat&&onRepeat()}function complete(){driverControls.stop(),onComplete&&onComplete()}function update(delta){if(isForwardPlayback||(delta=-delta),elapsed+=delta,!isComplete){let state=animation.next(Math.max(0,elapsed));latest=state.value,interpolateFromNumber&&(latest=interpolateFromNumber(latest)),isComplete=isForwardPlayback?state.done:elapsed<=0}onUpdate?.(latest),isComplete&&(repeatCount===0&&(computedDuration??=elapsed),repeatCount{onStop?.(),driverControls.stop()}}}function velocityPerSecond(velocity,frameDuration){return frameDuration?velocity*(1e3/frameDuration):0}function inertia({from=0,velocity=0,min:min$1,max:max$1,power=.8,timeConstant=750,bounceStiffness=500,bounceDamping=10,restDelta=1,modifyTarget,driver,onUpdate,onComplete,onStop}){let currentAnimation;function isOutOfBounds(v$2){return min$1!==void 0&&v$2max$1}function boundaryNearest(v$2){return min$1===void 0?max$1:max$1===void 0||Math.abs(min$1-v$2){var _a$3;onUpdate?.(v$2),(_a$3=options$1.onUpdate)==null||_a$3.call(options$1,v$2)},onComplete,onStop}))}function startSpring(options$1){startAnimation(Object.assign({type:`spring`,stiffness:bounceStiffness,damping:bounceDamping,restDelta},options$1))}if(isOutOfBounds(from))startSpring({from,velocity,to:boundaryNearest(from)});else{let target$1=power*velocity+from;modifyTarget!==void 0&&(target$1=modifyTarget(target$1));let boundary=boundaryNearest(target$1),heading$1=boundary===min$1?-1:1,prev,current,checkBoundary=v$2=>{prev=current,current=v$2,velocity=velocityPerSecond(v$2-prev,getFrameData().delta),(heading$1===1&&v$2>boundary||heading$1===-1&&v$2currentAnimation?.stop()}}const a$1=(a1,a2)=>1-3*a2+3*a1,b$3=(a1,a2)=>3*a2-6*a1,c$3=a1=>3*a1,calcBezier=(t,a1,a2)=>((a$1(a1,a2)*t+b$3(a1,a2))*t+c$3(a1))*t,getSlope=(t,a1,a2)=>3*a$1(a1,a2)*t*t+2*b$3(a1,a2)*t+c$3(a1),subdivisionPrecision=1e-7,subdivisionMaxIterations=10;function binarySubdivide(aX,aA,aB,mX1,mX2){let currentX,currentT,i$1=0;do currentT=aA+(aB-aA)/2,currentX=calcBezier(currentT,mX1,mX2)-aX,currentX>0?aB=currentT:aA=currentT;while(Math.abs(currentX)>subdivisionPrecision&&++i$1=newtonMinSlope?newtonRaphsonIterate(aX,guessForT,mX1,mX2):initialSlope===0?guessForT:binarySubdivide(aX,intervalStart,intervalStart+kSampleStepSize,mX1,mX2)}return t=>t===0||t===1?t:calcBezier(getTForX(t),mY1,mY2)}const __vite_import_meta_env__$1={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`},motionState={};var SubscriptionManager$1=class{subscriptions=new Set;add(handler){return this.subscriptions.add(handler),()=>this.subscriptions.delete(handler)}notify(a$2,b$4,c$4){if(this.subscriptions.size)for(let handler of this.subscriptions)handler(a$2,b$4,c$4)}clear(){this.subscriptions.clear()}};function isFloat$1(value$1){return!Number.isNaN(Number.parseFloat(value$1))}var MotionValue$1=class{current;prev;timeDelta=0;lastUpdated=0;updateSubscribers=new SubscriptionManager$1;stopAnimation;canTrackVelocity=!1;constructor(init){this.prev=this.current=init,this.canTrackVelocity=isFloat$1(this.current)}onChange(subscription){return this.updateSubscribers.add(subscription)}clearListeners(){this.updateSubscribers.clear()}set(v$2){this.updateAndNotify(v$2)}updateAndNotify=v$2=>{this.prev=this.current,this.current=v$2;let{delta,timestamp:timestamp$2}=getFrameData();this.lastUpdated!==timestamp$2&&(this.timeDelta=delta,this.lastUpdated=timestamp$2),es_default.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)};get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?velocityPerSecond(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}scheduleVelocityCheck=()=>es_default.postRender(this.velocityCheck);velocityCheck=({timestamp:timestamp$2})=>{this.canTrackVelocity||=isFloat$1(this.current),timestamp$2!==this.lastUpdated&&(this.prev=this.current)};start(animation){return this.stop(),new Promise(resolve$1=>{let{stop:stop$1}=animation(resolve$1);this.stopAnimation=stop$1}).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 getMotionValue$1(init){return new MotionValue$1(init)}const{isArray:isArray$4}=Array;function useMotionValues$1(){let motionValues=ref({}),stop$1=keys$3=>{let destroyKey=key$1=>{motionValues.value[key$1]&&(motionValues.value[key$1].stop(),motionValues.value[key$1].destroy(),delete motionValues.value[key$1])};keys$3?isArray$4(keys$3)?keys$3.forEach(destroyKey):destroyKey(keys$3):Object.keys(motionValues.value).forEach(destroyKey)},get=(key$1,from,target$1)=>{if(motionValues.value[key$1])return motionValues.value[key$1];let motionValue=getMotionValue$1(from);return motionValue.onChange(v$2=>target$1[key$1]=v$2),motionValues.value[key$1]=motionValue,motionValue};return tryOnUnmounted(stop$1),{motionValues,get,stop:stop$1}}function isKeyframesTarget$1(v$2){return Array.isArray(v$2)}function underDampedSpring$1(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function criticallyDampedSpring$1(to$2){return{type:`spring`,stiffness:550,damping:to$2===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function overDampedSpring$1(to$2){return{type:`spring`,stiffness:550,damping:to$2===0?100:30,restDelta:.01,restSpeed:10}}function linearTween$1(){return{type:`keyframes`,ease:`linear`,duration:300}}function keyframes$1(values){return{type:`keyframes`,duration:800,values}}const defaultTransitions$1={default:overDampedSpring$1,x:underDampedSpring$1,y:underDampedSpring$1,z:underDampedSpring$1,rotate:underDampedSpring$1,rotateX:underDampedSpring$1,rotateY:underDampedSpring$1,rotateZ:underDampedSpring$1,scaleX:criticallyDampedSpring$1,scaleY:criticallyDampedSpring$1,scale:criticallyDampedSpring$1,backgroundColor:linearTween$1,color:linearTween$1,opacity:linearTween$1};function getDefaultTransition$1(valueKey,to$2){let transitionFactory;return transitionFactory=isKeyframesTarget$1(to$2)?keyframes$1:defaultTransitions$1[valueKey]||defaultTransitions$1.default,{to:to$2,...transitionFactory(to$2)}}const int$1={...number$2,transform:Math.round},valueTypes$1={color:color$1,backgroundColor:color$1,outlineColor:color$1,fill:color$1,stroke:color$1,borderColor:color$1,borderTopColor:color$1,borderRightColor:color$1,borderBottomColor:color$1,borderLeftColor:color$1,borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int$1,filter,WebkitFilter:filter,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int$1},getValueType$1=key$1=>valueTypes$1[key$1];function getValueAsType$1(value$1,type){return type&&typeof value$1==`number`&&type.transform?type.transform(value$1):value$1}function getAnimatableNone$1(key$1,value$1){let defaultValueType=getValueType$1(key$1);return defaultValueType!==filter&&(defaultValueType=complex),defaultValueType.getAnimatableNone?defaultValueType.getAnimatableNone(value$1):void 0}const easingLookup$1={linear,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate,bounceIn,bounceInOut,bounceOut};function easingDefinitionToFunction$1(definition$29){if(Array.isArray(definition$29)){let[x1,y1,x2,y2]=definition$29;return cubicBezier(x1,y1,x2,y2)}else if(typeof definition$29==`string`)return easingLookup$1[definition$29];return definition$29}function isEasingArray$1(ease){return Array.isArray(ease)&&typeof ease[0]!=`number`}function isAnimatable$1(key$1,value$1){return key$1===`zIndex`?!1:!!(typeof value$1==`number`||Array.isArray(value$1)||typeof value$1==`string`&&complex.test(value$1)&&!value$1.startsWith(`url(`))}function hydrateKeyframes$1(options$1){return Array.isArray(options$1.to)&&options$1.to[0]===null&&(options$1.to=[...options$1.to],options$1.to[0]=options$1.from),options$1}function convertTransitionToAnimationOptions$1({ease,times,delay,...transition}){let options$1={...transition};return times&&(options$1.offset=times),ease&&(options$1.ease=isEasingArray$1(ease)?ease.map(easingDefinitionToFunction$1):easingDefinitionToFunction$1(ease)),delay&&(options$1.elapsed=-delay),options$1}function getPopmotionAnimationOptions$1(transition,options$1,key$1){return Array.isArray(options$1.to)&&(transition.duration||=800),hydrateKeyframes$1(options$1),isTransitionDefined$1(transition)||(transition={...transition,...getDefaultTransition$1(key$1,options$1.to)}),{...options$1,...convertTransitionToAnimationOptions$1(transition)}}function isTransitionDefined$1({delay,repeat,repeatType,repeatDelay,from,...transition}){return!!Object.keys(transition).length}function getValueTransition$1(transition,key$1){return transition[key$1]||transition.default||transition}function getAnimation$1(key$1,value$1,target$1,transition,onComplete){let valueTransition=getValueTransition$1(transition,key$1),origin=valueTransition.from===null||valueTransition.from===void 0?value$1.get():valueTransition.from,isTargetAnimatable=isAnimatable$1(key$1,target$1);origin===`none`&&isTargetAnimatable&&typeof target$1==`string`&&(origin=getAnimatableNone$1(key$1,target$1));let isOriginAnimatable=isAnimatable$1(key$1,origin);function start(complete){let options$1={from:origin,to:target$1,velocity:transition.velocity?transition.velocity:value$1.getVelocity(),onUpdate:v$2=>value$1.set(v$2)};return valueTransition.type===`inertia`||valueTransition.type===`decay`?inertia({...options$1,...valueTransition}):animate({...getPopmotionAnimationOptions$1(valueTransition,options$1,key$1),onUpdate:v$2=>{options$1.onUpdate(v$2),valueTransition.onUpdate&&valueTransition.onUpdate(v$2)},onComplete:()=>{onComplete&&onComplete(),complete&&complete()}})}function set(complete){return value$1.set(target$1),onComplete&&onComplete(),complete&&complete(),{stop:()=>{}}}return!isOriginAnimatable||!isTargetAnimatable||valueTransition.type===!1?set:start}function useMotionTransitions$1(){let{motionValues,stop:stop$1,get}=useMotionValues$1(),push$1=(key$1,value$1,target$1,transition={},onComplete)=>{let from=target$1[key$1],motionValue=get(key$1,from,target$1);if(transition&&transition.immediate){motionValue.set(value$1);return}let animation=getAnimation$1(key$1,motionValue,value$1,transition,onComplete);motionValue.start(animation)};return{motionValues,stop:stop$1,push:push$1}}function useMotionControls$1(motionProperties,variants={},{motionValues,push:push$1,stop:stop$1}=useMotionTransitions$1()){let _variants=unref(variants),isAnimating=ref(!1);watch(motionValues,newVal=>{isAnimating.value=Object.values(newVal).filter(value$1=>value$1.isAnimating()).length>0},{immediate:!0,deep:!0});let getVariantFromKey=variant=>{if(!_variants||!_variants[variant])throw Error(`The variant ${variant} does not exist.`);return _variants[variant]},apply$2=variant=>{typeof variant==`string`&&(variant=getVariantFromKey(variant));let animations$1=Object.entries(variant).map(([key$1,value$1])=>{if(key$1!==`transition`)return new Promise(resolve$1=>push$1(key$1,value$1,motionProperties,variant.transition||getDefaultTransition$1(key$1,variant[key$1]),resolve$1))}).filter(Boolean);async function waitForComplete(){await Promise.all(animations$1),variant.transition?.onComplete?.()}return Promise.all([waitForComplete()])},set=variant=>{let variantData=isObject$1(variant)?variant:getVariantFromKey(variant);Object.entries(variantData).forEach(([key$1,value$1])=>{key$1!==`transition`&&push$1(key$1,value$1,motionProperties,{immediate:!0})})},leave=async done=>{let leaveVariant;if(_variants&&(_variants.leave&&(leaveVariant=_variants.leave),!_variants.leave&&_variants.initial&&(leaveVariant=_variants.initial)),!leaveVariant){done();return}await apply$2(leaveVariant),done()};return{isAnimating,apply:apply$2,set,leave,stop:stop$1}}const isBrowser$2=typeof window<`u`,supportsPointerEvents$1=()=>isBrowser$2&&(window.onpointerdown===null||__vite_import_meta_env__$1?.TEST),supportsTouchEvents$1=()=>isBrowser$2&&(window.ontouchstart===null||__vite_import_meta_env__$1?.TEST),supportsMouseEvents$1=()=>isBrowser$2&&(window.onmousedown===null||__vite_import_meta_env__$1?.TEST);function registerEventListeners$1({target:target$1,state,variants,apply:apply$2}){let _variants=unref(variants),hovered=ref(!1),tapped=ref(!1),focused=ref(!1),mutableKeys=computed(()=>{let result=[...Object.keys(state.value||{})];return _variants?(_variants.hovered&&(result=[...result,...Object.keys(_variants.hovered)]),_variants.tapped&&(result=[...result,...Object.keys(_variants.tapped)]),_variants.focused&&(result=[...result,...Object.keys(_variants.focused)]),result):result}),computedProperties=computed(()=>{let result={};for(let key$1 in Object.assign(result,state.value),hovered.value&&_variants.hovered&&Object.assign(result,_variants.hovered),tapped.value&&_variants.tapped&&Object.assign(result,_variants.tapped),focused.value&&_variants.focused&&Object.assign(result,_variants.focused),result)mutableKeys.value.includes(key$1)||delete result[key$1];return result});_variants.hovered&&(useEventListener$1(target$1,`mouseenter`,()=>hovered.value=!0),useEventListener$1(target$1,`mouseleave`,()=>{hovered.value=!1,tapped.value=!1})),_variants.tapped&&(supportsMouseEvents$1()&&(useEventListener$1(target$1,`mousedown`,()=>tapped.value=!0),useEventListener$1(target$1,`mouseup`,()=>tapped.value=!1)),supportsPointerEvents$1()&&(useEventListener$1(target$1,`pointerdown`,()=>tapped.value=!0),useEventListener$1(target$1,`pointerup`,()=>tapped.value=!1)),supportsTouchEvents$1()&&(useEventListener$1(target$1,`touchstart`,()=>tapped.value=!0),useEventListener$1(target$1,`touchend`,()=>tapped.value=!1))),_variants.focused&&(useEventListener$1(target$1,`focus`,()=>focused.value=!0),useEventListener$1(target$1,`blur`,()=>focused.value=!1)),watch([hovered,tapped,focused],()=>{apply$2(computedProperties.value)})}function registerLifeCycleHooks$1({set,target:target$1,variants,variant}){let _variants=unref(variants);watch(()=>target$1,()=>{_variants&&(_variants.initial&&(set(`initial`),variant.value=`initial`),_variants.enter&&(variant.value=`enter`))},{immediate:!0,flush:`pre`})}function registerVariantsSync$1({state,apply:apply$2}){watch(state,newVal=>{newVal&&apply$2(newVal)},{immediate:!0})}function registerVisibilityHooks$1({target:target$1,variants,variant}){let _variants=unref(variants);_variants&&(_variants.visible||_variants.visibleOnce)&&useIntersectionObserver(target$1,([{isIntersecting}])=>{_variants.visible?isIntersecting?variant.value=`visible`:variant.value=`initial`:_variants.visibleOnce&&(isIntersecting&&variant.value!==`visibleOnce`?variant.value=`visibleOnce`:variant.value||=`initial`)})}function useMotionFeatures$1(instance,options$1={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){options$1.lifeCycleHooks&®isterLifeCycleHooks$1(instance),options$1.syncVariants&®isterVariantsSync$1(instance),options$1.visibilityHooks&®isterVisibilityHooks$1(instance),options$1.eventListeners&®isterEventListeners$1(instance)}function reactiveStyle$1(props={}){let state=reactive({...props}),style=ref({});return watch(state,()=>{let result={};for(let[key$1,value$1]of Object.entries(state)){let valueType=getValueType$1(key$1),valueAsType=getValueAsType$1(value$1,valueType);result[key$1]=valueAsType}style.value=result},{immediate:!0,deep:!0}),{state,style}}function usePermissiveTarget$1(target$1,onTarget){watch(()=>unrefElement$1(target$1),el$1=>{el$1&&onTarget(el$1)},{immediate:!0})}const translateAlias$1={x:`translateX`,y:`translateY`,z:`translateZ`};function reactiveTransform$1(props={},enableHardwareAcceleration=!0){let state=reactive({...props}),transform$1=ref(``);return watch(state,newVal=>{let result=``,hasHardwareAcceleration=!1;if(enableHardwareAcceleration&&(newVal.x||newVal.y||newVal.z)){let str=[newVal.x||0,newVal.y||0,newVal.z||0].map(val=>getValueAsType$1(val,px)).join(`,`);result+=`translate3d(${str}) `,hasHardwareAcceleration=!0}for(let[key$1,value$1]of Object.entries(newVal)){if(enableHardwareAcceleration&&(key$1===`x`||key$1===`y`||key$1===`z`))continue;let valueType=getValueType$1(key$1),valueAsType=getValueAsType$1(value$1,valueType);result+=`${translateAlias$1[key$1]||key$1}(${valueAsType}) `}enableHardwareAcceleration&&!hasHardwareAcceleration&&(result+=`translateZ(0px) `),transform$1.value=result.trim()},{immediate:!0,deep:!0}),{state,transform:transform$1}}const transformAxes$1=[``,`X`,`Y`,`Z`],order$2=[`perspective`,`translate`,`scale`,`rotate`,`skew`],transformProps$1=[`transformPerspective`,`x`,`y`,`z`];order$2.forEach(operationKey=>{transformAxes$1.forEach(axesKey=>{let key$1=operationKey+axesKey;transformProps$1.push(key$1)})});const transformPropSet$1=new Set(transformProps$1);function isTransformProp$1(key$1){return transformPropSet$1.has(key$1)}const transformOriginProps$1=new Set([`originX`,`originY`,`originZ`]);function isTransformOriginProp$1(key$1){return transformOriginProps$1.has(key$1)}function splitValues$1(variant){let transform$1={},style={};return Object.entries(variant).forEach(([key$1,value$1])=>{isTransformProp$1(key$1)||isTransformOriginProp$1(key$1)?transform$1[key$1]=value$1:style[key$1]=value$1}),{transform:transform$1,style}}function variantToStyle$1(variant){let{transform:_transform,style:_style}=splitValues$1(variant),{transform:transform$1}=reactiveTransform$1(_transform),{style}=reactiveStyle$1(_style);return transform$1.value&&(style.value.transform=transform$1.value),style.value}function useElementStyle$1(target$1,onInit){let _cache$1,_target$1,{state,style}=reactiveStyle$1();return usePermissiveTarget$1(target$1,el$1=>{_target$1=el$1;for(let key$1 of Object.keys(valueTypes$1)){if(el$1.style[key$1]===null||el$1.style[key$1]===``||isTransformProp$1(key$1)||isTransformOriginProp$1(key$1))continue;state[key$1]=el$1.style[key$1]}_cache$1&&Object.entries(_cache$1).forEach(([key$1,value$1])=>el$1.style[key$1]=value$1),onInit&&onInit(state)}),watch(style,newVal=>{if(!_target$1){_cache$1=newVal;return}for(let key$1 in newVal)_target$1.style[key$1]=newVal[key$1]},{immediate:!0}),{style:state}}function parseTransform$1(transform$1){let transforms=transform$1.trim().split(/\) |\)/);if(transforms.length===1)return{};let parseValues=value$1=>value$1.endsWith(`px`)||value$1.endsWith(`deg`)?Number.parseFloat(value$1):Number.isNaN(Number(value$1))?Number(value$1):value$1;return transforms.reduce((acc,transform2)=>{if(!transform2)return acc;let[name$2,transformValue]=transform2.split(`(`),valueArray=transformValue.split(`,`),values=valueArray.map(val=>parseValues(val.endsWith(`)`)?val.replace(`)`,``):val.trim())),value$1=values.length===1?values[0]:values;return{...acc,[name$2]:value$1}},{})}function stateFromTransform$1(state,transform$1){Object.entries(parseTransform$1(transform$1)).forEach(([key$1,value$1])=>{let axes=[`x`,`y`,`z`];if(key$1===`translate3d`){if(value$1===0){axes.forEach(axis=>state[axis]=0);return}value$1.forEach((axisValue,index$1)=>state[axes[index$1]]=axisValue);return}if(value$1=Number.parseFloat(`${value$1}`),key$1===`translateX`){state.x=value$1;return}if(key$1===`translateY`){state.y=value$1;return}if(key$1===`translateZ`){state.z=value$1;return}state[key$1]=value$1})}function useElementTransform$1(target$1,onInit){let _cache$1,_target$1,{state,transform:transform$1}=reactiveTransform$1();return usePermissiveTarget$1(target$1,el$1=>{_target$1=el$1,el$1.style.transform&&stateFromTransform$1(state,el$1.style.transform),_cache$1&&(el$1.style.transform=_cache$1),onInit&&onInit(state)}),watch(transform$1,newValue=>{if(!_target$1){_cache$1=newValue;return}_target$1.style.transform=newValue},{immediate:!0}),{transform:state}}function objectEntries$1(obj){return Object.entries(obj)}function useMotionProperties$1(target$1,defaultValues){let motionProperties=reactive({}),apply$2=values=>Object.entries(values).forEach(([key$1,value$1])=>motionProperties[key$1]=value$1),{style}=useElementStyle$1(target$1,apply$2),{transform:transform$1}=useElementTransform$1(target$1,apply$2);return watch(motionProperties,newVal=>{objectEntries$1(newVal).forEach(([key$1,value$1])=>{let target2=isTransformProp$1(key$1)?transform$1:style;target2[key$1]&&target2[key$1]===value$1||(target2[key$1]=value$1)})},{immediate:!0,deep:!0}),usePermissiveTarget$1(target$1,()=>defaultValues&&apply$2(defaultValues)),{motionProperties,style,transform:transform$1}}function useMotionVariants$1(variants={}){let _variants=unref(variants),variant=ref(),state=computed(()=>{if(variant.value)return _variants[variant.value]});return{state,variant}}function useMotion$1(target$1,variants={},options$1){let{motionProperties}=useMotionProperties$1(target$1),{variant,state}=useMotionVariants$1(variants),controls=useMotionControls$1(motionProperties,variants),instance={target:target$1,variant,variants,state,motionProperties,...controls};return useMotionFeatures$1(instance,options$1),instance}const transitionKeys$1=[`delay`,`duration`],directivePropsKeys$1=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...transitionKeys$1];function isTransitionKey(val){return transitionKeys$1.includes(val)}function resolveVariants(node$1,variantsRef){let target$1=node$1.props?node$1.props:node$1.data&&node$1.data.attrs?node$1.data.attrs:{};if(target$1){target$1.variants&&isObject$1(target$1.variants)&&(variantsRef.value={...variantsRef.value,...target$1.variants});for(let key$1 of directivePropsKeys$1){if(!target$1||!target$1[key$1])continue;if(isTransitionKey(key$1)&&typeof target$1[key$1]==`number`){for(let variantKey of[`enter`,`visible`,`visibleOnce`]){let variantConfig=variantsRef.value[variantKey];if(variantConfig==null)continue;variantConfig.transition??={},variantConfig.transition[key$1]=target$1[key$1]}continue}if(isObject$1(target$1[key$1])){let prop=target$1[key$1];key$1===`visible-once`&&(key$1=`visibleOnce`),variantsRef.value[key$1]=prop}}}}function directive(variants,isPreset=!1){let register=(el$1,binding,node$1)=>{let key$1=binding.value&&typeof binding.value==`string`?binding.value:node$1.key;key$1&&motionState[key$1]&&motionState[key$1].stop();let variantsObject=isPreset?structuredClone(toRaw(variants)||{}):variants||{},variantsRef=ref(variantsObject);typeof binding.value==`object`&&(variantsRef.value=binding.value),resolveVariants(node$1,variantsRef);let motionOptions={eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1},motionInstance=useMotion$1(el$1,variantsRef,motionOptions);el$1.motionInstance=motionInstance,key$1&&(motionState[key$1]=motionInstance)},mounted=(el$1,_binding,_node)=>{el$1.motionInstance&®isterVisibilityHooks$1(el$1.motionInstance)};return{created:register,mounted,getSSRProps(binding,node$1){let{initial:bindingInitial}=binding.value||node$1&&node$1?.props||{};bindingInitial=unref(bindingInitial);let initial=defu({},variants?.initial||{},bindingInitial||{});if(!initial||Object.keys(initial).length===0)return;let style=variantToStyle$1(initial);return{style}}}}const fade$1={initial:{opacity:0},enter:{opacity:1}},fadeVisible$1={initial:{opacity:0},visible:{opacity:1}},fadeVisibleOnce$1={initial:{opacity:0},visibleOnce:{opacity:1}},pop$1={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},popVisible$1={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},popVisibleOnce$1={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},rollLeft$1={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleLeft$1={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceLeft$1={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollRight$1={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleRight$1={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceRight$1={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollTop$1={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleTop$1={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceTop$1={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},rollBottom$1={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleBottom$1={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceBottom$1={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},slideLeft$1={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},slideVisibleLeft$1={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceLeft$1={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},slideRight$1={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},slideVisibleRight$1={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceRight$1={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},slideTop$1={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},slideVisibleTop$1={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceTop$1={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},slideBottom$1={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},slideVisibleBottom$1={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceBottom$1={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},presets$1={__proto__:null,fade:fade$1,fadeVisible:fadeVisible$1,fadeVisibleOnce:fadeVisibleOnce$1,pop:pop$1,popVisible:popVisible$1,popVisibleOnce:popVisibleOnce$1,rollBottom:rollBottom$1,rollLeft:rollLeft$1,rollRight:rollRight$1,rollTop:rollTop$1,rollVisibleBottom:rollVisibleBottom$1,rollVisibleLeft:rollVisibleLeft$1,rollVisibleOnceBottom:rollVisibleOnceBottom$1,rollVisibleOnceLeft:rollVisibleOnceLeft$1,rollVisibleOnceRight:rollVisibleOnceRight$1,rollVisibleOnceTop:rollVisibleOnceTop$1,rollVisibleRight:rollVisibleRight$1,rollVisibleTop:rollVisibleTop$1,slideBottom:slideBottom$1,slideLeft:slideLeft$1,slideRight:slideRight$1,slideTop:slideTop$1,slideVisibleBottom:slideVisibleBottom$1,slideVisibleLeft:slideVisibleLeft$1,slideVisibleOnceBottom:slideVisibleOnceBottom$1,slideVisibleOnceLeft:slideVisibleOnceLeft$1,slideVisibleOnceRight:slideVisibleOnceRight$1,slideVisibleOnceTop:slideVisibleOnceTop$1,slideVisibleRight:slideVisibleRight$1,slideVisibleTop:slideVisibleTop$1};function slugify(str){let a$2=`àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;`,b$4=`aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------`,p$5=new RegExp(a$2.split(``).join(`|`),`g`);return str.toString().replace(/[A-Z]/g,s$1=>`-${s$1}`).toLowerCase().replace(/\s+/g,`-`).replace(p$5,c$4=>b$4.charAt(a$2.indexOf(c$4))).replace(/&/g,`-and-`).replace(/[^\w\-]+/g,``).replace(/-{2,}/g,`-`).replace(/^-+/,``).replace(/-+$/,``)}const CUSTOM_PRESETS$1=Symbol(``),MotionComponentProps$1={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 isObject$3(val){return Object.prototype.toString.call(val)===`[object Object]`}function clone$1(v$2){if(Array.isArray(v$2))return v$2.map(clone$1);if(isObject$3(v$2)){let res={};for(let key$1 in v$2)res[key$1]=clone$1(v$2[key$1]);return res}return v$2}function setupMotionComponent$1(props){let instances=reactive({}),customPresets=inject(CUSTOM_PRESETS$1,{}),preset=computed(()=>props.preset==null?{}:customPresets!=null&&props.preset in customPresets?structuredClone(toRaw(customPresets)[props.preset]):props.preset in presets$1?structuredClone(presets$1[props.preset]):{}),propsConfig=computed(()=>({initial:props.initial,enter:props.enter,leave:props.leave,visible:props.visible,visibleOnce:props.visibleOnce,hovered:props.hovered,tapped:props.tapped,focused:props.focused}));function applyTransitionHelpers(config,values){for(let transitionKey of[`delay`,`duration`]){if(values[transitionKey]==null)continue;let transitionValueParsed=Number.parseInt(values[transitionKey]);for(let variantKey of[`enter`,`visible`,`visibleOnce`]){let variantConfig=config[variantKey];if(variantConfig==null)continue;variantConfig.transition??={},variantConfig.transition[transitionKey]=transitionValueParsed}}return config}let motionConfig=computed(()=>{let config=defu({},propsConfig.value,preset.value,props.variants||{});return applyTransitionHelpers({...config},props)});function setNodeInstance(node$1,index$1,style){node$1.props??={},node$1.props.style??={},node$1.props.style={...node$1.props.style,...style};let elementMotionConfig=applyTransitionHelpers(clone$1(motionConfig.value),node$1.props);return node$1.props.onVnodeMounted=({el:el$1})=>{instances[index$1]=useMotion$1(el$1,elementMotionConfig)},node$1.props.onVnodeUpdated=({el:el$1})=>{let styles=variantToStyle$1(instances[index$1].state);for(let[key$1,val]of Object.entries(styles))el$1.style[key$1]=val},node$1}return{motionConfig,setNodeInstance}}const MotionComponent$1=defineComponent({name:`Motion`,props:{...MotionComponentProps$1,is:{type:[String,Object],default:`div`}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent$1(props);return()=>{let style=variantToStyle$1(motionConfig.value.initial||{}),node$1=h(props.is,void 0,slots);return setNodeInstance(node$1,0,style),node$1}}}),MotionGroupComponent$1=defineComponent({name:`MotionGroup`,props:{...MotionComponentProps$1,is:{type:[String,Object],required:!1}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent$1(props);return()=>{let style=variantToStyle$1(motionConfig.value.initial||{}),nodes=slots.default?.()||[];for(let i$1=0;i$1activePinia=pinia$1,piniaSymbol=Symbol();function isPlainObject$4(o$1){return o$1&&typeof o$1==`object`&&Object.prototype.toString.call(o$1)===`[object Object]`&&typeof o$1.toJSON!=`function`}var MutationType;(function(MutationType$1){MutationType$1.direct=`direct`,MutationType$1.patchObject=`patch object`,MutationType$1.patchFunction=`patch function`})(MutationType||={});const IS_CLIENT=typeof window<`u`,_global=(()=>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 bom(blob,{autoBom=!1}={}){return autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)?new Blob([``,blob],{type:blob.type}):blob}function download(url,name$2,opts){let xhr=new XMLHttpRequest;xhr.open(`GET`,url),xhr.responseType=`blob`,xhr.onload=function(){saveAs(xhr.response,name$2,opts)},xhr.onerror=function(){console.error(`could not download file`)},xhr.send()}function corsEnabled(url){let xhr=new XMLHttpRequest;xhr.open(`HEAD`,url,!1);try{xhr.send()}catch{}return xhr.status>=200&&xhr.status<=299}function click(node$1){try{node$1.dispatchEvent(new MouseEvent(`click`))}catch{let evt=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});node$1.dispatchEvent(evt)}}const _navigator=typeof navigator==`object`?navigator:{userAgent:``},isMacOSWebView=(()=>/Macintosh/.test(_navigator.userAgent)&&/AppleWebKit/.test(_navigator.userAgent)&&!/Safari/.test(_navigator.userAgent))(),saveAs=IS_CLIENT?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!isMacOSWebView?downloadSaveAs:`msSaveOrOpenBlob`in _navigator?msSaveAs:fileSaverSaveAs:()=>{};function downloadSaveAs(blob,name$2=`download`,opts){let a$2=document.createElement(`a`);a$2.download=name$2,a$2.rel=`noopener`,typeof blob==`string`?(a$2.href=blob,a$2.origin===location.origin?click(a$2):corsEnabled(a$2.href)?download(blob,name$2,opts):(a$2.target=`_blank`,click(a$2))):(a$2.href=URL.createObjectURL(blob),setTimeout(function(){URL.revokeObjectURL(a$2.href)},4e4),setTimeout(function(){click(a$2)},0))}function msSaveAs(blob,name$2=`download`,opts){if(typeof blob==`string`)if(corsEnabled(blob))download(blob,name$2,opts);else{let a$2=document.createElement(`a`);a$2.href=blob,a$2.target=`_blank`,setTimeout(function(){click(a$2)})}else navigator.msSaveOrOpenBlob(bom(blob,opts),name$2)}function fileSaverSaveAs(blob,name$2,opts,popup){if(popup||=open(``,`_blank`),popup&&(popup.document.title=popup.document.body.innerText=`downloading...`),typeof blob==`string`)return download(blob,name$2,opts);let force=blob.type===`application/octet-stream`,isSafari=/constructor/i.test(String(_global.HTMLElement))||`safari`in _global,isChromeIOS=/CriOS\/[\d]+/.test(navigator.userAgent);if((isChromeIOS||force&&isSafari||isMacOSWebView)&&typeof FileReader<`u`){let reader=new FileReader;reader.onloadend=function(){let url=reader.result;if(typeof url!=`string`)throw popup=null,Error(`Wrong reader.result type`);url=isChromeIOS?url:url.replace(/^data:[^;]*;/,`data:attachment/file;`),popup?popup.location.href=url:location.assign(url),popup=null},reader.readAsDataURL(blob)}else{let url=URL.createObjectURL(blob);popup?popup.location.assign(url):location.href=url,popup=null,setTimeout(function(){URL.revokeObjectURL(url)},4e4)}}const{assign:assign$1$1}=Object;function createPinia(){let scope=effectScope(!0),state=scope.run(()=>ref({})),_p$1=[],toBeInstalled=[],pinia$1=markRaw({install(app){setActivePinia(pinia$1),pinia$1._a=app,app.provide(piniaSymbol,pinia$1),app.config.globalProperties.$pinia=pinia$1,toBeInstalled.forEach(plugin=>_p$1.push(plugin)),toBeInstalled=[]},use(plugin){return this._a?_p$1.push(plugin):toBeInstalled.push(plugin),this},_p:_p$1,_a:null,_e:scope,_s:new Map,state});return pinia$1}const noop$1=()=>{};function addSubscription(subscriptions,callback,detached,onCleanup=noop$1){subscriptions.push(callback);let removeSubscription=()=>{let idx=subscriptions.indexOf(callback);idx>-1&&(subscriptions.splice(idx,1),onCleanup())};return!detached&&getCurrentScope()&&onScopeDispose(removeSubscription),removeSubscription}function triggerSubscriptions(subscriptions,...args){subscriptions.slice().forEach(callback=>{callback(...args)})}const fallbackRunWithContext=fn$6=>fn$6(),ACTION_MARKER=Symbol(),ACTION_NAME=Symbol();function mergeReactiveObjects(target$1,patchToApply){for(let key$1 in target$1 instanceof Map&&patchToApply instanceof Map?patchToApply.forEach((value$1,key$1)=>target$1.set(key$1,value$1)):target$1 instanceof Set&&patchToApply instanceof Set&&patchToApply.forEach(target$1.add,target$1),patchToApply){if(!patchToApply.hasOwnProperty(key$1))continue;let subPatch=patchToApply[key$1],targetValue=target$1[key$1];isPlainObject$4(targetValue)&&isPlainObject$4(subPatch)&&target$1.hasOwnProperty(key$1)&&!isRef(subPatch)&&!isReactive(subPatch)?target$1[key$1]=mergeReactiveObjects(targetValue,subPatch):target$1[key$1]=subPatch}return target$1}const skipHydrateSymbol=Symbol();function shouldHydrate(obj){return!isPlainObject$4(obj)||!Object.prototype.hasOwnProperty.call(obj,skipHydrateSymbol)}const{assign:assign$2}=Object;function isComputed(o$1){return!!(isRef(o$1)&&o$1.effect)}function createOptionsStore(id$1,options$1,pinia$1,hot){let{state,actions,getters}=options$1,initialState=pinia$1.state.value[id$1],store;function setup(){initialState||(pinia$1.state.value[id$1]=state?state():{});let localState=toRefs(pinia$1.state.value[id$1]);return assign$2(localState,actions,Object.keys(getters||{}).reduce((computedGetters,name$2)=>(computedGetters[name$2]=markRaw(computed(()=>{setActivePinia(pinia$1);let store$1=pinia$1._s.get(id$1);return getters[name$2].call(store$1,store$1)})),computedGetters),{}))}return store=createSetupStore(id$1,setup,options$1,pinia$1,hot,!0),store}function createSetupStore($id,setup,options$1={},pinia$1,hot,isOptionsStore){let scope,optionsForPlugin=assign$2({actions:{}},options$1),$subscribeOptions={deep:!0},isListening,isSyncListening,subscriptions=[],actionSubscriptions=[],debuggerEvents,initialState=pinia$1.state.value[$id];!isOptionsStore&&!initialState&&(pinia$1.state.value[$id]={});let hotState=ref({}),activeListener;function $patch(partialStateOrMutator){let subscriptionMutation;isListening=isSyncListening=!1,typeof partialStateOrMutator==`function`?(partialStateOrMutator(pinia$1.state.value[$id]),subscriptionMutation={type:MutationType.patchFunction,storeId:$id,events:debuggerEvents}):(mergeReactiveObjects(pinia$1.state.value[$id],partialStateOrMutator),subscriptionMutation={type:MutationType.patchObject,payload:partialStateOrMutator,storeId:$id,events:debuggerEvents});let myListenerId=activeListener=Symbol();nextTick().then(()=>{activeListener===myListenerId&&(isListening=!0)}),isSyncListening=!0,triggerSubscriptions(subscriptions,subscriptionMutation,pinia$1.state.value[$id])}let $reset=isOptionsStore?function(){let{state}=options$1,newState=state?state():{};this.$patch($state=>{assign$2($state,newState)})}:noop$1;function $dispose(){scope.stop(),subscriptions=[],actionSubscriptions=[],pinia$1._s.delete($id)}let action=(fn$6,name$2=``)=>{if(ACTION_MARKER in fn$6)return fn$6[ACTION_NAME]=name$2,fn$6;let wrappedAction=function(){setActivePinia(pinia$1);let args=Array.from(arguments),afterCallbackList=[],onErrorCallbackList=[];function after(callback){afterCallbackList.push(callback)}function onError(callback){onErrorCallbackList.push(callback)}triggerSubscriptions(actionSubscriptions,{args,name:wrappedAction[ACTION_NAME],store,after,onError});let ret;try{ret=fn$6.apply(this&&this.$id===$id?this:store,args)}catch(error){throw triggerSubscriptions(onErrorCallbackList,error),error}return ret instanceof Promise?ret.then(value$1=>(triggerSubscriptions(afterCallbackList,value$1),value$1)).catch(error=>(triggerSubscriptions(onErrorCallbackList,error),Promise.reject(error))):(triggerSubscriptions(afterCallbackList,ret),ret)};return wrappedAction[ACTION_MARKER]=!0,wrappedAction[ACTION_NAME]=name$2,wrappedAction},_hmrPayload=markRaw({actions:{},getters:{},state:[],hotState}),partialStore={_p:pinia$1,$id,$onAction:addSubscription.bind(null,actionSubscriptions),$patch,$reset,$subscribe(callback,options$2={}){let removeSubscription=addSubscription(subscriptions,callback,options$2.detached,()=>stopWatcher()),stopWatcher=scope.run(()=>watch(()=>pinia$1.state.value[$id],state=>{(options$2.flush===`sync`?isSyncListening:isListening)&&callback({storeId:$id,type:MutationType.direct,events:debuggerEvents},state)},assign$2({},$subscribeOptions,options$2)));return removeSubscription},$dispose},store=reactive(partialStore);pinia$1._s.set($id,store);let runWithContext=pinia$1._a&&pinia$1._a.runWithContext||fallbackRunWithContext,setupStore=runWithContext(()=>pinia$1._e.run(()=>(scope=effectScope()).run(()=>setup({action}))));for(let key$1 in setupStore){let prop=setupStore[key$1];if(isRef(prop)&&!isComputed(prop)||isReactive(prop))isOptionsStore||(initialState&&shouldHydrate(prop)&&(isRef(prop)?prop.value=initialState[key$1]:mergeReactiveObjects(prop,initialState[key$1])),pinia$1.state.value[$id][key$1]=prop);else if(typeof prop==`function`){let actionValue=action(prop,key$1);setupStore[key$1]=actionValue,optionsForPlugin.actions[key$1]=prop}}return assign$2(store,setupStore),assign$2(toRaw(store),setupStore),Object.defineProperty(store,`$state`,{get:()=>pinia$1.state.value[$id],set:state=>{$patch($state=>{assign$2($state,state)})}}),pinia$1._p.forEach(extender=>{assign$2(store,scope.run(()=>extender({store,app:pinia$1._a,pinia:pinia$1,options:optionsForPlugin})))}),initialState&&isOptionsStore&&options$1.hydrate&&options$1.hydrate(store.$state,initialState),isListening=!0,isSyncListening=!0,store} /*! #__NO_SIDE_EFFECTS__ */ -function defineStore(id$1,setup,setupOptions){let options$1,isSetupStore=typeof setup==`function`;options$1=isSetupStore?setupOptions:setup;function useStore(pinia$1,hot){let hasContext=hasInjectionContext();pinia$1||=hasContext?inject(piniaSymbol,null):null,pinia$1&&setActivePinia(pinia$1),pinia$1=activePinia,pinia$1._s.has(id$1)||(isSetupStore?createSetupStore(id$1,setup,options$1,pinia$1):createOptionsStore(id$1,options$1,pinia$1));let store=pinia$1._s.get(id$1);return store}return useStore.$id=id$1,useStore}function storeToRefs(store){let rawStore=toRaw(store),refs={};for(let key$1 in rawStore){let value$1=rawStore[key$1];value$1.effect?refs[key$1]=computed({get:()=>store[key$1],set(value$2){store[key$1]=value$2}}):(isRef(value$1)||isReactive(value$1))&&(refs[key$1]=toRef(store,key$1))}return refs}const scriptRel=`modulepreload`,assetsURL=function(dep){return`/`+dep},seen={},__vitePreload=function(baseModule,deps,importerUrl){let promise=Promise.resolve();if(deps&&deps.length>0){let links=document.getElementsByTagName(`link`),cspNonceMeta=document.querySelector(`meta[property=csp-nonce]`),cspNonce=cspNonceMeta?.nonce||cspNonceMeta?.getAttribute(`nonce`);function allSettled(promises$2){return Promise.all(promises$2.map(p$1$1=>Promise.resolve(p$1$1).then(value$1=>({status:`fulfilled`,value:value$1}),reason=>({status:`rejected`,reason}))))}promise=allSettled(deps.map(dep=>{if(dep=assetsURL(dep,importerUrl),dep in seen)return;seen[dep]=!0;let isCss=dep.endsWith(`.css`),cssSelector=isCss?`[rel="stylesheet"]`:``,isBaseRelative=!!importerUrl;if(isBaseRelative)for(let i$1=links.length-1;i$1>=0;i$1--){let link$1$1=links[i$1];if(link$1$1.href===dep&&(!isCss||link$1$1.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${dep}"]${cssSelector}`))return;let link$1=document.createElement(`link`);if(link$1.rel=isCss?`stylesheet`:scriptRel,isCss||(link$1.as=`script`),link$1.crossOrigin=``,link$1.href=dep,cspNonce&&link$1.setAttribute(`nonce`,cspNonce),document.head.appendChild(link$1),isCss)return new Promise((res,rej)=>{link$1.addEventListener(`load`,res),link$1.addEventListener(`error`,()=>rej(Error(`Unable to preload CSS for ${dep}`)))})}))}function handlePreloadError(err$2){let e$1$1=new Event(`vite:preloadError`,{cancelable:!0});if(e$1$1.payload=err$2,window.dispatchEvent(e$1$1),!e$1$1.defaultPrevented)throw err$2}return promise.then(res=>{for(let item of res||[]){if(item.status!==`rejected`)continue;handlePreloadError(item.reason)}return baseModule().catch(handlePreloadError)})},setupLayouts=routes$1=>{let layouts={},modules=Object.assign({"/src/layouts/default.vue":()=>__vitePreload(()=>import(`./default-Bwh18mCX.js`),__vite__mapDeps([0,1,2])),"/src/layouts/home.vue":()=>__vitePreload(()=>import(`./home-DfltP_SY.js`),[]),"/src/layouts/plain.vue":()=>__vitePreload(()=>import(`./plain-Ch0w-BYR.js`),[]),"/src/layouts/settings.vue":()=>__vitePreload(()=>import(`./settings-XLQSFV-w.js`),__vite__mapDeps([3,1,2,4])),"/src/layouts/stage.vue":()=>__vitePreload(()=>import(`./stage-C0Idwk1_.js`),[])});Object.entries(modules).forEach(([name$2,module$1])=>{let key$1=name$2.replace(`/src/layouts/`,``).replace(`.vue`,``);layouts[key$1]=module$1});function deepSetupLayout(routes$2,top=!0){return routes$2.map(route=>{if(route.children?.length>0&&(route.children=deepSetupLayout(route.children,!1)),top){let skipLayout=!route.component&&route.children?.find(r$2=>(r$2.path===``||r$2.path===`/`)&&r$2.meta?.isLayout);if(skipLayout)return route;if(route.meta?.layout!==!1)return{path:route.path,component:layouts[route.meta?.layout||`default`],children:route.path===`/`?[route]:[{...route,path:``}],meta:{isLayout:!0}}}return route.meta?.layout?{path:route.path,component:layouts[route.meta?.layout],children:[{...route,path:``}],meta:{isLayout:!0}}:route})}return deepSetupLayout(routes$1)},isBrowser$1=typeof document<`u`;function isRouteComponent(component){return typeof component==`object`||`displayName`in component||`props`in component||`__vccOpts`in component}function isESModule(obj){return obj.__esModule||obj[Symbol.toStringTag]===`Module`||obj.default&&isRouteComponent(obj.default)}const assign$1=Object.assign;function applyToParams(fn$6,params){let newParams={};for(let key$1 in params){let value$1=params[key$1];newParams[key$1]=isArray$3(value$1)?value$1.map(fn$6):fn$6(value$1)}return newParams}const noop=()=>{},isArray$3=Array.isArray,HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(text$5){return encodeURI(``+text$5).replace(ENC_PIPE_RE,`|`).replace(ENC_BRACKET_OPEN_RE,`[`).replace(ENC_BRACKET_CLOSE_RE,`]`)}function encodeHash(text$5){return commonEncode(text$5).replace(ENC_CURLY_OPEN_RE,`{`).replace(ENC_CURLY_CLOSE_RE,`}`).replace(ENC_CARET_RE,`^`)}function encodeQueryValue(text$5){return commonEncode(text$5).replace(PLUS_RE,`%2B`).replace(ENC_SPACE_RE,`+`).replace(HASH_RE,`%23`).replace(AMPERSAND_RE,`%26`).replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,`{`).replace(ENC_CURLY_CLOSE_RE,`}`).replace(ENC_CARET_RE,`^`)}function encodeQueryKey(text$5){return encodeQueryValue(text$5).replace(EQUAL_RE,`%3D`)}function encodePath(text$5){return commonEncode(text$5).replace(HASH_RE,`%23`).replace(IM_RE,`%3F`)}function encodeParam(text$5){return text$5==null?``:encodePath(text$5).replace(SLASH_RE,`%2F`)}function decode$1(text$5){try{return decodeURIComponent(``+text$5)}catch{}return``+text$5}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=path=>path.replace(TRAILING_SLASH_RE,``);function parseURL(parseQuery$1,location$1,currentLocation=`/`){let path,query={},searchString=``,hash=``,hashPos=location$1.indexOf(`#`),searchPos=location$1.indexOf(`?`);return hashPos=0&&(searchPos=-1),searchPos>-1&&(path=location$1.slice(0,searchPos),searchString=location$1.slice(searchPos+1,hashPos>-1?hashPos:location$1.length),query=parseQuery$1(searchString)),hashPos>-1&&(path||=location$1.slice(0,hashPos),hash=location$1.slice(hashPos,location$1.length)),path=resolveRelativePath(path??location$1,currentLocation),{fullPath:path+(searchString&&`?`)+searchString+hash,path,query,hash:decode$1(hash)}}function stringifyURL(stringifyQuery$1,location$1){let query=location$1.query?stringifyQuery$1(location$1.query):``;return location$1.path+(query&&`?`)+query+(location$1.hash||``)}function stripBase(pathname,base){return!base||!pathname.toLowerCase().startsWith(base.toLowerCase())?pathname:pathname.slice(base.length)||`/`}function isSameRouteLocation(stringifyQuery$1,a$2,b$4){let aLastIndex=a$2.matched.length-1,bLastIndex=b$4.matched.length-1;return aLastIndex>-1&&aLastIndex===bLastIndex&&isSameRouteRecord(a$2.matched[aLastIndex],b$4.matched[bLastIndex])&&isSameRouteLocationParams(a$2.params,b$4.params)&&stringifyQuery$1(a$2.query)===stringifyQuery$1(b$4.query)&&a$2.hash===b$4.hash}function isSameRouteRecord(a$2,b$4){return(a$2.aliasOf||a$2)===(b$4.aliasOf||b$4)}function isSameRouteLocationParams(a$2,b$4){if(Object.keys(a$2).length!==Object.keys(b$4).length)return!1;for(let key$1 in a$2)if(!isSameRouteLocationParamsValue(a$2[key$1],b$4[key$1]))return!1;return!0}function isSameRouteLocationParamsValue(a$2,b$4){return isArray$3(a$2)?isEquivalentArray(a$2,b$4):isArray$3(b$4)?isEquivalentArray(b$4,a$2):a$2===b$4}function isEquivalentArray(a$2,b$4){return isArray$3(b$4)?a$2.length===b$4.length&&a$2.every((value$1,i$1)=>value$1===b$4[i$1]):a$2.length===1&&a$2[0]===b$4}function resolveRelativePath(to$2,from){if(to$2.startsWith(`/`))return to$2;if(!to$2)return from;let fromSegments=from.split(`/`),toSegments=to$2.split(`/`),lastToSegment=toSegments[toSegments.length-1];(lastToSegment===`..`||lastToSegment===`.`)&&toSegments.push(``);let position$2=fromSegments.length-1,toPosition,segment;for(toPosition=0;toPosition1&&position$2--;else break;return fromSegments.slice(0,position$2).join(`/`)+`/`+toSegments.slice(toPosition).join(`/`)}const START_LOCATION_NORMALIZED={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};var NavigationType;(function(NavigationType$1){NavigationType$1.pop=`pop`,NavigationType$1.push=`push`})(NavigationType||={});var NavigationDirection;(function(NavigationDirection$1){NavigationDirection$1.back=`back`,NavigationDirection$1.forward=`forward`,NavigationDirection$1.unknown=``})(NavigationDirection||={});function normalizeBase(base){if(!base)if(isBrowser$1){let baseEl=document.querySelector(`base`);base=baseEl&&baseEl.getAttribute(`href`)||`/`,base=base.replace(/^\w+:\/\/[^\/]+/,``)}else base=`/`;return base[0]!==`/`&&base[0]!==`#`&&(base=`/`+base),removeTrailingSlash(base)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(base,location$1){return base.replace(BEFORE_HASH_RE,`#`)+location$1}function getElementPosition(el$1,offset$2){let docRect=document.documentElement.getBoundingClientRect(),elRect=el$1.getBoundingClientRect();return{behavior:offset$2.behavior,left:elRect.left-docRect.left-(offset$2.left||0),top:elRect.top-docRect.top-(offset$2.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(position$2){let scrollToOptions;if(`el`in position$2){let positionEl=position$2.el,isIdSelector=typeof positionEl==`string`&&positionEl.startsWith(`#`),el$1=typeof positionEl==`string`?isIdSelector?document.getElementById(positionEl.slice(1)):document.querySelector(positionEl):positionEl;if(!el$1)return;scrollToOptions=getElementPosition(el$1,position$2)}else scrollToOptions=position$2;`scrollBehavior`in document.documentElement.style?window.scrollTo(scrollToOptions):window.scrollTo(scrollToOptions.left==null?window.scrollX:scrollToOptions.left,scrollToOptions.top==null?window.scrollY:scrollToOptions.top)}function getScrollKey(path,delta){let position$2=history.state?history.state.position-delta:-1;return position$2+path}const scrollPositions=new Map;function saveScrollPosition(key$1,scrollPosition){scrollPositions.set(key$1,scrollPosition)}function getSavedScrollPosition(key$1){let scroll=scrollPositions.get(key$1);return scrollPositions.delete(key$1),scroll}let createBaseLocation=()=>location.protocol+`//`+location.host;function createCurrentLocation(base,location$1){let{pathname,search:search$1,hash}=location$1,hashPos=base.indexOf(`#`);if(hashPos>-1){let slicePos=hash.includes(base.slice(hashPos))?base.slice(hashPos).length:1,pathFromHash=hash.slice(slicePos);return pathFromHash[0]!==`/`&&(pathFromHash=`/`+pathFromHash),stripBase(pathFromHash,``)}let path=stripBase(pathname,base);return path+search$1+hash}function useHistoryListeners(base,historyState,currentLocation,replace){let listeners=[],teardowns=[],pauseState=null,popStateHandler=({state})=>{let to$2=createCurrentLocation(base,location),from=currentLocation.value,fromState=historyState.value,delta=0;if(state){if(currentLocation.value=to$2,historyState.value=state,pauseState&&pauseState===from){pauseState=null;return}delta=fromState?state.position-fromState.position:0}else replace(to$2);listeners.forEach(listener=>{listener(currentLocation.value,from,{delta,type:NavigationType.pop,direction:delta?delta>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function pauseListeners(){pauseState=currentLocation.value}function listen(callback){listeners.push(callback);let teardown=()=>{let index$1=listeners.indexOf(callback);index$1>-1&&listeners.splice(index$1,1)};return teardowns.push(teardown),teardown}function beforeUnloadListener(){let{history:history$1}=window;history$1.state&&history$1.replaceState(assign$1({},history$1.state,{scroll:computeScrollPosition()}),``)}function destroy(){for(let teardown of teardowns)teardown();teardowns=[],window.removeEventListener(`popstate`,popStateHandler),window.removeEventListener(`beforeunload`,beforeUnloadListener)}return window.addEventListener(`popstate`,popStateHandler),window.addEventListener(`beforeunload`,beforeUnloadListener,{passive:!0}),{pauseListeners,listen,destroy}}function buildState(back,current,forward,replaced=!1,computeScroll=!1){return{back,current,forward,replaced,position:window.history.length,scroll:computeScroll?computeScrollPosition():null}}function useHistoryStateNavigation(base){let{history:history$1,location:location$1}=window,currentLocation={value:createCurrentLocation(base,location$1)},historyState={value:history$1.state};historyState.value||changeLocation(currentLocation.value,{back:null,current:currentLocation.value,forward:null,position:history$1.length-1,replaced:!0,scroll:null},!0);function changeLocation(to$2,state,replace$1){let hashIndex=base.indexOf(`#`),url=hashIndex>-1?(location$1.host&&document.querySelector(`base`)?base:base.slice(hashIndex))+to$2:createBaseLocation()+base+to$2;try{history$1[replace$1?`replaceState`:`pushState`](state,``,url),historyState.value=state}catch(err){console.error(err),location$1[replace$1?`replace`:`assign`](url)}}function replace(to$2,data$12){let state=assign$1({},history$1.state,buildState(historyState.value.back,to$2,historyState.value.forward,!0),data$12,{position:historyState.value.position});changeLocation(to$2,state,!0),currentLocation.value=to$2}function push$1(to$2,data$12){let currentState=assign$1({},historyState.value,history$1.state,{forward:to$2,scroll:computeScrollPosition()});changeLocation(currentState.current,currentState,!0);let state=assign$1({},buildState(currentLocation.value,to$2,null),{position:currentState.position+1},data$12);changeLocation(to$2,state,!1),currentLocation.value=to$2}return{location:currentLocation,state:historyState,push:push$1,replace}}function createWebHistory(base){base=normalizeBase(base);let historyNavigation=useHistoryStateNavigation(base),historyListeners=useHistoryListeners(base,historyNavigation.state,historyNavigation.location,historyNavigation.replace);function go$1(delta,triggerListeners=!0){triggerListeners||historyListeners.pauseListeners(),history.go(delta)}let routerHistory=assign$1({location:``,base,go:go$1,createHref:createHref.bind(null,base)},historyNavigation,historyListeners);return Object.defineProperty(routerHistory,`location`,{enumerable:!0,get:()=>historyNavigation.location.value}),Object.defineProperty(routerHistory,`state`,{enumerable:!0,get:()=>historyNavigation.state.value}),routerHistory}function createWebHashHistory(base){return base=location.host?base||location.pathname+location.search:``,base.includes(`#`)||(base+=`#`),createWebHistory(base)}function isRouteLocation(route){return typeof route==`string`||route&&typeof route==`object`}function isRouteName(name$2){return typeof name$2==`string`||typeof name$2==`symbol`}const NavigationFailureSymbol=Symbol(``);var NavigationFailureType;(function(NavigationFailureType$1){NavigationFailureType$1[NavigationFailureType$1.aborted=4]=`aborted`,NavigationFailureType$1[NavigationFailureType$1.cancelled=8]=`cancelled`,NavigationFailureType$1[NavigationFailureType$1.duplicated=16]=`duplicated`})(NavigationFailureType||={});function createRouterError(type,params){return assign$1(Error(),{type,[NavigationFailureSymbol]:!0},params)}function isNavigationFailure(error,type){return error instanceof Error&&NavigationFailureSymbol in error&&(type==null||!!(error.type&type))}const BASE_PARAM_PATTERN=`[^/]+?`,BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(segments,extraOptions){let options$1=assign$1({},BASE_PATH_PARSER_OPTIONS,extraOptions),score=[],pattern=options$1.start?`^`:``,keys$3=[];for(let segment of segments){let segmentScores=segment.length?[]:[90];options$1.strict&&!segment.length&&(pattern+=`/`);for(let tokenIndex=0;tokenIndexb$4.length?b$4.length===1&&b$4[0]===80?1:-1:0}function comparePathParserScore(a$2,b$4){let i$1=0,aScore=a$2.score,bScore=b$4.score;for(;i$10&&last[last.length-1]<0}const ROOT_TOKEN={type:0,value:``},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(path){if(!path)return[[]];if(path===`/`)return[[ROOT_TOKEN]];if(!path.startsWith(`/`))throw Error(`Invalid path "${path}"`);function crash(message$1){throw Error(`ERR (${state})/"${buffer$1}": ${message$1}`)}let state=0,previousState=state,tokens=[],segment;function finalizeSegment(){segment&&tokens.push(segment),segment=[]}let i$1=0,char,buffer$1=``,customRe=``;function consumeBuffer(){buffer$1&&(state===0?segment.push({type:0,value:buffer$1}):state===1||state===2||state===3?(segment.length>1&&(char===`*`||char===`+`)&&crash(`A repeatable param (${buffer$1}) must be alone in its segment. eg: '/:ids+.`),segment.push({type:1,value:buffer$1,regexp:customRe,repeatable:char===`*`||char===`+`,optional:char===`*`||char===`?`})):crash(`Invalid state to consume buffer`),buffer$1=``)}function addCharToBuffer(){buffer$1+=char}for(;i$1{removeRoute(originalMatcher)}:noop}function removeRoute(matcherRef){if(isRouteName(matcherRef)){let matcher=matcherMap.get(matcherRef);matcher&&(matcherMap.delete(matcherRef),matchers.splice(matchers.indexOf(matcher),1),matcher.children.forEach(removeRoute),matcher.alias.forEach(removeRoute))}else{let index$1=matchers.indexOf(matcherRef);index$1>-1&&(matchers.splice(index$1,1),matcherRef.record.name&&matcherMap.delete(matcherRef.record.name),matcherRef.children.forEach(removeRoute),matcherRef.alias.forEach(removeRoute))}}function getRoutes(){return matchers}function insertMatcher(matcher){let index$1=findInsertionIndex(matcher,matchers);matchers.splice(index$1,0,matcher),matcher.record.name&&!isAliasRecord(matcher)&&matcherMap.set(matcher.record.name,matcher)}function resolve$1(location$1,currentLocation){let matcher,params={},path,name$2;if(`name`in location$1&&location$1.name){if(matcher=matcherMap.get(location$1.name),!matcher)throw createRouterError(1,{location:location$1});name$2=matcher.record.name,params=assign$1(paramsFromLocation(currentLocation.params,matcher.keys.filter(k$4=>!k$4.optional).concat(matcher.parent?matcher.parent.keys.filter(k$4=>k$4.optional):[]).map(k$4=>k$4.name)),location$1.params&¶msFromLocation(location$1.params,matcher.keys.map(k$4=>k$4.name))),path=matcher.stringify(params)}else if(location$1.path!=null)path=location$1.path,matcher=matchers.find(m$3=>m$3.re.test(path)),matcher&&(params=matcher.parse(path),name$2=matcher.record.name);else{if(matcher=currentLocation.name?matcherMap.get(currentLocation.name):matchers.find(m$3=>m$3.re.test(currentLocation.path)),!matcher)throw createRouterError(1,{location:location$1,currentLocation});name$2=matcher.record.name,params=assign$1({},currentLocation.params,location$1.params),path=matcher.stringify(params)}let matched=[],parentMatcher=matcher;for(;parentMatcher;)matched.unshift(parentMatcher.record),parentMatcher=parentMatcher.parent;return{name:name$2,path,params,matched,meta:mergeMetaFields(matched)}}routes$1.forEach(route=>addRoute(route));function clearRoutes(){matchers.length=0,matcherMap.clear()}return{addRoute,resolve:resolve$1,removeRoute,clearRoutes,getRoutes,getRecordMatcher}}function paramsFromLocation(params,keys$3){let newParams={};for(let key$1 of keys$3)key$1 in params&&(newParams[key$1]=params[key$1]);return newParams}function normalizeRouteRecord(record){let normalized={path:record.path,redirect:record.redirect,name:record.name,meta:record.meta||{},aliasOf:record.aliasOf,beforeEnter:record.beforeEnter,props:normalizeRecordProps(record),children:record.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in record?record.components||null:record.component&&{default:record.component}};return Object.defineProperty(normalized,`mods`,{value:{}}),normalized}function normalizeRecordProps(record){let propsObject={},props=record.props||!1;if(`component`in record)propsObject.default=props;else for(let name$2 in record.components)propsObject[name$2]=typeof props==`object`?props[name$2]:props;return propsObject}function isAliasRecord(record){for(;record;){if(record.record.aliasOf)return!0;record=record.parent}return!1}function mergeMetaFields(matched){return matched.reduce((meta,record)=>assign$1(meta,record.meta),{})}function mergeOptions(defaults,partialOptions){let options$1={};for(let key$1 in defaults)options$1[key$1]=key$1 in partialOptions?partialOptions[key$1]:defaults[key$1];return options$1}function findInsertionIndex(matcher,matchers){let lower=0,upper=matchers.length;for(;lower!==upper;){let mid=lower+upper>>1,sortOrder=comparePathParserScore(matcher,matchers[mid]);sortOrder<0?upper=mid:lower=mid+1}let insertionAncestor=getInsertionAncestor(matcher);return insertionAncestor&&(upper=matchers.lastIndexOf(insertionAncestor,upper-1)),upper}function getInsertionAncestor(matcher){let ancestor=matcher;for(;ancestor=ancestor.parent;)if(isMatchable(ancestor)&&comparePathParserScore(matcher,ancestor)===0)return ancestor}function isMatchable({record}){return!!(record.name||record.components&&Object.keys(record.components).length||record.redirect)}function parseQuery(search$1){let query={};if(search$1===``||search$1===`?`)return query;let hasLeadingIM=search$1[0]===`?`,searchParams=(hasLeadingIM?search$1.slice(1):search$1).split(`&`);for(let i$1=0;i$1v$2&&encodeQueryValue(v$2)):[value$1&&encodeQueryValue(value$1)];values.forEach(value$2=>{value$2!==void 0&&(search$1+=(search$1.length?`&`:``)+key$1,value$2!=null&&(search$1+=`=`+value$2))})}return search$1}function normalizeQuery(query){let normalizedQuery={};for(let key$1 in query){let value$1=query[key$1];value$1!==void 0&&(normalizedQuery[key$1]=isArray$3(value$1)?value$1.map(v$2=>v$2==null?null:``+v$2):value$1==null?value$1:``+value$1)}return normalizedQuery}const matchedRouteKey=Symbol(``),viewDepthKey=Symbol(``),routerKey=Symbol(``),routeLocationKey=Symbol(``),routerViewLocationKey=Symbol(``);function useCallbacks(){let handlers$3=[];function add$1(handler){return handlers$3.push(handler),()=>{let i$1=handlers$3.indexOf(handler);i$1>-1&&handlers$3.splice(i$1,1)}}function reset(){handlers$3=[]}return{add:add$1,list:()=>handlers$3.slice(),reset}}function guardToPromiseFn(guard,to$2,from,record,name$2,runWithContext=fn$6=>fn$6()){let enterCallbackArray=record&&(record.enterCallbacks[name$2]=record.enterCallbacks[name$2]||[]);return()=>new Promise((resolve$1,reject)=>{let next=valid$1=>{valid$1===!1?reject(createRouterError(4,{from,to:to$2})):valid$1 instanceof Error?reject(valid$1):isRouteLocation(valid$1)?reject(createRouterError(2,{from:to$2,to:valid$1})):(enterCallbackArray&&record.enterCallbacks[name$2]===enterCallbackArray&&typeof valid$1==`function`&&enterCallbackArray.push(valid$1),resolve$1())},guardReturn=runWithContext(()=>guard.call(record&&record.instances[name$2],to$2,from,next)),guardCall=Promise.resolve(guardReturn);guard.length<3&&(guardCall=guardCall.then(next)),guardCall.catch(err=>reject(err))})}function extractComponentsGuards(matched,guardType,to$2,from,runWithContext=fn$6=>fn$6()){let guards=[];for(let record of matched)for(let name$2 in record.components){let rawComponent=record.components[name$2];if(guardType!==`beforeRouteEnter`&&!record.instances[name$2])continue;if(isRouteComponent(rawComponent)){let options$1=rawComponent.__vccOpts||rawComponent,guard=options$1[guardType];guard&&guards.push(guardToPromiseFn(guard,to$2,from,record,name$2,runWithContext))}else{let componentPromise=rawComponent();guards.push(()=>componentPromise.then(resolved=>{if(!resolved)throw Error(`Couldn't resolve component "${name$2}" at "${record.path}"`);let resolvedComponent=isESModule(resolved)?resolved.default:resolved;record.mods[name$2]=resolved,record.components[name$2]=resolvedComponent;let options$1=resolvedComponent.__vccOpts||resolvedComponent,guard=options$1[guardType];return guard&&guardToPromiseFn(guard,to$2,from,record,name$2,runWithContext)()}))}}return guards}function useLink(props){let router$1=inject(routerKey),currentRoute=inject(routeLocationKey),hasPrevious=!1,previousTo=null,route=computed(()=>{let to$2=unref(props.to);return router$1.resolve(to$2)}),activeRecordIndex=computed(()=>{let{matched}=route.value,{length}=matched,routeMatched=matched[length-1],currentMatched=currentRoute.matched;if(!routeMatched||!currentMatched.length)return-1;let index$1=currentMatched.findIndex(isSameRouteRecord.bind(null,routeMatched));if(index$1>-1)return index$1;let parentRecordPath=getOriginalPath(matched[length-2]);return length>1&&getOriginalPath(routeMatched)===parentRecordPath&¤tMatched[currentMatched.length-1].path!==parentRecordPath?currentMatched.findIndex(isSameRouteRecord.bind(null,matched[length-2])):index$1}),isActive=computed(()=>activeRecordIndex.value>-1&&includesParams(currentRoute.params,route.value.params)),isExactActive=computed(()=>activeRecordIndex.value>-1&&activeRecordIndex.value===currentRoute.matched.length-1&&isSameRouteLocationParams(currentRoute.params,route.value.params));function navigate(e$3={}){if(guardEvent(e$3)){let p$5=router$1[unref(props.replace)?`replace`:`push`](unref(props.to)).catch(noop);return props.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>p$5),p$5}return Promise.resolve()}return{route,href:computed(()=>route.value.href),isActive,isExactActive,navigate}}function preferSingleVNode(vnodes){return vnodes.length===1?vnodes[0]:vnodes}const RouterLinkImpl=defineComponent({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,setup(props,{slots}){let link$1=reactive(useLink(props)),{options:options$1}=inject(routerKey),elClass=computed(()=>({[getLinkClass(props.activeClass,options$1.linkActiveClass,`router-link-active`)]:link$1.isActive,[getLinkClass(props.exactActiveClass,options$1.linkExactActiveClass,`router-link-exact-active`)]:link$1.isExactActive}));return()=>{let children=slots.default&&preferSingleVNode(slots.default(link$1));return props.custom?children:h(`a`,{"aria-current":link$1.isExactActive?props.ariaCurrentValue:null,href:link$1.href,onClick:link$1.navigate,class:elClass.value},children)}}}),RouterLink=RouterLinkImpl;function guardEvent(e$3){if(!(e$3.metaKey||e$3.altKey||e$3.ctrlKey||e$3.shiftKey)&&!e$3.defaultPrevented&&!(e$3.button!==void 0&&e$3.button!==0)){if(e$3.currentTarget&&e$3.currentTarget.getAttribute){let target$1=e$3.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(target$1))return}return e$3.preventDefault&&e$3.preventDefault(),!0}}function includesParams(outer,inner){for(let key$1 in inner){let innerValue=inner[key$1],outerValue=outer[key$1];if(typeof innerValue==`string`){if(innerValue!==outerValue)return!1}else if(!isArray$3(outerValue)||outerValue.length!==innerValue.length||innerValue.some((value$1,i$1)=>value$1!==outerValue[i$1]))return!1}return!0}function getOriginalPath(record){return record?record.aliasOf?record.aliasOf.path:record.path:``}const getLinkClass=(propClass,globalClass,defaultClass)=>propClass??globalClass??defaultClass,RouterViewImpl=defineComponent({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(props,{attrs,slots}){let injectedRoute=inject(routerViewLocationKey),routeToDisplay=computed(()=>props.route||injectedRoute.value),injectedDepth=inject(viewDepthKey,0),depth=computed(()=>{let initialDepth=unref(injectedDepth),{matched}=routeToDisplay.value,matchedRoute;for(;(matchedRoute=matched[initialDepth])&&!matchedRoute.components;)initialDepth++;return initialDepth}),matchedRouteRef=computed(()=>routeToDisplay.value.matched[depth.value]);provide(viewDepthKey,computed(()=>depth.value+1)),provide(matchedRouteKey,matchedRouteRef),provide(routerViewLocationKey,routeToDisplay);let viewRef=ref();return watch(()=>[viewRef.value,matchedRouteRef.value,props.name],([instance,to$2,name$2],[oldInstance,from,oldName])=>{to$2&&(to$2.instances[name$2]=instance,from&&from!==to$2&&instance&&instance===oldInstance&&(to$2.leaveGuards.size||(to$2.leaveGuards=from.leaveGuards),to$2.updateGuards.size||(to$2.updateGuards=from.updateGuards))),instance&&to$2&&(!from||!isSameRouteRecord(to$2,from)||!oldInstance)&&(to$2.enterCallbacks[name$2]||[]).forEach(callback=>callback(instance))},{flush:`post`}),()=>{let route=routeToDisplay.value,currentName=props.name,matchedRoute=matchedRouteRef.value,ViewComponent=matchedRoute&&matchedRoute.components[currentName];if(!ViewComponent)return normalizeSlot(slots.default,{Component:ViewComponent,route});let routePropsOption=matchedRoute.props[currentName],routeProps=routePropsOption?routePropsOption===!0?route.params:typeof routePropsOption==`function`?routePropsOption(route):routePropsOption:null,onVnodeUnmounted=vnode=>{vnode.component.isUnmounted&&(matchedRoute.instances[currentName]=null)},component=h(ViewComponent,assign$1({},routeProps,attrs,{onVnodeUnmounted,ref:viewRef}));return normalizeSlot(slots.default,{Component:component,route})||component}}});function normalizeSlot(slot,data$12){if(!slot)return null;let slotContent=slot(data$12);return slotContent.length===1?slotContent[0]:slotContent}const RouterView=RouterViewImpl;function createRouter(options$1){let matcher=createRouterMatcher(options$1.routes,options$1),parseQuery$1=options$1.parseQuery||parseQuery,stringifyQuery$1=options$1.stringifyQuery||stringifyQuery,routerHistory=options$1.history,beforeGuards=useCallbacks(),beforeResolveGuards=useCallbacks(),afterGuards=useCallbacks(),currentRoute=shallowRef(START_LOCATION_NORMALIZED),pendingLocation=START_LOCATION_NORMALIZED;isBrowser$1&&options$1.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let normalizeParams=applyToParams.bind(null,paramValue=>``+paramValue),encodeParams=applyToParams.bind(null,encodeParam),decodeParams=applyToParams.bind(null,decode$1);function addRoute(parentOrRoute,route){let parent,record;return isRouteName(parentOrRoute)?(parent=matcher.getRecordMatcher(parentOrRoute),record=route):record=parentOrRoute,matcher.addRoute(record,parent)}function removeRoute(name$2){let recordMatcher=matcher.getRecordMatcher(name$2);recordMatcher&&matcher.removeRoute(recordMatcher)}function getRoutes(){return matcher.getRoutes().map(routeMatcher=>routeMatcher.record)}function hasRoute(name$2){return!!matcher.getRecordMatcher(name$2)}function resolve$1(rawLocation,currentLocation){if(currentLocation=assign$1({},currentLocation||currentRoute.value),typeof rawLocation==`string`){let locationNormalized=parseURL(parseQuery$1,rawLocation,currentLocation.path),matchedRoute$1=matcher.resolve({path:locationNormalized.path},currentLocation),href$1=routerHistory.createHref(locationNormalized.fullPath);return assign$1(locationNormalized,matchedRoute$1,{params:decodeParams(matchedRoute$1.params),hash:decode$1(locationNormalized.hash),redirectedFrom:void 0,href:href$1})}let matcherLocation;if(rawLocation.path!=null)matcherLocation=assign$1({},rawLocation,{path:parseURL(parseQuery$1,rawLocation.path,currentLocation.path).path});else{let targetParams=assign$1({},rawLocation.params);for(let key$1 in targetParams)targetParams[key$1]??delete targetParams[key$1];matcherLocation=assign$1({},rawLocation,{params:encodeParams(targetParams)}),currentLocation.params=encodeParams(currentLocation.params)}let matchedRoute=matcher.resolve(matcherLocation,currentLocation),hash=rawLocation.hash||``;matchedRoute.params=normalizeParams(decodeParams(matchedRoute.params));let fullPath=stringifyURL(stringifyQuery$1,assign$1({},rawLocation,{hash:encodeHash(hash),path:matchedRoute.path})),href=routerHistory.createHref(fullPath);return assign$1({fullPath,hash,query:stringifyQuery$1===stringifyQuery?normalizeQuery(rawLocation.query):rawLocation.query||{}},matchedRoute,{redirectedFrom:void 0,href})}function locationAsObject(to$2){return typeof to$2==`string`?parseURL(parseQuery$1,to$2,currentRoute.value.path):assign$1({},to$2)}function checkCanceledNavigation(to$2,from){if(pendingLocation!==to$2)return createRouterError(8,{from,to:to$2})}function push$1(to$2){return pushWithRedirect(to$2)}function replace(to$2){return push$1(assign$1(locationAsObject(to$2),{replace:!0}))}function handleRedirectRecord(to$2){let lastMatched=to$2.matched[to$2.matched.length-1];if(lastMatched&&lastMatched.redirect){let{redirect}=lastMatched,newTargetLocation=typeof redirect==`function`?redirect(to$2):redirect;return typeof newTargetLocation==`string`&&(newTargetLocation=newTargetLocation.includes(`?`)||newTargetLocation.includes(`#`)?newTargetLocation=locationAsObject(newTargetLocation):{path:newTargetLocation},newTargetLocation.params={}),assign$1({query:to$2.query,hash:to$2.hash,params:newTargetLocation.path==null?to$2.params:{}},newTargetLocation)}}function pushWithRedirect(to$2,redirectedFrom){let targetLocation=pendingLocation=resolve$1(to$2),from=currentRoute.value,data$12=to$2.state,force=to$2.force,replace$1=to$2.replace===!0,shouldRedirect=handleRedirectRecord(targetLocation);if(shouldRedirect)return pushWithRedirect(assign$1(locationAsObject(shouldRedirect),{state:typeof shouldRedirect==`object`?assign$1({},data$12,shouldRedirect.state):data$12,force,replace:replace$1}),redirectedFrom||targetLocation);let toLocation=targetLocation;toLocation.redirectedFrom=redirectedFrom;let failure;return!force&&isSameRouteLocation(stringifyQuery$1,from,targetLocation)&&(failure=createRouterError(16,{to:toLocation,from}),handleScroll(from,from,!0,!1)),(failure?Promise.resolve(failure):navigate(toLocation,from)).catch(error=>isNavigationFailure(error)?isNavigationFailure(error,2)?error:markAsReady(error):triggerError(error,toLocation,from)).then(failure$1=>{if(failure$1){if(isNavigationFailure(failure$1,2))return pushWithRedirect(assign$1({replace:replace$1},locationAsObject(failure$1.to),{state:typeof failure$1.to==`object`?assign$1({},data$12,failure$1.to.state):data$12,force}),redirectedFrom||toLocation)}else failure$1=finalizeNavigation(toLocation,from,!0,replace$1,data$12);return triggerAfterEach(toLocation,from,failure$1),failure$1})}function checkCanceledNavigationAndReject(to$2,from){let error=checkCanceledNavigation(to$2,from);return error?Promise.reject(error):Promise.resolve()}function runWithContext(fn$6){let app=installedApps.values().next().value;return app&&typeof app.runWithContext==`function`?app.runWithContext(fn$6):fn$6()}function navigate(to$2,from){let guards,[leavingRecords,updatingRecords,enteringRecords]=extractChangingRecords(to$2,from);guards=extractComponentsGuards(leavingRecords.reverse(),`beforeRouteLeave`,to$2,from);for(let record of leavingRecords)record.leaveGuards.forEach(guard=>{guards.push(guardToPromiseFn(guard,to$2,from))});let canceledNavigationCheck=checkCanceledNavigationAndReject.bind(null,to$2,from);return guards.push(canceledNavigationCheck),runGuardQueue(guards).then(()=>{guards=[];for(let guard of beforeGuards.list())guards.push(guardToPromiseFn(guard,to$2,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>{guards=extractComponentsGuards(updatingRecords,`beforeRouteUpdate`,to$2,from);for(let record of updatingRecords)record.updateGuards.forEach(guard=>{guards.push(guardToPromiseFn(guard,to$2,from))});return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>{guards=[];for(let record of enteringRecords)if(record.beforeEnter)if(isArray$3(record.beforeEnter))for(let beforeEnter of record.beforeEnter)guards.push(guardToPromiseFn(beforeEnter,to$2,from));else guards.push(guardToPromiseFn(record.beforeEnter,to$2,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>(to$2.matched.forEach(record=>record.enterCallbacks={}),guards=extractComponentsGuards(enteringRecords,`beforeRouteEnter`,to$2,from,runWithContext),guards.push(canceledNavigationCheck),runGuardQueue(guards))).then(()=>{guards=[];for(let guard of beforeResolveGuards.list())guards.push(guardToPromiseFn(guard,to$2,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).catch(err=>isNavigationFailure(err,8)?err:Promise.reject(err))}function triggerAfterEach(to$2,from,failure){afterGuards.list().forEach(guard=>runWithContext(()=>guard(to$2,from,failure)))}function finalizeNavigation(toLocation,from,isPush,replace$1,data$12){let error=checkCanceledNavigation(toLocation,from);if(error)return error;let isFirstNavigation=from===START_LOCATION_NORMALIZED,state=isBrowser$1?history.state:{};isPush&&(replace$1||isFirstNavigation?routerHistory.replace(toLocation.fullPath,assign$1({scroll:isFirstNavigation&&state&&state.scroll},data$12)):routerHistory.push(toLocation.fullPath,data$12)),currentRoute.value=toLocation,handleScroll(toLocation,from,isPush,isFirstNavigation),markAsReady()}let removeHistoryListener;function setupListeners(){removeHistoryListener||=routerHistory.listen((to$2,_from,info)=>{if(!router$1.listening)return;let toLocation=resolve$1(to$2),shouldRedirect=handleRedirectRecord(toLocation);if(shouldRedirect){pushWithRedirect(assign$1(shouldRedirect,{replace:!0,force:!0}),toLocation).catch(noop);return}pendingLocation=toLocation;let from=currentRoute.value;isBrowser$1&&saveScrollPosition(getScrollKey(from.fullPath,info.delta),computeScrollPosition()),navigate(toLocation,from).catch(error=>isNavigationFailure(error,12)?error:isNavigationFailure(error,2)?(pushWithRedirect(assign$1(locationAsObject(error.to),{force:!0}),toLocation).then(failure=>{isNavigationFailure(failure,20)&&!info.delta&&info.type===NavigationType.pop&&routerHistory.go(-1,!1)}).catch(noop),Promise.reject()):(info.delta&&routerHistory.go(-info.delta,!1),triggerError(error,toLocation,from))).then(failure=>{failure||=finalizeNavigation(toLocation,from,!1),failure&&(info.delta&&!isNavigationFailure(failure,8)?routerHistory.go(-info.delta,!1):info.type===NavigationType.pop&&isNavigationFailure(failure,20)&&routerHistory.go(-1,!1)),triggerAfterEach(toLocation,from,failure)}).catch(noop)})}let readyHandlers=useCallbacks(),errorListeners=useCallbacks(),ready;function triggerError(error,to$2,from){markAsReady(error);let list$2=errorListeners.list();return list$2.length?list$2.forEach(handler=>handler(error,to$2,from)):console.error(error),Promise.reject(error)}function isReady(){return ready&¤tRoute.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((resolve$2,reject)=>{readyHandlers.add([resolve$2,reject])})}function markAsReady(err){return ready||(ready=!err,setupListeners(),readyHandlers.list().forEach(([resolve$2,reject])=>err?reject(err):resolve$2()),readyHandlers.reset()),err}function handleScroll(to$2,from,isPush,isFirstNavigation){let{scrollBehavior}=options$1;if(!isBrowser$1||!scrollBehavior)return Promise.resolve();let scrollPosition=!isPush&&getSavedScrollPosition(getScrollKey(to$2.fullPath,0))||(isFirstNavigation||!isPush)&&history.state&&history.state.scroll||null;return nextTick().then(()=>scrollBehavior(to$2,from,scrollPosition)).then(position$2=>position$2&&scrollToPosition(position$2)).catch(err=>triggerError(err,to$2,from))}let go$1=delta=>routerHistory.go(delta),started,installedApps=new Set,router$1={currentRoute,listening:!0,addRoute,removeRoute,clearRoutes:matcher.clearRoutes,hasRoute,getRoutes,resolve:resolve$1,options:options$1,push:push$1,replace,go:go$1,back:()=>go$1(-1),forward:()=>go$1(1),beforeEach:beforeGuards.add,beforeResolve:beforeResolveGuards.add,afterEach:afterGuards.add,onError:errorListeners.add,isReady,install(app){let router$2=this;app.component(`RouterLink`,RouterLink),app.component(`RouterView`,RouterView),app.config.globalProperties.$router=router$2,Object.defineProperty(app.config.globalProperties,`$route`,{enumerable:!0,get:()=>unref(currentRoute)}),isBrowser$1&&!started&¤tRoute.value===START_LOCATION_NORMALIZED&&(started=!0,push$1(routerHistory.location).catch(err=>{}));let reactiveRoute={};for(let key$1 in START_LOCATION_NORMALIZED)Object.defineProperty(reactiveRoute,key$1,{get:()=>currentRoute.value[key$1],enumerable:!0});app.provide(routerKey,router$2),app.provide(routeLocationKey,shallowReactive(reactiveRoute)),app.provide(routerViewLocationKey,currentRoute);let unmountApp=app.unmount;installedApps.add(app),app.unmount=function(){installedApps.delete(app),installedApps.size<1&&(pendingLocation=START_LOCATION_NORMALIZED,removeHistoryListener&&removeHistoryListener(),removeHistoryListener=null,currentRoute.value=START_LOCATION_NORMALIZED,started=!1,ready=!1),unmountApp()}}};function runGuardQueue(guards){return guards.reduce((promise,guard)=>promise.then(()=>runWithContext(guard)),Promise.resolve())}return router$1}function extractChangingRecords(to$2,from){let leavingRecords=[],updatingRecords=[],enteringRecords=[],len=Math.max(from.matched.length,to$2.matched.length);for(let i$1=0;i$1isSameRouteRecord(record,recordFrom))?updatingRecords.push(recordFrom):leavingRecords.push(recordFrom));let recordTo=to$2.matched[i$1];recordTo&&(from.matched.find(record=>isSameRouteRecord(record,recordTo))||enteringRecords.push(recordTo))}return[leavingRecords,updatingRecords,enteringRecords]}function useRouter(){return inject(routerKey)}function useRoute(_name){return inject(routeLocationKey)}const routes=[{path:`/`,name:`IndexScenePage`,component:()=>__vitePreload(()=>import(`./pages-bFQliyEp.js`),__vite__mapDeps([5,6,1,2,7,8,9,4,10,11,12])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}},{path:`/:all(.*)`,name:`/[...all]`,component:()=>__vitePreload(()=>import(`./_...all_-kEGASjnp.js`),[])},{path:`/audio`,name:`/audio`,component:()=>__vitePreload(()=>import(`./audio-5XV-uIzq.js`),[])},{path:`/devtools`,children:[{path:`audio-record`,name:`/devtools/audio-record`,component:()=>__vitePreload(()=>import(`./audio-record-k6DJ-iI-.js`),[])},{path:`background-remove`,name:`/devtools/background-remove`,component:()=>__vitePreload(()=>import(`./background-remove-CYdik4Zi.js`),__vite__mapDeps([13,14,15]))},{path:`chat`,name:`/devtools/chat`,component:()=>__vitePreload(()=>import(`./chat-ChmJywFT.js`),[])},{path:`gesture-circle`,name:`/devtools/gesture-circle`,component:()=>__vitePreload(()=>import(`./gesture-circle-n22RrPkv.js`),__vite__mapDeps([16,6])),meta:{layout:`plain`}},{path:`image`,name:`/devtools/image`,component:()=>__vitePreload(()=>import(`./image-drp9yoeo.js`),__vite__mapDeps([17,18]))},{path:`polaroid`,name:`/devtools/polaroid`,component:()=>__vitePreload(()=>import(`./polaroid-CCOPCJYT.js`),__vite__mapDeps([19,10,11,12]))},{path:`vibrant`,name:`/devtools/vibrant`,component:()=>__vitePreload(()=>import(`./vibrant-B9whP1_s.js`),__vite__mapDeps([20,21,15]))}]},{path:`/queue`,name:`/queue`,component:()=>__vitePreload(()=>import(`./queue-BhuYf-bb.js`),[])},{path:`/settings`,children:[{path:``,name:`/settings/`,component:()=>__vitePreload(()=>import(`./settings-BRiQ-TKp.js`),__vite__mapDeps([22,6,23])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`airi-card`,children:[{path:``,name:`/settings/airi-card/`,component:()=>__vitePreload(()=>import(`./airi-card-CSjKA-0V.js`),__vite__mapDeps([24,6,25,26,27,28,29,30,15])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`components`,children:[{path:`CardCreate`,name:`/settings/airi-card/components/CardCreate`,component:()=>__vitePreload(()=>import(`./CardCreate-DrdA498D.js`),__vite__mapDeps([31,25]))},{path:`CardCreationDialog`,name:`/settings/airi-card/components/CardCreationDialog`,component:()=>__vitePreload(()=>import(`./CardCreationDialog-Bz0WGMbk.js`),__vite__mapDeps([32,26,27]))},{path:`CardDetailDialog`,name:`/settings/airi-card/components/CardDetailDialog`,component:()=>__vitePreload(()=>import(`./CardDetailDialog-DErJoDp8.js`),__vite__mapDeps([33,28,29]))},{path:`CardListItem`,name:`/settings/airi-card/components/CardListItem`,component:()=>__vitePreload(()=>import(`./CardListItem-0f3nWl-J.js`),__vite__mapDeps([34,30]))},{path:`DeleteCardDialog`,name:`/settings/airi-card/components/DeleteCardDialog`,component:()=>__vitePreload(()=>import(`./DeleteCardDialog-Ba7jKdc6.js`),__vite__mapDeps([35,29]))}]}]},{path:`appearance`,children:[{path:``,name:`/settings/appearance/`,component:()=>__vitePreload(()=>import(`./appearance-CxlToFOV.js`),__vite__mapDeps([36,6])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`color-scheme`,name:`/settings/appearance/color-scheme`,component:()=>__vitePreload(()=>import(`./color-scheme-CwgGX5qJ.js`),__vite__mapDeps([37,6,38])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`developer`,name:`/settings/appearance/developer`,component:()=>__vitePreload(()=>import(`./developer-BQaCIb5y.js`),__vite__mapDeps([39,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`general`,name:`/settings/appearance/general`,component:()=>__vitePreload(()=>import(`./general-DBEEvfiB.js`),__vite__mapDeps([40,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`memory`,children:[{path:``,name:`/settings/memory/`,component:()=>__vitePreload(()=>import(`./memory-D3FghKqR.js`),__vite__mapDeps([41,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`models`,children:[{path:``,name:`/settings/models/`,component:()=>__vitePreload(()=>import(`./models-Dfsy0OC4.js`),__vite__mapDeps([42,6,23,43,10,11,12,21])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]},{path:`modules`,children:[{path:``,name:`/settings/modules/`,component:()=>__vitePreload(()=>import(`./modules-DRy6wkoH.js`),__vite__mapDeps([44,6,23,43])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`consciousness`,name:`/settings/modules/consciousness`,component:()=>__vitePreload(()=>import(`./consciousness-Em-15uM5.js`),__vite__mapDeps([45,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`hearing`,name:`/settings/modules/hearing`,component:()=>__vitePreload(()=>import(`./hearing-M0TBmueY.js`),__vite__mapDeps([46,6,14])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-long-term`,name:`/settings/modules/memory-long-term`,component:()=>__vitePreload(()=>import(`./memory-long-term-w8foiIis.js`),__vite__mapDeps([47,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-short-term`,name:`/settings/modules/memory-short-term`,component:()=>__vitePreload(()=>import(`./memory-short-term-D1hd1P4O.js`),__vite__mapDeps([48,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`speech`,name:`/settings/modules/speech`,component:()=>__vitePreload(()=>import(`./speech-DWhc1XoS.js`),__vite__mapDeps([49,6,8,50])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`providers`,children:[{path:``,name:`/settings/providers/`,component:()=>__vitePreload(()=>import(`./providers-DAWTpKmJ.js`),__vite__mapDeps([51,6,23,43])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`alibaba-cloud-model-studio`,name:`/settings/providers/alibaba-cloud-model-studio`,component:()=>__vitePreload(()=>import(`./alibaba-cloud-model-studio-CCuOI-7V.js`),__vite__mapDeps([52,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`anthropic`,name:`/settings/providers/anthropic`,component:()=>__vitePreload(()=>import(`./anthropic-BxJBcQ5t.js`),__vite__mapDeps([53,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`cloudflare-workers-ai`,name:`/settings/providers/cloudflare-workers-ai`,component:()=>__vitePreload(()=>import(`./cloudflare-workers-ai-MVAb5rND.js`),__vite__mapDeps([54,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`deepseek`,name:`/settings/providers/deepseek`,component:()=>__vitePreload(()=>import(`./deepseek-BlRSY_Z0.js`),__vite__mapDeps([55,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`elevenlabs`,name:`/settings/providers/elevenlabs`,component:()=>__vitePreload(()=>import(`./elevenlabs-C8CGb9J2.js`),__vite__mapDeps([56,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`featherless-ai`,name:`/settings/providers/featherless-ai`,component:()=>__vitePreload(()=>import(`./featherless-ai-CvwPAVKd.js`),__vite__mapDeps([57,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`fireworks-ai`,name:`/settings/providers/fireworks-ai`,component:()=>__vitePreload(()=>import(`./fireworks-ai-uxjeby9e.js`),__vite__mapDeps([58,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`google-generative-ai`,name:`/settings/providers/google-generative-ai`,component:()=>__vitePreload(()=>import(`./google-generative-ai-CKximfd-.js`),__vite__mapDeps([59,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`microsoft-speech`,name:`/settings/providers/microsoft-speech`,component:()=>__vitePreload(()=>import(`./microsoft-speech-CEMk_Y1p.js`),__vite__mapDeps([60,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`mistral-ai`,name:`/settings/providers/mistral-ai`,component:()=>__vitePreload(()=>import(`./mistral-ai-DeCG1zpj.js`),__vite__mapDeps([61,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`moonshot-ai`,name:`/settings/providers/moonshot-ai`,component:()=>__vitePreload(()=>import(`./moonshot-ai-CH0UaQqy.js`),__vite__mapDeps([62,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`novita-ai`,name:`/settings/providers/novita-ai`,component:()=>__vitePreload(()=>import(`./novita-ai-CI0eK_Uz.js`),__vite__mapDeps([63,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`ollama`,name:`/settings/providers/ollama`,component:()=>__vitePreload(()=>import(`./ollama-3XcXtIkW.js`),__vite__mapDeps([64,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai`,name:`/settings/providers/openai`,component:()=>__vitePreload(()=>import(`./openai-DDftvili.js`),__vite__mapDeps([65,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-speech`,name:`/settings/providers/openai-audio-speech`,component:()=>__vitePreload(()=>import(`./openai-audio-speech-CKZ4rtwU.js`),__vite__mapDeps([66,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-transcription`,name:`/settings/providers/openai-audio-transcription`,component:()=>__vitePreload(()=>import(`./openai-audio-transcription-DC9rP5fb.js`),__vite__mapDeps([67,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openrouter-ai`,name:`/settings/providers/openrouter-ai`,component:()=>__vitePreload(()=>import(`./openrouter-ai-BUmol1WC.js`),__vite__mapDeps([68,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2`,name:`/settings/providers/player2`,component:()=>__vitePreload(()=>import(`./player2-9goZ4jBJ.js`),__vite__mapDeps([69,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2-speech`,name:`/settings/providers/player2-speech`,component:()=>__vitePreload(()=>import(`./player2-speech-YsXUM2wN.js`),__vite__mapDeps([70,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`together-ai`,name:`/settings/providers/together-ai`,component:()=>__vitePreload(()=>import(`./together-ai-DhK_y0lS.js`),__vite__mapDeps([71,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`volcengine`,name:`/settings/providers/volcengine`,component:()=>__vitePreload(()=>import(`./volcengine-0NaQ_0q9.js`),__vite__mapDeps([72,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`xai`,name:`/settings/providers/xai`,component:()=>__vitePreload(()=>import(`./xai-DnEbqAHv.js`),__vite__mapDeps([73,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`scene`,children:[{path:``,name:`/settings/scene/`,component:()=>__vitePreload(()=>import(`./scene-CjpP1VIb.js`),__vite__mapDeps([74,6,23,43])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]}]},{path:`/stage`,children:[{path:``,name:`StageScenePage`,component:()=>__vitePreload(()=>import(`./stage-GlmzKUmw.js`),__vite__mapDeps([75,6,1,2,7,8,9,10,11,12])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}}]},{path:`/test`,children:[{path:`filter-message`,name:`/test/filter-message`,component:()=>__vitePreload(()=>import(`./filter-message-CpQpJgpb.js`),__vite__mapDeps([76,8,50]))},{path:`queues`,children:[{path:`delays`,name:`/test/queues/delays`,component:()=>__vitePreload(()=>import(`./delays-BYTPS79J.js`),__vite__mapDeps([77,8,50]))},{path:`emotions`,name:`/test/queues/emotions`,component:()=>__vitePreload(()=>import(`./emotions-CYtEYKmx.js`),__vite__mapDeps([78,8,50]))},{path:`messages`,name:`/test/queues/messages`,component:()=>__vitePreload(()=>import(`./messages-Cg3q0Woa.js`),__vite__mapDeps([79,8,50]))}]}]}];var AudioSpectrum_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`AudioSpectrum`,props:{stream:{},bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(__props){let props=__props,frequencies=ref(Array.from({length:props.bars}).fill(0));onMounted(()=>{handleAnalyze()}),watch(()=>props.stream,()=>{handleAnalyze()});function handleAnalyze(){if(!props.stream)return;let audioContext=new(window.AudioContext||window.webkitAudioContext),source=audioContext.createMediaStreamSource(props.stream),analyser=audioContext.createAnalyser();analyser.fftSize=2048,source.connect(analyser);let bufferLength=analyser.frequencyBinCount,dataArray=new Uint8Array(bufferLength),sampleRate=audioContext.sampleRate,frequencyResolution=sampleRate/analyser.fftSize,minBin=Math.floor(props.minFreq/frequencyResolution),maxBin=Math.floor(props.maxFreq/frequencyResolution),usableBins=maxBin-minBin,binsPerBar=Math.floor(usableBins/props.bars),analyze=()=>{try{requestAnimationFrame(analyze),analyser.getByteFrequencyData(dataArray);let bars=Array.from({length:props.bars}).fill(0);for(let i$1=0;i$1renderSlot(_ctx.$slots,`default`,{frequencies:frequencies.value})}}),AudioSpectrum_default=AudioSpectrum_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$43={"h-full":``,flex:``,"items-center":``,"gap-1":``},AMPLIFICATION=5;var AudioSpectrumVisualizer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`AudioSpectrumVisualizer`,props:{frequencies:{},barsClass:{}},setup(__props){let props=__props;function getReductionFactor(index$1,totalBars){let minFactor=.1,maxFactor=1;return minFactor+(maxFactor-minFactor)*(index$1/totalBars)}function getBarHeight(frequency,index$1){let reductionFactor=getReductionFactor(index$1,props.frequencies.length);return Math.min(100,Math.max(10,frequency*100*AMPLIFICATION*reductionFactor))}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$43,[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.frequencies,(frequency,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,"h-full":``,flex:``,"flex-1":``,"items-end":``},[createBaseVNode(`div`,{transition:`all 100 ease-in-out`,"mx-auto":``,"my-0":``,"w-full":``,"rounded-full":``,class:normalizeClass(_ctx.barsClass),style:normalizeStyle({height:`${getBarHeight(frequency,index$1)}%`})},null,6)]))),128))]))}}),AudioSpectrumVisualizer_default=AudioSpectrumVisualizer_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$42={key:0,class:`mb-2 flex items-center justify-between`},_hoisted_2$28={class:`text-sm font-medium`},_hoisted_3$22={class:`text-sm text-neutral-500`};var LevelMeter_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`LevelMeter`,props:{level:{},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:{}},setup(__props){let props=__props,levelBars=computed(()=>{let normalizedLevel=Math.max(0,Math.min(100,(props.level-props.min)/(props.max-props.min)*100)),activeBars=Math.floor(normalizedLevel/100*props.numBars);return Array.from({length:props.numBars},(_$2,i$1)=>({active:i$1a$2.value-b$4.value);for(let threshold of thresholds)if(barLevel<=threshold.value)return threshold.color;return thresholds[thresholds.length-1]?.color||`bg-green-500`}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,null,[_ctx.showHeader?(openBlock(),createElementBlock(`div`,_hoisted_1$42,[createBaseVNode(`span`,_hoisted_2$28,toDisplayString(_ctx.label),1),createBaseVNode(`span`,_hoisted_3$22,toDisplayString(_ctx.formatValue?_ctx.formatValue(_ctx.level):`${Math.round(_ctx.level)}${_ctx.unit}`),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 dark:bg-neutral-700`,style:normalizeStyle({height:`${_ctx.height}px`})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(levelBars.value,(bar,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,class:normalizeClass([`flex-1 rounded-sm transition-all`,[bar.active?getBarColor(index$1,bar.level):`bg-neutral-200 dark:bg-neutral-600`,`duration-${_ctx.animationSpeed}`]]),style:normalizeStyle({height:bar.active?`100%`:`20%`})},null,6))),128))],4)]))}}),LevelMeter_default=LevelMeter_vue_vue_type_script_setup_true_lang_default,Volumed_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Volumed`,props:{perspective:{},transform:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`volumed`,style:normalizeStyle({perspective:`${_ctx.perspective}px`,transform:_ctx.transform})},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],4))}}),__plugin_vue_export_helper_default=(sfc,props)=>{let target$1=sfc.__vccOpts||sfc;for(let[key$1,val]of props)target$1[key$1]=val;return target$1},Volumed_default=__plugin_vue_export_helper_default(Volumed_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-d8ce56aa`]]),CursorMomentum_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`CursorMomentum`,props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(__props,{expose:__expose}){let props=__props,momentum=ref(1),currentValue=ref(0),lastTimestamp=0,FRICTION=toRef(()=>props.friction),BASE_SPEED=toRef(()=>props.baseSpeed),MOMENTUM_FACTOR=toRef(()=>props.momentumFactor);function updateMomentum(timestamp$2){lastTimestamp||=timestamp$2;let deltaTime=timestamp$2-lastTimestamp;lastTimestamp=timestamp$2,momentum.value=BASE_SPEED.value+(momentum.value-BASE_SPEED.value)*FRICTION.value,currentValue.value+=momentum.value*deltaTime,requestAnimationFrame(updateMomentum)}function handleMouseMove(event){let speed=Math.sqrt(event.movementX**2+event.movementY**2);momentum.value+=speed*MOMENTUM_FACTOR.value}return onMounted(()=>{window.addEventListener(`mousemove`,handleMouseMove),requestAnimationFrame(updateMomentum)}),onUnmounted(()=>{window.removeEventListener(`mousemove`,handleMouseMove)}),__expose({momentum,currentValue}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`,{momentum:momentum.value,currentValue:currentValue.value})}}),CursorMomentum_default=CursorMomentum_vue_vue_type_script_setup_true_lang_default,TestDummyMarkerFlat_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TestDummyMarkerFlat`,props:{size:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`test-dummy-flat`,style:normalizeStyle({width:`${_ctx.size}px`,height:`${_ctx.size}px`})},_cache$1[0]||=[createBaseVNode(`div`,{class:`marker`},null,-1)],4))}}),TestDummyMarkerFlat_default=__plugin_vue_export_helper_default(TestDummyMarkerFlat_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-28f8c660`]]),TestDummyMarker_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TestDummyMarker`,setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(CursorMomentum_default,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:withCtx(({currentValue})=>[createVNode(Volumed_default,{perspective:800,transform:`rotateX(45deg) translateY(3px)`},{default:withCtx(()=>[createVNode(TestDummyMarkerFlat_default,{size:24,style:normalizeStyle({transform:`rotate(${currentValue}deg)`})},null,8,[`style`])]),_:2},1024)]),_:1}))}}),TestDummyMarker_default=TestDummyMarker_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$41={key:0,class:`mb-2 flex items-center justify-between`},_hoisted_2$27={class:`text-sm font-medium`},_hoisted_3$21={class:`text-sm text-neutral-500`},_hoisted_4$19={key:1,class:`mt-1 flex gap-3 text-xs text-neutral-500`},_hoisted_5$16={class:`flex items-center gap-1`},_hoisted_6$14={class:`flex items-center gap-1`},_hoisted_7$11={class:`flex items-center gap-1`};var ThresholdMeter_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ThresholdMeter`,props:{value:{},threshold:{},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:{}},setup(__props){let props=__props,thresholdBars=computed(()=>{let normalizedValue=Math.max(0,Math.min(1,(props.value-props.min)/(props.max-props.min))),normalizedThreshold=Math.max(0,Math.min(1,(props.threshold-props.min)/(props.max-props.min))),activeBars=Math.floor(normalizedValue*props.numBars),thresholdBar=Math.floor(normalizedThreshold*props.numBars);return Array.from({length:props.numBars},(_$2,i$1)=>({active:i$1=thresholdBar,isBelowThreshold:i$1(openBlock(),createElementBlock(`div`,null,[_ctx.showHeader?(openBlock(),createElementBlock(`div`,_hoisted_1$41,[createBaseVNode(`span`,_hoisted_2$27,toDisplayString(_ctx.label),1),createBaseVNode(`span`,_hoisted_3$21,toDisplayString(_ctx.formatValue?_ctx.formatValue(_ctx.value):`${(_ctx.value*100).toFixed(_ctx.precision)}${_ctx.unit}`),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 p-1 dark:bg-neutral-700`,style:normalizeStyle({height:`${_ctx.height}px`})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(thresholdBars.value,(bar,index$1)=>(openBlock(),createElementBlock(`div`,{key:`threshold-${index$1}`,class:normalizeClass([`flex-1 rounded-sm transition-all`,[bar.isThreshold?_ctx.thresholdBarClass:bar.isAboveThreshold?_ctx.aboveThresholdClass:bar.isBelowThreshold?_ctx.belowThresholdClass:_ctx.inactiveBarClass,`duration-${_ctx.animationSpeed}`]]),style:normalizeStyle({height:bar.active||bar.isThreshold?`100%`:`20%`})},null,6))),128))],4),_ctx.showLegend?(openBlock(),createElementBlock(`div`,_hoisted_4$19,[createBaseVNode(`span`,_hoisted_5$16,[createBaseVNode(`div`,{class:normalizeClass(`inline-block h-0.5lh w-1lh rounded-full ${_ctx.belowThresholdClass}`)},null,2),createTextVNode(` `+toDisplayString(_ctx.belowLabel),1)]),createBaseVNode(`span`,_hoisted_6$14,[createBaseVNode(`div`,{class:normalizeClass(`inline-block h-0.5lh w-1lh rounded-full border border-neutral-400 ${_ctx.thresholdBarClass}`)},null,2),createTextVNode(` `+toDisplayString(_ctx.thresholdLabel),1)]),createBaseVNode(`span`,_hoisted_7$11,[createBaseVNode(`div`,{class:normalizeClass(`inline-block h-0.5lh w-1lh rounded-full ${_ctx.aboveThresholdClass}`)},null,2),createTextVNode(` `+toDisplayString(_ctx.aboveLabel),1)])])):createCommentVNode(``,!0)]))}}),ThresholdMeter_default=ThresholdMeter_vue_vue_type_script_setup_true_lang_default;const parseNumber=(color$2,len)=>{if(typeof color$2==`number`){if(len===3)return{mode:`rgb`,r:(color$2>>8&15|color$2>>4&240)/255,g:(color$2>>4&15|color$2&240)/255,b:(color$2&15|color$2<<4&240)/255};if(len===4)return{mode:`rgb`,r:(color$2>>12&15|color$2>>8&240)/255,g:(color$2>>8&15|color$2>>4&240)/255,b:(color$2>>4&15|color$2&240)/255,alpha:(color$2&15|color$2<<4&240)/255};if(len===6)return{mode:`rgb`,r:(color$2>>16&255)/255,g:(color$2>>8&255)/255,b:(color$2&255)/255};if(len===8)return{mode:`rgb`,r:(color$2>>24&255)/255,g:(color$2>>16&255)/255,b:(color$2>>8&255)/255,alpha:(color$2&255)/255}}};var parseNumber_default=parseNumber;const named={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 named_default=named;const parseNamed=color$2=>parseNumber_default(named_default[color$2.toLowerCase()],6);var parseNamed_default=parseNamed;const hex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,parseHex=color$2=>{let match;return(match=color$2.match(hex))?parseNumber_default(parseInt(match[1],16),match[1].length):void 0};var parseHex_default=parseHex;const num$1=`([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)`,num_none=`(?:${num$1}|none)`,per=`${num$1}%`,per_none=`(?:${num$1}%|none)`,num_per=`(?:${num$1}%|${num$1})`,num_per_none=`(?:${num$1}%|${num$1}|none)`,hue=`(?:${num$1}(deg|grad|rad|turn)|${num$1})`,hue_none=`(?:${num$1}(deg|grad|rad|turn)|${num$1}|none)`,c$2=`\\s*,\\s*`,rx_num_per_none=RegExp(`^`+num_per_none+`$`),rgb_num_old=RegExp(`^rgba?\\(\\s*${num$1}${c$2}${num$1}${c$2}${num$1}\\s*(?:,\\s*${num_per}\\s*)?\\)$`),rgb_per_old=RegExp(`^rgba?\\(\\s*${per}${c$2}${per}${c$2}${per}\\s*(?:,\\s*${num_per}\\s*)?\\)$`),parseRgbLegacy=color$2=>{let res={mode:`rgb`},match;if(match=color$2.match(rgb_num_old))match[1]!==void 0&&(res.r=match[1]/255),match[2]!==void 0&&(res.g=match[2]/255),match[3]!==void 0&&(res.b=match[3]/255);else if(match=color$2.match(rgb_per_old))match[1]!==void 0&&(res.r=match[1]/100),match[2]!==void 0&&(res.g=match[2]/100),match[3]!==void 0&&(res.b=match[3]/100);else return;return match[4]===void 0?match[5]!==void 0&&(res.alpha=Math.max(0,Math.min(1,+match[5]))):res.alpha=Math.max(0,Math.min(1,match[4]/100)),res};var parseRgbLegacy_default=parseRgbLegacy;const prepare=(color$2,mode)=>color$2===void 0?void 0:typeof color$2==`object`?color$2.mode===void 0?mode?{...color$2,mode}:void 0:color$2:parse_default(color$2);var _prepare_default=prepare;const converter=(target_mode=`rgb`)=>color$2=>(color$2=_prepare_default(color$2,target_mode))===void 0?void 0:color$2.mode===target_mode?color$2:converters[color$2.mode][target_mode]?converters[color$2.mode][target_mode](color$2):target_mode===`rgb`?converters[color$2.mode].rgb(color$2):converters.rgb[target_mode](converters[color$2.mode].rgb(color$2));var converter_default=converter;const converters={},modes={},parsers=[],colorProfiles={},identity=v$2=>v$2,useMode=definition$29=>(converters[definition$29.mode]={...converters[definition$29.mode],...definition$29.toMode},Object.keys(definition$29.fromMode||{}).forEach(k$4=>{converters[k$4]||(converters[k$4]={}),converters[k$4][definition$29.mode]=definition$29.fromMode[k$4]}),definition$29.ranges||={},definition$29.difference||={},definition$29.channels.forEach(channel=>{if(definition$29.ranges[channel]===void 0&&(definition$29.ranges[channel]=[0,1]),!definition$29.interpolate[channel])throw Error(`Missing interpolator for: ${channel}`);typeof definition$29.interpolate[channel]==`function`&&(definition$29.interpolate[channel]={use:definition$29.interpolate[channel]}),definition$29.interpolate[channel].fixup||(definition$29.interpolate[channel].fixup=identity)}),modes[definition$29.mode]=definition$29,(definition$29.parse||[]).forEach(parser=>{useParser(parser,definition$29.mode)}),converter_default(definition$29.mode)),getMode=mode=>modes[mode],useParser=(parser,mode)=>{if(typeof parser==`string`){if(!mode)throw Error(`'mode' required when 'parser' is a string`);colorProfiles[parser]=mode}else typeof parser==`function`&&parsers.indexOf(parser)<0&&parsers.push(parser)},IdentStartCodePoint=/[^\x00-\x7F]|[a-zA-Z_]/,IdentCodePoint=/[^\x00-\x7F]|[-\w]/,Tok={Function:`function`,Ident:`ident`,Number:`number`,Percentage:`percentage`,ParenClose:`)`,None:`none`,Hue:`hue`,Alpha:`alpha`};let _i$1=0;function is_num(chars){let ch$1=chars[_i$1],ch1=chars[_i$1+1];return ch$1===`-`||ch$1===`+`?/\d/.test(ch1)||ch1===`.`&&/\d/.test(chars[_i$1+2]):ch$1===`.`?/\d/.test(ch1):/\d/.test(ch$1)}function is_ident(chars){if(_i$1>=chars.length)return!1;let ch$1=chars[_i$1];if(IdentStartCodePoint.test(ch$1))return!0;if(ch$1===`-`){if(chars.length-_i$1<2)return!1;let ch1=chars[_i$1+1];return!!(ch1===`-`||IdentStartCodePoint.test(ch1))}return!1}const huenits={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function num(chars){let value$1=``;if((chars[_i$1]===`-`||chars[_i$1]===`+`)&&(value$1+=chars[_i$1++]),value$1+=digits(chars),chars[_i$1]===`.`&&/\d/.test(chars[_i$1+1])&&(value$1+=chars[_i$1++]+digits(chars)),(chars[_i$1]===`e`||chars[_i$1]===`E`)&&((chars[_i$1+1]===`-`||chars[_i$1+1]===`+`)&&/\d/.test(chars[_i$1+2])?value$1+=chars[_i$1++]+chars[_i$1++]+digits(chars):/\d/.test(chars[_i$1+1])&&(value$1+=chars[_i$1++]+digits(chars))),is_ident(chars)){let id$1=ident(chars);return id$1===`deg`||id$1===`rad`||id$1===`turn`||id$1===`grad`?{type:Tok.Hue,value:value$1*huenits[id$1]}:void 0}return chars[_i$1]===`%`?(_i$1++,{type:Tok.Percentage,value:+value$1}):{type:Tok.Number,value:+value$1}}function digits(chars){let v$2=``;for(;/\d/.test(chars[_i$1]);)v$2+=chars[_i$1++];return v$2}function ident(chars){let v$2=``;for(;_i$1store[key$1],set(value$2){store[key$1]=value$2}}):(isRef(value$1)||isReactive(value$1))&&(refs[key$1]=toRef(store,key$1))}return refs}const scriptRel=`modulepreload`,assetsURL=function(dep){return`/`+dep},seen={},__vitePreload=function(baseModule,deps,importerUrl){let promise=Promise.resolve();if(deps&&deps.length>0){let links=document.getElementsByTagName(`link`),cspNonceMeta=document.querySelector(`meta[property=csp-nonce]`),cspNonce=cspNonceMeta?.nonce||cspNonceMeta?.getAttribute(`nonce`);function allSettled(promises$2){return Promise.all(promises$2.map(p$1$1=>Promise.resolve(p$1$1).then(value$1=>({status:`fulfilled`,value:value$1}),reason=>({status:`rejected`,reason}))))}promise=allSettled(deps.map(dep=>{if(dep=assetsURL(dep,importerUrl),dep in seen)return;seen[dep]=!0;let isCss=dep.endsWith(`.css`),cssSelector=isCss?`[rel="stylesheet"]`:``,isBaseRelative=!!importerUrl;if(isBaseRelative)for(let i$1=links.length-1;i$1>=0;i$1--){let link$1$1=links[i$1];if(link$1$1.href===dep&&(!isCss||link$1$1.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${dep}"]${cssSelector}`))return;let link$1=document.createElement(`link`);if(link$1.rel=isCss?`stylesheet`:scriptRel,isCss||(link$1.as=`script`),link$1.crossOrigin=``,link$1.href=dep,cspNonce&&link$1.setAttribute(`nonce`,cspNonce),document.head.appendChild(link$1),isCss)return new Promise((res,rej)=>{link$1.addEventListener(`load`,res),link$1.addEventListener(`error`,()=>rej(Error(`Unable to preload CSS for ${dep}`)))})}))}function handlePreloadError(err$2){let e$1$1=new Event(`vite:preloadError`,{cancelable:!0});if(e$1$1.payload=err$2,window.dispatchEvent(e$1$1),!e$1$1.defaultPrevented)throw err$2}return promise.then(res=>{for(let item of res||[]){if(item.status!==`rejected`)continue;handlePreloadError(item.reason)}return baseModule().catch(handlePreloadError)})},setupLayouts=routes$1=>{let layouts={},modules=Object.assign({"/src/layouts/default.vue":()=>__vitePreload(()=>import(`./default-BcIEAl0a.js`),__vite__mapDeps([0,1,2])),"/src/layouts/home.vue":()=>__vitePreload(()=>import(`./home-PWxm5mNd.js`),[]),"/src/layouts/plain.vue":()=>__vitePreload(()=>import(`./plain-DljYvhWl.js`),[]),"/src/layouts/settings.vue":()=>__vitePreload(()=>import(`./settings-DlFH7AgC.js`),__vite__mapDeps([3,1,2,4])),"/src/layouts/stage.vue":()=>__vitePreload(()=>import(`./stage-LDOg1gBu.js`),[])});Object.entries(modules).forEach(([name$2,module$1])=>{let key$1=name$2.replace(`/src/layouts/`,``).replace(`.vue`,``);layouts[key$1]=module$1});function deepSetupLayout(routes$2,top=!0){return routes$2.map(route=>{if(route.children?.length>0&&(route.children=deepSetupLayout(route.children,!1)),top){let skipLayout=!route.component&&route.children?.find(r$2=>(r$2.path===``||r$2.path===`/`)&&r$2.meta?.isLayout);if(skipLayout)return route;if(route.meta?.layout!==!1)return{path:route.path,component:layouts[route.meta?.layout||`default`],children:route.path===`/`?[route]:[{...route,path:``}],meta:{isLayout:!0}}}return route.meta?.layout?{path:route.path,component:layouts[route.meta?.layout],children:[{...route,path:``}],meta:{isLayout:!0}}:route})}return deepSetupLayout(routes$1)},isBrowser$1=typeof document<`u`;function isRouteComponent(component){return typeof component==`object`||`displayName`in component||`props`in component||`__vccOpts`in component}function isESModule(obj){return obj.__esModule||obj[Symbol.toStringTag]===`Module`||obj.default&&isRouteComponent(obj.default)}const assign$1=Object.assign;function applyToParams(fn$6,params){let newParams={};for(let key$1 in params){let value$1=params[key$1];newParams[key$1]=isArray$3(value$1)?value$1.map(fn$6):fn$6(value$1)}return newParams}const noop=()=>{},isArray$3=Array.isArray,HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(text$5){return encodeURI(``+text$5).replace(ENC_PIPE_RE,`|`).replace(ENC_BRACKET_OPEN_RE,`[`).replace(ENC_BRACKET_CLOSE_RE,`]`)}function encodeHash(text$5){return commonEncode(text$5).replace(ENC_CURLY_OPEN_RE,`{`).replace(ENC_CURLY_CLOSE_RE,`}`).replace(ENC_CARET_RE,`^`)}function encodeQueryValue(text$5){return commonEncode(text$5).replace(PLUS_RE,`%2B`).replace(ENC_SPACE_RE,`+`).replace(HASH_RE,`%23`).replace(AMPERSAND_RE,`%26`).replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,`{`).replace(ENC_CURLY_CLOSE_RE,`}`).replace(ENC_CARET_RE,`^`)}function encodeQueryKey(text$5){return encodeQueryValue(text$5).replace(EQUAL_RE,`%3D`)}function encodePath(text$5){return commonEncode(text$5).replace(HASH_RE,`%23`).replace(IM_RE,`%3F`)}function encodeParam(text$5){return text$5==null?``:encodePath(text$5).replace(SLASH_RE,`%2F`)}function decode$1(text$5){try{return decodeURIComponent(``+text$5)}catch{}return``+text$5}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=path=>path.replace(TRAILING_SLASH_RE,``);function parseURL(parseQuery$1,location$1,currentLocation=`/`){let path,query={},searchString=``,hash=``,hashPos=location$1.indexOf(`#`),searchPos=location$1.indexOf(`?`);return hashPos=0&&(searchPos=-1),searchPos>-1&&(path=location$1.slice(0,searchPos),searchString=location$1.slice(searchPos+1,hashPos>-1?hashPos:location$1.length),query=parseQuery$1(searchString)),hashPos>-1&&(path||=location$1.slice(0,hashPos),hash=location$1.slice(hashPos,location$1.length)),path=resolveRelativePath(path??location$1,currentLocation),{fullPath:path+(searchString&&`?`)+searchString+hash,path,query,hash:decode$1(hash)}}function stringifyURL(stringifyQuery$1,location$1){let query=location$1.query?stringifyQuery$1(location$1.query):``;return location$1.path+(query&&`?`)+query+(location$1.hash||``)}function stripBase(pathname,base){return!base||!pathname.toLowerCase().startsWith(base.toLowerCase())?pathname:pathname.slice(base.length)||`/`}function isSameRouteLocation(stringifyQuery$1,a$2,b$4){let aLastIndex=a$2.matched.length-1,bLastIndex=b$4.matched.length-1;return aLastIndex>-1&&aLastIndex===bLastIndex&&isSameRouteRecord(a$2.matched[aLastIndex],b$4.matched[bLastIndex])&&isSameRouteLocationParams(a$2.params,b$4.params)&&stringifyQuery$1(a$2.query)===stringifyQuery$1(b$4.query)&&a$2.hash===b$4.hash}function isSameRouteRecord(a$2,b$4){return(a$2.aliasOf||a$2)===(b$4.aliasOf||b$4)}function isSameRouteLocationParams(a$2,b$4){if(Object.keys(a$2).length!==Object.keys(b$4).length)return!1;for(let key$1 in a$2)if(!isSameRouteLocationParamsValue(a$2[key$1],b$4[key$1]))return!1;return!0}function isSameRouteLocationParamsValue(a$2,b$4){return isArray$3(a$2)?isEquivalentArray(a$2,b$4):isArray$3(b$4)?isEquivalentArray(b$4,a$2):a$2===b$4}function isEquivalentArray(a$2,b$4){return isArray$3(b$4)?a$2.length===b$4.length&&a$2.every((value$1,i$1)=>value$1===b$4[i$1]):a$2.length===1&&a$2[0]===b$4}function resolveRelativePath(to$2,from){if(to$2.startsWith(`/`))return to$2;if(!to$2)return from;let fromSegments=from.split(`/`),toSegments=to$2.split(`/`),lastToSegment=toSegments[toSegments.length-1];(lastToSegment===`..`||lastToSegment===`.`)&&toSegments.push(``);let position$2=fromSegments.length-1,toPosition,segment;for(toPosition=0;toPosition1&&position$2--;else break;return fromSegments.slice(0,position$2).join(`/`)+`/`+toSegments.slice(toPosition).join(`/`)}const START_LOCATION_NORMALIZED={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};var NavigationType;(function(NavigationType$1){NavigationType$1.pop=`pop`,NavigationType$1.push=`push`})(NavigationType||={});var NavigationDirection;(function(NavigationDirection$1){NavigationDirection$1.back=`back`,NavigationDirection$1.forward=`forward`,NavigationDirection$1.unknown=``})(NavigationDirection||={});function normalizeBase(base){if(!base)if(isBrowser$1){let baseEl=document.querySelector(`base`);base=baseEl&&baseEl.getAttribute(`href`)||`/`,base=base.replace(/^\w+:\/\/[^\/]+/,``)}else base=`/`;return base[0]!==`/`&&base[0]!==`#`&&(base=`/`+base),removeTrailingSlash(base)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(base,location$1){return base.replace(BEFORE_HASH_RE,`#`)+location$1}function getElementPosition(el$1,offset$2){let docRect=document.documentElement.getBoundingClientRect(),elRect=el$1.getBoundingClientRect();return{behavior:offset$2.behavior,left:elRect.left-docRect.left-(offset$2.left||0),top:elRect.top-docRect.top-(offset$2.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(position$2){let scrollToOptions;if(`el`in position$2){let positionEl=position$2.el,isIdSelector=typeof positionEl==`string`&&positionEl.startsWith(`#`),el$1=typeof positionEl==`string`?isIdSelector?document.getElementById(positionEl.slice(1)):document.querySelector(positionEl):positionEl;if(!el$1)return;scrollToOptions=getElementPosition(el$1,position$2)}else scrollToOptions=position$2;`scrollBehavior`in document.documentElement.style?window.scrollTo(scrollToOptions):window.scrollTo(scrollToOptions.left==null?window.scrollX:scrollToOptions.left,scrollToOptions.top==null?window.scrollY:scrollToOptions.top)}function getScrollKey(path,delta){let position$2=history.state?history.state.position-delta:-1;return position$2+path}const scrollPositions=new Map;function saveScrollPosition(key$1,scrollPosition){scrollPositions.set(key$1,scrollPosition)}function getSavedScrollPosition(key$1){let scroll=scrollPositions.get(key$1);return scrollPositions.delete(key$1),scroll}let createBaseLocation=()=>location.protocol+`//`+location.host;function createCurrentLocation(base,location$1){let{pathname,search:search$1,hash}=location$1,hashPos=base.indexOf(`#`);if(hashPos>-1){let slicePos=hash.includes(base.slice(hashPos))?base.slice(hashPos).length:1,pathFromHash=hash.slice(slicePos);return pathFromHash[0]!==`/`&&(pathFromHash=`/`+pathFromHash),stripBase(pathFromHash,``)}let path=stripBase(pathname,base);return path+search$1+hash}function useHistoryListeners(base,historyState,currentLocation,replace){let listeners=[],teardowns=[],pauseState=null,popStateHandler=({state})=>{let to$2=createCurrentLocation(base,location),from=currentLocation.value,fromState=historyState.value,delta=0;if(state){if(currentLocation.value=to$2,historyState.value=state,pauseState&&pauseState===from){pauseState=null;return}delta=fromState?state.position-fromState.position:0}else replace(to$2);listeners.forEach(listener=>{listener(currentLocation.value,from,{delta,type:NavigationType.pop,direction:delta?delta>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function pauseListeners(){pauseState=currentLocation.value}function listen(callback){listeners.push(callback);let teardown=()=>{let index$1=listeners.indexOf(callback);index$1>-1&&listeners.splice(index$1,1)};return teardowns.push(teardown),teardown}function beforeUnloadListener(){let{history:history$1}=window;history$1.state&&history$1.replaceState(assign$1({},history$1.state,{scroll:computeScrollPosition()}),``)}function destroy(){for(let teardown of teardowns)teardown();teardowns=[],window.removeEventListener(`popstate`,popStateHandler),window.removeEventListener(`beforeunload`,beforeUnloadListener)}return window.addEventListener(`popstate`,popStateHandler),window.addEventListener(`beforeunload`,beforeUnloadListener,{passive:!0}),{pauseListeners,listen,destroy}}function buildState(back,current,forward,replaced=!1,computeScroll=!1){return{back,current,forward,replaced,position:window.history.length,scroll:computeScroll?computeScrollPosition():null}}function useHistoryStateNavigation(base){let{history:history$1,location:location$1}=window,currentLocation={value:createCurrentLocation(base,location$1)},historyState={value:history$1.state};historyState.value||changeLocation(currentLocation.value,{back:null,current:currentLocation.value,forward:null,position:history$1.length-1,replaced:!0,scroll:null},!0);function changeLocation(to$2,state,replace$1){let hashIndex=base.indexOf(`#`),url=hashIndex>-1?(location$1.host&&document.querySelector(`base`)?base:base.slice(hashIndex))+to$2:createBaseLocation()+base+to$2;try{history$1[replace$1?`replaceState`:`pushState`](state,``,url),historyState.value=state}catch(err){console.error(err),location$1[replace$1?`replace`:`assign`](url)}}function replace(to$2,data$12){let state=assign$1({},history$1.state,buildState(historyState.value.back,to$2,historyState.value.forward,!0),data$12,{position:historyState.value.position});changeLocation(to$2,state,!0),currentLocation.value=to$2}function push$1(to$2,data$12){let currentState=assign$1({},historyState.value,history$1.state,{forward:to$2,scroll:computeScrollPosition()});changeLocation(currentState.current,currentState,!0);let state=assign$1({},buildState(currentLocation.value,to$2,null),{position:currentState.position+1},data$12);changeLocation(to$2,state,!1),currentLocation.value=to$2}return{location:currentLocation,state:historyState,push:push$1,replace}}function createWebHistory(base){base=normalizeBase(base);let historyNavigation=useHistoryStateNavigation(base),historyListeners=useHistoryListeners(base,historyNavigation.state,historyNavigation.location,historyNavigation.replace);function go$1(delta,triggerListeners=!0){triggerListeners||historyListeners.pauseListeners(),history.go(delta)}let routerHistory=assign$1({location:``,base,go:go$1,createHref:createHref.bind(null,base)},historyNavigation,historyListeners);return Object.defineProperty(routerHistory,`location`,{enumerable:!0,get:()=>historyNavigation.location.value}),Object.defineProperty(routerHistory,`state`,{enumerable:!0,get:()=>historyNavigation.state.value}),routerHistory}function createWebHashHistory(base){return base=location.host?base||location.pathname+location.search:``,base.includes(`#`)||(base+=`#`),createWebHistory(base)}function isRouteLocation(route){return typeof route==`string`||route&&typeof route==`object`}function isRouteName(name$2){return typeof name$2==`string`||typeof name$2==`symbol`}const NavigationFailureSymbol=Symbol(``);var NavigationFailureType;(function(NavigationFailureType$1){NavigationFailureType$1[NavigationFailureType$1.aborted=4]=`aborted`,NavigationFailureType$1[NavigationFailureType$1.cancelled=8]=`cancelled`,NavigationFailureType$1[NavigationFailureType$1.duplicated=16]=`duplicated`})(NavigationFailureType||={});function createRouterError(type,params){return assign$1(Error(),{type,[NavigationFailureSymbol]:!0},params)}function isNavigationFailure(error,type){return error instanceof Error&&NavigationFailureSymbol in error&&(type==null||!!(error.type&type))}const BASE_PARAM_PATTERN=`[^/]+?`,BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(segments,extraOptions){let options$1=assign$1({},BASE_PATH_PARSER_OPTIONS,extraOptions),score=[],pattern=options$1.start?`^`:``,keys$3=[];for(let segment of segments){let segmentScores=segment.length?[]:[90];options$1.strict&&!segment.length&&(pattern+=`/`);for(let tokenIndex=0;tokenIndexb$4.length?b$4.length===1&&b$4[0]===80?1:-1:0}function comparePathParserScore(a$2,b$4){let i$1=0,aScore=a$2.score,bScore=b$4.score;for(;i$10&&last[last.length-1]<0}const ROOT_TOKEN={type:0,value:``},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(path){if(!path)return[[]];if(path===`/`)return[[ROOT_TOKEN]];if(!path.startsWith(`/`))throw Error(`Invalid path "${path}"`);function crash(message$1){throw Error(`ERR (${state})/"${buffer$1}": ${message$1}`)}let state=0,previousState=state,tokens=[],segment;function finalizeSegment(){segment&&tokens.push(segment),segment=[]}let i$1=0,char,buffer$1=``,customRe=``;function consumeBuffer(){buffer$1&&(state===0?segment.push({type:0,value:buffer$1}):state===1||state===2||state===3?(segment.length>1&&(char===`*`||char===`+`)&&crash(`A repeatable param (${buffer$1}) must be alone in its segment. eg: '/:ids+.`),segment.push({type:1,value:buffer$1,regexp:customRe,repeatable:char===`*`||char===`+`,optional:char===`*`||char===`?`})):crash(`Invalid state to consume buffer`),buffer$1=``)}function addCharToBuffer(){buffer$1+=char}for(;i$1{removeRoute(originalMatcher)}:noop}function removeRoute(matcherRef){if(isRouteName(matcherRef)){let matcher=matcherMap.get(matcherRef);matcher&&(matcherMap.delete(matcherRef),matchers.splice(matchers.indexOf(matcher),1),matcher.children.forEach(removeRoute),matcher.alias.forEach(removeRoute))}else{let index$1=matchers.indexOf(matcherRef);index$1>-1&&(matchers.splice(index$1,1),matcherRef.record.name&&matcherMap.delete(matcherRef.record.name),matcherRef.children.forEach(removeRoute),matcherRef.alias.forEach(removeRoute))}}function getRoutes(){return matchers}function insertMatcher(matcher){let index$1=findInsertionIndex(matcher,matchers);matchers.splice(index$1,0,matcher),matcher.record.name&&!isAliasRecord(matcher)&&matcherMap.set(matcher.record.name,matcher)}function resolve$1(location$1,currentLocation){let matcher,params={},path,name$2;if(`name`in location$1&&location$1.name){if(matcher=matcherMap.get(location$1.name),!matcher)throw createRouterError(1,{location:location$1});name$2=matcher.record.name,params=assign$1(paramsFromLocation(currentLocation.params,matcher.keys.filter(k$4=>!k$4.optional).concat(matcher.parent?matcher.parent.keys.filter(k$4=>k$4.optional):[]).map(k$4=>k$4.name)),location$1.params&¶msFromLocation(location$1.params,matcher.keys.map(k$4=>k$4.name))),path=matcher.stringify(params)}else if(location$1.path!=null)path=location$1.path,matcher=matchers.find(m$3=>m$3.re.test(path)),matcher&&(params=matcher.parse(path),name$2=matcher.record.name);else{if(matcher=currentLocation.name?matcherMap.get(currentLocation.name):matchers.find(m$3=>m$3.re.test(currentLocation.path)),!matcher)throw createRouterError(1,{location:location$1,currentLocation});name$2=matcher.record.name,params=assign$1({},currentLocation.params,location$1.params),path=matcher.stringify(params)}let matched=[],parentMatcher=matcher;for(;parentMatcher;)matched.unshift(parentMatcher.record),parentMatcher=parentMatcher.parent;return{name:name$2,path,params,matched,meta:mergeMetaFields(matched)}}routes$1.forEach(route=>addRoute(route));function clearRoutes(){matchers.length=0,matcherMap.clear()}return{addRoute,resolve:resolve$1,removeRoute,clearRoutes,getRoutes,getRecordMatcher}}function paramsFromLocation(params,keys$3){let newParams={};for(let key$1 of keys$3)key$1 in params&&(newParams[key$1]=params[key$1]);return newParams}function normalizeRouteRecord(record){let normalized={path:record.path,redirect:record.redirect,name:record.name,meta:record.meta||{},aliasOf:record.aliasOf,beforeEnter:record.beforeEnter,props:normalizeRecordProps(record),children:record.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in record?record.components||null:record.component&&{default:record.component}};return Object.defineProperty(normalized,`mods`,{value:{}}),normalized}function normalizeRecordProps(record){let propsObject={},props=record.props||!1;if(`component`in record)propsObject.default=props;else for(let name$2 in record.components)propsObject[name$2]=typeof props==`object`?props[name$2]:props;return propsObject}function isAliasRecord(record){for(;record;){if(record.record.aliasOf)return!0;record=record.parent}return!1}function mergeMetaFields(matched){return matched.reduce((meta,record)=>assign$1(meta,record.meta),{})}function mergeOptions(defaults,partialOptions){let options$1={};for(let key$1 in defaults)options$1[key$1]=key$1 in partialOptions?partialOptions[key$1]:defaults[key$1];return options$1}function findInsertionIndex(matcher,matchers){let lower=0,upper=matchers.length;for(;lower!==upper;){let mid=lower+upper>>1,sortOrder=comparePathParserScore(matcher,matchers[mid]);sortOrder<0?upper=mid:lower=mid+1}let insertionAncestor=getInsertionAncestor(matcher);return insertionAncestor&&(upper=matchers.lastIndexOf(insertionAncestor,upper-1)),upper}function getInsertionAncestor(matcher){let ancestor=matcher;for(;ancestor=ancestor.parent;)if(isMatchable(ancestor)&&comparePathParserScore(matcher,ancestor)===0)return ancestor}function isMatchable({record}){return!!(record.name||record.components&&Object.keys(record.components).length||record.redirect)}function parseQuery(search$1){let query={};if(search$1===``||search$1===`?`)return query;let hasLeadingIM=search$1[0]===`?`,searchParams=(hasLeadingIM?search$1.slice(1):search$1).split(`&`);for(let i$1=0;i$1v$2&&encodeQueryValue(v$2)):[value$1&&encodeQueryValue(value$1)];values.forEach(value$2=>{value$2!==void 0&&(search$1+=(search$1.length?`&`:``)+key$1,value$2!=null&&(search$1+=`=`+value$2))})}return search$1}function normalizeQuery(query){let normalizedQuery={};for(let key$1 in query){let value$1=query[key$1];value$1!==void 0&&(normalizedQuery[key$1]=isArray$3(value$1)?value$1.map(v$2=>v$2==null?null:``+v$2):value$1==null?value$1:``+value$1)}return normalizedQuery}const matchedRouteKey=Symbol(``),viewDepthKey=Symbol(``),routerKey=Symbol(``),routeLocationKey=Symbol(``),routerViewLocationKey=Symbol(``);function useCallbacks(){let handlers$3=[];function add$1(handler){return handlers$3.push(handler),()=>{let i$1=handlers$3.indexOf(handler);i$1>-1&&handlers$3.splice(i$1,1)}}function reset(){handlers$3=[]}return{add:add$1,list:()=>handlers$3.slice(),reset}}function guardToPromiseFn(guard,to$2,from,record,name$2,runWithContext=fn$6=>fn$6()){let enterCallbackArray=record&&(record.enterCallbacks[name$2]=record.enterCallbacks[name$2]||[]);return()=>new Promise((resolve$1,reject)=>{let next=valid$1=>{valid$1===!1?reject(createRouterError(4,{from,to:to$2})):valid$1 instanceof Error?reject(valid$1):isRouteLocation(valid$1)?reject(createRouterError(2,{from:to$2,to:valid$1})):(enterCallbackArray&&record.enterCallbacks[name$2]===enterCallbackArray&&typeof valid$1==`function`&&enterCallbackArray.push(valid$1),resolve$1())},guardReturn=runWithContext(()=>guard.call(record&&record.instances[name$2],to$2,from,next)),guardCall=Promise.resolve(guardReturn);guard.length<3&&(guardCall=guardCall.then(next)),guardCall.catch(err=>reject(err))})}function extractComponentsGuards(matched,guardType,to$2,from,runWithContext=fn$6=>fn$6()){let guards=[];for(let record of matched)for(let name$2 in record.components){let rawComponent=record.components[name$2];if(guardType!==`beforeRouteEnter`&&!record.instances[name$2])continue;if(isRouteComponent(rawComponent)){let options$1=rawComponent.__vccOpts||rawComponent,guard=options$1[guardType];guard&&guards.push(guardToPromiseFn(guard,to$2,from,record,name$2,runWithContext))}else{let componentPromise=rawComponent();guards.push(()=>componentPromise.then(resolved=>{if(!resolved)throw Error(`Couldn't resolve component "${name$2}" at "${record.path}"`);let resolvedComponent=isESModule(resolved)?resolved.default:resolved;record.mods[name$2]=resolved,record.components[name$2]=resolvedComponent;let options$1=resolvedComponent.__vccOpts||resolvedComponent,guard=options$1[guardType];return guard&&guardToPromiseFn(guard,to$2,from,record,name$2,runWithContext)()}))}}return guards}function useLink(props){let router$1=inject(routerKey),currentRoute=inject(routeLocationKey),hasPrevious=!1,previousTo=null,route=computed(()=>{let to$2=unref(props.to);return router$1.resolve(to$2)}),activeRecordIndex=computed(()=>{let{matched}=route.value,{length}=matched,routeMatched=matched[length-1],currentMatched=currentRoute.matched;if(!routeMatched||!currentMatched.length)return-1;let index$1=currentMatched.findIndex(isSameRouteRecord.bind(null,routeMatched));if(index$1>-1)return index$1;let parentRecordPath=getOriginalPath(matched[length-2]);return length>1&&getOriginalPath(routeMatched)===parentRecordPath&¤tMatched[currentMatched.length-1].path!==parentRecordPath?currentMatched.findIndex(isSameRouteRecord.bind(null,matched[length-2])):index$1}),isActive=computed(()=>activeRecordIndex.value>-1&&includesParams(currentRoute.params,route.value.params)),isExactActive=computed(()=>activeRecordIndex.value>-1&&activeRecordIndex.value===currentRoute.matched.length-1&&isSameRouteLocationParams(currentRoute.params,route.value.params));function navigate(e$3={}){if(guardEvent(e$3)){let p$5=router$1[unref(props.replace)?`replace`:`push`](unref(props.to)).catch(noop);return props.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>p$5),p$5}return Promise.resolve()}return{route,href:computed(()=>route.value.href),isActive,isExactActive,navigate}}function preferSingleVNode(vnodes){return vnodes.length===1?vnodes[0]:vnodes}const RouterLinkImpl=defineComponent({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,setup(props,{slots}){let link$1=reactive(useLink(props)),{options:options$1}=inject(routerKey),elClass=computed(()=>({[getLinkClass(props.activeClass,options$1.linkActiveClass,`router-link-active`)]:link$1.isActive,[getLinkClass(props.exactActiveClass,options$1.linkExactActiveClass,`router-link-exact-active`)]:link$1.isExactActive}));return()=>{let children=slots.default&&preferSingleVNode(slots.default(link$1));return props.custom?children:h(`a`,{"aria-current":link$1.isExactActive?props.ariaCurrentValue:null,href:link$1.href,onClick:link$1.navigate,class:elClass.value},children)}}}),RouterLink=RouterLinkImpl;function guardEvent(e$3){if(!(e$3.metaKey||e$3.altKey||e$3.ctrlKey||e$3.shiftKey)&&!e$3.defaultPrevented&&!(e$3.button!==void 0&&e$3.button!==0)){if(e$3.currentTarget&&e$3.currentTarget.getAttribute){let target$1=e$3.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(target$1))return}return e$3.preventDefault&&e$3.preventDefault(),!0}}function includesParams(outer,inner){for(let key$1 in inner){let innerValue=inner[key$1],outerValue=outer[key$1];if(typeof innerValue==`string`){if(innerValue!==outerValue)return!1}else if(!isArray$3(outerValue)||outerValue.length!==innerValue.length||innerValue.some((value$1,i$1)=>value$1!==outerValue[i$1]))return!1}return!0}function getOriginalPath(record){return record?record.aliasOf?record.aliasOf.path:record.path:``}const getLinkClass=(propClass,globalClass,defaultClass)=>propClass??globalClass??defaultClass,RouterViewImpl=defineComponent({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(props,{attrs,slots}){let injectedRoute=inject(routerViewLocationKey),routeToDisplay=computed(()=>props.route||injectedRoute.value),injectedDepth=inject(viewDepthKey,0),depth=computed(()=>{let initialDepth=unref(injectedDepth),{matched}=routeToDisplay.value,matchedRoute;for(;(matchedRoute=matched[initialDepth])&&!matchedRoute.components;)initialDepth++;return initialDepth}),matchedRouteRef=computed(()=>routeToDisplay.value.matched[depth.value]);provide(viewDepthKey,computed(()=>depth.value+1)),provide(matchedRouteKey,matchedRouteRef),provide(routerViewLocationKey,routeToDisplay);let viewRef=ref();return watch(()=>[viewRef.value,matchedRouteRef.value,props.name],([instance,to$2,name$2],[oldInstance,from,oldName])=>{to$2&&(to$2.instances[name$2]=instance,from&&from!==to$2&&instance&&instance===oldInstance&&(to$2.leaveGuards.size||(to$2.leaveGuards=from.leaveGuards),to$2.updateGuards.size||(to$2.updateGuards=from.updateGuards))),instance&&to$2&&(!from||!isSameRouteRecord(to$2,from)||!oldInstance)&&(to$2.enterCallbacks[name$2]||[]).forEach(callback=>callback(instance))},{flush:`post`}),()=>{let route=routeToDisplay.value,currentName=props.name,matchedRoute=matchedRouteRef.value,ViewComponent=matchedRoute&&matchedRoute.components[currentName];if(!ViewComponent)return normalizeSlot(slots.default,{Component:ViewComponent,route});let routePropsOption=matchedRoute.props[currentName],routeProps=routePropsOption?routePropsOption===!0?route.params:typeof routePropsOption==`function`?routePropsOption(route):routePropsOption:null,onVnodeUnmounted=vnode=>{vnode.component.isUnmounted&&(matchedRoute.instances[currentName]=null)},component=h(ViewComponent,assign$1({},routeProps,attrs,{onVnodeUnmounted,ref:viewRef}));return normalizeSlot(slots.default,{Component:component,route})||component}}});function normalizeSlot(slot,data$12){if(!slot)return null;let slotContent=slot(data$12);return slotContent.length===1?slotContent[0]:slotContent}const RouterView=RouterViewImpl;function createRouter(options$1){let matcher=createRouterMatcher(options$1.routes,options$1),parseQuery$1=options$1.parseQuery||parseQuery,stringifyQuery$1=options$1.stringifyQuery||stringifyQuery,routerHistory=options$1.history,beforeGuards=useCallbacks(),beforeResolveGuards=useCallbacks(),afterGuards=useCallbacks(),currentRoute=shallowRef(START_LOCATION_NORMALIZED),pendingLocation=START_LOCATION_NORMALIZED;isBrowser$1&&options$1.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let normalizeParams=applyToParams.bind(null,paramValue=>``+paramValue),encodeParams=applyToParams.bind(null,encodeParam),decodeParams=applyToParams.bind(null,decode$1);function addRoute(parentOrRoute,route){let parent,record;return isRouteName(parentOrRoute)?(parent=matcher.getRecordMatcher(parentOrRoute),record=route):record=parentOrRoute,matcher.addRoute(record,parent)}function removeRoute(name$2){let recordMatcher=matcher.getRecordMatcher(name$2);recordMatcher&&matcher.removeRoute(recordMatcher)}function getRoutes(){return matcher.getRoutes().map(routeMatcher=>routeMatcher.record)}function hasRoute(name$2){return!!matcher.getRecordMatcher(name$2)}function resolve$1(rawLocation,currentLocation){if(currentLocation=assign$1({},currentLocation||currentRoute.value),typeof rawLocation==`string`){let locationNormalized=parseURL(parseQuery$1,rawLocation,currentLocation.path),matchedRoute$1=matcher.resolve({path:locationNormalized.path},currentLocation),href$1=routerHistory.createHref(locationNormalized.fullPath);return assign$1(locationNormalized,matchedRoute$1,{params:decodeParams(matchedRoute$1.params),hash:decode$1(locationNormalized.hash),redirectedFrom:void 0,href:href$1})}let matcherLocation;if(rawLocation.path!=null)matcherLocation=assign$1({},rawLocation,{path:parseURL(parseQuery$1,rawLocation.path,currentLocation.path).path});else{let targetParams=assign$1({},rawLocation.params);for(let key$1 in targetParams)targetParams[key$1]??delete targetParams[key$1];matcherLocation=assign$1({},rawLocation,{params:encodeParams(targetParams)}),currentLocation.params=encodeParams(currentLocation.params)}let matchedRoute=matcher.resolve(matcherLocation,currentLocation),hash=rawLocation.hash||``;matchedRoute.params=normalizeParams(decodeParams(matchedRoute.params));let fullPath=stringifyURL(stringifyQuery$1,assign$1({},rawLocation,{hash:encodeHash(hash),path:matchedRoute.path})),href=routerHistory.createHref(fullPath);return assign$1({fullPath,hash,query:stringifyQuery$1===stringifyQuery?normalizeQuery(rawLocation.query):rawLocation.query||{}},matchedRoute,{redirectedFrom:void 0,href})}function locationAsObject(to$2){return typeof to$2==`string`?parseURL(parseQuery$1,to$2,currentRoute.value.path):assign$1({},to$2)}function checkCanceledNavigation(to$2,from){if(pendingLocation!==to$2)return createRouterError(8,{from,to:to$2})}function push$1(to$2){return pushWithRedirect(to$2)}function replace(to$2){return push$1(assign$1(locationAsObject(to$2),{replace:!0}))}function handleRedirectRecord(to$2){let lastMatched=to$2.matched[to$2.matched.length-1];if(lastMatched&&lastMatched.redirect){let{redirect}=lastMatched,newTargetLocation=typeof redirect==`function`?redirect(to$2):redirect;return typeof newTargetLocation==`string`&&(newTargetLocation=newTargetLocation.includes(`?`)||newTargetLocation.includes(`#`)?newTargetLocation=locationAsObject(newTargetLocation):{path:newTargetLocation},newTargetLocation.params={}),assign$1({query:to$2.query,hash:to$2.hash,params:newTargetLocation.path==null?to$2.params:{}},newTargetLocation)}}function pushWithRedirect(to$2,redirectedFrom){let targetLocation=pendingLocation=resolve$1(to$2),from=currentRoute.value,data$12=to$2.state,force=to$2.force,replace$1=to$2.replace===!0,shouldRedirect=handleRedirectRecord(targetLocation);if(shouldRedirect)return pushWithRedirect(assign$1(locationAsObject(shouldRedirect),{state:typeof shouldRedirect==`object`?assign$1({},data$12,shouldRedirect.state):data$12,force,replace:replace$1}),redirectedFrom||targetLocation);let toLocation=targetLocation;toLocation.redirectedFrom=redirectedFrom;let failure;return!force&&isSameRouteLocation(stringifyQuery$1,from,targetLocation)&&(failure=createRouterError(16,{to:toLocation,from}),handleScroll(from,from,!0,!1)),(failure?Promise.resolve(failure):navigate(toLocation,from)).catch(error=>isNavigationFailure(error)?isNavigationFailure(error,2)?error:markAsReady(error):triggerError(error,toLocation,from)).then(failure$1=>{if(failure$1){if(isNavigationFailure(failure$1,2))return pushWithRedirect(assign$1({replace:replace$1},locationAsObject(failure$1.to),{state:typeof failure$1.to==`object`?assign$1({},data$12,failure$1.to.state):data$12,force}),redirectedFrom||toLocation)}else failure$1=finalizeNavigation(toLocation,from,!0,replace$1,data$12);return triggerAfterEach(toLocation,from,failure$1),failure$1})}function checkCanceledNavigationAndReject(to$2,from){let error=checkCanceledNavigation(to$2,from);return error?Promise.reject(error):Promise.resolve()}function runWithContext(fn$6){let app=installedApps.values().next().value;return app&&typeof app.runWithContext==`function`?app.runWithContext(fn$6):fn$6()}function navigate(to$2,from){let guards,[leavingRecords,updatingRecords,enteringRecords]=extractChangingRecords(to$2,from);guards=extractComponentsGuards(leavingRecords.reverse(),`beforeRouteLeave`,to$2,from);for(let record of leavingRecords)record.leaveGuards.forEach(guard=>{guards.push(guardToPromiseFn(guard,to$2,from))});let canceledNavigationCheck=checkCanceledNavigationAndReject.bind(null,to$2,from);return guards.push(canceledNavigationCheck),runGuardQueue(guards).then(()=>{guards=[];for(let guard of beforeGuards.list())guards.push(guardToPromiseFn(guard,to$2,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>{guards=extractComponentsGuards(updatingRecords,`beforeRouteUpdate`,to$2,from);for(let record of updatingRecords)record.updateGuards.forEach(guard=>{guards.push(guardToPromiseFn(guard,to$2,from))});return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>{guards=[];for(let record of enteringRecords)if(record.beforeEnter)if(isArray$3(record.beforeEnter))for(let beforeEnter of record.beforeEnter)guards.push(guardToPromiseFn(beforeEnter,to$2,from));else guards.push(guardToPromiseFn(record.beforeEnter,to$2,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>(to$2.matched.forEach(record=>record.enterCallbacks={}),guards=extractComponentsGuards(enteringRecords,`beforeRouteEnter`,to$2,from,runWithContext),guards.push(canceledNavigationCheck),runGuardQueue(guards))).then(()=>{guards=[];for(let guard of beforeResolveGuards.list())guards.push(guardToPromiseFn(guard,to$2,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).catch(err=>isNavigationFailure(err,8)?err:Promise.reject(err))}function triggerAfterEach(to$2,from,failure){afterGuards.list().forEach(guard=>runWithContext(()=>guard(to$2,from,failure)))}function finalizeNavigation(toLocation,from,isPush,replace$1,data$12){let error=checkCanceledNavigation(toLocation,from);if(error)return error;let isFirstNavigation=from===START_LOCATION_NORMALIZED,state=isBrowser$1?history.state:{};isPush&&(replace$1||isFirstNavigation?routerHistory.replace(toLocation.fullPath,assign$1({scroll:isFirstNavigation&&state&&state.scroll},data$12)):routerHistory.push(toLocation.fullPath,data$12)),currentRoute.value=toLocation,handleScroll(toLocation,from,isPush,isFirstNavigation),markAsReady()}let removeHistoryListener;function setupListeners(){removeHistoryListener||=routerHistory.listen((to$2,_from,info)=>{if(!router$1.listening)return;let toLocation=resolve$1(to$2),shouldRedirect=handleRedirectRecord(toLocation);if(shouldRedirect){pushWithRedirect(assign$1(shouldRedirect,{replace:!0,force:!0}),toLocation).catch(noop);return}pendingLocation=toLocation;let from=currentRoute.value;isBrowser$1&&saveScrollPosition(getScrollKey(from.fullPath,info.delta),computeScrollPosition()),navigate(toLocation,from).catch(error=>isNavigationFailure(error,12)?error:isNavigationFailure(error,2)?(pushWithRedirect(assign$1(locationAsObject(error.to),{force:!0}),toLocation).then(failure=>{isNavigationFailure(failure,20)&&!info.delta&&info.type===NavigationType.pop&&routerHistory.go(-1,!1)}).catch(noop),Promise.reject()):(info.delta&&routerHistory.go(-info.delta,!1),triggerError(error,toLocation,from))).then(failure=>{failure||=finalizeNavigation(toLocation,from,!1),failure&&(info.delta&&!isNavigationFailure(failure,8)?routerHistory.go(-info.delta,!1):info.type===NavigationType.pop&&isNavigationFailure(failure,20)&&routerHistory.go(-1,!1)),triggerAfterEach(toLocation,from,failure)}).catch(noop)})}let readyHandlers=useCallbacks(),errorListeners=useCallbacks(),ready;function triggerError(error,to$2,from){markAsReady(error);let list$2=errorListeners.list();return list$2.length?list$2.forEach(handler=>handler(error,to$2,from)):console.error(error),Promise.reject(error)}function isReady(){return ready&¤tRoute.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((resolve$2,reject)=>{readyHandlers.add([resolve$2,reject])})}function markAsReady(err){return ready||(ready=!err,setupListeners(),readyHandlers.list().forEach(([resolve$2,reject])=>err?reject(err):resolve$2()),readyHandlers.reset()),err}function handleScroll(to$2,from,isPush,isFirstNavigation){let{scrollBehavior}=options$1;if(!isBrowser$1||!scrollBehavior)return Promise.resolve();let scrollPosition=!isPush&&getSavedScrollPosition(getScrollKey(to$2.fullPath,0))||(isFirstNavigation||!isPush)&&history.state&&history.state.scroll||null;return nextTick().then(()=>scrollBehavior(to$2,from,scrollPosition)).then(position$2=>position$2&&scrollToPosition(position$2)).catch(err=>triggerError(err,to$2,from))}let go$1=delta=>routerHistory.go(delta),started,installedApps=new Set,router$1={currentRoute,listening:!0,addRoute,removeRoute,clearRoutes:matcher.clearRoutes,hasRoute,getRoutes,resolve:resolve$1,options:options$1,push:push$1,replace,go:go$1,back:()=>go$1(-1),forward:()=>go$1(1),beforeEach:beforeGuards.add,beforeResolve:beforeResolveGuards.add,afterEach:afterGuards.add,onError:errorListeners.add,isReady,install(app){let router$2=this;app.component(`RouterLink`,RouterLink),app.component(`RouterView`,RouterView),app.config.globalProperties.$router=router$2,Object.defineProperty(app.config.globalProperties,`$route`,{enumerable:!0,get:()=>unref(currentRoute)}),isBrowser$1&&!started&¤tRoute.value===START_LOCATION_NORMALIZED&&(started=!0,push$1(routerHistory.location).catch(err=>{}));let reactiveRoute={};for(let key$1 in START_LOCATION_NORMALIZED)Object.defineProperty(reactiveRoute,key$1,{get:()=>currentRoute.value[key$1],enumerable:!0});app.provide(routerKey,router$2),app.provide(routeLocationKey,shallowReactive(reactiveRoute)),app.provide(routerViewLocationKey,currentRoute);let unmountApp=app.unmount;installedApps.add(app),app.unmount=function(){installedApps.delete(app),installedApps.size<1&&(pendingLocation=START_LOCATION_NORMALIZED,removeHistoryListener&&removeHistoryListener(),removeHistoryListener=null,currentRoute.value=START_LOCATION_NORMALIZED,started=!1,ready=!1),unmountApp()}}};function runGuardQueue(guards){return guards.reduce((promise,guard)=>promise.then(()=>runWithContext(guard)),Promise.resolve())}return router$1}function extractChangingRecords(to$2,from){let leavingRecords=[],updatingRecords=[],enteringRecords=[],len=Math.max(from.matched.length,to$2.matched.length);for(let i$1=0;i$1isSameRouteRecord(record,recordFrom))?updatingRecords.push(recordFrom):leavingRecords.push(recordFrom));let recordTo=to$2.matched[i$1];recordTo&&(from.matched.find(record=>isSameRouteRecord(record,recordTo))||enteringRecords.push(recordTo))}return[leavingRecords,updatingRecords,enteringRecords]}function useRouter(){return inject(routerKey)}function useRoute(_name){return inject(routeLocationKey)}const routes=[{path:`/`,name:`IndexScenePage`,component:()=>__vitePreload(()=>import(`./pages-BAul_h40.js`),__vite__mapDeps([5,6,1,2,7,8,9,4,10,11,12])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}},{path:`/:all(.*)`,name:`/[...all]`,component:()=>__vitePreload(()=>import(`./_...all_-CBSDUE9n.js`),[])},{path:`/audio`,name:`/audio`,component:()=>__vitePreload(()=>import(`./audio-YpvKX-Ak.js`),[])},{path:`/devtools`,children:[{path:`audio-record`,name:`/devtools/audio-record`,component:()=>__vitePreload(()=>import(`./audio-record-DsJ9pwd8.js`),[])},{path:`background-remove`,name:`/devtools/background-remove`,component:()=>__vitePreload(()=>import(`./background-remove-BBB0u_Hq.js`),__vite__mapDeps([13,14,15]))},{path:`chat`,name:`/devtools/chat`,component:()=>__vitePreload(()=>import(`./chat-DAlZ_Wc3.js`),[])},{path:`gesture-circle`,name:`/devtools/gesture-circle`,component:()=>__vitePreload(()=>import(`./gesture-circle-BhrbgQjT.js`),__vite__mapDeps([16,6])),meta:{layout:`plain`}},{path:`image`,name:`/devtools/image`,component:()=>__vitePreload(()=>import(`./image-Drq3BS_B.js`),__vite__mapDeps([17,18]))},{path:`polaroid`,name:`/devtools/polaroid`,component:()=>__vitePreload(()=>import(`./polaroid-Bs31_N5q.js`),__vite__mapDeps([19,10,11,12]))},{path:`vibrant`,name:`/devtools/vibrant`,component:()=>__vitePreload(()=>import(`./vibrant-DJTnlypI.js`),__vite__mapDeps([20,21,15]))}]},{path:`/queue`,name:`/queue`,component:()=>__vitePreload(()=>import(`./queue-xOIEiTzT.js`),[])},{path:`/settings`,children:[{path:``,name:`/settings/`,component:()=>__vitePreload(()=>import(`./settings-FSKP6s04.js`),__vite__mapDeps([22,6,23])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`airi-card`,children:[{path:``,name:`/settings/airi-card/`,component:()=>__vitePreload(()=>import(`./airi-card-mY7qwyzh.js`),__vite__mapDeps([24,6,25,26,27,28,29,30,15])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`components`,children:[{path:`CardCreate`,name:`/settings/airi-card/components/CardCreate`,component:()=>__vitePreload(()=>import(`./CardCreate-CEdooQmC.js`),__vite__mapDeps([31,25]))},{path:`CardCreationDialog`,name:`/settings/airi-card/components/CardCreationDialog`,component:()=>__vitePreload(()=>import(`./CardCreationDialog-Dfq3gfrr.js`),__vite__mapDeps([32,26,27]))},{path:`CardDetailDialog`,name:`/settings/airi-card/components/CardDetailDialog`,component:()=>__vitePreload(()=>import(`./CardDetailDialog-CidehlMa.js`),__vite__mapDeps([33,28,29]))},{path:`CardListItem`,name:`/settings/airi-card/components/CardListItem`,component:()=>__vitePreload(()=>import(`./CardListItem-Bj3hdPXC.js`),__vite__mapDeps([34,30]))},{path:`DeleteCardDialog`,name:`/settings/airi-card/components/DeleteCardDialog`,component:()=>__vitePreload(()=>import(`./DeleteCardDialog-CTir2p4h.js`),__vite__mapDeps([35,29]))}]}]},{path:`appearance`,children:[{path:``,name:`/settings/appearance/`,component:()=>__vitePreload(()=>import(`./appearance-BjGIfT8s.js`),__vite__mapDeps([36,6])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`color-scheme`,name:`/settings/appearance/color-scheme`,component:()=>__vitePreload(()=>import(`./color-scheme-jmrpTVHV.js`),__vite__mapDeps([37,6,38])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`developer`,name:`/settings/appearance/developer`,component:()=>__vitePreload(()=>import(`./developer-CCqYxIcY.js`),__vite__mapDeps([39,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`general`,name:`/settings/appearance/general`,component:()=>__vitePreload(()=>import(`./general-xGijmv9Q.js`),__vite__mapDeps([40,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`memory`,children:[{path:``,name:`/settings/memory/`,component:()=>__vitePreload(()=>import(`./memory-BnX_YReY.js`),__vite__mapDeps([41,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`models`,children:[{path:``,name:`/settings/models/`,component:()=>__vitePreload(()=>import(`./models-BdKy7BTu.js`),__vite__mapDeps([42,6,23,43,10,11,12,21])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]},{path:`modules`,children:[{path:``,name:`/settings/modules/`,component:()=>__vitePreload(()=>import(`./modules-B091BuDn.js`),__vite__mapDeps([44,6,23,43])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`consciousness`,name:`/settings/modules/consciousness`,component:()=>__vitePreload(()=>import(`./consciousness-DOb7L0Yh.js`),__vite__mapDeps([45,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`hearing`,name:`/settings/modules/hearing`,component:()=>__vitePreload(()=>import(`./hearing-BRaBstPb.js`),__vite__mapDeps([46,6,14])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-long-term`,name:`/settings/modules/memory-long-term`,component:()=>__vitePreload(()=>import(`./memory-long-term-B5wEjqtq.js`),__vite__mapDeps([47,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-short-term`,name:`/settings/modules/memory-short-term`,component:()=>__vitePreload(()=>import(`./memory-short-term-CxN60U-L.js`),__vite__mapDeps([48,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`speech`,name:`/settings/modules/speech`,component:()=>__vitePreload(()=>import(`./speech-Dm3KkONO.js`),__vite__mapDeps([49,6,8,50])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`providers`,children:[{path:``,name:`/settings/providers/`,component:()=>__vitePreload(()=>import(`./providers-CVExW2Kb.js`),__vite__mapDeps([51,6,23,43])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`alibaba-cloud-model-studio`,name:`/settings/providers/alibaba-cloud-model-studio`,component:()=>__vitePreload(()=>import(`./alibaba-cloud-model-studio-NFHP1r1x.js`),__vite__mapDeps([52,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`anthropic`,name:`/settings/providers/anthropic`,component:()=>__vitePreload(()=>import(`./anthropic-Cu-QiXIM.js`),__vite__mapDeps([53,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`cloudflare-workers-ai`,name:`/settings/providers/cloudflare-workers-ai`,component:()=>__vitePreload(()=>import(`./cloudflare-workers-ai-DvT5X7zi.js`),__vite__mapDeps([54,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`deepseek`,name:`/settings/providers/deepseek`,component:()=>__vitePreload(()=>import(`./deepseek-BrvbO56H.js`),__vite__mapDeps([55,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`elevenlabs`,name:`/settings/providers/elevenlabs`,component:()=>__vitePreload(()=>import(`./elevenlabs-B1MqPQr8.js`),__vite__mapDeps([56,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`featherless-ai`,name:`/settings/providers/featherless-ai`,component:()=>__vitePreload(()=>import(`./featherless-ai-DTyndR9W.js`),__vite__mapDeps([57,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`fireworks-ai`,name:`/settings/providers/fireworks-ai`,component:()=>__vitePreload(()=>import(`./fireworks-ai-DvpnBa6B.js`),__vite__mapDeps([58,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`google-generative-ai`,name:`/settings/providers/google-generative-ai`,component:()=>__vitePreload(()=>import(`./google-generative-ai-A9AGUM2m.js`),__vite__mapDeps([59,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`microsoft-speech`,name:`/settings/providers/microsoft-speech`,component:()=>__vitePreload(()=>import(`./microsoft-speech-CRIYmLXG.js`),__vite__mapDeps([60,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`mistral-ai`,name:`/settings/providers/mistral-ai`,component:()=>__vitePreload(()=>import(`./mistral-ai-Cp_MAH4V.js`),__vite__mapDeps([61,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`moonshot-ai`,name:`/settings/providers/moonshot-ai`,component:()=>__vitePreload(()=>import(`./moonshot-ai-bUFSVmPQ.js`),__vite__mapDeps([62,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`novita-ai`,name:`/settings/providers/novita-ai`,component:()=>__vitePreload(()=>import(`./novita-ai-DCJo9fcm.js`),__vite__mapDeps([63,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`ollama`,name:`/settings/providers/ollama`,component:()=>__vitePreload(()=>import(`./ollama-xKcCpTx0.js`),__vite__mapDeps([64,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai`,name:`/settings/providers/openai`,component:()=>__vitePreload(()=>import(`./openai-CQAVgiMk.js`),__vite__mapDeps([65,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-speech`,name:`/settings/providers/openai-audio-speech`,component:()=>__vitePreload(()=>import(`./openai-audio-speech-DW1QrfRq.js`),__vite__mapDeps([66,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-transcription`,name:`/settings/providers/openai-audio-transcription`,component:()=>__vitePreload(()=>import(`./openai-audio-transcription-CavrcyBE.js`),__vite__mapDeps([67,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openrouter-ai`,name:`/settings/providers/openrouter-ai`,component:()=>__vitePreload(()=>import(`./openrouter-ai-CnYjoQlp.js`),__vite__mapDeps([68,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2`,name:`/settings/providers/player2`,component:()=>__vitePreload(()=>import(`./player2-Vrjn9guG.js`),__vite__mapDeps([69,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2-speech`,name:`/settings/providers/player2-speech`,component:()=>__vitePreload(()=>import(`./player2-speech-rSa7i7tK.js`),__vite__mapDeps([70,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`together-ai`,name:`/settings/providers/together-ai`,component:()=>__vitePreload(()=>import(`./together-ai-CFPLADAy.js`),__vite__mapDeps([71,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`volcengine`,name:`/settings/providers/volcengine`,component:()=>__vitePreload(()=>import(`./volcengine-CNYLf4lq.js`),__vite__mapDeps([72,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`xai`,name:`/settings/providers/xai`,component:()=>__vitePreload(()=>import(`./xai-tmPQgTKt.js`),__vite__mapDeps([73,6])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`scene`,children:[{path:``,name:`/settings/scene/`,component:()=>__vitePreload(()=>import(`./scene-DsHsIafe.js`),__vite__mapDeps([74,6,23,43])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]}]},{path:`/stage`,children:[{path:``,name:`StageScenePage`,component:()=>__vitePreload(()=>import(`./stage-B5qiz8AC.js`),__vite__mapDeps([75,6,1,2,7,8,9,10,11,12])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}}]},{path:`/test`,children:[{path:`filter-message`,name:`/test/filter-message`,component:()=>__vitePreload(()=>import(`./filter-message-DCHgw6K5.js`),__vite__mapDeps([76,8,50]))},{path:`queues`,children:[{path:`delays`,name:`/test/queues/delays`,component:()=>__vitePreload(()=>import(`./delays-hZ_G3T9g.js`),__vite__mapDeps([77,8,50]))},{path:`emotions`,name:`/test/queues/emotions`,component:()=>__vitePreload(()=>import(`./emotions-pdqefEJH.js`),__vite__mapDeps([78,8,50]))},{path:`messages`,name:`/test/queues/messages`,component:()=>__vitePreload(()=>import(`./messages-DxJEqeNl.js`),__vite__mapDeps([79,8,50]))}]}]}];var AudioSpectrum_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`AudioSpectrum`,props:{stream:{},bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(__props){let props=__props,frequencies=ref(Array.from({length:props.bars}).fill(0));onMounted(()=>{handleAnalyze()}),watch(()=>props.stream,()=>{handleAnalyze()});function handleAnalyze(){if(!props.stream)return;let audioContext=new(window.AudioContext||window.webkitAudioContext),source=audioContext.createMediaStreamSource(props.stream),analyser=audioContext.createAnalyser();analyser.fftSize=2048,source.connect(analyser);let bufferLength=analyser.frequencyBinCount,dataArray=new Uint8Array(bufferLength),sampleRate=audioContext.sampleRate,frequencyResolution=sampleRate/analyser.fftSize,minBin=Math.floor(props.minFreq/frequencyResolution),maxBin=Math.floor(props.maxFreq/frequencyResolution),usableBins=maxBin-minBin,binsPerBar=Math.floor(usableBins/props.bars),analyze=()=>{try{requestAnimationFrame(analyze),analyser.getByteFrequencyData(dataArray);let bars=Array.from({length:props.bars}).fill(0);for(let i$1=0;i$1renderSlot(_ctx.$slots,`default`,{frequencies:frequencies.value})}}),AudioSpectrum_default=AudioSpectrum_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$42={"h-full":``,flex:``,"items-center":``,"gap-1":``},AMPLIFICATION=5;var AudioSpectrumVisualizer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`AudioSpectrumVisualizer`,props:{frequencies:{},barsClass:{}},setup(__props){let props=__props;function getReductionFactor(index$1,totalBars){let minFactor=.1,maxFactor=1;return minFactor+(maxFactor-minFactor)*(index$1/totalBars)}function getBarHeight(frequency,index$1){let reductionFactor=getReductionFactor(index$1,props.frequencies.length);return Math.min(100,Math.max(10,frequency*100*AMPLIFICATION*reductionFactor))}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$42,[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.frequencies,(frequency,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,"h-full":``,flex:``,"flex-1":``,"items-end":``},[createBaseVNode(`div`,{transition:`all 100 ease-in-out`,"mx-auto":``,"my-0":``,"w-full":``,"rounded-full":``,class:normalizeClass(_ctx.barsClass),style:normalizeStyle({height:`${getBarHeight(frequency,index$1)}%`})},null,6)]))),128))]))}}),AudioSpectrumVisualizer_default=AudioSpectrumVisualizer_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$41={key:0,class:`mb-2 flex items-center justify-between`},_hoisted_2$27={class:`text-sm font-medium`},_hoisted_3$21={class:`text-sm text-neutral-500`};var LevelMeter_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`LevelMeter`,props:{level:{},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:{}},setup(__props){let props=__props,levelBars=computed(()=>{let normalizedLevel=Math.max(0,Math.min(100,(props.level-props.min)/(props.max-props.min)*100)),activeBars=Math.floor(normalizedLevel/100*props.numBars);return Array.from({length:props.numBars},(_$2,i$1)=>({active:i$1a$2.value-b$4.value);for(let threshold of thresholds)if(barLevel<=threshold.value)return threshold.color;return thresholds[thresholds.length-1]?.color||`bg-green-500`}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,null,[_ctx.showHeader?(openBlock(),createElementBlock(`div`,_hoisted_1$41,[createBaseVNode(`span`,_hoisted_2$27,toDisplayString(_ctx.label),1),createBaseVNode(`span`,_hoisted_3$21,toDisplayString(_ctx.formatValue?_ctx.formatValue(_ctx.level):`${Math.round(_ctx.level)}${_ctx.unit}`),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 dark:bg-neutral-700`,style:normalizeStyle({height:`${_ctx.height}px`})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(levelBars.value,(bar,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,class:normalizeClass([`flex-1 rounded-sm transition-all`,[bar.active?getBarColor(index$1,bar.level):`bg-neutral-200 dark:bg-neutral-600`,`duration-${_ctx.animationSpeed}`]]),style:normalizeStyle({height:bar.active?`100%`:`20%`})},null,6))),128))],4)]))}}),LevelMeter_default=LevelMeter_vue_vue_type_script_setup_true_lang_default,Volumed_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Volumed`,props:{perspective:{},transform:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`volumed`,style:normalizeStyle({perspective:`${_ctx.perspective}px`,transform:_ctx.transform})},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],4))}}),__plugin_vue_export_helper_default=(sfc,props)=>{let target$1=sfc.__vccOpts||sfc;for(let[key$1,val]of props)target$1[key$1]=val;return target$1},Volumed_default=__plugin_vue_export_helper_default(Volumed_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-d8ce56aa`]]),CursorMomentum_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`CursorMomentum`,props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(__props,{expose:__expose}){let props=__props,momentum=ref(1),currentValue=ref(0),lastTimestamp=0,FRICTION=toRef(()=>props.friction),BASE_SPEED=toRef(()=>props.baseSpeed),MOMENTUM_FACTOR=toRef(()=>props.momentumFactor);function updateMomentum(timestamp$2){lastTimestamp||=timestamp$2;let deltaTime=timestamp$2-lastTimestamp;lastTimestamp=timestamp$2,momentum.value=BASE_SPEED.value+(momentum.value-BASE_SPEED.value)*FRICTION.value,currentValue.value+=momentum.value*deltaTime,requestAnimationFrame(updateMomentum)}function handleMouseMove(event){let speed=Math.sqrt(event.movementX**2+event.movementY**2);momentum.value+=speed*MOMENTUM_FACTOR.value}return onMounted(()=>{window.addEventListener(`mousemove`,handleMouseMove),requestAnimationFrame(updateMomentum)}),onUnmounted(()=>{window.removeEventListener(`mousemove`,handleMouseMove)}),__expose({momentum,currentValue}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`,{momentum:momentum.value,currentValue:currentValue.value})}}),CursorMomentum_default=CursorMomentum_vue_vue_type_script_setup_true_lang_default,TestDummyMarkerFlat_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TestDummyMarkerFlat`,props:{size:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`test-dummy-flat`,style:normalizeStyle({width:`${_ctx.size}px`,height:`${_ctx.size}px`})},_cache$1[0]||=[createBaseVNode(`div`,{class:`marker`},null,-1)],4))}}),TestDummyMarkerFlat_default=__plugin_vue_export_helper_default(TestDummyMarkerFlat_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-28f8c660`]]),TestDummyMarker_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TestDummyMarker`,setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(CursorMomentum_default,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:withCtx(({currentValue})=>[createVNode(Volumed_default,{perspective:800,transform:`rotateX(45deg) translateY(3px)`},{default:withCtx(()=>[createVNode(TestDummyMarkerFlat_default,{size:24,style:normalizeStyle({transform:`rotate(${currentValue}deg)`})},null,8,[`style`])]),_:2},1024)]),_:1}))}}),TestDummyMarker_default=TestDummyMarker_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$40={key:0,class:`mb-2 flex items-center justify-between`},_hoisted_2$26={class:`text-sm font-medium`},_hoisted_3$20={class:`text-sm text-neutral-500`},_hoisted_4$18={key:1,class:`mt-1 flex gap-3 text-xs text-neutral-500`},_hoisted_5$15={class:`flex items-center gap-1`},_hoisted_6$13={class:`flex items-center gap-1`},_hoisted_7$10={class:`flex items-center gap-1`};var ThresholdMeter_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ThresholdMeter`,props:{value:{},threshold:{},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:{}},setup(__props){let props=__props,thresholdBars=computed(()=>{let normalizedValue=Math.max(0,Math.min(1,(props.value-props.min)/(props.max-props.min))),normalizedThreshold=Math.max(0,Math.min(1,(props.threshold-props.min)/(props.max-props.min))),activeBars=Math.floor(normalizedValue*props.numBars),thresholdBar=Math.floor(normalizedThreshold*props.numBars);return Array.from({length:props.numBars},(_$2,i$1)=>({active:i$1=thresholdBar,isBelowThreshold:i$1(openBlock(),createElementBlock(`div`,null,[_ctx.showHeader?(openBlock(),createElementBlock(`div`,_hoisted_1$40,[createBaseVNode(`span`,_hoisted_2$26,toDisplayString(_ctx.label),1),createBaseVNode(`span`,_hoisted_3$20,toDisplayString(_ctx.formatValue?_ctx.formatValue(_ctx.value):`${(_ctx.value*100).toFixed(_ctx.precision)}${_ctx.unit}`),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 p-1 dark:bg-neutral-700`,style:normalizeStyle({height:`${_ctx.height}px`})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(thresholdBars.value,(bar,index$1)=>(openBlock(),createElementBlock(`div`,{key:`threshold-${index$1}`,class:normalizeClass([`flex-1 rounded-sm transition-all`,[bar.isThreshold?_ctx.thresholdBarClass:bar.isAboveThreshold?_ctx.aboveThresholdClass:bar.isBelowThreshold?_ctx.belowThresholdClass:_ctx.inactiveBarClass,`duration-${_ctx.animationSpeed}`]]),style:normalizeStyle({height:bar.active||bar.isThreshold?`100%`:`20%`})},null,6))),128))],4),_ctx.showLegend?(openBlock(),createElementBlock(`div`,_hoisted_4$18,[createBaseVNode(`span`,_hoisted_5$15,[createBaseVNode(`div`,{class:normalizeClass(`inline-block h-0.5lh w-1lh rounded-full ${_ctx.belowThresholdClass}`)},null,2),createTextVNode(` `+toDisplayString(_ctx.belowLabel),1)]),createBaseVNode(`span`,_hoisted_6$13,[createBaseVNode(`div`,{class:normalizeClass(`inline-block h-0.5lh w-1lh rounded-full border border-neutral-400 ${_ctx.thresholdBarClass}`)},null,2),createTextVNode(` `+toDisplayString(_ctx.thresholdLabel),1)]),createBaseVNode(`span`,_hoisted_7$10,[createBaseVNode(`div`,{class:normalizeClass(`inline-block h-0.5lh w-1lh rounded-full ${_ctx.aboveThresholdClass}`)},null,2),createTextVNode(` `+toDisplayString(_ctx.aboveLabel),1)])])):createCommentVNode(``,!0)]))}}),ThresholdMeter_default=ThresholdMeter_vue_vue_type_script_setup_true_lang_default;const parseNumber=(color$2,len)=>{if(typeof color$2==`number`){if(len===3)return{mode:`rgb`,r:(color$2>>8&15|color$2>>4&240)/255,g:(color$2>>4&15|color$2&240)/255,b:(color$2&15|color$2<<4&240)/255};if(len===4)return{mode:`rgb`,r:(color$2>>12&15|color$2>>8&240)/255,g:(color$2>>8&15|color$2>>4&240)/255,b:(color$2>>4&15|color$2&240)/255,alpha:(color$2&15|color$2<<4&240)/255};if(len===6)return{mode:`rgb`,r:(color$2>>16&255)/255,g:(color$2>>8&255)/255,b:(color$2&255)/255};if(len===8)return{mode:`rgb`,r:(color$2>>24&255)/255,g:(color$2>>16&255)/255,b:(color$2>>8&255)/255,alpha:(color$2&255)/255}}};var parseNumber_default=parseNumber;const named={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 named_default=named;const parseNamed=color$2=>parseNumber_default(named_default[color$2.toLowerCase()],6);var parseNamed_default=parseNamed;const hex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,parseHex=color$2=>{let match;return(match=color$2.match(hex))?parseNumber_default(parseInt(match[1],16),match[1].length):void 0};var parseHex_default=parseHex;const num$1=`([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)`,num_none=`(?:${num$1}|none)`,per=`${num$1}%`,per_none=`(?:${num$1}%|none)`,num_per=`(?:${num$1}%|${num$1})`,num_per_none=`(?:${num$1}%|${num$1}|none)`,hue=`(?:${num$1}(deg|grad|rad|turn)|${num$1})`,hue_none=`(?:${num$1}(deg|grad|rad|turn)|${num$1}|none)`,c$2=`\\s*,\\s*`,rx_num_per_none=RegExp(`^`+num_per_none+`$`),rgb_num_old=RegExp(`^rgba?\\(\\s*${num$1}${c$2}${num$1}${c$2}${num$1}\\s*(?:,\\s*${num_per}\\s*)?\\)$`),rgb_per_old=RegExp(`^rgba?\\(\\s*${per}${c$2}${per}${c$2}${per}\\s*(?:,\\s*${num_per}\\s*)?\\)$`),parseRgbLegacy=color$2=>{let res={mode:`rgb`},match;if(match=color$2.match(rgb_num_old))match[1]!==void 0&&(res.r=match[1]/255),match[2]!==void 0&&(res.g=match[2]/255),match[3]!==void 0&&(res.b=match[3]/255);else if(match=color$2.match(rgb_per_old))match[1]!==void 0&&(res.r=match[1]/100),match[2]!==void 0&&(res.g=match[2]/100),match[3]!==void 0&&(res.b=match[3]/100);else return;return match[4]===void 0?match[5]!==void 0&&(res.alpha=Math.max(0,Math.min(1,+match[5]))):res.alpha=Math.max(0,Math.min(1,match[4]/100)),res};var parseRgbLegacy_default=parseRgbLegacy;const prepare=(color$2,mode)=>color$2===void 0?void 0:typeof color$2==`object`?color$2.mode===void 0?mode?{...color$2,mode}:void 0:color$2:parse_default(color$2);var _prepare_default=prepare;const converter=(target_mode=`rgb`)=>color$2=>(color$2=_prepare_default(color$2,target_mode))===void 0?void 0:color$2.mode===target_mode?color$2:converters[color$2.mode][target_mode]?converters[color$2.mode][target_mode](color$2):target_mode===`rgb`?converters[color$2.mode].rgb(color$2):converters.rgb[target_mode](converters[color$2.mode].rgb(color$2));var converter_default=converter;const converters={},modes={},parsers=[],colorProfiles={},identity=v$2=>v$2,useMode=definition$29=>(converters[definition$29.mode]={...converters[definition$29.mode],...definition$29.toMode},Object.keys(definition$29.fromMode||{}).forEach(k$4=>{converters[k$4]||(converters[k$4]={}),converters[k$4][definition$29.mode]=definition$29.fromMode[k$4]}),definition$29.ranges||={},definition$29.difference||={},definition$29.channels.forEach(channel=>{if(definition$29.ranges[channel]===void 0&&(definition$29.ranges[channel]=[0,1]),!definition$29.interpolate[channel])throw Error(`Missing interpolator for: ${channel}`);typeof definition$29.interpolate[channel]==`function`&&(definition$29.interpolate[channel]={use:definition$29.interpolate[channel]}),definition$29.interpolate[channel].fixup||(definition$29.interpolate[channel].fixup=identity)}),modes[definition$29.mode]=definition$29,(definition$29.parse||[]).forEach(parser=>{useParser(parser,definition$29.mode)}),converter_default(definition$29.mode)),getMode=mode=>modes[mode],useParser=(parser,mode)=>{if(typeof parser==`string`){if(!mode)throw Error(`'mode' required when 'parser' is a string`);colorProfiles[parser]=mode}else typeof parser==`function`&&parsers.indexOf(parser)<0&&parsers.push(parser)},IdentStartCodePoint=/[^\x00-\x7F]|[a-zA-Z_]/,IdentCodePoint=/[^\x00-\x7F]|[-\w]/,Tok={Function:`function`,Ident:`ident`,Number:`number`,Percentage:`percentage`,ParenClose:`)`,None:`none`,Hue:`hue`,Alpha:`alpha`};let _i$1=0;function is_num(chars){let ch$1=chars[_i$1],ch1=chars[_i$1+1];return ch$1===`-`||ch$1===`+`?/\d/.test(ch1)||ch1===`.`&&/\d/.test(chars[_i$1+2]):ch$1===`.`?/\d/.test(ch1):/\d/.test(ch$1)}function is_ident(chars){if(_i$1>=chars.length)return!1;let ch$1=chars[_i$1];if(IdentStartCodePoint.test(ch$1))return!0;if(ch$1===`-`){if(chars.length-_i$1<2)return!1;let ch1=chars[_i$1+1];return!!(ch1===`-`||IdentStartCodePoint.test(ch1))}return!1}const huenits={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function num(chars){let value$1=``;if((chars[_i$1]===`-`||chars[_i$1]===`+`)&&(value$1+=chars[_i$1++]),value$1+=digits(chars),chars[_i$1]===`.`&&/\d/.test(chars[_i$1+1])&&(value$1+=chars[_i$1++]+digits(chars)),(chars[_i$1]===`e`||chars[_i$1]===`E`)&&((chars[_i$1+1]===`-`||chars[_i$1+1]===`+`)&&/\d/.test(chars[_i$1+2])?value$1+=chars[_i$1++]+chars[_i$1++]+digits(chars):/\d/.test(chars[_i$1+1])&&(value$1+=chars[_i$1++]+digits(chars))),is_ident(chars)){let id$1=ident(chars);return id$1===`deg`||id$1===`rad`||id$1===`turn`||id$1===`grad`?{type:Tok.Hue,value:value$1*huenits[id$1]}:void 0}return chars[_i$1]===`%`?(_i$1++,{type:Tok.Percentage,value:+value$1}):{type:Tok.Number,value:+value$1}}function digits(chars){let v$2=``;for(;/\d/.test(chars[_i$1]);)v$2+=chars[_i$1++];return v$2}function ident(chars){let v$2=``;for(;_i$14)){if(coords$1.length===4){if(coords$1[3].type!==Tok.Alpha)return;coords$1[3]=coords$1[3].value}return coords$1.length===3&&coords$1.push({type:Tok.None,value:void 0}),coords$1.every(c$4=>c$4.type!==Tok.Alpha)?coords$1:void 0}}function parseModernSyntax(tokens,includeHue){tokens._i=0;let token=tokens[tokens._i++];if(!token||token.type!==Tok.Function)return;let coords$1=consumeCoords(tokens,includeHue);if(coords$1)return coords$1.unshift(token.value),coords$1}const parse$2=color$2=>{if(typeof color$2!=`string`)return;let tokens=tokenize(color$2),parsed=tokens?parseModernSyntax(tokens,!0):void 0,result,i$1=0,len=parsers.length;for(;i$1c$4===`transparent`?{mode:`rgb`,r:0,g:0,b:0,alpha:0}:void 0;var parseTransparent_default=parseTransparent;const lerp$1=(a$2,b$4,t)=>a$2+t*(b$4-a$2),get_classes=arr=>{let classes=[];for(let i$1=0;i$1arr=>{let classes=get_classes(arr);return t=>{let cls=t*classes.length,idx=t>=1?classes.length-1:Math.max(Math.floor(cls),0),pair=classes[idx];return pair===void 0?void 0:interpolator(pair[0],pair[1],cls-idx)}},interpolatorLinear=interpolatorPiecewise(lerp$1),fixupAlpha=arr=>{let some_defined=!1,res=arr.map(v$2=>v$2===void 0?1:(some_defined=!0,v$2));return some_defined?res:arr},definition$28={mode:`rgb`,channels:[`r`,`g`,`b`,`alpha`],parse:[parseRgb_default,parseHex_default,parseRgbLegacy_default,parseNamed_default,parseTransparent_default,`srgb`],serialize:`srgb`,interpolate:{r:interpolatorLinear,g:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}};var definition_default$23=definition$28;const linearize$2=(v$2=0)=>Math.abs(v$2)**(563/256)*Math.sign(v$2),convertA98ToXyz65=a98$1=>{let r$2=linearize$2(a98$1.r),g$2=linearize$2(a98$1.g),b$4=linearize$2(a98$1.b),res={mode:`xyz65`,x:.5766690429101305*r$2+.1855582379065463*g$2+.1882286462349947*b$4,y:.297344975250536*r$2+.6273635662554661*g$2+.0752914584939979*b$4,z:.0270313613864123*r$2+.0706888525358272*g$2+.9913375368376386*b$4};return a98$1.alpha!==void 0&&(res.alpha=a98$1.alpha),res};var convertA98ToXyz65_default=convertA98ToXyz65;const gamma$2=v$2=>Math.abs(v$2)**(256/563)*Math.sign(v$2),convertXyz65ToA98=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let res={mode:`a98`,r:gamma$2(x$3*2.0415879038107465-y$3*.5650069742788597-.3447313507783297*z$3),g:gamma$2(x$3*-.9692436362808798+y$3*1.8759675015077206+.0415550574071756*z$3),b:gamma$2(x$3*.0134442806320312-y$3*.1183623922310184+1.0151749943912058*z$3)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToA98_default=convertXyz65ToA98;const fn$4=(c$4=0)=>{let abs$1=Math.abs(c$4);return abs$1<=.04045?c$4/12.92:(Math.sign(c$4)||1)*((abs$1+.055)/1.055)**2.4},convertRgbToLrgb=({r:r$2,g:g$2,b:b$4,alpha:alpha$1})=>{let res={mode:`lrgb`,r:fn$4(r$2),g:fn$4(g$2),b:fn$4(b$4)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToLrgb_default=convertRgbToLrgb;const convertRgbToXyz65=rgb$2=>{let{r:r$2,g:g$2,b:b$4,alpha:alpha$1}=convertRgbToLrgb_default(rgb$2),res={mode:`xyz65`,x:.4123907992659593*r$2+.357584339383878*g$2+.1804807884018343*b$4,y:.2126390058715102*r$2+.715168678767756*g$2+.0721923153607337*b$4,z:.0193308187155918*r$2+.119194779794626*g$2+.9505321522496607*b$4};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToXyz65_default=convertRgbToXyz65;const fn$3=(c$4=0)=>{let abs$1=Math.abs(c$4);return abs$1>.0031308?(Math.sign(c$4)||1)*(1.055*abs$1**(1/2.4)-.055):c$4*12.92},convertLrgbToRgb=({r:r$2,g:g$2,b:b$4,alpha:alpha$1},mode=`rgb`)=>{let res={mode,r:fn$3(r$2),g:fn$3(g$2),b:fn$3(b$4)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLrgbToRgb_default=convertLrgbToRgb;const convertXyz65ToRgb=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let res=convertLrgbToRgb_default({r:x$3*3.2409699419045226-y$3*1.537383177570094-.4986107602930034*z$3,g:x$3*-.9692436362808796+y$3*1.8759675015077204+.0415550574071756*z$3,b:x$3*.0556300796969936-y$3*.2039769588889765+1.0569715142428784*z$3});return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToRgb_default=convertXyz65ToRgb;const definition$27={...definition_default$23,mode:`a98`,parse:[`a98-rgb`],serialize:`a98-rgb`,fromMode:{rgb:color$2=>convertXyz65ToA98_default(convertRgbToXyz65_default(color$2)),xyz65:convertXyz65ToA98_default},toMode:{rgb:color$2=>convertXyz65ToRgb_default(convertA98ToXyz65_default(color$2)),xyz65:convertA98ToXyz65_default}};var definition_default=definition$27;const normalizeHue=hue$2=>(hue$2%=360)<0?hue$2+360:hue$2;var normalizeHue_default=normalizeHue;const hue$1=(hues,fn$6)=>hues.map((hue$2,idx,arr)=>{if(hue$2===void 0)return hue$2;let normalized=normalizeHue_default(hue$2);return idx===0||hues[idx-1]===void 0?normalized:fn$6(normalized-normalizeHue_default(arr[idx-1]))}).reduce((acc,curr)=>!acc.length||curr===void 0||acc[acc.length-1]===void 0?(acc.push(curr),acc):(acc.push(curr+acc[acc.length-1]),acc),[]),fixupHueShorter=arr=>hue$1(arr,d$2=>Math.abs(d$2)<=180?d$2:d$2-360*Math.sign(d$2)),M=[-.14861,1.78277,-.29227,-.90649,1.97294,0],degToRad=Math.PI/180,radToDeg=180/Math.PI;let DE=M[3]*M[4],BE=M[1]*M[4],BCAD=M[1]*M[2]-M[0]*M[3];const convertRgbToCubehelix=({r:r$2,g:g$2,b:b$4,alpha:alpha$1})=>{r$2===void 0&&(r$2=0),g$2===void 0&&(g$2=0),b$4===void 0&&(b$4=0);let l$1=(BCAD*b$4+r$2*DE-g$2*BE)/(BCAD+DE-BE),x$3=b$4-l$1,y$3=(M[4]*(g$2-l$1)-M[2]*x$3)/M[3],res={mode:`cubehelix`,l:l$1,s:l$1===0||l$1===1?void 0:Math.sqrt(x$3*x$3+y$3*y$3)/(M[4]*l$1*(1-l$1))};return res.s&&(res.h=Math.atan2(y$3,x$3)*radToDeg-120),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToCubehelix_default=convertRgbToCubehelix;const convertCubehelixToRgb=({h:h$3,s:s$1,l:l$1,alpha:alpha$1})=>{let res={mode:`rgb`};h$3=(h$3===void 0?0:h$3+120)*degToRad,l$1===void 0&&(l$1=0);let amp=s$1===void 0?0:s$1*l$1*(1-l$1),cosh=Math.cos(h$3),sinh=Math.sin(h$3);return res.r=l$1+amp*(M[0]*cosh+M[1]*sinh),res.g=l$1+amp*(M[2]*cosh+M[3]*sinh),res.b=l$1+amp*(M[4]*cosh+M[5]*sinh),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertCubehelixToRgb_default=convertCubehelixToRgb;const differenceHueSaturation=(std,smp)=>{if(std.h===void 0||smp.h===void 0||!std.s||!smp.s)return 0;let std_h=normalizeHue_default(std.h),smp_h=normalizeHue_default(smp.h),dH=Math.sin((smp_h-std_h+360)/2*Math.PI/180);return 2*Math.sqrt(std.s*smp.s)*dH},differenceHueNaive=(std,smp)=>{if(std.h===void 0||smp.h===void 0)return 0;let std_h=normalizeHue_default(std.h),smp_h=normalizeHue_default(smp.h);return Math.abs(smp_h-std_h)>180?std_h-(smp_h-360*Math.sign(smp_h-std_h)):smp_h-std_h},differenceHueChroma=(std,smp)=>{if(std.h===void 0||smp.h===void 0||!std.c||!smp.c)return 0;let std_h=normalizeHue_default(std.h),smp_h=normalizeHue_default(smp.h),dH=Math.sin((smp_h-std_h+360)/2*Math.PI/180);return 2*Math.sqrt(std.c*smp.c)*dH},averageAngle=val=>{let sum=val.reduce((sum$1,val$1)=>{if(val$1!==void 0){let rad=val$1*Math.PI/180;sum$1.sin+=Math.sin(rad),sum$1.cos+=Math.cos(rad)}return sum$1},{sin:0,cos:0}),angle=Math.atan2(sum.sin,sum.cos)*180/Math.PI;return angle<0?360+angle:angle},definition$26={mode:`cubehelix`,channels:[`h`,`s`,`l`,`alpha`],parse:[`--cubehelix`],serialize:`--cubehelix`,ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:convertRgbToCubehelix_default},toMode:{rgb:convertCubehelixToRgb_default},interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},s:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueSaturation},average:{h:averageAngle}};var definition_default$1=definition$26;const convertLabToLch=({l:l$1,a:a$2,b:b$4,alpha:alpha$1},mode=`lch`)=>{a$2===void 0&&(a$2=0),b$4===void 0&&(b$4=0);let c$4=Math.sqrt(a$2*a$2+b$4*b$4),res={mode,l:l$1,c:c$4};return c$4&&(res.h=normalizeHue_default(Math.atan2(b$4,a$2)*180/Math.PI)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLabToLch_default=convertLabToLch;const convertLchToLab=({l:l$1,c:c$4,h:h$3,alpha:alpha$1},mode=`lab`)=>{h$3===void 0&&(h$3=0);let res={mode,l:l$1,a:c$4?c$4*Math.cos(h$3/180*Math.PI):0,b:c$4?c$4*Math.sin(h$3/180*Math.PI):0};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLchToLab_default=convertLchToLab;const k$2=29**3/3**3,e$1=6**3/29**3,D50={X:.3457/.3585,Y:1,Z:.2958/.3585},D65={X:.3127/.329,Y:1,Z:.3583/.329},k$3=29**3/3**3,e$2=6**3/29**3;let fn$2=v$2=>v$2**3>e$1?v$2**3:(116*v$2-16)/k$2;const convertLab65ToXyz65=({l:l$1,a:a$2,b:b$4,alpha:alpha$1})=>{l$1===void 0&&(l$1=0),a$2===void 0&&(a$2=0),b$4===void 0&&(b$4=0);let fy$1=(l$1+16)/116,fx=a$2/500+fy$1,fz=fy$1-b$4/200,res={mode:`xyz65`,x:fn$2(fx)*D65.X,y:fn$2(fy$1)*D65.Y,z:fn$2(fz)*D65.Z};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLab65ToXyz65_default=convertLab65ToXyz65;const convertLab65ToRgb=lab$1=>convertXyz65ToRgb_default(convertLab65ToXyz65_default(lab$1));var convertLab65ToRgb_default=convertLab65ToRgb;const f$2=value$1=>value$1>e$1?Math.cbrt(value$1):(k$2*value$1+16)/116,convertXyz65ToLab65=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let f0=f$2(x$3/D65.X),f1=f$2(y$3/D65.Y),f2=f$2(z$3/D65.Z),res={mode:`lab65`,l:116*f1-16,a:500*(f0-f1),b:200*(f1-f2)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToLab65_default=convertXyz65ToLab65;const convertRgbToLab65=rgb$2=>{let res=convertXyz65ToLab65_default(convertRgbToXyz65_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToLab65_default=convertRgbToLab65;const kE=1,kCH=1,θ=26/180*Math.PI,cosθ=Math.cos(θ),sinθ=Math.sin(θ),factor=100/Math.log(139/100),convertDlchToLab65=({l:l$1,c:c$4,h:h$3,alpha:alpha$1})=>{l$1===void 0&&(l$1=0),c$4===void 0&&(c$4=0),h$3===void 0&&(h$3=0);let res={mode:`lab65`,l:(Math.exp(l$1*kE/factor)-1)/.0039},G$2=(Math.exp(.0435*c$4*kCH*kE)-1)/.075,e$3=G$2*Math.cos(h$3/180*Math.PI-θ),f$3=G$2*Math.sin(h$3/180*Math.PI-θ);return res.a=e$3*cosθ-f$3/.83*sinθ,res.b=e$3*sinθ+f$3/.83*cosθ,alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertDlchToLab65_default=convertDlchToLab65;const convertLab65ToDlch=({l:l$1,a:a$2,b:b$4,alpha:alpha$1})=>{l$1===void 0&&(l$1=0),a$2===void 0&&(a$2=0),b$4===void 0&&(b$4=0);let e$3=a$2*cosθ+b$4*sinθ,f$3=.83*(b$4*cosθ-a$2*sinθ),G$2=Math.sqrt(e$3*e$3+f$3*f$3),res={mode:`dlch`,l:factor/kE*Math.log(1+.0039*l$1),c:Math.log(1+.075*G$2)/(.0435*kCH*kE)};return res.c&&(res.h=normalizeHue_default((Math.atan2(f$3,e$3)+θ)/Math.PI*180)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLab65ToDlch_default=convertLab65ToDlch;const convertDlabToLab65=c$4=>convertDlchToLab65_default(convertLabToLch_default(c$4,`dlch`)),convertLab65ToDlab=c$4=>convertLchToLab_default(convertLab65ToDlch_default(c$4),`dlab`),definition$25={mode:`dlab`,parse:[`--din99o-lab`],serialize:`--din99o-lab`,toMode:{lab65:convertDlabToLab65,rgb:c$4=>convertLab65ToRgb_default(convertDlabToLab65(c$4))},fromMode:{lab65:convertLab65ToDlab,rgb:c$4=>convertLab65ToDlab(convertRgbToLab65_default(c$4))},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:interpolatorLinear,a:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$2=definition$25;const definition$24={mode:`dlch`,parse:[`--din99o-lch`],serialize:`--din99o-lch`,toMode:{lab65:convertDlchToLab65_default,dlab:c$4=>convertLchToLab_default(c$4,`dlab`),rgb:c$4=>convertLab65ToRgb_default(convertDlchToLab65_default(c$4))},fromMode:{lab65:convertLab65ToDlch_default,dlab:c$4=>convertLabToLch_default(c$4,`dlch`),rgb:c$4=>convertLab65ToDlch_default(convertRgbToLab65_default(c$4))},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:interpolatorLinear,c:interpolatorLinear,h:{use:interpolatorLinear,fixup:fixupHueShorter},alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$3=definition$24;function convertHsiToRgb({h:h$3,s:s$1,i:i$1,alpha:alpha$1}){h$3=normalizeHue_default(h$3===void 0?0:h$3),s$1===void 0&&(s$1=0),i$1===void 0&&(i$1=0);let f$3=Math.abs(h$3/60%2-1),res;switch(Math.floor(h$3/60)){case 0:res={r:i$1*(1+s$1*(3/(2-f$3)-1)),g:i$1*(1+s$1*(3*(1-f$3)/(2-f$3)-1)),b:i$1*(1-s$1)};break;case 1:res={r:i$1*(1+s$1*(3*(1-f$3)/(2-f$3)-1)),g:i$1*(1+s$1*(3/(2-f$3)-1)),b:i$1*(1-s$1)};break;case 2:res={r:i$1*(1-s$1),g:i$1*(1+s$1*(3/(2-f$3)-1)),b:i$1*(1+s$1*(3*(1-f$3)/(2-f$3)-1))};break;case 3:res={r:i$1*(1-s$1),g:i$1*(1+s$1*(3*(1-f$3)/(2-f$3)-1)),b:i$1*(1+s$1*(3/(2-f$3)-1))};break;case 4:res={r:i$1*(1+s$1*(3*(1-f$3)/(2-f$3)-1)),g:i$1*(1-s$1),b:i$1*(1+s$1*(3/(2-f$3)-1))};break;case 5:res={r:i$1*(1+s$1*(3/(2-f$3)-1)),g:i$1*(1-s$1),b:i$1*(1+s$1*(3*(1-f$3)/(2-f$3)-1))};break;default:res={r:i$1*(1-s$1),g:i$1*(1-s$1),b:i$1*(1-s$1)}}return res.mode=`rgb`,alpha$1!==void 0&&(res.alpha=alpha$1),res}function convertRgbToHsi({r:r$2,g:g$2,b:b$4,alpha:alpha$1}){r$2===void 0&&(r$2=0),g$2===void 0&&(g$2=0),b$4===void 0&&(b$4=0);let M$1=Math.max(r$2,g$2,b$4),m$3=Math.min(r$2,g$2,b$4),res={mode:`hsi`,s:r$2+g$2+b$4===0?0:1-3*m$3/(r$2+g$2+b$4),i:(r$2+g$2+b$4)/3};return M$1-m$3!==0&&(res.h=(M$1===r$2?(g$2-b$4)/(M$1-m$3)+(g$2{switch(unit){case`deg`:return+val;case`rad`:return val/Math.PI*180;case`grad`:return val/10*9;case`turn`:return val*360}};var hue_default=hueToDeg;const hsl_old=RegExp(`^hsla?\\(\\s*${hue}${c$2}${per}${c$2}${per}\\s*(?:,\\s*${num_per}\\s*)?\\)$`),parseHslLegacy=color$2=>{let match=color$2.match(hsl_old);if(!match)return;let res={mode:`hsl`};return match[3]===void 0?match[1]!==void 0&&match[2]!==void 0&&(res.h=hue_default(match[1],match[2])):res.h=+match[3],match[4]!==void 0&&(res.s=Math.min(Math.max(0,match[4]/100),1)),match[5]!==void 0&&(res.l=Math.min(Math.max(0,match[5]/100),1)),match[6]===void 0?match[7]!==void 0&&(res.alpha=Math.max(0,Math.min(1,+match[7]))):res.alpha=Math.max(0,Math.min(1,match[6]/100)),res};var parseHslLegacy_default=parseHslLegacy;function parseHsl(color$2,parsed){if(!parsed||parsed[0]!==`hsl`&&parsed[0]!==`hsla`)return;let res={mode:`hsl`},[,h$3,s$1,l$1,alpha$1]=parsed;if(h$3.type!==Tok.None){if(h$3.type===Tok.Percentage)return;res.h=h$3.value}if(s$1.type!==Tok.None){if(s$1.type===Tok.Hue)return;res.s=s$1.value/100}if(l$1.type!==Tok.None){if(l$1.type===Tok.Hue)return;res.l=l$1.value/100}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseHsl_default=parseHsl;const definition$22={mode:`hsl`,toMode:{rgb:convertHslToRgb},fromMode:{rgb:convertRgbToHsl},channels:[`h`,`s`,`l`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[parseHsl_default,parseHslLegacy_default],serialize:c$4=>`hsl(${c$4.h===void 0?`none`:c$4.h} ${c$4.s===void 0?`none`:c$4.s*100+`%`} ${c$4.l===void 0?`none`:c$4.l*100+`%`}${c$4.alpha<1?` / ${c$4.alpha}`:``})`,interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},s:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueSaturation},average:{h:averageAngle}};var definition_default$5=definition$22;function convertHsvToRgb({h:h$3,s:s$1,v:v$2,alpha:alpha$1}){h$3=normalizeHue_default(h$3===void 0?0:h$3),s$1===void 0&&(s$1=0),v$2===void 0&&(v$2=0);let f$3=Math.abs(h$3/60%2-1),res;switch(Math.floor(h$3/60)){case 0:res={r:v$2,g:v$2*(1-s$1*f$3),b:v$2*(1-s$1)};break;case 1:res={r:v$2*(1-s$1*f$3),g:v$2,b:v$2*(1-s$1)};break;case 2:res={r:v$2*(1-s$1),g:v$2,b:v$2*(1-s$1*f$3)};break;case 3:res={r:v$2*(1-s$1),g:v$2*(1-s$1*f$3),b:v$2};break;case 4:res={r:v$2*(1-s$1*f$3),g:v$2*(1-s$1),b:v$2};break;case 5:res={r:v$2,g:v$2*(1-s$1),b:v$2*(1-s$1*f$3)};break;default:res={r:v$2*(1-s$1),g:v$2*(1-s$1),b:v$2*(1-s$1)}}return res.mode=`rgb`,alpha$1!==void 0&&(res.alpha=alpha$1),res}function convertRgbToHsv({r:r$2,g:g$2,b:b$4,alpha:alpha$1}){r$2===void 0&&(r$2=0),g$2===void 0&&(g$2=0),b$4===void 0&&(b$4=0);let M$1=Math.max(r$2,g$2,b$4),m$3=Math.min(r$2,g$2,b$4),res={mode:`hsv`,s:M$1===0?0:1-m$3/M$1,v:M$1};return M$1-m$3!==0&&(res.h=(M$1===r$2?(g$2-b$4)/(M$1-m$3)+(g$21){let s$1=w$2+b$4;w$2/=s$1,b$4/=s$1}return convertHsvToRgb({h:h$3,s:b$4===1?1:1-w$2/(1-b$4),v:1-b$4,alpha:alpha$1})}function convertRgbToHwb(rgba$1){let hsv$1=convertRgbToHsv(rgba$1);if(hsv$1===void 0)return;let s$1=hsv$1.s===void 0?0:hsv$1.s,v$2=hsv$1.v===void 0?0:hsv$1.v,res={mode:`hwb`,w:(1-s$1)*v$2,b:1-v$2};return hsv$1.h!==void 0&&(res.h=hsv$1.h),hsv$1.alpha!==void 0&&(res.alpha=hsv$1.alpha),res}function ParseHwb(color$2,parsed){if(!parsed||parsed[0]!==`hwb`)return;let res={mode:`hwb`},[,h$3,w$2,b$4,alpha$1]=parsed;if(h$3.type!==Tok.None){if(h$3.type===Tok.Percentage)return;res.h=h$3.value}if(w$2.type!==Tok.None){if(w$2.type===Tok.Hue)return;res.w=w$2.value/100}if(b$4.type!==Tok.None){if(b$4.type===Tok.Hue)return;res.b=b$4.value/100}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseHwb_default=ParseHwb;const definition$20={mode:`hwb`,toMode:{rgb:convertHwbToRgb},fromMode:{rgb:convertRgbToHwb},channels:[`h`,`w`,`b`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[parseHwb_default],serialize:c$4=>`hwb(${c$4.h===void 0?`none`:c$4.h} ${c$4.w===void 0?`none`:c$4.w*100+`%`} ${c$4.b===void 0?`none`:c$4.b*100+`%`}${c$4.alpha<1?` / ${c$4.alpha}`:``})`,interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},w:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueNaive},average:{h:averageAngle}};var definition_default$7=definition$20;const YW=203,M1=.1593017578125,M2=78.84375,C1=.8359375,C2=18.8515625,C3=18.6875;function transferPqDecode(v$2){if(v$2<0)return 0;let c$4=v$2**(1/M2);return 1e4*(Math.max(0,c$4-C1)/(C2-C3*c$4))**(1/M1)}function transferPqEncode(v$2){if(v$2<0)return 0;let c$4=(v$2/1e4)**M1;return((C1+C2*c$4)/(1+C3*c$4))**+M2}const toRel=c$4=>Math.max(c$4/YW,0),convertItpToXyz65=({i:i$1,t,p:p$5,alpha:alpha$1})=>{i$1===void 0&&(i$1=0),t===void 0&&(t=0),p$5===void 0&&(p$5=0);let l$1=transferPqDecode(i$1+.008609037037932761*t+.11102962500302593*p$5),m$3=transferPqDecode(i$1-.00860903703793275*t-.11102962500302599*p$5),s$1=transferPqDecode(i$1+.5600313357106791*t-.32062717498731885*p$5),res={mode:`xyz65`,x:toRel(2.070152218389422*l$1-1.3263473389671556*m$3+.2066510476294051*s$1),y:toRel(.3647385209748074*l$1+.680566024947227*m$3-.0453045459220346*s$1),z:toRel(-.049747207535812*l$1-.0492609666966138*m$3+1.1880659249923042*s$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertItpToXyz65_default=convertItpToXyz65;const toAbs=(c$4=0)=>Math.max(c$4*YW,0),convertXyz65ToItp=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{let absX=toAbs(x$3),absY=toAbs(y$3),absZ=toAbs(z$3),l$1=transferPqEncode(.3592832590121217*absX+.6976051147779502*absY-.0358915932320289*absZ),m$3=transferPqEncode(-.1920808463704995*absX+1.1004767970374323*absY+.0753748658519118*absZ),s$1=transferPqEncode(.0070797844607477*absX+.0748396662186366*absY+.8433265453898765*absZ),i$1=.5*l$1+.5*m$3,t=1.61376953125*l$1-3.323486328125*m$3+1.709716796875*s$1,p$5=4.378173828125*l$1-4.24560546875*m$3-.132568359375*s$1,res={mode:`itp`,i:i$1,t,p:p$5};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToItp_default=convertXyz65ToItp;const definition$19={mode:`itp`,channels:[`i`,`t`,`p`,`alpha`],parse:[`--ictcp`],serialize:`--ictcp`,toMode:{xyz65:convertItpToXyz65_default,rgb:color$2=>convertXyz65ToRgb_default(convertItpToXyz65_default(color$2))},fromMode:{xyz65:convertXyz65ToItp_default,rgb:color$2=>convertXyz65ToItp_default(convertRgbToXyz65_default(color$2))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:interpolatorLinear,t:interpolatorLinear,p:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$8=definition$19;const p$3=134.03437499999998,d0$1=16295499532821565e-27,jabPqEncode=v$2=>{if(v$2<0)return 0;let vn$4=(v$2/1e4)**M1;return((C1+C2*vn$4)/(1+C3*vn$4))**+p$3},abs=(v$2=0)=>Math.max(v$2*203,0),convertXyz65ToJab=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{x$3=abs(x$3),y$3=abs(y$3),z$3=abs(z$3);let xp$1=1.15*x$3-.15*z$3,yp$1=.66*y$3+.34*x$3,l$1=jabPqEncode(.41478972*xp$1+.579999*yp$1+.014648*z$3),m$3=jabPqEncode(-.20151*xp$1+1.120649*yp$1+.0531008*z$3),s$1=jabPqEncode(-.0166008*xp$1+.2648*yp$1+.6684799*z$3),i$1=(l$1+m$3)/2,res={mode:`jab`,j:.44*i$1/(1-.56*i$1)-d0$1,a:3.524*l$1-4.066708*m$3+.542708*s$1,b:.199076*l$1+1.096799*m$3-1.295875*s$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToJab_default=convertXyz65ToJab;const p$2=134.03437499999998,d0=16295499532821565e-27,jabPqDecode=v$2=>{if(v$2<0)return 0;let vp$1=v$2**(1/p$2);return 1e4*((C1-vp$1)/(C3*vp$1-C2))**(1/M1)},rel=v$2=>v$2/203,convertJabToXyz65=({j:j$1,a:a$2,b:b$4,alpha:alpha$1})=>{j$1===void 0&&(j$1=0),a$2===void 0&&(a$2=0),b$4===void 0&&(b$4=0);let i$1=(j$1+d0)/(.44+.56*(j$1+d0)),l$1=jabPqDecode(i$1+.13860504*a$2+.058047316*b$4),m$3=jabPqDecode(i$1-.13860504*a$2-.058047316*b$4),s$1=jabPqDecode(i$1-.096019242*a$2-.8118919*b$4),res={mode:`xyz65`,x:rel(1.661373024652174*l$1-.914523081304348*m$3+.23136208173913045*s$1),y:rel(-.3250758611844533*l$1+1.571847026732543*m$3-.21825383453227928*s$1),z:rel(-.090982811*l$1-.31272829*m$3+1.5227666*s$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertJabToXyz65_default=convertJabToXyz65;const convertRgbToJab=rgb$2=>{let res=convertXyz65ToJab_default(convertRgbToXyz65_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToJab_default=convertRgbToJab;const convertJabToRgb=color$2=>convertXyz65ToRgb_default(convertJabToXyz65_default(color$2));var convertJabToRgb_default=convertJabToRgb;const definition$18={mode:`jab`,channels:[`j`,`a`,`b`,`alpha`],parse:[`--jzazbz`],serialize:`--jzazbz`,fromMode:{rgb:convertRgbToJab_default,xyz65:convertXyz65ToJab_default},toMode:{rgb:convertJabToRgb_default,xyz65:convertJabToXyz65_default},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:interpolatorLinear,a:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$9=definition$18;const convertJabToJch=({j:j$1,a:a$2,b:b$4,alpha:alpha$1})=>{a$2===void 0&&(a$2=0),b$4===void 0&&(b$4=0);let c$4=Math.sqrt(a$2*a$2+b$4*b$4),res={mode:`jch`,j:j$1,c:c$4};return c$4&&(res.h=normalizeHue_default(Math.atan2(b$4,a$2)*180/Math.PI)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertJabToJch_default=convertJabToJch;const convertJchToJab=({j:j$1,c:c$4,h:h$3,alpha:alpha$1})=>{h$3===void 0&&(h$3=0);let res={mode:`jab`,j:j$1,a:c$4?c$4*Math.cos(h$3/180*Math.PI):0,b:c$4?c$4*Math.sin(h$3/180*Math.PI):0};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertJchToJab_default=convertJchToJab;const definition$17={mode:`jch`,parse:[`--jzczhz`],serialize:`--jzczhz`,toMode:{jab:convertJchToJab_default,rgb:c$4=>convertJabToRgb_default(convertJchToJab_default(c$4))},fromMode:{rgb:c$4=>convertJabToJch_default(convertRgbToJab_default(c$4)),jab:convertJabToJch_default},channels:[`j`,`c`,`h`,`alpha`],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},c:interpolatorLinear,j:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$10=definition$17;const k$1=29**3/3**3,e=6**3/29**3;let fn$1=v$2=>v$2**3>e?v$2**3:(116*v$2-16)/k$1;const convertLabToXyz50=({l:l$1,a:a$2,b:b$4,alpha:alpha$1})=>{l$1===void 0&&(l$1=0),a$2===void 0&&(a$2=0),b$4===void 0&&(b$4=0);let fy$1=(l$1+16)/116,fx=a$2/500+fy$1,fz=fy$1-b$4/200,res={mode:`xyz50`,x:fn$1(fx)*D50.X,y:fn$1(fy$1)*D50.Y,z:fn$1(fz)*D50.Z};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLabToXyz50_default=convertLabToXyz50;const convertXyz50ToRgb=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let res=convertLrgbToRgb_default({r:x$3*3.1341359569958707-y$3*1.6173863321612538-.4906619460083532*z$3,g:x$3*-.978795502912089+y$3*1.916254567259524+.03344273116131949*z$3,b:x$3*.07195537988411677-y$3*.2289768264158322+1.405386058324125*z$3});return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToRgb_default=convertXyz50ToRgb;const convertLabToRgb=lab$1=>convertXyz50ToRgb_default(convertLabToXyz50_default(lab$1));var convertLabToRgb_default=convertLabToRgb;const convertRgbToXyz50=rgb$2=>{let{r:r$2,g:g$2,b:b$4,alpha:alpha$1}=convertRgbToLrgb_default(rgb$2),res={mode:`xyz50`,x:.436065742824811*r$2+.3851514688337912*g$2+.14307845442264197*b$4,y:.22249319175623702*r$2+.7168870538238823*g$2+.06061979053616537*b$4,z:.013923904500943465*r$2+.09708128566574634*g$2+.7140993584005155*b$4};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToXyz50_default=convertRgbToXyz50;const f$1=value$1=>value$1>e?Math.cbrt(value$1):(k$1*value$1+16)/116,convertXyz50ToLab=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let f0=f$1(x$3/D50.X),f1=f$1(y$3/D50.Y),f2=f$1(z$3/D50.Z),res={mode:`lab`,l:116*f1-16,a:500*(f0-f1),b:200*(f1-f2)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToLab_default=convertXyz50ToLab;const convertRgbToLab=rgb$2=>{let res=convertXyz50ToLab_default(convertRgbToXyz50_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToLab_default=convertRgbToLab;function parseLab(color$2,parsed){if(!parsed||parsed[0]!==`lab`)return;let res={mode:`lab`},[,l$1,a$2,b$4,alpha$1]=parsed;if(!(l$1.type===Tok.Hue||a$2.type===Tok.Hue||b$4.type===Tok.Hue))return l$1.type!==Tok.None&&(res.l=Math.min(Math.max(0,l$1.value),100)),a$2.type!==Tok.None&&(res.a=a$2.type===Tok.Number?a$2.value:a$2.value*125/100),b$4.type!==Tok.None&&(res.b=b$4.type===Tok.Number?b$4.value:b$4.value*125/100),alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseLab_default=parseLab;const definition$16={mode:`lab`,toMode:{xyz50:convertLabToXyz50_default,rgb:convertLabToRgb_default},fromMode:{xyz50:convertXyz50ToLab_default,rgb:convertRgbToLab_default},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[parseLab_default],serialize:c$4=>`lab(${c$4.l===void 0?`none`:c$4.l} ${c$4.a===void 0?`none`:c$4.a} ${c$4.b===void 0?`none`:c$4.b}${c$4.alpha<1?` / ${c$4.alpha}`:``})`,interpolate:{l:interpolatorLinear,a:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$11=definition$16;const definition$15={...definition_default$11,mode:`lab65`,parse:[`--lab-d65`],serialize:`--lab-d65`,toMode:{xyz65:convertLab65ToXyz65_default,rgb:convertLab65ToRgb_default},fromMode:{xyz65:convertXyz65ToLab65_default,rgb:convertRgbToLab65_default},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}};var definition_default$12=definition$15;function parseLch(color$2,parsed){if(!parsed||parsed[0]!==`lch`)return;let res={mode:`lch`},[,l$1,c$4,h$3,alpha$1]=parsed;if(l$1.type!==Tok.None){if(l$1.type===Tok.Hue)return;res.l=Math.min(Math.max(0,l$1.value),100)}if(c$4.type!==Tok.None&&(res.c=Math.max(0,c$4.type===Tok.Number?c$4.value:c$4.value*150/100)),h$3.type!==Tok.None){if(h$3.type===Tok.Percentage)return;res.h=h$3.value}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseLch_default=parseLch;const definition$14={mode:`lch`,toMode:{lab:convertLchToLab_default,rgb:c$4=>convertLabToRgb_default(convertLchToLab_default(c$4))},fromMode:{rgb:c$4=>convertLabToLch_default(convertRgbToLab_default(c$4)),lab:convertLabToLch_default},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[parseLch_default],serialize:c$4=>`lch(${c$4.l===void 0?`none`:c$4.l} ${c$4.c===void 0?`none`:c$4.c} ${c$4.h===void 0?`none`:c$4.h}${c$4.alpha<1?` / ${c$4.alpha}`:``})`,interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},c:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$13=definition$14;const definition$13={...definition_default$13,mode:`lch65`,parse:[`--lch-d65`],serialize:`--lch-d65`,toMode:{lab65:c$4=>convertLchToLab_default(c$4,`lab65`),rgb:c$4=>convertLab65ToRgb_default(convertLchToLab_default(c$4,`lab65`))},fromMode:{rgb:c$4=>convertLabToLch_default(convertRgbToLab65_default(c$4),`lch65`),lab65:c$4=>convertLabToLch_default(c$4,`lch65`)},ranges:{l:[0,100],c:[0,150],h:[0,360]}};var definition_default$14=definition$13;const convertLuvToLchuv=({l:l$1,u:u$1,v:v$2,alpha:alpha$1})=>{u$1===void 0&&(u$1=0),v$2===void 0&&(v$2=0);let c$4=Math.sqrt(u$1*u$1+v$2*v$2),res={mode:`lchuv`,l:l$1,c:c$4};return c$4&&(res.h=normalizeHue_default(Math.atan2(v$2,u$1)*180/Math.PI)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLuvToLchuv_default=convertLuvToLchuv;const convertLchuvToLuv=({l:l$1,c:c$4,h:h$3,alpha:alpha$1})=>{h$3===void 0&&(h$3=0);let res={mode:`luv`,l:l$1,u:c$4?c$4*Math.cos(h$3/180*Math.PI):0,v:c$4?c$4*Math.sin(h$3/180*Math.PI):0};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLchuvToLuv_default=convertLchuvToLuv;const u_fn$1=(x$3,y$3,z$3)=>4*x$3/(x$3+15*y$3+3*z$3),v_fn$1=(x$3,y$3,z$3)=>9*y$3/(x$3+15*y$3+3*z$3),un$2=u_fn$1(D50.X,D50.Y,D50.Z),vn$2=v_fn$1(D50.X,D50.Y,D50.Z),l_fn=value$1=>value$1<=e?k$1*value$1:116*Math.cbrt(value$1)-16,convertXyz50ToLuv=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let l$1=l_fn(y$3/D50.Y),u$1=u_fn$1(x$3,y$3,z$3),v$2=v_fn$1(x$3,y$3,z$3);!isFinite(u$1)||!isFinite(v$2)?l$1=u$1=v$2=0:(u$1=13*l$1*(u$1-un$2),v$2=13*l$1*(v$2-vn$2));let res={mode:`luv`,l:l$1,u:u$1,v:v$2};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToLuv_default=convertXyz50ToLuv;const u_fn=(x$3,y$3,z$3)=>4*x$3/(x$3+15*y$3+3*z$3),v_fn=(x$3,y$3,z$3)=>9*y$3/(x$3+15*y$3+3*z$3),un$1=u_fn(D50.X,D50.Y,D50.Z),vn$1=v_fn(D50.X,D50.Y,D50.Z),convertLuvToXyz50=({l:l$1,u:u$1,v:v$2,alpha:alpha$1})=>{if(l$1===void 0&&(l$1=0),l$1===0)return{mode:`xyz50`,x:0,y:0,z:0};u$1===void 0&&(u$1=0),v$2===void 0&&(v$2=0);let up$1=u$1/(13*l$1)+un$1,vp$1=v$2/(13*l$1)+vn$1,y$3=D50.Y*(l$1<=8?l$1/k$1:((l$1+16)/116)**3),x$3=y$3*(9*up$1)/(4*vp$1),z$3=y$3*(12-3*up$1-20*vp$1)/(4*vp$1),res={mode:`xyz50`,x:x$3,y:y$3,z:z$3};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLuvToXyz50_default=convertLuvToXyz50;const convertRgbToLchuv=rgb$2=>convertLuvToLchuv_default(convertXyz50ToLuv_default(convertRgbToXyz50_default(rgb$2))),convertLchuvToRgb=lchuv$1=>convertXyz50ToRgb_default(convertLuvToXyz50_default(convertLchuvToLuv_default(lchuv$1))),definition$12={mode:`lchuv`,toMode:{luv:convertLchuvToLuv_default,rgb:convertLchuvToRgb},fromMode:{rgb:convertRgbToLchuv,luv:convertLuvToLchuv_default},channels:[`l`,`c`,`h`,`alpha`],parse:[`--lchuv`],serialize:`--lchuv`,ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},c:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$15=definition$12;const definition$11={...definition_default$23,mode:`lrgb`,toMode:{rgb:convertLrgbToRgb_default},fromMode:{rgb:convertRgbToLrgb_default},parse:[`srgb-linear`],serialize:`srgb-linear`};var definition_default$16=definition$11;const definition$10={mode:`luv`,toMode:{xyz50:convertLuvToXyz50_default,rgb:luv$1=>convertXyz50ToRgb_default(convertLuvToXyz50_default(luv$1))},fromMode:{xyz50:convertXyz50ToLuv_default,rgb:rgb$2=>convertXyz50ToLuv_default(convertRgbToXyz50_default(rgb$2))},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:interpolatorLinear,u:interpolatorLinear,v:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$17=definition$10;const convertLrgbToOklab=({r:r$2,g:g$2,b:b$4,alpha:alpha$1})=>{r$2===void 0&&(r$2=0),g$2===void 0&&(g$2=0),b$4===void 0&&(b$4=0);let L$1=Math.cbrt(.412221469470763*r$2+.5363325372617348*g$2+.0514459932675022*b$4),M$1=Math.cbrt(.2119034958178252*r$2+.6806995506452344*g$2+.1073969535369406*b$4),S$2=Math.cbrt(.0883024591900564*r$2+.2817188391361215*g$2+.6299787016738222*b$4),res={mode:`oklab`,l:.210454268309314*L$1+.7936177747023054*M$1-.0040720430116193*S$2,a:1.9779985324311684*L$1-2.42859224204858*M$1+.450593709617411*S$2,b:.0259040424655478*L$1+.7827717124575296*M$1-.8086757549230774*S$2};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLrgbToOklab_default=convertLrgbToOklab;const convertRgbToOklab=rgb$2=>{let res=convertLrgbToOklab_default(convertRgbToLrgb_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToOklab_default=convertRgbToOklab;const convertOklabToLrgb=({l:l$1,a:a$2,b:b$4,alpha:alpha$1})=>{l$1===void 0&&(l$1=0),a$2===void 0&&(a$2=0),b$4===void 0&&(b$4=0);let L$1=(l$1+.3963377773761749*a$2+.2158037573099136*b$4)**3,M$1=(l$1-.1055613458156586*a$2-.0638541728258133*b$4)**3,S$2=(l$1-.0894841775298119*a$2-1.2914855480194092*b$4)**3,res={mode:`lrgb`,r:4.076741636075957*L$1-3.3077115392580616*M$1+.2309699031821044*S$2,g:-1.2684379732850317*L$1+2.6097573492876887*M$1-.3413193760026573*S$2,b:-.0041960761386756*L$1-.7034186179359362*M$1+1.7076146940746117*S$2};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertOklabToLrgb_default=convertOklabToLrgb;const convertOklabToRgb=c$4=>convertLrgbToRgb_default(convertOklabToLrgb_default(c$4));var convertOklabToRgb_default=convertOklabToRgb;function toe(x$3){let k_1=.206,k_2=.03,k_3=(1+k_1)/(1+k_2);return .5*(k_3*x$3-k_1+Math.sqrt((k_3*x$3-k_1)*(k_3*x$3-k_1)+4*k_2*k_3*x$3))}function toe_inv(x$3){let k_1=.206,k_2=.03,k_3=(1+k_1)/(1+k_2);return(x$3*x$3+k_1*x$3)/(k_3*(x$3+k_2))}function compute_max_saturation(a$2,b$4){let k0,k1,k2,k3,k4,wl,wm$1,ws$1;-1.88170328*a$2-.80936493*b$4>1?(k0=1.19086277,k1=1.76576728,k2=.59662641,k3=.75515197,k4=.56771245,wl=4.0767416621,wm$1=-3.3077115913,ws$1=.2309699292):1.81444104*a$2-1.19445276*b$4>1?(k0=.73956515,k1=-.45954404,k2=.08285427,k3=.1254107,k4=.14503204,wl=-1.2684380046,wm$1=2.6097574011,ws$1=-.3413193965):(k0=1.35733652,k1=-.00915799,k2=-1.1513021,k3=-.50559606,k4=.00692167,wl=-.0041960863,wm$1=-.7034186147,ws$1=1.707614701);let S$2=k0+k1*a$2+k2*b$4+k3*a$2*a$2+k4*a$2*b$4,k_l=.3963377774*a$2+.2158037573*b$4,k_m=-.1055613458*a$2-.0638541728*b$4,k_s=-.0894841775*a$2-1.291485548*b$4;{let l_=1+S$2*k_l,m_=1+S$2*k_m,s_=1+S$2*k_s,l$1=l_*l_*l_,m$3=m_*m_*m_,s$1=s_*s_*s_,l_dS=3*k_l*l_*l_,m_dS=3*k_m*m_*m_,s_dS=3*k_s*s_*s_,l_dS2=6*k_l*k_l*l_,m_dS2=6*k_m*k_m*m_,s_dS2=6*k_s*k_s*s_,f$3=wl*l$1+wm$1*m$3+ws$1*s$1,f1=wl*l_dS+wm$1*m_dS+ws$1*s_dS,f2=wl*l_dS2+wm$1*m_dS2+ws$1*s_dS2;S$2-=f$3*f1/(f1*f1-.5*f$3*f2)}return S$2}function find_cusp(a$2,b$4){let S_cusp=compute_max_saturation(a$2,b$4),rgb$2=convertOklabToLrgb_default({l:1,a:S_cusp*a$2,b:S_cusp*b$4}),L_cusp=Math.cbrt(1/Math.max(rgb$2.r,rgb$2.g,rgb$2.b)),C_cusp=L_cusp*S_cusp;return[L_cusp,C_cusp]}function find_gamut_intersection(a$2,b$4,L1,C1$1,L0,cusp=null){cusp||=find_cusp(a$2,b$4);let t;if((L1-L0)*cusp[1]-(cusp[0]-L0)*C1$1<=0)t=cusp[1]*L0/(C1$1*cusp[0]+cusp[1]*(L0-L1));else{t=cusp[1]*(L0-1)/(C1$1*(cusp[0]-1)+cusp[1]*(L0-L1));{let dL=L1-L0,dC=C1$1,k_l=.3963377774*a$2+.2158037573*b$4,k_m=-.1055613458*a$2-.0638541728*b$4,k_s=-.0894841775*a$2-1.291485548*b$4,l_dt=dL+dC*k_l,m_dt=dL+dC*k_m,s_dt=dL+dC*k_s;{let L$1=L0*(1-t)+t*L1,C$3=t*C1$1,l_=L$1+C$3*k_l,m_=L$1+C$3*k_m,s_=L$1+C$3*k_s,l$1=l_*l_*l_,m$3=m_*m_*m_,s$1=s_*s_*s_,ldt=3*l_dt*l_*l_,mdt=3*m_dt*m_*m_,sdt=3*s_dt*s_*s_,ldt2=6*l_dt*l_dt*l_,mdt2=6*m_dt*m_dt*m_,sdt2=6*s_dt*s_dt*s_,r$2=4.0767416621*l$1-3.3077115913*m$3+.2309699292*s$1-1,r1=4.0767416621*ldt-3.3077115913*mdt+.2309699292*sdt,r2=4.0767416621*ldt2-3.3077115913*mdt2+.2309699292*sdt2,u_r=r1/(r1*r1-.5*r$2*r2),t_r=-r$2*u_r,g$2=-1.2684380046*l$1+2.6097574011*m$3-.3413193965*s$1-1,g1=-1.2684380046*ldt+2.6097574011*mdt-.3413193965*sdt,g2=-1.2684380046*ldt2+2.6097574011*mdt2-.3413193965*sdt2,u_g=g1/(g1*g1-.5*g$2*g2),t_g=-g$2*u_g,b$5=-.0041960863*l$1-.7034186147*m$3+1.707614701*s$1-1,b1=-.0041960863*ldt-.7034186147*mdt+1.707614701*sdt,b2=-.0041960863*ldt2-.7034186147*mdt2+1.707614701*sdt2,u_b=b1/(b1*b1-.5*b$5*b2),t_b=-b$5*u_b;t_r=u_r>=0?t_r:1e6,t_g=u_g>=0?t_g:1e6,t_b=u_b>=0?t_b:1e6,t+=Math.min(t_r,Math.min(t_g,t_b))}}}return t}function get_ST_max(a_,b_,cusp=null){cusp||=find_cusp(a_,b_);let L$1=cusp[0],C$3=cusp[1];return[C$3/L$1,C$3/(1-L$1)]}function get_Cs(L$1,a_,b_){let cusp=find_cusp(a_,b_),C_max=find_gamut_intersection(a_,b_,L$1,1,L$1,cusp),ST_max=get_ST_max(a_,b_,cusp),S_mid=.11516993+1/(7.4477897+4.1590124*b_+a_*(-2.19557347+1.75198401*b_+a_*(-2.13704948-10.02301043*b_+a_*(-4.24894561+5.38770819*b_+4.69891013*a_)))),T_mid=.11239642+1/(1.6132032-.68124379*b_+a_*(.40370612+.90148123*b_+a_*(-.27087943+.6122399*b_+a_*(.00299215-.45399568*b_-.14661872*a_)))),k$4=C_max/Math.min(L$1*ST_max[0],(1-L$1)*ST_max[1]),C_a=L$1*S_mid,C_b=(1-L$1)*T_mid,C_mid=.9*k$4*Math.sqrt(Math.sqrt(1/(1/(C_a*C_a*C_a*C_a)+1/(C_b*C_b*C_b*C_b))));C_a=L$1*.4,C_b=(1-L$1)*.8;let C_0=Math.sqrt(1/(1/(C_a*C_a)+1/(C_b*C_b)));return[C_0,C_mid,C_max]}function convertOklabToOkhsl(lab$1){let l$1=lab$1.l===void 0?0:lab$1.l,a$2=lab$1.a===void 0?0:lab$1.a,b$4=lab$1.b===void 0?0:lab$1.b,ret={mode:`okhsl`,l:toe(l$1)};lab$1.alpha!==void 0&&(ret.alpha=lab$1.alpha);let c$4=Math.sqrt(a$2*a$2+b$4*b$4);if(!c$4)return ret.s=0,ret;let[C_0,C_mid,C_max]=get_Cs(l$1,a$2/c$4,b$4/c$4),s$1;if(c$4convertOklabToOkhsl(convertRgbToOklab_default(c$4))},toMode:{oklab:convertOkhslToOklab,rgb:c$4=>convertOklabToRgb_default(convertOkhslToOklab(c$4))}};var modeOkhsl_default=modeOkhsl;function convertOklabToOkhsv(lab$1){let l$1=lab$1.l===void 0?0:lab$1.l,a$2=lab$1.a===void 0?0:lab$1.a,b$4=lab$1.b===void 0?0:lab$1.b,c$4=Math.sqrt(a$2*a$2+b$4*b$4),a_=c$4?a$2/c$4:1,b_=c$4?b$4/c$4:1,[S_max,T$1]=get_ST_max(a_,b_),S_0=.5,k$4=1-S_0/S_max,t=T$1/(c$4+l$1*T$1),L_v=t*l$1,C_v=t*c$4,L_vt=toe_inv(L_v),C_vt=C_v*L_vt/L_v,rgb_scale=convertOklabToLrgb_default({l:L_vt,a:a_*C_vt,b:b_*C_vt}),scale_L=Math.cbrt(1/Math.max(rgb_scale.r,rgb_scale.g,rgb_scale.b,0));l$1/=scale_L,c$4=c$4/scale_L*toe(l$1)/l$1,l$1=toe(l$1);let ret={mode:`okhsv`,s:c$4?(S_0+T$1)*C_v/(T$1*S_0+T$1*k$4*C_v):0,v:l$1?l$1/L_v:0};return ret.s&&(ret.h=normalizeHue_default(Math.atan2(b$4,a$2)*180/Math.PI)),lab$1.alpha!==void 0&&(ret.alpha=lab$1.alpha),ret}function convertOkhsvToOklab(hsv$1){let ret={mode:`oklab`};hsv$1.alpha!==void 0&&(ret.alpha=hsv$1.alpha);let h$3=hsv$1.h===void 0?0:hsv$1.h,s$1=hsv$1.s===void 0?0:hsv$1.s,v$2=hsv$1.v===void 0?0:hsv$1.v,a_=Math.cos(h$3/180*Math.PI),b_=Math.sin(h$3/180*Math.PI),[S_max,T$1]=get_ST_max(a_,b_),S_0=.5,k$4=1-S_0/S_max,L_v=1-s$1*S_0/(S_0+T$1-T$1*k$4*s$1),C_v=s$1*T$1*S_0/(S_0+T$1-T$1*k$4*s$1),L_vt=toe_inv(L_v),C_vt=C_v*L_vt/L_v,rgb_scale=convertOklabToLrgb_default({l:L_vt,a:a_*C_vt,b:b_*C_vt}),scale_L=Math.cbrt(1/Math.max(rgb_scale.r,rgb_scale.g,rgb_scale.b,0)),L_new=toe_inv(v$2*L_v),C$3=C_v*L_new/L_v;return ret.l=L_new*scale_L,ret.a=C$3*a_*scale_L,ret.b=C$3*b_*scale_L,ret}const modeOkhsv={...definition_default$6,mode:`okhsv`,channels:[`h`,`s`,`v`,`alpha`],parse:[`--okhsv`],serialize:`--okhsv`,fromMode:{oklab:convertOklabToOkhsv,rgb:c$4=>convertOklabToOkhsv(convertRgbToOklab_default(c$4))},toMode:{oklab:convertOkhsvToOklab,rgb:c$4=>convertOklabToRgb_default(convertOkhsvToOklab(c$4))}};var modeOkhsv_default=modeOkhsv;function parseOklab(color$2,parsed){if(!parsed||parsed[0]!==`oklab`)return;let res={mode:`oklab`},[,l$1,a$2,b$4,alpha$1]=parsed;if(!(l$1.type===Tok.Hue||a$2.type===Tok.Hue||b$4.type===Tok.Hue))return l$1.type!==Tok.None&&(res.l=Math.min(Math.max(0,l$1.type===Tok.Number?l$1.value:l$1.value/100),1)),a$2.type!==Tok.None&&(res.a=a$2.type===Tok.Number?a$2.value:a$2.value*.4/100),b$4.type!==Tok.None&&(res.b=b$4.type===Tok.Number?b$4.value:b$4.value*.4/100),alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseOklab_default=parseOklab;const definition$9={...definition_default$11,mode:`oklab`,toMode:{lrgb:convertOklabToLrgb_default,rgb:convertOklabToRgb_default},fromMode:{lrgb:convertLrgbToOklab_default,rgb:convertRgbToOklab_default},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[parseOklab_default],serialize:c$4=>`oklab(${c$4.l===void 0?`none`:c$4.l} ${c$4.a===void 0?`none`:c$4.a} ${c$4.b===void 0?`none`:c$4.b}${c$4.alpha<1?` / ${c$4.alpha}`:``})`};var definition_default$18=definition$9;function parseOklch(color$2,parsed){if(!parsed||parsed[0]!==`oklch`)return;let res={mode:`oklch`},[,l$1,c$4,h$3,alpha$1]=parsed;if(l$1.type!==Tok.None){if(l$1.type===Tok.Hue)return;res.l=Math.min(Math.max(0,l$1.type===Tok.Number?l$1.value:l$1.value/100),1)}if(c$4.type!==Tok.None&&(res.c=Math.max(0,c$4.type===Tok.Number?c$4.value:c$4.value*.4/100)),h$3.type!==Tok.None){if(h$3.type===Tok.Percentage)return;res.h=h$3.value}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseOklch_default=parseOklch;const definition$8={...definition_default$13,mode:`oklch`,toMode:{oklab:c$4=>convertLchToLab_default(c$4,`oklab`),rgb:c$4=>convertOklabToRgb_default(convertLchToLab_default(c$4,`oklab`))},fromMode:{rgb:c$4=>convertLabToLch_default(convertRgbToOklab_default(c$4),`oklch`),oklab:c$4=>convertLabToLch_default(c$4,`oklch`)},parse:[parseOklch_default],serialize:c$4=>`oklch(${c$4.l===void 0?`none`:c$4.l} ${c$4.c===void 0?`none`:c$4.c} ${c$4.h===void 0?`none`:c$4.h}${c$4.alpha<1?` / ${c$4.alpha}`:``})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}};var definition_default$19=definition$8;const convertP3ToXyz65=rgb$2=>{let{r:r$2,g:g$2,b:b$4,alpha:alpha$1}=convertRgbToLrgb_default(rgb$2),res={mode:`xyz65`,x:.486570948648216*r$2+.265667693169093*g$2+.1982172852343625*b$4,y:.2289745640697487*r$2+.6917385218365062*g$2+.079286914093745*b$4,z:0*r$2+.0451133818589026*g$2+1.043944368900976*b$4};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertP3ToXyz65_default=convertP3ToXyz65;const convertXyz65ToP3=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let res=convertLrgbToRgb_default({r:x$3*2.4934969119414263-y$3*.9313836179191242-.402710784450717*z$3,g:x$3*-.8294889695615749+y$3*1.7626640603183465+.0236246858419436*z$3,b:x$3*.0358458302437845-y$3*.0761723892680418+.9568845240076871*z$3},`p3`);return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToP3_default=convertXyz65ToP3;const definition$7={...definition_default$23,mode:`p3`,parse:[`display-p3`],serialize:`display-p3`,fromMode:{rgb:color$2=>convertXyz65ToP3_default(convertRgbToXyz65_default(color$2)),xyz65:convertXyz65ToP3_default},toMode:{rgb:color$2=>convertXyz65ToRgb_default(convertP3ToXyz65_default(color$2)),xyz65:convertP3ToXyz65_default}};var definition_default$20=definition$7;const gamma$1=v$2=>{let abs$1=Math.abs(v$2);return abs$1>=1/512?Math.sign(v$2)*abs$1**(1/1.8):16*v$2},convertXyz50ToProphoto=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let res={mode:`prophoto`,r:gamma$1(x$3*1.3457868816471585-y$3*.2555720873797946-.0511018649755453*z$3),g:gamma$1(x$3*-.5446307051249019+y$3*1.5082477428451466+.0205274474364214*z$3),b:gamma$1(x$3*0+y$3*0+1.2119675456389452*z$3)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToProphoto_default=convertXyz50ToProphoto;const linearize$1=(v$2=0)=>{let abs$1=Math.abs(v$2);return abs$1>=16/512?Math.sign(v$2)*abs$1**1.8:v$2/16},convertProphotoToXyz50=prophoto$1=>{let r$2=linearize$1(prophoto$1.r),g$2=linearize$1(prophoto$1.g),b$4=linearize$1(prophoto$1.b),res={mode:`xyz50`,x:.7977666449006423*r$2+.1351812974005331*g$2+.0313477341283922*b$4,y:.2880748288194013*r$2+.7118352342418731*g$2+899369387256e-16*b$4,z:0*r$2+0*g$2+.8251046025104602*b$4};return prophoto$1.alpha!==void 0&&(res.alpha=prophoto$1.alpha),res};var convertProphotoToXyz50_default=convertProphotoToXyz50;const definition$6={...definition_default$23,mode:`prophoto`,parse:[`prophoto-rgb`],serialize:`prophoto-rgb`,fromMode:{xyz50:convertXyz50ToProphoto_default,rgb:color$2=>convertXyz50ToProphoto_default(convertRgbToXyz50_default(color$2))},toMode:{xyz50:convertProphotoToXyz50_default,rgb:color$2=>convertXyz50ToRgb_default(convertProphotoToXyz50_default(color$2))}};var definition_default$21=definition$6;const α$1=1.09929682680944,β$1=.018053968510807,gamma=v$2=>{let abs$1=Math.abs(v$2);return abs$1>β$1?(Math.sign(v$2)||1)*(α$1*abs$1**.45-(α$1-1)):4.5*v$2},convertXyz65ToRec2020=({x:x$3,y:y$3,z:z$3,alpha:alpha$1})=>{x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let res={mode:`rec2020`,r:gamma(x$3*1.7166511879712683-y$3*.3556707837763925-.2533662813736599*z$3),g:gamma(x$3*-.6666843518324893+y$3*1.6164812366349395+.0157685458139111*z$3),b:gamma(x$3*.0176398574453108-y$3*.0427706132578085+.9421031212354739*z$3)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToRec2020_default=convertXyz65ToRec2020;const α=1.09929682680944,β=.018053968510807,linearize=(v$2=0)=>{let abs$1=Math.abs(v$2);return abs$1<β*4.5?v$2/4.5:(Math.sign(v$2)||1)*((abs$1+α-1)/α)**(1/.45)},convertRec2020ToXyz65=rec2020$1=>{let r$2=linearize(rec2020$1.r),g$2=linearize(rec2020$1.g),b$4=linearize(rec2020$1.b),res={mode:`xyz65`,x:.6369580483012911*r$2+.1446169035862083*g$2+.1688809751641721*b$4,y:.262700212011267*r$2+.6779980715188708*g$2+.059301716469862*b$4,z:0*r$2+.0280726930490874*g$2+1.0609850577107909*b$4};return rec2020$1.alpha!==void 0&&(res.alpha=rec2020$1.alpha),res};var convertRec2020ToXyz65_default=convertRec2020ToXyz65;const definition$5={...definition_default$23,mode:`rec2020`,fromMode:{xyz65:convertXyz65ToRec2020_default,rgb:color$2=>convertXyz65ToRec2020_default(convertRgbToXyz65_default(color$2))},toMode:{xyz65:convertRec2020ToXyz65_default,rgb:color$2=>convertXyz65ToRgb_default(convertRec2020ToXyz65_default(color$2))},parse:[`rec2020`],serialize:`rec2020`};var definition_default$22=definition$5;const bias=.0037930732552754493,bias_cbrt=Math.cbrt(bias),transfer$1=v$2=>Math.cbrt(v$2)-bias_cbrt,convertRgbToXyb=color$2=>{let{r:r$2,g:g$2,b:b$4,alpha:alpha$1}=convertRgbToLrgb_default(color$2),l$1=transfer$1(.3*r$2+.622*g$2+.078*b$4+bias),m$3=transfer$1(.23*r$2+.692*g$2+.078*b$4+bias),s$1=transfer$1(.2434226892454782*r$2+.2047674442449682*g$2+.5518098665095535*b$4+bias),res={mode:`xyb`,x:(l$1-m$3)/2,y:(l$1+m$3)/2,b:s$1-(l$1+m$3)/2};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToXyb_default=convertRgbToXyb;const transfer=v$2=>(v$2+bias_cbrt)**3,convertXybToRgb=({x:x$3,y:y$3,b:b$4,alpha:alpha$1})=>{x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),b$4===void 0&&(b$4=0);let l$1=transfer(x$3+y$3)-bias,m$3=transfer(y$3-x$3)-bias,s$1=transfer(b$4+y$3)-bias,res=convertLrgbToRgb_default({r:11.031566904639861*l$1-9.866943908131562*m$3-.16462299650829934*s$1,g:-3.2541473810744237*l$1+4.418770377582723*m$3-.16462299650829934*s$1,b:-3.6588512867136815*l$1+2.7129230459360922*m$3+1.9459282407775895*s$1});return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXybToRgb_default=convertXybToRgb;const definition$4={mode:`xyb`,channels:[`x`,`y`,`b`,`alpha`],parse:[`--xyb`],serialize:`--xyb`,toMode:{rgb:convertXybToRgb_default},fromMode:{rgb:convertRgbToXyb_default},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:interpolatorLinear,y:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$24=definition$4;const definition$3={mode:`xyz50`,parse:[`xyz-d50`],serialize:`xyz-d50`,toMode:{rgb:convertXyz50ToRgb_default,lab:convertXyz50ToLab_default},fromMode:{rgb:convertRgbToXyz50_default,lab:convertLabToXyz50_default},channels:[`x`,`y`,`z`,`alpha`],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:interpolatorLinear,y:interpolatorLinear,z:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$25=definition$3;const convertXyz65ToXyz50=xyz65$1=>{let{x:x$3,y:y$3,z:z$3,alpha:alpha$1}=xyz65$1;x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let res={mode:`xyz50`,x:1.0479298208405488*x$3+.0229467933410191*y$3-.0501922295431356*z$3,y:.0296278156881593*x$3+.990434484573249*y$3-.0170738250293851*z$3,z:-.0092430581525912*x$3+.0150551448965779*y$3+.7518742899580008*z$3};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToXyz50_default=convertXyz65ToXyz50;const convertXyz50ToXyz65=xyz50$1=>{let{x:x$3,y:y$3,z:z$3,alpha:alpha$1}=xyz50$1;x$3===void 0&&(x$3=0),y$3===void 0&&(y$3=0),z$3===void 0&&(z$3=0);let res={mode:`xyz65`,x:.9554734527042182*x$3-.0230985368742614*y$3+.0632593086610217*z$3,y:-.0283697069632081*x$3+1.0099954580058226*y$3+.021041398966943*z$3,z:.0123140016883199*x$3-.0205076964334779*y$3+1.3303659366080753*z$3};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToXyz65_default=convertXyz50ToXyz65;const definition$2={mode:`xyz65`,toMode:{rgb:convertXyz65ToRgb_default,xyz50:convertXyz65ToXyz50_default},fromMode:{rgb:convertRgbToXyz65_default,xyz50:convertXyz50ToXyz65_default},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:interpolatorLinear,y:interpolatorLinear,z:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$26=definition$2;const convertRgbToYiq=({r:r$2,g:g$2,b:b$4,alpha:alpha$1})=>{r$2===void 0&&(r$2=0),g$2===void 0&&(g$2=0),b$4===void 0&&(b$4=0);let res={mode:`yiq`,y:.29889531*r$2+.58662247*g$2+.11448223*b$4,i:.59597799*r$2-.2741761*g$2-.32180189*b$4,q:.21147017*r$2-.52261711*g$2+.31114694*b$4};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToYiq_default=convertRgbToYiq;const convertYiqToRgb=({y:y$3,i:i$1,q:q$2,alpha:alpha$1})=>{y$3===void 0&&(y$3=0),i$1===void 0&&(i$1=0),q$2===void 0&&(q$2=0);let res={mode:`rgb`,r:y$3+.95608445*i$1+.6208885*q$2,g:y$3-.27137664*i$1-.6486059*q$2,b:y$3-1.10561724*i$1+1.70250126*q$2};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertYiqToRgb_default=convertYiqToRgb;const definition$1={mode:`yiq`,toMode:{rgb:convertYiqToRgb_default},fromMode:{rgb:convertRgbToYiq_default},channels:[`y`,`i`,`q`,`alpha`],parse:[`--yiq`],serialize:`--yiq`,ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:interpolatorLinear,i:interpolatorLinear,q:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$27=definition$1;const r$1=(value$1,precision)=>Math.round(value$1*(precision=10**precision))/precision,round$1=(precision=4)=>value$1=>typeof value$1==`number`?r$1(value$1,precision):value$1;var round_default=round$1;let twoDecimals=round_default(2);const clamp$1=value$1=>Math.max(0,Math.min(1,value$1||0)),fixup=value$1=>Math.round(clamp$1(value$1)*255),rgb$1=converter_default(`rgb`),hsl$1=converter_default(`hsl`),serializeHex=color$2=>{if(color$2===void 0)return;let r$2=fixup(color$2.r),g$2=fixup(color$2.g),b$4=fixup(color$2.b);return`#`+(1<<24|r$2<<16|g$2<<8|b$4).toString(16).slice(1)},formatCss=c$4=>{let color$2=_prepare_default(c$4);if(!color$2)return;let def$1=getMode(color$2.mode);if(!def$1.serialize||typeof def$1.serialize==`string`){let res=`color(${def$1.serialize||`--${color$2.mode}`} `;return def$1.channels.forEach((ch$1,i$1)=>{ch$1!==`alpha`&&(res+=(i$1?` `:``)+(color$2[ch$1]===void 0?`none`:color$2[ch$1]))}),color$2.alpha!==void 0&&color$2.alpha<1&&(res+=` / ${color$2.alpha}`),res+`)`}if(typeof def$1.serialize==`function`)return def$1.serialize(color$2)},formatHex=c$4=>serializeHex(rgb$1(c$4)),a98=useMode(definition_default),cubehelix=useMode(definition_default$1),dlab=useMode(definition_default$2),dlch=useMode(definition_default$3),hsi=useMode(definition_default$4),hsl=useMode(definition_default$5),hsv=useMode(definition_default$6),hwb=useMode(definition_default$7),itp=useMode(definition_default$8),jab=useMode(definition_default$9),jch=useMode(definition_default$10),lab=useMode(definition_default$11),lab65=useMode(definition_default$12),lch=useMode(definition_default$13),lch65=useMode(definition_default$14),lchuv=useMode(definition_default$15),lrgb=useMode(definition_default$16),luv=useMode(definition_default$17),okhsl=useMode(modeOkhsl_default),okhsv=useMode(modeOkhsv_default),oklab=useMode(definition_default$18),oklch=useMode(definition_default$19),p3=useMode(definition_default$20),prophoto=useMode(definition_default$21),rec2020=useMode(definition_default$22),rgb=useMode(definition_default$23),xyb=useMode(definition_default$24),xyz50=useMode(definition_default$25),xyz65=useMode(definition_default$26),yiq=useMode(definition_default$27);function colorToChromaticColor(color$2){return{color:color$2,withAlpha:alpha$1=>{let rgba$1=oklch(color$2);if(!rgba$1)throw Error(`Invalid color provided for alpha adjustment`);return colorToChromaticColor(oklch({mode:`oklch`,l:rgba$1.l,c:rgba$1.c,h:rgba$1.h,alpha:alpha$1}))},toHex:()=>formatHex(color$2),toCSS:()=>formatCss(color$2)}}function chromaticPaletteFrom(baseHue=200,baseChroma){let chroma=baseChroma??.18+Math.cos(baseHue*Math.PI/180)*.04,shadeConfig={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}},shadeBy=(shade,alpha$1,hueOffset=0)=>{let config=shadeConfig[shade],adjustedHue=(baseHue+hueOffset)%360,adjustedChroma=chroma*config.chromaMultiplier,baseColor=oklch({mode:`oklch`,l:config.lightness,c:adjustedChroma,h:adjustedHue,alpha:alpha$1??1});if(config.mixWithWhite){let white=oklch({mode:`oklch`,l:1,c:0,h:0,alpha:alpha$1??1});return colorToChromaticColor(mixColors(baseColor,white,config.mixWithWhite))}return colorToChromaticColor(baseColor)};return{baseHue,chroma,getAllShades:(alpha$1,hueOffset=0)=>{let shades={};for(let shadeKey of Object.keys(shadeConfig)){let shade=Number.parseInt(shadeKey);shades[shade]=shadeBy(shade,alpha$1,hueOffset)}return shades},shadeBy}}function mixColors(color1,color2,ratio=.5){let c1=oklch(color1),c2=oklch(color2);if(!c1||!c2)throw Error(`Invalid colors provided for mixing`);return oklch({mode:`oklch`,l:c1.l*(1-ratio)+c2.l*ratio,c:c1.c*(1-ratio)+c2.c*ratio,h:mixHues(c1.h??0,c2.h??0,ratio)})}function mixHues(h1,h2,ratio){let diff=h2-h1;return diff>180&&(diff-=360),diff<-180&&(diff+=360),(h1+diff*ratio+360)%360}let Emotion=function(Emotion$1){return Emotion$1.Idle=`<|EMOTE_NEUTRAL|>`,Emotion$1.Happy=`<|EMOTE_HAPPY|>`,Emotion$1.Sad=`<|EMOTE_SAD|>`,Emotion$1.Angry=`<|EMOTE_ANGRY|>`,Emotion$1.Think=`<|EMOTE_THINK|>`,Emotion$1.Surprise=`<|EMOTE_SURPRISE|>`,Emotion$1.Awkward=`<|EMOTE_AWKWARD|>`,Emotion$1.Question=`<|EMOTE_QUESTION|>`,Emotion$1}({});const EMOTION_VALUES=Object.values(Emotion),EmotionHappyMotionName=`Happy`,EmotionSadMotionName=`Sad`,EmotionAngryMotionName=`Angry`,EmotionAwkwardMotionName=`Awkward`,EmotionThinkMotionName=`Think`,EmotionSurpriseMotionName=`Surprise`,EmotionQuestionMotionName=`Question`,EmotionNeutralMotionName=`Idle`,EMOTION_EmotionMotionName_value={[Emotion.Happy]:EmotionHappyMotionName,[Emotion.Sad]:EmotionSadMotionName,[Emotion.Angry]:EmotionAngryMotionName,[Emotion.Think]:EmotionThinkMotionName,[Emotion.Surprise]:EmotionSurpriseMotionName,[Emotion.Awkward]:EmotionAwkwardMotionName,[Emotion.Question]:EmotionQuestionMotionName,[Emotion.Idle]:EmotionNeutralMotionName},EMOTION_VRMExpressionName_value={[Emotion.Happy]:`happy`,[Emotion.Sad]:`sad`,[Emotion.Angry]:`angry`,[Emotion.Think]:void 0,[Emotion.Surprise]:`surprised`,[Emotion.Awkward]:void 0,[Emotion.Question]:void 0,[Emotion.Idle]:void 0},chromaticHue=Symbol(`@proj-airi/chromatic-hue`);function message(prefix,suffix){return{role:`system`,content:[prefix,EMOTION_VALUES.map(emotion=>`- ${emotion}`).join(` `),suffix].join(` -`)}}var system_v2_default=message;const chromaticHueDefault=220.44,llmInferenceEndToken=`<|llm_inference_end|>`,_hoisted_1$40={key:0,class:`flex items-center justify-between`},_hoisted_2$26={class:`text-sm font-medium`},_hoisted_3$20={class:`text-xs text-neutral-500`},_hoisted_4$18={class:`h-full w-full`},_hoisted_5$15={id:`below-threshold-gradient`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},_hoisted_6$13=[`fill`],_hoisted_7$10=[`y`,`height`,`fill`],_hoisted_8$7=[`y1`,`y2`,`stroke`,`fill`],_hoisted_9$6=[`d`,`fill`],_hoisted_10$5=[`d`,`stroke`,`stroke-width`],_hoisted_11$3={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`},_hoisted_12$3={class:`text-xs text-primary-700 font-medium dark:text-primary-300`},_hoisted_13$3={key:1,class:`flex flex-wrap items-center justify-between text-xs text-neutral-500`},_hoisted_14$2={class:`flex items-center gap-3`},_hoisted_15$2={class:`flex items-center gap-1 text-nowrap`},_hoisted_16$2={class:`flex items-center gap-1 text-nowrap`},_hoisted_17$2={key:0,class:`text-nowrap`};var TimeSeriesChart_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TimeSeriesChart`,props:{history:{},currentValue:{},threshold:{default:null},isActive:{type:Boolean},title:{default:`Time Series`},colorsHue:{},lineColor:{},thresholdColor:{},activeColor:{},inactiveColor:{},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:{},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:{}},setup(__props){let props=__props,chartHeight=computed(()=>props.height),timeSeriesChartRef=ref(),chromaticHue$1=inject(chromaticHue,chromaticHueDefault),chromaticHueOrDefault=toRef(()=>props.colorsHue||chromaticHue$1||chromaticHueDefault),chromaticShades=computed(()=>chromaticPaletteFrom(chromaticHueOrDefault.value)),timeSeriesChartContainerBounding=useElementBounding(timeSeriesChartRef,{windowResize:!0});watch([chromaticHueOrDefault,timeSeriesChartRef],()=>{timeSeriesChartRef.value&&timeSeriesChartRef.value.style.setProperty(`--chromatic-hue`,chromaticHueOrDefault.value.toString())},{immediate:!0});let lineColorProps=toRef(()=>props.lineColor),lineColor=computed(()=>lineColorProps.value?lineColorProps.value:chromaticShades.value.shadeBy(500).toHex()),thresholdColorProps=toRef(()=>props.thresholdColor),thresholdColor=computed(()=>{if(!thresholdColorProps.value){let color$2=chromaticShades.value.shadeBy(500).withAlpha(.1).color;return`oklch(${color$2.l} ${color$2.c} ${color$2.h} / ${color$2.alpha})`}return thresholdColorProps.value}),activeColorProps=toRef(()=>props.activeColor),activeColor=computed(()=>activeColorProps.value?activeColorProps.value:chromaticShades.value.shadeBy(600).toHex()),inactiveColorProps=toRef(()=>props.inactiveColor),inactiveColor=computed(()=>inactiveColorProps.value?inactiveColorProps.value:chromaticShades.value.shadeBy(400).toHex()),componentId=Math.random().toString(36).substring(2,9),gridPatternId=`grid-${componentId}`,areaGradientId=`area-gradient-${componentId}`,thresholdGradientId=`threshold-gradient-${componentId}`,normalizedThreshold=computed(()=>props.threshold===null?0:Math.max(0,Math.min(1,props.threshold))),thresholdLineY=computed(()=>props.threshold===null?0:chartHeight.value-normalizedThreshold.value*chartHeight.value),smoothPath=computed(()=>{let history$1=props.history;if(history$1.length<2)return``;let width=timeSeriesChartContainerBounding.width.value,height=chartHeight.value,path=`M0,${height-history$1[0]*height}`;for(let i$1=1;i$1{let history$1=props.history;if(history$1.length<2)return``;let width=timeSeriesChartContainerBounding.width.value,height=chartHeight.value,path=`M0,${height} L0,${height-history$1[0]*height}`;for(let i$1=1;i$1_ctx.history.length>_ctx.minDataPoints?(openBlock(),createElementBlock(`div`,{key:0,ref_key:`timeSeriesChartRef`,ref:timeSeriesChartRef,class:`time-series-chart space-y-3`},[_ctx.showHeader?(openBlock(),createElementBlock(`div`,_hoisted_1$40,[createBaseVNode(`div`,_hoisted_2$26,toDisplayString(_ctx.title),1),createBaseVNode(`div`,_hoisted_3$20,toDisplayString(_ctx.subtitle),1)])):createCommentVNode(``,!0),createBaseVNode(`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:normalizeStyle({height:`${chartHeight.value}px`})},[(openBlock(),createElementBlock(`svg`,_hoisted_4$18,[createBaseVNode(`defs`,null,[createBaseVNode(`pattern`,{id:gridPatternId,width:`20`,height:`10`,patternUnits:`userSpaceOnUse`},_cache$1[0]||=[createBaseVNode(`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)]),createBaseVNode(`linearGradient`,{id:areaGradientId,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.3`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.15`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.05`)},null,4)]),createBaseVNode(`linearGradient`,{id:thresholdGradientId,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.3`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.15`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.05`)},null,4)]),createBaseVNode(`linearGradient`,_hoisted_5$15,[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.2`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.1`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.05`)},null,4)])]),createBaseVNode(`rect`,{width:`100%`,height:`100%`,fill:`url(#${gridPatternId})`},null,8,_hoisted_6$13),_ctx.showThreshold&&_ctx.threshold!==null?(openBlock(),createElementBlock(`rect`,{key:0,x:`0`,y:thresholdLineY.value,width:`100%`,height:chartHeight.value-thresholdLineY.value,fill:thresholdColor.value,class:`transition-all duration-300`},null,8,_hoisted_7$10)):createCommentVNode(``,!0),_ctx.showThreshold&&_ctx.threshold!==null?(openBlock(),createElementBlock(`line`,{key:1,x1:`0`,y1:thresholdLineY.value,x2:`100%`,y2:thresholdLineY.value,stroke:thresholdColor.value,"stroke-width":`1.5`,"stroke-dasharray":`4,4`,fill:thresholdColor.value,class:`transition-all duration-300`},null,8,_hoisted_8$7)):createCommentVNode(``,!0),dataAreaPath.value&&_ctx.showArea?(openBlock(),createElementBlock(`path`,{key:2,d:dataAreaPath.value,fill:`url(#${areaGradientId})`,class:`transition-all duration-75`},null,8,_hoisted_9$6)):createCommentVNode(``,!0),smoothPath.value?(openBlock(),createElementBlock(`path`,{key:3,d:smoothPath.value,fill:`none`,stroke:lineColor.value,"stroke-width":_ctx.lineWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`drop-shadow-sm transition-all duration-75`},null,8,_hoisted_10$5)):createCommentVNode(``,!0)])),_ctx.showCurrentValue?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`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`,_ctx.isActive?`bg-primary-50 dark:bg-primary-900 border-primary-200 dark:border-primary-800`:``])},[createBaseVNode(`div`,{class:normalizeClass([`text-xs font-medium`,_ctx.isActive?`text-primary-700 dark:text-primary-300`:`text-neutral-600 dark:text-neutral-400`])},toDisplayString(_ctx.formatValue?_ctx.formatValue(_ctx.currentValue):`${(_ctx.currentValue*100).toFixed(_ctx.precision)}${_ctx.unit}`),3)],2)):createCommentVNode(``,!0),createVNode(Transition,{name:`fade`},{default:withCtx(()=>[_ctx.isActive&&_ctx.showActiveIndicator?(openBlock(),createElementBlock(`div`,_hoisted_11$3,[_cache$1[1]||=createBaseVNode(`div`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary-500`},null,-1),createBaseVNode(`span`,_hoisted_12$3,toDisplayString(_ctx.activeLabel),1)])):createCommentVNode(``,!0)]),_:1})],4),_ctx.showLegend?(openBlock(),createElementBlock(`div`,_hoisted_13$3,[createBaseVNode(`div`,_hoisted_14$2,[createBaseVNode(`span`,_hoisted_15$2,[createBaseVNode(`div`,{class:`h-2 w-2 rounded-full`,style:normalizeStyle({backgroundColor:activeColor.value})},null,4),createTextVNode(` `+toDisplayString(_ctx.activeLegendLabel),1)]),createBaseVNode(`span`,_hoisted_16$2,[createBaseVNode(`div`,{class:`h-2 w-2 rounded-full`,style:normalizeStyle({backgroundColor:inactiveColor.value})},null,4),createTextVNode(` `+toDisplayString(_ctx.inactiveLegendLabel),1)])]),_ctx.threshold===null?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_17$2,toDisplayString(_ctx.thresholdLabel)+`: `+toDisplayString((_ctx.threshold*100).toFixed(0))+`%`,1))])):createCommentVNode(``,!0)],512)):createCommentVNode(``,!0)}}),TimeSeriesChart_default=__plugin_vue_export_helper_default(TimeSeriesChart_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-6b4f300d`]]),Callout_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Callout`,props:{theme:{default:`primary`},label:{}},setup(__props){let props=__props,themeClasses={primary:{container:[`bg-primary-400/10 dark:bg-primary-50/10 text-neutral-900/80 backdrop-blur-md`,`before:bg-primary-400 dark:bg-primary-900/10 dark:text-neutral-100/80 before:content-[''] before:dark:bg-primary-900`],label:[`text-primary-500 dark:text-primary-400 font-semibold`]},lime:{container:[`bg-lime-400/10 dark:bg-lime-50/10 text-neutral-900/80 backdrop-blur-md`,`before:bg-lime-400 dark:bg-lime-900/10 dark:text-neutral-100/80 before:content-[''] before:dark:bg-lime-900`],label:[`text-lime-500 dark:text-lime-400 font-semibold`]},violet:{container:[`bg-violet-400/10 dark:bg-violet-50/10 text-neutral-900/80 backdrop-blur-md`,`before:bg-violet-400 dark:bg-violet-900/10 dark:text-neutral-100/80 before:content-[''] before:dark:bg-violet-900`],label:[`text-violet-500 dark:text-violet-400 font-semibold`]},orange:{container:[`bg-orange-400/10 dark:bg-orange-50/10 text-neutral-900/80 backdrop-blur-md`,`before:bg-orange-400 dark:bg-orange-900/10 dark:text-neutral-100/80 before:content-[''] before:dark:bg-orange-900`],label:[`text-orange-500 dark:text-orange-400 font-semibold`]}};return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{relative:``,"mb-4":``,flex:``,"flex-col":``,"gap-1":``,"overflow-hidden":``,"rounded-lg":``,"py-2":``,"pl-4":``,"pr-3":``,class:normalizeClass([...themeClasses[props.theme||`violet`].container,`before-position-absolute before:inset-0 before:h-full before:w-1 before:rounded-full`])},[createBaseVNode(`div`,{text:`font-semibold`,class:normalizeClass([...themeClasses[props.theme||`violet`].label||[]])},[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label||`Callout`),1)])],2),renderSlot(_ctx.$slots,`default`)],2))}}),Callout_default=Callout_vue_vue_type_script_setup_true_lang_default;const __vite_import_meta_env__={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`};var SubscriptionManager=class{subscriptions=new Set;add(handler){return this.subscriptions.add(handler),()=>this.subscriptions.delete(handler)}notify(a$2,b$4,c$4){if(this.subscriptions.size)for(let handler of this.subscriptions)handler(a$2,b$4,c$4)}clear(){this.subscriptions.clear()}};function isFloat(value$1){return!Number.isNaN(Number.parseFloat(value$1))}var MotionValue=class{current;prev;timeDelta=0;lastUpdated=0;updateSubscribers=new SubscriptionManager;stopAnimation;canTrackVelocity=!1;constructor(init){this.prev=this.current=init,this.canTrackVelocity=isFloat(this.current)}onChange(subscription){return this.updateSubscribers.add(subscription)}clearListeners(){this.updateSubscribers.clear()}set(v$2){this.updateAndNotify(v$2)}updateAndNotify=v$2=>{this.prev=this.current,this.current=v$2;let{delta,timestamp:timestamp$2}=getFrameData();this.lastUpdated!==timestamp$2&&(this.timeDelta=delta,this.lastUpdated=timestamp$2),es_default.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)};get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?velocityPerSecond(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}scheduleVelocityCheck=()=>es_default.postRender(this.velocityCheck);velocityCheck=({timestamp:timestamp$2})=>{this.canTrackVelocity||=isFloat(this.current),timestamp$2!==this.lastUpdated&&(this.prev=this.current)};start(animation){return this.stop(),new Promise(resolve$1=>{let{stop:stop$1}=animation(resolve$1);this.stopAnimation=stop$1}).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 getMotionValue(init){return new MotionValue(init)}const{isArray:isArray$2}=Array;function useMotionValues(){let motionValues=ref({}),stop$1=keys$3=>{let destroyKey=key$1=>{motionValues.value[key$1]&&(motionValues.value[key$1].stop(),motionValues.value[key$1].destroy(),delete motionValues.value[key$1])};keys$3?isArray$2(keys$3)?keys$3.forEach(destroyKey):destroyKey(keys$3):Object.keys(motionValues.value).forEach(destroyKey)},get=(key$1,from,target$1)=>{if(motionValues.value[key$1])return motionValues.value[key$1];let motionValue=getMotionValue(from);return motionValue.onChange(v$2=>target$1[key$1]=v$2),motionValues.value[key$1]=motionValue,motionValue};return tryOnUnmounted(stop$1),{motionValues,get,stop:stop$1}}function isKeyframesTarget(v$2){return Array.isArray(v$2)}function underDampedSpring(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function criticallyDampedSpring(to$2){return{type:`spring`,stiffness:550,damping:to$2===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function overDampedSpring(to$2){return{type:`spring`,stiffness:550,damping:to$2===0?100:30,restDelta:.01,restSpeed:10}}function linearTween(){return{type:`keyframes`,ease:`linear`,duration:300}}function keyframes(values){return{type:`keyframes`,duration:800,values}}const defaultTransitions={default:overDampedSpring,x:underDampedSpring,y:underDampedSpring,z:underDampedSpring,rotate:underDampedSpring,rotateX:underDampedSpring,rotateY:underDampedSpring,rotateZ:underDampedSpring,scaleX:criticallyDampedSpring,scaleY:criticallyDampedSpring,scale:criticallyDampedSpring,backgroundColor:linearTween,color:linearTween,opacity:linearTween};function getDefaultTransition(valueKey,to$2){let transitionFactory;return transitionFactory=isKeyframesTarget(to$2)?keyframes:defaultTransitions[valueKey]||defaultTransitions.default,{to:to$2,...transitionFactory(to$2)}}const int={...number$2,transform:Math.round},valueTypes={color:color$1,backgroundColor:color$1,outlineColor:color$1,fill:color$1,stroke:color$1,borderColor:color$1,borderTopColor:color$1,borderRightColor:color$1,borderBottomColor:color$1,borderLeftColor:color$1,borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int,filter,WebkitFilter:filter,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int},getValueType=key$1=>valueTypes[key$1];function getValueAsType(value$1,type){return type&&typeof value$1==`number`&&type.transform?type.transform(value$1):value$1}function getAnimatableNone(key$1,value$1){let defaultValueType=getValueType(key$1);return defaultValueType!==filter&&(defaultValueType=complex),defaultValueType.getAnimatableNone?defaultValueType.getAnimatableNone(value$1):void 0}const easingLookup={linear,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate,bounceIn,bounceInOut,bounceOut};function easingDefinitionToFunction(definition$29){if(Array.isArray(definition$29)){let[x1,y1,x2,y2]=definition$29;return cubicBezier(x1,y1,x2,y2)}else if(typeof definition$29==`string`)return easingLookup[definition$29];return definition$29}function isEasingArray(ease){return Array.isArray(ease)&&typeof ease[0]!=`number`}function isAnimatable(key$1,value$1){return key$1===`zIndex`?!1:!!(typeof value$1==`number`||Array.isArray(value$1)||typeof value$1==`string`&&complex.test(value$1)&&!value$1.startsWith(`url(`))}function hydrateKeyframes(options$1){return Array.isArray(options$1.to)&&options$1.to[0]===null&&(options$1.to=[...options$1.to],options$1.to[0]=options$1.from),options$1}function convertTransitionToAnimationOptions({ease,times,delay,...transition}){let options$1={...transition};return times&&(options$1.offset=times),ease&&(options$1.ease=isEasingArray(ease)?ease.map(easingDefinitionToFunction):easingDefinitionToFunction(ease)),delay&&(options$1.elapsed=-delay),options$1}function getPopmotionAnimationOptions(transition,options$1,key$1){return Array.isArray(options$1.to)&&(transition.duration||=800),hydrateKeyframes(options$1),isTransitionDefined(transition)||(transition={...transition,...getDefaultTransition(key$1,options$1.to)}),{...options$1,...convertTransitionToAnimationOptions(transition)}}function isTransitionDefined({delay,repeat,repeatType,repeatDelay,from,...transition}){return!!Object.keys(transition).length}function getValueTransition(transition,key$1){return transition[key$1]||transition.default||transition}function getAnimation(key$1,value$1,target$1,transition,onComplete){let valueTransition=getValueTransition(transition,key$1),origin=valueTransition.from===null||valueTransition.from===void 0?value$1.get():valueTransition.from,isTargetAnimatable=isAnimatable(key$1,target$1);origin===`none`&&isTargetAnimatable&&typeof target$1==`string`&&(origin=getAnimatableNone(key$1,target$1));let isOriginAnimatable=isAnimatable(key$1,origin);function start(complete){let options$1={from:origin,to:target$1,velocity:transition.velocity?transition.velocity:value$1.getVelocity(),onUpdate:v$2=>value$1.set(v$2)};return valueTransition.type===`inertia`||valueTransition.type===`decay`?inertia({...options$1,...valueTransition}):animate({...getPopmotionAnimationOptions(valueTransition,options$1,key$1),onUpdate:v$2=>{options$1.onUpdate(v$2),valueTransition.onUpdate&&valueTransition.onUpdate(v$2)},onComplete:()=>{onComplete&&onComplete(),complete&&complete()}})}function set(complete){return value$1.set(target$1),onComplete&&onComplete(),complete&&complete(),{stop:()=>{}}}return!isOriginAnimatable||!isTargetAnimatable||valueTransition.type===!1?set:start}function useMotionTransitions(){let{motionValues,stop:stop$1,get}=useMotionValues(),push$1=(key$1,value$1,target$1,transition={},onComplete)=>{let from=target$1[key$1],motionValue=get(key$1,from,target$1);if(transition&&transition.immediate){motionValue.set(value$1);return}let animation=getAnimation(key$1,motionValue,value$1,transition,onComplete);motionValue.start(animation)};return{motionValues,stop:stop$1,push:push$1}}function useMotionControls(motionProperties,variants={},{motionValues,push:push$1,stop:stop$1}=useMotionTransitions()){let _variants=unref(variants),isAnimating=ref(!1);watch(motionValues,newVal=>{isAnimating.value=Object.values(newVal).filter(value$1=>value$1.isAnimating()).length>0},{immediate:!0,deep:!0});let getVariantFromKey=variant=>{if(!_variants||!_variants[variant])throw Error(`The variant ${variant} does not exist.`);return _variants[variant]},apply$2=variant=>{typeof variant==`string`&&(variant=getVariantFromKey(variant));let animations$1=Object.entries(variant).map(([key$1,value$1])=>{if(key$1!==`transition`)return new Promise(resolve$1=>push$1(key$1,value$1,motionProperties,variant.transition||getDefaultTransition(key$1,variant[key$1]),resolve$1))}).filter(Boolean);async function waitForComplete(){await Promise.all(animations$1),variant.transition?.onComplete?.()}return Promise.all([waitForComplete()])},set=variant=>{let variantData=isObject$1(variant)?variant:getVariantFromKey(variant);Object.entries(variantData).forEach(([key$1,value$1])=>{key$1!==`transition`&&push$1(key$1,value$1,motionProperties,{immediate:!0})})},leave=async done=>{let leaveVariant;if(_variants&&(_variants.leave&&(leaveVariant=_variants.leave),!_variants.leave&&_variants.initial&&(leaveVariant=_variants.initial)),!leaveVariant){done();return}await apply$2(leaveVariant),done()};return{isAnimating,apply:apply$2,set,leave,stop:stop$1}}const isBrowser=typeof window<`u`,supportsPointerEvents=()=>isBrowser&&(window.onpointerdown===null||__vite_import_meta_env__?.TEST),supportsTouchEvents=()=>isBrowser&&(window.ontouchstart===null||__vite_import_meta_env__?.TEST),supportsMouseEvents=()=>isBrowser&&(window.onmousedown===null||__vite_import_meta_env__?.TEST);function registerEventListeners({target:target$1,state,variants,apply:apply$2}){let _variants=unref(variants),hovered=ref(!1),tapped=ref(!1),focused=ref(!1),mutableKeys=computed(()=>{let result=[...Object.keys(state.value||{})];return _variants?(_variants.hovered&&(result=[...result,...Object.keys(_variants.hovered)]),_variants.tapped&&(result=[...result,...Object.keys(_variants.tapped)]),_variants.focused&&(result=[...result,...Object.keys(_variants.focused)]),result):result}),computedProperties=computed(()=>{let result={};for(let key$1 in Object.assign(result,state.value),hovered.value&&_variants.hovered&&Object.assign(result,_variants.hovered),tapped.value&&_variants.tapped&&Object.assign(result,_variants.tapped),focused.value&&_variants.focused&&Object.assign(result,_variants.focused),result)mutableKeys.value.includes(key$1)||delete result[key$1];return result});_variants.hovered&&(useEventListener$1(target$1,`mouseenter`,()=>hovered.value=!0),useEventListener$1(target$1,`mouseleave`,()=>{hovered.value=!1,tapped.value=!1})),_variants.tapped&&(supportsMouseEvents()&&(useEventListener$1(target$1,`mousedown`,()=>tapped.value=!0),useEventListener$1(target$1,`mouseup`,()=>tapped.value=!1)),supportsPointerEvents()&&(useEventListener$1(target$1,`pointerdown`,()=>tapped.value=!0),useEventListener$1(target$1,`pointerup`,()=>tapped.value=!1)),supportsTouchEvents()&&(useEventListener$1(target$1,`touchstart`,()=>tapped.value=!0),useEventListener$1(target$1,`touchend`,()=>tapped.value=!1))),_variants.focused&&(useEventListener$1(target$1,`focus`,()=>focused.value=!0),useEventListener$1(target$1,`blur`,()=>focused.value=!1)),watch([hovered,tapped,focused],()=>{apply$2(computedProperties.value)})}function registerLifeCycleHooks({set,target:target$1,variants,variant}){let _variants=unref(variants);watch(()=>target$1,()=>{_variants&&(_variants.initial&&(set(`initial`),variant.value=`initial`),_variants.enter&&(variant.value=`enter`))},{immediate:!0,flush:`pre`})}function registerVariantsSync({state,apply:apply$2}){watch(state,newVal=>{newVal&&apply$2(newVal)},{immediate:!0})}function registerVisibilityHooks({target:target$1,variants,variant}){let _variants=unref(variants);_variants&&(_variants.visible||_variants.visibleOnce)&&useIntersectionObserver(target$1,([{isIntersecting}])=>{_variants.visible?isIntersecting?variant.value=`visible`:variant.value=`initial`:_variants.visibleOnce&&(isIntersecting&&variant.value!==`visibleOnce`?variant.value=`visibleOnce`:variant.value||=`initial`)})}function useMotionFeatures(instance,options$1={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){options$1.lifeCycleHooks&®isterLifeCycleHooks(instance),options$1.syncVariants&®isterVariantsSync(instance),options$1.visibilityHooks&®isterVisibilityHooks(instance),options$1.eventListeners&®isterEventListeners(instance)}function reactiveStyle(props={}){let state=reactive({...props}),style=ref({});return watch(state,()=>{let result={};for(let[key$1,value$1]of Object.entries(state)){let valueType=getValueType(key$1),valueAsType=getValueAsType(value$1,valueType);result[key$1]=valueAsType}style.value=result},{immediate:!0,deep:!0}),{state,style}}function usePermissiveTarget(target$1,onTarget){watch(()=>unrefElement$1(target$1),el$1=>{el$1&&onTarget(el$1)},{immediate:!0})}const translateAlias={x:`translateX`,y:`translateY`,z:`translateZ`};function reactiveTransform(props={},enableHardwareAcceleration=!0){let state=reactive({...props}),transform$1=ref(``);return watch(state,newVal=>{let result=``,hasHardwareAcceleration=!1;if(enableHardwareAcceleration&&(newVal.x||newVal.y||newVal.z)){let str=[newVal.x||0,newVal.y||0,newVal.z||0].map(val=>getValueAsType(val,px)).join(`,`);result+=`translate3d(${str}) `,hasHardwareAcceleration=!0}for(let[key$1,value$1]of Object.entries(newVal)){if(enableHardwareAcceleration&&(key$1===`x`||key$1===`y`||key$1===`z`))continue;let valueType=getValueType(key$1),valueAsType=getValueAsType(value$1,valueType);result+=`${translateAlias[key$1]||key$1}(${valueAsType}) `}enableHardwareAcceleration&&!hasHardwareAcceleration&&(result+=`translateZ(0px) `),transform$1.value=result.trim()},{immediate:!0,deep:!0}),{state,transform:transform$1}}const transformAxes=[``,`X`,`Y`,`Z`],order$1=[`perspective`,`translate`,`scale`,`rotate`,`skew`],transformProps=[`transformPerspective`,`x`,`y`,`z`];order$1.forEach(operationKey=>{transformAxes.forEach(axesKey=>{let key$1=operationKey+axesKey;transformProps.push(key$1)})});const transformPropSet=new Set(transformProps);function isTransformProp(key$1){return transformPropSet.has(key$1)}const transformOriginProps=new Set([`originX`,`originY`,`originZ`]);function isTransformOriginProp(key$1){return transformOriginProps.has(key$1)}function splitValues(variant){let transform$1={},style={};return Object.entries(variant).forEach(([key$1,value$1])=>{isTransformProp(key$1)||isTransformOriginProp(key$1)?transform$1[key$1]=value$1:style[key$1]=value$1}),{transform:transform$1,style}}function variantToStyle(variant){let{transform:_transform,style:_style}=splitValues(variant),{transform:transform$1}=reactiveTransform(_transform),{style}=reactiveStyle(_style);return transform$1.value&&(style.value.transform=transform$1.value),style.value}function useElementStyle(target$1,onInit){let _cache$1,_target$1,{state,style}=reactiveStyle();return usePermissiveTarget(target$1,el$1=>{_target$1=el$1;for(let key$1 of Object.keys(valueTypes)){if(el$1.style[key$1]===null||el$1.style[key$1]===``||isTransformProp(key$1)||isTransformOriginProp(key$1))continue;state[key$1]=el$1.style[key$1]}_cache$1&&Object.entries(_cache$1).forEach(([key$1,value$1])=>el$1.style[key$1]=value$1),onInit&&onInit(state)}),watch(style,newVal=>{if(!_target$1){_cache$1=newVal;return}for(let key$1 in newVal)_target$1.style[key$1]=newVal[key$1]},{immediate:!0}),{style:state}}function parseTransform(transform$1){let transforms=transform$1.trim().split(/\) |\)/);if(transforms.length===1)return{};let parseValues=value$1=>value$1.endsWith(`px`)||value$1.endsWith(`deg`)?Number.parseFloat(value$1):Number.isNaN(Number(value$1))?Number(value$1):value$1;return transforms.reduce((acc,transform2)=>{if(!transform2)return acc;let[name$2,transformValue]=transform2.split(`(`),valueArray=transformValue.split(`,`),values=valueArray.map(val=>parseValues(val.endsWith(`)`)?val.replace(`)`,``):val.trim())),value$1=values.length===1?values[0]:values;return{...acc,[name$2]:value$1}},{})}function stateFromTransform(state,transform$1){Object.entries(parseTransform(transform$1)).forEach(([key$1,value$1])=>{let axes=[`x`,`y`,`z`];if(key$1===`translate3d`){if(value$1===0){axes.forEach(axis=>state[axis]=0);return}value$1.forEach((axisValue,index$1)=>state[axes[index$1]]=axisValue);return}if(value$1=Number.parseFloat(`${value$1}`),key$1===`translateX`){state.x=value$1;return}if(key$1===`translateY`){state.y=value$1;return}if(key$1===`translateZ`){state.z=value$1;return}state[key$1]=value$1})}function useElementTransform(target$1,onInit){let _cache$1,_target$1,{state,transform:transform$1}=reactiveTransform();return usePermissiveTarget(target$1,el$1=>{_target$1=el$1,el$1.style.transform&&stateFromTransform(state,el$1.style.transform),_cache$1&&(el$1.style.transform=_cache$1),onInit&&onInit(state)}),watch(transform$1,newValue=>{if(!_target$1){_cache$1=newValue;return}_target$1.style.transform=newValue},{immediate:!0}),{transform:state}}function objectEntries(obj){return Object.entries(obj)}function useMotionProperties(target$1,defaultValues){let motionProperties=reactive({}),apply$2=values=>Object.entries(values).forEach(([key$1,value$1])=>motionProperties[key$1]=value$1),{style}=useElementStyle(target$1,apply$2),{transform:transform$1}=useElementTransform(target$1,apply$2);return watch(motionProperties,newVal=>{objectEntries(newVal).forEach(([key$1,value$1])=>{let target2=isTransformProp(key$1)?transform$1:style;target2[key$1]&&target2[key$1]===value$1||(target2[key$1]=value$1)})},{immediate:!0,deep:!0}),usePermissiveTarget(target$1,()=>defaultValues&&apply$2(defaultValues)),{motionProperties,style,transform:transform$1}}function useMotionVariants(variants={}){let _variants=unref(variants),variant=ref(),state=computed(()=>{if(variant.value)return _variants[variant.value]});return{state,variant}}function useMotion(target$1,variants={},options$1){let{motionProperties}=useMotionProperties(target$1),{variant,state}=useMotionVariants(variants),controls=useMotionControls(motionProperties,variants),instance={target:target$1,variant,variants,state,motionProperties,...controls};return useMotionFeatures(instance,options$1),instance}const transitionKeys=[`delay`,`duration`],directivePropsKeys=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...transitionKeys],fade={initial:{opacity:0},enter:{opacity:1}},fadeVisible={initial:{opacity:0},visible:{opacity:1}},fadeVisibleOnce={initial:{opacity:0},visibleOnce:{opacity:1}},pop={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},popVisible={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},popVisibleOnce={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},rollLeft={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleLeft={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceLeft={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollRight={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleRight={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceRight={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollTop={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleTop={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceTop={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},rollBottom={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleBottom={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceBottom={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},slideLeft={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},slideVisibleLeft={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceLeft={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},slideRight={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},slideVisibleRight={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceRight={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},slideTop={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},slideVisibleTop={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceTop={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},slideBottom={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},slideVisibleBottom={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceBottom={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},presets={__proto__:null,fade,fadeVisible,fadeVisibleOnce,pop,popVisible,popVisibleOnce,rollBottom,rollLeft,rollRight,rollTop,rollVisibleBottom,rollVisibleLeft,rollVisibleOnceBottom,rollVisibleOnceLeft,rollVisibleOnceRight,rollVisibleOnceTop,rollVisibleRight,rollVisibleTop,slideBottom,slideLeft,slideRight,slideTop,slideVisibleBottom,slideVisibleLeft,slideVisibleOnceBottom,slideVisibleOnceLeft,slideVisibleOnceRight,slideVisibleOnceTop,slideVisibleRight,slideVisibleTop},CUSTOM_PRESETS=Symbol(``),MotionComponentProps={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 isObject$2(val){return Object.prototype.toString.call(val)===`[object Object]`}function clone(v$2){if(Array.isArray(v$2))return v$2.map(clone);if(isObject$2(v$2)){let res={};for(let key$1 in v$2)res[key$1]=clone(v$2[key$1]);return res}return v$2}function setupMotionComponent(props){let instances=reactive({}),customPresets=inject(CUSTOM_PRESETS,{}),preset=computed(()=>props.preset==null?{}:customPresets!=null&&props.preset in customPresets?structuredClone(toRaw(customPresets)[props.preset]):props.preset in presets?structuredClone(presets[props.preset]):{}),propsConfig=computed(()=>({initial:props.initial,enter:props.enter,leave:props.leave,visible:props.visible,visibleOnce:props.visibleOnce,hovered:props.hovered,tapped:props.tapped,focused:props.focused}));function applyTransitionHelpers(config,values){for(let transitionKey of[`delay`,`duration`]){if(values[transitionKey]==null)continue;let transitionValueParsed=Number.parseInt(values[transitionKey]);for(let variantKey of[`enter`,`visible`,`visibleOnce`]){let variantConfig=config[variantKey];if(variantConfig==null)continue;variantConfig.transition??={},variantConfig.transition[transitionKey]=transitionValueParsed}}return config}let motionConfig=computed(()=>{let config=defu({},propsConfig.value,preset.value,props.variants||{});return applyTransitionHelpers({...config},props)});function setNodeInstance(node$1,index$1,style){node$1.props??={},node$1.props.style??={},node$1.props.style={...node$1.props.style,...style};let elementMotionConfig=applyTransitionHelpers(clone(motionConfig.value),node$1.props);return node$1.props.onVnodeMounted=({el:el$1})=>{instances[index$1]=useMotion(el$1,elementMotionConfig)},node$1.props.onVnodeUpdated=({el:el$1})=>{let styles=variantToStyle(instances[index$1].state);for(let[key$1,val]of Object.entries(styles))el$1.style[key$1]=val},node$1}return{motionConfig,setNodeInstance}}const MotionComponent=defineComponent({name:`Motion`,props:{...MotionComponentProps,is:{type:[String,Object],default:`div`}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent(props);return()=>{let style=variantToStyle(motionConfig.value.initial||{}),node$1=h(props.is,void 0,slots);return setNodeInstance(node$1,0,style),node$1}}}),MotionGroupComponent=defineComponent({name:`MotionGroup`,props:{...MotionComponentProps,is:{type:[String,Object],required:!1}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent(props);return()=>{let style=variantToStyle(motionConfig.value.initial||{}),nodes=slots.default?.()||[];for(let i$1=0;i$1{await apply$2(`initial`),await apply$2(`enter`)}),onUnmounted(async()=>{await apply$2(`leave`),finalizedDisableBackButton.value=!0}),watch([()=>props.title,()=>props.subtitle,route],async()=>{await apply$2(`leave`),await nextTick(),finalizedDisableBackButton.value=props.disableBackButton,title.value=props.title,subtitle.value=props.subtitle,await nextTick(),await apply$2(`initial`),await apply$2(`enter`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`pageHeaderRef`,ref:pageHeaderRef,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`},[createBaseVNode(`button`,{onClick:_cache$1[0]||=$event=>unref(router$1).back()},[finalizedDisableBackButton.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,{key:0,"i-solar:alt-arrow-left-line-duotone":``,"text-2xl":``,class:normalizeClass({"pointer-events-none op-0":!_ctx.showBackButton})},null,2))]),createBaseVNode(`h1`,_hoisted_1$39,[subtitle.value?(openBlock(),createElementBlock(`div`,_hoisted_2$25,[createBaseVNode(`span`,_hoisted_3$19,toDisplayString(subtitle.value),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$17,toDisplayString(title.value),1)])],512))}}),PageHeader_default=PageHeader_vue_vue_type_script_setup_true_lang_default;const closed=`0px`;var TransitionVertical_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TransitionVertical`,props:{duration:{default:250},easingEnter:{default:`ease-in-out`},easingLeave:{default:`ease-in-out`},opacityClosed:{default:0},opacityOpened:{default:1}},setup(__props){let props=__props;function getElementStyle(element$3){return{height:element$3.style.height,width:element$3.style.width,position:element$3.style.position,visibility:element$3.style.visibility,overflow:element$3.style.overflow,paddingTop:element$3.style.paddingTop,paddingBottom:element$3.style.paddingBottom,borderTopWidth:element$3.style.borderTopWidth,borderBottomWidth:element$3.style.borderBottomWidth,marginTop:element$3.style.marginTop,marginBottom:element$3.style.marginBottom}}function prepareElement(element$3,initialStyle){let{width}=getComputedStyle(element$3);element$3.style.width=width,element$3.style.position=`absolute`,element$3.style.visibility=`hidden`,element$3.style.height=``;let{height}=getComputedStyle(element$3);return element$3.style.width=initialStyle.width,element$3.style.position=initialStyle.position,element$3.style.visibility=initialStyle.visibility,element$3.style.height=closed,element$3.style.overflow=`hidden`,initialStyle.height&&initialStyle.height!==closed?initialStyle.height:height}function animateTransition(element$3,initialStyle,done,keyframes$3,options$1){let animation=element$3.animate(keyframes$3,options$1);element$3.style.height=initialStyle.height,animation.onfinish=()=>{element$3.style.overflow=initialStyle.overflow,done()}}function getEnterKeyframes(height,initialStyle){return[{height:closed,opacity:props.opacityClosed,paddingTop:closed,paddingBottom:closed,borderTopWidth:closed,borderBottomWidth:closed,marginTop:closed,marginBottom:closed},{height,opacity:props.opacityOpened,paddingTop:initialStyle.paddingTop,paddingBottom:initialStyle.paddingBottom,borderTopWidth:initialStyle.borderTopWidth,borderBottomWidth:initialStyle.borderBottomWidth,marginTop:initialStyle.marginTop,marginBottom:initialStyle.marginBottom}]}function enterTransition(element$3,done){let HTMLElement$1=element$3,initialStyle=getElementStyle(HTMLElement$1),height=prepareElement(HTMLElement$1,initialStyle),keyframes$3=getEnterKeyframes(height,initialStyle),options$1={duration:props.duration,easing:props.easingEnter};animateTransition(HTMLElement$1,initialStyle,done,keyframes$3,options$1)}function leaveTransition(element$3,done){let HTMLElement$1=element$3,initialStyle=getElementStyle(HTMLElement$1),{height}=getComputedStyle(HTMLElement$1);HTMLElement$1.style.height=height,HTMLElement$1.style.overflow=`hidden`;let keyframes$3=getEnterKeyframes(height,initialStyle).reverse(),options$1={duration:props.duration,easing:props.easingLeave};animateTransition(HTMLElement$1,initialStyle,done,keyframes$3,options$1)}return(_ctx,_cache$1)=>(openBlock(),createBlock(Transition,{css:!1,onEnter:enterTransition,onLeave:leaveTransition},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3}))}}),TransitionVertical_default=TransitionVertical_vue_vue_type_script_setup_true_lang_default;const sides=[`top`,`right`,`bottom`,`left`],alignments=[`start`,`end`],placements=sides.reduce((acc,side)=>acc.concat(side,side+`-`+alignments[0],side+`-`+alignments[1]),[]),min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=v$2=>({x:v$2,y:v$2}),oppositeSideMap={left:`right`,right:`left`,bottom:`top`,top:`bottom`},oppositeAlignmentMap={start:`end`,end:`start`};function clamp(start,value$1,end){return max(start,min(value$1,end))}function evaluate(value$1,param){return typeof value$1==`function`?value$1(param):value$1}function getSide(placement){return placement.split(`-`)[0]}function getAlignment(placement){return placement.split(`-`)[1]}function getOppositeAxis(axis){return axis===`x`?`y`:`x`}function getAxisLength(axis){return axis===`y`?`height`:`width`}function getSideAxis(placement){return[`top`,`bottom`].includes(getSide(placement))?`y`:`x`}function getAlignmentAxis(placement){return getOppositeAxis(getSideAxis(placement))}function getAlignmentSides(placement,rects,rtl){rtl===void 0&&(rtl=!1);let alignment=getAlignment(placement),alignmentAxis=getAlignmentAxis(placement),length=getAxisLength(alignmentAxis),mainAlignmentSide=alignmentAxis===`x`?alignment===(rtl?`end`:`start`)?`right`:`left`:alignment===`start`?`bottom`:`top`;return rects.reference[length]>rects.floating[length]&&(mainAlignmentSide=getOppositePlacement(mainAlignmentSide)),[mainAlignmentSide,getOppositePlacement(mainAlignmentSide)]}function getExpandedPlacements(placement){let oppositePlacement=getOppositePlacement(placement);return[getOppositeAlignmentPlacement(placement),oppositePlacement,getOppositeAlignmentPlacement(oppositePlacement)]}function getOppositeAlignmentPlacement(placement){return placement.replace(/start|end/g,alignment=>oppositeAlignmentMap[alignment])}function getSideList(side,isStart,rtl){let lr$1=[`left`,`right`],rl$1=[`right`,`left`],tb=[`top`,`bottom`],bt$4=[`bottom`,`top`];switch(side){case`top`:case`bottom`:return rtl?isStart?rl$1:lr$1:isStart?lr$1:rl$1;case`left`:case`right`:return isStart?tb:bt$4;default:return[]}}function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){let alignment=getAlignment(placement),list$2=getSideList(getSide(placement),direction===`start`,rtl);return alignment&&(list$2=list$2.map(side=>side+`-`+alignment),flipAlignment&&(list$2=list$2.concat(list$2.map(getOppositeAlignmentPlacement)))),list$2}function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,side=>oppositeSideMap[side])}function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}function getPaddingObject(padding){return typeof padding==`number`?{top:padding,right:padding,bottom:padding,left:padding}:expandPaddingObject(padding)}function rectToClientRect(rect){let{x:x$3,y:y$3,width,height}=rect;return{width,height,top:y$3,left:x$3,right:x$3+width,bottom:y$3+height,x:x$3,y:y$3}}function computeCoordsFromPlacement(_ref,placement,rtl){let{reference,floating}=_ref,sideAxis=getSideAxis(placement),alignmentAxis=getAlignmentAxis(placement),alignLength=getAxisLength(alignmentAxis),side=getSide(placement),isVertical=sideAxis===`y`,commonX=reference.x+reference.width/2-floating.width/2,commonY=reference.y+reference.height/2-floating.height/2,commonAlign=reference[alignLength]/2-floating[alignLength]/2,coords$1;switch(side){case`top`:coords$1={x:commonX,y:reference.y-floating.height};break;case`bottom`:coords$1={x:commonX,y:reference.y+reference.height};break;case`right`:coords$1={x:reference.x+reference.width,y:commonY};break;case`left`:coords$1={x:reference.x-floating.width,y:commonY};break;default:coords$1={x:reference.x,y:reference.y}}switch(getAlignment(placement)){case`start`:coords$1[alignmentAxis]-=commonAlign*(rtl&&isVertical?-1:1);break;case`end`:coords$1[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1);break}return coords$1}const computePosition=async(reference,floating,config)=>{let{placement=`bottom`,strategy=`absolute`,middleware=[],platform:platform$1}=config,validMiddleware=middleware.filter(Boolean),rtl=await(platform$1.isRTL==null?void 0:platform$1.isRTL(floating)),rects=await platform$1.getElementRects({reference,floating,strategy}),{x:x$3,y:y$3}=computeCoordsFromPlacement(rects,placement,rtl),statefulPlacement=placement,middlewareData={},resetCount=0;for(let i$1=0;i$1({name:`arrow`,options:options$1,async fn(state){let{x:x$3,y:y$3,placement,rects,platform:platform$1,elements,middlewareData}=state,{element:element$3,padding=0}=evaluate(options$1,state)||{};if(element$3==null)return{};let paddingObject=getPaddingObject(padding),coords$1={x:x$3,y:y$3},axis=getAlignmentAxis(placement),length=getAxisLength(axis),arrowDimensions=await platform$1.getDimensions(element$3),isYAxis=axis===`y`,minProp=isYAxis?`top`:`left`,maxProp=isYAxis?`bottom`:`right`,clientProp=isYAxis?`clientHeight`:`clientWidth`,endDiff=rects.reference[length]+rects.reference[axis]-coords$1[axis]-rects.floating[length],startDiff=coords$1[axis]-rects.reference[axis],arrowOffsetParent=await(platform$1.getOffsetParent==null?void 0:platform$1.getOffsetParent(element$3)),clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;(!clientSize||!await(platform$1.isElement==null?void 0:platform$1.isElement(arrowOffsetParent)))&&(clientSize=elements.floating[clientProp]||rects.floating[length]);let centerToReference=endDiff/2-startDiff/2,largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1,minPadding=min(paddingObject[minProp],largestPossiblePadding),maxPadding=min(paddingObject[maxProp],largestPossiblePadding),min$1=minPadding,max$1=clientSize-arrowDimensions[length]-maxPadding,center=clientSize/2-arrowDimensions[length]/2+centerToReference,offset$2=clamp(min$1,center,max$1),shouldAddOffset=!middlewareData.arrow&&getAlignment(placement)!=null&¢er!==offset$2&&rects.reference[length]/2-(centergetAlignment(placement)===alignment),...allowedPlacements.filter(placement=>getAlignment(placement)!==alignment)]:allowedPlacements.filter(placement=>getSide(placement)===placement);return allowedPlacementsSortedByAlignment.filter(placement=>alignment?getAlignment(placement)===alignment||(autoAlignment?getOppositeAlignmentPlacement(placement)!==placement:!1):!0)}const autoPlacement=function(options$1){return options$1===void 0&&(options$1={}),{name:`autoPlacement`,options:options$1,async fn(state){var _middlewareData$autoP,_middlewareData$autoP2,_placementsThatFitOnE;let{rects,middlewareData,placement,platform:platform$1,elements}=state,{crossAxis=!1,alignment,allowedPlacements=placements,autoAlignment=!0,...detectOverflowOptions}=evaluate(options$1,state),placements$1=alignment!==void 0||allowedPlacements===placements?getPlacementList(alignment||null,autoAlignment,allowedPlacements):allowedPlacements,overflow=await detectOverflow(state,detectOverflowOptions),currentIndex=(_middlewareData$autoP=middlewareData.autoPlacement)?.index||0,currentPlacement=placements$1[currentIndex];if(currentPlacement==null)return{};let alignmentSides=getAlignmentSides(currentPlacement,rects,await(platform$1.isRTL==null?void 0:platform$1.isRTL(elements.floating)));if(placement!==currentPlacement)return{reset:{placement:placements$1[0]}};let currentOverflows=[overflow[getSide(currentPlacement)],overflow[alignmentSides[0]],overflow[alignmentSides[1]]],allOverflows=[...(_middlewareData$autoP2=middlewareData.autoPlacement)?.overflows||[],{placement:currentPlacement,overflows:currentOverflows}],nextPlacement=placements$1[currentIndex+1];if(nextPlacement)return{data:{index:currentIndex+1,overflows:allOverflows},reset:{placement:nextPlacement}};let placementsSortedByMostSpace=allOverflows.map(d$2=>{let alignment$1=getAlignment(d$2.placement);return[d$2.placement,alignment$1&&crossAxis?d$2.overflows.slice(0,2).reduce((acc,v$2)=>acc+v$2,0):d$2.overflows[0],d$2.overflows]}).sort((a$2,b$4)=>a$2[1]-b$4[1]),placementsThatFitOnEachSide=placementsSortedByMostSpace.filter(d$2=>d$2[2].slice(0,getAlignment(d$2[0])?2:3).every(v$2=>v$2<=0)),resetPlacement=(_placementsThatFitOnE=placementsThatFitOnEachSide[0])?.[0]||placementsSortedByMostSpace[0][0];return resetPlacement===placement?{}:{data:{index:currentIndex+1,overflows:allOverflows},reset:{placement:resetPlacement}}}}},flip$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`flip`,options:options$1,async fn(state){var _middlewareData$arrow,_middlewareData$flip;let{placement,middlewareData,rects,initialPlacement,platform:platform$1,elements}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0,fallbackPlacements:specifiedFallbackPlacements,fallbackStrategy=`bestFit`,fallbackAxisSideDirection=`none`,flipAlignment=!0,...detectOverflowOptions}=evaluate(options$1,state);if((_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset)return{};let side=getSide(placement),initialSideAxis=getSideAxis(initialPlacement),isBasePlacement=getSide(initialPlacement)===initialPlacement,rtl=await(platform$1.isRTL==null?void 0:platform$1.isRTL(elements.floating)),fallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipAlignment?[getOppositePlacement(initialPlacement)]:getExpandedPlacements(initialPlacement)),hasFallbackAxisSideDirection=fallbackAxisSideDirection!==`none`;!specifiedFallbackPlacements&&hasFallbackAxisSideDirection&&fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement,flipAlignment,fallbackAxisSideDirection,rtl));let placements$1=[initialPlacement,...fallbackPlacements],overflow=await detectOverflow(state,detectOverflowOptions),overflows=[],overflowsData=(_middlewareData$flip=middlewareData.flip)?.overflows||[];if(checkMainAxis&&overflows.push(overflow[side]),checkCrossAxis){let sides$1=getAlignmentSides(placement,rects,rtl);overflows.push(overflow[sides$1[0]],overflow[sides$1[1]])}if(overflowsData=[...overflowsData,{placement,overflows}],!overflows.every(side$1=>side$1<=0)){var _middlewareData$flip2,_overflowsData$filter;let nextIndex=((_middlewareData$flip2=middlewareData.flip)?.index||0)+1,nextPlacement=placements$1[nextIndex];if(nextPlacement)return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}};let resetPlacement=(_overflowsData$filter=overflowsData.filter(d$2=>d$2.overflows[0]<=0).sort((a$2,b$4)=>a$2.overflows[1]-b$4.overflows[1])[0])?.placement;if(!resetPlacement)switch(fallbackStrategy){case`bestFit`:{var _overflowsData$filter2;let placement$1=(_overflowsData$filter2=overflowsData.filter(d$2=>{if(hasFallbackAxisSideDirection){let currentSideAxis=getSideAxis(d$2.placement);return currentSideAxis===initialSideAxis||currentSideAxis===`y`}return!0}).map(d$2=>[d$2.placement,d$2.overflows.filter(overflow$1=>overflow$1>0).reduce((acc,overflow$1)=>acc+overflow$1,0)]).sort((a$2,b$4)=>a$2[1]-b$4[1])[0])?.[0];placement$1&&(resetPlacement=placement$1);break}case`initialPlacement`:resetPlacement=initialPlacement;break}if(placement!==resetPlacement)return{reset:{placement:resetPlacement}}}return{}}}};function getSideOffsets(overflow,rect){return{top:overflow.top-rect.height,right:overflow.right-rect.width,bottom:overflow.bottom-rect.height,left:overflow.left-rect.width}}function isAnySideFullyClipped(overflow){return sides.some(side=>overflow[side]>=0)}const hide$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`hide`,options:options$1,async fn(state){let{rects}=state,{strategy=`referenceHidden`,...detectOverflowOptions}=evaluate(options$1,state);switch(strategy){case`referenceHidden`:{let overflow=await detectOverflow(state,{...detectOverflowOptions,elementContext:`reference`}),offsets=getSideOffsets(overflow,rects.reference);return{data:{referenceHiddenOffsets:offsets,referenceHidden:isAnySideFullyClipped(offsets)}}}case`escaped`:{let overflow=await detectOverflow(state,{...detectOverflowOptions,altBoundary:!0}),offsets=getSideOffsets(overflow,rects.floating);return{data:{escapedOffsets:offsets,escaped:isAnySideFullyClipped(offsets)}}}default:return{}}}}};async function convertValueToCoords(state,options$1){let{placement,platform:platform$1,elements}=state,rtl=await(platform$1.isRTL==null?void 0:platform$1.isRTL(elements.floating)),side=getSide(placement),alignment=getAlignment(placement),isVertical=getSideAxis(placement)===`y`,mainAxisMulti=[`left`,`top`].includes(side)?-1:1,crossAxisMulti=rtl&&isVertical?-1:1,rawValue=evaluate(options$1,state),{mainAxis,crossAxis,alignmentAxis}=typeof rawValue==`number`?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:rawValue.mainAxis||0,crossAxis:rawValue.crossAxis||0,alignmentAxis:rawValue.alignmentAxis};return alignment&&typeof alignmentAxis==`number`&&(crossAxis=alignment===`end`?alignmentAxis*-1:alignmentAxis),isVertical?{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}const offset$1=function(options$1){return options$1===void 0&&(options$1=0),{name:`offset`,options:options$1,async fn(state){var _middlewareData$offse,_middlewareData$arrow;let{x:x$3,y:y$3,placement,middlewareData}=state,diffCoords=await convertValueToCoords(state,options$1);return placement===(_middlewareData$offse=middlewareData.offset)?.placement&&(_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset?{}:{x:x$3+diffCoords.x,y:y$3+diffCoords.y,data:{...diffCoords,placement}}}}},shift$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`shift`,options:options$1,async fn(state){let{x:x$3,y:y$3,placement}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!1,limiter={fn:_ref=>{let{x:x$4,y:y$4}=_ref;return{x:x$4,y:y$4}}},...detectOverflowOptions}=evaluate(options$1,state),coords$1={x:x$3,y:y$3},overflow=await detectOverflow(state,detectOverflowOptions),crossAxis=getSideAxis(getSide(placement)),mainAxis=getOppositeAxis(crossAxis),mainAxisCoord=coords$1[mainAxis],crossAxisCoord=coords$1[crossAxis];if(checkMainAxis){let minSide=mainAxis===`y`?`top`:`left`,maxSide=mainAxis===`y`?`bottom`:`right`,min$1=mainAxisCoord+overflow[minSide],max$1=mainAxisCoord-overflow[maxSide];mainAxisCoord=clamp(min$1,mainAxisCoord,max$1)}if(checkCrossAxis){let minSide=crossAxis===`y`?`top`:`left`,maxSide=crossAxis===`y`?`bottom`:`right`,min$1=crossAxisCoord+overflow[minSide],max$1=crossAxisCoord-overflow[maxSide];crossAxisCoord=clamp(min$1,crossAxisCoord,max$1)}let limitedCoords=limiter.fn({...state,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords.x-x$3,y:limitedCoords.y-y$3,enabled:{[mainAxis]:checkMainAxis,[crossAxis]:checkCrossAxis}}}}}},limitShift$1=function(options$1){return options$1===void 0&&(options$1={}),{options:options$1,fn(state){let{x:x$3,y:y$3,placement,rects,middlewareData}=state,{offset:offset$2=0,mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0}=evaluate(options$1,state),coords$1={x:x$3,y:y$3},crossAxis=getSideAxis(placement),mainAxis=getOppositeAxis(crossAxis),mainAxisCoord=coords$1[mainAxis],crossAxisCoord=coords$1[crossAxis],rawOffset=evaluate(offset$2,state),computedOffset=typeof rawOffset==`number`?{mainAxis:rawOffset,crossAxis:0}:{mainAxis:0,crossAxis:0,...rawOffset};if(checkMainAxis){let len=mainAxis===`y`?`height`:`width`,limitMin=rects.reference[mainAxis]-rects.floating[len]+computedOffset.mainAxis,limitMax=rects.reference[mainAxis]+rects.reference[len]-computedOffset.mainAxis;mainAxisCoordlimitMax&&(mainAxisCoord=limitMax)}if(checkCrossAxis){var _middlewareData$offse,_middlewareData$offse2;let len=mainAxis===`y`?`width`:`height`,isOriginSide=[`top`,`left`].includes(getSide(placement)),limitMin=rects.reference[crossAxis]-rects.floating[len]+(isOriginSide&&(_middlewareData$offse=middlewareData.offset)?.[crossAxis]||0)+(isOriginSide?0:computedOffset.crossAxis),limitMax=rects.reference[crossAxis]+rects.reference[len]+(isOriginSide?0:(_middlewareData$offse2=middlewareData.offset)?.[crossAxis]||0)-(isOriginSide?computedOffset.crossAxis:0);crossAxisCoordlimitMax&&(crossAxisCoord=limitMax)}return{[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord}}}},size$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`size`,options:options$1,async fn(state){var _state$middlewareData,_state$middlewareData2;let{placement,rects,platform:platform$1,elements}=state,{apply:apply$2=()=>{},...detectOverflowOptions}=evaluate(options$1,state),overflow=await detectOverflow(state,detectOverflowOptions),side=getSide(placement),alignment=getAlignment(placement),isYAxis=getSideAxis(placement)===`y`,{width,height}=rects.floating,heightSide,widthSide;side===`top`||side===`bottom`?(heightSide=side,widthSide=alignment===(await(platform$1.isRTL==null?void 0:platform$1.isRTL(elements.floating))?`start`:`end`)?`left`:`right`):(widthSide=side,heightSide=alignment===`end`?`top`:`bottom`);let maximumClippingHeight=height-overflow.top-overflow.bottom,maximumClippingWidth=width-overflow.left-overflow.right,overflowAvailableHeight=min(height-overflow[heightSide],maximumClippingHeight),overflowAvailableWidth=min(width-overflow[widthSide],maximumClippingWidth),noShift=!state.middlewareData.shift,availableHeight=overflowAvailableHeight,availableWidth=overflowAvailableWidth;if((_state$middlewareData=state.middlewareData.shift)!=null&&_state$middlewareData.enabled.x&&(availableWidth=maximumClippingWidth),(_state$middlewareData2=state.middlewareData.shift)!=null&&_state$middlewareData2.enabled.y&&(availableHeight=maximumClippingHeight),noShift&&!alignment){let xMin=max(overflow.left,0),xMax=max(overflow.right,0),yMin=max(overflow.top,0),yMax=max(overflow.bottom,0);isYAxis?availableWidth=width-2*(xMin!==0||xMax!==0?xMin+xMax:max(overflow.left,overflow.right)):availableHeight=height-2*(yMin!==0||yMax!==0?yMin+yMax:max(overflow.top,overflow.bottom))}await apply$2({...state,availableWidth,availableHeight});let nextDimensions=await platform$1.getDimensions(elements.floating);return width!==nextDimensions.width||height!==nextDimensions.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<`u`}function getNodeName(node$1){return isNode(node$1)?(node$1.nodeName||``).toLowerCase():`#document`}function getWindow(node$1){var _node$ownerDocument;return(node$1==null||(_node$ownerDocument=node$1.ownerDocument)==null?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node$1){var _ref;return(_ref=(isNode(node$1)?node$1.ownerDocument:node$1.document)||window.document)?.documentElement}function isNode(value$1){return hasWindow()?value$1 instanceof Node||value$1 instanceof getWindow(value$1).Node:!1}function isElement(value$1){return hasWindow()?value$1 instanceof Element||value$1 instanceof getWindow(value$1).Element:!1}function isHTMLElement(value$1){return hasWindow()?value$1 instanceof HTMLElement||value$1 instanceof getWindow(value$1).HTMLElement:!1}function isShadowRoot(value$1){return!hasWindow()||typeof ShadowRoot>`u`?!1:value$1 instanceof ShadowRoot||value$1 instanceof getWindow(value$1).ShadowRoot}function isOverflowElement(element$3){let{overflow,overflowX,overflowY,display}=getComputedStyle$1(element$3);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&![`inline`,`contents`].includes(display)}function isTableElement(element$3){return[`table`,`td`,`th`].includes(getNodeName(element$3))}function isTopLayer(element$3){return[`:popover-open`,`:modal`].some(selector=>{try{return element$3.matches(selector)}catch{return!1}})}function isContainingBlock(elementOrCss){let webkit=isWebKit(),css=isElement(elementOrCss)?getComputedStyle$1(elementOrCss):elementOrCss;return[`transform`,`translate`,`scale`,`rotate`,`perspective`].some(value$1=>css[value$1]?css[value$1]!==`none`:!1)||(css.containerType?css.containerType!==`normal`:!1)||!webkit&&(css.backdropFilter?css.backdropFilter!==`none`:!1)||!webkit&&(css.filter?css.filter!==`none`:!1)||[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`].some(value$1=>(css.willChange||``).includes(value$1))||[`paint`,`layout`,`strict`,`content`].some(value$1=>(css.contain||``).includes(value$1))}function getContainingBlock(element$3){let currentNode=getParentNode(element$3);for(;isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode);){if(isContainingBlock(currentNode))return currentNode;if(isTopLayer(currentNode))return null;currentNode=getParentNode(currentNode)}return null}function isWebKit(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}function isLastTraversableNode(node$1){return[`html`,`body`,`#document`].includes(getNodeName(node$1))}function getComputedStyle$1(element$3){return getWindow(element$3).getComputedStyle(element$3)}function getNodeScroll(element$3){return isElement(element$3)?{scrollLeft:element$3.scrollLeft,scrollTop:element$3.scrollTop}:{scrollLeft:element$3.scrollX,scrollTop:element$3.scrollY}}function getParentNode(node$1){if(getNodeName(node$1)===`html`)return node$1;let result=node$1.assignedSlot||node$1.parentNode||isShadowRoot(node$1)&&node$1.host||getDocumentElement(node$1);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node$1){let parentNode=getParentNode(node$1);return isLastTraversableNode(parentNode)?node$1.ownerDocument?node$1.ownerDocument.body:node$1.body:isHTMLElement(parentNode)&&isOverflowElement(parentNode)?parentNode:getNearestOverflowAncestor(parentNode)}function getOverflowAncestors(node$1,list$2,traverseIframes){var _node$ownerDocument2;list$2===void 0&&(list$2=[]),traverseIframes===void 0&&(traverseIframes=!0);let scrollableAncestor=getNearestOverflowAncestor(node$1),isBody=scrollableAncestor===(_node$ownerDocument2=node$1.ownerDocument)?.body,win=getWindow(scrollableAncestor);if(isBody){let frameElement=getFrameElement(win);return list$2.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],frameElement&&traverseIframes?getOverflowAncestors(frameElement):[])}return list$2.concat(scrollableAncestor,getOverflowAncestors(scrollableAncestor,[],traverseIframes))}function getFrameElement(win){return win.parent&&Object.getPrototypeOf(win.parent)?win.frameElement:null}function getCssDimensions(element$3){let css=getComputedStyle$1(element$3),width=parseFloat(css.width)||0,height=parseFloat(css.height)||0,hasOffset=isHTMLElement(element$3),offsetWidth=hasOffset?element$3.offsetWidth:width,offsetHeight=hasOffset?element$3.offsetHeight:height,shouldFallback=round(width)!==offsetWidth||round(height)!==offsetHeight;return shouldFallback&&(width=offsetWidth,height=offsetHeight),{width,height,$:shouldFallback}}function unwrapElement$1(element$3){return isElement(element$3)?element$3:element$3.contextElement}function getScale(element$3){let domElement=unwrapElement$1(element$3);if(!isHTMLElement(domElement))return createCoords(1);let rect=domElement.getBoundingClientRect(),{width,height,$:$$2}=getCssDimensions(domElement),x$3=($$2?round(rect.width):rect.width)/width,y$3=($$2?round(rect.height):rect.height)/height;return(!x$3||!Number.isFinite(x$3))&&(x$3=1),(!y$3||!Number.isFinite(y$3))&&(y$3=1),{x:x$3,y:y$3}}const noOffsets=createCoords(0);function getVisualOffsets(element$3){let win=getWindow(element$3);return!isWebKit()||!win.visualViewport?noOffsets:{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}}function shouldAddVisualOffsets(element$3,isFixed,floatingOffsetParent){return isFixed===void 0&&(isFixed=!1),!floatingOffsetParent||isFixed&&floatingOffsetParent!==getWindow(element$3)?!1:isFixed}function getBoundingClientRect(element$3,includeScale,isFixedStrategy,offsetParent){includeScale===void 0&&(includeScale=!1),isFixedStrategy===void 0&&(isFixedStrategy=!1);let clientRect=element$3.getBoundingClientRect(),domElement=unwrapElement$1(element$3),scale$1=createCoords(1);includeScale&&(offsetParent?isElement(offsetParent)&&(scale$1=getScale(offsetParent)):scale$1=getScale(element$3));let visualOffsets=shouldAddVisualOffsets(domElement,isFixedStrategy,offsetParent)?getVisualOffsets(domElement):createCoords(0),x$3=(clientRect.left+visualOffsets.x)/scale$1.x,y$3=(clientRect.top+visualOffsets.y)/scale$1.y,width=clientRect.width/scale$1.x,height=clientRect.height/scale$1.y;if(domElement){let win=getWindow(domElement),offsetWin=offsetParent&&isElement(offsetParent)?getWindow(offsetParent):offsetParent,currentWin=win,currentIFrame=getFrameElement(currentWin);for(;currentIFrame&&offsetParent&&offsetWin!==currentWin;){let iframeScale=getScale(currentIFrame),iframeRect=currentIFrame.getBoundingClientRect(),css=getComputedStyle$1(currentIFrame),left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css.paddingLeft))*iframeScale.x,top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css.paddingTop))*iframeScale.y;x$3*=iframeScale.x,y$3*=iframeScale.y,width*=iframeScale.x,height*=iframeScale.y,x$3+=left,y$3+=top,currentWin=getWindow(currentIFrame),currentIFrame=getFrameElement(currentWin)}}return rectToClientRect({width,height,x:x$3,y:y$3})}function getWindowScrollBarX(element$3,rect){let leftScroll=getNodeScroll(element$3).scrollLeft;return rect?rect.left+leftScroll:getBoundingClientRect(getDocumentElement(element$3)).left+leftScroll}function getHTMLOffset(documentElement,scroll,ignoreScrollbarX){ignoreScrollbarX===void 0&&(ignoreScrollbarX=!1);let htmlRect=documentElement.getBoundingClientRect(),x$3=htmlRect.left+scroll.scrollLeft-(ignoreScrollbarX?0:getWindowScrollBarX(documentElement,htmlRect)),y$3=htmlRect.top+scroll.scrollTop;return{x:x$3,y:y$3}}function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){let{elements,rect,offsetParent,strategy}=_ref,isFixed=strategy===`fixed`,documentElement=getDocumentElement(offsetParent),topLayer=elements?isTopLayer(elements.floating):!1;if(offsetParent===documentElement||topLayer&&isFixed)return rect;let scroll={scrollLeft:0,scrollTop:0},scale$1=createCoords(1),offsets=createCoords(0),isOffsetParentAnElement=isHTMLElement(offsetParent);if((isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&((getNodeName(offsetParent)!==`body`||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isHTMLElement(offsetParent))){let offsetRect=getBoundingClientRect(offsetParent);scale$1=getScale(offsetParent),offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}let htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll,!0):createCoords(0);return{width:rect.width*scale$1.x,height:rect.height*scale$1.y,x:rect.x*scale$1.x-scroll.scrollLeft*scale$1.x+offsets.x+htmlOffset.x,y:rect.y*scale$1.y-scroll.scrollTop*scale$1.y+offsets.y+htmlOffset.y}}function getClientRects(element$3){return Array.from(element$3.getClientRects())}function getDocumentRect(element$3){let html$5=getDocumentElement(element$3),scroll=getNodeScroll(element$3),body$2=element$3.ownerDocument.body,width=max(html$5.scrollWidth,html$5.clientWidth,body$2.scrollWidth,body$2.clientWidth),height=max(html$5.scrollHeight,html$5.clientHeight,body$2.scrollHeight,body$2.clientHeight),x$3=-scroll.scrollLeft+getWindowScrollBarX(element$3),y$3=-scroll.scrollTop;return getComputedStyle$1(body$2).direction===`rtl`&&(x$3+=max(html$5.clientWidth,body$2.clientWidth)-width),{width,height,x:x$3,y:y$3}}function getViewportRect(element$3,strategy){let win=getWindow(element$3),html$5=getDocumentElement(element$3),visualViewport=win.visualViewport,width=html$5.clientWidth,height=html$5.clientHeight,x$3=0,y$3=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;let visualViewportBased=isWebKit();(!visualViewportBased||visualViewportBased&&strategy===`fixed`)&&(x$3=visualViewport.offsetLeft,y$3=visualViewport.offsetTop)}return{width,height,x:x$3,y:y$3}}function getInnerBoundingClientRect(element$3,strategy){let clientRect=getBoundingClientRect(element$3,!0,strategy===`fixed`),top=clientRect.top+element$3.clientTop,left=clientRect.left+element$3.clientLeft,scale$1=isHTMLElement(element$3)?getScale(element$3):createCoords(1),width=element$3.clientWidth*scale$1.x,height=element$3.clientHeight*scale$1.y,x$3=left*scale$1.x,y$3=top*scale$1.y;return{width,height,x:x$3,y:y$3}}function getClientRectFromClippingAncestor(element$3,clippingAncestor,strategy){let rect;if(clippingAncestor===`viewport`)rect=getViewportRect(element$3,strategy);else if(clippingAncestor===`document`)rect=getDocumentRect(getDocumentElement(element$3));else if(isElement(clippingAncestor))rect=getInnerBoundingClientRect(clippingAncestor,strategy);else{let visualOffsets=getVisualOffsets(element$3);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.y-visualOffsets.y,width:clippingAncestor.width,height:clippingAncestor.height}}return rectToClientRect(rect)}function hasFixedPositionAncestor(element$3,stopNode){let parentNode=getParentNode(element$3);return parentNode===stopNode||!isElement(parentNode)||isLastTraversableNode(parentNode)?!1:getComputedStyle$1(parentNode).position===`fixed`||hasFixedPositionAncestor(parentNode,stopNode)}function getClippingElementAncestors(element$3,cache$1){let cachedResult=cache$1.get(element$3);if(cachedResult)return cachedResult;let result=getOverflowAncestors(element$3,[],!1).filter(el$1=>isElement(el$1)&&getNodeName(el$1)!==`body`),currentContainingBlockComputedStyle=null,elementIsFixed=getComputedStyle$1(element$3).position===`fixed`,currentNode=elementIsFixed?getParentNode(element$3):element$3;for(;isElement(currentNode)&&!isLastTraversableNode(currentNode);){let computedStyle=getComputedStyle$1(currentNode),currentNodeIsContaining=isContainingBlock(currentNode);!currentNodeIsContaining&&computedStyle.position===`fixed`&&(currentContainingBlockComputedStyle=null);let shouldDropCurrentNode=elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&computedStyle.position===`static`&&!!currentContainingBlockComputedStyle&&[`absolute`,`fixed`].includes(currentContainingBlockComputedStyle.position)||isOverflowElement(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element$3,currentNode);shouldDropCurrentNode?result=result.filter(ancestor=>ancestor!==currentNode):currentContainingBlockComputedStyle=computedStyle,currentNode=getParentNode(currentNode)}return cache$1.set(element$3,result),result}function getClippingRect(_ref){let{element:element$3,boundary,rootBoundary,strategy}=_ref,elementClippingAncestors=boundary===`clippingAncestors`?isTopLayer(element$3)?[]:getClippingElementAncestors(element$3,this._c):[].concat(boundary),clippingAncestors=[...elementClippingAncestors,rootBoundary],firstClippingAncestor=clippingAncestors[0],clippingRect=clippingAncestors.reduce((accRect,clippingAncestor)=>{let rect=getClientRectFromClippingAncestor(element$3,clippingAncestor,strategy);return accRect.top=max(rect.top,accRect.top),accRect.right=min(rect.right,accRect.right),accRect.bottom=min(rect.bottom,accRect.bottom),accRect.left=max(rect.left,accRect.left),accRect},getClientRectFromClippingAncestor(element$3,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}}function getDimensions(element$3){let{width,height}=getCssDimensions(element$3);return{width,height}}function getRectRelativeToOffsetParent(element$3,offsetParent,strategy){let isOffsetParentAnElement=isHTMLElement(offsetParent),documentElement=getDocumentElement(offsetParent),isFixed=strategy===`fixed`,rect=getBoundingClientRect(element$3,!0,isFixed,offsetParent),scroll={scrollLeft:0,scrollTop:0},offsets=createCoords(0);if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)if((getNodeName(offsetParent)!==`body`||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isOffsetParentAnElement){let offsetRect=getBoundingClientRect(offsetParent,!0,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}else documentElement&&(offsets.x=getWindowScrollBarX(documentElement));let htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll):createCoords(0),x$3=rect.left+scroll.scrollLeft-offsets.x-htmlOffset.x,y$3=rect.top+scroll.scrollTop-offsets.y-htmlOffset.y;return{x:x$3,y:y$3,width:rect.width,height:rect.height}}function isStaticPositioned(element$3){return getComputedStyle$1(element$3).position===`static`}function getTrueOffsetParent(element$3,polyfill){if(!isHTMLElement(element$3)||getComputedStyle$1(element$3).position===`fixed`)return null;if(polyfill)return polyfill(element$3);let rawOffsetParent=element$3.offsetParent;return getDocumentElement(element$3)===rawOffsetParent&&(rawOffsetParent=rawOffsetParent.ownerDocument.body),rawOffsetParent}function getOffsetParent(element$3,polyfill){let win=getWindow(element$3);if(isTopLayer(element$3))return win;if(!isHTMLElement(element$3)){let svgOffsetParent=getParentNode(element$3);for(;svgOffsetParent&&!isLastTraversableNode(svgOffsetParent);){if(isElement(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent))return svgOffsetParent;svgOffsetParent=getParentNode(svgOffsetParent)}return win}let offsetParent=getTrueOffsetParent(element$3,polyfill);for(;offsetParent&&isTableElement(offsetParent)&&isStaticPositioned(offsetParent);)offsetParent=getTrueOffsetParent(offsetParent,polyfill);return offsetParent&&isLastTraversableNode(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)?win:offsetParent||getContainingBlock(element$3)||win}const getElementRects=async function(data$12){let getOffsetParentFn=this.getOffsetParent||getOffsetParent,getDimensionsFn=this.getDimensions,floatingDimensions=await getDimensionsFn(data$12.floating);return{reference:getRectRelativeToOffsetParent(data$12.reference,await getOffsetParentFn(data$12.floating),data$12.strategy),floating:{x:0,y:0,width:floatingDimensions.width,height:floatingDimensions.height}}};function isRTL(element$3){return getComputedStyle$1(element$3).direction===`rtl`}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(a$2,b$4){return a$2.x===b$4.x&&a$2.y===b$4.y&&a$2.width===b$4.width&&a$2.height===b$4.height}function observeMove(element$3,onMove){let io$2=null,timeoutId,root$3=getDocumentElement(element$3);function cleanup(){var _io;clearTimeout(timeoutId),(_io=io$2)==null||_io.disconnect(),io$2=null}function refresh(skip,threshold){skip===void 0&&(skip=!1),threshold===void 0&&(threshold=1),cleanup();let elementRectForRootMargin=element$3.getBoundingClientRect(),{left,top,width,height}=elementRectForRootMargin;if(skip||onMove(),!width||!height)return;let insetTop=floor(top),insetRight=floor(root$3.clientWidth-(left+width)),insetBottom=floor(root$3.clientHeight-(top+height)),insetLeft=floor(left),rootMargin=-insetTop+`px `+-insetRight+`px `+-insetBottom+`px `+-insetLeft+`px`,options$1={rootMargin,threshold:max(0,min(1,threshold))||1},isFirstUpdate=!0;function handleObserve(entries){let ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate)return refresh();ratio?refresh(!1,ratio):timeoutId=setTimeout(()=>{refresh(!1,1e-7)},1e3)}ratio===1&&!rectsAreEqual(elementRectForRootMargin,element$3.getBoundingClientRect())&&refresh(),isFirstUpdate=!1}try{io$2=new IntersectionObserver(handleObserve,{...options$1,root:root$3.ownerDocument})}catch{io$2=new IntersectionObserver(handleObserve,options$1)}io$2.observe(element$3)}return refresh(!0),cleanup}function autoUpdate(reference,floating,update,options$1){options$1===void 0&&(options$1={});let{ancestorScroll=!0,ancestorResize=!0,elementResize=typeof ResizeObserver==`function`,layoutShift=typeof IntersectionObserver==`function`,animationFrame=!1}=options$1,referenceEl=unwrapElement$1(reference),ancestors=ancestorScroll||ancestorResize?[...referenceEl?getOverflowAncestors(referenceEl):[],...getOverflowAncestors(floating)]:[];ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.addEventListener(`scroll`,update,{passive:!0}),ancestorResize&&ancestor.addEventListener(`resize`,update)});let cleanupIo=referenceEl&&layoutShift?observeMove(referenceEl,update):null,reobserveFrame=-1,resizeObserver=null;elementResize&&(resizeObserver=new ResizeObserver(_ref=>{let[firstEntry]=_ref;firstEntry&&firstEntry.target===referenceEl&&resizeObserver&&(resizeObserver.unobserve(floating),cancelAnimationFrame(reobserveFrame),reobserveFrame=requestAnimationFrame(()=>{var _resizeObserver;(_resizeObserver=resizeObserver)==null||_resizeObserver.observe(floating)})),update()}),referenceEl&&!animationFrame&&resizeObserver.observe(referenceEl),resizeObserver.observe(floating));let frameId,prevRefRect=animationFrame?getBoundingClientRect(reference):null;animationFrame&&frameLoop();function frameLoop(){let nextRefRect=getBoundingClientRect(reference);prevRefRect&&!rectsAreEqual(prevRefRect,nextRefRect)&&update(),prevRefRect=nextRefRect,frameId=requestAnimationFrame(frameLoop)}return update(),()=>{var _resizeObserver2;ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.removeEventListener(`scroll`,update),ancestorResize&&ancestor.removeEventListener(`resize`,update)}),cleanupIo?.(),(_resizeObserver2=resizeObserver)==null||_resizeObserver2.disconnect(),resizeObserver=null,animationFrame&&cancelAnimationFrame(frameId)}}const offset=offset$1,shift=shift$1,flip=flip$1,size=size$1,hide=hide$1,arrow$2=arrow$1,limitShift=limitShift$1,computePosition$1=(reference,floating,options$1)=>{let cache$1=new Map,mergedOptions={platform,...options$1},platformWithCache={...mergedOptions.platform,_c:cache$1};return computePosition(reference,floating,{...mergedOptions,platform:platformWithCache})};function isComponentPublicInstance(target$1){return typeof target$1==`object`&&!!target$1&&`$el`in target$1}function unwrapElement(target$1){if(isComponentPublicInstance(target$1)){let element$3=target$1.$el;return isNode(element$3)&&getNodeName(element$3)===`#comment`?null:element$3}return target$1}function toValue$2(source){return typeof source==`function`?source():unref(source)}function arrow(options$1){return{name:`arrow`,options:options$1,fn(args){let element$3=unwrapElement(toValue$2(options$1.element));return element$3==null?{}:arrow$2({element:element$3,padding:options$1.padding}).fn(args)}}}function getDPR(element$3){if(typeof window>`u`)return 1;let win=element$3.ownerDocument.defaultView||window;return win.devicePixelRatio||1}function roundByDPR(element$3,value$1){let dpr=getDPR(element$3);return Math.round(value$1*dpr)/dpr}function useFloating(reference,floating,options$1){options$1===void 0&&(options$1={});let whileElementsMountedOption=options$1.whileElementsMounted,openOption=computed(()=>{var _toValue;return(_toValue=toValue$2(options$1.open))??!0}),middlewareOption=computed(()=>toValue$2(options$1.middleware)),placementOption=computed(()=>{var _toValue2;return(_toValue2=toValue$2(options$1.placement))??`bottom`}),strategyOption=computed(()=>{var _toValue3;return(_toValue3=toValue$2(options$1.strategy))??`absolute`}),transformOption=computed(()=>{var _toValue4;return(_toValue4=toValue$2(options$1.transform))??!0}),referenceElement=computed(()=>unwrapElement(reference.value)),floatingElement=computed(()=>unwrapElement(floating.value)),x$3=ref(0),y$3=ref(0),strategy=ref(strategyOption.value),placement=ref(placementOption.value),middlewareData=shallowRef({}),isPositioned=ref(!1),floatingStyles=computed(()=>{let initialStyles={position:strategy.value,left:`0`,top:`0`};if(!floatingElement.value)return initialStyles;let xVal=roundByDPR(floatingElement.value,x$3.value),yVal=roundByDPR(floatingElement.value,y$3.value);return transformOption.value?{...initialStyles,transform:`translate(`+xVal+`px, `+yVal+`px)`,...getDPR(floatingElement.value)>=1.5&&{willChange:`transform`}}:{position:strategy.value,left:xVal+`px`,top:yVal+`px`}}),whileElementsMountedCleanup;function update(){if(referenceElement.value==null||floatingElement.value==null)return;let open$1=openOption.value;computePosition$1(referenceElement.value,floatingElement.value,{middleware:middlewareOption.value,placement:placementOption.value,strategy:strategyOption.value}).then(position$2=>{x$3.value=position$2.x,y$3.value=position$2.y,strategy.value=position$2.strategy,placement.value=position$2.placement,middlewareData.value=position$2.middlewareData,isPositioned.value=open$1!==!1})}function cleanup(){typeof whileElementsMountedCleanup==`function`&&(whileElementsMountedCleanup(),whileElementsMountedCleanup=void 0)}function attach(){if(cleanup(),whileElementsMountedOption===void 0){update();return}if(referenceElement.value!=null&&floatingElement.value!=null){whileElementsMountedCleanup=whileElementsMountedOption(referenceElement.value,floatingElement.value,update);return}}function reset(){openOption.value||(isPositioned.value=!1)}return watch([middlewareOption,placementOption,strategyOption,openOption],update,{flush:`sync`}),watch([referenceElement,floatingElement],attach,{flush:`sync`}),watch(openOption,reset,{flush:`sync`}),getCurrentScope()&&onScopeDispose(cleanup),{x:shallowReadonly(x$3),y:shallowReadonly(y$3),strategy:shallowReadonly(strategy),placement:shallowReadonly(placement),middlewareData:shallowReadonly(middlewareData),isPositioned:shallowReadonly(isPositioned),floatingStyles,update}}function renderSlotFragments(children){return children?children.flatMap(child=>child.type===Fragment?renderSlotFragments(child.children):[child]):[]}const Slot=defineComponent({name:`PrimitiveSlot`,inheritAttrs:!1,setup(_$2,{attrs,slots}){return()=>{if(!slots.default)return null;let children=renderSlotFragments(slots.default()),firstNonCommentChildrenIndex=children.findIndex(child=>child.type!==Comment);if(firstNonCommentChildrenIndex===-1)return children;let firstNonCommentChildren=children[firstNonCommentChildrenIndex];delete firstNonCommentChildren.props?.ref;let mergedProps=firstNonCommentChildren.props?mergeProps(attrs,firstNonCommentChildren.props):attrs,cloned=cloneVNode({...firstNonCommentChildren,props:{}},mergedProps);return children.length===1?cloned:(children[firstNonCommentChildrenIndex]=cloned,children)}}}),SELF_CLOSING_TAGS=[`area`,`img`,`input`],Primitive=defineComponent({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(props,{attrs,slots}){let asTag=props.asChild?`template`:props.as;return typeof asTag==`string`&&SELF_CLOSING_TAGS.includes(asTag)?()=>h(asTag,attrs):asTag===`template`?()=>h(Slot,attrs,{default:slots.default}):()=>h(props.as,attrs,{default:slots.default})}}),_sfc_main$18=defineComponent({__name:`VisuallyHidden`,props:{feature:{default:`focusable`},asChild:{type:Boolean},as:{default:`span`}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{as:_ctx.as,"as-child":_ctx.asChild,"aria-hidden":_ctx.feature===`focusable`?`true`:void 0,"data-hidden":_ctx.feature===`fully-hidden`?``:void 0,tabindex:_ctx.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:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}});function createContext(providerComponentName,contextName){let symbolDescription=typeof providerComponentName==`string`&&!contextName?`${providerComponentName}Context`:contextName,injectionKey=Symbol(symbolDescription),injectContext=fallback=>{let context$1=inject(injectionKey,fallback);if(context$1||context$1===null)return context$1;throw Error(`Injection \`${injectionKey.toString()}\` not found. Component must be used within ${Array.isArray(providerComponentName)?`one of the following components: ${providerComponentName.join(`, `)}`:`\`${providerComponentName}\``}`)},provideContext=contextValue=>(provide(injectionKey,contextValue),contextValue);return[injectContext,provideContext]}const[injectConfigProviderContext,provideConfigProviderContext]=createContext(`ConfigProvider`);function useForwardExpose(){let instance=getCurrentInstance(),currentRef=ref(),currentElement=computed(()=>[`#text`,`#comment`].includes(currentRef.value?.$el.nodeName)?currentRef.value?.$el.nextElementSibling:unrefElement(currentRef)),localExpose=Object.assign({},instance.exposed),ret={};for(let key$1 in instance.props)Object.defineProperty(ret,key$1,{enumerable:!0,configurable:!0,get:()=>instance.props[key$1]});if(Object.keys(localExpose).length>0)for(let key$1 in localExpose)Object.defineProperty(ret,key$1,{enumerable:!0,configurable:!0,get:()=>localExpose[key$1]});Object.defineProperty(ret,`$el`,{enumerable:!0,configurable:!0,get:()=>instance.vnode.el}),instance.exposed=ret;function forwardRef(ref2){currentRef.value=ref2,ref2&&(Object.defineProperty(ret,`$el`,{enumerable:!0,configurable:!0,get:()=>ref2 instanceof Element?ref2:ref2.$el}),instance.exposed=ret)}return{forwardRef,currentRef,currentElement}}let count=0;function useId(deterministicId,prefix=`reka`){if(deterministicId)return deterministicId;let configProviderContext=injectConfigProviderContext({useId:void 0});return Object.hasOwn(vue_runtime_esm_bundler_exports,`useId`)?`${prefix}-${useId$1?.()}`:configProviderContext.useId?`${prefix}-${configProviderContext.useId()}`:`${prefix}-${++count}`}function useStateMachine(initialState,machine){let state=ref(initialState);function reducer(event){let nextState=machine[state.value][event];return nextState??state.value}let dispatch=event=>{state.value=reducer(event)};return{state,dispatch}}function usePresence(present,node$1){let stylesRef=ref({}),prevAnimationNameRef=ref(`none`),prevPresentRef=ref(present),initialState=present.value?`mounted`:`unmounted`,timeoutId,ownerWindow=node$1.value?.ownerDocument.defaultView??defaultWindow,{state,dispatch}=useStateMachine(initialState,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),dispatchCustomEvent=name$2=>{if(isClient$1){let customEvent=new CustomEvent(name$2,{bubbles:!1,cancelable:!1});node$1.value?.dispatchEvent(customEvent)}};watch(present,async(currentPresent,prevPresent)=>{let hasPresentChanged=prevPresent!==currentPresent;if(await nextTick(),hasPresentChanged){let prevAnimationName=prevAnimationNameRef.value,currentAnimationName=getAnimationName(node$1.value);if(currentPresent)dispatch(`MOUNT`),dispatchCustomEvent(`enter`),currentAnimationName===`none`&&dispatchCustomEvent(`after-enter`);else if(currentAnimationName===`none`||currentAnimationName===`undefined`||stylesRef.value?.display===`none`)dispatch(`UNMOUNT`),dispatchCustomEvent(`leave`),dispatchCustomEvent(`after-leave`);else{let isAnimating=prevAnimationName!==currentAnimationName;prevPresent&&isAnimating?(dispatch(`ANIMATION_OUT`),dispatchCustomEvent(`leave`)):(dispatch(`UNMOUNT`),dispatchCustomEvent(`after-leave`))}}},{immediate:!0});let handleAnimationEnd=event=>{let currentAnimationName=getAnimationName(node$1.value),isCurrentAnimation=currentAnimationName.includes(event.animationName),directionName=state.value===`mounted`?`enter`:`leave`;if(event.target===node$1.value&&isCurrentAnimation&&(dispatchCustomEvent(`after-${directionName}`),dispatch(`ANIMATION_END`),!prevPresentRef.value)){let currentFillMode=node$1.value.style.animationFillMode;node$1.value.style.animationFillMode=`forwards`,timeoutId=ownerWindow?.setTimeout(()=>{node$1.value?.style.animationFillMode===`forwards`&&(node$1.value.style.animationFillMode=currentFillMode)})}event.target===node$1.value&¤tAnimationName===`none`&&dispatch(`ANIMATION_END`)},handleAnimationStart=event=>{event.target===node$1.value&&(prevAnimationNameRef.value=getAnimationName(node$1.value))},watcher=watch(node$1,(newNode,oldNode)=>{newNode?(stylesRef.value=getComputedStyle(newNode),newNode.addEventListener(`animationstart`,handleAnimationStart),newNode.addEventListener(`animationcancel`,handleAnimationEnd),newNode.addEventListener(`animationend`,handleAnimationEnd)):(dispatch(`ANIMATION_END`),timeoutId!==void 0&&ownerWindow?.clearTimeout(timeoutId),oldNode?.removeEventListener(`animationstart`,handleAnimationStart),oldNode?.removeEventListener(`animationcancel`,handleAnimationEnd),oldNode?.removeEventListener(`animationend`,handleAnimationEnd))},{immediate:!0}),stateWatcher=watch(state,()=>{let currentAnimationName=getAnimationName(node$1.value);prevAnimationNameRef.value=state.value===`mounted`?currentAnimationName:`none`});onUnmounted(()=>{watcher(),stateWatcher()});let isPresent=computed(()=>[`mounted`,`unmountSuspended`].includes(state.value));return{isPresent}}function getAnimationName(node$1){return node$1&&getComputedStyle(node$1).animationName||`none`}const Presence=defineComponent({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(props,{slots,expose}){let{present,forceMount}=toRefs(props),node$1=ref(),{isPresent}=usePresence(present,node$1);expose({present:isPresent});let children=slots.default({present:isPresent.value});children=renderSlotFragments(children||[]);let instance=getCurrentInstance();if(children&&children?.length>1){let componentName=instance?.parent?.type.name?`<${instance.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${componentName}\` 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(line=>` - ${line}`).join(` +`)}}var system_v2_default=message;const chromaticHueDefault=220.44,llmInferenceEndToken=`<|llm_inference_end|>`,_hoisted_1$39={key:0,class:`flex items-center justify-between`},_hoisted_2$25={class:`text-sm font-medium`},_hoisted_3$19={class:`text-xs text-neutral-500`},_hoisted_4$17={class:`h-full w-full`},_hoisted_5$14={id:`below-threshold-gradient`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},_hoisted_6$12=[`fill`],_hoisted_7$9=[`y`,`height`,`fill`],_hoisted_8$6=[`y1`,`y2`,`stroke`,`fill`],_hoisted_9$5=[`d`,`fill`],_hoisted_10$5=[`d`,`stroke`,`stroke-width`],_hoisted_11$3={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`},_hoisted_12$3={class:`text-xs text-primary-700 font-medium dark:text-primary-300`},_hoisted_13$3={key:1,class:`flex flex-wrap items-center justify-between text-xs text-neutral-500`},_hoisted_14$2={class:`flex items-center gap-3`},_hoisted_15$2={class:`flex items-center gap-1 text-nowrap`},_hoisted_16$2={class:`flex items-center gap-1 text-nowrap`},_hoisted_17$2={key:0,class:`text-nowrap`};var TimeSeriesChart_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TimeSeriesChart`,props:{history:{},currentValue:{},threshold:{default:null},isActive:{type:Boolean},title:{default:`Time Series`},colorsHue:{},lineColor:{},thresholdColor:{},activeColor:{},inactiveColor:{},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:{},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:{}},setup(__props){let props=__props,chartHeight=computed(()=>props.height),timeSeriesChartRef=ref(),chromaticHue$1=inject(chromaticHue,chromaticHueDefault),chromaticHueOrDefault=toRef(()=>props.colorsHue||chromaticHue$1||chromaticHueDefault),chromaticShades=computed(()=>chromaticPaletteFrom(chromaticHueOrDefault.value)),timeSeriesChartContainerBounding=useElementBounding(timeSeriesChartRef,{windowResize:!0});watch([chromaticHueOrDefault,timeSeriesChartRef],()=>{timeSeriesChartRef.value&&timeSeriesChartRef.value.style.setProperty(`--chromatic-hue`,chromaticHueOrDefault.value.toString())},{immediate:!0});let lineColorProps=toRef(()=>props.lineColor),lineColor=computed(()=>lineColorProps.value?lineColorProps.value:chromaticShades.value.shadeBy(500).toHex()),thresholdColorProps=toRef(()=>props.thresholdColor),thresholdColor=computed(()=>{if(!thresholdColorProps.value){let color$2=chromaticShades.value.shadeBy(500).withAlpha(.1).color;return`oklch(${color$2.l} ${color$2.c} ${color$2.h} / ${color$2.alpha})`}return thresholdColorProps.value}),activeColorProps=toRef(()=>props.activeColor),activeColor=computed(()=>activeColorProps.value?activeColorProps.value:chromaticShades.value.shadeBy(600).toHex()),inactiveColorProps=toRef(()=>props.inactiveColor),inactiveColor=computed(()=>inactiveColorProps.value?inactiveColorProps.value:chromaticShades.value.shadeBy(400).toHex()),componentId=Math.random().toString(36).substring(2,9),gridPatternId=`grid-${componentId}`,areaGradientId=`area-gradient-${componentId}`,thresholdGradientId=`threshold-gradient-${componentId}`,normalizedThreshold=computed(()=>props.threshold===null?0:Math.max(0,Math.min(1,props.threshold))),thresholdLineY=computed(()=>props.threshold===null?0:chartHeight.value-normalizedThreshold.value*chartHeight.value),smoothPath=computed(()=>{let history$1=props.history;if(history$1.length<2)return``;let width=timeSeriesChartContainerBounding.width.value,height=chartHeight.value,path=`M0,${height-history$1[0]*height}`;for(let i$1=1;i$1{let history$1=props.history;if(history$1.length<2)return``;let width=timeSeriesChartContainerBounding.width.value,height=chartHeight.value,path=`M0,${height} L0,${height-history$1[0]*height}`;for(let i$1=1;i$1_ctx.history.length>_ctx.minDataPoints?(openBlock(),createElementBlock(`div`,{key:0,ref_key:`timeSeriesChartRef`,ref:timeSeriesChartRef,class:`time-series-chart space-y-3`},[_ctx.showHeader?(openBlock(),createElementBlock(`div`,_hoisted_1$39,[createBaseVNode(`div`,_hoisted_2$25,toDisplayString(_ctx.title),1),createBaseVNode(`div`,_hoisted_3$19,toDisplayString(_ctx.subtitle),1)])):createCommentVNode(``,!0),createBaseVNode(`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:normalizeStyle({height:`${chartHeight.value}px`})},[(openBlock(),createElementBlock(`svg`,_hoisted_4$17,[createBaseVNode(`defs`,null,[createBaseVNode(`pattern`,{id:gridPatternId,width:`20`,height:`10`,patternUnits:`userSpaceOnUse`},_cache$1[0]||=[createBaseVNode(`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)]),createBaseVNode(`linearGradient`,{id:areaGradientId,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.3`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.15`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.05`)},null,4)]),createBaseVNode(`linearGradient`,{id:thresholdGradientId,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.3`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.15`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.05`)},null,4)]),createBaseVNode(`linearGradient`,_hoisted_5$14,[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.2`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.1`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.05`)},null,4)])]),createBaseVNode(`rect`,{width:`100%`,height:`100%`,fill:`url(#${gridPatternId})`},null,8,_hoisted_6$12),_ctx.showThreshold&&_ctx.threshold!==null?(openBlock(),createElementBlock(`rect`,{key:0,x:`0`,y:thresholdLineY.value,width:`100%`,height:chartHeight.value-thresholdLineY.value,fill:thresholdColor.value,class:`transition-all duration-300`},null,8,_hoisted_7$9)):createCommentVNode(``,!0),_ctx.showThreshold&&_ctx.threshold!==null?(openBlock(),createElementBlock(`line`,{key:1,x1:`0`,y1:thresholdLineY.value,x2:`100%`,y2:thresholdLineY.value,stroke:thresholdColor.value,"stroke-width":`1.5`,"stroke-dasharray":`4,4`,fill:thresholdColor.value,class:`transition-all duration-300`},null,8,_hoisted_8$6)):createCommentVNode(``,!0),dataAreaPath.value&&_ctx.showArea?(openBlock(),createElementBlock(`path`,{key:2,d:dataAreaPath.value,fill:`url(#${areaGradientId})`,class:`transition-all duration-75`},null,8,_hoisted_9$5)):createCommentVNode(``,!0),smoothPath.value?(openBlock(),createElementBlock(`path`,{key:3,d:smoothPath.value,fill:`none`,stroke:lineColor.value,"stroke-width":_ctx.lineWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`drop-shadow-sm transition-all duration-75`},null,8,_hoisted_10$5)):createCommentVNode(``,!0)])),_ctx.showCurrentValue?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`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`,_ctx.isActive?`bg-primary-50 dark:bg-primary-900 border-primary-200 dark:border-primary-800`:``])},[createBaseVNode(`div`,{class:normalizeClass([`text-xs font-medium`,_ctx.isActive?`text-primary-700 dark:text-primary-300`:`text-neutral-600 dark:text-neutral-400`])},toDisplayString(_ctx.formatValue?_ctx.formatValue(_ctx.currentValue):`${(_ctx.currentValue*100).toFixed(_ctx.precision)}${_ctx.unit}`),3)],2)):createCommentVNode(``,!0),createVNode(Transition,{name:`fade`},{default:withCtx(()=>[_ctx.isActive&&_ctx.showActiveIndicator?(openBlock(),createElementBlock(`div`,_hoisted_11$3,[_cache$1[1]||=createBaseVNode(`div`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary-500`},null,-1),createBaseVNode(`span`,_hoisted_12$3,toDisplayString(_ctx.activeLabel),1)])):createCommentVNode(``,!0)]),_:1})],4),_ctx.showLegend?(openBlock(),createElementBlock(`div`,_hoisted_13$3,[createBaseVNode(`div`,_hoisted_14$2,[createBaseVNode(`span`,_hoisted_15$2,[createBaseVNode(`div`,{class:`h-2 w-2 rounded-full`,style:normalizeStyle({backgroundColor:activeColor.value})},null,4),createTextVNode(` `+toDisplayString(_ctx.activeLegendLabel),1)]),createBaseVNode(`span`,_hoisted_16$2,[createBaseVNode(`div`,{class:`h-2 w-2 rounded-full`,style:normalizeStyle({backgroundColor:inactiveColor.value})},null,4),createTextVNode(` `+toDisplayString(_ctx.inactiveLegendLabel),1)])]),_ctx.threshold===null?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_17$2,toDisplayString(_ctx.thresholdLabel)+`: `+toDisplayString((_ctx.threshold*100).toFixed(0))+`%`,1))])):createCommentVNode(``,!0)],512)):createCommentVNode(``,!0)}}),TimeSeriesChart_default=__plugin_vue_export_helper_default(TimeSeriesChart_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-6b4f300d`]]),Callout_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Callout`,props:{theme:{default:`primary`},label:{}},setup(__props){let props=__props,themeClasses={primary:{container:[`bg-primary-400/10 dark:bg-primary-50/10 text-neutral-900/80 backdrop-blur-md`,`before:bg-primary-400 dark:bg-primary-900/10 dark:text-neutral-100/80 before:content-[''] before:dark:bg-primary-900`],label:[`text-primary-500 dark:text-primary-400 font-semibold`]},lime:{container:[`bg-lime-400/10 dark:bg-lime-50/10 text-neutral-900/80 backdrop-blur-md`,`before:bg-lime-400 dark:bg-lime-900/10 dark:text-neutral-100/80 before:content-[''] before:dark:bg-lime-900`],label:[`text-lime-500 dark:text-lime-400 font-semibold`]},violet:{container:[`bg-violet-400/10 dark:bg-violet-50/10 text-neutral-900/80 backdrop-blur-md`,`before:bg-violet-400 dark:bg-violet-900/10 dark:text-neutral-100/80 before:content-[''] before:dark:bg-violet-900`],label:[`text-violet-500 dark:text-violet-400 font-semibold`]},orange:{container:[`bg-orange-400/10 dark:bg-orange-50/10 text-neutral-900/80 backdrop-blur-md`,`before:bg-orange-400 dark:bg-orange-900/10 dark:text-neutral-100/80 before:content-[''] before:dark:bg-orange-900`],label:[`text-orange-500 dark:text-orange-400 font-semibold`]}};return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{relative:``,"mb-4":``,flex:``,"flex-col":``,"gap-1":``,"overflow-hidden":``,"rounded-lg":``,"py-2":``,"pl-4":``,"pr-3":``,class:normalizeClass([...themeClasses[props.theme||`violet`].container,`before-position-absolute before:inset-0 before:h-full before:w-1 before:rounded-full`])},[createBaseVNode(`div`,{text:`font-semibold`,class:normalizeClass([...themeClasses[props.theme||`violet`].label||[]])},[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label||`Callout`),1)])],2),renderSlot(_ctx.$slots,`default`)],2))}}),Callout_default=Callout_vue_vue_type_script_setup_true_lang_default;const __vite_import_meta_env__={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`};var SubscriptionManager=class{subscriptions=new Set;add(handler){return this.subscriptions.add(handler),()=>this.subscriptions.delete(handler)}notify(a$2,b$4,c$4){if(this.subscriptions.size)for(let handler of this.subscriptions)handler(a$2,b$4,c$4)}clear(){this.subscriptions.clear()}};function isFloat(value$1){return!Number.isNaN(Number.parseFloat(value$1))}var MotionValue=class{current;prev;timeDelta=0;lastUpdated=0;updateSubscribers=new SubscriptionManager;stopAnimation;canTrackVelocity=!1;constructor(init){this.prev=this.current=init,this.canTrackVelocity=isFloat(this.current)}onChange(subscription){return this.updateSubscribers.add(subscription)}clearListeners(){this.updateSubscribers.clear()}set(v$2){this.updateAndNotify(v$2)}updateAndNotify=v$2=>{this.prev=this.current,this.current=v$2;let{delta,timestamp:timestamp$2}=getFrameData();this.lastUpdated!==timestamp$2&&(this.timeDelta=delta,this.lastUpdated=timestamp$2),es_default.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)};get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?velocityPerSecond(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}scheduleVelocityCheck=()=>es_default.postRender(this.velocityCheck);velocityCheck=({timestamp:timestamp$2})=>{this.canTrackVelocity||=isFloat(this.current),timestamp$2!==this.lastUpdated&&(this.prev=this.current)};start(animation){return this.stop(),new Promise(resolve$1=>{let{stop:stop$1}=animation(resolve$1);this.stopAnimation=stop$1}).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 getMotionValue(init){return new MotionValue(init)}const{isArray:isArray$2}=Array;function useMotionValues(){let motionValues=ref({}),stop$1=keys$3=>{let destroyKey=key$1=>{motionValues.value[key$1]&&(motionValues.value[key$1].stop(),motionValues.value[key$1].destroy(),delete motionValues.value[key$1])};keys$3?isArray$2(keys$3)?keys$3.forEach(destroyKey):destroyKey(keys$3):Object.keys(motionValues.value).forEach(destroyKey)},get=(key$1,from,target$1)=>{if(motionValues.value[key$1])return motionValues.value[key$1];let motionValue=getMotionValue(from);return motionValue.onChange(v$2=>target$1[key$1]=v$2),motionValues.value[key$1]=motionValue,motionValue};return tryOnUnmounted(stop$1),{motionValues,get,stop:stop$1}}function isKeyframesTarget(v$2){return Array.isArray(v$2)}function underDampedSpring(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function criticallyDampedSpring(to$2){return{type:`spring`,stiffness:550,damping:to$2===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function overDampedSpring(to$2){return{type:`spring`,stiffness:550,damping:to$2===0?100:30,restDelta:.01,restSpeed:10}}function linearTween(){return{type:`keyframes`,ease:`linear`,duration:300}}function keyframes(values){return{type:`keyframes`,duration:800,values}}const defaultTransitions={default:overDampedSpring,x:underDampedSpring,y:underDampedSpring,z:underDampedSpring,rotate:underDampedSpring,rotateX:underDampedSpring,rotateY:underDampedSpring,rotateZ:underDampedSpring,scaleX:criticallyDampedSpring,scaleY:criticallyDampedSpring,scale:criticallyDampedSpring,backgroundColor:linearTween,color:linearTween,opacity:linearTween};function getDefaultTransition(valueKey,to$2){let transitionFactory;return transitionFactory=isKeyframesTarget(to$2)?keyframes:defaultTransitions[valueKey]||defaultTransitions.default,{to:to$2,...transitionFactory(to$2)}}const int={...number$2,transform:Math.round},valueTypes={color:color$1,backgroundColor:color$1,outlineColor:color$1,fill:color$1,stroke:color$1,borderColor:color$1,borderTopColor:color$1,borderRightColor:color$1,borderBottomColor:color$1,borderLeftColor:color$1,borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int,filter,WebkitFilter:filter,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int},getValueType=key$1=>valueTypes[key$1];function getValueAsType(value$1,type){return type&&typeof value$1==`number`&&type.transform?type.transform(value$1):value$1}function getAnimatableNone(key$1,value$1){let defaultValueType=getValueType(key$1);return defaultValueType!==filter&&(defaultValueType=complex),defaultValueType.getAnimatableNone?defaultValueType.getAnimatableNone(value$1):void 0}const easingLookup={linear,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate,bounceIn,bounceInOut,bounceOut};function easingDefinitionToFunction(definition$29){if(Array.isArray(definition$29)){let[x1,y1,x2,y2]=definition$29;return cubicBezier(x1,y1,x2,y2)}else if(typeof definition$29==`string`)return easingLookup[definition$29];return definition$29}function isEasingArray(ease){return Array.isArray(ease)&&typeof ease[0]!=`number`}function isAnimatable(key$1,value$1){return key$1===`zIndex`?!1:!!(typeof value$1==`number`||Array.isArray(value$1)||typeof value$1==`string`&&complex.test(value$1)&&!value$1.startsWith(`url(`))}function hydrateKeyframes(options$1){return Array.isArray(options$1.to)&&options$1.to[0]===null&&(options$1.to=[...options$1.to],options$1.to[0]=options$1.from),options$1}function convertTransitionToAnimationOptions({ease,times,delay,...transition}){let options$1={...transition};return times&&(options$1.offset=times),ease&&(options$1.ease=isEasingArray(ease)?ease.map(easingDefinitionToFunction):easingDefinitionToFunction(ease)),delay&&(options$1.elapsed=-delay),options$1}function getPopmotionAnimationOptions(transition,options$1,key$1){return Array.isArray(options$1.to)&&(transition.duration||=800),hydrateKeyframes(options$1),isTransitionDefined(transition)||(transition={...transition,...getDefaultTransition(key$1,options$1.to)}),{...options$1,...convertTransitionToAnimationOptions(transition)}}function isTransitionDefined({delay,repeat,repeatType,repeatDelay,from,...transition}){return!!Object.keys(transition).length}function getValueTransition(transition,key$1){return transition[key$1]||transition.default||transition}function getAnimation(key$1,value$1,target$1,transition,onComplete){let valueTransition=getValueTransition(transition,key$1),origin=valueTransition.from===null||valueTransition.from===void 0?value$1.get():valueTransition.from,isTargetAnimatable=isAnimatable(key$1,target$1);origin===`none`&&isTargetAnimatable&&typeof target$1==`string`&&(origin=getAnimatableNone(key$1,target$1));let isOriginAnimatable=isAnimatable(key$1,origin);function start(complete){let options$1={from:origin,to:target$1,velocity:transition.velocity?transition.velocity:value$1.getVelocity(),onUpdate:v$2=>value$1.set(v$2)};return valueTransition.type===`inertia`||valueTransition.type===`decay`?inertia({...options$1,...valueTransition}):animate({...getPopmotionAnimationOptions(valueTransition,options$1,key$1),onUpdate:v$2=>{options$1.onUpdate(v$2),valueTransition.onUpdate&&valueTransition.onUpdate(v$2)},onComplete:()=>{onComplete&&onComplete(),complete&&complete()}})}function set(complete){return value$1.set(target$1),onComplete&&onComplete(),complete&&complete(),{stop:()=>{}}}return!isOriginAnimatable||!isTargetAnimatable||valueTransition.type===!1?set:start}function useMotionTransitions(){let{motionValues,stop:stop$1,get}=useMotionValues(),push$1=(key$1,value$1,target$1,transition={},onComplete)=>{let from=target$1[key$1],motionValue=get(key$1,from,target$1);if(transition&&transition.immediate){motionValue.set(value$1);return}let animation=getAnimation(key$1,motionValue,value$1,transition,onComplete);motionValue.start(animation)};return{motionValues,stop:stop$1,push:push$1}}function useMotionControls(motionProperties,variants={},{motionValues,push:push$1,stop:stop$1}=useMotionTransitions()){let _variants=unref(variants),isAnimating=ref(!1);watch(motionValues,newVal=>{isAnimating.value=Object.values(newVal).filter(value$1=>value$1.isAnimating()).length>0},{immediate:!0,deep:!0});let getVariantFromKey=variant=>{if(!_variants||!_variants[variant])throw Error(`The variant ${variant} does not exist.`);return _variants[variant]},apply$2=variant=>{typeof variant==`string`&&(variant=getVariantFromKey(variant));let animations$1=Object.entries(variant).map(([key$1,value$1])=>{if(key$1!==`transition`)return new Promise(resolve$1=>push$1(key$1,value$1,motionProperties,variant.transition||getDefaultTransition(key$1,variant[key$1]),resolve$1))}).filter(Boolean);async function waitForComplete(){await Promise.all(animations$1),variant.transition?.onComplete?.()}return Promise.all([waitForComplete()])},set=variant=>{let variantData=isObject$1(variant)?variant:getVariantFromKey(variant);Object.entries(variantData).forEach(([key$1,value$1])=>{key$1!==`transition`&&push$1(key$1,value$1,motionProperties,{immediate:!0})})},leave=async done=>{let leaveVariant;if(_variants&&(_variants.leave&&(leaveVariant=_variants.leave),!_variants.leave&&_variants.initial&&(leaveVariant=_variants.initial)),!leaveVariant){done();return}await apply$2(leaveVariant),done()};return{isAnimating,apply:apply$2,set,leave,stop:stop$1}}const isBrowser=typeof window<`u`,supportsPointerEvents=()=>isBrowser&&(window.onpointerdown===null||__vite_import_meta_env__?.TEST),supportsTouchEvents=()=>isBrowser&&(window.ontouchstart===null||__vite_import_meta_env__?.TEST),supportsMouseEvents=()=>isBrowser&&(window.onmousedown===null||__vite_import_meta_env__?.TEST);function registerEventListeners({target:target$1,state,variants,apply:apply$2}){let _variants=unref(variants),hovered=ref(!1),tapped=ref(!1),focused=ref(!1),mutableKeys=computed(()=>{let result=[...Object.keys(state.value||{})];return _variants?(_variants.hovered&&(result=[...result,...Object.keys(_variants.hovered)]),_variants.tapped&&(result=[...result,...Object.keys(_variants.tapped)]),_variants.focused&&(result=[...result,...Object.keys(_variants.focused)]),result):result}),computedProperties=computed(()=>{let result={};for(let key$1 in Object.assign(result,state.value),hovered.value&&_variants.hovered&&Object.assign(result,_variants.hovered),tapped.value&&_variants.tapped&&Object.assign(result,_variants.tapped),focused.value&&_variants.focused&&Object.assign(result,_variants.focused),result)mutableKeys.value.includes(key$1)||delete result[key$1];return result});_variants.hovered&&(useEventListener$1(target$1,`mouseenter`,()=>hovered.value=!0),useEventListener$1(target$1,`mouseleave`,()=>{hovered.value=!1,tapped.value=!1})),_variants.tapped&&(supportsMouseEvents()&&(useEventListener$1(target$1,`mousedown`,()=>tapped.value=!0),useEventListener$1(target$1,`mouseup`,()=>tapped.value=!1)),supportsPointerEvents()&&(useEventListener$1(target$1,`pointerdown`,()=>tapped.value=!0),useEventListener$1(target$1,`pointerup`,()=>tapped.value=!1)),supportsTouchEvents()&&(useEventListener$1(target$1,`touchstart`,()=>tapped.value=!0),useEventListener$1(target$1,`touchend`,()=>tapped.value=!1))),_variants.focused&&(useEventListener$1(target$1,`focus`,()=>focused.value=!0),useEventListener$1(target$1,`blur`,()=>focused.value=!1)),watch([hovered,tapped,focused],()=>{apply$2(computedProperties.value)})}function registerLifeCycleHooks({set,target:target$1,variants,variant}){let _variants=unref(variants);watch(()=>target$1,()=>{_variants&&(_variants.initial&&(set(`initial`),variant.value=`initial`),_variants.enter&&(variant.value=`enter`))},{immediate:!0,flush:`pre`})}function registerVariantsSync({state,apply:apply$2}){watch(state,newVal=>{newVal&&apply$2(newVal)},{immediate:!0})}function registerVisibilityHooks({target:target$1,variants,variant}){let _variants=unref(variants);_variants&&(_variants.visible||_variants.visibleOnce)&&useIntersectionObserver(target$1,([{isIntersecting}])=>{_variants.visible?isIntersecting?variant.value=`visible`:variant.value=`initial`:_variants.visibleOnce&&(isIntersecting&&variant.value!==`visibleOnce`?variant.value=`visibleOnce`:variant.value||=`initial`)})}function useMotionFeatures(instance,options$1={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){options$1.lifeCycleHooks&®isterLifeCycleHooks(instance),options$1.syncVariants&®isterVariantsSync(instance),options$1.visibilityHooks&®isterVisibilityHooks(instance),options$1.eventListeners&®isterEventListeners(instance)}function reactiveStyle(props={}){let state=reactive({...props}),style=ref({});return watch(state,()=>{let result={};for(let[key$1,value$1]of Object.entries(state)){let valueType=getValueType(key$1),valueAsType=getValueAsType(value$1,valueType);result[key$1]=valueAsType}style.value=result},{immediate:!0,deep:!0}),{state,style}}function usePermissiveTarget(target$1,onTarget){watch(()=>unrefElement$1(target$1),el$1=>{el$1&&onTarget(el$1)},{immediate:!0})}const translateAlias={x:`translateX`,y:`translateY`,z:`translateZ`};function reactiveTransform(props={},enableHardwareAcceleration=!0){let state=reactive({...props}),transform$1=ref(``);return watch(state,newVal=>{let result=``,hasHardwareAcceleration=!1;if(enableHardwareAcceleration&&(newVal.x||newVal.y||newVal.z)){let str=[newVal.x||0,newVal.y||0,newVal.z||0].map(val=>getValueAsType(val,px)).join(`,`);result+=`translate3d(${str}) `,hasHardwareAcceleration=!0}for(let[key$1,value$1]of Object.entries(newVal)){if(enableHardwareAcceleration&&(key$1===`x`||key$1===`y`||key$1===`z`))continue;let valueType=getValueType(key$1),valueAsType=getValueAsType(value$1,valueType);result+=`${translateAlias[key$1]||key$1}(${valueAsType}) `}enableHardwareAcceleration&&!hasHardwareAcceleration&&(result+=`translateZ(0px) `),transform$1.value=result.trim()},{immediate:!0,deep:!0}),{state,transform:transform$1}}const transformAxes=[``,`X`,`Y`,`Z`],order$1=[`perspective`,`translate`,`scale`,`rotate`,`skew`],transformProps=[`transformPerspective`,`x`,`y`,`z`];order$1.forEach(operationKey=>{transformAxes.forEach(axesKey=>{let key$1=operationKey+axesKey;transformProps.push(key$1)})});const transformPropSet=new Set(transformProps);function isTransformProp(key$1){return transformPropSet.has(key$1)}const transformOriginProps=new Set([`originX`,`originY`,`originZ`]);function isTransformOriginProp(key$1){return transformOriginProps.has(key$1)}function splitValues(variant){let transform$1={},style={};return Object.entries(variant).forEach(([key$1,value$1])=>{isTransformProp(key$1)||isTransformOriginProp(key$1)?transform$1[key$1]=value$1:style[key$1]=value$1}),{transform:transform$1,style}}function variantToStyle(variant){let{transform:_transform,style:_style}=splitValues(variant),{transform:transform$1}=reactiveTransform(_transform),{style}=reactiveStyle(_style);return transform$1.value&&(style.value.transform=transform$1.value),style.value}function useElementStyle(target$1,onInit){let _cache$1,_target$1,{state,style}=reactiveStyle();return usePermissiveTarget(target$1,el$1=>{_target$1=el$1;for(let key$1 of Object.keys(valueTypes)){if(el$1.style[key$1]===null||el$1.style[key$1]===``||isTransformProp(key$1)||isTransformOriginProp(key$1))continue;state[key$1]=el$1.style[key$1]}_cache$1&&Object.entries(_cache$1).forEach(([key$1,value$1])=>el$1.style[key$1]=value$1),onInit&&onInit(state)}),watch(style,newVal=>{if(!_target$1){_cache$1=newVal;return}for(let key$1 in newVal)_target$1.style[key$1]=newVal[key$1]},{immediate:!0}),{style:state}}function parseTransform(transform$1){let transforms=transform$1.trim().split(/\) |\)/);if(transforms.length===1)return{};let parseValues=value$1=>value$1.endsWith(`px`)||value$1.endsWith(`deg`)?Number.parseFloat(value$1):Number.isNaN(Number(value$1))?Number(value$1):value$1;return transforms.reduce((acc,transform2)=>{if(!transform2)return acc;let[name$2,transformValue]=transform2.split(`(`),valueArray=transformValue.split(`,`),values=valueArray.map(val=>parseValues(val.endsWith(`)`)?val.replace(`)`,``):val.trim())),value$1=values.length===1?values[0]:values;return{...acc,[name$2]:value$1}},{})}function stateFromTransform(state,transform$1){Object.entries(parseTransform(transform$1)).forEach(([key$1,value$1])=>{let axes=[`x`,`y`,`z`];if(key$1===`translate3d`){if(value$1===0){axes.forEach(axis=>state[axis]=0);return}value$1.forEach((axisValue,index$1)=>state[axes[index$1]]=axisValue);return}if(value$1=Number.parseFloat(`${value$1}`),key$1===`translateX`){state.x=value$1;return}if(key$1===`translateY`){state.y=value$1;return}if(key$1===`translateZ`){state.z=value$1;return}state[key$1]=value$1})}function useElementTransform(target$1,onInit){let _cache$1,_target$1,{state,transform:transform$1}=reactiveTransform();return usePermissiveTarget(target$1,el$1=>{_target$1=el$1,el$1.style.transform&&stateFromTransform(state,el$1.style.transform),_cache$1&&(el$1.style.transform=_cache$1),onInit&&onInit(state)}),watch(transform$1,newValue=>{if(!_target$1){_cache$1=newValue;return}_target$1.style.transform=newValue},{immediate:!0}),{transform:state}}function objectEntries(obj){return Object.entries(obj)}function useMotionProperties(target$1,defaultValues){let motionProperties=reactive({}),apply$2=values=>Object.entries(values).forEach(([key$1,value$1])=>motionProperties[key$1]=value$1),{style}=useElementStyle(target$1,apply$2),{transform:transform$1}=useElementTransform(target$1,apply$2);return watch(motionProperties,newVal=>{objectEntries(newVal).forEach(([key$1,value$1])=>{let target2=isTransformProp(key$1)?transform$1:style;target2[key$1]&&target2[key$1]===value$1||(target2[key$1]=value$1)})},{immediate:!0,deep:!0}),usePermissiveTarget(target$1,()=>defaultValues&&apply$2(defaultValues)),{motionProperties,style,transform:transform$1}}function useMotionVariants(variants={}){let _variants=unref(variants),variant=ref(),state=computed(()=>{if(variant.value)return _variants[variant.value]});return{state,variant}}function useMotion(target$1,variants={},options$1){let{motionProperties}=useMotionProperties(target$1),{variant,state}=useMotionVariants(variants),controls=useMotionControls(motionProperties,variants),instance={target:target$1,variant,variants,state,motionProperties,...controls};return useMotionFeatures(instance,options$1),instance}const transitionKeys=[`delay`,`duration`],directivePropsKeys=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...transitionKeys],fade={initial:{opacity:0},enter:{opacity:1}},fadeVisible={initial:{opacity:0},visible:{opacity:1}},fadeVisibleOnce={initial:{opacity:0},visibleOnce:{opacity:1}},pop={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},popVisible={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},popVisibleOnce={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},rollLeft={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleLeft={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceLeft={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollRight={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleRight={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceRight={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollTop={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleTop={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceTop={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},rollBottom={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleBottom={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceBottom={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},slideLeft={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},slideVisibleLeft={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceLeft={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},slideRight={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},slideVisibleRight={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceRight={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},slideTop={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},slideVisibleTop={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceTop={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},slideBottom={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},slideVisibleBottom={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceBottom={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},presets={__proto__:null,fade,fadeVisible,fadeVisibleOnce,pop,popVisible,popVisibleOnce,rollBottom,rollLeft,rollRight,rollTop,rollVisibleBottom,rollVisibleLeft,rollVisibleOnceBottom,rollVisibleOnceLeft,rollVisibleOnceRight,rollVisibleOnceTop,rollVisibleRight,rollVisibleTop,slideBottom,slideLeft,slideRight,slideTop,slideVisibleBottom,slideVisibleLeft,slideVisibleOnceBottom,slideVisibleOnceLeft,slideVisibleOnceRight,slideVisibleOnceTop,slideVisibleRight,slideVisibleTop},CUSTOM_PRESETS=Symbol(``),MotionComponentProps={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 isObject$2(val){return Object.prototype.toString.call(val)===`[object Object]`}function clone(v$2){if(Array.isArray(v$2))return v$2.map(clone);if(isObject$2(v$2)){let res={};for(let key$1 in v$2)res[key$1]=clone(v$2[key$1]);return res}return v$2}function setupMotionComponent(props){let instances=reactive({}),customPresets=inject(CUSTOM_PRESETS,{}),preset=computed(()=>props.preset==null?{}:customPresets!=null&&props.preset in customPresets?structuredClone(toRaw(customPresets)[props.preset]):props.preset in presets?structuredClone(presets[props.preset]):{}),propsConfig=computed(()=>({initial:props.initial,enter:props.enter,leave:props.leave,visible:props.visible,visibleOnce:props.visibleOnce,hovered:props.hovered,tapped:props.tapped,focused:props.focused}));function applyTransitionHelpers(config,values){for(let transitionKey of[`delay`,`duration`]){if(values[transitionKey]==null)continue;let transitionValueParsed=Number.parseInt(values[transitionKey]);for(let variantKey of[`enter`,`visible`,`visibleOnce`]){let variantConfig=config[variantKey];if(variantConfig==null)continue;variantConfig.transition??={},variantConfig.transition[transitionKey]=transitionValueParsed}}return config}let motionConfig=computed(()=>{let config=defu({},propsConfig.value,preset.value,props.variants||{});return applyTransitionHelpers({...config},props)});function setNodeInstance(node$1,index$1,style){node$1.props??={},node$1.props.style??={},node$1.props.style={...node$1.props.style,...style};let elementMotionConfig=applyTransitionHelpers(clone(motionConfig.value),node$1.props);return node$1.props.onVnodeMounted=({el:el$1})=>{instances[index$1]=useMotion(el$1,elementMotionConfig)},node$1.props.onVnodeUpdated=({el:el$1})=>{let styles=variantToStyle(instances[index$1].state);for(let[key$1,val]of Object.entries(styles))el$1.style[key$1]=val},node$1}return{motionConfig,setNodeInstance}}const MotionComponent=defineComponent({name:`Motion`,props:{...MotionComponentProps,is:{type:[String,Object],default:`div`}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent(props);return()=>{let style=variantToStyle(motionConfig.value.initial||{}),node$1=h(props.is,void 0,slots);return setNodeInstance(node$1,0,style),node$1}}}),MotionGroupComponent=defineComponent({name:`MotionGroup`,props:{...MotionComponentProps,is:{type:[String,Object],required:!1}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent(props);return()=>{let style=variantToStyle(motionConfig.value.initial||{}),nodes=slots.default?.()||[];for(let i$1=0;i$1{await apply$2(`initial`),await apply$2(`enter`)}),onUnmounted(async()=>{await apply$2(`leave`),finalizedDisableBackButton.value=!0}),watch([()=>props.title,()=>props.subtitle,route],async()=>{await apply$2(`leave`),await nextTick(),finalizedDisableBackButton.value=props.disableBackButton,title.value=props.title,subtitle.value=props.subtitle,await nextTick(),await apply$2(`initial`),await apply$2(`enter`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`pageHeaderRef`,ref:pageHeaderRef,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`},[createBaseVNode(`button`,{onClick:_cache$1[0]||=$event=>unref(router$1).back()},[finalizedDisableBackButton.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,{key:0,"i-solar:alt-arrow-left-line-duotone":``,"text-2xl":``,class:normalizeClass({"pointer-events-none op-0":!_ctx.showBackButton})},null,2))]),createBaseVNode(`h1`,_hoisted_1$38,[subtitle.value?(openBlock(),createElementBlock(`div`,_hoisted_2$24,[createBaseVNode(`span`,_hoisted_3$18,toDisplayString(subtitle.value),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$16,toDisplayString(title.value),1)])],512))}}),PageHeader_default=PageHeader_vue_vue_type_script_setup_true_lang_default;const closed=`0px`;var TransitionVertical_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TransitionVertical`,props:{duration:{default:250},easingEnter:{default:`ease-in-out`},easingLeave:{default:`ease-in-out`},opacityClosed:{default:0},opacityOpened:{default:1}},setup(__props){let props=__props;function getElementStyle(element$3){return{height:element$3.style.height,width:element$3.style.width,position:element$3.style.position,visibility:element$3.style.visibility,overflow:element$3.style.overflow,paddingTop:element$3.style.paddingTop,paddingBottom:element$3.style.paddingBottom,borderTopWidth:element$3.style.borderTopWidth,borderBottomWidth:element$3.style.borderBottomWidth,marginTop:element$3.style.marginTop,marginBottom:element$3.style.marginBottom}}function prepareElement(element$3,initialStyle){let{width}=getComputedStyle(element$3);element$3.style.width=width,element$3.style.position=`absolute`,element$3.style.visibility=`hidden`,element$3.style.height=``;let{height}=getComputedStyle(element$3);return element$3.style.width=initialStyle.width,element$3.style.position=initialStyle.position,element$3.style.visibility=initialStyle.visibility,element$3.style.height=closed,element$3.style.overflow=`hidden`,initialStyle.height&&initialStyle.height!==closed?initialStyle.height:height}function animateTransition(element$3,initialStyle,done,keyframes$3,options$1){let animation=element$3.animate(keyframes$3,options$1);element$3.style.height=initialStyle.height,animation.onfinish=()=>{element$3.style.overflow=initialStyle.overflow,done()}}function getEnterKeyframes(height,initialStyle){return[{height:closed,opacity:props.opacityClosed,paddingTop:closed,paddingBottom:closed,borderTopWidth:closed,borderBottomWidth:closed,marginTop:closed,marginBottom:closed},{height,opacity:props.opacityOpened,paddingTop:initialStyle.paddingTop,paddingBottom:initialStyle.paddingBottom,borderTopWidth:initialStyle.borderTopWidth,borderBottomWidth:initialStyle.borderBottomWidth,marginTop:initialStyle.marginTop,marginBottom:initialStyle.marginBottom}]}function enterTransition(element$3,done){let HTMLElement$1=element$3,initialStyle=getElementStyle(HTMLElement$1),height=prepareElement(HTMLElement$1,initialStyle),keyframes$3=getEnterKeyframes(height,initialStyle),options$1={duration:props.duration,easing:props.easingEnter};animateTransition(HTMLElement$1,initialStyle,done,keyframes$3,options$1)}function leaveTransition(element$3,done){let HTMLElement$1=element$3,initialStyle=getElementStyle(HTMLElement$1),{height}=getComputedStyle(HTMLElement$1);HTMLElement$1.style.height=height,HTMLElement$1.style.overflow=`hidden`;let keyframes$3=getEnterKeyframes(height,initialStyle).reverse(),options$1={duration:props.duration,easing:props.easingLeave};animateTransition(HTMLElement$1,initialStyle,done,keyframes$3,options$1)}return(_ctx,_cache$1)=>(openBlock(),createBlock(Transition,{css:!1,onEnter:enterTransition,onLeave:leaveTransition},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3}))}}),TransitionVertical_default=TransitionVertical_vue_vue_type_script_setup_true_lang_default;const sides=[`top`,`right`,`bottom`,`left`],alignments=[`start`,`end`],placements=sides.reduce((acc,side)=>acc.concat(side,side+`-`+alignments[0],side+`-`+alignments[1]),[]),min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=v$2=>({x:v$2,y:v$2}),oppositeSideMap={left:`right`,right:`left`,bottom:`top`,top:`bottom`},oppositeAlignmentMap={start:`end`,end:`start`};function clamp(start,value$1,end){return max(start,min(value$1,end))}function evaluate(value$1,param){return typeof value$1==`function`?value$1(param):value$1}function getSide(placement){return placement.split(`-`)[0]}function getAlignment(placement){return placement.split(`-`)[1]}function getOppositeAxis(axis){return axis===`x`?`y`:`x`}function getAxisLength(axis){return axis===`y`?`height`:`width`}function getSideAxis(placement){return[`top`,`bottom`].includes(getSide(placement))?`y`:`x`}function getAlignmentAxis(placement){return getOppositeAxis(getSideAxis(placement))}function getAlignmentSides(placement,rects,rtl){rtl===void 0&&(rtl=!1);let alignment=getAlignment(placement),alignmentAxis=getAlignmentAxis(placement),length=getAxisLength(alignmentAxis),mainAlignmentSide=alignmentAxis===`x`?alignment===(rtl?`end`:`start`)?`right`:`left`:alignment===`start`?`bottom`:`top`;return rects.reference[length]>rects.floating[length]&&(mainAlignmentSide=getOppositePlacement(mainAlignmentSide)),[mainAlignmentSide,getOppositePlacement(mainAlignmentSide)]}function getExpandedPlacements(placement){let oppositePlacement=getOppositePlacement(placement);return[getOppositeAlignmentPlacement(placement),oppositePlacement,getOppositeAlignmentPlacement(oppositePlacement)]}function getOppositeAlignmentPlacement(placement){return placement.replace(/start|end/g,alignment=>oppositeAlignmentMap[alignment])}function getSideList(side,isStart,rtl){let lr$1=[`left`,`right`],rl$1=[`right`,`left`],tb=[`top`,`bottom`],bt$4=[`bottom`,`top`];switch(side){case`top`:case`bottom`:return rtl?isStart?rl$1:lr$1:isStart?lr$1:rl$1;case`left`:case`right`:return isStart?tb:bt$4;default:return[]}}function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){let alignment=getAlignment(placement),list$2=getSideList(getSide(placement),direction===`start`,rtl);return alignment&&(list$2=list$2.map(side=>side+`-`+alignment),flipAlignment&&(list$2=list$2.concat(list$2.map(getOppositeAlignmentPlacement)))),list$2}function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,side=>oppositeSideMap[side])}function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}function getPaddingObject(padding){return typeof padding==`number`?{top:padding,right:padding,bottom:padding,left:padding}:expandPaddingObject(padding)}function rectToClientRect(rect){let{x:x$3,y:y$3,width,height}=rect;return{width,height,top:y$3,left:x$3,right:x$3+width,bottom:y$3+height,x:x$3,y:y$3}}function computeCoordsFromPlacement(_ref,placement,rtl){let{reference,floating}=_ref,sideAxis=getSideAxis(placement),alignmentAxis=getAlignmentAxis(placement),alignLength=getAxisLength(alignmentAxis),side=getSide(placement),isVertical=sideAxis===`y`,commonX=reference.x+reference.width/2-floating.width/2,commonY=reference.y+reference.height/2-floating.height/2,commonAlign=reference[alignLength]/2-floating[alignLength]/2,coords$1;switch(side){case`top`:coords$1={x:commonX,y:reference.y-floating.height};break;case`bottom`:coords$1={x:commonX,y:reference.y+reference.height};break;case`right`:coords$1={x:reference.x+reference.width,y:commonY};break;case`left`:coords$1={x:reference.x-floating.width,y:commonY};break;default:coords$1={x:reference.x,y:reference.y}}switch(getAlignment(placement)){case`start`:coords$1[alignmentAxis]-=commonAlign*(rtl&&isVertical?-1:1);break;case`end`:coords$1[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1);break}return coords$1}const computePosition=async(reference,floating,config)=>{let{placement=`bottom`,strategy=`absolute`,middleware=[],platform:platform$1}=config,validMiddleware=middleware.filter(Boolean),rtl=await(platform$1.isRTL==null?void 0:platform$1.isRTL(floating)),rects=await platform$1.getElementRects({reference,floating,strategy}),{x:x$3,y:y$3}=computeCoordsFromPlacement(rects,placement,rtl),statefulPlacement=placement,middlewareData={},resetCount=0;for(let i$1=0;i$1({name:`arrow`,options:options$1,async fn(state){let{x:x$3,y:y$3,placement,rects,platform:platform$1,elements,middlewareData}=state,{element:element$3,padding=0}=evaluate(options$1,state)||{};if(element$3==null)return{};let paddingObject=getPaddingObject(padding),coords$1={x:x$3,y:y$3},axis=getAlignmentAxis(placement),length=getAxisLength(axis),arrowDimensions=await platform$1.getDimensions(element$3),isYAxis=axis===`y`,minProp=isYAxis?`top`:`left`,maxProp=isYAxis?`bottom`:`right`,clientProp=isYAxis?`clientHeight`:`clientWidth`,endDiff=rects.reference[length]+rects.reference[axis]-coords$1[axis]-rects.floating[length],startDiff=coords$1[axis]-rects.reference[axis],arrowOffsetParent=await(platform$1.getOffsetParent==null?void 0:platform$1.getOffsetParent(element$3)),clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;(!clientSize||!await(platform$1.isElement==null?void 0:platform$1.isElement(arrowOffsetParent)))&&(clientSize=elements.floating[clientProp]||rects.floating[length]);let centerToReference=endDiff/2-startDiff/2,largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1,minPadding=min(paddingObject[minProp],largestPossiblePadding),maxPadding=min(paddingObject[maxProp],largestPossiblePadding),min$1=minPadding,max$1=clientSize-arrowDimensions[length]-maxPadding,center=clientSize/2-arrowDimensions[length]/2+centerToReference,offset$2=clamp(min$1,center,max$1),shouldAddOffset=!middlewareData.arrow&&getAlignment(placement)!=null&¢er!==offset$2&&rects.reference[length]/2-(centergetAlignment(placement)===alignment),...allowedPlacements.filter(placement=>getAlignment(placement)!==alignment)]:allowedPlacements.filter(placement=>getSide(placement)===placement);return allowedPlacementsSortedByAlignment.filter(placement=>alignment?getAlignment(placement)===alignment||(autoAlignment?getOppositeAlignmentPlacement(placement)!==placement:!1):!0)}const autoPlacement=function(options$1){return options$1===void 0&&(options$1={}),{name:`autoPlacement`,options:options$1,async fn(state){var _middlewareData$autoP,_middlewareData$autoP2,_placementsThatFitOnE;let{rects,middlewareData,placement,platform:platform$1,elements}=state,{crossAxis=!1,alignment,allowedPlacements=placements,autoAlignment=!0,...detectOverflowOptions}=evaluate(options$1,state),placements$1=alignment!==void 0||allowedPlacements===placements?getPlacementList(alignment||null,autoAlignment,allowedPlacements):allowedPlacements,overflow=await detectOverflow(state,detectOverflowOptions),currentIndex=(_middlewareData$autoP=middlewareData.autoPlacement)?.index||0,currentPlacement=placements$1[currentIndex];if(currentPlacement==null)return{};let alignmentSides=getAlignmentSides(currentPlacement,rects,await(platform$1.isRTL==null?void 0:platform$1.isRTL(elements.floating)));if(placement!==currentPlacement)return{reset:{placement:placements$1[0]}};let currentOverflows=[overflow[getSide(currentPlacement)],overflow[alignmentSides[0]],overflow[alignmentSides[1]]],allOverflows=[...(_middlewareData$autoP2=middlewareData.autoPlacement)?.overflows||[],{placement:currentPlacement,overflows:currentOverflows}],nextPlacement=placements$1[currentIndex+1];if(nextPlacement)return{data:{index:currentIndex+1,overflows:allOverflows},reset:{placement:nextPlacement}};let placementsSortedByMostSpace=allOverflows.map(d$2=>{let alignment$1=getAlignment(d$2.placement);return[d$2.placement,alignment$1&&crossAxis?d$2.overflows.slice(0,2).reduce((acc,v$2)=>acc+v$2,0):d$2.overflows[0],d$2.overflows]}).sort((a$2,b$4)=>a$2[1]-b$4[1]),placementsThatFitOnEachSide=placementsSortedByMostSpace.filter(d$2=>d$2[2].slice(0,getAlignment(d$2[0])?2:3).every(v$2=>v$2<=0)),resetPlacement=(_placementsThatFitOnE=placementsThatFitOnEachSide[0])?.[0]||placementsSortedByMostSpace[0][0];return resetPlacement===placement?{}:{data:{index:currentIndex+1,overflows:allOverflows},reset:{placement:resetPlacement}}}}},flip$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`flip`,options:options$1,async fn(state){var _middlewareData$arrow,_middlewareData$flip;let{placement,middlewareData,rects,initialPlacement,platform:platform$1,elements}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0,fallbackPlacements:specifiedFallbackPlacements,fallbackStrategy=`bestFit`,fallbackAxisSideDirection=`none`,flipAlignment=!0,...detectOverflowOptions}=evaluate(options$1,state);if((_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset)return{};let side=getSide(placement),initialSideAxis=getSideAxis(initialPlacement),isBasePlacement=getSide(initialPlacement)===initialPlacement,rtl=await(platform$1.isRTL==null?void 0:platform$1.isRTL(elements.floating)),fallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipAlignment?[getOppositePlacement(initialPlacement)]:getExpandedPlacements(initialPlacement)),hasFallbackAxisSideDirection=fallbackAxisSideDirection!==`none`;!specifiedFallbackPlacements&&hasFallbackAxisSideDirection&&fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement,flipAlignment,fallbackAxisSideDirection,rtl));let placements$1=[initialPlacement,...fallbackPlacements],overflow=await detectOverflow(state,detectOverflowOptions),overflows=[],overflowsData=(_middlewareData$flip=middlewareData.flip)?.overflows||[];if(checkMainAxis&&overflows.push(overflow[side]),checkCrossAxis){let sides$1=getAlignmentSides(placement,rects,rtl);overflows.push(overflow[sides$1[0]],overflow[sides$1[1]])}if(overflowsData=[...overflowsData,{placement,overflows}],!overflows.every(side$1=>side$1<=0)){var _middlewareData$flip2,_overflowsData$filter;let nextIndex=((_middlewareData$flip2=middlewareData.flip)?.index||0)+1,nextPlacement=placements$1[nextIndex];if(nextPlacement)return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}};let resetPlacement=(_overflowsData$filter=overflowsData.filter(d$2=>d$2.overflows[0]<=0).sort((a$2,b$4)=>a$2.overflows[1]-b$4.overflows[1])[0])?.placement;if(!resetPlacement)switch(fallbackStrategy){case`bestFit`:{var _overflowsData$filter2;let placement$1=(_overflowsData$filter2=overflowsData.filter(d$2=>{if(hasFallbackAxisSideDirection){let currentSideAxis=getSideAxis(d$2.placement);return currentSideAxis===initialSideAxis||currentSideAxis===`y`}return!0}).map(d$2=>[d$2.placement,d$2.overflows.filter(overflow$1=>overflow$1>0).reduce((acc,overflow$1)=>acc+overflow$1,0)]).sort((a$2,b$4)=>a$2[1]-b$4[1])[0])?.[0];placement$1&&(resetPlacement=placement$1);break}case`initialPlacement`:resetPlacement=initialPlacement;break}if(placement!==resetPlacement)return{reset:{placement:resetPlacement}}}return{}}}};function getSideOffsets(overflow,rect){return{top:overflow.top-rect.height,right:overflow.right-rect.width,bottom:overflow.bottom-rect.height,left:overflow.left-rect.width}}function isAnySideFullyClipped(overflow){return sides.some(side=>overflow[side]>=0)}const hide$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`hide`,options:options$1,async fn(state){let{rects}=state,{strategy=`referenceHidden`,...detectOverflowOptions}=evaluate(options$1,state);switch(strategy){case`referenceHidden`:{let overflow=await detectOverflow(state,{...detectOverflowOptions,elementContext:`reference`}),offsets=getSideOffsets(overflow,rects.reference);return{data:{referenceHiddenOffsets:offsets,referenceHidden:isAnySideFullyClipped(offsets)}}}case`escaped`:{let overflow=await detectOverflow(state,{...detectOverflowOptions,altBoundary:!0}),offsets=getSideOffsets(overflow,rects.floating);return{data:{escapedOffsets:offsets,escaped:isAnySideFullyClipped(offsets)}}}default:return{}}}}};async function convertValueToCoords(state,options$1){let{placement,platform:platform$1,elements}=state,rtl=await(platform$1.isRTL==null?void 0:platform$1.isRTL(elements.floating)),side=getSide(placement),alignment=getAlignment(placement),isVertical=getSideAxis(placement)===`y`,mainAxisMulti=[`left`,`top`].includes(side)?-1:1,crossAxisMulti=rtl&&isVertical?-1:1,rawValue=evaluate(options$1,state),{mainAxis,crossAxis,alignmentAxis}=typeof rawValue==`number`?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:rawValue.mainAxis||0,crossAxis:rawValue.crossAxis||0,alignmentAxis:rawValue.alignmentAxis};return alignment&&typeof alignmentAxis==`number`&&(crossAxis=alignment===`end`?alignmentAxis*-1:alignmentAxis),isVertical?{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}const offset$1=function(options$1){return options$1===void 0&&(options$1=0),{name:`offset`,options:options$1,async fn(state){var _middlewareData$offse,_middlewareData$arrow;let{x:x$3,y:y$3,placement,middlewareData}=state,diffCoords=await convertValueToCoords(state,options$1);return placement===(_middlewareData$offse=middlewareData.offset)?.placement&&(_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset?{}:{x:x$3+diffCoords.x,y:y$3+diffCoords.y,data:{...diffCoords,placement}}}}},shift$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`shift`,options:options$1,async fn(state){let{x:x$3,y:y$3,placement}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!1,limiter={fn:_ref=>{let{x:x$4,y:y$4}=_ref;return{x:x$4,y:y$4}}},...detectOverflowOptions}=evaluate(options$1,state),coords$1={x:x$3,y:y$3},overflow=await detectOverflow(state,detectOverflowOptions),crossAxis=getSideAxis(getSide(placement)),mainAxis=getOppositeAxis(crossAxis),mainAxisCoord=coords$1[mainAxis],crossAxisCoord=coords$1[crossAxis];if(checkMainAxis){let minSide=mainAxis===`y`?`top`:`left`,maxSide=mainAxis===`y`?`bottom`:`right`,min$1=mainAxisCoord+overflow[minSide],max$1=mainAxisCoord-overflow[maxSide];mainAxisCoord=clamp(min$1,mainAxisCoord,max$1)}if(checkCrossAxis){let minSide=crossAxis===`y`?`top`:`left`,maxSide=crossAxis===`y`?`bottom`:`right`,min$1=crossAxisCoord+overflow[minSide],max$1=crossAxisCoord-overflow[maxSide];crossAxisCoord=clamp(min$1,crossAxisCoord,max$1)}let limitedCoords=limiter.fn({...state,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords.x-x$3,y:limitedCoords.y-y$3,enabled:{[mainAxis]:checkMainAxis,[crossAxis]:checkCrossAxis}}}}}},limitShift$1=function(options$1){return options$1===void 0&&(options$1={}),{options:options$1,fn(state){let{x:x$3,y:y$3,placement,rects,middlewareData}=state,{offset:offset$2=0,mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0}=evaluate(options$1,state),coords$1={x:x$3,y:y$3},crossAxis=getSideAxis(placement),mainAxis=getOppositeAxis(crossAxis),mainAxisCoord=coords$1[mainAxis],crossAxisCoord=coords$1[crossAxis],rawOffset=evaluate(offset$2,state),computedOffset=typeof rawOffset==`number`?{mainAxis:rawOffset,crossAxis:0}:{mainAxis:0,crossAxis:0,...rawOffset};if(checkMainAxis){let len=mainAxis===`y`?`height`:`width`,limitMin=rects.reference[mainAxis]-rects.floating[len]+computedOffset.mainAxis,limitMax=rects.reference[mainAxis]+rects.reference[len]-computedOffset.mainAxis;mainAxisCoordlimitMax&&(mainAxisCoord=limitMax)}if(checkCrossAxis){var _middlewareData$offse,_middlewareData$offse2;let len=mainAxis===`y`?`width`:`height`,isOriginSide=[`top`,`left`].includes(getSide(placement)),limitMin=rects.reference[crossAxis]-rects.floating[len]+(isOriginSide&&(_middlewareData$offse=middlewareData.offset)?.[crossAxis]||0)+(isOriginSide?0:computedOffset.crossAxis),limitMax=rects.reference[crossAxis]+rects.reference[len]+(isOriginSide?0:(_middlewareData$offse2=middlewareData.offset)?.[crossAxis]||0)-(isOriginSide?computedOffset.crossAxis:0);crossAxisCoordlimitMax&&(crossAxisCoord=limitMax)}return{[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord}}}},size$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`size`,options:options$1,async fn(state){var _state$middlewareData,_state$middlewareData2;let{placement,rects,platform:platform$1,elements}=state,{apply:apply$2=()=>{},...detectOverflowOptions}=evaluate(options$1,state),overflow=await detectOverflow(state,detectOverflowOptions),side=getSide(placement),alignment=getAlignment(placement),isYAxis=getSideAxis(placement)===`y`,{width,height}=rects.floating,heightSide,widthSide;side===`top`||side===`bottom`?(heightSide=side,widthSide=alignment===(await(platform$1.isRTL==null?void 0:platform$1.isRTL(elements.floating))?`start`:`end`)?`left`:`right`):(widthSide=side,heightSide=alignment===`end`?`top`:`bottom`);let maximumClippingHeight=height-overflow.top-overflow.bottom,maximumClippingWidth=width-overflow.left-overflow.right,overflowAvailableHeight=min(height-overflow[heightSide],maximumClippingHeight),overflowAvailableWidth=min(width-overflow[widthSide],maximumClippingWidth),noShift=!state.middlewareData.shift,availableHeight=overflowAvailableHeight,availableWidth=overflowAvailableWidth;if((_state$middlewareData=state.middlewareData.shift)!=null&&_state$middlewareData.enabled.x&&(availableWidth=maximumClippingWidth),(_state$middlewareData2=state.middlewareData.shift)!=null&&_state$middlewareData2.enabled.y&&(availableHeight=maximumClippingHeight),noShift&&!alignment){let xMin=max(overflow.left,0),xMax=max(overflow.right,0),yMin=max(overflow.top,0),yMax=max(overflow.bottom,0);isYAxis?availableWidth=width-2*(xMin!==0||xMax!==0?xMin+xMax:max(overflow.left,overflow.right)):availableHeight=height-2*(yMin!==0||yMax!==0?yMin+yMax:max(overflow.top,overflow.bottom))}await apply$2({...state,availableWidth,availableHeight});let nextDimensions=await platform$1.getDimensions(elements.floating);return width!==nextDimensions.width||height!==nextDimensions.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<`u`}function getNodeName(node$1){return isNode(node$1)?(node$1.nodeName||``).toLowerCase():`#document`}function getWindow(node$1){var _node$ownerDocument;return(node$1==null||(_node$ownerDocument=node$1.ownerDocument)==null?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node$1){var _ref;return(_ref=(isNode(node$1)?node$1.ownerDocument:node$1.document)||window.document)?.documentElement}function isNode(value$1){return hasWindow()?value$1 instanceof Node||value$1 instanceof getWindow(value$1).Node:!1}function isElement(value$1){return hasWindow()?value$1 instanceof Element||value$1 instanceof getWindow(value$1).Element:!1}function isHTMLElement(value$1){return hasWindow()?value$1 instanceof HTMLElement||value$1 instanceof getWindow(value$1).HTMLElement:!1}function isShadowRoot(value$1){return!hasWindow()||typeof ShadowRoot>`u`?!1:value$1 instanceof ShadowRoot||value$1 instanceof getWindow(value$1).ShadowRoot}function isOverflowElement(element$3){let{overflow,overflowX,overflowY,display}=getComputedStyle$1(element$3);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&![`inline`,`contents`].includes(display)}function isTableElement(element$3){return[`table`,`td`,`th`].includes(getNodeName(element$3))}function isTopLayer(element$3){return[`:popover-open`,`:modal`].some(selector=>{try{return element$3.matches(selector)}catch{return!1}})}function isContainingBlock(elementOrCss){let webkit=isWebKit(),css=isElement(elementOrCss)?getComputedStyle$1(elementOrCss):elementOrCss;return[`transform`,`translate`,`scale`,`rotate`,`perspective`].some(value$1=>css[value$1]?css[value$1]!==`none`:!1)||(css.containerType?css.containerType!==`normal`:!1)||!webkit&&(css.backdropFilter?css.backdropFilter!==`none`:!1)||!webkit&&(css.filter?css.filter!==`none`:!1)||[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`].some(value$1=>(css.willChange||``).includes(value$1))||[`paint`,`layout`,`strict`,`content`].some(value$1=>(css.contain||``).includes(value$1))}function getContainingBlock(element$3){let currentNode=getParentNode(element$3);for(;isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode);){if(isContainingBlock(currentNode))return currentNode;if(isTopLayer(currentNode))return null;currentNode=getParentNode(currentNode)}return null}function isWebKit(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}function isLastTraversableNode(node$1){return[`html`,`body`,`#document`].includes(getNodeName(node$1))}function getComputedStyle$1(element$3){return getWindow(element$3).getComputedStyle(element$3)}function getNodeScroll(element$3){return isElement(element$3)?{scrollLeft:element$3.scrollLeft,scrollTop:element$3.scrollTop}:{scrollLeft:element$3.scrollX,scrollTop:element$3.scrollY}}function getParentNode(node$1){if(getNodeName(node$1)===`html`)return node$1;let result=node$1.assignedSlot||node$1.parentNode||isShadowRoot(node$1)&&node$1.host||getDocumentElement(node$1);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node$1){let parentNode=getParentNode(node$1);return isLastTraversableNode(parentNode)?node$1.ownerDocument?node$1.ownerDocument.body:node$1.body:isHTMLElement(parentNode)&&isOverflowElement(parentNode)?parentNode:getNearestOverflowAncestor(parentNode)}function getOverflowAncestors(node$1,list$2,traverseIframes){var _node$ownerDocument2;list$2===void 0&&(list$2=[]),traverseIframes===void 0&&(traverseIframes=!0);let scrollableAncestor=getNearestOverflowAncestor(node$1),isBody=scrollableAncestor===(_node$ownerDocument2=node$1.ownerDocument)?.body,win=getWindow(scrollableAncestor);if(isBody){let frameElement=getFrameElement(win);return list$2.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],frameElement&&traverseIframes?getOverflowAncestors(frameElement):[])}return list$2.concat(scrollableAncestor,getOverflowAncestors(scrollableAncestor,[],traverseIframes))}function getFrameElement(win){return win.parent&&Object.getPrototypeOf(win.parent)?win.frameElement:null}function getCssDimensions(element$3){let css=getComputedStyle$1(element$3),width=parseFloat(css.width)||0,height=parseFloat(css.height)||0,hasOffset=isHTMLElement(element$3),offsetWidth=hasOffset?element$3.offsetWidth:width,offsetHeight=hasOffset?element$3.offsetHeight:height,shouldFallback=round(width)!==offsetWidth||round(height)!==offsetHeight;return shouldFallback&&(width=offsetWidth,height=offsetHeight),{width,height,$:shouldFallback}}function unwrapElement$1(element$3){return isElement(element$3)?element$3:element$3.contextElement}function getScale(element$3){let domElement=unwrapElement$1(element$3);if(!isHTMLElement(domElement))return createCoords(1);let rect=domElement.getBoundingClientRect(),{width,height,$:$$2}=getCssDimensions(domElement),x$3=($$2?round(rect.width):rect.width)/width,y$3=($$2?round(rect.height):rect.height)/height;return(!x$3||!Number.isFinite(x$3))&&(x$3=1),(!y$3||!Number.isFinite(y$3))&&(y$3=1),{x:x$3,y:y$3}}const noOffsets=createCoords(0);function getVisualOffsets(element$3){let win=getWindow(element$3);return!isWebKit()||!win.visualViewport?noOffsets:{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}}function shouldAddVisualOffsets(element$3,isFixed,floatingOffsetParent){return isFixed===void 0&&(isFixed=!1),!floatingOffsetParent||isFixed&&floatingOffsetParent!==getWindow(element$3)?!1:isFixed}function getBoundingClientRect(element$3,includeScale,isFixedStrategy,offsetParent){includeScale===void 0&&(includeScale=!1),isFixedStrategy===void 0&&(isFixedStrategy=!1);let clientRect=element$3.getBoundingClientRect(),domElement=unwrapElement$1(element$3),scale$1=createCoords(1);includeScale&&(offsetParent?isElement(offsetParent)&&(scale$1=getScale(offsetParent)):scale$1=getScale(element$3));let visualOffsets=shouldAddVisualOffsets(domElement,isFixedStrategy,offsetParent)?getVisualOffsets(domElement):createCoords(0),x$3=(clientRect.left+visualOffsets.x)/scale$1.x,y$3=(clientRect.top+visualOffsets.y)/scale$1.y,width=clientRect.width/scale$1.x,height=clientRect.height/scale$1.y;if(domElement){let win=getWindow(domElement),offsetWin=offsetParent&&isElement(offsetParent)?getWindow(offsetParent):offsetParent,currentWin=win,currentIFrame=getFrameElement(currentWin);for(;currentIFrame&&offsetParent&&offsetWin!==currentWin;){let iframeScale=getScale(currentIFrame),iframeRect=currentIFrame.getBoundingClientRect(),css=getComputedStyle$1(currentIFrame),left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css.paddingLeft))*iframeScale.x,top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css.paddingTop))*iframeScale.y;x$3*=iframeScale.x,y$3*=iframeScale.y,width*=iframeScale.x,height*=iframeScale.y,x$3+=left,y$3+=top,currentWin=getWindow(currentIFrame),currentIFrame=getFrameElement(currentWin)}}return rectToClientRect({width,height,x:x$3,y:y$3})}function getWindowScrollBarX(element$3,rect){let leftScroll=getNodeScroll(element$3).scrollLeft;return rect?rect.left+leftScroll:getBoundingClientRect(getDocumentElement(element$3)).left+leftScroll}function getHTMLOffset(documentElement,scroll,ignoreScrollbarX){ignoreScrollbarX===void 0&&(ignoreScrollbarX=!1);let htmlRect=documentElement.getBoundingClientRect(),x$3=htmlRect.left+scroll.scrollLeft-(ignoreScrollbarX?0:getWindowScrollBarX(documentElement,htmlRect)),y$3=htmlRect.top+scroll.scrollTop;return{x:x$3,y:y$3}}function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){let{elements,rect,offsetParent,strategy}=_ref,isFixed=strategy===`fixed`,documentElement=getDocumentElement(offsetParent),topLayer=elements?isTopLayer(elements.floating):!1;if(offsetParent===documentElement||topLayer&&isFixed)return rect;let scroll={scrollLeft:0,scrollTop:0},scale$1=createCoords(1),offsets=createCoords(0),isOffsetParentAnElement=isHTMLElement(offsetParent);if((isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&((getNodeName(offsetParent)!==`body`||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isHTMLElement(offsetParent))){let offsetRect=getBoundingClientRect(offsetParent);scale$1=getScale(offsetParent),offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}let htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll,!0):createCoords(0);return{width:rect.width*scale$1.x,height:rect.height*scale$1.y,x:rect.x*scale$1.x-scroll.scrollLeft*scale$1.x+offsets.x+htmlOffset.x,y:rect.y*scale$1.y-scroll.scrollTop*scale$1.y+offsets.y+htmlOffset.y}}function getClientRects(element$3){return Array.from(element$3.getClientRects())}function getDocumentRect(element$3){let html$5=getDocumentElement(element$3),scroll=getNodeScroll(element$3),body$2=element$3.ownerDocument.body,width=max(html$5.scrollWidth,html$5.clientWidth,body$2.scrollWidth,body$2.clientWidth),height=max(html$5.scrollHeight,html$5.clientHeight,body$2.scrollHeight,body$2.clientHeight),x$3=-scroll.scrollLeft+getWindowScrollBarX(element$3),y$3=-scroll.scrollTop;return getComputedStyle$1(body$2).direction===`rtl`&&(x$3+=max(html$5.clientWidth,body$2.clientWidth)-width),{width,height,x:x$3,y:y$3}}function getViewportRect(element$3,strategy){let win=getWindow(element$3),html$5=getDocumentElement(element$3),visualViewport=win.visualViewport,width=html$5.clientWidth,height=html$5.clientHeight,x$3=0,y$3=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;let visualViewportBased=isWebKit();(!visualViewportBased||visualViewportBased&&strategy===`fixed`)&&(x$3=visualViewport.offsetLeft,y$3=visualViewport.offsetTop)}return{width,height,x:x$3,y:y$3}}function getInnerBoundingClientRect(element$3,strategy){let clientRect=getBoundingClientRect(element$3,!0,strategy===`fixed`),top=clientRect.top+element$3.clientTop,left=clientRect.left+element$3.clientLeft,scale$1=isHTMLElement(element$3)?getScale(element$3):createCoords(1),width=element$3.clientWidth*scale$1.x,height=element$3.clientHeight*scale$1.y,x$3=left*scale$1.x,y$3=top*scale$1.y;return{width,height,x:x$3,y:y$3}}function getClientRectFromClippingAncestor(element$3,clippingAncestor,strategy){let rect;if(clippingAncestor===`viewport`)rect=getViewportRect(element$3,strategy);else if(clippingAncestor===`document`)rect=getDocumentRect(getDocumentElement(element$3));else if(isElement(clippingAncestor))rect=getInnerBoundingClientRect(clippingAncestor,strategy);else{let visualOffsets=getVisualOffsets(element$3);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.y-visualOffsets.y,width:clippingAncestor.width,height:clippingAncestor.height}}return rectToClientRect(rect)}function hasFixedPositionAncestor(element$3,stopNode){let parentNode=getParentNode(element$3);return parentNode===stopNode||!isElement(parentNode)||isLastTraversableNode(parentNode)?!1:getComputedStyle$1(parentNode).position===`fixed`||hasFixedPositionAncestor(parentNode,stopNode)}function getClippingElementAncestors(element$3,cache$1){let cachedResult=cache$1.get(element$3);if(cachedResult)return cachedResult;let result=getOverflowAncestors(element$3,[],!1).filter(el$1=>isElement(el$1)&&getNodeName(el$1)!==`body`),currentContainingBlockComputedStyle=null,elementIsFixed=getComputedStyle$1(element$3).position===`fixed`,currentNode=elementIsFixed?getParentNode(element$3):element$3;for(;isElement(currentNode)&&!isLastTraversableNode(currentNode);){let computedStyle=getComputedStyle$1(currentNode),currentNodeIsContaining=isContainingBlock(currentNode);!currentNodeIsContaining&&computedStyle.position===`fixed`&&(currentContainingBlockComputedStyle=null);let shouldDropCurrentNode=elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&computedStyle.position===`static`&&!!currentContainingBlockComputedStyle&&[`absolute`,`fixed`].includes(currentContainingBlockComputedStyle.position)||isOverflowElement(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element$3,currentNode);shouldDropCurrentNode?result=result.filter(ancestor=>ancestor!==currentNode):currentContainingBlockComputedStyle=computedStyle,currentNode=getParentNode(currentNode)}return cache$1.set(element$3,result),result}function getClippingRect(_ref){let{element:element$3,boundary,rootBoundary,strategy}=_ref,elementClippingAncestors=boundary===`clippingAncestors`?isTopLayer(element$3)?[]:getClippingElementAncestors(element$3,this._c):[].concat(boundary),clippingAncestors=[...elementClippingAncestors,rootBoundary],firstClippingAncestor=clippingAncestors[0],clippingRect=clippingAncestors.reduce((accRect,clippingAncestor)=>{let rect=getClientRectFromClippingAncestor(element$3,clippingAncestor,strategy);return accRect.top=max(rect.top,accRect.top),accRect.right=min(rect.right,accRect.right),accRect.bottom=min(rect.bottom,accRect.bottom),accRect.left=max(rect.left,accRect.left),accRect},getClientRectFromClippingAncestor(element$3,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}}function getDimensions(element$3){let{width,height}=getCssDimensions(element$3);return{width,height}}function getRectRelativeToOffsetParent(element$3,offsetParent,strategy){let isOffsetParentAnElement=isHTMLElement(offsetParent),documentElement=getDocumentElement(offsetParent),isFixed=strategy===`fixed`,rect=getBoundingClientRect(element$3,!0,isFixed,offsetParent),scroll={scrollLeft:0,scrollTop:0},offsets=createCoords(0);if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)if((getNodeName(offsetParent)!==`body`||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isOffsetParentAnElement){let offsetRect=getBoundingClientRect(offsetParent,!0,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}else documentElement&&(offsets.x=getWindowScrollBarX(documentElement));let htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll):createCoords(0),x$3=rect.left+scroll.scrollLeft-offsets.x-htmlOffset.x,y$3=rect.top+scroll.scrollTop-offsets.y-htmlOffset.y;return{x:x$3,y:y$3,width:rect.width,height:rect.height}}function isStaticPositioned(element$3){return getComputedStyle$1(element$3).position===`static`}function getTrueOffsetParent(element$3,polyfill){if(!isHTMLElement(element$3)||getComputedStyle$1(element$3).position===`fixed`)return null;if(polyfill)return polyfill(element$3);let rawOffsetParent=element$3.offsetParent;return getDocumentElement(element$3)===rawOffsetParent&&(rawOffsetParent=rawOffsetParent.ownerDocument.body),rawOffsetParent}function getOffsetParent(element$3,polyfill){let win=getWindow(element$3);if(isTopLayer(element$3))return win;if(!isHTMLElement(element$3)){let svgOffsetParent=getParentNode(element$3);for(;svgOffsetParent&&!isLastTraversableNode(svgOffsetParent);){if(isElement(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent))return svgOffsetParent;svgOffsetParent=getParentNode(svgOffsetParent)}return win}let offsetParent=getTrueOffsetParent(element$3,polyfill);for(;offsetParent&&isTableElement(offsetParent)&&isStaticPositioned(offsetParent);)offsetParent=getTrueOffsetParent(offsetParent,polyfill);return offsetParent&&isLastTraversableNode(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)?win:offsetParent||getContainingBlock(element$3)||win}const getElementRects=async function(data$12){let getOffsetParentFn=this.getOffsetParent||getOffsetParent,getDimensionsFn=this.getDimensions,floatingDimensions=await getDimensionsFn(data$12.floating);return{reference:getRectRelativeToOffsetParent(data$12.reference,await getOffsetParentFn(data$12.floating),data$12.strategy),floating:{x:0,y:0,width:floatingDimensions.width,height:floatingDimensions.height}}};function isRTL(element$3){return getComputedStyle$1(element$3).direction===`rtl`}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(a$2,b$4){return a$2.x===b$4.x&&a$2.y===b$4.y&&a$2.width===b$4.width&&a$2.height===b$4.height}function observeMove(element$3,onMove){let io$2=null,timeoutId,root$3=getDocumentElement(element$3);function cleanup(){var _io;clearTimeout(timeoutId),(_io=io$2)==null||_io.disconnect(),io$2=null}function refresh(skip,threshold){skip===void 0&&(skip=!1),threshold===void 0&&(threshold=1),cleanup();let elementRectForRootMargin=element$3.getBoundingClientRect(),{left,top,width,height}=elementRectForRootMargin;if(skip||onMove(),!width||!height)return;let insetTop=floor(top),insetRight=floor(root$3.clientWidth-(left+width)),insetBottom=floor(root$3.clientHeight-(top+height)),insetLeft=floor(left),rootMargin=-insetTop+`px `+-insetRight+`px `+-insetBottom+`px `+-insetLeft+`px`,options$1={rootMargin,threshold:max(0,min(1,threshold))||1},isFirstUpdate=!0;function handleObserve(entries){let ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate)return refresh();ratio?refresh(!1,ratio):timeoutId=setTimeout(()=>{refresh(!1,1e-7)},1e3)}ratio===1&&!rectsAreEqual(elementRectForRootMargin,element$3.getBoundingClientRect())&&refresh(),isFirstUpdate=!1}try{io$2=new IntersectionObserver(handleObserve,{...options$1,root:root$3.ownerDocument})}catch{io$2=new IntersectionObserver(handleObserve,options$1)}io$2.observe(element$3)}return refresh(!0),cleanup}function autoUpdate(reference,floating,update,options$1){options$1===void 0&&(options$1={});let{ancestorScroll=!0,ancestorResize=!0,elementResize=typeof ResizeObserver==`function`,layoutShift=typeof IntersectionObserver==`function`,animationFrame=!1}=options$1,referenceEl=unwrapElement$1(reference),ancestors=ancestorScroll||ancestorResize?[...referenceEl?getOverflowAncestors(referenceEl):[],...getOverflowAncestors(floating)]:[];ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.addEventListener(`scroll`,update,{passive:!0}),ancestorResize&&ancestor.addEventListener(`resize`,update)});let cleanupIo=referenceEl&&layoutShift?observeMove(referenceEl,update):null,reobserveFrame=-1,resizeObserver=null;elementResize&&(resizeObserver=new ResizeObserver(_ref=>{let[firstEntry]=_ref;firstEntry&&firstEntry.target===referenceEl&&resizeObserver&&(resizeObserver.unobserve(floating),cancelAnimationFrame(reobserveFrame),reobserveFrame=requestAnimationFrame(()=>{var _resizeObserver;(_resizeObserver=resizeObserver)==null||_resizeObserver.observe(floating)})),update()}),referenceEl&&!animationFrame&&resizeObserver.observe(referenceEl),resizeObserver.observe(floating));let frameId,prevRefRect=animationFrame?getBoundingClientRect(reference):null;animationFrame&&frameLoop();function frameLoop(){let nextRefRect=getBoundingClientRect(reference);prevRefRect&&!rectsAreEqual(prevRefRect,nextRefRect)&&update(),prevRefRect=nextRefRect,frameId=requestAnimationFrame(frameLoop)}return update(),()=>{var _resizeObserver2;ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.removeEventListener(`scroll`,update),ancestorResize&&ancestor.removeEventListener(`resize`,update)}),cleanupIo?.(),(_resizeObserver2=resizeObserver)==null||_resizeObserver2.disconnect(),resizeObserver=null,animationFrame&&cancelAnimationFrame(frameId)}}const offset=offset$1,shift=shift$1,flip=flip$1,size=size$1,hide=hide$1,arrow$2=arrow$1,limitShift=limitShift$1,computePosition$1=(reference,floating,options$1)=>{let cache$1=new Map,mergedOptions={platform,...options$1},platformWithCache={...mergedOptions.platform,_c:cache$1};return computePosition(reference,floating,{...mergedOptions,platform:platformWithCache})};function isComponentPublicInstance(target$1){return typeof target$1==`object`&&!!target$1&&`$el`in target$1}function unwrapElement(target$1){if(isComponentPublicInstance(target$1)){let element$3=target$1.$el;return isNode(element$3)&&getNodeName(element$3)===`#comment`?null:element$3}return target$1}function toValue$2(source){return typeof source==`function`?source():unref(source)}function arrow(options$1){return{name:`arrow`,options:options$1,fn(args){let element$3=unwrapElement(toValue$2(options$1.element));return element$3==null?{}:arrow$2({element:element$3,padding:options$1.padding}).fn(args)}}}function getDPR(element$3){if(typeof window>`u`)return 1;let win=element$3.ownerDocument.defaultView||window;return win.devicePixelRatio||1}function roundByDPR(element$3,value$1){let dpr=getDPR(element$3);return Math.round(value$1*dpr)/dpr}function useFloating(reference,floating,options$1){options$1===void 0&&(options$1={});let whileElementsMountedOption=options$1.whileElementsMounted,openOption=computed(()=>{var _toValue;return(_toValue=toValue$2(options$1.open))??!0}),middlewareOption=computed(()=>toValue$2(options$1.middleware)),placementOption=computed(()=>{var _toValue2;return(_toValue2=toValue$2(options$1.placement))??`bottom`}),strategyOption=computed(()=>{var _toValue3;return(_toValue3=toValue$2(options$1.strategy))??`absolute`}),transformOption=computed(()=>{var _toValue4;return(_toValue4=toValue$2(options$1.transform))??!0}),referenceElement=computed(()=>unwrapElement(reference.value)),floatingElement=computed(()=>unwrapElement(floating.value)),x$3=ref(0),y$3=ref(0),strategy=ref(strategyOption.value),placement=ref(placementOption.value),middlewareData=shallowRef({}),isPositioned=ref(!1),floatingStyles=computed(()=>{let initialStyles={position:strategy.value,left:`0`,top:`0`};if(!floatingElement.value)return initialStyles;let xVal=roundByDPR(floatingElement.value,x$3.value),yVal=roundByDPR(floatingElement.value,y$3.value);return transformOption.value?{...initialStyles,transform:`translate(`+xVal+`px, `+yVal+`px)`,...getDPR(floatingElement.value)>=1.5&&{willChange:`transform`}}:{position:strategy.value,left:xVal+`px`,top:yVal+`px`}}),whileElementsMountedCleanup;function update(){if(referenceElement.value==null||floatingElement.value==null)return;let open$1=openOption.value;computePosition$1(referenceElement.value,floatingElement.value,{middleware:middlewareOption.value,placement:placementOption.value,strategy:strategyOption.value}).then(position$2=>{x$3.value=position$2.x,y$3.value=position$2.y,strategy.value=position$2.strategy,placement.value=position$2.placement,middlewareData.value=position$2.middlewareData,isPositioned.value=open$1!==!1})}function cleanup(){typeof whileElementsMountedCleanup==`function`&&(whileElementsMountedCleanup(),whileElementsMountedCleanup=void 0)}function attach(){if(cleanup(),whileElementsMountedOption===void 0){update();return}if(referenceElement.value!=null&&floatingElement.value!=null){whileElementsMountedCleanup=whileElementsMountedOption(referenceElement.value,floatingElement.value,update);return}}function reset(){openOption.value||(isPositioned.value=!1)}return watch([middlewareOption,placementOption,strategyOption,openOption],update,{flush:`sync`}),watch([referenceElement,floatingElement],attach,{flush:`sync`}),watch(openOption,reset,{flush:`sync`}),getCurrentScope()&&onScopeDispose(cleanup),{x:shallowReadonly(x$3),y:shallowReadonly(y$3),strategy:shallowReadonly(strategy),placement:shallowReadonly(placement),middlewareData:shallowReadonly(middlewareData),isPositioned:shallowReadonly(isPositioned),floatingStyles,update}}function renderSlotFragments(children){return children?children.flatMap(child=>child.type===Fragment?renderSlotFragments(child.children):[child]):[]}const Slot=defineComponent({name:`PrimitiveSlot`,inheritAttrs:!1,setup(_$2,{attrs,slots}){return()=>{if(!slots.default)return null;let children=renderSlotFragments(slots.default()),firstNonCommentChildrenIndex=children.findIndex(child=>child.type!==Comment);if(firstNonCommentChildrenIndex===-1)return children;let firstNonCommentChildren=children[firstNonCommentChildrenIndex];delete firstNonCommentChildren.props?.ref;let mergedProps=firstNonCommentChildren.props?mergeProps(attrs,firstNonCommentChildren.props):attrs,cloned=cloneVNode({...firstNonCommentChildren,props:{}},mergedProps);return children.length===1?cloned:(children[firstNonCommentChildrenIndex]=cloned,children)}}}),SELF_CLOSING_TAGS=[`area`,`img`,`input`],Primitive=defineComponent({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(props,{attrs,slots}){let asTag=props.asChild?`template`:props.as;return typeof asTag==`string`&&SELF_CLOSING_TAGS.includes(asTag)?()=>h(asTag,attrs):asTag===`template`?()=>h(Slot,attrs,{default:slots.default}):()=>h(props.as,attrs,{default:slots.default})}}),_sfc_main$18=defineComponent({__name:`VisuallyHidden`,props:{feature:{default:`focusable`},asChild:{type:Boolean},as:{default:`span`}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{as:_ctx.as,"as-child":_ctx.asChild,"aria-hidden":_ctx.feature===`focusable`?`true`:void 0,"data-hidden":_ctx.feature===`fully-hidden`?``:void 0,tabindex:_ctx.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:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}});function createContext(providerComponentName,contextName){let symbolDescription=typeof providerComponentName==`string`&&!contextName?`${providerComponentName}Context`:contextName,injectionKey=Symbol(symbolDescription),injectContext=fallback=>{let context$1=inject(injectionKey,fallback);if(context$1||context$1===null)return context$1;throw Error(`Injection \`${injectionKey.toString()}\` not found. Component must be used within ${Array.isArray(providerComponentName)?`one of the following components: ${providerComponentName.join(`, `)}`:`\`${providerComponentName}\``}`)},provideContext=contextValue=>(provide(injectionKey,contextValue),contextValue);return[injectContext,provideContext]}const[injectConfigProviderContext,provideConfigProviderContext]=createContext(`ConfigProvider`);function useForwardExpose(){let instance=getCurrentInstance(),currentRef=ref(),currentElement=computed(()=>[`#text`,`#comment`].includes(currentRef.value?.$el.nodeName)?currentRef.value?.$el.nextElementSibling:unrefElement(currentRef)),localExpose=Object.assign({},instance.exposed),ret={};for(let key$1 in instance.props)Object.defineProperty(ret,key$1,{enumerable:!0,configurable:!0,get:()=>instance.props[key$1]});if(Object.keys(localExpose).length>0)for(let key$1 in localExpose)Object.defineProperty(ret,key$1,{enumerable:!0,configurable:!0,get:()=>localExpose[key$1]});Object.defineProperty(ret,`$el`,{enumerable:!0,configurable:!0,get:()=>instance.vnode.el}),instance.exposed=ret;function forwardRef(ref2){currentRef.value=ref2,ref2&&(Object.defineProperty(ret,`$el`,{enumerable:!0,configurable:!0,get:()=>ref2 instanceof Element?ref2:ref2.$el}),instance.exposed=ret)}return{forwardRef,currentRef,currentElement}}let count=0;function useId(deterministicId,prefix=`reka`){if(deterministicId)return deterministicId;let configProviderContext=injectConfigProviderContext({useId:void 0});return Object.hasOwn(vue_runtime_esm_bundler_exports,`useId`)?`${prefix}-${useId$1?.()}`:configProviderContext.useId?`${prefix}-${configProviderContext.useId()}`:`${prefix}-${++count}`}function useStateMachine(initialState,machine){let state=ref(initialState);function reducer(event){let nextState=machine[state.value][event];return nextState??state.value}let dispatch=event=>{state.value=reducer(event)};return{state,dispatch}}function usePresence(present,node$1){let stylesRef=ref({}),prevAnimationNameRef=ref(`none`),prevPresentRef=ref(present),initialState=present.value?`mounted`:`unmounted`,timeoutId,ownerWindow=node$1.value?.ownerDocument.defaultView??defaultWindow,{state,dispatch}=useStateMachine(initialState,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),dispatchCustomEvent=name$2=>{if(isClient$1){let customEvent=new CustomEvent(name$2,{bubbles:!1,cancelable:!1});node$1.value?.dispatchEvent(customEvent)}};watch(present,async(currentPresent,prevPresent)=>{let hasPresentChanged=prevPresent!==currentPresent;if(await nextTick(),hasPresentChanged){let prevAnimationName=prevAnimationNameRef.value,currentAnimationName=getAnimationName(node$1.value);if(currentPresent)dispatch(`MOUNT`),dispatchCustomEvent(`enter`),currentAnimationName===`none`&&dispatchCustomEvent(`after-enter`);else if(currentAnimationName===`none`||currentAnimationName===`undefined`||stylesRef.value?.display===`none`)dispatch(`UNMOUNT`),dispatchCustomEvent(`leave`),dispatchCustomEvent(`after-leave`);else{let isAnimating=prevAnimationName!==currentAnimationName;prevPresent&&isAnimating?(dispatch(`ANIMATION_OUT`),dispatchCustomEvent(`leave`)):(dispatch(`UNMOUNT`),dispatchCustomEvent(`after-leave`))}}},{immediate:!0});let handleAnimationEnd=event=>{let currentAnimationName=getAnimationName(node$1.value),isCurrentAnimation=currentAnimationName.includes(event.animationName),directionName=state.value===`mounted`?`enter`:`leave`;if(event.target===node$1.value&&isCurrentAnimation&&(dispatchCustomEvent(`after-${directionName}`),dispatch(`ANIMATION_END`),!prevPresentRef.value)){let currentFillMode=node$1.value.style.animationFillMode;node$1.value.style.animationFillMode=`forwards`,timeoutId=ownerWindow?.setTimeout(()=>{node$1.value?.style.animationFillMode===`forwards`&&(node$1.value.style.animationFillMode=currentFillMode)})}event.target===node$1.value&¤tAnimationName===`none`&&dispatch(`ANIMATION_END`)},handleAnimationStart=event=>{event.target===node$1.value&&(prevAnimationNameRef.value=getAnimationName(node$1.value))},watcher=watch(node$1,(newNode,oldNode)=>{newNode?(stylesRef.value=getComputedStyle(newNode),newNode.addEventListener(`animationstart`,handleAnimationStart),newNode.addEventListener(`animationcancel`,handleAnimationEnd),newNode.addEventListener(`animationend`,handleAnimationEnd)):(dispatch(`ANIMATION_END`),timeoutId!==void 0&&ownerWindow?.clearTimeout(timeoutId),oldNode?.removeEventListener(`animationstart`,handleAnimationStart),oldNode?.removeEventListener(`animationcancel`,handleAnimationEnd),oldNode?.removeEventListener(`animationend`,handleAnimationEnd))},{immediate:!0}),stateWatcher=watch(state,()=>{let currentAnimationName=getAnimationName(node$1.value);prevAnimationNameRef.value=state.value===`mounted`?currentAnimationName:`none`});onUnmounted(()=>{watcher(),stateWatcher()});let isPresent=computed(()=>[`mounted`,`unmountSuspended`].includes(state.value));return{isPresent}}function getAnimationName(node$1){return node$1&&getComputedStyle(node$1).animationName||`none`}const Presence=defineComponent({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(props,{slots,expose}){let{present,forceMount}=toRefs(props),node$1=ref(),{isPresent}=usePresence(present,node$1);expose({present:isPresent});let children=slots.default({present:isPresent.value});children=renderSlotFragments(children||[]);let instance=getCurrentInstance();if(children&&children?.length>1){let componentName=instance?.parent?.type.name?`<${instance.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${componentName}\` 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(line=>` - ${line}`).join(` `)].join(` -`))}return()=>forceMount.value||present.value||isPresent.value?h(slots.default({present:isPresent.value})[0],{ref:v$2=>{let el$1=unrefElement(v$2);return el$1?.hasAttribute===void 0||(el$1?.hasAttribute(`data-reka-popper-content-wrapper`)?node$1.value=el$1.firstElementChild:node$1.value=el$1),el$1}}):null}}),[injectDialogRootContext,provideDialogRootContext]=createContext(`DialogRoot`),_sfc_main$8=defineComponent({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:[`update:open`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,open$1=useVModel(props,`open`,emit$1,{defaultValue:props.defaultOpen,passive:props.open===void 0}),triggerElement=ref(),contentElement=ref(),{modal}=toRefs(props);return provideDialogRootContext({open:open$1,modal,openModal:()=>{open$1.value=!0},onOpenChange:value$1=>{open$1.value=value$1},onOpenToggle:()=>{open$1.value=!open$1.value},contentId:``,titleId:``,descriptionId:``,triggerElement,contentElement}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`,{open:unref(open$1),close:()=>open$1.value=!1})}});function useEmitAsProps(emit$1){let vm$1=getCurrentInstance(),events=vm$1?.type.emits,result={};return events?.length||console.warn(`No emitted event found. Please check component: ${vm$1?.type.__name}`),events?.forEach(ev$1=>{result[toHandlerKey(camelize(ev$1))]=(...arg)=>emit$1(ev$1,...arg)}),result}function getActiveElement(){let activeElement=document.activeElement;if(activeElement==null)return null;for(;activeElement!=null&&activeElement.shadowRoot!=null&&activeElement.shadowRoot.activeElement!=null;)activeElement=activeElement.shadowRoot.activeElement;return activeElement}const SELECTION_KEYS=[`Enter`,` `],FIRST_KEYS=[`ArrowDown`,`PageUp`,`Home`],LAST_KEYS=[`ArrowUp`,`PageDown`,`End`],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS,`ArrowRight`],rtl:[...SELECTION_KEYS,`ArrowLeft`]};function getOpenState(open$1){return open$1?`open`:`closed`}const useFocusStackState=createGlobalState(()=>{let stack$1=ref([]);return stack$1});function createFocusScopesStack(){let stack$1=useFocusStackState();return{add(focusScope){let activeFocusScope=stack$1.value[0];focusScope!==activeFocusScope&&activeFocusScope?.pause(),stack$1.value=arrayRemove(stack$1.value,focusScope),stack$1.value.unshift(focusScope)},remove(focusScope){stack$1.value=arrayRemove(stack$1.value,focusScope),stack$1.value[0]?.resume()}}}function arrayRemove(array,item){let updatedArray=[...array],index$1=updatedArray.indexOf(item);return index$1!==-1&&updatedArray.splice(index$1,1),updatedArray}function removeLinks(items){return items.filter(item=>item.tagName!==`A`)}const AUTOFOCUS_ON_MOUNT=`focusScope.autoFocusOnMount`,AUTOFOCUS_ON_UNMOUNT=`focusScope.autoFocusOnUnmount`,EVENT_OPTIONS={bubbles:!1,cancelable:!0};function focusFirst(candidates,{select=!1}={}){let previouslyFocusedElement=getActiveElement();for(let candidate of candidates)if(focus(candidate,{select}),getActiveElement()!==previouslyFocusedElement)return!0}function getTabbableEdges(container){let candidates=getTabbableCandidates(container),first=findVisible(candidates,container),last=findVisible(candidates.reverse(),container);return[first,last]}function getTabbableCandidates(container){let nodes=[],walker=document.createTreeWalker(container,NodeFilter.SHOW_ELEMENT,{acceptNode:node$1=>{let isHiddenInput=node$1.tagName===`INPUT`&&node$1.type===`hidden`;return node$1.disabled||node$1.hidden||isHiddenInput?NodeFilter.FILTER_SKIP:node$1.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;walker.nextNode();)nodes.push(walker.currentNode);return nodes}function findVisible(elements,container){for(let element$3 of elements)if(!isHidden(element$3,{upTo:container}))return element$3}function isHidden(node$1,{upTo}){if(getComputedStyle(node$1).visibility===`hidden`)return!0;for(;node$1;){if(upTo!==void 0&&node$1===upTo)return!1;if(getComputedStyle(node$1).display===`none`)return!0;node$1=node$1.parentElement}return!1}function isSelectableInput(element$3){return element$3 instanceof HTMLInputElement&&`select`in element$3}function focus(element$3,{select=!1}={}){if(element$3&&element$3.focus){let previouslyFocusedElement=getActiveElement();element$3.focus({preventScroll:!0}),element$3!==previouslyFocusedElement&&isSelectableInput(element$3)&&select&&element$3.select()}}const _sfc_main$23=defineComponent({__name:`FocusScope`,props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:[`mountAutoFocus`,`unmountAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,{currentRef,currentElement}=useForwardExpose(),lastFocusedElementRef=ref(null),focusScopesStack=createFocusScopesStack(),focusScope=reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});watchEffect(cleanupFn=>{if(!isClient$1)return;let container=currentElement.value;if(!props.trapped)return;function handleFocusIn(event){if(focusScope.paused||!container)return;let target$1=event.target;container.contains(target$1)?lastFocusedElementRef.value=target$1:focus(lastFocusedElementRef.value,{select:!0})}function handleFocusOut(event){if(focusScope.paused||!container)return;let relatedTarget=event.relatedTarget;relatedTarget!==null&&(container.contains(relatedTarget)||focus(lastFocusedElementRef.value,{select:!0}))}function handleMutations$1(mutations$1){let isLastFocusedElementExist=container.contains(lastFocusedElementRef.value);isLastFocusedElementExist||focus(container)}document.addEventListener(`focusin`,handleFocusIn),document.addEventListener(`focusout`,handleFocusOut);let mutationObserver=new MutationObserver(handleMutations$1);container&&mutationObserver.observe(container,{childList:!0,subtree:!0}),cleanupFn(()=>{document.removeEventListener(`focusin`,handleFocusIn),document.removeEventListener(`focusout`,handleFocusOut),mutationObserver.disconnect()})}),watchEffect(async cleanupFn=>{let container=currentElement.value;if(await nextTick(),!container)return;focusScopesStack.add(focusScope);let previouslyFocusedElement=getActiveElement(),hasFocusedCandidate=container.contains(previouslyFocusedElement);if(!hasFocusedCandidate){let mountEvent=new CustomEvent(AUTOFOCUS_ON_MOUNT,EVENT_OPTIONS);container.addEventListener(AUTOFOCUS_ON_MOUNT,ev$1=>emits(`mountAutoFocus`,ev$1)),container.dispatchEvent(mountEvent),mountEvent.defaultPrevented||(focusFirst(removeLinks(getTabbableCandidates(container)),{select:!0}),getActiveElement()===previouslyFocusedElement&&focus(container))}cleanupFn(()=>{container.removeEventListener(AUTOFOCUS_ON_MOUNT,ev$1=>emits(`mountAutoFocus`,ev$1));let unmountEvent=new CustomEvent(AUTOFOCUS_ON_UNMOUNT,EVENT_OPTIONS),unmountEventHandler=ev$1=>{emits(`unmountAutoFocus`,ev$1)};container.addEventListener(AUTOFOCUS_ON_UNMOUNT,unmountEventHandler),container.dispatchEvent(unmountEvent),setTimeout(()=>{unmountEvent.defaultPrevented||focus(previouslyFocusedElement??document.body,{select:!0}),container.removeEventListener(AUTOFOCUS_ON_UNMOUNT,unmountEventHandler),focusScopesStack.remove(focusScope)},0)})});function handleKeyDown(event){if(!props.loop&&!props.trapped||focusScope.paused)return;let isTabKey=event.key===`Tab`&&!event.altKey&&!event.ctrlKey&&!event.metaKey,focusedElement=getActiveElement();if(isTabKey&&focusedElement){let container=event.currentTarget,[first,last]=getTabbableEdges(container),hasTabbableElementsInside=first&&last;hasTabbableElementsInside?!event.shiftKey&&focusedElement===last?(event.preventDefault(),props.loop&&focus(first,{select:!0})):event.shiftKey&&focusedElement===first&&(event.preventDefault(),props.loop&&focus(last,{select:!0})):focusedElement===container&&event.preventDefault()}}return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{ref_key:`currentRef`,ref:currentRef,tabindex:`-1`,"as-child":_ctx.asChild,as:_ctx.as,onKeydown:handleKeyDown},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as-child`,`as`]))}});function handleAndDispatchCustomEvent(name$2,handler,detail){let target$1=detail.originalEvent.target,event=new CustomEvent(name$2,{bubbles:!1,cancelable:!0,detail});handler&&target$1.addEventListener(name$2,handler,{once:!0}),target$1.dispatchEvent(event)}const POINTER_DOWN_OUTSIDE=`dismissableLayer.pointerDownOutside`,FOCUS_OUTSIDE=`dismissableLayer.focusOutside`;function isLayerExist(layerElement,targetElement){let targetLayer=targetElement.closest(`[data-dismissable-layer]`),mainLayer=layerElement.dataset.dismissableLayer===``?layerElement:layerElement.querySelector(`[data-dismissable-layer]`),nodeList=Array.from(layerElement.ownerDocument.querySelectorAll(`[data-dismissable-layer]`));return!!(targetLayer&&(mainLayer===targetLayer||nodeList.indexOf(mainLayer){});return watchEffect(cleanupFn=>{if(!isClient$1||!toValue$1(enabled$1))return;let handlePointerDown=async event=>{let target$1=event.target;if(!(!element$3?.value||!target$1)){if(isLayerExist(element$3.value,target$1)){isPointerInsideDOMTree.value=!1;return}if(event.target&&!isPointerInsideDOMTree.value){let handleAndDispatchPointerDownOutsideEvent=function(){handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE,onPointerDownOutside,eventDetail)},eventDetail={originalEvent:event};event.pointerType===`touch`?(ownerDocument.removeEventListener(`click`,handleClickRef.value),handleClickRef.value=handleAndDispatchPointerDownOutsideEvent,ownerDocument.addEventListener(`click`,handleClickRef.value,{once:!0})):handleAndDispatchPointerDownOutsideEvent()}else ownerDocument.removeEventListener(`click`,handleClickRef.value);isPointerInsideDOMTree.value=!1}},timerId=window.setTimeout(()=>{ownerDocument.addEventListener(`pointerdown`,handlePointerDown)},0);cleanupFn(()=>{window.clearTimeout(timerId),ownerDocument.removeEventListener(`pointerdown`,handlePointerDown),ownerDocument.removeEventListener(`click`,handleClickRef.value)})}),{onPointerDownCapture:()=>{toValue$1(enabled$1)&&(isPointerInsideDOMTree.value=!0)}}}function useFocusOutside(onFocusOutside,element$3,enabled$1=!0){let ownerDocument=element$3?.value?.ownerDocument??globalThis?.document,isFocusInsideDOMTree=ref(!1);return watchEffect(cleanupFn=>{if(!isClient$1||!toValue$1(enabled$1))return;let handleFocus=async event=>{if(!element$3?.value)return;await nextTick(),await nextTick();let target$1=event.target;if(!(!element$3.value||!target$1||isLayerExist(element$3.value,target$1))&&event.target&&!isFocusInsideDOMTree.value){let eventDetail={originalEvent:event};handleAndDispatchCustomEvent(FOCUS_OUTSIDE,onFocusOutside,eventDetail)}};ownerDocument.addEventListener(`focusin`,handleFocus),cleanupFn(()=>ownerDocument.removeEventListener(`focusin`,handleFocus))}),{onFocusCapture:()=>{toValue$1(enabled$1)&&(isFocusInsideDOMTree.value=!0)},onBlurCapture:()=>{toValue$1(enabled$1)&&(isFocusInsideDOMTree.value=!1)}}}const context=reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_sfc_main$24=defineComponent({__name:`DismissableLayer`,props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`dismiss`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,{forwardRef,currentElement:layerElement}=useForwardExpose(),ownerDocument=computed(()=>layerElement.value?.ownerDocument??globalThis.document),layers=computed(()=>context.layersRoot),index$1=computed(()=>layerElement.value?Array.from(layers.value).indexOf(layerElement.value):-1),isBodyPointerEventsDisabled=computed(()=>context.layersWithOutsidePointerEventsDisabled.size>0),isPointerEventsEnabled=computed(()=>{let localLayers=Array.from(layers.value),[highestLayerWithOutsidePointerEventsDisabled]=[...context.layersWithOutsidePointerEventsDisabled].slice(-1),highestLayerWithOutsidePointerEventsDisabledIndex=localLayers.indexOf(highestLayerWithOutsidePointerEventsDisabled);return index$1.value>=highestLayerWithOutsidePointerEventsDisabledIndex}),pointerDownOutside=usePointerDownOutside(async event=>{let isPointerDownOnBranch=[...context.branches].some(branch=>branch?.contains(event.target));!isPointerEventsEnabled.value||isPointerDownOnBranch||(emits(`pointerDownOutside`,event),emits(`interactOutside`,event),await nextTick(),event.defaultPrevented||emits(`dismiss`))},layerElement),focusOutside=useFocusOutside(event=>{let isFocusInBranch=[...context.branches].some(branch=>branch?.contains(event.target));isFocusInBranch||(emits(`focusOutside`,event),emits(`interactOutside`,event),event.defaultPrevented||emits(`dismiss`))},layerElement);onKeyStroke(`Escape`,event=>{let isHighestLayer=index$1.value===layers.value.size-1;isHighestLayer&&(emits(`escapeKeyDown`,event),event.defaultPrevented||emits(`dismiss`))});let originalBodyPointerEvents;return watchEffect(cleanupFn=>{layerElement.value&&(props.disableOutsidePointerEvents&&(context.layersWithOutsidePointerEventsDisabled.size===0&&(originalBodyPointerEvents=ownerDocument.value.body.style.pointerEvents,ownerDocument.value.body.style.pointerEvents=`none`),context.layersWithOutsidePointerEventsDisabled.add(layerElement.value)),layers.value.add(layerElement.value),cleanupFn(()=>{props.disableOutsidePointerEvents&&context.layersWithOutsidePointerEventsDisabled.size===1&&(ownerDocument.value.body.style.pointerEvents=originalBodyPointerEvents)}))}),watchEffect(cleanupFn=>{cleanupFn(()=>{layerElement.value&&(layers.value.delete(layerElement.value),context.layersWithOutsidePointerEventsDisabled.delete(layerElement.value))})}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{ref:unref(forwardRef),"as-child":_ctx.asChild,as:_ctx.as,"data-dismissable-layer":``,style:normalizeStyle({pointerEvents:isBodyPointerEventsDisabled.value?isPointerEventsEnabled.value?`auto`:`none`:void 0}),onFocusCapture:unref(focusOutside).onFocusCapture,onBlurCapture:unref(focusOutside).onBlurCapture,onPointerdownCapture:unref(pointerDownOutside).onPointerDownCapture},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),_sfc_main$22=defineComponent({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectDialogRootContext(),{forwardRef,currentElement:contentElement}=useForwardExpose();return rootContext.titleId||=useId(void 0,`reka-dialog-title`),rootContext.descriptionId||=useId(void 0,`reka-dialog-description`),onMounted(()=>{rootContext.contentElement=contentElement,getActiveElement()!==document.body&&(rootContext.triggerElement.value=getActiveElement())}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(_sfc_main$23),{"as-child":``,loop:``,trapped:props.trapFocus,onMountAutoFocus:_cache$1[5]||=$event=>emits(`openAutoFocus`,$event),onUnmountAutoFocus:_cache$1[6]||=$event=>emits(`closeAutoFocus`,$event)},{default:withCtx(()=>[createVNode(unref(_sfc_main$24),mergeProps({id:unref(rootContext).contentId,ref:unref(forwardRef),as:_ctx.as,"as-child":_ctx.asChild,"disable-outside-pointer-events":_ctx.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":unref(rootContext).descriptionId,"aria-labelledby":unref(rootContext).titleId,"data-state":unref(getOpenState)(unref(rootContext).open.value)},_ctx.$attrs,{onDismiss:_cache$1[0]||=$event=>unref(rootContext).onOpenChange(!1),onEscapeKeyDown:_cache$1[1]||=$event=>emits(`escapeKeyDown`,$event),onFocusOutside:_cache$1[2]||=$event=>emits(`focusOutside`,$event),onInteractOutside:_cache$1[3]||=$event=>emits(`interactOutside`,$event),onPointerDownOutside:_cache$1[4]||=$event=>emits(`pointerDownOutside`,$event)}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`]))}});var getDefaultParent=function(originalTarget){if(typeof document>`u`)return null;var sampleTarget=Array.isArray(originalTarget)?originalTarget[0]:originalTarget;return sampleTarget.ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function(node$1){return node$1&&(node$1.host||unwrapHost(node$1.parentNode))},correctTargets=function(parent,targets){return targets.map(function(target$1){if(parent.contains(target$1))return target$1;var correctedTarget=unwrapHost(target$1);return correctedTarget&&parent.contains(correctedTarget)?correctedTarget:(console.error(`aria-hidden`,target$1,`in not contained inside`,parent,`. Doing nothing`),null)}).filter(function(x$3){return!!x$3})},applyAttributeToOthers=function(originalTarget,parentNode,markerName,controlAttribute){var targets=correctTargets(parentNode,Array.isArray(originalTarget)?originalTarget:[originalTarget]);markerMap[markerName]||(markerMap[markerName]=new WeakMap);var markerCounter=markerMap[markerName],hiddenNodes=[],elementsToKeep=new Set,elementsToStop=new Set(targets),keep=function(el$1){!el$1||elementsToKeep.has(el$1)||(elementsToKeep.add(el$1),keep(el$1.parentNode))};targets.forEach(keep);var deep=function(parent){!parent||elementsToStop.has(parent)||Array.prototype.forEach.call(parent.children,function(node$1){if(elementsToKeep.has(node$1))deep(node$1);else try{var attr=node$1.getAttribute(controlAttribute),alreadyHidden=attr!==null&&attr!==`false`,counterValue=(counterMap.get(node$1)||0)+1,markerValue=(markerCounter.get(node$1)||0)+1;counterMap.set(node$1,counterValue),markerCounter.set(node$1,markerValue),hiddenNodes.push(node$1),counterValue===1&&alreadyHidden&&uncontrolledNodes.set(node$1,!0),markerValue===1&&node$1.setAttribute(markerName,`true`),alreadyHidden||node$1.setAttribute(controlAttribute,`true`)}catch(e$3){console.error(`aria-hidden: cannot operate on `,node$1,e$3)}})};return deep(parentNode),elementsToKeep.clear(),lockCount++,function(){hiddenNodes.forEach(function(node$1){var counterValue=counterMap.get(node$1)-1,markerValue=markerCounter.get(node$1)-1;counterMap.set(node$1,counterValue),markerCounter.set(node$1,markerValue),counterValue||(uncontrolledNodes.has(node$1)||node$1.removeAttribute(controlAttribute),uncontrolledNodes.delete(node$1)),markerValue||node$1.removeAttribute(markerName)}),lockCount--,lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function(originalTarget,parentNode,markerName){markerName===void 0&&(markerName=`data-aria-hidden`);var targets=Array.from(Array.isArray(originalTarget)?originalTarget:[originalTarget]),activeParentNode=parentNode||getDefaultParent(originalTarget);return activeParentNode?(targets.push.apply(targets,Array.from(activeParentNode.querySelectorAll(`[aria-live]`))),applyAttributeToOthers(targets,activeParentNode,markerName,`aria-hidden`)):function(){return null}};function useHideOthers(target$1){let undo;watch(()=>unrefElement(target$1),el$1=>{el$1?undo=hideOthers(el$1):undo&&undo()}),onUnmounted(()=>{undo&&undo()})}const _sfc_main$20=defineComponent({__name:`DialogContentModal`,props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectDialogRootContext(),emitsAsProps=useEmitAsProps(emits),{forwardRef,currentElement}=useForwardExpose();return useHideOthers(currentElement),(_ctx,_cache$1)=>(openBlock(),createBlock(_sfc_main$22,mergeProps({...props,...unref(emitsAsProps)},{ref:unref(forwardRef),"trap-focus":unref(rootContext).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:_cache$1[0]||=event=>{event.defaultPrevented||(event.preventDefault(),unref(rootContext).triggerElement.value?.focus())},onPointerDownOutside:_cache$1[1]||=event=>{let originalEvent=event.detail.originalEvent,ctrlLeftClick=originalEvent.button===0&&originalEvent.ctrlKey===!0,isRightClick=originalEvent.button===2||ctrlLeftClick;isRightClick&&event.preventDefault()},onFocusOutside:_cache$1[2]||=event=>{event.preventDefault()}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`trap-focus`]))}}),_sfc_main$21=defineComponent({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,emitsAsProps=useEmitAsProps(emits);useForwardExpose();let rootContext=injectDialogRootContext(),hasInteractedOutsideRef=ref(!1),hasPointerDownOutsideRef=ref(!1);return(_ctx,_cache$1)=>(openBlock(),createBlock(_sfc_main$22,mergeProps({...props,...unref(emitsAsProps)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:_cache$1[0]||=event=>{event.defaultPrevented||(hasInteractedOutsideRef.value||unref(rootContext).triggerElement.value?.focus(),event.preventDefault()),hasInteractedOutsideRef.value=!1,hasPointerDownOutsideRef.value=!1},onInteractOutside:_cache$1[1]||=event=>{event.defaultPrevented||(hasInteractedOutsideRef.value=!0,event.detail.originalEvent.type===`pointerdown`&&(hasPointerDownOutsideRef.value=!0));let target$1=event.target,targetIsTrigger=unref(rootContext).triggerElement.value?.contains(target$1);targetIsTrigger&&event.preventDefault(),event.detail.originalEvent.type===`focusin`&&hasPointerDownOutsideRef.value&&event.preventDefault()}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}}),_sfc_main$5=defineComponent({__name:`DialogContent`,props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectDialogRootContext(),emitsAsProps=useEmitAsProps(emits),{forwardRef}=useForwardExpose();return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Presence),{present:_ctx.forceMount||unref(rootContext).open.value},{default:withCtx(()=>[unref(rootContext).modal.value?(openBlock(),createBlock(_sfc_main$20,mergeProps({key:0,ref:unref(forwardRef)},{...props,...unref(emitsAsProps),..._ctx.$attrs}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16)):(openBlock(),createBlock(_sfc_main$21,mergeProps({key:1,ref:unref(forwardRef)},{...props,...unref(emitsAsProps),..._ctx.$attrs}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),useBodyLockStackCount=createSharedComposable(()=>{let map=ref(new Map),initialOverflow=ref(),locked=computed(()=>{for(let value$1 of map.value.values())if(value$1)return!0;return!1}),context$1=injectConfigProviderContext({scrollBody:ref(!0)}),stopTouchMoveListener=null,resetBodyStyle=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=initialOverflow.value??``,isIOS&&stopTouchMoveListener?.(),initialOverflow.value=void 0};return watch(locked,(val,oldVal)=>{if(!isClient$1)return;if(!val){oldVal&&resetBodyStyle();return}initialOverflow.value===void 0&&(initialOverflow.value=document.body.style.overflow);let verticalScrollbarWidth=window.innerWidth-document.documentElement.clientWidth,defaultConfig={padding:verticalScrollbarWidth,margin:0},config=context$1.scrollBody?.value?typeof context$1.scrollBody.value==`object`?defu({padding:context$1.scrollBody.value.padding===!0?verticalScrollbarWidth:context$1.scrollBody.value.padding,margin:context$1.scrollBody.value.margin===!0?verticalScrollbarWidth:context$1.scrollBody.value.margin},defaultConfig):defaultConfig:{padding:0,margin:0};verticalScrollbarWidth>0&&(document.body.style.paddingRight=typeof config.padding==`number`?`${config.padding}px`:String(config.padding),document.body.style.marginRight=typeof config.margin==`number`?`${config.margin}px`:String(config.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${verticalScrollbarWidth}px`),document.body.style.overflow=`hidden`),isIOS&&(stopTouchMoveListener=useEventListener(document,`touchmove`,e$3=>preventDefault(e$3),{passive:!1})),nextTick(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})},{immediate:!0,flush:`sync`}),map});function useBodyScrollLock(initialState){let id$1=Math.random().toString(36).substring(2,7),map=useBodyLockStackCount();map.value.set(id$1,initialState??!1);let locked=computed({get:()=>map.value.get(id$1)??!1,set:value$1=>map.value.set(id$1,value$1)});return tryOnBeforeUnmount(()=>{map.value.delete(id$1)}),locked}function checkOverflowScroll(ele){let style=window.getComputedStyle(ele);if(style.overflowX===`scroll`||style.overflowY===`scroll`||style.overflowX===`auto`&&ele.clientWidth1?!0:(e$3.preventDefault&&e$3.cancelable&&e$3.preventDefault(),!1)}const _sfc_main$19=defineComponent({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean},as:{}},setup(__props){let rootContext=injectDialogRootContext();return useBodyScrollLock(!0),useForwardExpose(),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{as:_ctx.as,"as-child":_ctx.asChild,"data-state":unref(rootContext).open.value?`open`:`closed`,style:{"pointer-events":`auto`}},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),_sfc_main$6=defineComponent({__name:`DialogOverlay`,props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(__props){let rootContext=injectDialogRootContext(),{forwardRef}=useForwardExpose();return(_ctx,_cache$1)=>unref(rootContext)?.modal.value?(openBlock(),createBlock(unref(Presence),{key:0,present:_ctx.forceMount||unref(rootContext).open.value},{default:withCtx(()=>[createVNode(_sfc_main$19,mergeProps(_ctx.$attrs,{ref:unref(forwardRef),as:_ctx.as,"as-child":_ctx.asChild}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`as`,`as-child`])]),_:3},8,[`present`])):createCommentVNode(``,!0)}}),_sfc_main$16=defineComponent({__name:`Teleport`,props:{to:{default:`body`},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(__props){let isMounted=useMounted();return(_ctx,_cache$1)=>unref(isMounted)||_ctx.forceMount?(openBlock(),createBlock(Teleport,{key:0,to:_ctx.to,disabled:_ctx.disabled,defer:_ctx.defer},[renderSlot(_ctx.$slots,`default`)],8,[`to`,`disabled`,`defer`])):createCommentVNode(``,!0)}});function useForwardProps(props){let vm$1=getCurrentInstance(),defaultProps=Object.keys(vm$1?.type.props??{}).reduce((prev,curr)=>{let defaultValue=(vm$1?.type.props[curr]).default;return defaultValue!==void 0&&(prev[curr]=defaultValue),prev},{}),refProps=toRef(props);return computed(()=>{let preservedProps={},assignedProps=vm$1?.vnode.props??{};return Object.keys(assignedProps).forEach(key$1=>{preservedProps[camelize(key$1)]=assignedProps[key$1]}),Object.keys({...defaultProps,...preservedProps}).reduce((prev,curr)=>(refProps.value[curr]!==void 0&&(prev[curr]=refProps.value[curr]),prev),{})})}function useForwardPropsEmits(props,emit$1){let parsedProps=useForwardProps(props),emitsAsProps=emit$1?useEmitAsProps(emit$1):{};return computed(()=>({...parsedProps.value,...emitsAsProps}))}function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount,numerator){return amount-numerator*Math.floor(amount/numerator)}const $3b62074eb05584b2$var$EPOCH=1721426;function $3b62074eb05584b2$export$f297eb839006d339(era,year,month,day){year=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(era,year);let y1=year-1,monthOffset=-2;return month<=2?monthOffset=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(year)&&(monthOffset=-1),$3b62074eb05584b2$var$EPOCH-1+365*y1+Math.floor(y1/4)-Math.floor(y1/100)+Math.floor(y1/400)+Math.floor((367*month-362)/12+monthOffset+day)}function $3b62074eb05584b2$export$553d7fa8e3805fc0(year){return year%4==0&&(year%100!=0||year%400==0)}function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era,year){return era===`BC`?1-year:year}function $3b62074eb05584b2$export$4475b7e617eb123c(year){let era=`AD`;return year<=0&&(era=`BC`,year=1-year),[era,year]}const $3b62074eb05584b2$var$daysInMonth={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 $3b62074eb05584b2$export$80ee6245ec4f29ec=class{fromJulianDay(jd$1){let jd0=jd$1,depoch=jd0-$3b62074eb05584b2$var$EPOCH,quadricent=Math.floor(depoch/146097),dqc=$2b4dce13dd5a17fa$export$842a2cf37af977e1(depoch,146097),cent=Math.floor(dqc/36524),dcent=$2b4dce13dd5a17fa$export$842a2cf37af977e1(dqc,36524),quad=Math.floor(dcent/1461),dquad=$2b4dce13dd5a17fa$export$842a2cf37af977e1(dcent,1461),yindex=Math.floor(dquad/365),extendedYear=quadricent*400+cent*100+quad*4+yindex+(cent!==4&&yindex!==4?1:0),[era,year]=$3b62074eb05584b2$export$4475b7e617eb123c(extendedYear),yearDay=jd0-$3b62074eb05584b2$export$f297eb839006d339(era,year,1,1),leapAdj=2;jd0<$3b62074eb05584b2$export$f297eb839006d339(era,year,3,1)?leapAdj=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(year)&&(leapAdj=1);let month=Math.floor(((yearDay+leapAdj)*12+373)/367),day=jd0-$3b62074eb05584b2$export$f297eb839006d339(era,year,month,1)+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(era,year,month,day)}toJulianDay(date){return $3b62074eb05584b2$export$f297eb839006d339(date.era,date.year,date.month,date.day)}getDaysInMonth(date){return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year)?`leapyear`:`standard`][date.month-1]}getMonthsInYear(date){return 12}getDaysInYear(date){return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year)?366:365}getYearsInEra(date){return 9999}getEras(){return[`BC`,`AD`]}isInverseEra(date){return date.era===`BC`}balanceDate(date){date.year<=0&&(date.era=date.era===`BC`?`AD`:`BC`,date.year=1-date.year)}constructor(){this.identifier=`gregory`}};const $2fe286d2fb449abb$export$7a5acbd77d414bd9={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function $14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2,b$4){return b$4=$11d87f3f76e88657$export$b4a036af3fc0b032(b$4,a$2.calendar),a$2.era===b$4.era&&a$2.year===b$4.year&&a$2.month===b$4.month&&a$2.day===b$4.day}function $14e0f24ef4ac5c92$export$a18c89cbd24170ff(a$2,b$4){return b$4=$11d87f3f76e88657$export$b4a036af3fc0b032(b$4,a$2.calendar),a$2=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(a$2),b$4=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(b$4),a$2.era===b$4.era&&a$2.year===b$4.year&&a$2.month===b$4.month}function $14e0f24ef4ac5c92$export$91b62ebf2ba703ee(a$2,b$4){return $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a$2.calendar,b$4.calendar)&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2,b$4)}function $14e0f24ef4ac5c92$export$5a8da0c44a3afdf2(a$2,b$4){return $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a$2.calendar,b$4.calendar)&&$14e0f24ef4ac5c92$export$a18c89cbd24170ff(a$2,b$4)}function $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a$2,b$4){var _a_isEqual,_b_isEqual,_a_isEqual1,_ref;return(_ref=(_a_isEqual1=(_a_isEqual=a$2.isEqual)?.call(a$2,b$4))??(_b_isEqual=b$4.isEqual)?.call(b$4,a$2))??a$2.identifier===b$4.identifier}function $14e0f24ef4ac5c92$export$629b0a497aa65267(date,timeZone){return $14e0f24ef4ac5c92$export$ea39ec197993aef0(date,$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone))}const $14e0f24ef4ac5c92$var$DAY_MAP={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function $14e0f24ef4ac5c92$export$2061056d06d7cdf7(date,locale,firstDayOfWeek){let julian=date.calendar.toJulianDay(date),weekStart=firstDayOfWeek?$14e0f24ef4ac5c92$var$DAY_MAP[firstDayOfWeek]:$14e0f24ef4ac5c92$var$getWeekStart(locale),dayOfWeek=Math.ceil(julian+1-weekStart)%7;return dayOfWeek<0&&(dayOfWeek+=7),dayOfWeek}function $14e0f24ef4ac5c92$export$461939dd4422153(timeZone){return $11d87f3f76e88657$export$1b96692a1ba042ac(Date.now(),timeZone)}function $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone){return $11d87f3f76e88657$export$93522d1a439f3617($14e0f24ef4ac5c92$export$461939dd4422153(timeZone))}function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a$2,b$4){return a$2.calendar.toJulianDay(a$2)-b$4.calendar.toJulianDay(b$4)}function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a$2,b$4){return $14e0f24ef4ac5c92$var$timeToMs(a$2)-$14e0f24ef4ac5c92$var$timeToMs(b$4)}function $14e0f24ef4ac5c92$var$timeToMs(a$2){return a$2.hour*36e5+a$2.minute*6e4+a$2.second*1e3+a$2.millisecond}let $14e0f24ef4ac5c92$var$localTimeZone=null;function $14e0f24ef4ac5c92$export$aa8b41735afcabd2(){return $14e0f24ef4ac5c92$var$localTimeZone??=new Intl.DateTimeFormat().resolvedOptions().timeZone,$14e0f24ef4ac5c92$var$localTimeZone}function $14e0f24ef4ac5c92$export$a5a3b454ada2268e(date){return date.subtract({days:date.day-1})}function $14e0f24ef4ac5c92$export$a2258d9c4118825c(date){return date.add({days:date.calendar.getDaysInMonth(date)-date.day})}const $14e0f24ef4ac5c92$var$cachedRegions=new Map;function $14e0f24ef4ac5c92$var$getRegion(locale){if(Intl.Locale){let region=$14e0f24ef4ac5c92$var$cachedRegions.get(locale);return region||(region=new Intl.Locale(locale).maximize().region,region&&$14e0f24ef4ac5c92$var$cachedRegions.set(locale,region)),region}let part=locale.split(`-`)[1];return part===`u`?void 0:part}function $14e0f24ef4ac5c92$var$getWeekStart(locale){let region=$14e0f24ef4ac5c92$var$getRegion(locale);return region&&$2fe286d2fb449abb$export$7a5acbd77d414bd9[region]||0}function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date){date=$11d87f3f76e88657$export$b4a036af3fc0b032(date,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let year=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(date.era,date.year);return $11d87f3f76e88657$var$epochFromParts(year,date.month,date.day,date.hour,date.minute,date.second,date.millisecond)}function $11d87f3f76e88657$var$epochFromParts(year,month,day,hour,minute,second,millisecond){let date=new Date;return date.setUTCHours(hour,minute,second,millisecond),date.setUTCFullYear(year,month-1,day),date.getTime()}function $11d87f3f76e88657$export$59c99f3515d3493f(ms$1,timeZone){if(timeZone===`UTC`)return 0;if(ms$1>0&&timeZone===$14e0f24ef4ac5c92$export$aa8b41735afcabd2())return new Date(ms$1).getTimezoneOffset()*-6e4;let{year,month,day,hour,minute,second}=$11d87f3f76e88657$var$getTimeZoneParts(ms$1,timeZone),utc=$11d87f3f76e88657$var$epochFromParts(year,month,day,hour,minute,second,0);return utc-Math.floor(ms$1/1e3)*1e3}const $11d87f3f76e88657$var$formattersByTimeZone=new Map;function $11d87f3f76e88657$var$getTimeZoneParts(ms$1,timeZone){let formatter=$11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);formatter||(formatter=new Intl.DateTimeFormat(`en-US`,{timeZone,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),$11d87f3f76e88657$var$formattersByTimeZone.set(timeZone,formatter));let parts=formatter.formatToParts(new Date(ms$1)),namedParts={};for(let part of parts)part.type!==`literal`&&(namedParts[part.type]=part.value);return{year:namedParts.era===`BC`||namedParts.era===`B`?-namedParts.year+1:+namedParts.year,month:+namedParts.month,day:+namedParts.day,hour:namedParts.hour===`24`?0:+namedParts.hour,minute:+namedParts.minute,second:+namedParts.second}}const $11d87f3f76e88657$var$DAYMILLIS=864e5;function $11d87f3f76e88657$var$getValidWallTimes(date,timeZone,earlier,later){let found=earlier===later?[earlier]:[earlier,later];return found.filter(absolute=>$11d87f3f76e88657$var$isValidWallTime(date,timeZone,absolute))}function $11d87f3f76e88657$var$isValidWallTime(date,timeZone,absolute){let parts=$11d87f3f76e88657$var$getTimeZoneParts(absolute,timeZone);return date.year===parts.year&&date.month===parts.month&&date.day===parts.day&&date.hour===parts.hour&&date.minute===parts.minute&&date.second===parts.second}function $11d87f3f76e88657$export$5107c82f94518f5c(date,timeZone,disambiguation=`compatible`){let dateTime=$11d87f3f76e88657$export$b21e0b124e224484(date);if(timeZone===`UTC`)return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);if(timeZone===$14e0f24ef4ac5c92$export$aa8b41735afcabd2()&&disambiguation===`compatible`){dateTime=$11d87f3f76e88657$export$b4a036af3fc0b032(dateTime,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let date$1=new Date,year=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(dateTime.era,dateTime.year);return date$1.setFullYear(year,dateTime.month-1,dateTime.day),date$1.setHours(dateTime.hour,dateTime.minute,dateTime.second,dateTime.millisecond),date$1.getTime()}let ms$1=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime),offsetBefore=$11d87f3f76e88657$export$59c99f3515d3493f(ms$1-$11d87f3f76e88657$var$DAYMILLIS,timeZone),offsetAfter=$11d87f3f76e88657$export$59c99f3515d3493f(ms$1+$11d87f3f76e88657$var$DAYMILLIS,timeZone),valid$1=$11d87f3f76e88657$var$getValidWallTimes(dateTime,timeZone,ms$1-offsetBefore,ms$1-offsetAfter);if(valid$1.length===1)return valid$1[0];if(valid$1.length>1)switch(disambiguation){case`compatible`:case`earlier`:return valid$1[0];case`later`:return valid$1[valid$1.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(disambiguation){case`earlier`:return Math.min(ms$1-offsetBefore,ms$1-offsetAfter);case`compatible`:case`later`:return Math.max(ms$1-offsetBefore,ms$1-offsetAfter);case`reject`:throw RangeError(`No such absolute time found`)}}function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime,timeZone,disambiguation=`compatible`){return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime,timeZone,disambiguation))}function $11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,timeZone){let offset$2=$11d87f3f76e88657$export$59c99f3515d3493f(ms$1,timeZone),date=new Date(ms$1+offset$2),year=date.getUTCFullYear(),month=date.getUTCMonth()+1,day=date.getUTCDate(),hour=date.getUTCHours(),minute=date.getUTCMinutes(),second=date.getUTCSeconds(),millisecond=date.getUTCMilliseconds();return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(year<1?`BC`:`AD`,year<1?-year+1:year,month,day,timeZone,offset$2,hour,minute,second,millisecond)}function $11d87f3f76e88657$export$93522d1a439f3617(dateTime){return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(dateTime.calendar,dateTime.era,dateTime.year,dateTime.month,dateTime.day)}function $11d87f3f76e88657$export$b21e0b124e224484(date,time){let hour=0,minute=0,second=0,millisecond=0;if(`timeZone`in date)({hour,minute,second,millisecond}=date);else if(`hour`in date&&!time)return date;return time&&({hour,minute,second,millisecond}=time),new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(date.calendar,date.era,date.year,date.month,date.day,hour,minute,second,millisecond)}function $11d87f3f76e88657$export$b4a036af3fc0b032(date,calendar){if($14e0f24ef4ac5c92$export$dbc69fd56b53d5e(date.calendar,calendar))return date;let calendarDate=calendar.fromJulianDay(date.calendar.toJulianDay(date)),copy=date.copy();return copy.calendar=calendar,copy.era=calendarDate.era,copy.year=calendarDate.year,copy.month=calendarDate.month,copy.day=calendarDate.day,$735220c2d4774dd3$export$c4e2ecac49351ef2(copy),copy}function $11d87f3f76e88657$export$84c95a83c799e074(date,timeZone,disambiguation){if(date instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea)return date.timeZone===timeZone?date:$11d87f3f76e88657$export$538b00033cc11c75(date,timeZone);let ms$1=$11d87f3f76e88657$export$5107c82f94518f5c(date,timeZone,disambiguation);return $11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,timeZone)}function $11d87f3f76e88657$export$83aac07b4c37b25(date){let ms$1=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(date)-date.offset;return new Date(ms$1)}function $11d87f3f76e88657$export$538b00033cc11c75(date,timeZone){let ms$1=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(date)-date.offset;return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,timeZone),date.calendar)}const $735220c2d4774dd3$var$ONE_HOUR=36e5;function $735220c2d4774dd3$export$e16d8520af44a096(date,duration){let mutableDate=date.copy(),days=`hour`in mutableDate?$735220c2d4774dd3$var$addTimeFields(mutableDate,duration):0;$735220c2d4774dd3$var$addYears(mutableDate,duration.years||0),mutableDate.calendar.balanceYearMonth&&mutableDate.calendar.balanceYearMonth(mutableDate,date),mutableDate.month+=duration.months||0,$735220c2d4774dd3$var$balanceYearMonth(mutableDate),$735220c2d4774dd3$var$constrainMonthDay(mutableDate),mutableDate.day+=(duration.weeks||0)*7,mutableDate.day+=duration.days||0,mutableDate.day+=days,$735220c2d4774dd3$var$balanceDay(mutableDate),mutableDate.calendar.balanceDate&&mutableDate.calendar.balanceDate(mutableDate),mutableDate.year<1&&(mutableDate.year=1,mutableDate.month=1,mutableDate.day=1);let maxYear=mutableDate.calendar.getYearsInEra(mutableDate);if(mutableDate.year>maxYear){var _mutableDate_calendar_isInverseEra,_mutableDate_calendar;let isInverseEra=(_mutableDate_calendar_isInverseEra=(_mutableDate_calendar=mutableDate.calendar).isInverseEra)?.call(_mutableDate_calendar,mutableDate);mutableDate.year=maxYear,mutableDate.month=isInverseEra?1:mutableDate.calendar.getMonthsInYear(mutableDate),mutableDate.day=isInverseEra?1:mutableDate.calendar.getDaysInMonth(mutableDate)}mutableDate.month<1&&(mutableDate.month=1,mutableDate.day=1);let maxMonth=mutableDate.calendar.getMonthsInYear(mutableDate);return mutableDate.month>maxMonth&&(mutableDate.month=maxMonth,mutableDate.day=mutableDate.calendar.getDaysInMonth(mutableDate)),mutableDate.day=Math.max(1,Math.min(mutableDate.calendar.getDaysInMonth(mutableDate),mutableDate.day)),mutableDate}function $735220c2d4774dd3$var$addYears(date,years){var _date_calendar_isInverseEra,_date_calendar;(_date_calendar_isInverseEra=(_date_calendar=date.calendar).isInverseEra)?.call(_date_calendar,date)&&(years=-years),date.year+=years}function $735220c2d4774dd3$var$balanceYearMonth(date){for(;date.month<1;)$735220c2d4774dd3$var$addYears(date,-1),date.month+=date.calendar.getMonthsInYear(date);let monthsInYear=0;for(;date.month>(monthsInYear=date.calendar.getMonthsInYear(date));)date.month-=monthsInYear,$735220c2d4774dd3$var$addYears(date,1)}function $735220c2d4774dd3$var$balanceDay(date){for(;date.day<1;)date.month--,$735220c2d4774dd3$var$balanceYearMonth(date),date.day+=date.calendar.getDaysInMonth(date);for(;date.day>date.calendar.getDaysInMonth(date);)date.day-=date.calendar.getDaysInMonth(date),date.month++,$735220c2d4774dd3$var$balanceYearMonth(date)}function $735220c2d4774dd3$var$constrainMonthDay(date){date.month=Math.max(1,Math.min(date.calendar.getMonthsInYear(date),date.month)),date.day=Math.max(1,Math.min(date.calendar.getDaysInMonth(date),date.day))}function $735220c2d4774dd3$export$c4e2ecac49351ef2(date){date.calendar.constrainDate&&date.calendar.constrainDate(date),date.year=Math.max(1,Math.min(date.calendar.getYearsInEra(date),date.year)),$735220c2d4774dd3$var$constrainMonthDay(date)}function $735220c2d4774dd3$export$3e2544e88a25bff8(duration){let inverseDuration={};for(let key$1 in duration)typeof duration[key$1]==`number`&&(inverseDuration[key$1]=-duration[key$1]);return inverseDuration}function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(date,duration){return $735220c2d4774dd3$export$e16d8520af44a096(date,$735220c2d4774dd3$export$3e2544e88a25bff8(duration))}function $735220c2d4774dd3$export$adaa4cf7ef1b65be(date,fields){let mutableDate=date.copy();return fields.era!=null&&(mutableDate.era=fields.era),fields.year!=null&&(mutableDate.year=fields.year),fields.month!=null&&(mutableDate.month=fields.month),fields.day!=null&&(mutableDate.day=fields.day),$735220c2d4774dd3$export$c4e2ecac49351ef2(mutableDate),mutableDate}function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value$1,fields){let mutableValue=value$1.copy();return fields.hour!=null&&(mutableValue.hour=fields.hour),fields.minute!=null&&(mutableValue.minute=fields.minute),fields.second!=null&&(mutableValue.second=fields.second),fields.millisecond!=null&&(mutableValue.millisecond=fields.millisecond),$735220c2d4774dd3$export$7555de1e070510cb(mutableValue),mutableValue}function $735220c2d4774dd3$var$balanceTime(time){time.second+=Math.floor(time.millisecond/1e3),time.millisecond=$735220c2d4774dd3$var$nonNegativeMod(time.millisecond,1e3),time.minute+=Math.floor(time.second/60),time.second=$735220c2d4774dd3$var$nonNegativeMod(time.second,60),time.hour+=Math.floor(time.minute/60),time.minute=$735220c2d4774dd3$var$nonNegativeMod(time.minute,60);let days=Math.floor(time.hour/24);return time.hour=$735220c2d4774dd3$var$nonNegativeMod(time.hour,24),days}function $735220c2d4774dd3$export$7555de1e070510cb(time){time.millisecond=Math.max(0,Math.min(time.millisecond,1e3)),time.second=Math.max(0,Math.min(time.second,59)),time.minute=Math.max(0,Math.min(time.minute,59)),time.hour=Math.max(0,Math.min(time.hour,23))}function $735220c2d4774dd3$var$nonNegativeMod(a$2,b$4){let result=a$2%b$4;return result<0&&(result+=b$4),result}function $735220c2d4774dd3$var$addTimeFields(time,duration){return time.hour+=duration.hours||0,time.minute+=duration.minutes||0,time.second+=duration.seconds||0,time.millisecond+=duration.milliseconds||0,$735220c2d4774dd3$var$balanceTime(time)}function $735220c2d4774dd3$export$d52ced6badfb9a4c(value$1,field,amount,options$1){let mutable=value$1.copy();switch(field){case`era`:{let eras=value$1.calendar.getEras(),eraIndex=eras.indexOf(value$1.era);if(eraIndex<0)throw Error(`Invalid era: `+value$1.era);eraIndex=$735220c2d4774dd3$var$cycleValue(eraIndex,amount,0,eras.length-1,options$1?.round),mutable.era=eras[eraIndex],$735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);break}case`year`:var _mutable_calendar_isInverseEra,_mutable_calendar;(_mutable_calendar_isInverseEra=(_mutable_calendar=mutable.calendar).isInverseEra)?.call(_mutable_calendar,mutable)&&(amount=-amount),mutable.year=$735220c2d4774dd3$var$cycleValue(value$1.year,amount,-1/0,9999,options$1?.round),mutable.year===-1/0&&(mutable.year=1),mutable.calendar.balanceYearMonth&&mutable.calendar.balanceYearMonth(mutable,value$1);break;case`month`:mutable.month=$735220c2d4774dd3$var$cycleValue(value$1.month,amount,1,value$1.calendar.getMonthsInYear(value$1),options$1?.round);break;case`day`:mutable.day=$735220c2d4774dd3$var$cycleValue(value$1.day,amount,1,value$1.calendar.getDaysInMonth(value$1),options$1?.round);break;default:throw Error(`Unsupported field `+field)}return value$1.calendar.balanceDate&&value$1.calendar.balanceDate(mutable),$735220c2d4774dd3$export$c4e2ecac49351ef2(mutable),mutable}function $735220c2d4774dd3$export$dd02b3e0007dfe28(value$1,field,amount,options$1){let mutable=value$1.copy();switch(field){case`hour`:{let hours=value$1.hour,min$1=0,max$1=23;if(options$1?.hourCycle===12){let isPM=hours>=12;min$1=isPM?12:0,max$1=isPM?23:11}mutable.hour=$735220c2d4774dd3$var$cycleValue(hours,amount,min$1,max$1,options$1?.round);break}case`minute`:mutable.minute=$735220c2d4774dd3$var$cycleValue(value$1.minute,amount,0,59,options$1?.round);break;case`second`:mutable.second=$735220c2d4774dd3$var$cycleValue(value$1.second,amount,0,59,options$1?.round);break;case`millisecond`:mutable.millisecond=$735220c2d4774dd3$var$cycleValue(value$1.millisecond,amount,0,999,options$1?.round);break;default:throw Error(`Unsupported field `+field)}return mutable}function $735220c2d4774dd3$var$cycleValue(value$1,amount,min$1,max$1,round$2=!1){if(round$2){value$1+=Math.sign(amount),value$10?Math.ceil(value$1/div)*div:Math.floor(value$1/div)*div,value$1>max$1&&(value$1=min$1)}else value$1+=amount,value$1max$1&&(value$1=min$1+(value$1-max$1-1));return value$1}function $735220c2d4774dd3$export$96b1d28349274637(dateTime,duration){let ms$1;if(duration.years!=null&&duration.years!==0||duration.months!=null&&duration.months!==0||duration.weeks!=null&&duration.weeks!==0||duration.days!=null&&duration.days!==0){let res$1=$735220c2d4774dd3$export$e16d8520af44a096($11d87f3f76e88657$export$b21e0b124e224484(dateTime),{years:duration.years,months:duration.months,weeks:duration.weeks,days:duration.days});ms$1=$11d87f3f76e88657$export$5107c82f94518f5c(res$1,dateTime.timeZone)}else ms$1=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime)-dateTime.offset;ms$1+=duration.milliseconds||0,ms$1+=(duration.seconds||0)*1e3,ms$1+=(duration.minutes||0)*6e4,ms$1+=(duration.hours||0)*36e5;let res=$11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,dateTime.timeZone);return $11d87f3f76e88657$export$b4a036af3fc0b032(res,dateTime.calendar)}function $735220c2d4774dd3$export$6814caac34ca03c7(dateTime,duration){return $735220c2d4774dd3$export$96b1d28349274637(dateTime,$735220c2d4774dd3$export$3e2544e88a25bff8(duration))}function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime,field,amount,options$1){switch(field){case`hour`:{let min$1=0,max$1=23;if(options$1?.hourCycle===12){let isPM=dateTime.hour>=12;min$1=isPM?12:0,max$1=isPM?23:11}let plainDateTime=$11d87f3f76e88657$export$b21e0b124e224484(dateTime),minDate=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime,{hour:min$1}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),minAbsolute=[$11d87f3f76e88657$export$5107c82f94518f5c(minDate,dateTime.timeZone,`earlier`),$11d87f3f76e88657$export$5107c82f94518f5c(minDate,dateTime.timeZone,`later`)].filter(ms$2=>$11d87f3f76e88657$export$1b96692a1ba042ac(ms$2,dateTime.timeZone).day===minDate.day)[0],maxDate=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime,{hour:max$1}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),maxAbsolute=[$11d87f3f76e88657$export$5107c82f94518f5c(maxDate,dateTime.timeZone,`earlier`),$11d87f3f76e88657$export$5107c82f94518f5c(maxDate,dateTime.timeZone,`later`)].filter(ms$2=>$11d87f3f76e88657$export$1b96692a1ba042ac(ms$2,dateTime.timeZone).day===maxDate.day).pop(),ms$1=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime)-dateTime.offset,hours=Math.floor(ms$1/$735220c2d4774dd3$var$ONE_HOUR),remainder=ms$1%$735220c2d4774dd3$var$ONE_HOUR;return ms$1=$735220c2d4774dd3$var$cycleValue(hours,amount,Math.floor(minAbsolute/$735220c2d4774dd3$var$ONE_HOUR),Math.floor(maxAbsolute/$735220c2d4774dd3$var$ONE_HOUR),options$1?.round)*$735220c2d4774dd3$var$ONE_HOUR+remainder,$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,dateTime.timeZone),dateTime.calendar)}case`minute`:case`second`:case`millisecond`:return $735220c2d4774dd3$export$dd02b3e0007dfe28(dateTime,field,amount,options$1);case`era`:case`year`:case`month`:case`day`:{let res=$735220c2d4774dd3$export$d52ced6badfb9a4c($11d87f3f76e88657$export$b21e0b124e224484(dateTime),field,amount,options$1),ms$1=$11d87f3f76e88657$export$5107c82f94518f5c(res,dateTime.timeZone);return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,dateTime.timeZone),dateTime.calendar)}default:throw Error(`Unsupported field `+field)}}function $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime,fields,disambiguation){let plainDateTime=$11d87f3f76e88657$export$b21e0b124e224484(dateTime),res=$735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(plainDateTime,fields),fields);if(res.compare(plainDateTime)===0)return dateTime;let ms$1=$11d87f3f76e88657$export$5107c82f94518f5c(res,dateTime.timeZone,disambiguation);return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,dateTime.timeZone),dateTime.calendar)}const $fae977aafc393c5c$var$requiredDurationTimeGroups=[`hours`,`minutes`,`seconds`],$fae977aafc393c5c$var$requiredDurationGroups=[`years`,`months`,`weeks`,`days`,...$fae977aafc393c5c$var$requiredDurationTimeGroups];function $fae977aafc393c5c$export$f59dee82248f5ad4(time){return`${String(time.hour).padStart(2,`0`)}:${String(time.minute).padStart(2,`0`)}:${String(time.second).padStart(2,`0`)}${time.millisecond?String(time.millisecond/1e3).slice(1):``}`}function $fae977aafc393c5c$export$60dfd74aa96791bd(date){let gregorianDate=$11d87f3f76e88657$export$b4a036af3fc0b032(date,new $3b62074eb05584b2$export$80ee6245ec4f29ec),year;return year=gregorianDate.era===`BC`?gregorianDate.year===1?`0000`:`-`+String(Math.abs(1-gregorianDate.year)).padStart(6,`00`):String(gregorianDate.year).padStart(4,`0`),`${year}-${String(gregorianDate.month).padStart(2,`0`)}-${String(gregorianDate.day).padStart(2,`0`)}`}function $fae977aafc393c5c$export$4223de14708adc63(date){return`${$fae977aafc393c5c$export$60dfd74aa96791bd(date)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(date)}`}function $fae977aafc393c5c$var$offsetToString(offset$2){let sign$1=Math.sign(offset$2)<0?`-`:`+`;offset$2=Math.abs(offset$2);let offsetHours=Math.floor(offset$2/36e5),offsetMinutes=offset$2%36e5/6e4;return`${sign$1}${String(offsetHours).padStart(2,`0`)}:${String(offsetMinutes).padStart(2,`0`)}`}function $fae977aafc393c5c$export$bf79f1ebf4b18792(date){return`${$fae977aafc393c5c$export$4223de14708adc63(date)}${$fae977aafc393c5c$var$offsetToString(date.offset)}[${date.timeZone}]`}function _check_private_redeclaration(obj,privateCollection){if(privateCollection.has(obj))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function _class_private_field_init(obj,privateMap,value$1){_check_private_redeclaration(obj,privateMap),privateMap.set(obj,value$1)}function $35ea8db9cb2ccb90$var$shiftArgs(args){let calendar=typeof args[0]==`object`?args.shift():new $3b62074eb05584b2$export$80ee6245ec4f29ec,era;if(typeof args[0]==`string`)era=args.shift();else{let eras=calendar.getEras();era=eras[eras.length-1]}let year=args.shift(),month=args.shift(),day=args.shift();return[calendar,era,year,month,day]}var $35ea8db9cb2ccb90$var$_type=new WeakMap,$35ea8db9cb2ccb90$export$99faa760c7908e4f=class $35ea8db9cb2ccb90$export$99faa760c7908e4f{copy(){return this.era?new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar,this.era,this.year,this.month,this.day):new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar,this.year,this.month,this.day)}add(duration){return $735220c2d4774dd3$export$e16d8520af44a096(this,duration)}subtract(duration){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,duration)}set(fields){return $735220c2d4774dd3$export$adaa4cf7ef1b65be(this,fields)}cycle(field,amount,options$1){return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,field,amount,options$1)}toDate(timeZone){return $11d87f3f76e88657$export$e67a095c620b86fe(this,timeZone)}toString(){return $fae977aafc393c5c$export$60dfd74aa96791bd(this)}compare(b$4){return $14e0f24ef4ac5c92$export$68781ddf31c0090f(this,b$4)}constructor(...args){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type,{writable:!0,value:void 0});let[calendar,era,year,month,day]=$35ea8db9cb2ccb90$var$shiftArgs(args);this.calendar=calendar,this.era=era,this.year=year,this.month=month,this.day=day,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}},$35ea8db9cb2ccb90$var$_type2=new WeakMap,$35ea8db9cb2ccb90$export$ca871e8dbb80966f=class $35ea8db9cb2ccb90$export$ca871e8dbb80966f{copy(){return this.era?new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(duration){return $735220c2d4774dd3$export$e16d8520af44a096(this,duration)}subtract(duration){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,duration)}set(fields){return $735220c2d4774dd3$export$adaa4cf7ef1b65be($735220c2d4774dd3$export$e5d5e1c1822b6e56(this,fields),fields)}cycle(field,amount,options$1){switch(field){case`era`:case`year`:case`month`:case`day`:return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,field,amount,options$1);default:return $735220c2d4774dd3$export$dd02b3e0007dfe28(this,field,amount,options$1)}}toDate(timeZone,disambiguation){return $11d87f3f76e88657$export$e67a095c620b86fe(this,timeZone,disambiguation)}toString(){return $fae977aafc393c5c$export$4223de14708adc63(this)}compare(b$4){let res=$14e0f24ef4ac5c92$export$68781ddf31c0090f(this,b$4);return res===0?$14e0f24ef4ac5c92$export$c19a80a9721b80f6(this,$11d87f3f76e88657$export$b21e0b124e224484(b$4)):res}constructor(...args){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type2,{writable:!0,value:void 0});let[calendar,era,year,month,day]=$35ea8db9cb2ccb90$var$shiftArgs(args);this.calendar=calendar,this.era=era,this.year=year,this.month=month,this.day=day,this.hour=args.shift()||0,this.minute=args.shift()||0,this.second=args.shift()||0,this.millisecond=args.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}},$35ea8db9cb2ccb90$var$_type3=new WeakMap,$35ea8db9cb2ccb90$export$d3b7288e7994edea=class $35ea8db9cb2ccb90$export$d3b7288e7994edea{copy(){return this.era?new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(duration){return $735220c2d4774dd3$export$96b1d28349274637(this,duration)}subtract(duration){return $735220c2d4774dd3$export$6814caac34ca03c7(this,duration)}set(fields,disambiguation){return $735220c2d4774dd3$export$31b5430eb18be4f8(this,fields,disambiguation)}cycle(field,amount,options$1){return $735220c2d4774dd3$export$9a297d111fc86b79(this,field,amount,options$1)}toDate(){return $11d87f3f76e88657$export$83aac07b4c37b25(this)}toString(){return $fae977aafc393c5c$export$bf79f1ebf4b18792(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(b$4){return this.toDate().getTime()-$11d87f3f76e88657$export$84c95a83c799e074(b$4,this.timeZone).toDate().getTime()}constructor(...args){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type3,{writable:!0,value:void 0});let[calendar,era,year,month,day]=$35ea8db9cb2ccb90$var$shiftArgs(args),timeZone=args.shift(),offset$2=args.shift();this.calendar=calendar,this.era=era,this.year=year,this.month=month,this.day=day,this.timeZone=timeZone,this.offset=offset$2,this.hour=args.shift()||0,this.minute=args.shift()||0,this.second=args.shift()||0,this.millisecond=args.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}};const $62225008020f0a13$var$ERA_START_DATES=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],$62225008020f0a13$var$ERA_END_DATES=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],$62225008020f0a13$var$ERA_ADDENDS=[1867,1911,1925,1988,2018],$62225008020f0a13$var$ERA_NAMES=[`meiji`,`taisho`,`showa`,`heisei`,`reiwa`];function $62225008020f0a13$var$findEraFromGregorianDate(date){let idx=$62225008020f0a13$var$ERA_START_DATES.findIndex(([year,month,day])=>date.year=0){let[,startMonth,startDay]=$62225008020f0a13$var$ERA_START_DATES[idx];date.month=Math.max(startMonth,date.month),date.month===startMonth&&(date.day=Math.max(startDay,date.day))}}getEras(){return $62225008020f0a13$var$ERA_NAMES}getYearsInEra(date){let era=$62225008020f0a13$var$ERA_NAMES.indexOf(date.era),cur=$62225008020f0a13$var$ERA_START_DATES[era],next=$62225008020f0a13$var$ERA_START_DATES[era+1];if(next==null)return 9999-cur[0]+1;let years=next[0]-cur[0];return(date.month0?[`minguo`,y$3]:[`before_minguo`,1-y$3]}var $5f31bd6f0c8940b2$export$65e01080afcb0799=class extends $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(jd$1){let date=super.fromJulianDay(jd$1),extendedYear=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(date.era,date.year),[era,year]=$5f31bd6f0c8940b2$var$gregorianToTaiwan(extendedYear);return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,era,year,date.month,date.day)}toJulianDay(date){return super.toJulianDay($5f31bd6f0c8940b2$var$toGregorian(date))}getEras(){return[`before_minguo`,`minguo`]}balanceDate(date){let[era,year]=$5f31bd6f0c8940b2$var$gregorianToTaiwan($5f31bd6f0c8940b2$var$gregorianYear(date));date.era=era,date.year=year}isInverseEra(date){return date.era===`before_minguo`}getDaysInMonth(date){return super.getDaysInMonth($5f31bd6f0c8940b2$var$toGregorian(date))}getYearsInEra(date){return date.era===`before_minguo`?9999:9999-$5f31bd6f0c8940b2$var$TAIWAN_ERA_START}constructor(...args){super(...args),this.identifier=`roc`}};function $5f31bd6f0c8940b2$var$toGregorian(date){let[era,year]=$3b62074eb05584b2$export$4475b7e617eb123c($5f31bd6f0c8940b2$var$gregorianYear(date));return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(era,year,date.month,date.day)}const $f3ed2e4472ae7e25$var$PERSIAN_EPOCH=1948320,$f3ed2e4472ae7e25$var$MONTH_START=[0,31,62,93,124,155,186,216,246,276,306,336];var $f3ed2e4472ae7e25$export$37fccdbfd14c5939=class{fromJulianDay(jd$1){let daysSinceEpoch=jd$1-$f3ed2e4472ae7e25$var$PERSIAN_EPOCH,year=1+Math.floor((33*daysSinceEpoch+3)/12053),farvardin1=365*(year-1)+Math.floor((8*year+21)/33),dayOfYear=daysSinceEpoch-farvardin1,month=dayOfYear<216?Math.floor(dayOfYear/31):Math.floor((dayOfYear-6)/30),day=dayOfYear-$f3ed2e4472ae7e25$var$MONTH_START[month]+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,year,month+1,day)}toJulianDay(date){let jd$1=$f3ed2e4472ae7e25$var$PERSIAN_EPOCH-1+365*(date.year-1)+Math.floor((8*date.year+21)/33);return jd$1+=$f3ed2e4472ae7e25$var$MONTH_START[date.month-1],jd$1+=date.day,jd$1}getMonthsInYear(){return 12}getDaysInMonth(date){if(date.month<=6)return 31;if(date.month<=11)return 30;let isLeapYear=$2b4dce13dd5a17fa$export$842a2cf37af977e1(25*date.year+11,33)<8;return isLeapYear?30:29}getEras(){return[`AP`]}getYearsInEra(){return 9377}constructor(){this.identifier=`persian`}};const $82c358003bdda0a8$var$INDIAN_ERA_START=78,$82c358003bdda0a8$var$INDIAN_YEAR_START=80;var $82c358003bdda0a8$export$39f31c639fa15726=class extends $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(jd$1){let date=super.fromJulianDay(jd$1),indianYear=date.year-$82c358003bdda0a8$var$INDIAN_ERA_START,yDay=jd$1-$3b62074eb05584b2$export$f297eb839006d339(date.era,date.year,1,1),leapMonth;yDay<$82c358003bdda0a8$var$INDIAN_YEAR_START?(indianYear--,leapMonth=$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year-1)?31:30,yDay+=leapMonth+155+90+10):(leapMonth=$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year)?31:30,yDay-=$82c358003bdda0a8$var$INDIAN_YEAR_START);let indianMonth,indianDay;if(yDay=8&&(jd$1+=(date.month-7)*30),jd$1+=date.day-1,jd$1)}getDaysInMonth(date){return date.month===1&&$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year+$82c358003bdda0a8$var$INDIAN_ERA_START)||date.month>=2&&date.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return[`saka`]}balanceDate(){}constructor(...args){super(...args),this.identifier=`indian`}};const $f2f3e0e3a817edbd$var$CIVIL_EPOC=1948440,$f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC=1948439,$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START=1300,$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END=1600,$f2f3e0e3a817edbd$var$UMALQURA_START_DAYS=460322;function $f2f3e0e3a817edbd$var$islamicToJulianDay(epoch,year,month,day){return day+Math.ceil(29.5*(month-1))+(year-1)*354+Math.floor((3+11*year)/30)+epoch-1}function $f2f3e0e3a817edbd$var$julianDayToIslamic(calendar,epoch,jd$1){let year=Math.floor((30*(jd$1-epoch)+10646)/10631),month=Math.min(12,Math.ceil((jd$1-(29+$f2f3e0e3a817edbd$var$islamicToJulianDay(epoch,year,1,1)))/29.5)+1),day=jd$1-$f2f3e0e3a817edbd$var$islamicToJulianDay(epoch,year,month,1)+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(calendar,year,month,day)}function $f2f3e0e3a817edbd$var$isLeapYear(year){return(14+11*year)%30<11}var $f2f3e0e3a817edbd$export$2066795aadd37bfc=class{fromJulianDay(jd$1){return $f2f3e0e3a817edbd$var$julianDayToIslamic(this,$f2f3e0e3a817edbd$var$CIVIL_EPOC,jd$1)}toJulianDay(date){return $f2f3e0e3a817edbd$var$islamicToJulianDay($f2f3e0e3a817edbd$var$CIVIL_EPOC,date.year,date.month,date.day)}getDaysInMonth(date){let length=29+date.month%2;return date.month===12&&$f2f3e0e3a817edbd$var$isLeapYear(date.year)&&length++,length}getMonthsInYear(){return 12}getDaysInYear(date){return $f2f3e0e3a817edbd$var$isLeapYear(date.year)?355:354}getYearsInEra(){return 9665}getEras(){return[`AH`]}constructor(){this.identifier=`islamic-civil`}},$f2f3e0e3a817edbd$export$37f0887f2f9d22f7=class extends $f2f3e0e3a817edbd$export$2066795aadd37bfc{fromJulianDay(jd$1){return $f2f3e0e3a817edbd$var$julianDayToIslamic(this,$f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC,jd$1)}toJulianDay(date){return $f2f3e0e3a817edbd$var$islamicToJulianDay($f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC,date.year,date.month,date.day)}constructor(...args){super(...args),this.identifier=`islamic-tbla`}};const $f2f3e0e3a817edbd$var$UMALQURA_DATA=`qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=`;let $f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH,$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE;function $f2f3e0e3a817edbd$var$umalquraYearStart(year){return $f2f3e0e3a817edbd$var$UMALQURA_START_DAYS+$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE[year-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START]}function $f2f3e0e3a817edbd$var$umalquraMonthLength(year,month){let idx=year-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START,mask=1<<11-(month-1);return($f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH[idx]&mask)===0?29:30}function $f2f3e0e3a817edbd$var$umalquraMonthStart(year,month){let day=$f2f3e0e3a817edbd$var$umalquraYearStart(year);for(let i$1=1;i$1endDays)return super.fromJulianDay(jd$1);{let y$3=$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START-1,m$3=1,d$2=1;for(;d$2>0;){y$3++,d$2=days-$f2f3e0e3a817edbd$var$umalquraYearStart(y$3)+1;let yearLength=$f2f3e0e3a817edbd$var$umalquraYearLength(y$3);if(d$2===yearLength){m$3=12;break}else if(d$2monthLength;)d$2-=monthLength,m$3++,monthLength=$f2f3e0e3a817edbd$var$umalquraMonthLength(y$3,m$3);break}}return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,y$3,m$3,days-$f2f3e0e3a817edbd$var$umalquraMonthStart(y$3,m$3)+1)}}toJulianDay(date){return date.year<$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START||date.year>$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END?super.toJulianDay(date):$f2f3e0e3a817edbd$var$CIVIL_EPOC+$f2f3e0e3a817edbd$var$umalquraMonthStart(date.year,date.month)+(date.day-1)}getDaysInMonth(date){return date.year<$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START||date.year>$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END?super.getDaysInMonth(date):$f2f3e0e3a817edbd$var$umalquraMonthLength(date.year,date.month)}getDaysInYear(date){return date.year<$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START||date.year>$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END?super.getDaysInYear(date):$f2f3e0e3a817edbd$var$umalquraYearLength(date.year)}constructor(){if(super(),this.identifier=`islamic-umalqura`,$f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH||=new Uint16Array(Uint8Array.from(atob($f2f3e0e3a817edbd$var$UMALQURA_DATA),c$4=>c$4.charCodeAt(0)).buffer),!$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE){$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE=new Uint32Array($f2f3e0e3a817edbd$var$UMALQURA_YEAR_END-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START+1);let yearStart=0;for(let year=$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START;year<=$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END;year++){$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE[year-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START]=yearStart;for(let i$1=1;i$1<=12;i$1++)yearStart+=$f2f3e0e3a817edbd$var$umalquraMonthLength(year,i$1)}}}};const $7c5f6fbf42389787$var$HEBREW_EPOCH=347997,$7c5f6fbf42389787$var$HOUR_PARTS=1080,$7c5f6fbf42389787$var$DAY_PARTS=24*$7c5f6fbf42389787$var$HOUR_PARTS,$7c5f6fbf42389787$var$MONTH_DAYS=29,$7c5f6fbf42389787$var$MONTH_FRACT=12*$7c5f6fbf42389787$var$HOUR_PARTS+793,$7c5f6fbf42389787$var$MONTH_PARTS=$7c5f6fbf42389787$var$MONTH_DAYS*$7c5f6fbf42389787$var$DAY_PARTS+$7c5f6fbf42389787$var$MONTH_FRACT;function $7c5f6fbf42389787$var$isLeapYear(year){return $2b4dce13dd5a17fa$export$842a2cf37af977e1(year*7+1,19)<7}function $7c5f6fbf42389787$var$hebrewDelay1(year){let months=Math.floor((235*year-234)/19),parts=12084+13753*months,day=months*29+Math.floor(parts/25920);return $2b4dce13dd5a17fa$export$842a2cf37af977e1(3*(day+1),7)<3&&(day+=1),day}function $7c5f6fbf42389787$var$hebrewDelay2(year){let last=$7c5f6fbf42389787$var$hebrewDelay1(year-1),present=$7c5f6fbf42389787$var$hebrewDelay1(year),next=$7c5f6fbf42389787$var$hebrewDelay1(year+1);return next-present===356?2:present-last===382?1:0}function $7c5f6fbf42389787$var$startOfYear(year){return $7c5f6fbf42389787$var$hebrewDelay1(year)+$7c5f6fbf42389787$var$hebrewDelay2(year)}function $7c5f6fbf42389787$var$getDaysInYear(year){return $7c5f6fbf42389787$var$startOfYear(year+1)-$7c5f6fbf42389787$var$startOfYear(year)}function $7c5f6fbf42389787$var$getYearType(year){let yearLength=$7c5f6fbf42389787$var$getDaysInYear(year);switch(yearLength>380&&(yearLength-=30),yearLength){case 353:return 0;case 354:return 1;case 355:return 2}}function $7c5f6fbf42389787$var$getDaysInMonth(year,month){if(month>=6&&!$7c5f6fbf42389787$var$isLeapYear(year)&&month++,month===4||month===7||month===9||month===11||month===13)return 29;let yearType=$7c5f6fbf42389787$var$getYearType(year);return month===2?yearType===2?30:29:month===3?yearType===0?29:30:month===6?$7c5f6fbf42389787$var$isLeapYear(year)?30:0:30}var $7c5f6fbf42389787$export$ca405048b8fb5af=class{fromJulianDay(jd$1){let d$2=jd$1-$7c5f6fbf42389787$var$HEBREW_EPOCH,m$3=d$2*$7c5f6fbf42389787$var$DAY_PARTS/$7c5f6fbf42389787$var$MONTH_PARTS,year=Math.floor((19*m$3+234)/235)+1,ys$1=$7c5f6fbf42389787$var$startOfYear(year),dayOfYear=Math.floor(d$2-ys$1);for(;dayOfYear<1;)year--,ys$1=$7c5f6fbf42389787$var$startOfYear(year),dayOfYear=Math.floor(d$2-ys$1);let month=1,monthStart=0;for(;monthStart6?date.month--:!$7c5f6fbf42389787$var$isLeapYear(previousDate.year)&&$7c5f6fbf42389787$var$isLeapYear(date.year)&&previousDate.month>6&&date.month++)}constructor(){this.identifier=`hebrew`}};const $b956b2d7a6cf451f$var$ETHIOPIC_EPOCH=1723856,$b956b2d7a6cf451f$var$COPTIC_EPOCH=1824665,$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA=5500;function $b956b2d7a6cf451f$var$ceToJulianDay(epoch,year,month,day){return epoch+365*year+Math.floor(year/4)+30*(month-1)+day-1}function $b956b2d7a6cf451f$var$julianDayToCE(epoch,jd$1){let year=Math.floor(4*(jd$1-epoch)/1461),month=1+Math.floor((jd$1-$b956b2d7a6cf451f$var$ceToJulianDay(epoch,year,1,1))/30),day=jd$1+1-$b956b2d7a6cf451f$var$ceToJulianDay(epoch,year,month,1);return[year,month,day]}function $b956b2d7a6cf451f$var$getLeapDay(year){return Math.floor(year%4/3)}function $b956b2d7a6cf451f$var$getDaysInMonth(year,month){return month%13==0?$b956b2d7a6cf451f$var$getLeapDay(year)+5:30}var $b956b2d7a6cf451f$export$26ba6eab5e20cd7d=class{fromJulianDay(jd$1){let[year,month,day]=$b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH,jd$1),era=`AM`;return year<=0&&(era=`AA`,year+=$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA),new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,era,year,month,day)}toJulianDay(date){let year=date.year;return date.era===`AA`&&(year-=$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA),$b956b2d7a6cf451f$var$ceToJulianDay($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH,year,date.month,date.day)}getDaysInMonth(date){return $b956b2d7a6cf451f$var$getDaysInMonth(date.year,date.month)}getMonthsInYear(){return 13}getDaysInYear(date){return 365+$b956b2d7a6cf451f$var$getLeapDay(date.year)}getYearsInEra(date){return date.era===`AA`?9999:9991}getEras(){return[`AA`,`AM`]}constructor(){this.identifier=`ethiopic`}},$b956b2d7a6cf451f$export$d72e0c37005a4914=class extends $b956b2d7a6cf451f$export$26ba6eab5e20cd7d{fromJulianDay(jd$1){let[year,month,day]=$b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH,jd$1);return year+=$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA,new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,`AA`,year,month,day)}getEras(){return[`AA`]}getYearsInEra(){return 9999}constructor(...args){super(...args),this.identifier=`ethioaa`}},$b956b2d7a6cf451f$export$fe6243cbe1a4b7c1=class extends $b956b2d7a6cf451f$export$26ba6eab5e20cd7d{fromJulianDay(jd$1){let[year,month,day]=$b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$COPTIC_EPOCH,jd$1),era=`CE`;return year<=0&&(era=`BCE`,year=1-year),new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,era,year,month,day)}toJulianDay(date){let year=date.year;return date.era===`BCE`&&(year=1-year),$b956b2d7a6cf451f$var$ceToJulianDay($b956b2d7a6cf451f$var$COPTIC_EPOCH,year,date.month,date.day)}getDaysInMonth(date){let year=date.year;return date.era===`BCE`&&(year=1-year),$b956b2d7a6cf451f$var$getDaysInMonth(year,date.month)}isInverseEra(date){return date.era===`BCE`}balanceDate(date){date.year<=0&&(date.era=date.era===`BCE`?`CE`:`BCE`,date.year=1-date.year)}getEras(){return[`BCE`,`CE`]}getYearsInEra(date){return date.era===`BCE`?9999:9715}constructor(...args){super(...args),this.identifier=`coptic`}};function $64244302c3013299$export$dd0bbc9b26defe37(name$2){switch(name$2){case`buddhist`:return new $8d73d47422ca7302$export$42d20a78301dee44;case`ethiopic`:return new $b956b2d7a6cf451f$export$26ba6eab5e20cd7d;case`ethioaa`:return new $b956b2d7a6cf451f$export$d72e0c37005a4914;case`coptic`:return new $b956b2d7a6cf451f$export$fe6243cbe1a4b7c1;case`hebrew`:return new $7c5f6fbf42389787$export$ca405048b8fb5af;case`indian`:return new $82c358003bdda0a8$export$39f31c639fa15726;case`islamic-civil`:return new $f2f3e0e3a817edbd$export$2066795aadd37bfc;case`islamic-tbla`:return new $f2f3e0e3a817edbd$export$37f0887f2f9d22f7;case`islamic-umalqura`:return new $f2f3e0e3a817edbd$export$5baab4758c231076;case`japanese`:return new $62225008020f0a13$export$b746ab2b60cdffbf;case`persian`:return new $f3ed2e4472ae7e25$export$37fccdbfd14c5939;case`roc`:return new $5f31bd6f0c8940b2$export$65e01080afcb0799;case`gregory`:default:return new $3b62074eb05584b2$export$80ee6245ec4f29ec}}let $fb18d541ea1ad717$var$formatterCache=new Map;var $fb18d541ea1ad717$export$ad991b66133851cf=class{format(value$1){return this.formatter.format(value$1)}formatToParts(value$1){return this.formatter.formatToParts(value$1)}formatRange(start,end){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(start,end);if(end= start date`);return`${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`}formatRangeToParts(start,end){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(start,end);if(end= start date`);let startParts=this.formatter.formatToParts(start),endParts=this.formatter.formatToParts(end);return[...startParts.map(p$5=>({...p$5,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...endParts.map(p$5=>({...p$5,source:`endRange`}))]}resolvedOptions(){let resolvedOptions=this.formatter.resolvedOptions();return $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle()&&(this.resolvedHourCycle||=$fb18d541ea1ad717$var$getResolvedHourCycle(resolvedOptions.locale,this.options),resolvedOptions.hourCycle=this.resolvedHourCycle,resolvedOptions.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),resolvedOptions.calendar===`ethiopic-amete-alem`&&(resolvedOptions.calendar=`ethioaa`),resolvedOptions}constructor(locale,options$1={}){this.formatter=$fb18d541ea1ad717$var$getCachedDateFormatter(locale,options$1),this.options=options$1}};const $fb18d541ea1ad717$var$hour12Preferences={true:{ja:`h11`},false:{}};function $fb18d541ea1ad717$var$getCachedDateFormatter(locale,options$1={}){if(typeof options$1.hour12==`boolean`&&$fb18d541ea1ad717$var$hasBuggyHour12Behavior()){options$1={...options$1};let pref=$fb18d541ea1ad717$var$hour12Preferences[String(options$1.hour12)][locale.split(`-`)[0]],defaultHourCycle=options$1.hour12?`h12`:`h23`;options$1.hourCycle=pref??defaultHourCycle,delete options$1.hour12}let cacheKey=locale+(options$1?Object.entries(options$1).sort((a$2,b$4)=>a$2[0]p$5.type===`hour`).value,10),max$1=parseInt(formatter.formatToParts(new Date(2020,2,3,23)).find(p$5=>p$5.type===`hour`).value,10);if(min$1===0&&max$1===23)return`h23`;if(min$1===24&&max$1===23)return`h24`;if(min$1===0&&max$1===11)return`h11`;if(min$1===12&&max$1===11)return`h12`;throw Error(`Unexpected hour cycle result`)}function usePrimitiveElement(){let primitiveElement=ref(),currentElement=computed(()=>[`#text`,`#comment`].includes(primitiveElement.value?.$el.nodeName)?primitiveElement.value?.$el.nextElementSibling:unrefElement(primitiveElement));return{primitiveElement,currentElement}}function useFormControl(el$1){return computed(()=>toValue(el$1)?!!unrefElement(el$1)?.closest(`form`):!0)}const _sfc_main$17=defineComponent({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(__props){let props=__props,{primitiveElement,currentElement}=usePrimitiveElement(),valueState=computed(()=>props.checked??props.value);return watch(valueState,(cur,prev)=>{if(!currentElement.value)return;let input=currentElement.value,inputProto=window.HTMLInputElement.prototype,descriptor=Object.getOwnPropertyDescriptor(inputProto,`value`),setValue=descriptor.set;if(setValue&&cur!==prev){let inputEvent=new Event(`input`,{bubbles:!0}),changeEvent=new Event(`change`,{bubbles:!0});setValue.call(input,cur),input.dispatchEvent(inputEvent),input.dispatchEvent(changeEvent)}}),(_ctx,_cache$1)=>(openBlock(),createBlock(_sfc_main$18,mergeProps({ref_key:`primitiveElement`,ref:primitiveElement},{...props,..._ctx.$attrs},{as:`input`}),null,16))}}),_sfc_main$15=defineComponent({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(__props){let props=__props,isFormArrayEmptyAndRequired=computed(()=>typeof props.value==`object`&&Array.isArray(props.value)&&props.value.length===0&&props.required),parsedValue=computed(()=>typeof props.value==`string`||typeof props.value==`number`||typeof props.value==`boolean`?[{name:props.name,value:props.value}]:typeof props.value==`object`&&Array.isArray(props.value)?props.value.flatMap((obj,index$1)=>typeof obj==`object`?Object.entries(obj).map(([key$1,value$1])=>({name:`[${props.name}][${index$1}][${key$1}]`,value:value$1})):{name:`[${props.name}][${index$1}]`,value:obj}):props.value!==null&&typeof props.value==`object`&&!Array.isArray(props.value)?Object.entries(props.value).map(([key$1,value$1])=>({name:`[${props.name}][${key$1}]`,value:value$1})):[]);return(_ctx,_cache$1)=>isFormArrayEmptyAndRequired.value?(openBlock(),createBlock(_sfc_main$17,mergeProps({key:_ctx.name},{...props,..._ctx.$attrs},{name:_ctx.name,value:_ctx.value}),null,16,[`name`,`value`])):(openBlock(!0),createElementBlock(Fragment,{key:1},renderList(parsedValue.value,parsed=>(openBlock(),createBlock(_sfc_main$17,mergeProps({key:parsed.name,ref_for:!0},{...props,..._ctx.$attrs},{name:parsed.name,value:parsed.value}),null,16,[`name`,`value`]))),128))}}),_sfc_main$7=defineComponent({__name:`DialogPortal`,props:{to:{},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(__props){let props=__props;return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(_sfc_main$16),normalizeProps(guardReactiveProps(props)),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}});let $488c6ddbf4ef74c2$var$formatterCache=new Map,$488c6ddbf4ef74c2$var$supportsSignDisplay=!1;try{$488c6ddbf4ef74c2$var$supportsSignDisplay=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}let $488c6ddbf4ef74c2$var$supportsUnit=!1;try{$488c6ddbf4ef74c2$var$supportsUnit=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}const $488c6ddbf4ef74c2$var$UNITS={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}};var $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5=class{format(value$1){let res=``;if(res=!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null?$488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter,this.options.signDisplay,value$1):this.numberFormatter.format(value$1),this.options.style===`unit`&&!$488c6ddbf4ef74c2$var$supportsUnit){var _UNITS_unit;let{unit,unitDisplay=`short`,locale}=this.resolvedOptions();if(!unit)return res;let values=(_UNITS_unit=$488c6ddbf4ef74c2$var$UNITS[unit])?.[unitDisplay];res+=values[locale]||values.default}return res}formatToParts(value$1){return this.numberFormatter.formatToParts(value$1)}formatRange(start,end){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(start,end);if(end= start date`);return`${this.format(start)} \u{2013} ${this.format(end)}`}formatRangeToParts(start,end){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(start,end);if(end= start date`);let startParts=this.numberFormatter.formatToParts(start),endParts=this.numberFormatter.formatToParts(end);return[...startParts.map(p$5=>({...p$5,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...endParts.map(p$5=>({...p$5,source:`endRange`}))]}resolvedOptions(){let options$1=this.numberFormatter.resolvedOptions();return!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null&&(options$1={...options$1,signDisplay:this.options.signDisplay}),!$488c6ddbf4ef74c2$var$supportsUnit&&this.options.style===`unit`&&(options$1={...options$1,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),options$1}constructor(locale,options$1={}){this.numberFormatter=$488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale,options$1),this.options=options$1}};function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale,options$1={}){let{numberingSystem}=options$1;if(numberingSystem&&locale.includes(`-nu-`)&&(locale.includes(`-u-`)||(locale+=`-u-`),locale+=`-nu-${numberingSystem}`),options$1.style===`unit`&&!$488c6ddbf4ef74c2$var$supportsUnit){var _UNITS_unit;let{unit,unitDisplay=`short`}=options$1;if(!unit)throw Error(`unit option must be provided with style: "unit"`);if(!(_UNITS_unit=$488c6ddbf4ef74c2$var$UNITS[unit])?.[unitDisplay])throw Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);options$1={...options$1,style:`decimal`}}let cacheKey=locale+(options$1?Object.entries(options$1).sort((a$2,b$4)=>a$2[0]0||Object.is(num$2,0):signDisplay===`exceptZero`&&(Object.is(num$2,-0)||Object.is(num$2,0)?num$2=Math.abs(num$2):needsPositiveSign=num$2>0),needsPositiveSign){let negative=numberFormat.format(-num$2),noSign=numberFormat.format(num$2),minus=negative.replace(noSign,``).replace(/\u200e|\u061C/,``);[...minus].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`);let positive=negative.replace(noSign,`!!!`).replace(minus,`+`).replace(`!!!`,noSign);return positive}else return numberFormat.format(num$2)}}const $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX=RegExp(`^.*\\(.*\\).*$`),$6c7bd7858deea686$var$NUMBERING_SYSTEMS=[`latn`,`arab`,`hanidec`,`deva`,`beng`];var $6c7bd7858deea686$export$cd11ab140839f11d=class{parse(value$1){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,value$1).parse(value$1)}isValidPartialNumber(value$1,minValue,maxValue){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,value$1).isValidPartialNumber(value$1,minValue,maxValue)}getNumberingSystem(value$1){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,value$1).options.numberingSystem}constructor(locale,options$1={}){this.locale=locale,this.options=options$1}};const $6c7bd7858deea686$var$numberParserCache=new Map;function $6c7bd7858deea686$var$getNumberParserImpl(locale,options$1,value$1){let defaultParser=$6c7bd7858deea686$var$getCachedNumberParser(locale,options$1);if(!locale.includes(`-nu-`)&&!defaultParser.isValidPartialNumber(value$1)){for(let numberingSystem of $6c7bd7858deea686$var$NUMBERING_SYSTEMS)if(numberingSystem!==defaultParser.options.numberingSystem){let parser=$6c7bd7858deea686$var$getCachedNumberParser(locale+(locale.includes(`-u-`)?`-nu-`:`-u-nu-`)+numberingSystem,options$1);if(parser.isValidPartialNumber(value$1))return parser}}return defaultParser}function $6c7bd7858deea686$var$getCachedNumberParser(locale,options$1){let cacheKey=locale+(options$1?Object.entries(options$1).sort((a$2,b$4)=>a$2[0]-1&&(fullySanitizedValue=`-${fullySanitizedValue}`)}let newValue=fullySanitizedValue?+fullySanitizedValue:NaN;if(isNaN(newValue))return NaN;if(this.options.style===`percent`){var _this_options_minimumFractionDigits,_this_options_maximumFractionDigits;let options$1={...this.options,style:`decimal`,minimumFractionDigits:Math.min(((_this_options_minimumFractionDigits=this.options.minimumFractionDigits)??0)+2,20),maximumFractionDigits:Math.min(((_this_options_maximumFractionDigits=this.options.maximumFractionDigits)??0)+2,20)};return new $6c7bd7858deea686$export$cd11ab140839f11d(this.locale,options$1).parse(new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.locale,options$1).format(newValue))}return this.options.currencySign===`accounting`&&$6c7bd7858deea686$var$CURRENCY_SIGN_REGEX.test(value$1)&&(newValue=-1*newValue),newValue}sanitize(value$1){return value$1=value$1.replace(this.symbols.literals,``),this.symbols.minusSign&&(value$1=value$1.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(value$1=value$1.replace(`,`,this.symbols.decimal),value$1=value$1.replace(`،`,this.symbols.decimal)),this.symbols.group&&(value$1=$6c7bd7858deea686$var$replaceAll(value$1,`.`,this.symbols.group))),this.options.locale===`fr-FR`&&(value$1=$6c7bd7858deea686$var$replaceAll(value$1,`.`,` `)),value$1}isValidPartialNumber(value$1,minValue=-1/0,maxValue=1/0){return value$1=this.sanitize(value$1),this.symbols.minusSign&&value$1.startsWith(this.symbols.minusSign)&&minValue<0?value$1=value$1.slice(this.symbols.minusSign.length):this.symbols.plusSign&&value$1.startsWith(this.symbols.plusSign)&&maxValue>0&&(value$1=value$1.slice(this.symbols.plusSign.length)),this.symbols.group&&value$1.startsWith(this.symbols.group)||this.symbols.decimal&&value$1.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(value$1=$6c7bd7858deea686$var$replaceAll(value$1,this.symbols.group,``)),value$1=value$1.replace(this.symbols.numeral,``),this.symbols.decimal&&(value$1=value$1.replace(this.symbols.decimal,``)),value$1.length===0)}constructor(locale,options$1={}){this.locale=locale,this.formatter=new Intl.NumberFormat(locale,options$1),this.options=this.formatter.resolvedOptions(),this.symbols=$6c7bd7858deea686$var$getSymbols(locale,this.formatter,this.options,options$1);var _this_options_minimumFractionDigits,_this_options_maximumFractionDigits;this.options.style===`percent`&&(((_this_options_minimumFractionDigits=this.options.minimumFractionDigits)??0)>18||((_this_options_maximumFractionDigits=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 $6c7bd7858deea686$var$nonLiteralParts=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),$6c7bd7858deea686$var$pluralNumbers=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function $6c7bd7858deea686$var$getSymbols(locale,formatter,intlOptions,originalOptions){var _allParts_find,_posAllParts_find,_decimalParts_find,_allParts_find1;let symbolFormatter=new Intl.NumberFormat(locale,{...intlOptions,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`}),allParts=symbolFormatter.formatToParts(-10000.111),posAllParts=symbolFormatter.formatToParts(10000.111),pluralParts=$6c7bd7858deea686$var$pluralNumbers.map(n$2=>symbolFormatter.formatToParts(n$2));var _allParts_find_value;let minusSign=(_allParts_find_value=(_allParts_find=allParts.find(p$5=>p$5.type===`minusSign`))?.value)??`-`,plusSign=(_posAllParts_find=posAllParts.find(p$5=>p$5.type===`plusSign`))?.value;!plusSign&&(originalOptions?.signDisplay===`exceptZero`||originalOptions?.signDisplay===`always`)&&(plusSign=`+`);let decimalParts=new Intl.NumberFormat(locale,{...intlOptions,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001),decimal=(_decimalParts_find=decimalParts.find(p$5=>p$5.type===`decimal`))?.value,group=(_allParts_find1=allParts.find(p$5=>p$5.type===`group`))?.value,allPartsLiterals=allParts.filter(p$5=>!$6c7bd7858deea686$var$nonLiteralParts.has(p$5.type)).map(p$5=>$6c7bd7858deea686$var$escapeRegex(p$5.value)),pluralPartsLiterals=pluralParts.flatMap(p$5=>p$5.filter(p$6=>!$6c7bd7858deea686$var$nonLiteralParts.has(p$6.type)).map(p$6=>$6c7bd7858deea686$var$escapeRegex(p$6.value))),sortedLiterals=[...new Set([...allPartsLiterals,...pluralPartsLiterals])].sort((a$2,b$4)=>b$4.length-a$2.length),literals=sortedLiterals.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${sortedLiterals.join(`|`)}|[\\p{White_Space}]`,`gu`),numerals=[...new Intl.NumberFormat(intlOptions.locale,{useGrouping:!1}).format(9876543210)].reverse(),indexes=new Map(numerals.map((d$2,i$1)=>[d$2,i$1])),numeral=RegExp(`[${numerals.join(``)}]`,`g`),index$1=d$2=>String(indexes.get(d$2));return{minusSign,plusSign,decimal,group,literals,numeral,index:index$1}}function $6c7bd7858deea686$var$replaceAll(str,find$1,replace){return str.replaceAll?str.replaceAll(find$1,replace):str.split(find$1).join(replace)}function $6c7bd7858deea686$var$escapeRegex(string$2){return string$2.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}const[injectSwitchRootContext,provideSwitchRootContext]=createContext(`SwitchRoot`),_sfc_main$13=defineComponent({__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(__props,{emit:__emit}){let props=__props,emit$1=__emit,{disabled}=toRefs(props),modelValue=useVModel(props,`modelValue`,emit$1,{defaultValue:props.defaultValue,passive:props.modelValue===void 0});function toggleCheck(){disabled.value||(modelValue.value=!modelValue.value)}let{forwardRef,currentElement}=useForwardExpose(),isFormControl=useFormControl(currentElement),ariaLabel=computed(()=>props.id&¤tElement.value?document.querySelector(`[for="${props.id}"]`)?.innerText:void 0);return provideSwitchRootContext({modelValue,toggleCheck,disabled}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),mergeProps(_ctx.$attrs,{id:_ctx.id,ref:unref(forwardRef),role:`switch`,type:_ctx.as===`button`?`button`:void 0,value:_ctx.value,"aria-label":_ctx.$attrs[`aria-label`]||ariaLabel.value,"aria-checked":unref(modelValue),"aria-required":_ctx.required,"data-state":unref(modelValue)?`checked`:`unchecked`,"data-disabled":unref(disabled)?``:void 0,"as-child":_ctx.asChild,as:_ctx.as,disabled:unref(disabled),onClick:toggleCheck,onKeydown:withKeys(withModifiers(toggleCheck,[`prevent`]),[`enter`])}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{modelValue:unref(modelValue)}),unref(isFormControl)&&_ctx.name?(openBlock(),createBlock(unref(_sfc_main$15),{key:0,type:`checkbox`,name:_ctx.name,disabled:unref(disabled),required:_ctx.required,value:_ctx.value,checked:!!unref(modelValue)},null,8,[`name`,`disabled`,`required`,`value`,`checked`])):createCommentVNode(``,!0)]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]))}}),_sfc_main$14=defineComponent({__name:`SwitchThumb`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(__props){let rootContext=injectSwitchRootContext();return useForwardExpose(),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{"data-state":unref(rootContext).modelValue?.value?`checked`:`unchecked`,"data-disabled":unref(rootContext).disabled.value?``:void 0,"as-child":_ctx.asChild,as:_ctx.as},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`]))}});var Checkbox_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Checkbox`,props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(_sfc_main$13),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,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:withCtx(()=>[createVNode(unref(_sfc_main$14),{"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`]))}}),Checkbox_default=Checkbox_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$38={flex:`~ col gap-4`},_hoisted_2$24={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_3$18={flex:`1`},_hoisted_4$16={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_5$14={class:`text-xs text-neutral-500 dark:text-neutral-400`};var FieldCheckbox_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldCheckbox`,props:mergeModels({label:{},description:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,_hoisted_1$38,[createBaseVNode(`div`,_hoisted_2$24,[createBaseVNode(`div`,_hoisted_3$18,[createBaseVNode(`div`,_hoisted_4$16,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)])]),createBaseVNode(`div`,_hoisted_5$14,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),createVNode(Checkbox_default,{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event},null,8,[`modelValue`])])]))}}),FieldCheckbox_default=FieldCheckbox_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$37=[`type`];var Input_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Input`,props:mergeModels({type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>withDirectives((openBlock(),createElementBlock(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,type:props.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,_hoisted_1$37)),[[vModelDynamic,modelValue.value]])}}),Input_default=Input_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$36={"max-w-full":``},_hoisted_2$23={flex:`~ col gap-4`},_hoisted_3$17={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$15={key:0,class:`text-red-500`},_hoisted_5$13={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},_hoisted_6$12=[`type`,`placeholder`];var FieldInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldInput`,props:mergeModels({label:{},description:{},placeholder:{},required:{type:Boolean},type:{},inputClass:{},singleLine:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$36,[createBaseVNode(`label`,_hoisted_2$23,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$17,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$15,`*`))]),createBaseVNode(`div`,_hoisted_5$13,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),_ctx.singleLine?(openBlock(),createBlock(Input_default,{key:0,modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,type:props.type,placeholder:props.placeholder,class:normalizeClass(props.inputClass)},null,8,[`modelValue`,`type`,`placeholder`,`class`])):withDirectives((openBlock(),createElementBlock(`textarea`,{key:1,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,type:props.type,placeholder:props.placeholder,class:normalizeClass(props.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,_hoisted_6$12)),[[vModelText,modelValue.value]])])]))}}),FieldInput_default=FieldInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$35={flex:`~ gap-2`};var InputKeyValue_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`InputKeyValue`,props:mergeModels({name:{},keyPlaceholder:{},valuePlaceholder:{}},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:[`update:propertyKey`,`update:propertyValue`],setup(__props){let props=__props,key$1=useModel(__props,`propertyKey`),value$1=useModel(__props,`propertyValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$35,[createVNode(Input_default,{modelValue:key$1.value,"onUpdate:modelValue":_cache$1[0]||=$event=>key$1.value=$event,placeholder:props.keyPlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`]),createVNode(Input_default,{modelValue:value$1.value,"onUpdate:modelValue":_cache$1[1]||=$event=>value$1.value=$event,placeholder:props.valuePlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`])]))}}),InputKeyValue_default=InputKeyValue_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$34={"max-w-full":``},_hoisted_2$22={flex:`~ col gap-2`},_hoisted_3$16={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$14={key:0,class:`text-red-500`},_hoisted_5$12={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},_hoisted_6$11={flex:`~ col gap-2`},_hoisted_7$9=[`onClick`];var FieldKeyValues_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldKeyValues`,props:mergeModels({label:{},description:{},name:{},keyPlaceholder:{},valuePlaceholder:{},required:{type:Boolean},inputClass:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:mergeModels([`remove`,`add`],[`update:modelValue`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,keyValues=useModel(__props,`modelValue`),inputKey=ref(``),inputValue=ref(``);return watch([inputKey,inputValue],()=>{emit$1(`add`,inputKey.value,inputValue.value)}),(_ctx,_cache$1)=>{let _directive_auto_animate=resolveDirective(`auto-animate`);return openBlock(),createElementBlock(`div`,_hoisted_1$34,[createBaseVNode(`label`,_hoisted_2$22,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$16,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$14,`*`))]),createBaseVNode(`div`,_hoisted_5$12,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_6$11,[(openBlock(!0),createElementBlock(Fragment,null,renderList(keyValues.value,(keyValue,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,"w-full":``,flex:``,"items-center":``,"gap-2":``},[createVNode(InputKeyValue_default,{"property-key":keyValue.key,"onUpdate:propertyKey":$event=>keyValue.key=$event,"property-value":keyValue.value,"onUpdate:propertyValue":$event=>keyValue.value=$event,"key-placeholder":props.keyPlaceholder,"value-placeholder":props.valuePlaceholder,"w-full":``},null,8,[`property-key`,`onUpdate:propertyKey`,`property-value`,`onUpdate:propertyValue`,`key-placeholder`,`value-placeholder`]),createBaseVNode(`button`,{onClick:$event=>emit$1(`remove`,index$1)},_cache$1[0]||=[createBaseVNode(`div`,{"i-solar:minus-circle-line-duotone":``,size:`6`},null,-1)],8,_hoisted_7$9)]))),128))])),[[_directive_auto_animate]])])])}}}),FieldKeyValues_default=FieldKeyValues_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$33=[`min`,`max`,`step`];var Range_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Range`,props:mergeModels({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(__props){let props=__props,modelValue=useModel(__props,`modelValue`),scaledMin=computed(()=>props.min*1e4),scaledMax=computed(()=>props.max*1e4),scaledStep=computed(()=>props.step*1e4),sliderRef=ref(),sliderValue=computed({get:()=>modelValue.value*1e4,set:value$1=>{modelValue.value=value$1/1e4,updateTrackColor()}});onMounted(()=>updateTrackColor()),watch(sliderValue,()=>updateTrackColor(),{immediate:!0}),watch([scaledMin,scaledMax,scaledStep],()=>updateTrackColor(),{immediate:!0});function updateTrackColor(){sliderRef.value&&(sliderRef.value.style.setProperty(`--value`,sliderValue.value.toString()),sliderRef.value.style.setProperty(`--min`,sliderRef.value.min?sliderRef.value.min:props.min.toString()),sliderRef.value.style.setProperty(`--max`,sliderRef.value.max?sliderRef.value.max:props.max.toString()))}function handleInput(e$3){let target$1=e$3.target;target$1.style.setProperty(`--value`,target$1.value)}return(_ctx,_cache$1)=>withDirectives((openBlock(),createElementBlock(`input`,{ref_key:`sliderRef`,ref:sliderRef,"onUpdate:modelValue":_cache$1[0]||=$event=>sliderValue.value=$event,type:`range`,min:scaledMin.value,max:scaledMax.value,step:scaledStep.value,class:`slider-progress form_input-range`,onInput:handleInput},null,40,_hoisted_1$33)),[[vModelText,sliderValue.value,void 0,{number:!0}]])}}),Range_default=__plugin_vue_export_helper_default(Range_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-dbfa7610`]]);const _hoisted_1$32={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_2$21={flex:`1`},_hoisted_3$15={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$13={class:`text-xs text-neutral-500 dark:text-neutral-400`},_hoisted_5$11={"font-mono":``},_hoisted_6$10={flex:`~ row`,"items-center":``,"gap-2":``};var FieldRange_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldRange`,props:mergeModels({min:{},max:{},step:{},label:{},description:{},formatValue:{},as:{default:`label`}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(props.as,{flex:`~ col gap-4`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$32,[createBaseVNode(`div`,_hoisted_2$21,[createBaseVNode(`div`,_hoisted_3$15,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(_ctx.label),1)])]),createBaseVNode(`div`,_hoisted_4$13,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(_ctx.description),1)])])]),createBaseVNode(`span`,_hoisted_5$11,toDisplayString(props.formatValue?.(modelValue.value)||modelValue.value),1)]),createBaseVNode(`div`,_hoisted_6$10,[createVNode(Range_default,{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,min:_ctx.min||0,max:_ctx.max||1,step:_ctx.step||.01,"w-full":``},null,8,[`modelValue`,`min`,`max`,`step`])])]),_:3}))}}),FieldRange_default=FieldRange_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$31={flex:`~ col gap-4`},_hoisted_2$20={flex:`1`},_hoisted_3$14={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$12={class:`text-xs text-neutral-500 dark:text-neutral-400`};var FieldSelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldSelect`,props:mergeModels({label:{},description:{},options:{},placeholder:{},disabled:{type:Boolean},layout:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,_hoisted_1$31,[createBaseVNode(`div`,{class:normalizeClass([props.layout===`horizontal`?`flex flex-row items-center justify-between gap-2`:`flex flex-col items-start justify-center gap-2`])},[createBaseVNode(`div`,_hoisted_2$20,[createBaseVNode(`div`,_hoisted_3$14,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)])]),createBaseVNode(`div`,_hoisted_4$12,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),renderSlot(_ctx.$slots,`default`,{},()=>[createVNode(unref(Select_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,options:props.options,placeholder:props.placeholder,disabled:props.disabled,title:_ctx.label},{default:withCtx(({value:value$1})=>[createTextVNode(toDisplayString(props.options?.find(option$1=>option$1.value===value$1)?.label||props.placeholder),1)]),_:1},8,[`modelValue`,`options`,`placeholder`,`disabled`,`title`])])],2)]))}}),FieldSelect_default=FieldSelect_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$30={class:`max-w-full`},_hoisted_2$19={class:`flex flex-col gap-2`},_hoisted_3$13={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$11={key:0,class:`text-red-500`},_hoisted_5$10={class:`text-nowrap text-xs text-neutral-500 dark:text-neutral-400`},_hoisted_6$9={class:`~ col gap-2`},_hoisted_7$8=[`onClick`];var FieldValues_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldValues`,props:mergeModels({label:{},description:{},name:{},valuePlaceholder:{},required:{type:Boolean},inputClass:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:mergeModels([`remove`,`add`],[`update:modelValue`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,items=useModel(__props,`modelValue`);function addItem(){items.value.push(``),emit$1(`add`)}function removeItem(index$1){items.value.splice(index$1,1),emit$1(`remove`,index$1)}return(_ctx,_cache$1)=>{let _directive_auto_animate=resolveDirective(`auto-animate`);return openBlock(),createElementBlock(`div`,_hoisted_1$30,[createBaseVNode(`label`,_hoisted_2$19,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$13,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$11,`*`))]),createBaseVNode(`div`,_hoisted_5$10,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_6$9,[(openBlock(!0),createElementBlock(Fragment,null,renderList(items.value,(_$2,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,class:`w-full flex items-center gap-2`},[createVNode(Input_default,{modelValue:items.value[index$1],"onUpdate:modelValue":$event=>items.value[index$1]=$event,placeholder:props.valuePlaceholder,class:`w-90%`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`]),createBaseVNode(`button`,{"i-solar:minus-circle-line-duotone":``,size:`6`,class:`min-w-20px w-10% flex text-red-500`,onClick:$event=>removeItem(index$1)},null,8,_hoisted_7$8)]))),128)),createBaseVNode(`div`,{"i-solar:add-circle-line-duotone":``,size:`6`,class:`mt-2 w-4/5 text-blue-500`,onClick:addItem})])),[[_directive_auto_animate]])])])}}}),FieldValues_default=FieldValues_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$29=[`disabled`];var ColorHueRange_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ColorHueRange`,props:mergeModels({disabled:{type:Boolean},class:{}},{colorValue:{type:String,default:``},colorValueModifiers:{}}),emits:[`update:colorValue`],setup(__props){let props=__props,colorValue=useModel(__props,`colorValue`);return(_ctx,_cache$1)=>withDirectives((openBlock(),createElementBlock(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>colorValue.value=$event,type:`range`,min:`0`,max:`360`,step:`0.01`,class:normalizeClass([`color-hue-range`,[props.disabled?`opacity-25 cursor-not-allowed`:`cursor-pointer`,props.class||``]]),transition:`all ease-in-out duration-250`,disabled:props.disabled},null,10,_hoisted_1$29)),[[vModelText,colorValue.value]])}}),ColorHueRange_default=__plugin_vue_export_helper_default(ColorHueRange_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-3d01d2fa`]]),Option_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Option`,props:{value:{},label:{},active:{type:Boolean}},setup(__props){let props=__props,selectOption=inject(`selectOption`),hide$2=inject(`hide`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,mergeProps({..._ctx.$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":props.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:_cache$1[0]||=()=>{unref(selectOption)(props.value),unref(hide$2)()}}),[renderSlot(_ctx.$slots,`default`,{},()=>[createTextVNode(toDisplayString(props.label),1)])],16))}}),Option_default=Option_vue_vue_type_script_setup_true_lang_default;function n$1(t){var e$3;return(e$3=t.ownerDocument)?.defaultView||window}function o(t){return n$1(t).getComputedStyle(t)}const i=Math.min,r=Math.max,l=Math.round;function c$1(t){let e$3=o(t),n$2=parseFloat(e$3.width),i$1=parseFloat(e$3.height),r$2=t.offsetWidth,c$4=t.offsetHeight,s$1=l(n$2)!==r$2||l(i$1)!==c$4;return s$1&&(n$2=r$2,i$1=c$4),{width:n$2,height:i$1,fallback:s$1}}function s(t){return h$2(t)?(t.nodeName||``).toLowerCase():``}let f;function u(){if(f)return f;let t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(f=t.brands.map(t$1=>t$1.brand+`/`+t$1.version).join(` `),f):navigator.userAgent}function a(t){return t instanceof n$1(t).HTMLElement}function d$1(t){return t instanceof n$1(t).Element}function h$2(t){return t instanceof n$1(t).Node}function p$1(t){return typeof ShadowRoot>`u`?!1:t instanceof n$1(t).ShadowRoot||t instanceof ShadowRoot}function g$1(t){let{overflow:e$3,overflowX:n$2,overflowY:i$1,display:r$2}=o(t);return/auto|scroll|overlay|hidden|clip/.test(e$3+i$1+n$2)&&![`inline`,`contents`].includes(r$2)}function m$2(t){return[`table`,`td`,`th`].includes(s(t))}function y$2(t){let e$3=/firefox/i.test(u()),n$2=o(t),i$1=n$2.backdropFilter||n$2.WebkitBackdropFilter;return n$2.transform!==`none`||n$2.perspective!==`none`||!!i$1&&i$1!==`none`||e$3&&n$2.willChange===`filter`||e$3&&!!n$2.filter&&n$2.filter!==`none`||[`transform`,`perspective`].some(t$1=>n$2.willChange.includes(t$1))||[`paint`,`layout`,`strict`,`content`].some(t$1=>{let e$4=n$2.contain;return e$4!=null&&e$4.includes(t$1)})}function x$2(){return!/^((?!chrome|android).)*safari/i.test(u())}function w$1(t){return[`html`,`body`,`#document`].includes(s(t))}function v$1(t){return d$1(t)?t:t.contextElement}const b$2={x:1,y:1};function L(t){let e$3=v$1(t);if(!a(e$3))return b$2;let n$2=e$3.getBoundingClientRect(),{width:o$1,height:i$1,fallback:r$2}=c$1(e$3),s$1=(r$2?l(n$2.width):n$2.width)/o$1,f$3=(r$2?l(n$2.height):n$2.height)/i$1;return s$1&&Number.isFinite(s$1)||(s$1=1),f$3&&Number.isFinite(f$3)||(f$3=1),{x:s$1,y:f$3}}function E$1(t,e$3,o$1,i$1){var r$2,l$1;e$3===void 0&&(e$3=!1),o$1===void 0&&(o$1=!1);let c$4=t.getBoundingClientRect(),s$1=v$1(t),f$3=b$2;e$3&&(i$1?d$1(i$1)&&(f$3=L(i$1)):f$3=L(t));let u$1=s$1?n$1(s$1):window,a$2=!x$2()&&o$1,h$3=(c$4.left+(a$2&&(r$2=u$1.visualViewport)?.offsetLeft||0))/f$3.x,p$5=(c$4.top+(a$2&&(l$1=u$1.visualViewport)?.offsetTop||0))/f$3.y,g$2=c$4.width/f$3.x,m$3=c$4.height/f$3.y;if(s$1){let t$1=n$1(s$1),e$4=i$1&&d$1(i$1)?n$1(i$1):i$1,o$2=t$1.frameElement;for(;o$2&&i$1&&e$4!==t$1;){let t$2=L(o$2),e$5=o$2.getBoundingClientRect(),i$2=getComputedStyle(o$2);e$5.x+=(o$2.clientLeft+parseFloat(i$2.paddingLeft))*t$2.x,e$5.y+=(o$2.clientTop+parseFloat(i$2.paddingTop))*t$2.y,h$3*=t$2.x,p$5*=t$2.y,g$2*=t$2.x,m$3*=t$2.y,h$3+=e$5.x,p$5+=e$5.y,o$2=n$1(o$2).frameElement}}return{width:g$2,height:m$3,top:p$5,right:h$3+g$2,bottom:p$5+m$3,left:h$3,x:h$3,y:p$5}}function R$2(t){return((h$2(t)?t.ownerDocument:t.document)||window.document).documentElement}function T(t){return d$1(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function C$2(t){return E$1(R$2(t)).left+T(t).scrollLeft}function F(t){if(s(t)===`html`)return t;let e$3=t.assignedSlot||t.parentNode||p$1(t)&&t.host||R$2(t);return p$1(e$3)?e$3.host:e$3}function W$1(t){let e$3=F(t);return w$1(e$3)?e$3.ownerDocument.body:a(e$3)&&g$1(e$3)?e$3:W$1(e$3)}function D(t,e$3){var o$1;e$3===void 0&&(e$3=[]);let i$1=W$1(t),r$2=i$1===(o$1=t.ownerDocument)?.body,l$1=n$1(i$1);return r$2?e$3.concat(l$1,l$1.visualViewport||[],g$1(i$1)?i$1:[]):e$3.concat(i$1,D(i$1))}function S$1(e$3,i$1,l$1){return i$1===`viewport`?rectToClientRect(function(t,e$4){let o$1=n$1(t),i$2=R$2(t),r$2=o$1.visualViewport,l$2=i$2.clientWidth,c$4=i$2.clientHeight,s$1=0,f$3=0;if(r$2){l$2=r$2.width,c$4=r$2.height;let t$1=x$2();(t$1||!t$1&&e$4===`fixed`)&&(s$1=r$2.offsetLeft,f$3=r$2.offsetTop)}return{width:l$2,height:c$4,x:s$1,y:f$3}}(e$3,l$1)):d$1(i$1)?rectToClientRect(function(t,e$4){let n$2=E$1(t,!0,e$4===`fixed`),o$1=n$2.top+t.clientTop,i$2=n$2.left+t.clientLeft,r$2=a(t)?L(t):{x:1,y:1};return{width:t.clientWidth*r$2.x,height:t.clientHeight*r$2.y,x:i$2*r$2.x,y:o$1*r$2.y}}(i$1,l$1)):rectToClientRect(function(t){let e$4=R$2(t),n$2=T(t),i$2=t.ownerDocument.body,l$2=r(e$4.scrollWidth,e$4.clientWidth,i$2.scrollWidth,i$2.clientWidth),c$4=r(e$4.scrollHeight,e$4.clientHeight,i$2.scrollHeight,i$2.clientHeight),s$1=-n$2.scrollLeft+C$2(t),f$3=-n$2.scrollTop;return o(i$2).direction===`rtl`&&(s$1+=r(e$4.clientWidth,i$2.clientWidth)-l$2),{width:l$2,height:c$4,x:s$1,y:f$3}}(R$2(e$3)))}function A$1(t){return a(t)&&o(t).position!==`fixed`?t.offsetParent:null}function H$2(t){let e$3=n$1(t),i$1=A$1(t);for(;i$1&&m$2(i$1)&&o(i$1).position===`static`;)i$1=A$1(i$1);return i$1&&(s(i$1)===`html`||s(i$1)===`body`&&o(i$1).position===`static`&&!y$2(i$1))?e$3:i$1||function(t$1){let e$4=F(t$1);for(;a(e$4)&&!w$1(e$4);){if(y$2(e$4))return e$4;e$4=F(e$4)}return null}(t)||e$3}function O$2(t,e$3,n$2){let o$1=a(e$3),i$1=R$2(e$3),r$2=E$1(t,!0,n$2===`fixed`,e$3),l$1={scrollLeft:0,scrollTop:0},c$4={x:0,y:0};if(o$1||!o$1&&n$2!==`fixed`)if((s(e$3)!==`body`||g$1(i$1))&&(l$1=T(e$3)),a(e$3)){let t$1=E$1(e$3,!0);c$4.x=t$1.x+e$3.clientLeft,c$4.y=t$1.y+e$3.clientTop}else i$1&&(c$4.x=C$2(i$1));return{x:r$2.left+l$1.scrollLeft-c$4.x,y:r$2.top+l$1.scrollTop-c$4.y,width:r$2.width,height:r$2.height}}const P$1={getClippingRect:function(t){let{element:e$3,boundary:n$2,rootBoundary:l$1,strategy:c$4}=t,f$3=n$2===`clippingAncestors`?function(t$1,e$4){let n$3=e$4.get(t$1);if(n$3)return n$3;let i$1=D(t$1).filter(t$2=>d$1(t$2)&&s(t$2)!==`body`),r$2=null,l$2=o(t$1).position===`fixed`,c$5=l$2?F(t$1):t$1;for(;d$1(c$5)&&!w$1(c$5);){let t$2=o(c$5),e$5=y$2(c$5);(l$2?e$5||r$2:e$5||t$2.position!==`static`||!r$2||![`absolute`,`fixed`].includes(r$2.position))?r$2=t$2:i$1=i$1.filter(t$3=>t$3!==c$5),c$5=F(c$5)}return e$4.set(t$1,i$1),i$1}(e$3,this._c):[].concat(n$2),u$1=[...f$3,l$1],a$2=u$1[0],h$3=u$1.reduce((t$1,n$3)=>{let o$1=S$1(e$3,n$3,c$4);return t$1.top=r(o$1.top,t$1.top),t$1.right=i(o$1.right,t$1.right),t$1.bottom=i(o$1.bottom,t$1.bottom),t$1.left=r(o$1.left,t$1.left),t$1},S$1(e$3,a$2,c$4));return{width:h$3.right-h$3.left,height:h$3.bottom-h$3.top,x:h$3.left,y:h$3.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e$3,offsetParent:n$2,strategy:o$1}=t,i$1=a(n$2),r$2=R$2(n$2);if(n$2===r$2)return e$3;let l$1={scrollLeft:0,scrollTop:0},c$4={x:1,y:1},f$3={x:0,y:0};if((i$1||!i$1&&o$1!==`fixed`)&&((s(n$2)!==`body`||g$1(r$2))&&(l$1=T(n$2)),a(n$2))){let t$1=E$1(n$2);c$4=L(n$2),f$3.x=t$1.x+n$2.clientLeft,f$3.y=t$1.y+n$2.clientTop}return{width:e$3.width*c$4.x,height:e$3.height*c$4.y,x:e$3.x*c$4.x-l$1.scrollLeft*c$4.x+f$3.x,y:e$3.y*c$4.y-l$1.scrollTop*c$4.y+f$3.y}},isElement:d$1,getDimensions:function(t){return a(t)?c$1(t):t.getBoundingClientRect()},getOffsetParent:H$2,getDocumentElement:R$2,getScale:L,async getElementRects(t){let{reference:e$3,floating:n$2,strategy:o$1}=t,i$1=this.getOffsetParent||H$2,r$2=this.getDimensions;return{reference:O$2(e$3,await i$1(n$2),o$1),floating:{x:0,y:0,...await r$2(n$2)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>o(t).direction===`rtl`},B=(t,n$2,o$1)=>{let i$1=new Map,r$2={platform:P$1,...o$1},l$1={...r$2.platform,_c:i$1};return computePosition(t,n$2,{...r$2,platform:l$1})},h$1={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$3=>[...e$3,`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 S(e$3,t){let o$1=h$1.themes[e$3]||{},i$1;do i$1=o$1[t],typeof i$1>`u`?o$1.$extend?o$1=h$1.themes[o$1.$extend]||{}:(o$1=null,i$1=h$1[t]):o$1=null;while(o$1);return i$1}function Ze(e$3){let t=[e$3],o$1=h$1.themes[e$3]||{};do o$1.$extend&&!o$1.$resetCss?(t.push(o$1.$extend),o$1=h$1.themes[o$1.$extend]||{}):o$1=null;while(o$1);return t.map(i$1=>`v-popper--theme-${i$1}`)}function re$2(e$3){let t=[e$3],o$1=h$1.themes[e$3]||{};do o$1.$extend?(t.push(o$1.$extend),o$1=h$1.themes[o$1.$extend]||{}):o$1=null;while(o$1);return t}let $$1=!1;if(typeof window<`u`){$$1=!1;try{let e$3=Object.defineProperty({},`passive`,{get(){$$1=!0}});window.addEventListener(`test`,null,e$3)}catch{}}let _e$1=!1;typeof window<`u`&&typeof navigator<`u`&&(_e$1=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Te$2=[`auto`,`top`,`bottom`,`left`,`right`].reduce((e$3,t)=>e$3.concat([t,`${t}-start`,`${t}-end`]),[]),pe$1={hover:`mouseenter`,focus:`focus`,click:`click`,touch:`touchstart`,pointer:`pointerdown`},ae={hover:`mouseleave`,focus:`blur`,click:`click`,touch:`touchend`,pointer:`pointerup`};function de$1(e$3,t){let o$1=e$3.indexOf(t);o$1!==-1&&e$3.splice(o$1,1)}function G$1(){return new Promise(e$3=>requestAnimationFrame(()=>{requestAnimationFrame(e$3)}))}const d=[];let g=null;const le={};function he(e$3){let t=le[e$3];return t||=le[e$3]=[],t}let Y=function(){};typeof window<`u`&&(Y=window.Element);function n(e$3){return function(t){return S(t.theme,e$3)}}const q$1=`__floating-vue__popper`,Q$1=()=>defineComponent({name:`VPopper`,provide(){return{[q$1]:{parentPopper:this}}},inject:{[q$1]:{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:n(`disabled`)},positioningDisabled:{type:Boolean,default:n(`positioningDisabled`)},placement:{type:String,default:n(`placement`),validator:e$3=>Te$2.includes(e$3)},delay:{type:[String,Number,Object],default:n(`delay`)},distance:{type:[Number,String],default:n(`distance`)},skidding:{type:[Number,String],default:n(`skidding`)},triggers:{type:Array,default:n(`triggers`)},showTriggers:{type:[Array,Function],default:n(`showTriggers`)},hideTriggers:{type:[Array,Function],default:n(`hideTriggers`)},popperTriggers:{type:Array,default:n(`popperTriggers`)},popperShowTriggers:{type:[Array,Function],default:n(`popperShowTriggers`)},popperHideTriggers:{type:[Array,Function],default:n(`popperHideTriggers`)},container:{type:[String,Object,Y,Boolean],default:n(`container`)},boundary:{type:[String,Y],default:n(`boundary`)},strategy:{type:String,validator:e$3=>[`absolute`,`fixed`].includes(e$3),default:n(`strategy`)},autoHide:{type:[Boolean,Function],default:n(`autoHide`)},handleResize:{type:Boolean,default:n(`handleResize`)},instantMove:{type:Boolean,default:n(`instantMove`)},eagerMount:{type:Boolean,default:n(`eagerMount`)},popperClass:{type:[String,Array,Object],default:n(`popperClass`)},computeTransformOrigin:{type:Boolean,default:n(`computeTransformOrigin`)},autoMinSize:{type:Boolean,default:n(`autoMinSize`)},autoSize:{type:[Boolean,String],default:n(`autoSize`)},autoMaxSize:{type:Boolean,default:n(`autoMaxSize`)},autoBoundaryMaxSize:{type:Boolean,default:n(`autoBoundaryMaxSize`)},preventOverflow:{type:Boolean,default:n(`preventOverflow`)},overflowPadding:{type:[Number,String],default:n(`overflowPadding`)},arrowPadding:{type:[Number,String],default:n(`arrowPadding`)},arrowOverflow:{type:Boolean,default:n(`arrowOverflow`)},flip:{type:Boolean,default:n(`flip`)},shift:{type:Boolean,default:n(`shift`)},shiftCrossAxis:{type:Boolean,default:n(`shiftCrossAxis`)},noAutoFocus:{type:Boolean,default:n(`noAutoFocus`)},disposeTimeout:{type:Number,default:n(`disposeTimeout`)}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e$3=>!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$3=>e$3.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$3;return(e$3=this[q$1])?.parentPopper},hasPopperShowTriggerHover(){var e$3,t;return(e$3=this.popperTriggers)?.includes(`hover`)||(t=this.popperShowTriggers)?.includes(`hover`)}},watch:{shown:`$_autoShowHide`,disabled(e$3){e$3?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$3,t)=>(e$3[t]=`$_computePosition`,e$3),{})},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$3=null,skipDelay:t=!1,force:o$1=!1}={}){var i$1,s$1;(i$1=this.parentPopper)!=null&&i$1.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(o$1||!this.disabled)&&((s$1=this.parentPopper)?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e$3,t),this.$emit(`show`),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit(`update:shown`,!0))},hide({event:e$3=null,skipDelay:t=!1}={}){var o$1;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}(o$1=this.parentPopper)?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e$3,t),this.$emit(`hide`),this.$emit(`update:shown`,!1)}},init(){var e$3;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(e$3=this.referenceNode)?.call(this)??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(`.v-popper__inner`),this.$_arrowNode=this.$_popperNode.querySelector(`.v-popper__arrow-container`),this.$_swapTargetAttrs(`title`,`data-original-title`),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs(`data-original-title`,`title`))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit(`resize`))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;let e$3={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e$3.middleware.push(offset$1({mainAxis:this.distance,crossAxis:this.skidding}));let t=this.placement.startsWith(`auto`);if(t?e$3.middleware.push(autoPlacement({alignment:this.placement.split(`-`)[1]??``})):e$3.placement=this.placement,this.preventOverflow&&(this.shift&&e$3.middleware.push(shift$1({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e$3.middleware.push(flip$1({padding:this.overflowPadding,boundary:this.boundary}))),e$3.middleware.push(arrow$1({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e$3.middleware.push({name:`arrowOverflow`,fn:({placement:i$1,rects:s$1,middlewareData:r$2})=>{let p$5,{centerOffset:a$2}=r$2.arrow;return p$5=i$1.startsWith(`top`)||i$1.startsWith(`bottom`)?Math.abs(a$2)>s$1.reference.width/2:Math.abs(a$2)>s$1.reference.height/2,{data:{overflow:p$5}}}}),this.autoMinSize||this.autoSize){let i$1=this.autoSize?this.autoSize:this.autoMinSize?`min`:null;e$3.middleware.push({name:`autoSize`,fn:({rects:s$1,placement:r$2,middlewareData:p$5})=>{var u$1;if((u$1=p$5.autoSize)!=null&&u$1.skip)return{};let a$2,l$1;return r$2.startsWith(`top`)||r$2.startsWith(`bottom`)?a$2=s$1.reference.width:l$1=s$1.reference.height,this.$_innerNode.style[i$1===`min`?`minWidth`:i$1===`max`?`maxWidth`:`width`]=a$2==null?null:`${a$2}px`,this.$_innerNode.style[i$1===`min`?`minHeight`:i$1===`max`?`maxHeight`:`height`]=l$1==null?null:`${l$1}px`,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e$3.middleware.push(size$1({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:i$1,availableHeight:s$1})=>{this.$_innerNode.style.maxWidth=i$1==null?null:`${i$1}px`,this.$_innerNode.style.maxHeight=s$1==null?null:`${s$1}px`}})));let o$1=await B(this.$_referenceNode,this.$_popperNode,e$3);Object.assign(this.result,{x:o$1.x,y:o$1.y,placement:o$1.placement,strategy:o$1.strategy,arrow:{...o$1.middlewareData.arrow,...o$1.middlewareData.arrowOverflow}})},$_scheduleShow(e$3,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),g&&this.instantMove&&g.instantMove&&g!==this.parentPopper){g.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay(`show`))},$_scheduleHide(e$3,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(g=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay(`hide`))},$_computeDelay(e$3){let t=this.delay;return parseInt(t&&t[e$3]||t||0)},async $_applyShow(e$3=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e$3,!this.isShown&&(this.$_ensureTeleport(),await G$1(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...D(this.$_referenceNode),...D(this.$_popperNode)],`scroll`,()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){let t=this.$_referenceNode.getBoundingClientRect(),o$1=this.$_popperNode.querySelector(`.v-popper__wrapper`),i$1=o$1.parentNode.getBoundingClientRect(),s$1=t.x+t.width/2-(i$1.left+o$1.offsetLeft),r$2=t.y+t.height/2-(i$1.top+o$1.offsetTop);this.result.transformOrigin=`${s$1}px ${r$2}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":``});let e$3=this.showGroup;if(e$3){let t;for(let o$1=0;o$10){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e$3,de$1(d,this),d.length===0&&document.body.classList.remove(`v-popper--some-open`);for(let o$1 of re$2(this.theme)){let i$1=he(o$1);de$1(i$1,this),i$1.length===0&&document.body.classList.remove(`v-popper--some-open--${o$1}`)}g===this&&(g=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 G$1(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e$3=this.container;if(typeof e$3==`string`?e$3=window.document.querySelector(e$3):e$3===!1&&(e$3=this.$_targetNodes[0].parentNode),!e$3)throw Error(`No container for popover: `+this.container);e$3.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){let e$3=o$1=>{this.isShown&&!this.$_hideInProgress||(o$1.usedByTooltip=!0,!this.$_preventShow&&this.show({event:o$1}))};this.$_registerTriggerListeners(this.$_targetNodes,pe$1,this.triggers,this.showTriggers,e$3),this.$_registerTriggerListeners([this.$_popperNode],pe$1,this.popperTriggers,this.popperShowTriggers,e$3);let t=o$1=>{o$1.usedByTooltip||this.hide({event:o$1})};this.$_registerTriggerListeners(this.$_targetNodes,ae,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],ae,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e$3,t,o$1){this.$_events.push({targetNodes:e$3,eventType:t,handler:o$1}),e$3.forEach(i$1=>i$1.addEventListener(t,o$1,$$1?{passive:!0}:void 0))},$_registerTriggerListeners(e$3,t,o$1,i$1,s$1){let r$2=o$1;i$1!=null&&(r$2=typeof i$1==`function`?i$1(r$2):i$1),r$2.forEach(p$5=>{let a$2=t[p$5];a$2&&this.$_registerEventListeners(e$3,a$2,s$1)})},$_removeEventListeners(e$3){let t=[];this.$_events.forEach(o$1=>{let{targetNodes:i$1,eventType:s$1,handler:r$2}=o$1;!e$3||e$3===s$1?i$1.forEach(p$5=>p$5.removeEventListener(s$1,r$2)):t.push(o$1)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e$3,t=!1){this.$_showFrameLocked||(this.hide({event:e$3}),e$3.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$3,t){for(let o$1 of this.$_targetNodes){let i$1=o$1.getAttribute(e$3);i$1&&(o$1.removeAttribute(e$3),o$1.setAttribute(t,i$1))}},$_applyAttrsToTarget(e$3){for(let t of this.$_targetNodes)for(let o$1 in e$3){let i$1=e$3[o$1];i$1==null?t.removeAttribute(o$1):t.setAttribute(o$1,i$1)}},$_updateParentShownChildren(e$3){let t=this.parentPopper;for(;t;)e$3?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){let e$3=this.$_referenceNode.getBoundingClientRect();if(y$1>=e$3.left&&y$1<=e$3.right&&_$1>=e$3.top&&_$1<=e$3.bottom){let t=this.$_popperNode.getBoundingClientRect(),o$1=y$1-c,i$1=_$1-m$1,r$2=t.left+t.width/2-c+(t.top+t.height/2)-m$1+t.width+t.height,p$5=c+o$1*r$2,a$2=m$1+i$1*r$2;return C$1(c,m$1,p$5,a$2,t.left,t.top,t.left,t.bottom)||C$1(c,m$1,p$5,a$2,t.left,t.top,t.right,t.top)||C$1(c,m$1,p$5,a$2,t.right,t.top,t.right,t.bottom)||C$1(c,m$1,p$5,a$2,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<`u`&&typeof window<`u`){if(_e$1){let e$3=$$1?{passive:!0,capture:!0}:!0;document.addEventListener(`touchstart`,t=>ue(t,!0),e$3),document.addEventListener(`touchend`,t=>fe(t,!0),e$3)}else window.addEventListener(`mousedown`,e$3=>ue(e$3,!1),!0),window.addEventListener(`click`,e$3=>fe(e$3,!1),!0);window.addEventListener(`resize`,tt$1)}function ue(e$3,t){if(h$1.autoHideOnMousedown)Pe$1(e$3,t);else for(let o$1=0;o$1=0;i$1--){let s$1=d[i$1];try{let r$2=s$1.containsGlobalTarget=s$1.mouseDownContains||s$1.popperNode().contains(e$3.target);s$1.pendingHide=!1,requestAnimationFrame(()=>{if(s$1.pendingHide=!1,!o$1[s$1.randomId]&&ce(s$1,r$2,e$3)){if(s$1.$_handleGlobalClose(e$3,t),!e$3.closeAllPopover&&e$3.closePopover&&r$2){let a$2=s$1.parentPopper;for(;a$2;)o$1[a$2.randomId]=!0,a$2=a$2.parentPopper;return}let p$5=s$1.parentPopper;for(;p$5&&ce(p$5,p$5.containsGlobalTarget,e$3);)p$5.$_handleGlobalClose(e$3,t),p$5=p$5.parentPopper}})}catch{}}}function ce(e$3,t,o$1){return o$1.closeAllPopover||o$1.closePopover&&t||et(e$3,o$1)&&!t}function et(e$3,t){if(typeof e$3.autoHide==`function`){let o$1=e$3.autoHide(t);return e$3.lastAutoHide=o$1,o$1}return e$3.autoHide}function tt$1(){for(let e$3=0;e$3{c=y$1,m$1=_$1,y$1=e$3.clientX,_$1=e$3.clientY},$$1?{passive:!0}:void 0);function C$1(e$3,t,o$1,i$1,s$1,r$2,p$5,a$2){let l$1=((p$5-s$1)*(t-r$2)-(a$2-r$2)*(e$3-s$1))/((a$2-r$2)*(o$1-e$3)-(p$5-s$1)*(i$1-t)),u$1=((o$1-e$3)*(t-r$2)-(i$1-t)*(e$3-s$1))/((a$2-r$2)*(o$1-e$3)-(p$5-s$1)*(i$1-t));return l$1>=0&&l$1<=1&&u$1>=0&&u$1<=1}const ot$1={extends:Q$1()},B$1=(e$3,t)=>{let o$1=e$3.__vccOpts||e$3;for(let[i$1,s$1]of t)o$1[i$1]=s$1;return o$1};function it$1(e$3,t,o$1,i$1,s$1,r$2){return openBlock(),createElementBlock(`div`,{ref:`reference`,class:normalizeClass([`v-popper`,{"v-popper--shown":e$3.slotData.isShown}])},[renderSlot(e$3.$slots,`default`,normalizeProps(guardReactiveProps(e$3.slotData)))],2)}const st$2=B$1(ot$1,[[`render`,it$1]]);function nt$1(){var e$3=window.navigator.userAgent,t=e$3.indexOf(`MSIE `);if(t>0)return parseInt(e$3.substring(t+5,e$3.indexOf(`.`,t)),10);var o$1=e$3.indexOf(`Trident/`);if(o$1>0){var i$1=e$3.indexOf(`rv:`);return parseInt(e$3.substring(i$1+3,e$3.indexOf(`.`,i$1)),10)}var s$1=e$3.indexOf(`Edge/`);return s$1>0?parseInt(e$3.substring(s$1+5,e$3.indexOf(`.`,s$1)),10):-1}let z$1;function X(){X.init||(X.init=!0,z$1=nt$1()!==-1)}var E={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){X(),nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e$3=document.createElement(`object`);this._resizeObject=e$3,e$3.setAttribute(`aria-hidden`,`true`),e$3.setAttribute(`tabindex`,-1),e$3.onload=this.addResizeHandlers,e$3.type=`text/html`,z$1&&this.$el.appendChild(e$3),e$3.data=`about:blank`,z$1||this.$el.appendChild(e$3)},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&&(!z$1&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const rt$3=withScopeId(`data-v-b329ee4c`);pushScopeId(`data-v-b329ee4c`);const pt$2={class:`resize-observer`,tabindex:`-1`};popScopeId();const at$1=rt$3((e$3,t,o$1,i$1,s$1,r$2)=>(openBlock(),createBlock(`div`,pt$2)));E.render=at$1,E.__scopeId=`data-v-b329ee4c`,E.__file=`src/components/ResizeObserver.vue`;const Z=(e$3=`theme`)=>({computed:{themeClass(){return Ze(this[e$3])}}}),dt$3=defineComponent({name:`VPopperContent`,components:{ResizeObserver:E},mixins:[Z()],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$3){return e$3!=null&&!isNaN(e$3)?`${e$3}px`:null}}}),lt=[`id`,`aria-hidden`,`tabindex`,`data-popper-placement`],ht$2={ref:`inner`,class:`v-popper__inner`},ut$2=createBaseVNode(`div`,{class:`v-popper__arrow-outer`},null,-1),ft$2=createBaseVNode(`div`,{class:`v-popper__arrow-inner`},null,-1),ct$2=[ut$2,ft$2];function mt$1(e$3,t,o$1,i$1,s$1,r$2){let p$5=resolveComponent(`ResizeObserver`);return openBlock(),createElementBlock(`div`,{id:e$3.popperId,ref:`popover`,class:normalizeClass([`v-popper__popper`,[e$3.themeClass,e$3.classes.popperClass,{"v-popper__popper--shown":e$3.shown,"v-popper__popper--hidden":!e$3.shown,"v-popper__popper--show-from":e$3.classes.showFrom,"v-popper__popper--show-to":e$3.classes.showTo,"v-popper__popper--hide-from":e$3.classes.hideFrom,"v-popper__popper--hide-to":e$3.classes.hideTo,"v-popper__popper--skip-transition":e$3.skipTransition,"v-popper__popper--arrow-overflow":e$3.result&&e$3.result.arrow.overflow,"v-popper__popper--no-positioning":!e$3.result}]]),style:normalizeStyle(e$3.result?{position:e$3.result.strategy,transform:`translate3d(${Math.round(e$3.result.x)}px,${Math.round(e$3.result.y)}px,0)`}:void 0),"aria-hidden":e$3.shown?`false`:`true`,tabindex:e$3.autoHide?0:void 0,"data-popper-placement":e$3.result?e$3.result.placement:void 0,onKeyup:t[2]||=withKeys(a$2=>e$3.autoHide&&e$3.$emit(`hide`),[`esc`])},[createBaseVNode(`div`,{class:`v-popper__backdrop`,onClick:t[0]||=a$2=>e$3.autoHide&&e$3.$emit(`hide`)}),createBaseVNode(`div`,{class:`v-popper__wrapper`,style:normalizeStyle(e$3.result?{transformOrigin:e$3.result.transformOrigin}:void 0)},[createBaseVNode(`div`,ht$2,[e$3.mounted?(openBlock(),createElementBlock(Fragment,{key:0},[createBaseVNode(`div`,null,[renderSlot(e$3.$slots,`default`)]),e$3.handleResize?(openBlock(),createBlock(p$5,{key:0,onNotify:t[1]||=a$2=>e$3.$emit(`resize`,a$2)})):createCommentVNode(``,!0)],64)):createCommentVNode(``,!0)],512),createBaseVNode(`div`,{ref:`arrow`,class:`v-popper__arrow-container`,style:normalizeStyle(e$3.result?{left:e$3.toPx(e$3.result.arrow.x),top:e$3.toPx(e$3.result.arrow.y)}:void 0)},ct$2,4)],4)],46,lt)}const ee$1=B$1(dt$3,[[`render`,mt$1]]),te$1={methods:{show(...e$3){return this.$refs.popper.show(...e$3)},hide(...e$3){return this.$refs.popper.hide(...e$3)},dispose(...e$3){return this.$refs.popper.dispose(...e$3)},onResize(...e$3){return this.$refs.popper.onResize(...e$3)}}};let K=function(){};typeof window<`u`&&(K=window.Element);const gt$1=defineComponent({name:`VPopperWrapper`,components:{Popper:st$2,PopperContent:ee$1},mixins:[te$1,Z(`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,K,Boolean],default:void 0},boundary:{type:[String,K],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$3=>!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$3=>e$3!==this.$refs.popperContent.$el)}}});function wt$2(e$3,t,o$1,i$1,s$1,r$2){let p$5=resolveComponent(`PopperContent`),a$2=resolveComponent(`Popper`);return openBlock(),createBlock(a$2,mergeProps({ref:`popper`},e$3.$props,{theme:e$3.finalTheme,"target-nodes":e$3.getTargetNodes,"popper-node":()=>e$3.$refs.popperContent.$el,class:[e$3.themeClass],onShow:t[0]||=()=>e$3.$emit(`show`),onHide:t[1]||=()=>e$3.$emit(`hide`),"onUpdate:shown":t[2]||=l$1=>e$3.$emit(`update:shown`,l$1),onApplyShow:t[3]||=()=>e$3.$emit(`apply-show`),onApplyHide:t[4]||=()=>e$3.$emit(`apply-hide`),onCloseGroup:t[5]||=()=>e$3.$emit(`close-group`),onCloseDirective:t[6]||=()=>e$3.$emit(`close-directive`),onAutoHide:t[7]||=()=>e$3.$emit(`auto-hide`),onResize:t[8]||=()=>e$3.$emit(`resize`)}),{default:withCtx(({popperId:l$1,isShown:u$1,shouldMountContent:L$1,skipTransition:D$1,autoHide:I,show:F$2,hide:v$2,handleResize:R$3,onResize:j$1,classes:V$2,result:Ee$2})=>[renderSlot(e$3.$slots,`default`,{shown:u$1,show:F$2,hide:v$2}),createVNode(p$5,{ref:`popperContent`,"popper-id":l$1,theme:e$3.finalTheme,shown:u$1,mounted:L$1,"skip-transition":D$1,"auto-hide":I,"handle-resize":R$3,classes:V$2,result:Ee$2,onHide:v$2,onResize:j$1},{default:withCtx(()=>[renderSlot(e$3.$slots,`popper`,{shown:u$1,hide:v$2})]),_: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 k=B$1(gt$1,[[`render`,wt$2]]),Se$1={...k,name:`VDropdown`,vPopperTheme:`dropdown`},be={...k,name:`VMenu`,vPopperTheme:`menu`},Ce$1={...k,name:`VTooltip`,vPopperTheme:`tooltip`},$t$2=defineComponent({name:`VTooltipDirective`,components:{Popper:Q$1(),PopperContent:ee$1},mixins:[te$1],inheritAttrs:!1,props:{theme:{type:String,default:`tooltip`},html:{type:Boolean,default:e$3=>S(e$3.theme,`html`)},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e$3=>S(e$3.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$3){if(typeof this.content==`function`&&this.$_isShown&&(e$3||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;let t=++this.$_fetchId,o$1=this.content(this);o$1.then?o$1.then(i$1=>this.onResult(t,i$1)):this.onResult(t,o$1)}},onResult(e$3,t){e$3===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),vt$2=[`innerHTML`],yt$2=[`textContent`];function _t$2(e$3,t,o$1,i$1,s$1,r$2){let p$5=resolveComponent(`PopperContent`),a$2=resolveComponent(`Popper`);return openBlock(),createBlock(a$2,mergeProps({ref:`popper`},e$3.$attrs,{theme:e$3.theme,"target-nodes":e$3.targetNodes,"popper-node":()=>e$3.$refs.popperContent.$el,onApplyShow:e$3.onShow,onApplyHide:e$3.onHide}),{default:withCtx(({popperId:l$1,isShown:u$1,shouldMountContent:L$1,skipTransition:D$1,autoHide:I,hide:F$2,handleResize:v$2,onResize:R$3,classes:j$1,result:V$2})=>[createVNode(p$5,{ref:`popperContent`,class:normalizeClass({"v-popper--tooltip-loading":e$3.loading}),"popper-id":l$1,theme:e$3.theme,shown:u$1,mounted:L$1,"skip-transition":D$1,"auto-hide":I,"handle-resize":v$2,classes:j$1,result:V$2,onHide:F$2,onResize:R$3},{default:withCtx(()=>[e$3.html?(openBlock(),createElementBlock(`div`,{key:0,innerHTML:e$3.finalContent},null,8,vt$2)):(openBlock(),createElementBlock(`div`,{key:1,textContent:toDisplayString(e$3.finalContent)},null,8,yt$2))]),_: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 ze=B$1($t$2,[[`render`,_t$2]]),Ae=`v-popper--has-tooltip`;function Tt$2(e$3,t){let o$1=e$3.placement;if(!o$1&&t)for(let i$1 of Te$2)t[i$1]&&(o$1=i$1);return o$1||=S(e$3.theme||`tooltip`,`placement`),o$1}function Ne(e$3,t,o$1){let i$1,s$1=typeof t;return i$1=s$1===`string`?{content:t}:t&&s$1===`object`?t:{content:!1},i$1.placement=Tt$2(i$1,o$1),i$1.targetNodes=()=>[e$3],i$1.referenceNode=()=>e$3,i$1}let x$1,b$1,Pt$1=0;function St$2(){if(x$1)return;b$1=ref([]),x$1=createApp({name:`VTooltipDirectiveApp`,setup(){return{directives:b$1}},render(){return this.directives.map(t=>h(ze,{...t.options,shown:t.shown||t.options.shown,key:t.id}))},devtools:{hide:!0}});let e$3=document.createElement(`div`);document.body.appendChild(e$3),x$1.mount(e$3)}function bt$2(e$3,t,o$1){St$2();let i$1=ref(Ne(e$3,t,o$1)),s$1=ref(!1),r$2={id:Pt$1++,options:i$1,shown:s$1};return b$1.value.push(r$2),e$3.classList&&e$3.classList.add(Ae),e$3.$_popper={options:i$1,item:r$2,show(){s$1.value=!0},hide(){s$1.value=!1}}}function He$1(e$3){if(e$3.$_popper){let t=b$1.value.indexOf(e$3.$_popper.item);t!==-1&&b$1.value.splice(t,1),delete e$3.$_popper,delete e$3.$_popperOldShown,delete e$3.$_popperMountTarget}e$3.classList&&e$3.classList.remove(Ae)}function me$1(e$3,{value:t,modifiers:o$1}){let i$1=Ne(e$3,t,o$1);if(!i$1.content||S(i$1.theme||`tooltip`,`disabled`))He$1(e$3);else{let s$1;e$3.$_popper?(s$1=e$3.$_popper,s$1.options.value=i$1):s$1=bt$2(e$3,t,o$1),typeof t.shown<`u`&&t.shown!==e$3.$_popperOldShown&&(e$3.$_popperOldShown=t.shown,t.shown?s$1.show():s$1.hide())}}const oe={beforeMount:me$1,updated:me$1,beforeUnmount(e$3){He$1(e$3)}};function ge$1(e$3){e$3.addEventListener(`mousedown`,H$1),e$3.addEventListener(`click`,H$1),e$3.addEventListener(`touchstart`,Oe$1,$$1?{passive:!0}:!1)}function we$1(e$3){e$3.removeEventListener(`mousedown`,H$1),e$3.removeEventListener(`click`,H$1),e$3.removeEventListener(`touchstart`,Oe$1),e$3.removeEventListener(`touchend`,Me),e$3.removeEventListener(`touchcancel`,Be$1)}function H$1(e$3){let t=e$3.currentTarget;e$3.closePopover=!t.$_vclosepopover_touch,e$3.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function Oe$1(e$3){if(e$3.changedTouches.length===1){let t=e$3.currentTarget;t.$_vclosepopover_touch=!0;let o$1=e$3.changedTouches[0];t.$_vclosepopover_touchPoint=o$1,t.addEventListener(`touchend`,Me),t.addEventListener(`touchcancel`,Be$1)}}function Me(e$3){let t=e$3.currentTarget;if(t.$_vclosepopover_touch=!1,e$3.changedTouches.length===1){let o$1=e$3.changedTouches[0],i$1=t.$_vclosepopover_touchPoint;e$3.closePopover=Math.abs(o$1.screenY-i$1.screenY)<20&&Math.abs(o$1.screenX-i$1.screenX)<20,e$3.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function Be$1(e$3){let t=e$3.currentTarget;t.$_vclosepopover_touch=!1}const ie$1={beforeMount(e$3,{value:t,modifiers:o$1}){e$3.$_closePopoverModifiers=o$1,(typeof t>`u`||t)&&ge$1(e$3)},updated(e$3,{value:t,oldValue:o$1,modifiers:i$1}){e$3.$_closePopoverModifiers=i$1,t!==o$1&&(typeof t>`u`||t?ge$1(e$3):we$1(e$3))},beforeUnmount(e$3){we$1(e$3)}},Ht$1=h$1,Ot$2=oe,Mt$1=oe,Bt$2=ie$1,Et=ie$1,kt$1=Se$1,Lt$1=be,Dt$2=Q$1,It$1=ee$1,Ft$1=te$1,Rt$1=k,jt$1=Z,Vt$1=Ce$1,Wt$1=ze,_hoisted_1$28={class:`flex-1 truncate`},_hoisted_2$18={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 dark:bg-neutral-900`};var Select_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Select`,props:mergeModels({options:{},placeholder:{},disabled:{type:Boolean},title:{},layout:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,show=ref(!1),modelValue=useModel(__props,`modelValue`);function selectOption(value$1){modelValue.value=value$1}function handleHide(){show.value=!1}return provide(`selectOption`,selectOption),provide(`hide`,handleHide),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(kt$1),{"auto-size":``,"auto-boundary-max-size":``,"w-full":``},{popper:withCtx(({hide:hide$2})=>[createBaseVNode(`div`,_hoisted_2$18,[renderSlot(_ctx.$slots,`options`,{hide:hide$2},()=>[props.options&&props.options.length?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(props.options,option$1=>(openBlock(),createBlock(Option_default,{key:option$1.value,value:option$1.value,label:option$1.label,active:modelValue.value===option$1.value,onClick:$event=>{selectOption(option$1.value),hide$2()}},null,8,[`value`,`label`,`active`,`onClick`]))),128)):createCommentVNode(``,!0)])])]),default:withCtx(()=>[createBaseVNode(`div`,{"min-w":`[160px]`,p:`2.5`,"w-full":``,class:normalizeClass([`focus:ring-2 focus:ring-black/10`,[props.disabled?`pointer-events-none`:``]]),border:`~ 2 solid dark:neutral-800`,text:`xs dark:neutral-200 disabled:neutral-400 dark:disabled:neutral-600 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":``},[createBaseVNode(`div`,_hoisted_1$28,[renderSlot(_ctx.$slots,`default`,{value:modelValue.value},()=>[createTextVNode(toDisplayString(props.options?.find(item=>item.value===modelValue.value)?.label||modelValue.value),1)])]),_cache$1[0]||=createBaseVNode(`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}))}}),Select_default=Select_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$27={op50:``};var Collapsable_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Collapsable`,props:mergeModels({default:{type:Boolean},label:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,visible=useModel(__props,`modelValue`);watchEffect(()=>{props.default!=null&&(visible.value=!!props.default)});function setVisible(value$1){return visible.value=value$1,value$1}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,null,[renderSlot(_ctx.$slots,`trigger`,normalizeProps(guardReactiveProps({visible:visible.value,setVisible})),()=>[createBaseVNode(`button`,{sticky:``,"top-0":``,"z-10":``,flex:``,"items-center":``,"justify-between":``,px2:``,py1:``,"text-sm":``,"backdrop-blur-xl":``,onClick:_cache$1[0]||=$event=>visible.value=!visible.value},[createBaseVNode(`span`,null,toDisplayString(props.label??`Collapsable`),1),_cache$1[1]||=createTextVNode(),createBaseVNode(`span`,_hoisted_1$27,toDisplayString(visible.value?`▲`:`▼`),1)])]),createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[visible.value?renderSlot(_ctx.$slots,`default`,normalizeProps(mergeProps({key:0},{visible:visible.value,setVisible}))):createCommentVNode(``,!0)]),_:3})]))}}),Collapsable_default=Collapsable_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$26=[`onClick`],_hoisted_2$17={flex:``,"items-center":``,"gap-1.5":``};var Section_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Section`,props:{title:{},icon:{},innerClass:{},expand:{type:Boolean,default:!0}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(Collapsable_default,{default:_ctx.expand},{trigger:withCtx(slotProps=>[createBaseVNode(`button`,{class:`w-full flex items-center justify-between rounded-lg px-3 py-2 outline-none transition-all duration-250 ease-in-out sm:px-4 sm:py-3`,text:`neutral-600 dark:neutral-400 sm sm:base`,bg:`neutral-100 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,onClick:$event=>slotProps.setVisible(!slotProps.visible)},[createBaseVNode(`div`,_hoisted_2$17,[createBaseVNode(`div`,{class:normalizeClass(_ctx.icon),"size-6":``},null,2),createTextVNode(` `+toDisplayString(_ctx.title),1)]),createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``,transition:`transform duration-250`,class:normalizeClass({"rotate-180":slotProps.visible})},null,2)],8,_hoisted_1$26)]),default:withCtx(()=>[createBaseVNode(`div`,{grid:``,"gap-2":``,"p-4":``,class:normalizeClass(_ctx.innerClass)},[renderSlot(_ctx.$slots,`default`)],2)]),_:3},8,[`default`]))}}),Section_default=Section_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$25={"z-1":``,"flex-1":``},_hoisted_2$16={"text-lg":``,"font-normal":``,class:`menu-icon-item-title`,transition:`all ease-in-out duration-400`},_hoisted_3$12={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-item-description`,transition:`all ease-in-out duration-400`};var IconItem_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`IconItem`,props:{title:{},description:{},icon:{},iconTemplate:{type:Boolean},to:{}},setup(__props){return(_ctx,_cache$1)=>{let _component_RouterLink=resolveComponent(`RouterLink`);return openBlock(),createBlock(_component_RouterLink,{box:`border`,flex:`~ row`,bg:`neutral-50 dark:neutral-900`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-item`,transition:`all ease-in-out duration-400`,relative:``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,cursor:`pointer`,to:_ctx.to},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$25,[createBaseVNode(`div`,_hoisted_2$16,toDisplayString(_ctx.title),1),createBaseVNode(`div`,_hoisted_3$12,[createBaseVNode(`span`,null,toDisplayString(_ctx.description),1)])]),typeof _ctx.icon==`string`?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`menu-icon-item-icon`,[_ctx.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-24":``,"translate-y-4":``,text:`neutral-400/50 dark:neutral-600/50`},null,2)):createCommentVNode(``,!0),_ctx.iconTemplate?renderSlot(_ctx.$slots,`icon`,{key:1},void 0,!0):createCommentVNode(``,!0)]),_:3},8,[`to`])}}}),IconItem_default=__plugin_vue_export_helper_default(IconItem_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-d08788bb`]]);const _hoisted_1$24={flex:`~ col`,bg:`neutral-50 dark:neutral-800`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-status-item`,transition:`all ease-in-out duration-400`,"w-full":``,"cursor-pointer":``,"of-hidden":``,"rounded-xl":``},_hoisted_2$15={"z-1":``,"flex-1":``},_hoisted_3$11={"text-lg":``,"font-normal":``,class:`menu-icon-status-item-title`,transition:`all ease-in-out duration-400`},_hoisted_4$10={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-status-item-description`,transition:`all ease-in-out duration-400`},_hoisted_5$9=[`src`],_hoisted_6$8={"p-2":``},_hoisted_7$7={key:0,"size-3":``,bg:`green-500 dark:green-600`,"rounded-full":``},_hoisted_8$6={key:1,"size-3":``,bg:`neutral-400 dark:neutral-500`,"rounded-full":``};var IconStatusItem_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`IconStatusItem`,props:{title:{},description:{},icon:{},iconColor:{},iconImage:{},to:{},configured:{type:Boolean}},setup(__props){let props=__props;return(_ctx,_cache$1)=>{let _component_RouterLink=resolveComponent(`RouterLink`);return openBlock(),createElementBlock(`div`,_hoisted_1$24,[createVNode(_component_RouterLink,{flex:`~ row`,class:`menu-icon-status-item-link`,bg:`white dark:neutral-900`,transition:`all ease-in-out duration-400`,relative:``,"h-full":``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,to:props.to},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_2$15,[createBaseVNode(`div`,_hoisted_3$11,toDisplayString(props.title),1),createBaseVNode(`div`,_hoisted_4$10,[createBaseVNode(`span`,null,toDisplayString(props.description||``),1)])]),props.icon?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`menu-icon-status-item-icon`,[props.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):createCommentVNode(``,!0),props.iconColor?(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`menu-icon-status-item-icon-color`,[props.iconColor]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):createCommentVNode(``,!0),props.iconImage?(openBlock(),createElementBlock(`img`,{key:2,src:props.iconImage,class:`menu-icon-status-item-icon-image`,transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,"grayscale-100":``},null,8,_hoisted_5$9)):createCommentVNode(``,!0)]),_:1},8,[`to`]),createBaseVNode(`div`,_hoisted_6$8,[props.configured?(openBlock(),createElementBlock(`div`,_hoisted_7$7)):(openBlock(),createElementBlock(`div`,_hoisted_8$6))])])}}}),IconStatusItem_default=__plugin_vue_export_helper_default(IconStatusItem_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-93a9757f`]]);const _hoisted_1$23=[`checked`,`name`,`value`],_hoisted_2$14={class:`relative mr-3 mt-0.5 flex-shrink-0`},_hoisted_3$10={class:`w-full flex flex-col gap-2`},_hoisted_4$9={class:`flex items-center`},_hoisted_5$8={key:0,class:`relative`},_hoisted_6$7=[`title`],_hoisted_7$6={key:1,class:`mt-2`};var RadioCardDetail_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardDetail`,props:mergeModels({id:{},name:{},value:{},title:{},description:{},deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:``},customInputPlaceholder:{default:``},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`),isExpanded=ref(!1);function toggleExpansion(){isExpanded.value=!isExpanded.value}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{key:_ctx.id,class:normalizeClass([`form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]`,[modelValue.value===_ctx.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,modelValue.value===_ctx.value?`form_radio-card-detail-active`:``,_ctx.deprecated?`opacity-60`:``]]),transition:`all duration-200 ease-in-out`,border:`2 solid`},[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,checked:modelValue.value===_ctx.value,type:`radio`,name:_ctx.name,value:_ctx.value,class:`absolute opacity-0`},null,8,_hoisted_1$23),[[vModelRadio,modelValue.value]]),createBaseVNode(`div`,_hoisted_2$14,[createBaseVNode(`div`,{class:normalizeClass([`size-5 border-2 rounded-full transition-colors duration-200`,[modelValue.value===_ctx.value?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[createBaseVNode(`div`,{class:normalizeClass([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[modelValue.value===_ctx.value?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),createBaseVNode(`div`,_hoisted_3$10,[createBaseVNode(`div`,_hoisted_4$9,[createBaseVNode(`span`,{class:normalizeClass([`line-clamp-1 font-normal`,[modelValue.value===_ctx.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},toDisplayString(_ctx.title),3)]),_ctx.description?(openBlock(),createElementBlock(`div`,_hoisted_5$8,[createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[!isExpanded.value||!_ctx.showExpandCollapse?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`line-clamp-2 cursor-pointer text-xs`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),title:_ctx.description,onClick:withModifiers(toggleExpansion,[`prevent`])},toDisplayString(_ctx.description),11,_hoisted_6$7)):(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`cursor-pointer text-xs`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),onClick:withModifiers(toggleExpansion,[`prevent`])},toDisplayString(_ctx.description),3))]),_:1}),_ctx.showExpandCollapse&&_ctx.description.length>_ctx.expandCollapseThreshold?(openBlock(),createElementBlock(`button`,{key:0,class:`mt-0.5 inline-flex items-center text-xs text-primary-500 dark:text-primary-600`,onClick:withModifiers(toggleExpansion,[`prevent`])},[createBaseVNode(`span`,null,toDisplayString(isExpanded.value?`Show less`:`Show more`),1),createBaseVNode(`div`,{class:normalizeClass([{"rotate-180":isExpanded.value},`transition-transform duration-200`])},_cache$1[2]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``,"ml-0.5":``,"text-xs":``},null,-1)],2)])):createCommentVNode(``,!0)])):createCommentVNode(``,!0),_ctx.showCustomInput&&modelValue.value===_ctx.value?(openBlock(),createElementBlock(`div`,_hoisted_7$6,[createVNode(unref(Input_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:_ctx.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0)])],2))}}),RadioCardDetail_default=__plugin_vue_export_helper_default(RadioCardDetail_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fb6236db`]]);const _hoisted_1$22={class:`radio-card-detail-many-select`},_hoisted_2$13={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},_hoisted_3$9=[`placeholder`],_hoisted_4$8={class:`mt-4 space-y-2`},_hoisted_5$7={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},_hoisted_6$6={key:1,class:`flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},_hoisted_7$5={class:`flex flex-col`},_hoisted_8$5={class:`font-medium`},_hoisted_9$5={class:`text-sm text-amber-600 dark:text-amber-400`},_hoisted_10$4={class:`relative`};var RadioCardManySelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardManySelect`,props:mergeModels({items:{},searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search...`},searchNoResultsTitle:{default:`No results found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} results`},customInputPlaceholder:{default:`Enter custom value`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},showMore:{type:Boolean,default:!0},listClass:{default:``}},{modelValue:{required:!0},modelModifiers:{}}),emits:mergeModels([`update:customValue`],[`update:modelValue`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,modelValue=useModel(__props,`modelValue`),searchQuery=ref(``),isListExpanded=ref(!1),customValue=ref(``),filteredItems=computed(()=>{if(!searchQuery.value)return props.items;let query=searchQuery.value.toLowerCase();return props.items.filter(item=>item.name.toLowerCase().includes(query)||item.description&&item.description.toLowerCase().includes(query))});function updateCustomValue(value$1){customValue.value=value$1,emit$1(`update:customValue`,value$1)}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$22,[_ctx.searchable?(openBlock(),createElementBlock(`div`,_hoisted_2$13,[_cache$1[4]||=createBaseVNode(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[createBaseVNode(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>searchQuery.value=$event,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:_ctx.searchPlaceholder},null,8,_hoisted_3$9),[[vModelText,searchQuery.value]])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$8,[searchQuery.value?(openBlock(),createElementBlock(`div`,_hoisted_5$7,toDisplayString(_ctx.searchResultsText.replace(`{count}`,filteredItems.value.length.toString()).replace(`{total}`,_ctx.items.length.toString())),1)):createCommentVNode(``,!0),searchQuery.value&&filteredItems.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_6$6,[_cache$1[5]||=createBaseVNode(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),createBaseVNode(`div`,_hoisted_7$5,[createBaseVNode(`span`,_hoisted_8$5,toDisplayString(_ctx.searchNoResultsTitle),1),createBaseVNode(`span`,_hoisted_9$5,toDisplayString(_ctx.searchNoResultsDescription.replace(`{query}`,searchQuery.value)),1)])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_10$4,[createBaseVNode(`div`,{class:normalizeClass([`grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto pb-4 scrollbar-none`,[isListExpanded.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``,...props.listClass?typeof props.listClass==`string`?[props.listClass]:props.listClass:[`max-h-[calc(100dvh-7lh)]`]]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredItems.value,item=>(openBlock(),createBlock(RadioCardDetail_default,{id:item.id,key:item.id,modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,value:item.id,title:item.name,description:item.description,deprecated:item.deprecated,"show-expand-collapse":_ctx.showMore,"expand-collapse-threshold":100,"show-custom-input":item.customizable,"custom-input-value":customValue.value,"custom-input-placeholder":_ctx.customInputPlaceholder,name:`radio-card-detail-many-select`,class:`scroll-snap-align-start`,"onUpdate:customInputValue":_cache$1[2]||=$event=>updateCustomValue($event)},null,8,[`id`,`modelValue`,`value`,`title`,`description`,`deprecated`,`show-expand-collapse`,`show-custom-input`,`custom-input-value`,`custom-input-placeholder`]))),128))],2),createBaseVNode(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:normalizeClass([isListExpanded.value?`w-full`:`mt-4 w-full rounded-lg`])},[createBaseVNode(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:normalizeClass([isListExpanded.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:_cache$1[3]||=$event=>isListExpanded.value=!isListExpanded.value},[createBaseVNode(`span`,null,toDisplayString(isListExpanded.value?_ctx.collapseButtonText:_ctx.expandButtonText),1),createBaseVNode(`div`,{class:normalizeClass([isListExpanded.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-linear":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),RadioCardManySelect_default=__plugin_vue_export_helper_default(RadioCardManySelect_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-96e8e411`]]);const _hoisted_1$21=[`checked`,`name`,`value`],_hoisted_2$12={flex:`~ col`,"min-h-16":``,"w-full":``,"items-start":``,"justify-center":``,"pb-2":``,"pl-5":``,"pr-4":``,"pt-2":``};var RadioCardSimple_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardSimple`,props:mergeModels({id:{},name:{},value:{},title:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{key:_ctx.id,border:`2px solid`,class:normalizeClass([`form_radio-card-simple relative`,[modelValue.value===_ctx.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,modelValue.value===_ctx.value?`form_radio-card-simple-active`:``]]),transition:`all duration-200 ease-in-out`,flex:`~ col`,block:``,"min-w-50":``,"w-fit":``,"cursor-pointer":``,"items-start":``,"rounded-xl":``,"p-4":``,"text-left":``},[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,checked:modelValue.value===_ctx.value,type:`radio`,name:_ctx.name,value:_ctx.value,class:`absolute opacity-0 [&:checked+div]:border-primary-500 [&:checked+div_.radio-dot]:opacity-100 dark:[&:checked+div]:border-primary-400`},null,8,_hoisted_1$21),[[vModelRadio,modelValue.value]]),_cache$1[1]||=createBaseVNode(`div`,{class:`radio-circle absolute left-2 top-2 size-5 rounded-full`,border:`2 solid neutral-300 dark:neutral-600`,transition:`all duration-200 ease-in-out`},[createBaseVNode(`div`,{class:`radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2`,transition:`all duration-200 ease-in-out`,bg:`primary-500 dark:primary-400`})],-1),createBaseVNode(`div`,_hoisted_2$12,[createBaseVNode(`span`,{class:normalizeClass([`radio-item-name font-normal`,[modelValue.value===_ctx.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-500 dark:text-neutral-500`]]),text:`md`,transition:`all duration-200 ease-in-out`},toDisplayString(_ctx.title),3),_ctx.description?(openBlock(),createElementBlock(`span`,{key:0,class:normalizeClass([`radio-item-description`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-400 dark:text-neutral-600`]]),transition:`all duration-200 ease-in-out`},toDisplayString(_ctx.description),3)):createCommentVNode(``,!0)]),_cache$1[2]||=createBaseVNode(`div`,{class:`bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20`,absolute:``,"inset-0":``,"z--1":``,style:{"background-size":`10px 10px`,"mask-image":`linear-gradient(165deg, white 30%, transparent 50%)`}},null,-1)],2))}}),RadioCardSimple_default=__plugin_vue_export_helper_default(RadioCardSimple_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-880ce73f`]]);const _hoisted_1$20={class:`p-3`},_hoisted_2$11={class:`flex items-start`},_hoisted_3$8=[`checked`,`name`,`value`],_hoisted_4$7={class:`relative mr-3 mt-0.5 flex-shrink-0`},_hoisted_5$6={key:0,class:`i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},_hoisted_6$5={key:1,class:`i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},_hoisted_7$4={key:1,class:`mt-auto w-full flex items-center justify-center bg-neutral-50 py-3 text-xs text-neutral-400 italic dark:bg-neutral-800/50 dark:text-neutral-600`},_hoisted_8$4={class:`flex-1 cursor-pointer`},_hoisted_9$4={class:`flex items-center`},_hoisted_10$3={key:0,class:`mt-1 flex flex-wrap gap-1`},_hoisted_11$2={key:1,class:`mt-3`},_hoisted_12$2={relative:``},_hoisted_13$2={key:0,class:`h-16 px-3 pb-2`};var VoiceCard_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`VoiceCard`,props:mergeModels({name:{},voice:{},currentlyPlayingId:{},customInputPlaceholder:{default:`Enter custom voice name`},showVisualizer:{type:Boolean,default:!0},audioStream:{default:null}},{"voice-id":{required:!1,default:``},"voice-idModifiers":{},"custom-voice-name":{required:!1,default:``},"custom-voice-nameModifiers":{}}),emits:mergeModels([`togglePlayback`],[`update:voice-id`,`update:custom-voice-name`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,voiceId=useModel(__props,`voice-id`),customVoiceName=useModel(__props,`custom-voice-name`);function getPreviewUrl(voice){return voice.previewURL||voice.preview_audio_url}function formatVoiceAttributes(voice){let attributes=[];if(voice.labels?.gender&&attributes.push(voice.labels.gender),voice.labels?.age&&attributes.push(voice.labels.age),voice.labels?.accent&&attributes.push(voice.labels.accent),voice.languages&&voice.languages.length>0){let languageNames=voice.languages.map(lang=>lang.name).join(`, `);attributes.push(languageNames)}return attributes}function togglePlayback(){emit$1(`togglePlayback`,props.voice)}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{border:`2px solid`,class:normalizeClass([`scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl`,[voiceId.value===props.voice.id?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,voiceId.value===props.voice.id?`form_voice-card-active`:``]]),transition:`all duration-200 ease-in-out`},[createBaseVNode(`div`,_hoisted_1$20,[createBaseVNode(`div`,_hoisted_2$11,[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>voiceId.value=$event,checked:voiceId.value===props.voice.id,type:`radio`,name:_ctx.name,value:props.voice.id,class:`absolute cursor-pointer opacity-0`},null,8,_hoisted_3$8),[[vModelRadio,voiceId.value]]),createBaseVNode(`div`,_hoisted_4$7,[createBaseVNode(`div`,{class:normalizeClass([`size-5 border-2 rounded-full transition-colors duration-200`,[voiceId.value===props.voice.id?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[createBaseVNode(`div`,{class:normalizeClass([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[voiceId.value===props.voice.id?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),getPreviewUrl(_ctx.voice)?(openBlock(),createElementBlock(`button`,{key:0,absolute:``,"right-0":``,top:`0`,"z-3":``,class:normalizeClass([`translate-x-[-50%] translate-y-[50%]`,[_ctx.currentlyPlayingId===_ctx.voice.id?`text-white dark:text-white`:``]]),onClick:togglePlayback},[_ctx.currentlyPlayingId===_ctx.voice.id?(openBlock(),createElementBlock(`div`,_hoisted_5$6)):(openBlock(),createElementBlock(`div`,_hoisted_6$5))],2)):(openBlock(),createElementBlock(`div`,_hoisted_7$4,` No preview available `)),createBaseVNode(`div`,_hoisted_8$4,[createBaseVNode(`div`,_hoisted_9$4,[createBaseVNode(`span`,{class:normalizeClass([`line-clamp-1 font-medium`,[voiceId.value===_ctx.voice.id?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},toDisplayString(_ctx.voice.name),3)]),formatVoiceAttributes(_ctx.voice).length>0?(openBlock(),createElementBlock(`div`,_hoisted_10$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(formatVoiceAttributes(_ctx.voice),(attribute,attrIndex)=>(openBlock(),createElementBlock(`span`,{key:attrIndex,class:normalizeClass([`inline-flex items-center rounded-md px-1.5 py-0.5 text-xs`,[voiceId.value===_ctx.voice.id?`bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400`:`bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300`]])},toDisplayString(attribute),3))),128))])):createCommentVNode(``,!0),_ctx.voice.customizable&&voiceId.value===_ctx.voice.id?(openBlock(),createElementBlock(`div`,_hoisted_11$2,[createVNode(unref(Input_default),{modelValue:customVoiceName.value,"onUpdate:modelValue":_cache$1[1]||=$event=>customVoiceName.value=$event,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:_ctx.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),_ctx.voice.description?(openBlock(),createElementBlock(`div`,{key:2,class:normalizeClass([`line-clamp-2 mt-1 text-xs`,[voiceId.value===_ctx.voice.id?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]])},toDisplayString(_ctx.voice.description),3)):createCommentVNode(``,!0)])])]),createBaseVNode(`div`,_hoisted_12$2,[createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[_ctx.showVisualizer&&_ctx.currentlyPlayingId===_ctx.voice.id&&_ctx.audioStream?(openBlock(),createElementBlock(`div`,_hoisted_13$2,[createVNode(unref(AudioSpectrum_default),{stream:_ctx.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:withCtx(({frequencies})=>[createVNode(unref(AudioSpectrumVisualizer_default),{frequencies,"bars-class":voiceId.value===_ctx.voice.id?`bg-primary-500 dark:bg-primary-400`:`bg-neutral-400 dark:bg-neutral-600`},null,8,[`frequencies`,`bars-class`])]),_:1},8,[`stream`])])):createCommentVNode(``,!0)]),_:1})])],2))}}),VoiceCard_default=__plugin_vue_export_helper_default(VoiceCard_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fd4023c4`]]);const _hoisted_1$19={class:`voice-preview-player`},_hoisted_2$10={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},_hoisted_3$7=[`placeholder`],_hoisted_4$6={class:`mt-4 space-y-2`},_hoisted_5$5={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},_hoisted_6$4={key:1,class:`flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},_hoisted_7$3={class:`flex flex-col`},_hoisted_8$3={class:`font-medium`},_hoisted_9$3={class:`text-sm text-amber-600 dark:text-amber-400`},_hoisted_10$2={class:`relative`};var VoiceCardManySelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`VoiceCardManySelect`,props:mergeModels({voices:{},searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search voices...`},searchNoResultsTitle:{default:`No voices found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} voices`},customInputPlaceholder:{default:`Enter custom voice name`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},playButtonText:{default:`Play sample`},pauseButtonText:{default:`Pause`},showVisualizer:{type:Boolean,default:!0},listClass:{default:``}},{"search-query":{required:!1,default:``},"search-queryModifiers":{},"voice-id":{required:!1,default:``},"voice-idModifiers":{}}),emits:[`update:search-query`,`update:voice-id`],setup(__props){let props=__props,isListExpanded=ref(!1),currentlyPlayingId=ref(),audioElements=ref(new Map),audioStreams=ref(new Map),audioContexts=ref(new Map),audioSources=ref(new Map),sharedAudioContext=ref(null);function initAudioContext(){return sharedAudioContext.value||=new(window.AudioContext||window.webkitAudioContext),sharedAudioContext.value}let searchQuery=useModel(__props,`search-query`),voiceId=useModel(__props,`voice-id`),filteredVoices=computed(()=>{if(!searchQuery.value)return props.voices;let query=searchQuery.value.toLowerCase();return props.voices.filter(voice=>{let nameMatch=voice.name.toLowerCase().includes(query),descMatch=voice.description&&voice.description.toLowerCase().includes(query),tagMatch=voice.tags&&voice.tags.some(tag=>tag.toLowerCase().includes(query)),labelMatch=voice.labels&&Object.values(voice.labels).some(value$1=>typeof value$1==`string`&&value$1.toLowerCase().includes(query)),langMatch=voice.languages&&voice.languages.some(lang=>lang.name.toLowerCase().includes(query)||lang.code.toLowerCase().includes(query));return nameMatch||descMatch||tagMatch||labelMatch||langMatch})});function getPreviewUrl(voice){return voice.previewURL||voice.preview_audio_url}function getAudioElement(voice){let previewUrl=getPreviewUrl(voice);if(!previewUrl)return null;if(audioElements.value.has(voice.id))return audioElements.value.get(voice.id)||null;let audio=new Audio(previewUrl);return audio.crossOrigin=`anonymous`,audio.preload=`auto`,audio.addEventListener(`ended`,()=>{if(currentlyPlayingId.value===voice.id){currentlyPlayingId.value=void 0;let stream=audioStreams.value.get(voice.id);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(voice.id))}}),audioElements.value.set(voice.id,audio),audio}function createAudioStream(audio,voiceId$1){try{if(audioStreams.value.has(voiceId$1))return audioStreams.value.get(voiceId$1)||null;let audioContext=initAudioContext();if(audioSources.value.has(voiceId$1)){let source$1=audioSources.value.get(voiceId$1),destination$1=audioContext.createMediaStreamDestination();source$1.connect(destination$1);let stream$1=destination$1.stream;return audioStreams.value.set(voiceId$1,stream$1),stream$1}let source=audioContext.createMediaElementSource(audio);audioSources.value.set(voiceId$1,source),source.connect(audioContext.destination);let destination=audioContext.createMediaStreamDestination();source.connect(destination);let stream=destination.stream;return audioStreams.value.set(voiceId$1,stream),stream}catch(error){return console.error(`Failed to create audio stream for visualizer:`,error),null}}function togglePlayback(voice){try{let previewUrl=getPreviewUrl(voice);if(!previewUrl)return;let audio=getAudioElement(voice);if(!audio)return;if(currentlyPlayingId.value===voice.id){audio.pause(),currentlyPlayingId.value=void 0;let stream=audioStreams.value.get(voice.id);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(voice.id));return}if(currentlyPlayingId.value){let currentAudio=audioElements.value.get(currentlyPlayingId.value);currentAudio&¤tAudio.pause();let stream=audioStreams.value.get(currentlyPlayingId.value);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(currentlyPlayingId.value))}props.showVisualizer&&!audioStreams.value.has(voice.id)&&createAudioStream(audio,voice.id),audio.currentTime=0,audio.play().catch(error=>{console.error(`Failed to play audio:`,error)}),currentlyPlayingId.value=voice.id}catch(err){console.error(err),currentlyPlayingId.value=void 0}}function cleanup(){audioElements.value.forEach(audio=>{audio.pause(),audio.src=``}),audioElements.value.clear(),audioStreams.value.forEach(stream=>{stream.getTracks().forEach(track$1=>track$1.stop())}),audioStreams.value.clear(),audioContexts.value.forEach(context$1=>{context$1.state!==`closed`&&context$1.close()}),audioContexts.value.clear(),audioSources.value.clear(),currentlyPlayingId.value=void 0}watch(searchQuery,()=>{if(currentlyPlayingId.value){let audio=audioElements.value.get(currentlyPlayingId.value);audio&&audio.pause();let stream=audioStreams.value.get(currentlyPlayingId.value);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(currentlyPlayingId.value)),currentlyPlayingId.value=void 0}}),onBeforeUnmount(cleanup);let customVoiceName=ref(``);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$19,[_ctx.searchable?(openBlock(),createElementBlock(`div`,_hoisted_2$10,[_cache$1[4]||=createBaseVNode(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[createBaseVNode(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>searchQuery.value=$event,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:_ctx.searchPlaceholder},null,8,_hoisted_3$7),[[vModelText,searchQuery.value]])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$6,[searchQuery.value?(openBlock(),createElementBlock(`div`,_hoisted_5$5,toDisplayString(_ctx.searchResultsText.replace(`{count}`,filteredVoices.value.length.toString()).replace(`{total}`,_ctx.voices.length.toString())),1)):createCommentVNode(``,!0),searchQuery.value&&filteredVoices.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_6$4,[_cache$1[5]||=createBaseVNode(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),createBaseVNode(`div`,_hoisted_7$3,[createBaseVNode(`span`,_hoisted_8$3,toDisplayString(_ctx.searchNoResultsTitle),1),createBaseVNode(`span`,_hoisted_9$3,toDisplayString(_ctx.searchNoResultsDescription.replace(`{query}`,searchQuery.value)),1)])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_10$2,[createBaseVNode(`div`,{class:normalizeClass([`grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto scrollbar-none`,[isListExpanded.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``,...props.listClass?typeof props.listClass==`string`?[props.listClass]:props.listClass:[`max-h-[calc(100dvh-7lh)]`]]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredVoices.value,voice=>(openBlock(),createBlock(VoiceCard_default,{key:voice.id,"voice-id":voiceId.value,"onUpdate:voiceId":_cache$1[1]||=$event=>voiceId.value=$event,"custom-voice-name":customVoiceName.value,"onUpdate:customVoiceName":_cache$1[2]||=$event=>customVoiceName.value=$event,name:`voice`,voice,"currently-playing-id":currentlyPlayingId.value,"custom-input-placeholder":_ctx.customInputPlaceholder,"show-visualizer":_ctx.showVisualizer,"audio-stream":audioStreams.value.get(voice.id),onTogglePlayback:togglePlayback},null,8,[`voice-id`,`custom-voice-name`,`voice`,`currently-playing-id`,`custom-input-placeholder`,`show-visualizer`,`audio-stream`]))),128))],2),createBaseVNode(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:normalizeClass([isListExpanded.value?`w-full`:`mt-4 w-full rounded-lg`])},[createBaseVNode(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:normalizeClass([isListExpanded.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:_cache$1[3]||=$event=>isListExpanded.value=!isListExpanded.value},[createBaseVNode(`span`,null,toDisplayString(isListExpanded.value?_ctx.collapseButtonText:_ctx.expandButtonText),1),createBaseVNode(`div`,{class:normalizeClass([isListExpanded.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-linear":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),VoiceCardManySelect_default=__plugin_vue_export_helper_default(VoiceCardManySelect_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-9ae13460`]]),BidirectionalTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`BidirectionalTransition`,props:{fromClass:{},activeClass:{},toClass:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(Transition,{"enter-from-class":_ctx.fromClass,"enter-active-class":_ctx.activeClass,"enter-to-class":_ctx.toClass,"leave-from-class":_ctx.toClass,"leave-active-class":_ctx.activeClass,"leave-to-class":_ctx.fromClass},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`enter-from-class`,`enter-active-class`,`enter-to-class`,`leave-from-class`,`leave-active-class`,`leave-to-class`]))}}),BidirectionalTransition_default=BidirectionalTransition_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$18=[`disabled`],_hoisted_2$9={class:`flex flex-row items-center justify-center gap-2`},_hoisted_3$6={key:0,class:`w-4`},_hoisted_4$5={key:0,class:`i-svg-spinners:ring-resize h-4 w-4`},_hoisted_5$4={key:0};var Button_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Button`,props:{icon:{},label:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:`primary`},size:{default:`md`},theme:{default:`default`},block:{type:Boolean,default:!1}},setup(__props){let props=__props,isDisabled=computed(()=>props.disabled||props.loading),variantClasses={primary:{default:`bg-primary-500/15 hover:bg-primary-500/20 active:bg-primary-500/30 dark:bg-primary-700/30 dark:hover:bg-primary-700/40 dark:active:bg-primary-700/30 focus:ring-primary-300/60 dark:focus:ring-primary-600/30 border-2 border-solid border-primary-500/5 dark:border-primary-900/40 text-primary-950 dark:text-primary-100`},secondary:{default:`bg-neutral-400/15 hover:bg-neutral-400/20 active:bg-neutral-400/30 dark:bg-neutral-700/60 dark:hover:bg-neutral-700/80 dark:active:bg-neutral-700/60 focus:ring-neutral-300/30 dark:focus:ring-neutral-600/60 dark:focus:ring-neutral-600/30 border-2 border-solid border-neutral-300/30 dark:border-neutral-700/30 text-neutral-950 dark:text-neutral-100`},danger:{default:`bg-red-500/15 hover:bg-red-500/20 active:bg-red-500/30 dark:bg-red-700/30 dark:hover:bg-red-700/40 dark:active:bg-red-700/30 focus:ring-red-300/30 dark:focus:ring-red-600/60 dark:focus:ring-red-600/30 border-2 border-solid border-red-200/30 dark:border-red-900/30 text-red-950 dark:text-red-100`}},sizeClasses={sm:`px-3 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`},baseClasses=computed(()=>[`rounded-lg font-medium outline-none`,`transition-all duration-200 ease-in-out`,`disabled:cursor-not-allowed disabled:opacity-50`,props.block?`w-full`:``,sizeClasses[props.size],variantClasses[props.variant][props.theme],{"opacity-50 cursor-not-allowed":isDisabled.value},`focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900`]);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`button`,{disabled:isDisabled.value,class:normalizeClass(baseClasses.value)},[createBaseVNode(`div`,_hoisted_2$9,[createVNode(unref(BidirectionalTransition_default),{"from-class":`opacity-0 mr-0! w-0!`,"active-class":`transition-[width,margin] ease-in-out overflow-hidden transition-100`},{default:withCtx(()=>[_ctx.loading||_ctx.icon?(openBlock(),createElementBlock(`div`,_hoisted_3$6,[_ctx.loading?(openBlock(),createElementBlock(`div`,_hoisted_4$5)):_ctx.icon?(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`h-4 w-4`,_ctx.icon])},null,2)):createCommentVNode(``,!0)])):createCommentVNode(``,!0)]),_:1}),_ctx.label?(openBlock(),createElementBlock(`span`,_hoisted_5$4,toDisplayString(_ctx.label),1)):renderSlot(_ctx.$slots,`default`,{key:1})])],10,_hoisted_1$18))}}),Button_default=Button_vue_vue_type_script_setup_true_lang_default,Screen_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Screen`,setup(__props){let containerRef=ref(),breakpoints=useBreakpoints(breakpointsTailwind),{width,height}=useWindowSize(),containerElementBounding=useElementBounding(containerRef,{immediate:!0,windowResize:!0,reset:!0}),isMobile=computed(()=>breakpoints.between(`sm`,`md`).value||breakpoints.smaller(`sm`).value),isTablet=computed(()=>breakpoints.between(`md`,`lg`).value),isDesktop=computed(()=>breakpoints.greaterOrEqual(`lg`).value),canvasWidth=computed(()=>isDesktop.value?containerElementBounding.width.value:isMobile.value||isTablet.value?width.value-16:containerElementBounding.width.value),canvasHeight=ref(0);return watch([width,height,containerRef],()=>{let bounding=containerRef.value?.parentElement?.getBoundingClientRect();isDesktop.value||isMobile.value||isTablet.value?canvasHeight.value=bounding?.height||0:canvasHeight.value=600}),watch([containerElementBounding.width,containerElementBounding.height],()=>{isDesktop.value||isMobile.value||isTablet.value?canvasHeight.value=containerElementBounding.height.value:canvasHeight.value=600}),onMounted(async()=>{containerRef.value&&containerElementBounding.update()}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`containerRef`,ref:containerRef,"h-full":``,"w-full":``},[renderSlot(_ctx.$slots,`default`,{width:canvasWidth.value,height:canvasHeight.value})],512))}}),Screen_default=Screen_vue_vue_type_script_setup_true_lang_default,Skeleton_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Skeleton`,props:{animation:{default:`pulse`}},setup(__props){let props=__props;return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`skeleton`,props.animation===`none`?``:`skeleton-${props.animation}`]),bg:`neutral-200 dark:neutral-800`,overflow:`hidden`},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],2))}}),Skeleton_default=__plugin_vue_export_helper_default(Skeleton_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fa4a54cc`]]),CursorFloating_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`CursorFloating`,props:{intensity:{default:1.5}},setup(__props){let props=__props,cardRef=ref(null),transformStyle=ref(``),gradientPosition=ref(`50% 50%`),sparklePosition=ref(`50% 50%`),sparkleOpacity=ref(.5);function handleMouseMove(event){if(!cardRef.value)return;let card=cardRef.value,rect=card.getBoundingClientRect(),x$3=event.clientX-rect.left,y$3=event.clientY-rect.top,cardWidth=card.offsetWidth,cardHeight=card.offsetHeight,xPercent=Math.abs(Math.floor(100/cardWidth*x$3)-100),yPercent=Math.abs(Math.floor(100/cardHeight*y$3)-100),leftPos=50+(xPercent-50)/1.5,topPos=50+(yPercent-50)/1.5,sparkleX=50+(xPercent-50)/7,sparkleY=50+(yPercent-50)/7,rotateY=(leftPos-50)/1.5*.2*props.intensity,rotateX=(topPos-50)/2*-1*.2*props.intensity,pAngle=50-xPercent+(50-yPercent),opacity=.5+Math.abs(pAngle)*.008*props.intensity;transformStyle.value=`perspective(1200px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale3d(${1+.015*props.intensity}, ${1+.015*props.intensity}, ${1+.015*props.intensity})`,gradientPosition.value=`${leftPos}% ${topPos}%`,sparklePosition.value=`${sparkleX}% ${sparkleY}%`,sparkleOpacity.value=opacity}function resetCard(){transformStyle.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`,gradientPosition.value=`50% 50%`,sparklePosition.value=`50% 50%`,sparkleOpacity.value=.5}return onMounted(()=>{transformStyle.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`cardRef`,ref:cardRef,class:`card-hover-effect`,style:normalizeStyle({transform:transformStyle.value,"--effect-intensity":_ctx.intensity}),onMousemove:handleMouseMove,onMouseleave:resetCard},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],36))}}),CursorFloating_default=__plugin_vue_export_helper_default(CursorFloating_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-24a7a9d5`]]),ProviderAccountIdInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderAccountIdInput`,props:mergeModels({placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:props.label||`Account ID`,description:props.description||`Account ID`,placeholder:props.placeholder,required:props.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderAccountIdInput_default=ProviderAccountIdInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$17=[`onClick`],_hoisted_2$8={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_3$5={"mt-4":``};var ProviderAdvancedSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderAdvancedSettings`,props:{title:{},initialVisible:{type:Boolean}},setup(__props){let props=__props,visible=ref(props.initialVisible||!1);function toggleVisible(){visible.value=!visible.value}return(_ctx,_cache$1)=>(openBlock(),createBlock(Collapsable_default,{"w-full":``},{trigger:withCtx(slotProps=>[createBaseVNode(`button`,{transition:`all ease-in-out duration-250`,"w-full":``,flex:``,"items-center":``,"gap-1.5":``,"outline-none":``,class:`[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0`,onClick:()=>slotProps.setVisible(!slotProps.visible)&&toggleVisible()},[createBaseVNode(`h2`,_hoisted_2$8,[createBaseVNode(`span`,null,toDisplayString(_ctx.title||`Advanced`),1)]),createBaseVNode(`div`,{transform:``,transition:`transform duration-250`,class:normalizeClass({"rotate-180":slotProps.visible})},_cache$1[0]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``},null,-1)],2)],8,_hoisted_1$17)]),default:withCtx(()=>[createBaseVNode(`div`,_hoisted_3$5,[renderSlot(_ctx.$slots,`default`)])]),_:3}))}}),ProviderAdvancedSettings_default=ProviderAdvancedSettings_vue_vue_type_script_setup_true_lang_default; +`))}return()=>forceMount.value||present.value||isPresent.value?h(slots.default({present:isPresent.value})[0],{ref:v$2=>{let el$1=unrefElement(v$2);return el$1?.hasAttribute===void 0||(el$1?.hasAttribute(`data-reka-popper-content-wrapper`)?node$1.value=el$1.firstElementChild:node$1.value=el$1),el$1}}):null}}),[injectDialogRootContext,provideDialogRootContext]=createContext(`DialogRoot`),_sfc_main$8=defineComponent({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:[`update:open`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,open$1=useVModel(props,`open`,emit$1,{defaultValue:props.defaultOpen,passive:props.open===void 0}),triggerElement=ref(),contentElement=ref(),{modal}=toRefs(props);return provideDialogRootContext({open:open$1,modal,openModal:()=>{open$1.value=!0},onOpenChange:value$1=>{open$1.value=value$1},onOpenToggle:()=>{open$1.value=!open$1.value},contentId:``,titleId:``,descriptionId:``,triggerElement,contentElement}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`,{open:unref(open$1),close:()=>open$1.value=!1})}});function useEmitAsProps(emit$1){let vm$1=getCurrentInstance(),events=vm$1?.type.emits,result={};return events?.length||console.warn(`No emitted event found. Please check component: ${vm$1?.type.__name}`),events?.forEach(ev$1=>{result[toHandlerKey(camelize(ev$1))]=(...arg)=>emit$1(ev$1,...arg)}),result}function getActiveElement(){let activeElement=document.activeElement;if(activeElement==null)return null;for(;activeElement!=null&&activeElement.shadowRoot!=null&&activeElement.shadowRoot.activeElement!=null;)activeElement=activeElement.shadowRoot.activeElement;return activeElement}const SELECTION_KEYS=[`Enter`,` `],FIRST_KEYS=[`ArrowDown`,`PageUp`,`Home`],LAST_KEYS=[`ArrowUp`,`PageDown`,`End`],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS,`ArrowRight`],rtl:[...SELECTION_KEYS,`ArrowLeft`]};function getOpenState(open$1){return open$1?`open`:`closed`}const useFocusStackState=createGlobalState(()=>{let stack$1=ref([]);return stack$1});function createFocusScopesStack(){let stack$1=useFocusStackState();return{add(focusScope){let activeFocusScope=stack$1.value[0];focusScope!==activeFocusScope&&activeFocusScope?.pause(),stack$1.value=arrayRemove(stack$1.value,focusScope),stack$1.value.unshift(focusScope)},remove(focusScope){stack$1.value=arrayRemove(stack$1.value,focusScope),stack$1.value[0]?.resume()}}}function arrayRemove(array,item){let updatedArray=[...array],index$1=updatedArray.indexOf(item);return index$1!==-1&&updatedArray.splice(index$1,1),updatedArray}function removeLinks(items){return items.filter(item=>item.tagName!==`A`)}const AUTOFOCUS_ON_MOUNT=`focusScope.autoFocusOnMount`,AUTOFOCUS_ON_UNMOUNT=`focusScope.autoFocusOnUnmount`,EVENT_OPTIONS={bubbles:!1,cancelable:!0};function focusFirst(candidates,{select=!1}={}){let previouslyFocusedElement=getActiveElement();for(let candidate of candidates)if(focus(candidate,{select}),getActiveElement()!==previouslyFocusedElement)return!0}function getTabbableEdges(container){let candidates=getTabbableCandidates(container),first=findVisible(candidates,container),last=findVisible(candidates.reverse(),container);return[first,last]}function getTabbableCandidates(container){let nodes=[],walker=document.createTreeWalker(container,NodeFilter.SHOW_ELEMENT,{acceptNode:node$1=>{let isHiddenInput=node$1.tagName===`INPUT`&&node$1.type===`hidden`;return node$1.disabled||node$1.hidden||isHiddenInput?NodeFilter.FILTER_SKIP:node$1.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;walker.nextNode();)nodes.push(walker.currentNode);return nodes}function findVisible(elements,container){for(let element$3 of elements)if(!isHidden(element$3,{upTo:container}))return element$3}function isHidden(node$1,{upTo}){if(getComputedStyle(node$1).visibility===`hidden`)return!0;for(;node$1;){if(upTo!==void 0&&node$1===upTo)return!1;if(getComputedStyle(node$1).display===`none`)return!0;node$1=node$1.parentElement}return!1}function isSelectableInput(element$3){return element$3 instanceof HTMLInputElement&&`select`in element$3}function focus(element$3,{select=!1}={}){if(element$3&&element$3.focus){let previouslyFocusedElement=getActiveElement();element$3.focus({preventScroll:!0}),element$3!==previouslyFocusedElement&&isSelectableInput(element$3)&&select&&element$3.select()}}const _sfc_main$23=defineComponent({__name:`FocusScope`,props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:[`mountAutoFocus`,`unmountAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,{currentRef,currentElement}=useForwardExpose(),lastFocusedElementRef=ref(null),focusScopesStack=createFocusScopesStack(),focusScope=reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});watchEffect(cleanupFn=>{if(!isClient$1)return;let container=currentElement.value;if(!props.trapped)return;function handleFocusIn(event){if(focusScope.paused||!container)return;let target$1=event.target;container.contains(target$1)?lastFocusedElementRef.value=target$1:focus(lastFocusedElementRef.value,{select:!0})}function handleFocusOut(event){if(focusScope.paused||!container)return;let relatedTarget=event.relatedTarget;relatedTarget!==null&&(container.contains(relatedTarget)||focus(lastFocusedElementRef.value,{select:!0}))}function handleMutations$1(mutations$1){let isLastFocusedElementExist=container.contains(lastFocusedElementRef.value);isLastFocusedElementExist||focus(container)}document.addEventListener(`focusin`,handleFocusIn),document.addEventListener(`focusout`,handleFocusOut);let mutationObserver=new MutationObserver(handleMutations$1);container&&mutationObserver.observe(container,{childList:!0,subtree:!0}),cleanupFn(()=>{document.removeEventListener(`focusin`,handleFocusIn),document.removeEventListener(`focusout`,handleFocusOut),mutationObserver.disconnect()})}),watchEffect(async cleanupFn=>{let container=currentElement.value;if(await nextTick(),!container)return;focusScopesStack.add(focusScope);let previouslyFocusedElement=getActiveElement(),hasFocusedCandidate=container.contains(previouslyFocusedElement);if(!hasFocusedCandidate){let mountEvent=new CustomEvent(AUTOFOCUS_ON_MOUNT,EVENT_OPTIONS);container.addEventListener(AUTOFOCUS_ON_MOUNT,ev$1=>emits(`mountAutoFocus`,ev$1)),container.dispatchEvent(mountEvent),mountEvent.defaultPrevented||(focusFirst(removeLinks(getTabbableCandidates(container)),{select:!0}),getActiveElement()===previouslyFocusedElement&&focus(container))}cleanupFn(()=>{container.removeEventListener(AUTOFOCUS_ON_MOUNT,ev$1=>emits(`mountAutoFocus`,ev$1));let unmountEvent=new CustomEvent(AUTOFOCUS_ON_UNMOUNT,EVENT_OPTIONS),unmountEventHandler=ev$1=>{emits(`unmountAutoFocus`,ev$1)};container.addEventListener(AUTOFOCUS_ON_UNMOUNT,unmountEventHandler),container.dispatchEvent(unmountEvent),setTimeout(()=>{unmountEvent.defaultPrevented||focus(previouslyFocusedElement??document.body,{select:!0}),container.removeEventListener(AUTOFOCUS_ON_UNMOUNT,unmountEventHandler),focusScopesStack.remove(focusScope)},0)})});function handleKeyDown(event){if(!props.loop&&!props.trapped||focusScope.paused)return;let isTabKey=event.key===`Tab`&&!event.altKey&&!event.ctrlKey&&!event.metaKey,focusedElement=getActiveElement();if(isTabKey&&focusedElement){let container=event.currentTarget,[first,last]=getTabbableEdges(container),hasTabbableElementsInside=first&&last;hasTabbableElementsInside?!event.shiftKey&&focusedElement===last?(event.preventDefault(),props.loop&&focus(first,{select:!0})):event.shiftKey&&focusedElement===first&&(event.preventDefault(),props.loop&&focus(last,{select:!0})):focusedElement===container&&event.preventDefault()}}return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{ref_key:`currentRef`,ref:currentRef,tabindex:`-1`,"as-child":_ctx.asChild,as:_ctx.as,onKeydown:handleKeyDown},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as-child`,`as`]))}});function handleAndDispatchCustomEvent(name$2,handler,detail){let target$1=detail.originalEvent.target,event=new CustomEvent(name$2,{bubbles:!1,cancelable:!0,detail});handler&&target$1.addEventListener(name$2,handler,{once:!0}),target$1.dispatchEvent(event)}const POINTER_DOWN_OUTSIDE=`dismissableLayer.pointerDownOutside`,FOCUS_OUTSIDE=`dismissableLayer.focusOutside`;function isLayerExist(layerElement,targetElement){let targetLayer=targetElement.closest(`[data-dismissable-layer]`),mainLayer=layerElement.dataset.dismissableLayer===``?layerElement:layerElement.querySelector(`[data-dismissable-layer]`),nodeList=Array.from(layerElement.ownerDocument.querySelectorAll(`[data-dismissable-layer]`));return!!(targetLayer&&(mainLayer===targetLayer||nodeList.indexOf(mainLayer){});return watchEffect(cleanupFn=>{if(!isClient$1||!toValue$1(enabled$1))return;let handlePointerDown=async event=>{let target$1=event.target;if(!(!element$3?.value||!target$1)){if(isLayerExist(element$3.value,target$1)){isPointerInsideDOMTree.value=!1;return}if(event.target&&!isPointerInsideDOMTree.value){let handleAndDispatchPointerDownOutsideEvent=function(){handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE,onPointerDownOutside,eventDetail)},eventDetail={originalEvent:event};event.pointerType===`touch`?(ownerDocument.removeEventListener(`click`,handleClickRef.value),handleClickRef.value=handleAndDispatchPointerDownOutsideEvent,ownerDocument.addEventListener(`click`,handleClickRef.value,{once:!0})):handleAndDispatchPointerDownOutsideEvent()}else ownerDocument.removeEventListener(`click`,handleClickRef.value);isPointerInsideDOMTree.value=!1}},timerId=window.setTimeout(()=>{ownerDocument.addEventListener(`pointerdown`,handlePointerDown)},0);cleanupFn(()=>{window.clearTimeout(timerId),ownerDocument.removeEventListener(`pointerdown`,handlePointerDown),ownerDocument.removeEventListener(`click`,handleClickRef.value)})}),{onPointerDownCapture:()=>{toValue$1(enabled$1)&&(isPointerInsideDOMTree.value=!0)}}}function useFocusOutside(onFocusOutside,element$3,enabled$1=!0){let ownerDocument=element$3?.value?.ownerDocument??globalThis?.document,isFocusInsideDOMTree=ref(!1);return watchEffect(cleanupFn=>{if(!isClient$1||!toValue$1(enabled$1))return;let handleFocus=async event=>{if(!element$3?.value)return;await nextTick(),await nextTick();let target$1=event.target;if(!(!element$3.value||!target$1||isLayerExist(element$3.value,target$1))&&event.target&&!isFocusInsideDOMTree.value){let eventDetail={originalEvent:event};handleAndDispatchCustomEvent(FOCUS_OUTSIDE,onFocusOutside,eventDetail)}};ownerDocument.addEventListener(`focusin`,handleFocus),cleanupFn(()=>ownerDocument.removeEventListener(`focusin`,handleFocus))}),{onFocusCapture:()=>{toValue$1(enabled$1)&&(isFocusInsideDOMTree.value=!0)},onBlurCapture:()=>{toValue$1(enabled$1)&&(isFocusInsideDOMTree.value=!1)}}}const context=reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_sfc_main$24=defineComponent({__name:`DismissableLayer`,props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`dismiss`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,{forwardRef,currentElement:layerElement}=useForwardExpose(),ownerDocument=computed(()=>layerElement.value?.ownerDocument??globalThis.document),layers=computed(()=>context.layersRoot),index$1=computed(()=>layerElement.value?Array.from(layers.value).indexOf(layerElement.value):-1),isBodyPointerEventsDisabled=computed(()=>context.layersWithOutsidePointerEventsDisabled.size>0),isPointerEventsEnabled=computed(()=>{let localLayers=Array.from(layers.value),[highestLayerWithOutsidePointerEventsDisabled]=[...context.layersWithOutsidePointerEventsDisabled].slice(-1),highestLayerWithOutsidePointerEventsDisabledIndex=localLayers.indexOf(highestLayerWithOutsidePointerEventsDisabled);return index$1.value>=highestLayerWithOutsidePointerEventsDisabledIndex}),pointerDownOutside=usePointerDownOutside(async event=>{let isPointerDownOnBranch=[...context.branches].some(branch=>branch?.contains(event.target));!isPointerEventsEnabled.value||isPointerDownOnBranch||(emits(`pointerDownOutside`,event),emits(`interactOutside`,event),await nextTick(),event.defaultPrevented||emits(`dismiss`))},layerElement),focusOutside=useFocusOutside(event=>{let isFocusInBranch=[...context.branches].some(branch=>branch?.contains(event.target));isFocusInBranch||(emits(`focusOutside`,event),emits(`interactOutside`,event),event.defaultPrevented||emits(`dismiss`))},layerElement);onKeyStroke(`Escape`,event=>{let isHighestLayer=index$1.value===layers.value.size-1;isHighestLayer&&(emits(`escapeKeyDown`,event),event.defaultPrevented||emits(`dismiss`))});let originalBodyPointerEvents;return watchEffect(cleanupFn=>{layerElement.value&&(props.disableOutsidePointerEvents&&(context.layersWithOutsidePointerEventsDisabled.size===0&&(originalBodyPointerEvents=ownerDocument.value.body.style.pointerEvents,ownerDocument.value.body.style.pointerEvents=`none`),context.layersWithOutsidePointerEventsDisabled.add(layerElement.value)),layers.value.add(layerElement.value),cleanupFn(()=>{props.disableOutsidePointerEvents&&context.layersWithOutsidePointerEventsDisabled.size===1&&(ownerDocument.value.body.style.pointerEvents=originalBodyPointerEvents)}))}),watchEffect(cleanupFn=>{cleanupFn(()=>{layerElement.value&&(layers.value.delete(layerElement.value),context.layersWithOutsidePointerEventsDisabled.delete(layerElement.value))})}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{ref:unref(forwardRef),"as-child":_ctx.asChild,as:_ctx.as,"data-dismissable-layer":``,style:normalizeStyle({pointerEvents:isBodyPointerEventsDisabled.value?isPointerEventsEnabled.value?`auto`:`none`:void 0}),onFocusCapture:unref(focusOutside).onFocusCapture,onBlurCapture:unref(focusOutside).onBlurCapture,onPointerdownCapture:unref(pointerDownOutside).onPointerDownCapture},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),_sfc_main$22=defineComponent({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectDialogRootContext(),{forwardRef,currentElement:contentElement}=useForwardExpose();return rootContext.titleId||=useId(void 0,`reka-dialog-title`),rootContext.descriptionId||=useId(void 0,`reka-dialog-description`),onMounted(()=>{rootContext.contentElement=contentElement,getActiveElement()!==document.body&&(rootContext.triggerElement.value=getActiveElement())}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(_sfc_main$23),{"as-child":``,loop:``,trapped:props.trapFocus,onMountAutoFocus:_cache$1[5]||=$event=>emits(`openAutoFocus`,$event),onUnmountAutoFocus:_cache$1[6]||=$event=>emits(`closeAutoFocus`,$event)},{default:withCtx(()=>[createVNode(unref(_sfc_main$24),mergeProps({id:unref(rootContext).contentId,ref:unref(forwardRef),as:_ctx.as,"as-child":_ctx.asChild,"disable-outside-pointer-events":_ctx.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":unref(rootContext).descriptionId,"aria-labelledby":unref(rootContext).titleId,"data-state":unref(getOpenState)(unref(rootContext).open.value)},_ctx.$attrs,{onDismiss:_cache$1[0]||=$event=>unref(rootContext).onOpenChange(!1),onEscapeKeyDown:_cache$1[1]||=$event=>emits(`escapeKeyDown`,$event),onFocusOutside:_cache$1[2]||=$event=>emits(`focusOutside`,$event),onInteractOutside:_cache$1[3]||=$event=>emits(`interactOutside`,$event),onPointerDownOutside:_cache$1[4]||=$event=>emits(`pointerDownOutside`,$event)}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`]))}});var getDefaultParent=function(originalTarget){if(typeof document>`u`)return null;var sampleTarget=Array.isArray(originalTarget)?originalTarget[0]:originalTarget;return sampleTarget.ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function(node$1){return node$1&&(node$1.host||unwrapHost(node$1.parentNode))},correctTargets=function(parent,targets){return targets.map(function(target$1){if(parent.contains(target$1))return target$1;var correctedTarget=unwrapHost(target$1);return correctedTarget&&parent.contains(correctedTarget)?correctedTarget:(console.error(`aria-hidden`,target$1,`in not contained inside`,parent,`. Doing nothing`),null)}).filter(function(x$3){return!!x$3})},applyAttributeToOthers=function(originalTarget,parentNode,markerName,controlAttribute){var targets=correctTargets(parentNode,Array.isArray(originalTarget)?originalTarget:[originalTarget]);markerMap[markerName]||(markerMap[markerName]=new WeakMap);var markerCounter=markerMap[markerName],hiddenNodes=[],elementsToKeep=new Set,elementsToStop=new Set(targets),keep=function(el$1){!el$1||elementsToKeep.has(el$1)||(elementsToKeep.add(el$1),keep(el$1.parentNode))};targets.forEach(keep);var deep=function(parent){!parent||elementsToStop.has(parent)||Array.prototype.forEach.call(parent.children,function(node$1){if(elementsToKeep.has(node$1))deep(node$1);else try{var attr=node$1.getAttribute(controlAttribute),alreadyHidden=attr!==null&&attr!==`false`,counterValue=(counterMap.get(node$1)||0)+1,markerValue=(markerCounter.get(node$1)||0)+1;counterMap.set(node$1,counterValue),markerCounter.set(node$1,markerValue),hiddenNodes.push(node$1),counterValue===1&&alreadyHidden&&uncontrolledNodes.set(node$1,!0),markerValue===1&&node$1.setAttribute(markerName,`true`),alreadyHidden||node$1.setAttribute(controlAttribute,`true`)}catch(e$3){console.error(`aria-hidden: cannot operate on `,node$1,e$3)}})};return deep(parentNode),elementsToKeep.clear(),lockCount++,function(){hiddenNodes.forEach(function(node$1){var counterValue=counterMap.get(node$1)-1,markerValue=markerCounter.get(node$1)-1;counterMap.set(node$1,counterValue),markerCounter.set(node$1,markerValue),counterValue||(uncontrolledNodes.has(node$1)||node$1.removeAttribute(controlAttribute),uncontrolledNodes.delete(node$1)),markerValue||node$1.removeAttribute(markerName)}),lockCount--,lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function(originalTarget,parentNode,markerName){markerName===void 0&&(markerName=`data-aria-hidden`);var targets=Array.from(Array.isArray(originalTarget)?originalTarget:[originalTarget]),activeParentNode=parentNode||getDefaultParent(originalTarget);return activeParentNode?(targets.push.apply(targets,Array.from(activeParentNode.querySelectorAll(`[aria-live]`))),applyAttributeToOthers(targets,activeParentNode,markerName,`aria-hidden`)):function(){return null}};function useHideOthers(target$1){let undo;watch(()=>unrefElement(target$1),el$1=>{el$1?undo=hideOthers(el$1):undo&&undo()}),onUnmounted(()=>{undo&&undo()})}const _sfc_main$20=defineComponent({__name:`DialogContentModal`,props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectDialogRootContext(),emitsAsProps=useEmitAsProps(emits),{forwardRef,currentElement}=useForwardExpose();return useHideOthers(currentElement),(_ctx,_cache$1)=>(openBlock(),createBlock(_sfc_main$22,mergeProps({...props,...unref(emitsAsProps)},{ref:unref(forwardRef),"trap-focus":unref(rootContext).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:_cache$1[0]||=event=>{event.defaultPrevented||(event.preventDefault(),unref(rootContext).triggerElement.value?.focus())},onPointerDownOutside:_cache$1[1]||=event=>{let originalEvent=event.detail.originalEvent,ctrlLeftClick=originalEvent.button===0&&originalEvent.ctrlKey===!0,isRightClick=originalEvent.button===2||ctrlLeftClick;isRightClick&&event.preventDefault()},onFocusOutside:_cache$1[2]||=event=>{event.preventDefault()}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`trap-focus`]))}}),_sfc_main$21=defineComponent({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,emitsAsProps=useEmitAsProps(emits);useForwardExpose();let rootContext=injectDialogRootContext(),hasInteractedOutsideRef=ref(!1),hasPointerDownOutsideRef=ref(!1);return(_ctx,_cache$1)=>(openBlock(),createBlock(_sfc_main$22,mergeProps({...props,...unref(emitsAsProps)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:_cache$1[0]||=event=>{event.defaultPrevented||(hasInteractedOutsideRef.value||unref(rootContext).triggerElement.value?.focus(),event.preventDefault()),hasInteractedOutsideRef.value=!1,hasPointerDownOutsideRef.value=!1},onInteractOutside:_cache$1[1]||=event=>{event.defaultPrevented||(hasInteractedOutsideRef.value=!0,event.detail.originalEvent.type===`pointerdown`&&(hasPointerDownOutsideRef.value=!0));let target$1=event.target,targetIsTrigger=unref(rootContext).triggerElement.value?.contains(target$1);targetIsTrigger&&event.preventDefault(),event.detail.originalEvent.type===`focusin`&&hasPointerDownOutsideRef.value&&event.preventDefault()}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}}),_sfc_main$5=defineComponent({__name:`DialogContent`,props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectDialogRootContext(),emitsAsProps=useEmitAsProps(emits),{forwardRef}=useForwardExpose();return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Presence),{present:_ctx.forceMount||unref(rootContext).open.value},{default:withCtx(()=>[unref(rootContext).modal.value?(openBlock(),createBlock(_sfc_main$20,mergeProps({key:0,ref:unref(forwardRef)},{...props,...unref(emitsAsProps),..._ctx.$attrs}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16)):(openBlock(),createBlock(_sfc_main$21,mergeProps({key:1,ref:unref(forwardRef)},{...props,...unref(emitsAsProps),..._ctx.$attrs}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),useBodyLockStackCount=createSharedComposable(()=>{let map=ref(new Map),initialOverflow=ref(),locked=computed(()=>{for(let value$1 of map.value.values())if(value$1)return!0;return!1}),context$1=injectConfigProviderContext({scrollBody:ref(!0)}),stopTouchMoveListener=null,resetBodyStyle=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=initialOverflow.value??``,isIOS&&stopTouchMoveListener?.(),initialOverflow.value=void 0};return watch(locked,(val,oldVal)=>{if(!isClient$1)return;if(!val){oldVal&&resetBodyStyle();return}initialOverflow.value===void 0&&(initialOverflow.value=document.body.style.overflow);let verticalScrollbarWidth=window.innerWidth-document.documentElement.clientWidth,defaultConfig={padding:verticalScrollbarWidth,margin:0},config=context$1.scrollBody?.value?typeof context$1.scrollBody.value==`object`?defu({padding:context$1.scrollBody.value.padding===!0?verticalScrollbarWidth:context$1.scrollBody.value.padding,margin:context$1.scrollBody.value.margin===!0?verticalScrollbarWidth:context$1.scrollBody.value.margin},defaultConfig):defaultConfig:{padding:0,margin:0};verticalScrollbarWidth>0&&(document.body.style.paddingRight=typeof config.padding==`number`?`${config.padding}px`:String(config.padding),document.body.style.marginRight=typeof config.margin==`number`?`${config.margin}px`:String(config.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${verticalScrollbarWidth}px`),document.body.style.overflow=`hidden`),isIOS&&(stopTouchMoveListener=useEventListener(document,`touchmove`,e$3=>preventDefault(e$3),{passive:!1})),nextTick(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})},{immediate:!0,flush:`sync`}),map});function useBodyScrollLock(initialState){let id$1=Math.random().toString(36).substring(2,7),map=useBodyLockStackCount();map.value.set(id$1,initialState??!1);let locked=computed({get:()=>map.value.get(id$1)??!1,set:value$1=>map.value.set(id$1,value$1)});return tryOnBeforeUnmount(()=>{map.value.delete(id$1)}),locked}function checkOverflowScroll(ele){let style=window.getComputedStyle(ele);if(style.overflowX===`scroll`||style.overflowY===`scroll`||style.overflowX===`auto`&&ele.clientWidth1?!0:(e$3.preventDefault&&e$3.cancelable&&e$3.preventDefault(),!1)}const _sfc_main$19=defineComponent({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean},as:{}},setup(__props){let rootContext=injectDialogRootContext();return useBodyScrollLock(!0),useForwardExpose(),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{as:_ctx.as,"as-child":_ctx.asChild,"data-state":unref(rootContext).open.value?`open`:`closed`,style:{"pointer-events":`auto`}},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),_sfc_main$6=defineComponent({__name:`DialogOverlay`,props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(__props){let rootContext=injectDialogRootContext(),{forwardRef}=useForwardExpose();return(_ctx,_cache$1)=>unref(rootContext)?.modal.value?(openBlock(),createBlock(unref(Presence),{key:0,present:_ctx.forceMount||unref(rootContext).open.value},{default:withCtx(()=>[createVNode(_sfc_main$19,mergeProps(_ctx.$attrs,{ref:unref(forwardRef),as:_ctx.as,"as-child":_ctx.asChild}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`as`,`as-child`])]),_:3},8,[`present`])):createCommentVNode(``,!0)}}),_sfc_main$16=defineComponent({__name:`Teleport`,props:{to:{default:`body`},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(__props){let isMounted=useMounted();return(_ctx,_cache$1)=>unref(isMounted)||_ctx.forceMount?(openBlock(),createBlock(Teleport,{key:0,to:_ctx.to,disabled:_ctx.disabled,defer:_ctx.defer},[renderSlot(_ctx.$slots,`default`)],8,[`to`,`disabled`,`defer`])):createCommentVNode(``,!0)}});function useForwardProps(props){let vm$1=getCurrentInstance(),defaultProps=Object.keys(vm$1?.type.props??{}).reduce((prev,curr)=>{let defaultValue=(vm$1?.type.props[curr]).default;return defaultValue!==void 0&&(prev[curr]=defaultValue),prev},{}),refProps=toRef(props);return computed(()=>{let preservedProps={},assignedProps=vm$1?.vnode.props??{};return Object.keys(assignedProps).forEach(key$1=>{preservedProps[camelize(key$1)]=assignedProps[key$1]}),Object.keys({...defaultProps,...preservedProps}).reduce((prev,curr)=>(refProps.value[curr]!==void 0&&(prev[curr]=refProps.value[curr]),prev),{})})}function useForwardPropsEmits(props,emit$1){let parsedProps=useForwardProps(props),emitsAsProps=emit$1?useEmitAsProps(emit$1):{};return computed(()=>({...parsedProps.value,...emitsAsProps}))}function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount,numerator){return amount-numerator*Math.floor(amount/numerator)}const $3b62074eb05584b2$var$EPOCH=1721426;function $3b62074eb05584b2$export$f297eb839006d339(era,year,month,day){year=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(era,year);let y1=year-1,monthOffset=-2;return month<=2?monthOffset=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(year)&&(monthOffset=-1),$3b62074eb05584b2$var$EPOCH-1+365*y1+Math.floor(y1/4)-Math.floor(y1/100)+Math.floor(y1/400)+Math.floor((367*month-362)/12+monthOffset+day)}function $3b62074eb05584b2$export$553d7fa8e3805fc0(year){return year%4==0&&(year%100!=0||year%400==0)}function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era,year){return era===`BC`?1-year:year}function $3b62074eb05584b2$export$4475b7e617eb123c(year){let era=`AD`;return year<=0&&(era=`BC`,year=1-year),[era,year]}const $3b62074eb05584b2$var$daysInMonth={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 $3b62074eb05584b2$export$80ee6245ec4f29ec=class{fromJulianDay(jd$1){let jd0=jd$1,depoch=jd0-$3b62074eb05584b2$var$EPOCH,quadricent=Math.floor(depoch/146097),dqc=$2b4dce13dd5a17fa$export$842a2cf37af977e1(depoch,146097),cent=Math.floor(dqc/36524),dcent=$2b4dce13dd5a17fa$export$842a2cf37af977e1(dqc,36524),quad=Math.floor(dcent/1461),dquad=$2b4dce13dd5a17fa$export$842a2cf37af977e1(dcent,1461),yindex=Math.floor(dquad/365),extendedYear=quadricent*400+cent*100+quad*4+yindex+(cent!==4&&yindex!==4?1:0),[era,year]=$3b62074eb05584b2$export$4475b7e617eb123c(extendedYear),yearDay=jd0-$3b62074eb05584b2$export$f297eb839006d339(era,year,1,1),leapAdj=2;jd0<$3b62074eb05584b2$export$f297eb839006d339(era,year,3,1)?leapAdj=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(year)&&(leapAdj=1);let month=Math.floor(((yearDay+leapAdj)*12+373)/367),day=jd0-$3b62074eb05584b2$export$f297eb839006d339(era,year,month,1)+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(era,year,month,day)}toJulianDay(date){return $3b62074eb05584b2$export$f297eb839006d339(date.era,date.year,date.month,date.day)}getDaysInMonth(date){return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year)?`leapyear`:`standard`][date.month-1]}getMonthsInYear(date){return 12}getDaysInYear(date){return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year)?366:365}getYearsInEra(date){return 9999}getEras(){return[`BC`,`AD`]}isInverseEra(date){return date.era===`BC`}balanceDate(date){date.year<=0&&(date.era=date.era===`BC`?`AD`:`BC`,date.year=1-date.year)}constructor(){this.identifier=`gregory`}};const $2fe286d2fb449abb$export$7a5acbd77d414bd9={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function $14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2,b$4){return b$4=$11d87f3f76e88657$export$b4a036af3fc0b032(b$4,a$2.calendar),a$2.era===b$4.era&&a$2.year===b$4.year&&a$2.month===b$4.month&&a$2.day===b$4.day}function $14e0f24ef4ac5c92$export$a18c89cbd24170ff(a$2,b$4){return b$4=$11d87f3f76e88657$export$b4a036af3fc0b032(b$4,a$2.calendar),a$2=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(a$2),b$4=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(b$4),a$2.era===b$4.era&&a$2.year===b$4.year&&a$2.month===b$4.month}function $14e0f24ef4ac5c92$export$91b62ebf2ba703ee(a$2,b$4){return $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a$2.calendar,b$4.calendar)&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2,b$4)}function $14e0f24ef4ac5c92$export$5a8da0c44a3afdf2(a$2,b$4){return $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a$2.calendar,b$4.calendar)&&$14e0f24ef4ac5c92$export$a18c89cbd24170ff(a$2,b$4)}function $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a$2,b$4){var _a_isEqual,_b_isEqual,_a_isEqual1,_ref;return(_ref=(_a_isEqual1=(_a_isEqual=a$2.isEqual)?.call(a$2,b$4))??(_b_isEqual=b$4.isEqual)?.call(b$4,a$2))??a$2.identifier===b$4.identifier}function $14e0f24ef4ac5c92$export$629b0a497aa65267(date,timeZone){return $14e0f24ef4ac5c92$export$ea39ec197993aef0(date,$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone))}const $14e0f24ef4ac5c92$var$DAY_MAP={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function $14e0f24ef4ac5c92$export$2061056d06d7cdf7(date,locale,firstDayOfWeek){let julian=date.calendar.toJulianDay(date),weekStart=firstDayOfWeek?$14e0f24ef4ac5c92$var$DAY_MAP[firstDayOfWeek]:$14e0f24ef4ac5c92$var$getWeekStart(locale),dayOfWeek=Math.ceil(julian+1-weekStart)%7;return dayOfWeek<0&&(dayOfWeek+=7),dayOfWeek}function $14e0f24ef4ac5c92$export$461939dd4422153(timeZone){return $11d87f3f76e88657$export$1b96692a1ba042ac(Date.now(),timeZone)}function $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone){return $11d87f3f76e88657$export$93522d1a439f3617($14e0f24ef4ac5c92$export$461939dd4422153(timeZone))}function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a$2,b$4){return a$2.calendar.toJulianDay(a$2)-b$4.calendar.toJulianDay(b$4)}function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a$2,b$4){return $14e0f24ef4ac5c92$var$timeToMs(a$2)-$14e0f24ef4ac5c92$var$timeToMs(b$4)}function $14e0f24ef4ac5c92$var$timeToMs(a$2){return a$2.hour*36e5+a$2.minute*6e4+a$2.second*1e3+a$2.millisecond}let $14e0f24ef4ac5c92$var$localTimeZone=null;function $14e0f24ef4ac5c92$export$aa8b41735afcabd2(){return $14e0f24ef4ac5c92$var$localTimeZone??=new Intl.DateTimeFormat().resolvedOptions().timeZone,$14e0f24ef4ac5c92$var$localTimeZone}function $14e0f24ef4ac5c92$export$a5a3b454ada2268e(date){return date.subtract({days:date.day-1})}function $14e0f24ef4ac5c92$export$a2258d9c4118825c(date){return date.add({days:date.calendar.getDaysInMonth(date)-date.day})}const $14e0f24ef4ac5c92$var$cachedRegions=new Map;function $14e0f24ef4ac5c92$var$getRegion(locale){if(Intl.Locale){let region=$14e0f24ef4ac5c92$var$cachedRegions.get(locale);return region||(region=new Intl.Locale(locale).maximize().region,region&&$14e0f24ef4ac5c92$var$cachedRegions.set(locale,region)),region}let part=locale.split(`-`)[1];return part===`u`?void 0:part}function $14e0f24ef4ac5c92$var$getWeekStart(locale){let region=$14e0f24ef4ac5c92$var$getRegion(locale);return region&&$2fe286d2fb449abb$export$7a5acbd77d414bd9[region]||0}function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date){date=$11d87f3f76e88657$export$b4a036af3fc0b032(date,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let year=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(date.era,date.year);return $11d87f3f76e88657$var$epochFromParts(year,date.month,date.day,date.hour,date.minute,date.second,date.millisecond)}function $11d87f3f76e88657$var$epochFromParts(year,month,day,hour,minute,second,millisecond){let date=new Date;return date.setUTCHours(hour,minute,second,millisecond),date.setUTCFullYear(year,month-1,day),date.getTime()}function $11d87f3f76e88657$export$59c99f3515d3493f(ms$1,timeZone){if(timeZone===`UTC`)return 0;if(ms$1>0&&timeZone===$14e0f24ef4ac5c92$export$aa8b41735afcabd2())return new Date(ms$1).getTimezoneOffset()*-6e4;let{year,month,day,hour,minute,second}=$11d87f3f76e88657$var$getTimeZoneParts(ms$1,timeZone),utc=$11d87f3f76e88657$var$epochFromParts(year,month,day,hour,minute,second,0);return utc-Math.floor(ms$1/1e3)*1e3}const $11d87f3f76e88657$var$formattersByTimeZone=new Map;function $11d87f3f76e88657$var$getTimeZoneParts(ms$1,timeZone){let formatter=$11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);formatter||(formatter=new Intl.DateTimeFormat(`en-US`,{timeZone,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),$11d87f3f76e88657$var$formattersByTimeZone.set(timeZone,formatter));let parts=formatter.formatToParts(new Date(ms$1)),namedParts={};for(let part of parts)part.type!==`literal`&&(namedParts[part.type]=part.value);return{year:namedParts.era===`BC`||namedParts.era===`B`?-namedParts.year+1:+namedParts.year,month:+namedParts.month,day:+namedParts.day,hour:namedParts.hour===`24`?0:+namedParts.hour,minute:+namedParts.minute,second:+namedParts.second}}const $11d87f3f76e88657$var$DAYMILLIS=864e5;function $11d87f3f76e88657$var$getValidWallTimes(date,timeZone,earlier,later){let found=earlier===later?[earlier]:[earlier,later];return found.filter(absolute=>$11d87f3f76e88657$var$isValidWallTime(date,timeZone,absolute))}function $11d87f3f76e88657$var$isValidWallTime(date,timeZone,absolute){let parts=$11d87f3f76e88657$var$getTimeZoneParts(absolute,timeZone);return date.year===parts.year&&date.month===parts.month&&date.day===parts.day&&date.hour===parts.hour&&date.minute===parts.minute&&date.second===parts.second}function $11d87f3f76e88657$export$5107c82f94518f5c(date,timeZone,disambiguation=`compatible`){let dateTime=$11d87f3f76e88657$export$b21e0b124e224484(date);if(timeZone===`UTC`)return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);if(timeZone===$14e0f24ef4ac5c92$export$aa8b41735afcabd2()&&disambiguation===`compatible`){dateTime=$11d87f3f76e88657$export$b4a036af3fc0b032(dateTime,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let date$1=new Date,year=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(dateTime.era,dateTime.year);return date$1.setFullYear(year,dateTime.month-1,dateTime.day),date$1.setHours(dateTime.hour,dateTime.minute,dateTime.second,dateTime.millisecond),date$1.getTime()}let ms$1=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime),offsetBefore=$11d87f3f76e88657$export$59c99f3515d3493f(ms$1-$11d87f3f76e88657$var$DAYMILLIS,timeZone),offsetAfter=$11d87f3f76e88657$export$59c99f3515d3493f(ms$1+$11d87f3f76e88657$var$DAYMILLIS,timeZone),valid$1=$11d87f3f76e88657$var$getValidWallTimes(dateTime,timeZone,ms$1-offsetBefore,ms$1-offsetAfter);if(valid$1.length===1)return valid$1[0];if(valid$1.length>1)switch(disambiguation){case`compatible`:case`earlier`:return valid$1[0];case`later`:return valid$1[valid$1.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(disambiguation){case`earlier`:return Math.min(ms$1-offsetBefore,ms$1-offsetAfter);case`compatible`:case`later`:return Math.max(ms$1-offsetBefore,ms$1-offsetAfter);case`reject`:throw RangeError(`No such absolute time found`)}}function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime,timeZone,disambiguation=`compatible`){return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime,timeZone,disambiguation))}function $11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,timeZone){let offset$2=$11d87f3f76e88657$export$59c99f3515d3493f(ms$1,timeZone),date=new Date(ms$1+offset$2),year=date.getUTCFullYear(),month=date.getUTCMonth()+1,day=date.getUTCDate(),hour=date.getUTCHours(),minute=date.getUTCMinutes(),second=date.getUTCSeconds(),millisecond=date.getUTCMilliseconds();return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(year<1?`BC`:`AD`,year<1?-year+1:year,month,day,timeZone,offset$2,hour,minute,second,millisecond)}function $11d87f3f76e88657$export$93522d1a439f3617(dateTime){return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(dateTime.calendar,dateTime.era,dateTime.year,dateTime.month,dateTime.day)}function $11d87f3f76e88657$export$b21e0b124e224484(date,time){let hour=0,minute=0,second=0,millisecond=0;if(`timeZone`in date)({hour,minute,second,millisecond}=date);else if(`hour`in date&&!time)return date;return time&&({hour,minute,second,millisecond}=time),new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(date.calendar,date.era,date.year,date.month,date.day,hour,minute,second,millisecond)}function $11d87f3f76e88657$export$b4a036af3fc0b032(date,calendar){if($14e0f24ef4ac5c92$export$dbc69fd56b53d5e(date.calendar,calendar))return date;let calendarDate=calendar.fromJulianDay(date.calendar.toJulianDay(date)),copy=date.copy();return copy.calendar=calendar,copy.era=calendarDate.era,copy.year=calendarDate.year,copy.month=calendarDate.month,copy.day=calendarDate.day,$735220c2d4774dd3$export$c4e2ecac49351ef2(copy),copy}function $11d87f3f76e88657$export$84c95a83c799e074(date,timeZone,disambiguation){if(date instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea)return date.timeZone===timeZone?date:$11d87f3f76e88657$export$538b00033cc11c75(date,timeZone);let ms$1=$11d87f3f76e88657$export$5107c82f94518f5c(date,timeZone,disambiguation);return $11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,timeZone)}function $11d87f3f76e88657$export$83aac07b4c37b25(date){let ms$1=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(date)-date.offset;return new Date(ms$1)}function $11d87f3f76e88657$export$538b00033cc11c75(date,timeZone){let ms$1=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(date)-date.offset;return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,timeZone),date.calendar)}const $735220c2d4774dd3$var$ONE_HOUR=36e5;function $735220c2d4774dd3$export$e16d8520af44a096(date,duration){let mutableDate=date.copy(),days=`hour`in mutableDate?$735220c2d4774dd3$var$addTimeFields(mutableDate,duration):0;$735220c2d4774dd3$var$addYears(mutableDate,duration.years||0),mutableDate.calendar.balanceYearMonth&&mutableDate.calendar.balanceYearMonth(mutableDate,date),mutableDate.month+=duration.months||0,$735220c2d4774dd3$var$balanceYearMonth(mutableDate),$735220c2d4774dd3$var$constrainMonthDay(mutableDate),mutableDate.day+=(duration.weeks||0)*7,mutableDate.day+=duration.days||0,mutableDate.day+=days,$735220c2d4774dd3$var$balanceDay(mutableDate),mutableDate.calendar.balanceDate&&mutableDate.calendar.balanceDate(mutableDate),mutableDate.year<1&&(mutableDate.year=1,mutableDate.month=1,mutableDate.day=1);let maxYear=mutableDate.calendar.getYearsInEra(mutableDate);if(mutableDate.year>maxYear){var _mutableDate_calendar_isInverseEra,_mutableDate_calendar;let isInverseEra=(_mutableDate_calendar_isInverseEra=(_mutableDate_calendar=mutableDate.calendar).isInverseEra)?.call(_mutableDate_calendar,mutableDate);mutableDate.year=maxYear,mutableDate.month=isInverseEra?1:mutableDate.calendar.getMonthsInYear(mutableDate),mutableDate.day=isInverseEra?1:mutableDate.calendar.getDaysInMonth(mutableDate)}mutableDate.month<1&&(mutableDate.month=1,mutableDate.day=1);let maxMonth=mutableDate.calendar.getMonthsInYear(mutableDate);return mutableDate.month>maxMonth&&(mutableDate.month=maxMonth,mutableDate.day=mutableDate.calendar.getDaysInMonth(mutableDate)),mutableDate.day=Math.max(1,Math.min(mutableDate.calendar.getDaysInMonth(mutableDate),mutableDate.day)),mutableDate}function $735220c2d4774dd3$var$addYears(date,years){var _date_calendar_isInverseEra,_date_calendar;(_date_calendar_isInverseEra=(_date_calendar=date.calendar).isInverseEra)?.call(_date_calendar,date)&&(years=-years),date.year+=years}function $735220c2d4774dd3$var$balanceYearMonth(date){for(;date.month<1;)$735220c2d4774dd3$var$addYears(date,-1),date.month+=date.calendar.getMonthsInYear(date);let monthsInYear=0;for(;date.month>(monthsInYear=date.calendar.getMonthsInYear(date));)date.month-=monthsInYear,$735220c2d4774dd3$var$addYears(date,1)}function $735220c2d4774dd3$var$balanceDay(date){for(;date.day<1;)date.month--,$735220c2d4774dd3$var$balanceYearMonth(date),date.day+=date.calendar.getDaysInMonth(date);for(;date.day>date.calendar.getDaysInMonth(date);)date.day-=date.calendar.getDaysInMonth(date),date.month++,$735220c2d4774dd3$var$balanceYearMonth(date)}function $735220c2d4774dd3$var$constrainMonthDay(date){date.month=Math.max(1,Math.min(date.calendar.getMonthsInYear(date),date.month)),date.day=Math.max(1,Math.min(date.calendar.getDaysInMonth(date),date.day))}function $735220c2d4774dd3$export$c4e2ecac49351ef2(date){date.calendar.constrainDate&&date.calendar.constrainDate(date),date.year=Math.max(1,Math.min(date.calendar.getYearsInEra(date),date.year)),$735220c2d4774dd3$var$constrainMonthDay(date)}function $735220c2d4774dd3$export$3e2544e88a25bff8(duration){let inverseDuration={};for(let key$1 in duration)typeof duration[key$1]==`number`&&(inverseDuration[key$1]=-duration[key$1]);return inverseDuration}function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(date,duration){return $735220c2d4774dd3$export$e16d8520af44a096(date,$735220c2d4774dd3$export$3e2544e88a25bff8(duration))}function $735220c2d4774dd3$export$adaa4cf7ef1b65be(date,fields){let mutableDate=date.copy();return fields.era!=null&&(mutableDate.era=fields.era),fields.year!=null&&(mutableDate.year=fields.year),fields.month!=null&&(mutableDate.month=fields.month),fields.day!=null&&(mutableDate.day=fields.day),$735220c2d4774dd3$export$c4e2ecac49351ef2(mutableDate),mutableDate}function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value$1,fields){let mutableValue=value$1.copy();return fields.hour!=null&&(mutableValue.hour=fields.hour),fields.minute!=null&&(mutableValue.minute=fields.minute),fields.second!=null&&(mutableValue.second=fields.second),fields.millisecond!=null&&(mutableValue.millisecond=fields.millisecond),$735220c2d4774dd3$export$7555de1e070510cb(mutableValue),mutableValue}function $735220c2d4774dd3$var$balanceTime(time){time.second+=Math.floor(time.millisecond/1e3),time.millisecond=$735220c2d4774dd3$var$nonNegativeMod(time.millisecond,1e3),time.minute+=Math.floor(time.second/60),time.second=$735220c2d4774dd3$var$nonNegativeMod(time.second,60),time.hour+=Math.floor(time.minute/60),time.minute=$735220c2d4774dd3$var$nonNegativeMod(time.minute,60);let days=Math.floor(time.hour/24);return time.hour=$735220c2d4774dd3$var$nonNegativeMod(time.hour,24),days}function $735220c2d4774dd3$export$7555de1e070510cb(time){time.millisecond=Math.max(0,Math.min(time.millisecond,1e3)),time.second=Math.max(0,Math.min(time.second,59)),time.minute=Math.max(0,Math.min(time.minute,59)),time.hour=Math.max(0,Math.min(time.hour,23))}function $735220c2d4774dd3$var$nonNegativeMod(a$2,b$4){let result=a$2%b$4;return result<0&&(result+=b$4),result}function $735220c2d4774dd3$var$addTimeFields(time,duration){return time.hour+=duration.hours||0,time.minute+=duration.minutes||0,time.second+=duration.seconds||0,time.millisecond+=duration.milliseconds||0,$735220c2d4774dd3$var$balanceTime(time)}function $735220c2d4774dd3$export$d52ced6badfb9a4c(value$1,field,amount,options$1){let mutable=value$1.copy();switch(field){case`era`:{let eras=value$1.calendar.getEras(),eraIndex=eras.indexOf(value$1.era);if(eraIndex<0)throw Error(`Invalid era: `+value$1.era);eraIndex=$735220c2d4774dd3$var$cycleValue(eraIndex,amount,0,eras.length-1,options$1?.round),mutable.era=eras[eraIndex],$735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);break}case`year`:var _mutable_calendar_isInverseEra,_mutable_calendar;(_mutable_calendar_isInverseEra=(_mutable_calendar=mutable.calendar).isInverseEra)?.call(_mutable_calendar,mutable)&&(amount=-amount),mutable.year=$735220c2d4774dd3$var$cycleValue(value$1.year,amount,-1/0,9999,options$1?.round),mutable.year===-1/0&&(mutable.year=1),mutable.calendar.balanceYearMonth&&mutable.calendar.balanceYearMonth(mutable,value$1);break;case`month`:mutable.month=$735220c2d4774dd3$var$cycleValue(value$1.month,amount,1,value$1.calendar.getMonthsInYear(value$1),options$1?.round);break;case`day`:mutable.day=$735220c2d4774dd3$var$cycleValue(value$1.day,amount,1,value$1.calendar.getDaysInMonth(value$1),options$1?.round);break;default:throw Error(`Unsupported field `+field)}return value$1.calendar.balanceDate&&value$1.calendar.balanceDate(mutable),$735220c2d4774dd3$export$c4e2ecac49351ef2(mutable),mutable}function $735220c2d4774dd3$export$dd02b3e0007dfe28(value$1,field,amount,options$1){let mutable=value$1.copy();switch(field){case`hour`:{let hours=value$1.hour,min$1=0,max$1=23;if(options$1?.hourCycle===12){let isPM=hours>=12;min$1=isPM?12:0,max$1=isPM?23:11}mutable.hour=$735220c2d4774dd3$var$cycleValue(hours,amount,min$1,max$1,options$1?.round);break}case`minute`:mutable.minute=$735220c2d4774dd3$var$cycleValue(value$1.minute,amount,0,59,options$1?.round);break;case`second`:mutable.second=$735220c2d4774dd3$var$cycleValue(value$1.second,amount,0,59,options$1?.round);break;case`millisecond`:mutable.millisecond=$735220c2d4774dd3$var$cycleValue(value$1.millisecond,amount,0,999,options$1?.round);break;default:throw Error(`Unsupported field `+field)}return mutable}function $735220c2d4774dd3$var$cycleValue(value$1,amount,min$1,max$1,round$2=!1){if(round$2){value$1+=Math.sign(amount),value$10?Math.ceil(value$1/div)*div:Math.floor(value$1/div)*div,value$1>max$1&&(value$1=min$1)}else value$1+=amount,value$1max$1&&(value$1=min$1+(value$1-max$1-1));return value$1}function $735220c2d4774dd3$export$96b1d28349274637(dateTime,duration){let ms$1;if(duration.years!=null&&duration.years!==0||duration.months!=null&&duration.months!==0||duration.weeks!=null&&duration.weeks!==0||duration.days!=null&&duration.days!==0){let res$1=$735220c2d4774dd3$export$e16d8520af44a096($11d87f3f76e88657$export$b21e0b124e224484(dateTime),{years:duration.years,months:duration.months,weeks:duration.weeks,days:duration.days});ms$1=$11d87f3f76e88657$export$5107c82f94518f5c(res$1,dateTime.timeZone)}else ms$1=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime)-dateTime.offset;ms$1+=duration.milliseconds||0,ms$1+=(duration.seconds||0)*1e3,ms$1+=(duration.minutes||0)*6e4,ms$1+=(duration.hours||0)*36e5;let res=$11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,dateTime.timeZone);return $11d87f3f76e88657$export$b4a036af3fc0b032(res,dateTime.calendar)}function $735220c2d4774dd3$export$6814caac34ca03c7(dateTime,duration){return $735220c2d4774dd3$export$96b1d28349274637(dateTime,$735220c2d4774dd3$export$3e2544e88a25bff8(duration))}function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime,field,amount,options$1){switch(field){case`hour`:{let min$1=0,max$1=23;if(options$1?.hourCycle===12){let isPM=dateTime.hour>=12;min$1=isPM?12:0,max$1=isPM?23:11}let plainDateTime=$11d87f3f76e88657$export$b21e0b124e224484(dateTime),minDate=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime,{hour:min$1}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),minAbsolute=[$11d87f3f76e88657$export$5107c82f94518f5c(minDate,dateTime.timeZone,`earlier`),$11d87f3f76e88657$export$5107c82f94518f5c(minDate,dateTime.timeZone,`later`)].filter(ms$2=>$11d87f3f76e88657$export$1b96692a1ba042ac(ms$2,dateTime.timeZone).day===minDate.day)[0],maxDate=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime,{hour:max$1}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),maxAbsolute=[$11d87f3f76e88657$export$5107c82f94518f5c(maxDate,dateTime.timeZone,`earlier`),$11d87f3f76e88657$export$5107c82f94518f5c(maxDate,dateTime.timeZone,`later`)].filter(ms$2=>$11d87f3f76e88657$export$1b96692a1ba042ac(ms$2,dateTime.timeZone).day===maxDate.day).pop(),ms$1=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime)-dateTime.offset,hours=Math.floor(ms$1/$735220c2d4774dd3$var$ONE_HOUR),remainder=ms$1%$735220c2d4774dd3$var$ONE_HOUR;return ms$1=$735220c2d4774dd3$var$cycleValue(hours,amount,Math.floor(minAbsolute/$735220c2d4774dd3$var$ONE_HOUR),Math.floor(maxAbsolute/$735220c2d4774dd3$var$ONE_HOUR),options$1?.round)*$735220c2d4774dd3$var$ONE_HOUR+remainder,$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,dateTime.timeZone),dateTime.calendar)}case`minute`:case`second`:case`millisecond`:return $735220c2d4774dd3$export$dd02b3e0007dfe28(dateTime,field,amount,options$1);case`era`:case`year`:case`month`:case`day`:{let res=$735220c2d4774dd3$export$d52ced6badfb9a4c($11d87f3f76e88657$export$b21e0b124e224484(dateTime),field,amount,options$1),ms$1=$11d87f3f76e88657$export$5107c82f94518f5c(res,dateTime.timeZone);return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,dateTime.timeZone),dateTime.calendar)}default:throw Error(`Unsupported field `+field)}}function $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime,fields,disambiguation){let plainDateTime=$11d87f3f76e88657$export$b21e0b124e224484(dateTime),res=$735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(plainDateTime,fields),fields);if(res.compare(plainDateTime)===0)return dateTime;let ms$1=$11d87f3f76e88657$export$5107c82f94518f5c(res,dateTime.timeZone,disambiguation);return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms$1,dateTime.timeZone),dateTime.calendar)}const $fae977aafc393c5c$var$requiredDurationTimeGroups=[`hours`,`minutes`,`seconds`],$fae977aafc393c5c$var$requiredDurationGroups=[`years`,`months`,`weeks`,`days`,...$fae977aafc393c5c$var$requiredDurationTimeGroups];function $fae977aafc393c5c$export$f59dee82248f5ad4(time){return`${String(time.hour).padStart(2,`0`)}:${String(time.minute).padStart(2,`0`)}:${String(time.second).padStart(2,`0`)}${time.millisecond?String(time.millisecond/1e3).slice(1):``}`}function $fae977aafc393c5c$export$60dfd74aa96791bd(date){let gregorianDate=$11d87f3f76e88657$export$b4a036af3fc0b032(date,new $3b62074eb05584b2$export$80ee6245ec4f29ec),year;return year=gregorianDate.era===`BC`?gregorianDate.year===1?`0000`:`-`+String(Math.abs(1-gregorianDate.year)).padStart(6,`00`):String(gregorianDate.year).padStart(4,`0`),`${year}-${String(gregorianDate.month).padStart(2,`0`)}-${String(gregorianDate.day).padStart(2,`0`)}`}function $fae977aafc393c5c$export$4223de14708adc63(date){return`${$fae977aafc393c5c$export$60dfd74aa96791bd(date)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(date)}`}function $fae977aafc393c5c$var$offsetToString(offset$2){let sign$1=Math.sign(offset$2)<0?`-`:`+`;offset$2=Math.abs(offset$2);let offsetHours=Math.floor(offset$2/36e5),offsetMinutes=offset$2%36e5/6e4;return`${sign$1}${String(offsetHours).padStart(2,`0`)}:${String(offsetMinutes).padStart(2,`0`)}`}function $fae977aafc393c5c$export$bf79f1ebf4b18792(date){return`${$fae977aafc393c5c$export$4223de14708adc63(date)}${$fae977aafc393c5c$var$offsetToString(date.offset)}[${date.timeZone}]`}function _check_private_redeclaration(obj,privateCollection){if(privateCollection.has(obj))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function _class_private_field_init(obj,privateMap,value$1){_check_private_redeclaration(obj,privateMap),privateMap.set(obj,value$1)}function $35ea8db9cb2ccb90$var$shiftArgs(args){let calendar=typeof args[0]==`object`?args.shift():new $3b62074eb05584b2$export$80ee6245ec4f29ec,era;if(typeof args[0]==`string`)era=args.shift();else{let eras=calendar.getEras();era=eras[eras.length-1]}let year=args.shift(),month=args.shift(),day=args.shift();return[calendar,era,year,month,day]}var $35ea8db9cb2ccb90$var$_type=new WeakMap,$35ea8db9cb2ccb90$export$99faa760c7908e4f=class $35ea8db9cb2ccb90$export$99faa760c7908e4f{copy(){return this.era?new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar,this.era,this.year,this.month,this.day):new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar,this.year,this.month,this.day)}add(duration){return $735220c2d4774dd3$export$e16d8520af44a096(this,duration)}subtract(duration){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,duration)}set(fields){return $735220c2d4774dd3$export$adaa4cf7ef1b65be(this,fields)}cycle(field,amount,options$1){return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,field,amount,options$1)}toDate(timeZone){return $11d87f3f76e88657$export$e67a095c620b86fe(this,timeZone)}toString(){return $fae977aafc393c5c$export$60dfd74aa96791bd(this)}compare(b$4){return $14e0f24ef4ac5c92$export$68781ddf31c0090f(this,b$4)}constructor(...args){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type,{writable:!0,value:void 0});let[calendar,era,year,month,day]=$35ea8db9cb2ccb90$var$shiftArgs(args);this.calendar=calendar,this.era=era,this.year=year,this.month=month,this.day=day,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}},$35ea8db9cb2ccb90$var$_type2=new WeakMap,$35ea8db9cb2ccb90$export$ca871e8dbb80966f=class $35ea8db9cb2ccb90$export$ca871e8dbb80966f{copy(){return this.era?new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(duration){return $735220c2d4774dd3$export$e16d8520af44a096(this,duration)}subtract(duration){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,duration)}set(fields){return $735220c2d4774dd3$export$adaa4cf7ef1b65be($735220c2d4774dd3$export$e5d5e1c1822b6e56(this,fields),fields)}cycle(field,amount,options$1){switch(field){case`era`:case`year`:case`month`:case`day`:return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,field,amount,options$1);default:return $735220c2d4774dd3$export$dd02b3e0007dfe28(this,field,amount,options$1)}}toDate(timeZone,disambiguation){return $11d87f3f76e88657$export$e67a095c620b86fe(this,timeZone,disambiguation)}toString(){return $fae977aafc393c5c$export$4223de14708adc63(this)}compare(b$4){let res=$14e0f24ef4ac5c92$export$68781ddf31c0090f(this,b$4);return res===0?$14e0f24ef4ac5c92$export$c19a80a9721b80f6(this,$11d87f3f76e88657$export$b21e0b124e224484(b$4)):res}constructor(...args){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type2,{writable:!0,value:void 0});let[calendar,era,year,month,day]=$35ea8db9cb2ccb90$var$shiftArgs(args);this.calendar=calendar,this.era=era,this.year=year,this.month=month,this.day=day,this.hour=args.shift()||0,this.minute=args.shift()||0,this.second=args.shift()||0,this.millisecond=args.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}},$35ea8db9cb2ccb90$var$_type3=new WeakMap,$35ea8db9cb2ccb90$export$d3b7288e7994edea=class $35ea8db9cb2ccb90$export$d3b7288e7994edea{copy(){return this.era?new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(duration){return $735220c2d4774dd3$export$96b1d28349274637(this,duration)}subtract(duration){return $735220c2d4774dd3$export$6814caac34ca03c7(this,duration)}set(fields,disambiguation){return $735220c2d4774dd3$export$31b5430eb18be4f8(this,fields,disambiguation)}cycle(field,amount,options$1){return $735220c2d4774dd3$export$9a297d111fc86b79(this,field,amount,options$1)}toDate(){return $11d87f3f76e88657$export$83aac07b4c37b25(this)}toString(){return $fae977aafc393c5c$export$bf79f1ebf4b18792(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(b$4){return this.toDate().getTime()-$11d87f3f76e88657$export$84c95a83c799e074(b$4,this.timeZone).toDate().getTime()}constructor(...args){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type3,{writable:!0,value:void 0});let[calendar,era,year,month,day]=$35ea8db9cb2ccb90$var$shiftArgs(args),timeZone=args.shift(),offset$2=args.shift();this.calendar=calendar,this.era=era,this.year=year,this.month=month,this.day=day,this.timeZone=timeZone,this.offset=offset$2,this.hour=args.shift()||0,this.minute=args.shift()||0,this.second=args.shift()||0,this.millisecond=args.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}};const $62225008020f0a13$var$ERA_START_DATES=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],$62225008020f0a13$var$ERA_END_DATES=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],$62225008020f0a13$var$ERA_ADDENDS=[1867,1911,1925,1988,2018],$62225008020f0a13$var$ERA_NAMES=[`meiji`,`taisho`,`showa`,`heisei`,`reiwa`];function $62225008020f0a13$var$findEraFromGregorianDate(date){let idx=$62225008020f0a13$var$ERA_START_DATES.findIndex(([year,month,day])=>date.year=0){let[,startMonth,startDay]=$62225008020f0a13$var$ERA_START_DATES[idx];date.month=Math.max(startMonth,date.month),date.month===startMonth&&(date.day=Math.max(startDay,date.day))}}getEras(){return $62225008020f0a13$var$ERA_NAMES}getYearsInEra(date){let era=$62225008020f0a13$var$ERA_NAMES.indexOf(date.era),cur=$62225008020f0a13$var$ERA_START_DATES[era],next=$62225008020f0a13$var$ERA_START_DATES[era+1];if(next==null)return 9999-cur[0]+1;let years=next[0]-cur[0];return(date.month0?[`minguo`,y$3]:[`before_minguo`,1-y$3]}var $5f31bd6f0c8940b2$export$65e01080afcb0799=class extends $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(jd$1){let date=super.fromJulianDay(jd$1),extendedYear=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(date.era,date.year),[era,year]=$5f31bd6f0c8940b2$var$gregorianToTaiwan(extendedYear);return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,era,year,date.month,date.day)}toJulianDay(date){return super.toJulianDay($5f31bd6f0c8940b2$var$toGregorian(date))}getEras(){return[`before_minguo`,`minguo`]}balanceDate(date){let[era,year]=$5f31bd6f0c8940b2$var$gregorianToTaiwan($5f31bd6f0c8940b2$var$gregorianYear(date));date.era=era,date.year=year}isInverseEra(date){return date.era===`before_minguo`}getDaysInMonth(date){return super.getDaysInMonth($5f31bd6f0c8940b2$var$toGregorian(date))}getYearsInEra(date){return date.era===`before_minguo`?9999:9999-$5f31bd6f0c8940b2$var$TAIWAN_ERA_START}constructor(...args){super(...args),this.identifier=`roc`}};function $5f31bd6f0c8940b2$var$toGregorian(date){let[era,year]=$3b62074eb05584b2$export$4475b7e617eb123c($5f31bd6f0c8940b2$var$gregorianYear(date));return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(era,year,date.month,date.day)}const $f3ed2e4472ae7e25$var$PERSIAN_EPOCH=1948320,$f3ed2e4472ae7e25$var$MONTH_START=[0,31,62,93,124,155,186,216,246,276,306,336];var $f3ed2e4472ae7e25$export$37fccdbfd14c5939=class{fromJulianDay(jd$1){let daysSinceEpoch=jd$1-$f3ed2e4472ae7e25$var$PERSIAN_EPOCH,year=1+Math.floor((33*daysSinceEpoch+3)/12053),farvardin1=365*(year-1)+Math.floor((8*year+21)/33),dayOfYear=daysSinceEpoch-farvardin1,month=dayOfYear<216?Math.floor(dayOfYear/31):Math.floor((dayOfYear-6)/30),day=dayOfYear-$f3ed2e4472ae7e25$var$MONTH_START[month]+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,year,month+1,day)}toJulianDay(date){let jd$1=$f3ed2e4472ae7e25$var$PERSIAN_EPOCH-1+365*(date.year-1)+Math.floor((8*date.year+21)/33);return jd$1+=$f3ed2e4472ae7e25$var$MONTH_START[date.month-1],jd$1+=date.day,jd$1}getMonthsInYear(){return 12}getDaysInMonth(date){if(date.month<=6)return 31;if(date.month<=11)return 30;let isLeapYear=$2b4dce13dd5a17fa$export$842a2cf37af977e1(25*date.year+11,33)<8;return isLeapYear?30:29}getEras(){return[`AP`]}getYearsInEra(){return 9377}constructor(){this.identifier=`persian`}};const $82c358003bdda0a8$var$INDIAN_ERA_START=78,$82c358003bdda0a8$var$INDIAN_YEAR_START=80;var $82c358003bdda0a8$export$39f31c639fa15726=class extends $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(jd$1){let date=super.fromJulianDay(jd$1),indianYear=date.year-$82c358003bdda0a8$var$INDIAN_ERA_START,yDay=jd$1-$3b62074eb05584b2$export$f297eb839006d339(date.era,date.year,1,1),leapMonth;yDay<$82c358003bdda0a8$var$INDIAN_YEAR_START?(indianYear--,leapMonth=$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year-1)?31:30,yDay+=leapMonth+155+90+10):(leapMonth=$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year)?31:30,yDay-=$82c358003bdda0a8$var$INDIAN_YEAR_START);let indianMonth,indianDay;if(yDay=8&&(jd$1+=(date.month-7)*30),jd$1+=date.day-1,jd$1)}getDaysInMonth(date){return date.month===1&&$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year+$82c358003bdda0a8$var$INDIAN_ERA_START)||date.month>=2&&date.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return[`saka`]}balanceDate(){}constructor(...args){super(...args),this.identifier=`indian`}};const $f2f3e0e3a817edbd$var$CIVIL_EPOC=1948440,$f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC=1948439,$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START=1300,$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END=1600,$f2f3e0e3a817edbd$var$UMALQURA_START_DAYS=460322;function $f2f3e0e3a817edbd$var$islamicToJulianDay(epoch,year,month,day){return day+Math.ceil(29.5*(month-1))+(year-1)*354+Math.floor((3+11*year)/30)+epoch-1}function $f2f3e0e3a817edbd$var$julianDayToIslamic(calendar,epoch,jd$1){let year=Math.floor((30*(jd$1-epoch)+10646)/10631),month=Math.min(12,Math.ceil((jd$1-(29+$f2f3e0e3a817edbd$var$islamicToJulianDay(epoch,year,1,1)))/29.5)+1),day=jd$1-$f2f3e0e3a817edbd$var$islamicToJulianDay(epoch,year,month,1)+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(calendar,year,month,day)}function $f2f3e0e3a817edbd$var$isLeapYear(year){return(14+11*year)%30<11}var $f2f3e0e3a817edbd$export$2066795aadd37bfc=class{fromJulianDay(jd$1){return $f2f3e0e3a817edbd$var$julianDayToIslamic(this,$f2f3e0e3a817edbd$var$CIVIL_EPOC,jd$1)}toJulianDay(date){return $f2f3e0e3a817edbd$var$islamicToJulianDay($f2f3e0e3a817edbd$var$CIVIL_EPOC,date.year,date.month,date.day)}getDaysInMonth(date){let length=29+date.month%2;return date.month===12&&$f2f3e0e3a817edbd$var$isLeapYear(date.year)&&length++,length}getMonthsInYear(){return 12}getDaysInYear(date){return $f2f3e0e3a817edbd$var$isLeapYear(date.year)?355:354}getYearsInEra(){return 9665}getEras(){return[`AH`]}constructor(){this.identifier=`islamic-civil`}},$f2f3e0e3a817edbd$export$37f0887f2f9d22f7=class extends $f2f3e0e3a817edbd$export$2066795aadd37bfc{fromJulianDay(jd$1){return $f2f3e0e3a817edbd$var$julianDayToIslamic(this,$f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC,jd$1)}toJulianDay(date){return $f2f3e0e3a817edbd$var$islamicToJulianDay($f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC,date.year,date.month,date.day)}constructor(...args){super(...args),this.identifier=`islamic-tbla`}};const $f2f3e0e3a817edbd$var$UMALQURA_DATA=`qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=`;let $f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH,$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE;function $f2f3e0e3a817edbd$var$umalquraYearStart(year){return $f2f3e0e3a817edbd$var$UMALQURA_START_DAYS+$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE[year-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START]}function $f2f3e0e3a817edbd$var$umalquraMonthLength(year,month){let idx=year-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START,mask=1<<11-(month-1);return($f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH[idx]&mask)===0?29:30}function $f2f3e0e3a817edbd$var$umalquraMonthStart(year,month){let day=$f2f3e0e3a817edbd$var$umalquraYearStart(year);for(let i$1=1;i$1endDays)return super.fromJulianDay(jd$1);{let y$3=$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START-1,m$3=1,d$2=1;for(;d$2>0;){y$3++,d$2=days-$f2f3e0e3a817edbd$var$umalquraYearStart(y$3)+1;let yearLength=$f2f3e0e3a817edbd$var$umalquraYearLength(y$3);if(d$2===yearLength){m$3=12;break}else if(d$2monthLength;)d$2-=monthLength,m$3++,monthLength=$f2f3e0e3a817edbd$var$umalquraMonthLength(y$3,m$3);break}}return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,y$3,m$3,days-$f2f3e0e3a817edbd$var$umalquraMonthStart(y$3,m$3)+1)}}toJulianDay(date){return date.year<$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START||date.year>$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END?super.toJulianDay(date):$f2f3e0e3a817edbd$var$CIVIL_EPOC+$f2f3e0e3a817edbd$var$umalquraMonthStart(date.year,date.month)+(date.day-1)}getDaysInMonth(date){return date.year<$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START||date.year>$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END?super.getDaysInMonth(date):$f2f3e0e3a817edbd$var$umalquraMonthLength(date.year,date.month)}getDaysInYear(date){return date.year<$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START||date.year>$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END?super.getDaysInYear(date):$f2f3e0e3a817edbd$var$umalquraYearLength(date.year)}constructor(){if(super(),this.identifier=`islamic-umalqura`,$f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH||=new Uint16Array(Uint8Array.from(atob($f2f3e0e3a817edbd$var$UMALQURA_DATA),c$4=>c$4.charCodeAt(0)).buffer),!$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE){$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE=new Uint32Array($f2f3e0e3a817edbd$var$UMALQURA_YEAR_END-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START+1);let yearStart=0;for(let year=$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START;year<=$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END;year++){$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE[year-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START]=yearStart;for(let i$1=1;i$1<=12;i$1++)yearStart+=$f2f3e0e3a817edbd$var$umalquraMonthLength(year,i$1)}}}};const $7c5f6fbf42389787$var$HEBREW_EPOCH=347997,$7c5f6fbf42389787$var$HOUR_PARTS=1080,$7c5f6fbf42389787$var$DAY_PARTS=24*$7c5f6fbf42389787$var$HOUR_PARTS,$7c5f6fbf42389787$var$MONTH_DAYS=29,$7c5f6fbf42389787$var$MONTH_FRACT=12*$7c5f6fbf42389787$var$HOUR_PARTS+793,$7c5f6fbf42389787$var$MONTH_PARTS=$7c5f6fbf42389787$var$MONTH_DAYS*$7c5f6fbf42389787$var$DAY_PARTS+$7c5f6fbf42389787$var$MONTH_FRACT;function $7c5f6fbf42389787$var$isLeapYear(year){return $2b4dce13dd5a17fa$export$842a2cf37af977e1(year*7+1,19)<7}function $7c5f6fbf42389787$var$hebrewDelay1(year){let months=Math.floor((235*year-234)/19),parts=12084+13753*months,day=months*29+Math.floor(parts/25920);return $2b4dce13dd5a17fa$export$842a2cf37af977e1(3*(day+1),7)<3&&(day+=1),day}function $7c5f6fbf42389787$var$hebrewDelay2(year){let last=$7c5f6fbf42389787$var$hebrewDelay1(year-1),present=$7c5f6fbf42389787$var$hebrewDelay1(year),next=$7c5f6fbf42389787$var$hebrewDelay1(year+1);return next-present===356?2:present-last===382?1:0}function $7c5f6fbf42389787$var$startOfYear(year){return $7c5f6fbf42389787$var$hebrewDelay1(year)+$7c5f6fbf42389787$var$hebrewDelay2(year)}function $7c5f6fbf42389787$var$getDaysInYear(year){return $7c5f6fbf42389787$var$startOfYear(year+1)-$7c5f6fbf42389787$var$startOfYear(year)}function $7c5f6fbf42389787$var$getYearType(year){let yearLength=$7c5f6fbf42389787$var$getDaysInYear(year);switch(yearLength>380&&(yearLength-=30),yearLength){case 353:return 0;case 354:return 1;case 355:return 2}}function $7c5f6fbf42389787$var$getDaysInMonth(year,month){if(month>=6&&!$7c5f6fbf42389787$var$isLeapYear(year)&&month++,month===4||month===7||month===9||month===11||month===13)return 29;let yearType=$7c5f6fbf42389787$var$getYearType(year);return month===2?yearType===2?30:29:month===3?yearType===0?29:30:month===6?$7c5f6fbf42389787$var$isLeapYear(year)?30:0:30}var $7c5f6fbf42389787$export$ca405048b8fb5af=class{fromJulianDay(jd$1){let d$2=jd$1-$7c5f6fbf42389787$var$HEBREW_EPOCH,m$3=d$2*$7c5f6fbf42389787$var$DAY_PARTS/$7c5f6fbf42389787$var$MONTH_PARTS,year=Math.floor((19*m$3+234)/235)+1,ys$1=$7c5f6fbf42389787$var$startOfYear(year),dayOfYear=Math.floor(d$2-ys$1);for(;dayOfYear<1;)year--,ys$1=$7c5f6fbf42389787$var$startOfYear(year),dayOfYear=Math.floor(d$2-ys$1);let month=1,monthStart=0;for(;monthStart6?date.month--:!$7c5f6fbf42389787$var$isLeapYear(previousDate.year)&&$7c5f6fbf42389787$var$isLeapYear(date.year)&&previousDate.month>6&&date.month++)}constructor(){this.identifier=`hebrew`}};const $b956b2d7a6cf451f$var$ETHIOPIC_EPOCH=1723856,$b956b2d7a6cf451f$var$COPTIC_EPOCH=1824665,$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA=5500;function $b956b2d7a6cf451f$var$ceToJulianDay(epoch,year,month,day){return epoch+365*year+Math.floor(year/4)+30*(month-1)+day-1}function $b956b2d7a6cf451f$var$julianDayToCE(epoch,jd$1){let year=Math.floor(4*(jd$1-epoch)/1461),month=1+Math.floor((jd$1-$b956b2d7a6cf451f$var$ceToJulianDay(epoch,year,1,1))/30),day=jd$1+1-$b956b2d7a6cf451f$var$ceToJulianDay(epoch,year,month,1);return[year,month,day]}function $b956b2d7a6cf451f$var$getLeapDay(year){return Math.floor(year%4/3)}function $b956b2d7a6cf451f$var$getDaysInMonth(year,month){return month%13==0?$b956b2d7a6cf451f$var$getLeapDay(year)+5:30}var $b956b2d7a6cf451f$export$26ba6eab5e20cd7d=class{fromJulianDay(jd$1){let[year,month,day]=$b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH,jd$1),era=`AM`;return year<=0&&(era=`AA`,year+=$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA),new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,era,year,month,day)}toJulianDay(date){let year=date.year;return date.era===`AA`&&(year-=$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA),$b956b2d7a6cf451f$var$ceToJulianDay($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH,year,date.month,date.day)}getDaysInMonth(date){return $b956b2d7a6cf451f$var$getDaysInMonth(date.year,date.month)}getMonthsInYear(){return 13}getDaysInYear(date){return 365+$b956b2d7a6cf451f$var$getLeapDay(date.year)}getYearsInEra(date){return date.era===`AA`?9999:9991}getEras(){return[`AA`,`AM`]}constructor(){this.identifier=`ethiopic`}},$b956b2d7a6cf451f$export$d72e0c37005a4914=class extends $b956b2d7a6cf451f$export$26ba6eab5e20cd7d{fromJulianDay(jd$1){let[year,month,day]=$b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH,jd$1);return year+=$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA,new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,`AA`,year,month,day)}getEras(){return[`AA`]}getYearsInEra(){return 9999}constructor(...args){super(...args),this.identifier=`ethioaa`}},$b956b2d7a6cf451f$export$fe6243cbe1a4b7c1=class extends $b956b2d7a6cf451f$export$26ba6eab5e20cd7d{fromJulianDay(jd$1){let[year,month,day]=$b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$COPTIC_EPOCH,jd$1),era=`CE`;return year<=0&&(era=`BCE`,year=1-year),new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,era,year,month,day)}toJulianDay(date){let year=date.year;return date.era===`BCE`&&(year=1-year),$b956b2d7a6cf451f$var$ceToJulianDay($b956b2d7a6cf451f$var$COPTIC_EPOCH,year,date.month,date.day)}getDaysInMonth(date){let year=date.year;return date.era===`BCE`&&(year=1-year),$b956b2d7a6cf451f$var$getDaysInMonth(year,date.month)}isInverseEra(date){return date.era===`BCE`}balanceDate(date){date.year<=0&&(date.era=date.era===`BCE`?`CE`:`BCE`,date.year=1-date.year)}getEras(){return[`BCE`,`CE`]}getYearsInEra(date){return date.era===`BCE`?9999:9715}constructor(...args){super(...args),this.identifier=`coptic`}};function $64244302c3013299$export$dd0bbc9b26defe37(name$2){switch(name$2){case`buddhist`:return new $8d73d47422ca7302$export$42d20a78301dee44;case`ethiopic`:return new $b956b2d7a6cf451f$export$26ba6eab5e20cd7d;case`ethioaa`:return new $b956b2d7a6cf451f$export$d72e0c37005a4914;case`coptic`:return new $b956b2d7a6cf451f$export$fe6243cbe1a4b7c1;case`hebrew`:return new $7c5f6fbf42389787$export$ca405048b8fb5af;case`indian`:return new $82c358003bdda0a8$export$39f31c639fa15726;case`islamic-civil`:return new $f2f3e0e3a817edbd$export$2066795aadd37bfc;case`islamic-tbla`:return new $f2f3e0e3a817edbd$export$37f0887f2f9d22f7;case`islamic-umalqura`:return new $f2f3e0e3a817edbd$export$5baab4758c231076;case`japanese`:return new $62225008020f0a13$export$b746ab2b60cdffbf;case`persian`:return new $f3ed2e4472ae7e25$export$37fccdbfd14c5939;case`roc`:return new $5f31bd6f0c8940b2$export$65e01080afcb0799;case`gregory`:default:return new $3b62074eb05584b2$export$80ee6245ec4f29ec}}let $fb18d541ea1ad717$var$formatterCache=new Map;var $fb18d541ea1ad717$export$ad991b66133851cf=class{format(value$1){return this.formatter.format(value$1)}formatToParts(value$1){return this.formatter.formatToParts(value$1)}formatRange(start,end){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(start,end);if(end= start date`);return`${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`}formatRangeToParts(start,end){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(start,end);if(end= start date`);let startParts=this.formatter.formatToParts(start),endParts=this.formatter.formatToParts(end);return[...startParts.map(p$5=>({...p$5,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...endParts.map(p$5=>({...p$5,source:`endRange`}))]}resolvedOptions(){let resolvedOptions=this.formatter.resolvedOptions();return $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle()&&(this.resolvedHourCycle||=$fb18d541ea1ad717$var$getResolvedHourCycle(resolvedOptions.locale,this.options),resolvedOptions.hourCycle=this.resolvedHourCycle,resolvedOptions.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),resolvedOptions.calendar===`ethiopic-amete-alem`&&(resolvedOptions.calendar=`ethioaa`),resolvedOptions}constructor(locale,options$1={}){this.formatter=$fb18d541ea1ad717$var$getCachedDateFormatter(locale,options$1),this.options=options$1}};const $fb18d541ea1ad717$var$hour12Preferences={true:{ja:`h11`},false:{}};function $fb18d541ea1ad717$var$getCachedDateFormatter(locale,options$1={}){if(typeof options$1.hour12==`boolean`&&$fb18d541ea1ad717$var$hasBuggyHour12Behavior()){options$1={...options$1};let pref=$fb18d541ea1ad717$var$hour12Preferences[String(options$1.hour12)][locale.split(`-`)[0]],defaultHourCycle=options$1.hour12?`h12`:`h23`;options$1.hourCycle=pref??defaultHourCycle,delete options$1.hour12}let cacheKey=locale+(options$1?Object.entries(options$1).sort((a$2,b$4)=>a$2[0]p$5.type===`hour`).value,10),max$1=parseInt(formatter.formatToParts(new Date(2020,2,3,23)).find(p$5=>p$5.type===`hour`).value,10);if(min$1===0&&max$1===23)return`h23`;if(min$1===24&&max$1===23)return`h24`;if(min$1===0&&max$1===11)return`h11`;if(min$1===12&&max$1===11)return`h12`;throw Error(`Unexpected hour cycle result`)}function usePrimitiveElement(){let primitiveElement=ref(),currentElement=computed(()=>[`#text`,`#comment`].includes(primitiveElement.value?.$el.nodeName)?primitiveElement.value?.$el.nextElementSibling:unrefElement(primitiveElement));return{primitiveElement,currentElement}}function useFormControl(el$1){return computed(()=>toValue(el$1)?!!unrefElement(el$1)?.closest(`form`):!0)}const _sfc_main$17=defineComponent({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(__props){let props=__props,{primitiveElement,currentElement}=usePrimitiveElement(),valueState=computed(()=>props.checked??props.value);return watch(valueState,(cur,prev)=>{if(!currentElement.value)return;let input=currentElement.value,inputProto=window.HTMLInputElement.prototype,descriptor=Object.getOwnPropertyDescriptor(inputProto,`value`),setValue=descriptor.set;if(setValue&&cur!==prev){let inputEvent=new Event(`input`,{bubbles:!0}),changeEvent=new Event(`change`,{bubbles:!0});setValue.call(input,cur),input.dispatchEvent(inputEvent),input.dispatchEvent(changeEvent)}}),(_ctx,_cache$1)=>(openBlock(),createBlock(_sfc_main$18,mergeProps({ref_key:`primitiveElement`,ref:primitiveElement},{...props,..._ctx.$attrs},{as:`input`}),null,16))}}),_sfc_main$15=defineComponent({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(__props){let props=__props,isFormArrayEmptyAndRequired=computed(()=>typeof props.value==`object`&&Array.isArray(props.value)&&props.value.length===0&&props.required),parsedValue=computed(()=>typeof props.value==`string`||typeof props.value==`number`||typeof props.value==`boolean`?[{name:props.name,value:props.value}]:typeof props.value==`object`&&Array.isArray(props.value)?props.value.flatMap((obj,index$1)=>typeof obj==`object`?Object.entries(obj).map(([key$1,value$1])=>({name:`[${props.name}][${index$1}][${key$1}]`,value:value$1})):{name:`[${props.name}][${index$1}]`,value:obj}):props.value!==null&&typeof props.value==`object`&&!Array.isArray(props.value)?Object.entries(props.value).map(([key$1,value$1])=>({name:`[${props.name}][${key$1}]`,value:value$1})):[]);return(_ctx,_cache$1)=>isFormArrayEmptyAndRequired.value?(openBlock(),createBlock(_sfc_main$17,mergeProps({key:_ctx.name},{...props,..._ctx.$attrs},{name:_ctx.name,value:_ctx.value}),null,16,[`name`,`value`])):(openBlock(!0),createElementBlock(Fragment,{key:1},renderList(parsedValue.value,parsed=>(openBlock(),createBlock(_sfc_main$17,mergeProps({key:parsed.name,ref_for:!0},{...props,..._ctx.$attrs},{name:parsed.name,value:parsed.value}),null,16,[`name`,`value`]))),128))}}),_sfc_main$7=defineComponent({__name:`DialogPortal`,props:{to:{},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(__props){let props=__props;return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(_sfc_main$16),normalizeProps(guardReactiveProps(props)),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}});let $488c6ddbf4ef74c2$var$formatterCache=new Map,$488c6ddbf4ef74c2$var$supportsSignDisplay=!1;try{$488c6ddbf4ef74c2$var$supportsSignDisplay=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}let $488c6ddbf4ef74c2$var$supportsUnit=!1;try{$488c6ddbf4ef74c2$var$supportsUnit=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}const $488c6ddbf4ef74c2$var$UNITS={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}};var $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5=class{format(value$1){let res=``;if(res=!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null?$488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter,this.options.signDisplay,value$1):this.numberFormatter.format(value$1),this.options.style===`unit`&&!$488c6ddbf4ef74c2$var$supportsUnit){var _UNITS_unit;let{unit,unitDisplay=`short`,locale}=this.resolvedOptions();if(!unit)return res;let values=(_UNITS_unit=$488c6ddbf4ef74c2$var$UNITS[unit])?.[unitDisplay];res+=values[locale]||values.default}return res}formatToParts(value$1){return this.numberFormatter.formatToParts(value$1)}formatRange(start,end){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(start,end);if(end= start date`);return`${this.format(start)} \u{2013} ${this.format(end)}`}formatRangeToParts(start,end){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(start,end);if(end= start date`);let startParts=this.numberFormatter.formatToParts(start),endParts=this.numberFormatter.formatToParts(end);return[...startParts.map(p$5=>({...p$5,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...endParts.map(p$5=>({...p$5,source:`endRange`}))]}resolvedOptions(){let options$1=this.numberFormatter.resolvedOptions();return!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null&&(options$1={...options$1,signDisplay:this.options.signDisplay}),!$488c6ddbf4ef74c2$var$supportsUnit&&this.options.style===`unit`&&(options$1={...options$1,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),options$1}constructor(locale,options$1={}){this.numberFormatter=$488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale,options$1),this.options=options$1}};function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale,options$1={}){let{numberingSystem}=options$1;if(numberingSystem&&locale.includes(`-nu-`)&&(locale.includes(`-u-`)||(locale+=`-u-`),locale+=`-nu-${numberingSystem}`),options$1.style===`unit`&&!$488c6ddbf4ef74c2$var$supportsUnit){var _UNITS_unit;let{unit,unitDisplay=`short`}=options$1;if(!unit)throw Error(`unit option must be provided with style: "unit"`);if(!(_UNITS_unit=$488c6ddbf4ef74c2$var$UNITS[unit])?.[unitDisplay])throw Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);options$1={...options$1,style:`decimal`}}let cacheKey=locale+(options$1?Object.entries(options$1).sort((a$2,b$4)=>a$2[0]0||Object.is(num$2,0):signDisplay===`exceptZero`&&(Object.is(num$2,-0)||Object.is(num$2,0)?num$2=Math.abs(num$2):needsPositiveSign=num$2>0),needsPositiveSign){let negative=numberFormat.format(-num$2),noSign=numberFormat.format(num$2),minus=negative.replace(noSign,``).replace(/\u200e|\u061C/,``);[...minus].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`);let positive=negative.replace(noSign,`!!!`).replace(minus,`+`).replace(`!!!`,noSign);return positive}else return numberFormat.format(num$2)}}const $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX=RegExp(`^.*\\(.*\\).*$`),$6c7bd7858deea686$var$NUMBERING_SYSTEMS=[`latn`,`arab`,`hanidec`,`deva`,`beng`];var $6c7bd7858deea686$export$cd11ab140839f11d=class{parse(value$1){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,value$1).parse(value$1)}isValidPartialNumber(value$1,minValue,maxValue){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,value$1).isValidPartialNumber(value$1,minValue,maxValue)}getNumberingSystem(value$1){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,value$1).options.numberingSystem}constructor(locale,options$1={}){this.locale=locale,this.options=options$1}};const $6c7bd7858deea686$var$numberParserCache=new Map;function $6c7bd7858deea686$var$getNumberParserImpl(locale,options$1,value$1){let defaultParser=$6c7bd7858deea686$var$getCachedNumberParser(locale,options$1);if(!locale.includes(`-nu-`)&&!defaultParser.isValidPartialNumber(value$1)){for(let numberingSystem of $6c7bd7858deea686$var$NUMBERING_SYSTEMS)if(numberingSystem!==defaultParser.options.numberingSystem){let parser=$6c7bd7858deea686$var$getCachedNumberParser(locale+(locale.includes(`-u-`)?`-nu-`:`-u-nu-`)+numberingSystem,options$1);if(parser.isValidPartialNumber(value$1))return parser}}return defaultParser}function $6c7bd7858deea686$var$getCachedNumberParser(locale,options$1){let cacheKey=locale+(options$1?Object.entries(options$1).sort((a$2,b$4)=>a$2[0]-1&&(fullySanitizedValue=`-${fullySanitizedValue}`)}let newValue=fullySanitizedValue?+fullySanitizedValue:NaN;if(isNaN(newValue))return NaN;if(this.options.style===`percent`){var _this_options_minimumFractionDigits,_this_options_maximumFractionDigits;let options$1={...this.options,style:`decimal`,minimumFractionDigits:Math.min(((_this_options_minimumFractionDigits=this.options.minimumFractionDigits)??0)+2,20),maximumFractionDigits:Math.min(((_this_options_maximumFractionDigits=this.options.maximumFractionDigits)??0)+2,20)};return new $6c7bd7858deea686$export$cd11ab140839f11d(this.locale,options$1).parse(new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.locale,options$1).format(newValue))}return this.options.currencySign===`accounting`&&$6c7bd7858deea686$var$CURRENCY_SIGN_REGEX.test(value$1)&&(newValue=-1*newValue),newValue}sanitize(value$1){return value$1=value$1.replace(this.symbols.literals,``),this.symbols.minusSign&&(value$1=value$1.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(value$1=value$1.replace(`,`,this.symbols.decimal),value$1=value$1.replace(`،`,this.symbols.decimal)),this.symbols.group&&(value$1=$6c7bd7858deea686$var$replaceAll(value$1,`.`,this.symbols.group))),this.options.locale===`fr-FR`&&(value$1=$6c7bd7858deea686$var$replaceAll(value$1,`.`,` `)),value$1}isValidPartialNumber(value$1,minValue=-1/0,maxValue=1/0){return value$1=this.sanitize(value$1),this.symbols.minusSign&&value$1.startsWith(this.symbols.minusSign)&&minValue<0?value$1=value$1.slice(this.symbols.minusSign.length):this.symbols.plusSign&&value$1.startsWith(this.symbols.plusSign)&&maxValue>0&&(value$1=value$1.slice(this.symbols.plusSign.length)),this.symbols.group&&value$1.startsWith(this.symbols.group)||this.symbols.decimal&&value$1.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(value$1=$6c7bd7858deea686$var$replaceAll(value$1,this.symbols.group,``)),value$1=value$1.replace(this.symbols.numeral,``),this.symbols.decimal&&(value$1=value$1.replace(this.symbols.decimal,``)),value$1.length===0)}constructor(locale,options$1={}){this.locale=locale,this.formatter=new Intl.NumberFormat(locale,options$1),this.options=this.formatter.resolvedOptions(),this.symbols=$6c7bd7858deea686$var$getSymbols(locale,this.formatter,this.options,options$1);var _this_options_minimumFractionDigits,_this_options_maximumFractionDigits;this.options.style===`percent`&&(((_this_options_minimumFractionDigits=this.options.minimumFractionDigits)??0)>18||((_this_options_maximumFractionDigits=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 $6c7bd7858deea686$var$nonLiteralParts=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),$6c7bd7858deea686$var$pluralNumbers=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function $6c7bd7858deea686$var$getSymbols(locale,formatter,intlOptions,originalOptions){var _allParts_find,_posAllParts_find,_decimalParts_find,_allParts_find1;let symbolFormatter=new Intl.NumberFormat(locale,{...intlOptions,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`}),allParts=symbolFormatter.formatToParts(-10000.111),posAllParts=symbolFormatter.formatToParts(10000.111),pluralParts=$6c7bd7858deea686$var$pluralNumbers.map(n$2=>symbolFormatter.formatToParts(n$2));var _allParts_find_value;let minusSign=(_allParts_find_value=(_allParts_find=allParts.find(p$5=>p$5.type===`minusSign`))?.value)??`-`,plusSign=(_posAllParts_find=posAllParts.find(p$5=>p$5.type===`plusSign`))?.value;!plusSign&&(originalOptions?.signDisplay===`exceptZero`||originalOptions?.signDisplay===`always`)&&(plusSign=`+`);let decimalParts=new Intl.NumberFormat(locale,{...intlOptions,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001),decimal=(_decimalParts_find=decimalParts.find(p$5=>p$5.type===`decimal`))?.value,group=(_allParts_find1=allParts.find(p$5=>p$5.type===`group`))?.value,allPartsLiterals=allParts.filter(p$5=>!$6c7bd7858deea686$var$nonLiteralParts.has(p$5.type)).map(p$5=>$6c7bd7858deea686$var$escapeRegex(p$5.value)),pluralPartsLiterals=pluralParts.flatMap(p$5=>p$5.filter(p$6=>!$6c7bd7858deea686$var$nonLiteralParts.has(p$6.type)).map(p$6=>$6c7bd7858deea686$var$escapeRegex(p$6.value))),sortedLiterals=[...new Set([...allPartsLiterals,...pluralPartsLiterals])].sort((a$2,b$4)=>b$4.length-a$2.length),literals=sortedLiterals.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${sortedLiterals.join(`|`)}|[\\p{White_Space}]`,`gu`),numerals=[...new Intl.NumberFormat(intlOptions.locale,{useGrouping:!1}).format(9876543210)].reverse(),indexes=new Map(numerals.map((d$2,i$1)=>[d$2,i$1])),numeral=RegExp(`[${numerals.join(``)}]`,`g`),index$1=d$2=>String(indexes.get(d$2));return{minusSign,plusSign,decimal,group,literals,numeral,index:index$1}}function $6c7bd7858deea686$var$replaceAll(str,find$1,replace){return str.replaceAll?str.replaceAll(find$1,replace):str.split(find$1).join(replace)}function $6c7bd7858deea686$var$escapeRegex(string$2){return string$2.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}const[injectSwitchRootContext,provideSwitchRootContext]=createContext(`SwitchRoot`),_sfc_main$13=defineComponent({__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(__props,{emit:__emit}){let props=__props,emit$1=__emit,{disabled}=toRefs(props),modelValue=useVModel(props,`modelValue`,emit$1,{defaultValue:props.defaultValue,passive:props.modelValue===void 0});function toggleCheck(){disabled.value||(modelValue.value=!modelValue.value)}let{forwardRef,currentElement}=useForwardExpose(),isFormControl=useFormControl(currentElement),ariaLabel=computed(()=>props.id&¤tElement.value?document.querySelector(`[for="${props.id}"]`)?.innerText:void 0);return provideSwitchRootContext({modelValue,toggleCheck,disabled}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),mergeProps(_ctx.$attrs,{id:_ctx.id,ref:unref(forwardRef),role:`switch`,type:_ctx.as===`button`?`button`:void 0,value:_ctx.value,"aria-label":_ctx.$attrs[`aria-label`]||ariaLabel.value,"aria-checked":unref(modelValue),"aria-required":_ctx.required,"data-state":unref(modelValue)?`checked`:`unchecked`,"data-disabled":unref(disabled)?``:void 0,"as-child":_ctx.asChild,as:_ctx.as,disabled:unref(disabled),onClick:toggleCheck,onKeydown:withKeys(withModifiers(toggleCheck,[`prevent`]),[`enter`])}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{modelValue:unref(modelValue)}),unref(isFormControl)&&_ctx.name?(openBlock(),createBlock(unref(_sfc_main$15),{key:0,type:`checkbox`,name:_ctx.name,disabled:unref(disabled),required:_ctx.required,value:_ctx.value,checked:!!unref(modelValue)},null,8,[`name`,`disabled`,`required`,`value`,`checked`])):createCommentVNode(``,!0)]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]))}}),_sfc_main$14=defineComponent({__name:`SwitchThumb`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(__props){let rootContext=injectSwitchRootContext();return useForwardExpose(),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{"data-state":unref(rootContext).modelValue?.value?`checked`:`unchecked`,"data-disabled":unref(rootContext).disabled.value?``:void 0,"as-child":_ctx.asChild,as:_ctx.as},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`]))}});var Checkbox_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Checkbox`,props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(_sfc_main$13),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,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:withCtx(()=>[createVNode(unref(_sfc_main$14),{"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`]))}}),Checkbox_default=Checkbox_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$37={flex:`~ col gap-4`},_hoisted_2$23={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_3$17={flex:`1`},_hoisted_4$15={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_5$13={class:`text-xs text-neutral-500 dark:text-neutral-400`};var FieldCheckbox_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldCheckbox`,props:mergeModels({label:{},description:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,_hoisted_1$37,[createBaseVNode(`div`,_hoisted_2$23,[createBaseVNode(`div`,_hoisted_3$17,[createBaseVNode(`div`,_hoisted_4$15,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)])]),createBaseVNode(`div`,_hoisted_5$13,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),createVNode(Checkbox_default,{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event},null,8,[`modelValue`])])]))}}),FieldCheckbox_default=FieldCheckbox_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$36=[`type`];var Input_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Input`,props:mergeModels({type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>withDirectives((openBlock(),createElementBlock(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,type:props.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,_hoisted_1$36)),[[vModelDynamic,modelValue.value]])}}),Input_default=Input_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$35={"max-w-full":``},_hoisted_2$22={flex:`~ col gap-4`},_hoisted_3$16={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$14={key:0,class:`text-red-500`},_hoisted_5$12={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},_hoisted_6$11=[`type`,`placeholder`];var FieldInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldInput`,props:mergeModels({label:{},description:{},placeholder:{},required:{type:Boolean},type:{},inputClass:{},singleLine:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$35,[createBaseVNode(`label`,_hoisted_2$22,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$16,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$14,`*`))]),createBaseVNode(`div`,_hoisted_5$12,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),_ctx.singleLine?(openBlock(),createBlock(Input_default,{key:0,modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,type:props.type,placeholder:props.placeholder,class:normalizeClass(props.inputClass)},null,8,[`modelValue`,`type`,`placeholder`,`class`])):withDirectives((openBlock(),createElementBlock(`textarea`,{key:1,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,type:props.type,placeholder:props.placeholder,class:normalizeClass(props.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,_hoisted_6$11)),[[vModelText,modelValue.value]])])]))}}),FieldInput_default=FieldInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$34={flex:`~ gap-2`};var InputKeyValue_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`InputKeyValue`,props:mergeModels({name:{},keyPlaceholder:{},valuePlaceholder:{}},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:[`update:propertyKey`,`update:propertyValue`],setup(__props){let props=__props,key$1=useModel(__props,`propertyKey`),value$1=useModel(__props,`propertyValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$34,[createVNode(Input_default,{modelValue:key$1.value,"onUpdate:modelValue":_cache$1[0]||=$event=>key$1.value=$event,placeholder:props.keyPlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`]),createVNode(Input_default,{modelValue:value$1.value,"onUpdate:modelValue":_cache$1[1]||=$event=>value$1.value=$event,placeholder:props.valuePlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`])]))}}),InputKeyValue_default=InputKeyValue_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$33={"max-w-full":``},_hoisted_2$21={flex:`~ col gap-2`},_hoisted_3$15={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$13={key:0,class:`text-red-500`},_hoisted_5$11={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},_hoisted_6$10={flex:`~ col gap-2`},_hoisted_7$8=[`onClick`];var FieldKeyValues_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldKeyValues`,props:mergeModels({label:{},description:{},name:{},keyPlaceholder:{},valuePlaceholder:{},required:{type:Boolean},inputClass:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:mergeModels([`remove`,`add`],[`update:modelValue`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,keyValues=useModel(__props,`modelValue`),inputKey=ref(``),inputValue=ref(``);return watch([inputKey,inputValue],()=>{emit$1(`add`,inputKey.value,inputValue.value)}),(_ctx,_cache$1)=>{let _directive_auto_animate=resolveDirective(`auto-animate`);return openBlock(),createElementBlock(`div`,_hoisted_1$33,[createBaseVNode(`label`,_hoisted_2$21,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$15,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$13,`*`))]),createBaseVNode(`div`,_hoisted_5$11,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_6$10,[(openBlock(!0),createElementBlock(Fragment,null,renderList(keyValues.value,(keyValue,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,"w-full":``,flex:``,"items-center":``,"gap-2":``},[createVNode(InputKeyValue_default,{"property-key":keyValue.key,"onUpdate:propertyKey":$event=>keyValue.key=$event,"property-value":keyValue.value,"onUpdate:propertyValue":$event=>keyValue.value=$event,"key-placeholder":props.keyPlaceholder,"value-placeholder":props.valuePlaceholder,"w-full":``},null,8,[`property-key`,`onUpdate:propertyKey`,`property-value`,`onUpdate:propertyValue`,`key-placeholder`,`value-placeholder`]),createBaseVNode(`button`,{onClick:$event=>emit$1(`remove`,index$1)},_cache$1[0]||=[createBaseVNode(`div`,{"i-solar:minus-circle-line-duotone":``,size:`6`},null,-1)],8,_hoisted_7$8)]))),128))])),[[_directive_auto_animate]])])])}}}),FieldKeyValues_default=FieldKeyValues_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$32=[`min`,`max`,`step`];var Range_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Range`,props:mergeModels({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(__props){let props=__props,modelValue=useModel(__props,`modelValue`),scaledMin=computed(()=>props.min*1e4),scaledMax=computed(()=>props.max*1e4),scaledStep=computed(()=>props.step*1e4),sliderRef=ref(),sliderValue=computed({get:()=>modelValue.value*1e4,set:value$1=>{modelValue.value=value$1/1e4,updateTrackColor()}});onMounted(()=>updateTrackColor()),watch(sliderValue,()=>updateTrackColor(),{immediate:!0}),watch([scaledMin,scaledMax,scaledStep],()=>updateTrackColor(),{immediate:!0});function updateTrackColor(){sliderRef.value&&(sliderRef.value.style.setProperty(`--value`,sliderValue.value.toString()),sliderRef.value.style.setProperty(`--min`,sliderRef.value.min?sliderRef.value.min:props.min.toString()),sliderRef.value.style.setProperty(`--max`,sliderRef.value.max?sliderRef.value.max:props.max.toString()))}function handleInput(e$3){let target$1=e$3.target;target$1.style.setProperty(`--value`,target$1.value)}return(_ctx,_cache$1)=>withDirectives((openBlock(),createElementBlock(`input`,{ref_key:`sliderRef`,ref:sliderRef,"onUpdate:modelValue":_cache$1[0]||=$event=>sliderValue.value=$event,type:`range`,min:scaledMin.value,max:scaledMax.value,step:scaledStep.value,class:`slider-progress form_input-range`,onInput:handleInput},null,40,_hoisted_1$32)),[[vModelText,sliderValue.value,void 0,{number:!0}]])}}),Range_default=__plugin_vue_export_helper_default(Range_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-dbfa7610`]]);const _hoisted_1$31={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_2$20={flex:`1`},_hoisted_3$14={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$12={class:`text-xs text-neutral-500 dark:text-neutral-400`},_hoisted_5$10={"font-mono":``},_hoisted_6$9={flex:`~ row`,"items-center":``,"gap-2":``};var FieldRange_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldRange`,props:mergeModels({min:{},max:{},step:{},label:{},description:{},formatValue:{},as:{default:`label`}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(props.as,{flex:`~ col gap-4`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$31,[createBaseVNode(`div`,_hoisted_2$20,[createBaseVNode(`div`,_hoisted_3$14,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(_ctx.label),1)])]),createBaseVNode(`div`,_hoisted_4$12,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(_ctx.description),1)])])]),createBaseVNode(`span`,_hoisted_5$10,toDisplayString(props.formatValue?.(modelValue.value)||modelValue.value),1)]),createBaseVNode(`div`,_hoisted_6$9,[createVNode(Range_default,{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,min:_ctx.min||0,max:_ctx.max||1,step:_ctx.step||.01,"w-full":``},null,8,[`modelValue`,`min`,`max`,`step`])])]),_:3}))}}),FieldRange_default=FieldRange_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$30={flex:`~ col gap-4`},_hoisted_2$19={flex:`1`},_hoisted_3$13={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$11={class:`text-xs text-neutral-500 dark:text-neutral-400`};var FieldSelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldSelect`,props:mergeModels({label:{},description:{},options:{},placeholder:{},disabled:{type:Boolean},layout:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,_hoisted_1$30,[createBaseVNode(`div`,{class:normalizeClass([props.layout===`horizontal`?`flex flex-row items-center justify-between gap-2`:`flex flex-col items-start justify-center gap-2`])},[createBaseVNode(`div`,_hoisted_2$19,[createBaseVNode(`div`,_hoisted_3$13,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)])]),createBaseVNode(`div`,_hoisted_4$11,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),renderSlot(_ctx.$slots,`default`,{},()=>[createVNode(unref(Select_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,options:props.options,placeholder:props.placeholder,disabled:props.disabled,title:_ctx.label},{default:withCtx(({value:value$1})=>[createTextVNode(toDisplayString(props.options?.find(option$1=>option$1.value===value$1)?.label||props.placeholder),1)]),_:1},8,[`modelValue`,`options`,`placeholder`,`disabled`,`title`])])],2)]))}}),FieldSelect_default=FieldSelect_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$29={class:`max-w-full`},_hoisted_2$18={class:`flex flex-col gap-2`},_hoisted_3$12={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$10={key:0,class:`text-red-500`},_hoisted_5$9={class:`text-nowrap text-xs text-neutral-500 dark:text-neutral-400`},_hoisted_6$8={class:`~ col gap-2`},_hoisted_7$7=[`onClick`];var FieldValues_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldValues`,props:mergeModels({label:{},description:{},name:{},valuePlaceholder:{},required:{type:Boolean},inputClass:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:mergeModels([`remove`,`add`],[`update:modelValue`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,items=useModel(__props,`modelValue`);function addItem(){items.value.push(``),emit$1(`add`)}function removeItem(index$1){items.value.splice(index$1,1),emit$1(`remove`,index$1)}return(_ctx,_cache$1)=>{let _directive_auto_animate=resolveDirective(`auto-animate`);return openBlock(),createElementBlock(`div`,_hoisted_1$29,[createBaseVNode(`label`,_hoisted_2$18,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$12,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$10,`*`))]),createBaseVNode(`div`,_hoisted_5$9,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_6$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(items.value,(_$2,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,class:`w-full flex items-center gap-2`},[createVNode(Input_default,{modelValue:items.value[index$1],"onUpdate:modelValue":$event=>items.value[index$1]=$event,placeholder:props.valuePlaceholder,class:`w-90%`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`]),createBaseVNode(`button`,{"i-solar:minus-circle-line-duotone":``,size:`6`,class:`min-w-20px w-10% flex text-red-500`,onClick:$event=>removeItem(index$1)},null,8,_hoisted_7$7)]))),128)),createBaseVNode(`div`,{"i-solar:add-circle-line-duotone":``,size:`6`,class:`mt-2 w-4/5 text-blue-500`,onClick:addItem})])),[[_directive_auto_animate]])])])}}}),FieldValues_default=FieldValues_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$28=[`disabled`];var ColorHueRange_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ColorHueRange`,props:mergeModels({disabled:{type:Boolean},class:{}},{colorValue:{type:String,default:``},colorValueModifiers:{}}),emits:[`update:colorValue`],setup(__props){let props=__props,colorValue=useModel(__props,`colorValue`);return(_ctx,_cache$1)=>withDirectives((openBlock(),createElementBlock(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>colorValue.value=$event,type:`range`,min:`0`,max:`360`,step:`0.01`,class:normalizeClass([`color-hue-range`,[props.disabled?`opacity-25 cursor-not-allowed`:`cursor-pointer`,props.class||``]]),transition:`all ease-in-out duration-250`,disabled:props.disabled},null,10,_hoisted_1$28)),[[vModelText,colorValue.value]])}}),ColorHueRange_default=__plugin_vue_export_helper_default(ColorHueRange_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-3d01d2fa`]]),Option_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Option`,props:{value:{},label:{},active:{type:Boolean}},setup(__props){let props=__props,selectOption=inject(`selectOption`),hide$2=inject(`hide`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,mergeProps({..._ctx.$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":props.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:_cache$1[0]||=()=>{unref(selectOption)(props.value),unref(hide$2)()}}),[renderSlot(_ctx.$slots,`default`,{},()=>[createTextVNode(toDisplayString(props.label),1)])],16))}}),Option_default=Option_vue_vue_type_script_setup_true_lang_default;function n$1(t){var e$3;return(e$3=t.ownerDocument)?.defaultView||window}function o(t){return n$1(t).getComputedStyle(t)}const i=Math.min,r=Math.max,l=Math.round;function c$1(t){let e$3=o(t),n$2=parseFloat(e$3.width),i$1=parseFloat(e$3.height),r$2=t.offsetWidth,c$4=t.offsetHeight,s$1=l(n$2)!==r$2||l(i$1)!==c$4;return s$1&&(n$2=r$2,i$1=c$4),{width:n$2,height:i$1,fallback:s$1}}function s(t){return h$2(t)?(t.nodeName||``).toLowerCase():``}let f;function u(){if(f)return f;let t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(f=t.brands.map(t$1=>t$1.brand+`/`+t$1.version).join(` `),f):navigator.userAgent}function a(t){return t instanceof n$1(t).HTMLElement}function d$1(t){return t instanceof n$1(t).Element}function h$2(t){return t instanceof n$1(t).Node}function p$1(t){return typeof ShadowRoot>`u`?!1:t instanceof n$1(t).ShadowRoot||t instanceof ShadowRoot}function g$1(t){let{overflow:e$3,overflowX:n$2,overflowY:i$1,display:r$2}=o(t);return/auto|scroll|overlay|hidden|clip/.test(e$3+i$1+n$2)&&![`inline`,`contents`].includes(r$2)}function m$2(t){return[`table`,`td`,`th`].includes(s(t))}function y$2(t){let e$3=/firefox/i.test(u()),n$2=o(t),i$1=n$2.backdropFilter||n$2.WebkitBackdropFilter;return n$2.transform!==`none`||n$2.perspective!==`none`||!!i$1&&i$1!==`none`||e$3&&n$2.willChange===`filter`||e$3&&!!n$2.filter&&n$2.filter!==`none`||[`transform`,`perspective`].some(t$1=>n$2.willChange.includes(t$1))||[`paint`,`layout`,`strict`,`content`].some(t$1=>{let e$4=n$2.contain;return e$4!=null&&e$4.includes(t$1)})}function x$2(){return!/^((?!chrome|android).)*safari/i.test(u())}function w$1(t){return[`html`,`body`,`#document`].includes(s(t))}function v$1(t){return d$1(t)?t:t.contextElement}const b$2={x:1,y:1};function L(t){let e$3=v$1(t);if(!a(e$3))return b$2;let n$2=e$3.getBoundingClientRect(),{width:o$1,height:i$1,fallback:r$2}=c$1(e$3),s$1=(r$2?l(n$2.width):n$2.width)/o$1,f$3=(r$2?l(n$2.height):n$2.height)/i$1;return s$1&&Number.isFinite(s$1)||(s$1=1),f$3&&Number.isFinite(f$3)||(f$3=1),{x:s$1,y:f$3}}function E$1(t,e$3,o$1,i$1){var r$2,l$1;e$3===void 0&&(e$3=!1),o$1===void 0&&(o$1=!1);let c$4=t.getBoundingClientRect(),s$1=v$1(t),f$3=b$2;e$3&&(i$1?d$1(i$1)&&(f$3=L(i$1)):f$3=L(t));let u$1=s$1?n$1(s$1):window,a$2=!x$2()&&o$1,h$3=(c$4.left+(a$2&&(r$2=u$1.visualViewport)?.offsetLeft||0))/f$3.x,p$5=(c$4.top+(a$2&&(l$1=u$1.visualViewport)?.offsetTop||0))/f$3.y,g$2=c$4.width/f$3.x,m$3=c$4.height/f$3.y;if(s$1){let t$1=n$1(s$1),e$4=i$1&&d$1(i$1)?n$1(i$1):i$1,o$2=t$1.frameElement;for(;o$2&&i$1&&e$4!==t$1;){let t$2=L(o$2),e$5=o$2.getBoundingClientRect(),i$2=getComputedStyle(o$2);e$5.x+=(o$2.clientLeft+parseFloat(i$2.paddingLeft))*t$2.x,e$5.y+=(o$2.clientTop+parseFloat(i$2.paddingTop))*t$2.y,h$3*=t$2.x,p$5*=t$2.y,g$2*=t$2.x,m$3*=t$2.y,h$3+=e$5.x,p$5+=e$5.y,o$2=n$1(o$2).frameElement}}return{width:g$2,height:m$3,top:p$5,right:h$3+g$2,bottom:p$5+m$3,left:h$3,x:h$3,y:p$5}}function R$2(t){return((h$2(t)?t.ownerDocument:t.document)||window.document).documentElement}function T(t){return d$1(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function C$2(t){return E$1(R$2(t)).left+T(t).scrollLeft}function F(t){if(s(t)===`html`)return t;let e$3=t.assignedSlot||t.parentNode||p$1(t)&&t.host||R$2(t);return p$1(e$3)?e$3.host:e$3}function W$1(t){let e$3=F(t);return w$1(e$3)?e$3.ownerDocument.body:a(e$3)&&g$1(e$3)?e$3:W$1(e$3)}function D(t,e$3){var o$1;e$3===void 0&&(e$3=[]);let i$1=W$1(t),r$2=i$1===(o$1=t.ownerDocument)?.body,l$1=n$1(i$1);return r$2?e$3.concat(l$1,l$1.visualViewport||[],g$1(i$1)?i$1:[]):e$3.concat(i$1,D(i$1))}function S$1(e$3,i$1,l$1){return i$1===`viewport`?rectToClientRect(function(t,e$4){let o$1=n$1(t),i$2=R$2(t),r$2=o$1.visualViewport,l$2=i$2.clientWidth,c$4=i$2.clientHeight,s$1=0,f$3=0;if(r$2){l$2=r$2.width,c$4=r$2.height;let t$1=x$2();(t$1||!t$1&&e$4===`fixed`)&&(s$1=r$2.offsetLeft,f$3=r$2.offsetTop)}return{width:l$2,height:c$4,x:s$1,y:f$3}}(e$3,l$1)):d$1(i$1)?rectToClientRect(function(t,e$4){let n$2=E$1(t,!0,e$4===`fixed`),o$1=n$2.top+t.clientTop,i$2=n$2.left+t.clientLeft,r$2=a(t)?L(t):{x:1,y:1};return{width:t.clientWidth*r$2.x,height:t.clientHeight*r$2.y,x:i$2*r$2.x,y:o$1*r$2.y}}(i$1,l$1)):rectToClientRect(function(t){let e$4=R$2(t),n$2=T(t),i$2=t.ownerDocument.body,l$2=r(e$4.scrollWidth,e$4.clientWidth,i$2.scrollWidth,i$2.clientWidth),c$4=r(e$4.scrollHeight,e$4.clientHeight,i$2.scrollHeight,i$2.clientHeight),s$1=-n$2.scrollLeft+C$2(t),f$3=-n$2.scrollTop;return o(i$2).direction===`rtl`&&(s$1+=r(e$4.clientWidth,i$2.clientWidth)-l$2),{width:l$2,height:c$4,x:s$1,y:f$3}}(R$2(e$3)))}function A$1(t){return a(t)&&o(t).position!==`fixed`?t.offsetParent:null}function H$2(t){let e$3=n$1(t),i$1=A$1(t);for(;i$1&&m$2(i$1)&&o(i$1).position===`static`;)i$1=A$1(i$1);return i$1&&(s(i$1)===`html`||s(i$1)===`body`&&o(i$1).position===`static`&&!y$2(i$1))?e$3:i$1||function(t$1){let e$4=F(t$1);for(;a(e$4)&&!w$1(e$4);){if(y$2(e$4))return e$4;e$4=F(e$4)}return null}(t)||e$3}function O$2(t,e$3,n$2){let o$1=a(e$3),i$1=R$2(e$3),r$2=E$1(t,!0,n$2===`fixed`,e$3),l$1={scrollLeft:0,scrollTop:0},c$4={x:0,y:0};if(o$1||!o$1&&n$2!==`fixed`)if((s(e$3)!==`body`||g$1(i$1))&&(l$1=T(e$3)),a(e$3)){let t$1=E$1(e$3,!0);c$4.x=t$1.x+e$3.clientLeft,c$4.y=t$1.y+e$3.clientTop}else i$1&&(c$4.x=C$2(i$1));return{x:r$2.left+l$1.scrollLeft-c$4.x,y:r$2.top+l$1.scrollTop-c$4.y,width:r$2.width,height:r$2.height}}const P$1={getClippingRect:function(t){let{element:e$3,boundary:n$2,rootBoundary:l$1,strategy:c$4}=t,f$3=n$2===`clippingAncestors`?function(t$1,e$4){let n$3=e$4.get(t$1);if(n$3)return n$3;let i$1=D(t$1).filter(t$2=>d$1(t$2)&&s(t$2)!==`body`),r$2=null,l$2=o(t$1).position===`fixed`,c$5=l$2?F(t$1):t$1;for(;d$1(c$5)&&!w$1(c$5);){let t$2=o(c$5),e$5=y$2(c$5);(l$2?e$5||r$2:e$5||t$2.position!==`static`||!r$2||![`absolute`,`fixed`].includes(r$2.position))?r$2=t$2:i$1=i$1.filter(t$3=>t$3!==c$5),c$5=F(c$5)}return e$4.set(t$1,i$1),i$1}(e$3,this._c):[].concat(n$2),u$1=[...f$3,l$1],a$2=u$1[0],h$3=u$1.reduce((t$1,n$3)=>{let o$1=S$1(e$3,n$3,c$4);return t$1.top=r(o$1.top,t$1.top),t$1.right=i(o$1.right,t$1.right),t$1.bottom=i(o$1.bottom,t$1.bottom),t$1.left=r(o$1.left,t$1.left),t$1},S$1(e$3,a$2,c$4));return{width:h$3.right-h$3.left,height:h$3.bottom-h$3.top,x:h$3.left,y:h$3.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e$3,offsetParent:n$2,strategy:o$1}=t,i$1=a(n$2),r$2=R$2(n$2);if(n$2===r$2)return e$3;let l$1={scrollLeft:0,scrollTop:0},c$4={x:1,y:1},f$3={x:0,y:0};if((i$1||!i$1&&o$1!==`fixed`)&&((s(n$2)!==`body`||g$1(r$2))&&(l$1=T(n$2)),a(n$2))){let t$1=E$1(n$2);c$4=L(n$2),f$3.x=t$1.x+n$2.clientLeft,f$3.y=t$1.y+n$2.clientTop}return{width:e$3.width*c$4.x,height:e$3.height*c$4.y,x:e$3.x*c$4.x-l$1.scrollLeft*c$4.x+f$3.x,y:e$3.y*c$4.y-l$1.scrollTop*c$4.y+f$3.y}},isElement:d$1,getDimensions:function(t){return a(t)?c$1(t):t.getBoundingClientRect()},getOffsetParent:H$2,getDocumentElement:R$2,getScale:L,async getElementRects(t){let{reference:e$3,floating:n$2,strategy:o$1}=t,i$1=this.getOffsetParent||H$2,r$2=this.getDimensions;return{reference:O$2(e$3,await i$1(n$2),o$1),floating:{x:0,y:0,...await r$2(n$2)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>o(t).direction===`rtl`},B=(t,n$2,o$1)=>{let i$1=new Map,r$2={platform:P$1,...o$1},l$1={...r$2.platform,_c:i$1};return computePosition(t,n$2,{...r$2,platform:l$1})},h$1={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$3=>[...e$3,`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 S(e$3,t){let o$1=h$1.themes[e$3]||{},i$1;do i$1=o$1[t],typeof i$1>`u`?o$1.$extend?o$1=h$1.themes[o$1.$extend]||{}:(o$1=null,i$1=h$1[t]):o$1=null;while(o$1);return i$1}function Ze(e$3){let t=[e$3],o$1=h$1.themes[e$3]||{};do o$1.$extend&&!o$1.$resetCss?(t.push(o$1.$extend),o$1=h$1.themes[o$1.$extend]||{}):o$1=null;while(o$1);return t.map(i$1=>`v-popper--theme-${i$1}`)}function re$2(e$3){let t=[e$3],o$1=h$1.themes[e$3]||{};do o$1.$extend?(t.push(o$1.$extend),o$1=h$1.themes[o$1.$extend]||{}):o$1=null;while(o$1);return t}let $$1=!1;if(typeof window<`u`){$$1=!1;try{let e$3=Object.defineProperty({},`passive`,{get(){$$1=!0}});window.addEventListener(`test`,null,e$3)}catch{}}let _e$1=!1;typeof window<`u`&&typeof navigator<`u`&&(_e$1=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Te$2=[`auto`,`top`,`bottom`,`left`,`right`].reduce((e$3,t)=>e$3.concat([t,`${t}-start`,`${t}-end`]),[]),pe$1={hover:`mouseenter`,focus:`focus`,click:`click`,touch:`touchstart`,pointer:`pointerdown`},ae={hover:`mouseleave`,focus:`blur`,click:`click`,touch:`touchend`,pointer:`pointerup`};function de$1(e$3,t){let o$1=e$3.indexOf(t);o$1!==-1&&e$3.splice(o$1,1)}function G$1(){return new Promise(e$3=>requestAnimationFrame(()=>{requestAnimationFrame(e$3)}))}const d=[];let g=null;const le={};function he(e$3){let t=le[e$3];return t||=le[e$3]=[],t}let Y=function(){};typeof window<`u`&&(Y=window.Element);function n(e$3){return function(t){return S(t.theme,e$3)}}const q$1=`__floating-vue__popper`,Q$1=()=>defineComponent({name:`VPopper`,provide(){return{[q$1]:{parentPopper:this}}},inject:{[q$1]:{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:n(`disabled`)},positioningDisabled:{type:Boolean,default:n(`positioningDisabled`)},placement:{type:String,default:n(`placement`),validator:e$3=>Te$2.includes(e$3)},delay:{type:[String,Number,Object],default:n(`delay`)},distance:{type:[Number,String],default:n(`distance`)},skidding:{type:[Number,String],default:n(`skidding`)},triggers:{type:Array,default:n(`triggers`)},showTriggers:{type:[Array,Function],default:n(`showTriggers`)},hideTriggers:{type:[Array,Function],default:n(`hideTriggers`)},popperTriggers:{type:Array,default:n(`popperTriggers`)},popperShowTriggers:{type:[Array,Function],default:n(`popperShowTriggers`)},popperHideTriggers:{type:[Array,Function],default:n(`popperHideTriggers`)},container:{type:[String,Object,Y,Boolean],default:n(`container`)},boundary:{type:[String,Y],default:n(`boundary`)},strategy:{type:String,validator:e$3=>[`absolute`,`fixed`].includes(e$3),default:n(`strategy`)},autoHide:{type:[Boolean,Function],default:n(`autoHide`)},handleResize:{type:Boolean,default:n(`handleResize`)},instantMove:{type:Boolean,default:n(`instantMove`)},eagerMount:{type:Boolean,default:n(`eagerMount`)},popperClass:{type:[String,Array,Object],default:n(`popperClass`)},computeTransformOrigin:{type:Boolean,default:n(`computeTransformOrigin`)},autoMinSize:{type:Boolean,default:n(`autoMinSize`)},autoSize:{type:[Boolean,String],default:n(`autoSize`)},autoMaxSize:{type:Boolean,default:n(`autoMaxSize`)},autoBoundaryMaxSize:{type:Boolean,default:n(`autoBoundaryMaxSize`)},preventOverflow:{type:Boolean,default:n(`preventOverflow`)},overflowPadding:{type:[Number,String],default:n(`overflowPadding`)},arrowPadding:{type:[Number,String],default:n(`arrowPadding`)},arrowOverflow:{type:Boolean,default:n(`arrowOverflow`)},flip:{type:Boolean,default:n(`flip`)},shift:{type:Boolean,default:n(`shift`)},shiftCrossAxis:{type:Boolean,default:n(`shiftCrossAxis`)},noAutoFocus:{type:Boolean,default:n(`noAutoFocus`)},disposeTimeout:{type:Number,default:n(`disposeTimeout`)}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e$3=>!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$3=>e$3.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$3;return(e$3=this[q$1])?.parentPopper},hasPopperShowTriggerHover(){var e$3,t;return(e$3=this.popperTriggers)?.includes(`hover`)||(t=this.popperShowTriggers)?.includes(`hover`)}},watch:{shown:`$_autoShowHide`,disabled(e$3){e$3?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$3,t)=>(e$3[t]=`$_computePosition`,e$3),{})},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$3=null,skipDelay:t=!1,force:o$1=!1}={}){var i$1,s$1;(i$1=this.parentPopper)!=null&&i$1.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(o$1||!this.disabled)&&((s$1=this.parentPopper)?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e$3,t),this.$emit(`show`),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit(`update:shown`,!0))},hide({event:e$3=null,skipDelay:t=!1}={}){var o$1;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}(o$1=this.parentPopper)?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e$3,t),this.$emit(`hide`),this.$emit(`update:shown`,!1)}},init(){var e$3;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(e$3=this.referenceNode)?.call(this)??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(`.v-popper__inner`),this.$_arrowNode=this.$_popperNode.querySelector(`.v-popper__arrow-container`),this.$_swapTargetAttrs(`title`,`data-original-title`),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs(`data-original-title`,`title`))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit(`resize`))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;let e$3={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e$3.middleware.push(offset$1({mainAxis:this.distance,crossAxis:this.skidding}));let t=this.placement.startsWith(`auto`);if(t?e$3.middleware.push(autoPlacement({alignment:this.placement.split(`-`)[1]??``})):e$3.placement=this.placement,this.preventOverflow&&(this.shift&&e$3.middleware.push(shift$1({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e$3.middleware.push(flip$1({padding:this.overflowPadding,boundary:this.boundary}))),e$3.middleware.push(arrow$1({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e$3.middleware.push({name:`arrowOverflow`,fn:({placement:i$1,rects:s$1,middlewareData:r$2})=>{let p$5,{centerOffset:a$2}=r$2.arrow;return p$5=i$1.startsWith(`top`)||i$1.startsWith(`bottom`)?Math.abs(a$2)>s$1.reference.width/2:Math.abs(a$2)>s$1.reference.height/2,{data:{overflow:p$5}}}}),this.autoMinSize||this.autoSize){let i$1=this.autoSize?this.autoSize:this.autoMinSize?`min`:null;e$3.middleware.push({name:`autoSize`,fn:({rects:s$1,placement:r$2,middlewareData:p$5})=>{var u$1;if((u$1=p$5.autoSize)!=null&&u$1.skip)return{};let a$2,l$1;return r$2.startsWith(`top`)||r$2.startsWith(`bottom`)?a$2=s$1.reference.width:l$1=s$1.reference.height,this.$_innerNode.style[i$1===`min`?`minWidth`:i$1===`max`?`maxWidth`:`width`]=a$2==null?null:`${a$2}px`,this.$_innerNode.style[i$1===`min`?`minHeight`:i$1===`max`?`maxHeight`:`height`]=l$1==null?null:`${l$1}px`,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e$3.middleware.push(size$1({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:i$1,availableHeight:s$1})=>{this.$_innerNode.style.maxWidth=i$1==null?null:`${i$1}px`,this.$_innerNode.style.maxHeight=s$1==null?null:`${s$1}px`}})));let o$1=await B(this.$_referenceNode,this.$_popperNode,e$3);Object.assign(this.result,{x:o$1.x,y:o$1.y,placement:o$1.placement,strategy:o$1.strategy,arrow:{...o$1.middlewareData.arrow,...o$1.middlewareData.arrowOverflow}})},$_scheduleShow(e$3,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),g&&this.instantMove&&g.instantMove&&g!==this.parentPopper){g.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay(`show`))},$_scheduleHide(e$3,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(g=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay(`hide`))},$_computeDelay(e$3){let t=this.delay;return parseInt(t&&t[e$3]||t||0)},async $_applyShow(e$3=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e$3,!this.isShown&&(this.$_ensureTeleport(),await G$1(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...D(this.$_referenceNode),...D(this.$_popperNode)],`scroll`,()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){let t=this.$_referenceNode.getBoundingClientRect(),o$1=this.$_popperNode.querySelector(`.v-popper__wrapper`),i$1=o$1.parentNode.getBoundingClientRect(),s$1=t.x+t.width/2-(i$1.left+o$1.offsetLeft),r$2=t.y+t.height/2-(i$1.top+o$1.offsetTop);this.result.transformOrigin=`${s$1}px ${r$2}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":``});let e$3=this.showGroup;if(e$3){let t;for(let o$1=0;o$10){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e$3,de$1(d,this),d.length===0&&document.body.classList.remove(`v-popper--some-open`);for(let o$1 of re$2(this.theme)){let i$1=he(o$1);de$1(i$1,this),i$1.length===0&&document.body.classList.remove(`v-popper--some-open--${o$1}`)}g===this&&(g=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 G$1(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e$3=this.container;if(typeof e$3==`string`?e$3=window.document.querySelector(e$3):e$3===!1&&(e$3=this.$_targetNodes[0].parentNode),!e$3)throw Error(`No container for popover: `+this.container);e$3.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){let e$3=o$1=>{this.isShown&&!this.$_hideInProgress||(o$1.usedByTooltip=!0,!this.$_preventShow&&this.show({event:o$1}))};this.$_registerTriggerListeners(this.$_targetNodes,pe$1,this.triggers,this.showTriggers,e$3),this.$_registerTriggerListeners([this.$_popperNode],pe$1,this.popperTriggers,this.popperShowTriggers,e$3);let t=o$1=>{o$1.usedByTooltip||this.hide({event:o$1})};this.$_registerTriggerListeners(this.$_targetNodes,ae,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],ae,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e$3,t,o$1){this.$_events.push({targetNodes:e$3,eventType:t,handler:o$1}),e$3.forEach(i$1=>i$1.addEventListener(t,o$1,$$1?{passive:!0}:void 0))},$_registerTriggerListeners(e$3,t,o$1,i$1,s$1){let r$2=o$1;i$1!=null&&(r$2=typeof i$1==`function`?i$1(r$2):i$1),r$2.forEach(p$5=>{let a$2=t[p$5];a$2&&this.$_registerEventListeners(e$3,a$2,s$1)})},$_removeEventListeners(e$3){let t=[];this.$_events.forEach(o$1=>{let{targetNodes:i$1,eventType:s$1,handler:r$2}=o$1;!e$3||e$3===s$1?i$1.forEach(p$5=>p$5.removeEventListener(s$1,r$2)):t.push(o$1)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e$3,t=!1){this.$_showFrameLocked||(this.hide({event:e$3}),e$3.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$3,t){for(let o$1 of this.$_targetNodes){let i$1=o$1.getAttribute(e$3);i$1&&(o$1.removeAttribute(e$3),o$1.setAttribute(t,i$1))}},$_applyAttrsToTarget(e$3){for(let t of this.$_targetNodes)for(let o$1 in e$3){let i$1=e$3[o$1];i$1==null?t.removeAttribute(o$1):t.setAttribute(o$1,i$1)}},$_updateParentShownChildren(e$3){let t=this.parentPopper;for(;t;)e$3?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){let e$3=this.$_referenceNode.getBoundingClientRect();if(y$1>=e$3.left&&y$1<=e$3.right&&_$1>=e$3.top&&_$1<=e$3.bottom){let t=this.$_popperNode.getBoundingClientRect(),o$1=y$1-c,i$1=_$1-m$1,r$2=t.left+t.width/2-c+(t.top+t.height/2)-m$1+t.width+t.height,p$5=c+o$1*r$2,a$2=m$1+i$1*r$2;return C$1(c,m$1,p$5,a$2,t.left,t.top,t.left,t.bottom)||C$1(c,m$1,p$5,a$2,t.left,t.top,t.right,t.top)||C$1(c,m$1,p$5,a$2,t.right,t.top,t.right,t.bottom)||C$1(c,m$1,p$5,a$2,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<`u`&&typeof window<`u`){if(_e$1){let e$3=$$1?{passive:!0,capture:!0}:!0;document.addEventListener(`touchstart`,t=>ue(t,!0),e$3),document.addEventListener(`touchend`,t=>fe(t,!0),e$3)}else window.addEventListener(`mousedown`,e$3=>ue(e$3,!1),!0),window.addEventListener(`click`,e$3=>fe(e$3,!1),!0);window.addEventListener(`resize`,tt$1)}function ue(e$3,t){if(h$1.autoHideOnMousedown)Pe$1(e$3,t);else for(let o$1=0;o$1=0;i$1--){let s$1=d[i$1];try{let r$2=s$1.containsGlobalTarget=s$1.mouseDownContains||s$1.popperNode().contains(e$3.target);s$1.pendingHide=!1,requestAnimationFrame(()=>{if(s$1.pendingHide=!1,!o$1[s$1.randomId]&&ce(s$1,r$2,e$3)){if(s$1.$_handleGlobalClose(e$3,t),!e$3.closeAllPopover&&e$3.closePopover&&r$2){let a$2=s$1.parentPopper;for(;a$2;)o$1[a$2.randomId]=!0,a$2=a$2.parentPopper;return}let p$5=s$1.parentPopper;for(;p$5&&ce(p$5,p$5.containsGlobalTarget,e$3);)p$5.$_handleGlobalClose(e$3,t),p$5=p$5.parentPopper}})}catch{}}}function ce(e$3,t,o$1){return o$1.closeAllPopover||o$1.closePopover&&t||et(e$3,o$1)&&!t}function et(e$3,t){if(typeof e$3.autoHide==`function`){let o$1=e$3.autoHide(t);return e$3.lastAutoHide=o$1,o$1}return e$3.autoHide}function tt$1(){for(let e$3=0;e$3{c=y$1,m$1=_$1,y$1=e$3.clientX,_$1=e$3.clientY},$$1?{passive:!0}:void 0);function C$1(e$3,t,o$1,i$1,s$1,r$2,p$5,a$2){let l$1=((p$5-s$1)*(t-r$2)-(a$2-r$2)*(e$3-s$1))/((a$2-r$2)*(o$1-e$3)-(p$5-s$1)*(i$1-t)),u$1=((o$1-e$3)*(t-r$2)-(i$1-t)*(e$3-s$1))/((a$2-r$2)*(o$1-e$3)-(p$5-s$1)*(i$1-t));return l$1>=0&&l$1<=1&&u$1>=0&&u$1<=1}const ot$1={extends:Q$1()},B$1=(e$3,t)=>{let o$1=e$3.__vccOpts||e$3;for(let[i$1,s$1]of t)o$1[i$1]=s$1;return o$1};function it$1(e$3,t,o$1,i$1,s$1,r$2){return openBlock(),createElementBlock(`div`,{ref:`reference`,class:normalizeClass([`v-popper`,{"v-popper--shown":e$3.slotData.isShown}])},[renderSlot(e$3.$slots,`default`,normalizeProps(guardReactiveProps(e$3.slotData)))],2)}const st$2=B$1(ot$1,[[`render`,it$1]]);function nt$1(){var e$3=window.navigator.userAgent,t=e$3.indexOf(`MSIE `);if(t>0)return parseInt(e$3.substring(t+5,e$3.indexOf(`.`,t)),10);var o$1=e$3.indexOf(`Trident/`);if(o$1>0){var i$1=e$3.indexOf(`rv:`);return parseInt(e$3.substring(i$1+3,e$3.indexOf(`.`,i$1)),10)}var s$1=e$3.indexOf(`Edge/`);return s$1>0?parseInt(e$3.substring(s$1+5,e$3.indexOf(`.`,s$1)),10):-1}let z$1;function X(){X.init||(X.init=!0,z$1=nt$1()!==-1)}var E={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){X(),nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e$3=document.createElement(`object`);this._resizeObject=e$3,e$3.setAttribute(`aria-hidden`,`true`),e$3.setAttribute(`tabindex`,-1),e$3.onload=this.addResizeHandlers,e$3.type=`text/html`,z$1&&this.$el.appendChild(e$3),e$3.data=`about:blank`,z$1||this.$el.appendChild(e$3)},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&&(!z$1&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const rt$3=withScopeId(`data-v-b329ee4c`);pushScopeId(`data-v-b329ee4c`);const pt$2={class:`resize-observer`,tabindex:`-1`};popScopeId();const at$1=rt$3((e$3,t,o$1,i$1,s$1,r$2)=>(openBlock(),createBlock(`div`,pt$2)));E.render=at$1,E.__scopeId=`data-v-b329ee4c`,E.__file=`src/components/ResizeObserver.vue`;const Z=(e$3=`theme`)=>({computed:{themeClass(){return Ze(this[e$3])}}}),dt$3=defineComponent({name:`VPopperContent`,components:{ResizeObserver:E},mixins:[Z()],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$3){return e$3!=null&&!isNaN(e$3)?`${e$3}px`:null}}}),lt=[`id`,`aria-hidden`,`tabindex`,`data-popper-placement`],ht$2={ref:`inner`,class:`v-popper__inner`},ut$2=createBaseVNode(`div`,{class:`v-popper__arrow-outer`},null,-1),ft$2=createBaseVNode(`div`,{class:`v-popper__arrow-inner`},null,-1),ct$2=[ut$2,ft$2];function mt$1(e$3,t,o$1,i$1,s$1,r$2){let p$5=resolveComponent(`ResizeObserver`);return openBlock(),createElementBlock(`div`,{id:e$3.popperId,ref:`popover`,class:normalizeClass([`v-popper__popper`,[e$3.themeClass,e$3.classes.popperClass,{"v-popper__popper--shown":e$3.shown,"v-popper__popper--hidden":!e$3.shown,"v-popper__popper--show-from":e$3.classes.showFrom,"v-popper__popper--show-to":e$3.classes.showTo,"v-popper__popper--hide-from":e$3.classes.hideFrom,"v-popper__popper--hide-to":e$3.classes.hideTo,"v-popper__popper--skip-transition":e$3.skipTransition,"v-popper__popper--arrow-overflow":e$3.result&&e$3.result.arrow.overflow,"v-popper__popper--no-positioning":!e$3.result}]]),style:normalizeStyle(e$3.result?{position:e$3.result.strategy,transform:`translate3d(${Math.round(e$3.result.x)}px,${Math.round(e$3.result.y)}px,0)`}:void 0),"aria-hidden":e$3.shown?`false`:`true`,tabindex:e$3.autoHide?0:void 0,"data-popper-placement":e$3.result?e$3.result.placement:void 0,onKeyup:t[2]||=withKeys(a$2=>e$3.autoHide&&e$3.$emit(`hide`),[`esc`])},[createBaseVNode(`div`,{class:`v-popper__backdrop`,onClick:t[0]||=a$2=>e$3.autoHide&&e$3.$emit(`hide`)}),createBaseVNode(`div`,{class:`v-popper__wrapper`,style:normalizeStyle(e$3.result?{transformOrigin:e$3.result.transformOrigin}:void 0)},[createBaseVNode(`div`,ht$2,[e$3.mounted?(openBlock(),createElementBlock(Fragment,{key:0},[createBaseVNode(`div`,null,[renderSlot(e$3.$slots,`default`)]),e$3.handleResize?(openBlock(),createBlock(p$5,{key:0,onNotify:t[1]||=a$2=>e$3.$emit(`resize`,a$2)})):createCommentVNode(``,!0)],64)):createCommentVNode(``,!0)],512),createBaseVNode(`div`,{ref:`arrow`,class:`v-popper__arrow-container`,style:normalizeStyle(e$3.result?{left:e$3.toPx(e$3.result.arrow.x),top:e$3.toPx(e$3.result.arrow.y)}:void 0)},ct$2,4)],4)],46,lt)}const ee$1=B$1(dt$3,[[`render`,mt$1]]),te$1={methods:{show(...e$3){return this.$refs.popper.show(...e$3)},hide(...e$3){return this.$refs.popper.hide(...e$3)},dispose(...e$3){return this.$refs.popper.dispose(...e$3)},onResize(...e$3){return this.$refs.popper.onResize(...e$3)}}};let K=function(){};typeof window<`u`&&(K=window.Element);const gt$1=defineComponent({name:`VPopperWrapper`,components:{Popper:st$2,PopperContent:ee$1},mixins:[te$1,Z(`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,K,Boolean],default:void 0},boundary:{type:[String,K],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$3=>!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$3=>e$3!==this.$refs.popperContent.$el)}}});function wt$2(e$3,t,o$1,i$1,s$1,r$2){let p$5=resolveComponent(`PopperContent`),a$2=resolveComponent(`Popper`);return openBlock(),createBlock(a$2,mergeProps({ref:`popper`},e$3.$props,{theme:e$3.finalTheme,"target-nodes":e$3.getTargetNodes,"popper-node":()=>e$3.$refs.popperContent.$el,class:[e$3.themeClass],onShow:t[0]||=()=>e$3.$emit(`show`),onHide:t[1]||=()=>e$3.$emit(`hide`),"onUpdate:shown":t[2]||=l$1=>e$3.$emit(`update:shown`,l$1),onApplyShow:t[3]||=()=>e$3.$emit(`apply-show`),onApplyHide:t[4]||=()=>e$3.$emit(`apply-hide`),onCloseGroup:t[5]||=()=>e$3.$emit(`close-group`),onCloseDirective:t[6]||=()=>e$3.$emit(`close-directive`),onAutoHide:t[7]||=()=>e$3.$emit(`auto-hide`),onResize:t[8]||=()=>e$3.$emit(`resize`)}),{default:withCtx(({popperId:l$1,isShown:u$1,shouldMountContent:L$1,skipTransition:D$1,autoHide:I,show:F$2,hide:v$2,handleResize:R$3,onResize:j$1,classes:V$2,result:Ee$2})=>[renderSlot(e$3.$slots,`default`,{shown:u$1,show:F$2,hide:v$2}),createVNode(p$5,{ref:`popperContent`,"popper-id":l$1,theme:e$3.finalTheme,shown:u$1,mounted:L$1,"skip-transition":D$1,"auto-hide":I,"handle-resize":R$3,classes:V$2,result:Ee$2,onHide:v$2,onResize:j$1},{default:withCtx(()=>[renderSlot(e$3.$slots,`popper`,{shown:u$1,hide:v$2})]),_: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 k=B$1(gt$1,[[`render`,wt$2]]),Se$1={...k,name:`VDropdown`,vPopperTheme:`dropdown`},be={...k,name:`VMenu`,vPopperTheme:`menu`},Ce$1={...k,name:`VTooltip`,vPopperTheme:`tooltip`},$t$2=defineComponent({name:`VTooltipDirective`,components:{Popper:Q$1(),PopperContent:ee$1},mixins:[te$1],inheritAttrs:!1,props:{theme:{type:String,default:`tooltip`},html:{type:Boolean,default:e$3=>S(e$3.theme,`html`)},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e$3=>S(e$3.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$3){if(typeof this.content==`function`&&this.$_isShown&&(e$3||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;let t=++this.$_fetchId,o$1=this.content(this);o$1.then?o$1.then(i$1=>this.onResult(t,i$1)):this.onResult(t,o$1)}},onResult(e$3,t){e$3===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),vt$2=[`innerHTML`],yt$2=[`textContent`];function _t$2(e$3,t,o$1,i$1,s$1,r$2){let p$5=resolveComponent(`PopperContent`),a$2=resolveComponent(`Popper`);return openBlock(),createBlock(a$2,mergeProps({ref:`popper`},e$3.$attrs,{theme:e$3.theme,"target-nodes":e$3.targetNodes,"popper-node":()=>e$3.$refs.popperContent.$el,onApplyShow:e$3.onShow,onApplyHide:e$3.onHide}),{default:withCtx(({popperId:l$1,isShown:u$1,shouldMountContent:L$1,skipTransition:D$1,autoHide:I,hide:F$2,handleResize:v$2,onResize:R$3,classes:j$1,result:V$2})=>[createVNode(p$5,{ref:`popperContent`,class:normalizeClass({"v-popper--tooltip-loading":e$3.loading}),"popper-id":l$1,theme:e$3.theme,shown:u$1,mounted:L$1,"skip-transition":D$1,"auto-hide":I,"handle-resize":v$2,classes:j$1,result:V$2,onHide:F$2,onResize:R$3},{default:withCtx(()=>[e$3.html?(openBlock(),createElementBlock(`div`,{key:0,innerHTML:e$3.finalContent},null,8,vt$2)):(openBlock(),createElementBlock(`div`,{key:1,textContent:toDisplayString(e$3.finalContent)},null,8,yt$2))]),_: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 ze=B$1($t$2,[[`render`,_t$2]]),Ae=`v-popper--has-tooltip`;function Tt$2(e$3,t){let o$1=e$3.placement;if(!o$1&&t)for(let i$1 of Te$2)t[i$1]&&(o$1=i$1);return o$1||=S(e$3.theme||`tooltip`,`placement`),o$1}function Ne(e$3,t,o$1){let i$1,s$1=typeof t;return i$1=s$1===`string`?{content:t}:t&&s$1===`object`?t:{content:!1},i$1.placement=Tt$2(i$1,o$1),i$1.targetNodes=()=>[e$3],i$1.referenceNode=()=>e$3,i$1}let x$1,b$1,Pt$1=0;function St$2(){if(x$1)return;b$1=ref([]),x$1=createApp({name:`VTooltipDirectiveApp`,setup(){return{directives:b$1}},render(){return this.directives.map(t=>h(ze,{...t.options,shown:t.shown||t.options.shown,key:t.id}))},devtools:{hide:!0}});let e$3=document.createElement(`div`);document.body.appendChild(e$3),x$1.mount(e$3)}function bt$2(e$3,t,o$1){St$2();let i$1=ref(Ne(e$3,t,o$1)),s$1=ref(!1),r$2={id:Pt$1++,options:i$1,shown:s$1};return b$1.value.push(r$2),e$3.classList&&e$3.classList.add(Ae),e$3.$_popper={options:i$1,item:r$2,show(){s$1.value=!0},hide(){s$1.value=!1}}}function He$1(e$3){if(e$3.$_popper){let t=b$1.value.indexOf(e$3.$_popper.item);t!==-1&&b$1.value.splice(t,1),delete e$3.$_popper,delete e$3.$_popperOldShown,delete e$3.$_popperMountTarget}e$3.classList&&e$3.classList.remove(Ae)}function me$1(e$3,{value:t,modifiers:o$1}){let i$1=Ne(e$3,t,o$1);if(!i$1.content||S(i$1.theme||`tooltip`,`disabled`))He$1(e$3);else{let s$1;e$3.$_popper?(s$1=e$3.$_popper,s$1.options.value=i$1):s$1=bt$2(e$3,t,o$1),typeof t.shown<`u`&&t.shown!==e$3.$_popperOldShown&&(e$3.$_popperOldShown=t.shown,t.shown?s$1.show():s$1.hide())}}const oe={beforeMount:me$1,updated:me$1,beforeUnmount(e$3){He$1(e$3)}};function ge$1(e$3){e$3.addEventListener(`mousedown`,H$1),e$3.addEventListener(`click`,H$1),e$3.addEventListener(`touchstart`,Oe$1,$$1?{passive:!0}:!1)}function we$1(e$3){e$3.removeEventListener(`mousedown`,H$1),e$3.removeEventListener(`click`,H$1),e$3.removeEventListener(`touchstart`,Oe$1),e$3.removeEventListener(`touchend`,Me),e$3.removeEventListener(`touchcancel`,Be$1)}function H$1(e$3){let t=e$3.currentTarget;e$3.closePopover=!t.$_vclosepopover_touch,e$3.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function Oe$1(e$3){if(e$3.changedTouches.length===1){let t=e$3.currentTarget;t.$_vclosepopover_touch=!0;let o$1=e$3.changedTouches[0];t.$_vclosepopover_touchPoint=o$1,t.addEventListener(`touchend`,Me),t.addEventListener(`touchcancel`,Be$1)}}function Me(e$3){let t=e$3.currentTarget;if(t.$_vclosepopover_touch=!1,e$3.changedTouches.length===1){let o$1=e$3.changedTouches[0],i$1=t.$_vclosepopover_touchPoint;e$3.closePopover=Math.abs(o$1.screenY-i$1.screenY)<20&&Math.abs(o$1.screenX-i$1.screenX)<20,e$3.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function Be$1(e$3){let t=e$3.currentTarget;t.$_vclosepopover_touch=!1}const ie$1={beforeMount(e$3,{value:t,modifiers:o$1}){e$3.$_closePopoverModifiers=o$1,(typeof t>`u`||t)&&ge$1(e$3)},updated(e$3,{value:t,oldValue:o$1,modifiers:i$1}){e$3.$_closePopoverModifiers=i$1,t!==o$1&&(typeof t>`u`||t?ge$1(e$3):we$1(e$3))},beforeUnmount(e$3){we$1(e$3)}},Ht$1=h$1,Ot$2=oe,Mt$1=oe,Bt$2=ie$1,Et=ie$1,kt$1=Se$1,Lt$1=be,Dt$2=Q$1,It$1=ee$1,Ft$1=te$1,Rt$1=k,jt$1=Z,Vt$1=Ce$1,Wt$1=ze,_hoisted_1$27={class:`flex-1 truncate`},_hoisted_2$17={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 dark:bg-neutral-900`};var Select_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Select`,props:mergeModels({options:{},placeholder:{},disabled:{type:Boolean},title:{},layout:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,show=ref(!1),modelValue=useModel(__props,`modelValue`);function selectOption(value$1){modelValue.value=value$1}function handleHide(){show.value=!1}return provide(`selectOption`,selectOption),provide(`hide`,handleHide),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(kt$1),{"auto-size":``,"auto-boundary-max-size":``,"w-full":``},{popper:withCtx(({hide:hide$2})=>[createBaseVNode(`div`,_hoisted_2$17,[renderSlot(_ctx.$slots,`options`,{hide:hide$2},()=>[props.options&&props.options.length?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(props.options,option$1=>(openBlock(),createBlock(Option_default,{key:option$1.value,value:option$1.value,label:option$1.label,active:modelValue.value===option$1.value,onClick:$event=>{selectOption(option$1.value),hide$2()}},null,8,[`value`,`label`,`active`,`onClick`]))),128)):createCommentVNode(``,!0)])])]),default:withCtx(()=>[createBaseVNode(`div`,{"min-w":`[160px]`,p:`2.5`,"w-full":``,class:normalizeClass([`focus:ring-2 focus:ring-black/10`,[props.disabled?`pointer-events-none`:``]]),border:`~ 2 solid dark:neutral-800`,text:`xs dark:neutral-200 disabled:neutral-400 dark:disabled:neutral-600 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":``},[createBaseVNode(`div`,_hoisted_1$27,[renderSlot(_ctx.$slots,`default`,{value:modelValue.value},()=>[createTextVNode(toDisplayString(props.options?.find(item=>item.value===modelValue.value)?.label||modelValue.value),1)])]),_cache$1[0]||=createBaseVNode(`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}))}}),Select_default=Select_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$26={op50:``};var Collapsable_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Collapsable`,props:mergeModels({default:{type:Boolean},label:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,visible=useModel(__props,`modelValue`);watchEffect(()=>{props.default!=null&&(visible.value=!!props.default)});function setVisible(value$1){return visible.value=value$1,value$1}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,null,[renderSlot(_ctx.$slots,`trigger`,normalizeProps(guardReactiveProps({visible:visible.value,setVisible})),()=>[createBaseVNode(`button`,{sticky:``,"top-0":``,"z-10":``,flex:``,"items-center":``,"justify-between":``,px2:``,py1:``,"text-sm":``,"backdrop-blur-xl":``,onClick:_cache$1[0]||=$event=>visible.value=!visible.value},[createBaseVNode(`span`,null,toDisplayString(props.label??`Collapsable`),1),_cache$1[1]||=createTextVNode(),createBaseVNode(`span`,_hoisted_1$26,toDisplayString(visible.value?`▲`:`▼`),1)])]),createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[visible.value?renderSlot(_ctx.$slots,`default`,normalizeProps(mergeProps({key:0},{visible:visible.value,setVisible}))):createCommentVNode(``,!0)]),_:3})]))}}),Collapsable_default=Collapsable_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$25=[`onClick`],_hoisted_2$16={flex:``,"items-center":``,"gap-1.5":``};var Section_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Section`,props:{title:{},icon:{},innerClass:{},expand:{type:Boolean,default:!0}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(Collapsable_default,{default:_ctx.expand},{trigger:withCtx(slotProps=>[createBaseVNode(`button`,{class:`w-full flex items-center justify-between rounded-lg px-3 py-2 outline-none transition-all duration-250 ease-in-out sm:px-4 sm:py-3`,text:`neutral-600 dark:neutral-400 sm sm:base`,bg:`neutral-100 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,onClick:$event=>slotProps.setVisible(!slotProps.visible)},[createBaseVNode(`div`,_hoisted_2$16,[createBaseVNode(`div`,{class:normalizeClass(_ctx.icon),"size-6":``},null,2),createTextVNode(` `+toDisplayString(_ctx.title),1)]),createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``,transition:`transform duration-250`,class:normalizeClass({"rotate-180":slotProps.visible})},null,2)],8,_hoisted_1$25)]),default:withCtx(()=>[createBaseVNode(`div`,{grid:``,"gap-2":``,"p-4":``,class:normalizeClass(_ctx.innerClass)},[renderSlot(_ctx.$slots,`default`)],2)]),_:3},8,[`default`]))}}),Section_default=Section_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$24={"z-1":``,"flex-1":``},_hoisted_2$15={"text-lg":``,"font-normal":``,class:`menu-icon-item-title`,transition:`all ease-in-out duration-400`},_hoisted_3$11={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-item-description`,transition:`all ease-in-out duration-400`};var IconItem_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`IconItem`,props:{title:{},description:{},icon:{},iconTemplate:{type:Boolean},to:{}},setup(__props){return(_ctx,_cache$1)=>{let _component_RouterLink=resolveComponent(`RouterLink`);return openBlock(),createBlock(_component_RouterLink,{box:`border`,flex:`~ row`,bg:`neutral-50 dark:neutral-900`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-item`,transition:`all ease-in-out duration-400`,relative:``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,cursor:`pointer`,to:_ctx.to},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$24,[createBaseVNode(`div`,_hoisted_2$15,toDisplayString(_ctx.title),1),createBaseVNode(`div`,_hoisted_3$11,[createBaseVNode(`span`,null,toDisplayString(_ctx.description),1)])]),typeof _ctx.icon==`string`?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`menu-icon-item-icon`,[_ctx.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-24":``,"translate-y-4":``,text:`neutral-400/50 dark:neutral-600/50`},null,2)):createCommentVNode(``,!0),_ctx.iconTemplate?renderSlot(_ctx.$slots,`icon`,{key:1},void 0,!0):createCommentVNode(``,!0)]),_:3},8,[`to`])}}}),IconItem_default=__plugin_vue_export_helper_default(IconItem_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-d08788bb`]]);const _hoisted_1$23={flex:`~ col`,bg:`neutral-50 dark:neutral-800`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-status-item`,transition:`all ease-in-out duration-400`,"w-full":``,"cursor-pointer":``,"of-hidden":``,"rounded-xl":``},_hoisted_2$14={"z-1":``,"flex-1":``},_hoisted_3$10={"text-lg":``,"font-normal":``,class:`menu-icon-status-item-title`,transition:`all ease-in-out duration-400`},_hoisted_4$9={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-status-item-description`,transition:`all ease-in-out duration-400`},_hoisted_5$8=[`src`],_hoisted_6$7={"p-2":``},_hoisted_7$6={key:0,"size-3":``,bg:`green-500 dark:green-600`,"rounded-full":``},_hoisted_8$5={key:1,"size-3":``,bg:`neutral-400 dark:neutral-500`,"rounded-full":``};var IconStatusItem_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`IconStatusItem`,props:{title:{},description:{},icon:{},iconColor:{},iconImage:{},to:{},configured:{type:Boolean}},setup(__props){let props=__props;return(_ctx,_cache$1)=>{let _component_RouterLink=resolveComponent(`RouterLink`);return openBlock(),createElementBlock(`div`,_hoisted_1$23,[createVNode(_component_RouterLink,{flex:`~ row`,class:`menu-icon-status-item-link`,bg:`white dark:neutral-900`,transition:`all ease-in-out duration-400`,relative:``,"h-full":``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,to:props.to},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_2$14,[createBaseVNode(`div`,_hoisted_3$10,toDisplayString(props.title),1),createBaseVNode(`div`,_hoisted_4$9,[createBaseVNode(`span`,null,toDisplayString(props.description||``),1)])]),props.icon?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`menu-icon-status-item-icon`,[props.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):createCommentVNode(``,!0),props.iconColor?(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`menu-icon-status-item-icon-color`,[props.iconColor]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):createCommentVNode(``,!0),props.iconImage?(openBlock(),createElementBlock(`img`,{key:2,src:props.iconImage,class:`menu-icon-status-item-icon-image`,transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,"grayscale-100":``},null,8,_hoisted_5$8)):createCommentVNode(``,!0)]),_:1},8,[`to`]),createBaseVNode(`div`,_hoisted_6$7,[props.configured?(openBlock(),createElementBlock(`div`,_hoisted_7$6)):(openBlock(),createElementBlock(`div`,_hoisted_8$5))])])}}}),IconStatusItem_default=__plugin_vue_export_helper_default(IconStatusItem_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-93a9757f`]]);const _hoisted_1$22=[`checked`,`name`,`value`],_hoisted_2$13={class:`relative mr-3 mt-0.5 flex-shrink-0`},_hoisted_3$9={class:`w-full flex flex-col gap-2`},_hoisted_4$8={class:`flex items-center`},_hoisted_5$7={key:0,class:`relative`},_hoisted_6$6=[`title`],_hoisted_7$5={key:1,class:`mt-2`};var RadioCardDetail_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardDetail`,props:mergeModels({id:{},name:{},value:{},title:{},description:{},deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:``},customInputPlaceholder:{default:``},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`),isExpanded=ref(!1);function toggleExpansion(){isExpanded.value=!isExpanded.value}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{key:_ctx.id,class:normalizeClass([`form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]`,[modelValue.value===_ctx.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,modelValue.value===_ctx.value?`form_radio-card-detail-active`:``,_ctx.deprecated?`opacity-60`:``]]),transition:`all duration-200 ease-in-out`,border:`2 solid`},[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,checked:modelValue.value===_ctx.value,type:`radio`,name:_ctx.name,value:_ctx.value,class:`absolute opacity-0`},null,8,_hoisted_1$22),[[vModelRadio,modelValue.value]]),createBaseVNode(`div`,_hoisted_2$13,[createBaseVNode(`div`,{class:normalizeClass([`size-5 border-2 rounded-full transition-colors duration-200`,[modelValue.value===_ctx.value?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[createBaseVNode(`div`,{class:normalizeClass([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[modelValue.value===_ctx.value?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),createBaseVNode(`div`,_hoisted_3$9,[createBaseVNode(`div`,_hoisted_4$8,[createBaseVNode(`span`,{class:normalizeClass([`line-clamp-1 font-normal`,[modelValue.value===_ctx.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},toDisplayString(_ctx.title),3)]),_ctx.description?(openBlock(),createElementBlock(`div`,_hoisted_5$7,[createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[!isExpanded.value||!_ctx.showExpandCollapse?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`line-clamp-2 cursor-pointer text-xs`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),title:_ctx.description,onClick:withModifiers(toggleExpansion,[`prevent`])},toDisplayString(_ctx.description),11,_hoisted_6$6)):(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`cursor-pointer text-xs`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),onClick:withModifiers(toggleExpansion,[`prevent`])},toDisplayString(_ctx.description),3))]),_:1}),_ctx.showExpandCollapse&&_ctx.description.length>_ctx.expandCollapseThreshold?(openBlock(),createElementBlock(`button`,{key:0,class:`mt-0.5 inline-flex items-center text-xs text-primary-500 dark:text-primary-600`,onClick:withModifiers(toggleExpansion,[`prevent`])},[createBaseVNode(`span`,null,toDisplayString(isExpanded.value?`Show less`:`Show more`),1),createBaseVNode(`div`,{class:normalizeClass([{"rotate-180":isExpanded.value},`transition-transform duration-200`])},_cache$1[2]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``,"ml-0.5":``,"text-xs":``},null,-1)],2)])):createCommentVNode(``,!0)])):createCommentVNode(``,!0),_ctx.showCustomInput&&modelValue.value===_ctx.value?(openBlock(),createElementBlock(`div`,_hoisted_7$5,[createVNode(unref(Input_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:_ctx.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0)])],2))}}),RadioCardDetail_default=__plugin_vue_export_helper_default(RadioCardDetail_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fb6236db`]]);const _hoisted_1$21={class:`radio-card-detail-many-select`},_hoisted_2$12={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},_hoisted_3$8=[`placeholder`],_hoisted_4$7={class:`mt-4 space-y-2`},_hoisted_5$6={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},_hoisted_6$5={key:1,class:`flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},_hoisted_7$4={class:`flex flex-col`},_hoisted_8$4={class:`font-medium`},_hoisted_9$4={class:`text-sm text-amber-600 dark:text-amber-400`},_hoisted_10$4={class:`relative`};var RadioCardManySelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardManySelect`,props:mergeModels({items:{},searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search...`},searchNoResultsTitle:{default:`No results found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} results`},customInputPlaceholder:{default:`Enter custom value`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},showMore:{type:Boolean,default:!0},listClass:{default:``}},{modelValue:{required:!0},modelModifiers:{}}),emits:mergeModels([`update:customValue`],[`update:modelValue`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,modelValue=useModel(__props,`modelValue`),searchQuery=ref(``),isListExpanded=ref(!1),customValue=ref(``),filteredItems=computed(()=>{if(!searchQuery.value)return props.items;let query=searchQuery.value.toLowerCase();return props.items.filter(item=>item.name.toLowerCase().includes(query)||item.description&&item.description.toLowerCase().includes(query))});function updateCustomValue(value$1){customValue.value=value$1,emit$1(`update:customValue`,value$1)}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$21,[_ctx.searchable?(openBlock(),createElementBlock(`div`,_hoisted_2$12,[_cache$1[4]||=createBaseVNode(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[createBaseVNode(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>searchQuery.value=$event,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:_ctx.searchPlaceholder},null,8,_hoisted_3$8),[[vModelText,searchQuery.value]])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$7,[searchQuery.value?(openBlock(),createElementBlock(`div`,_hoisted_5$6,toDisplayString(_ctx.searchResultsText.replace(`{count}`,filteredItems.value.length.toString()).replace(`{total}`,_ctx.items.length.toString())),1)):createCommentVNode(``,!0),searchQuery.value&&filteredItems.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_6$5,[_cache$1[5]||=createBaseVNode(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),createBaseVNode(`div`,_hoisted_7$4,[createBaseVNode(`span`,_hoisted_8$4,toDisplayString(_ctx.searchNoResultsTitle),1),createBaseVNode(`span`,_hoisted_9$4,toDisplayString(_ctx.searchNoResultsDescription.replace(`{query}`,searchQuery.value)),1)])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_10$4,[createBaseVNode(`div`,{class:normalizeClass([`grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto pb-4 scrollbar-none`,[isListExpanded.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``,...props.listClass?typeof props.listClass==`string`?[props.listClass]:props.listClass:[`max-h-[calc(100dvh-7lh)]`]]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredItems.value,item=>(openBlock(),createBlock(RadioCardDetail_default,{id:item.id,key:item.id,modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,value:item.id,title:item.name,description:item.description,deprecated:item.deprecated,"show-expand-collapse":_ctx.showMore,"expand-collapse-threshold":100,"show-custom-input":item.customizable,"custom-input-value":customValue.value,"custom-input-placeholder":_ctx.customInputPlaceholder,name:`radio-card-detail-many-select`,class:`scroll-snap-align-start`,"onUpdate:customInputValue":_cache$1[2]||=$event=>updateCustomValue($event)},null,8,[`id`,`modelValue`,`value`,`title`,`description`,`deprecated`,`show-expand-collapse`,`show-custom-input`,`custom-input-value`,`custom-input-placeholder`]))),128))],2),createBaseVNode(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:normalizeClass([isListExpanded.value?`w-full`:`mt-4 w-full rounded-lg`])},[createBaseVNode(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:normalizeClass([isListExpanded.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:_cache$1[3]||=$event=>isListExpanded.value=!isListExpanded.value},[createBaseVNode(`span`,null,toDisplayString(isListExpanded.value?_ctx.collapseButtonText:_ctx.expandButtonText),1),createBaseVNode(`div`,{class:normalizeClass([isListExpanded.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-linear":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),RadioCardManySelect_default=__plugin_vue_export_helper_default(RadioCardManySelect_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-96e8e411`]]);const _hoisted_1$20=[`checked`,`name`,`value`],_hoisted_2$11={flex:`~ col`,"min-h-16":``,"w-full":``,"items-start":``,"justify-center":``,"pb-2":``,"pl-5":``,"pr-4":``,"pt-2":``};var RadioCardSimple_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardSimple`,props:mergeModels({id:{},name:{},value:{},title:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{key:_ctx.id,border:`2px solid`,class:normalizeClass([`form_radio-card-simple relative`,[modelValue.value===_ctx.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,modelValue.value===_ctx.value?`form_radio-card-simple-active`:``]]),transition:`all duration-200 ease-in-out`,flex:`~ col`,block:``,"min-w-50":``,"w-fit":``,"cursor-pointer":``,"items-start":``,"rounded-xl":``,"p-4":``,"text-left":``},[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,checked:modelValue.value===_ctx.value,type:`radio`,name:_ctx.name,value:_ctx.value,class:`absolute opacity-0 [&:checked+div]:border-primary-500 [&:checked+div_.radio-dot]:opacity-100 dark:[&:checked+div]:border-primary-400`},null,8,_hoisted_1$20),[[vModelRadio,modelValue.value]]),_cache$1[1]||=createBaseVNode(`div`,{class:`radio-circle absolute left-2 top-2 size-5 rounded-full`,border:`2 solid neutral-300 dark:neutral-600`,transition:`all duration-200 ease-in-out`},[createBaseVNode(`div`,{class:`radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2`,transition:`all duration-200 ease-in-out`,bg:`primary-500 dark:primary-400`})],-1),createBaseVNode(`div`,_hoisted_2$11,[createBaseVNode(`span`,{class:normalizeClass([`radio-item-name font-normal`,[modelValue.value===_ctx.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-500 dark:text-neutral-500`]]),text:`md`,transition:`all duration-200 ease-in-out`},toDisplayString(_ctx.title),3),_ctx.description?(openBlock(),createElementBlock(`span`,{key:0,class:normalizeClass([`radio-item-description`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-400 dark:text-neutral-600`]]),transition:`all duration-200 ease-in-out`},toDisplayString(_ctx.description),3)):createCommentVNode(``,!0)]),_cache$1[2]||=createBaseVNode(`div`,{class:`bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20`,absolute:``,"inset-0":``,"z--1":``,style:{"background-size":`10px 10px`,"mask-image":`linear-gradient(165deg, white 30%, transparent 50%)`}},null,-1)],2))}}),RadioCardSimple_default=__plugin_vue_export_helper_default(RadioCardSimple_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-880ce73f`]]);const _hoisted_1$19={class:`p-3`},_hoisted_2$10={class:`flex items-start`},_hoisted_3$7=[`checked`,`name`,`value`],_hoisted_4$6={class:`relative mr-3 mt-0.5 flex-shrink-0`},_hoisted_5$5={key:0,class:`i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},_hoisted_6$4={key:1,class:`i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},_hoisted_7$3={key:1,class:`mt-auto w-full flex items-center justify-center bg-neutral-50 py-3 text-xs text-neutral-400 italic dark:bg-neutral-800/50 dark:text-neutral-600`},_hoisted_8$3={class:`flex-1 cursor-pointer`},_hoisted_9$3={class:`flex items-center`},_hoisted_10$3={key:0,class:`mt-1 flex flex-wrap gap-1`},_hoisted_11$2={key:1,class:`mt-3`},_hoisted_12$2={relative:``},_hoisted_13$2={key:0,class:`h-16 px-3 pb-2`};var VoiceCard_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`VoiceCard`,props:mergeModels({name:{},voice:{},currentlyPlayingId:{},customInputPlaceholder:{default:`Enter custom voice name`},showVisualizer:{type:Boolean,default:!0},audioStream:{default:null}},{"voice-id":{required:!1,default:``},"voice-idModifiers":{},"custom-voice-name":{required:!1,default:``},"custom-voice-nameModifiers":{}}),emits:mergeModels([`togglePlayback`],[`update:voice-id`,`update:custom-voice-name`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,voiceId=useModel(__props,`voice-id`),customVoiceName=useModel(__props,`custom-voice-name`);function getPreviewUrl(voice){return voice.previewURL||voice.preview_audio_url}function formatVoiceAttributes(voice){let attributes=[];if(voice.labels?.gender&&attributes.push(voice.labels.gender),voice.labels?.age&&attributes.push(voice.labels.age),voice.labels?.accent&&attributes.push(voice.labels.accent),voice.languages&&voice.languages.length>0){let languageNames=voice.languages.map(lang=>lang.name).join(`, `);attributes.push(languageNames)}return attributes}function togglePlayback(){emit$1(`togglePlayback`,props.voice)}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{border:`2px solid`,class:normalizeClass([`scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl`,[voiceId.value===props.voice.id?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,voiceId.value===props.voice.id?`form_voice-card-active`:``]]),transition:`all duration-200 ease-in-out`},[createBaseVNode(`div`,_hoisted_1$19,[createBaseVNode(`div`,_hoisted_2$10,[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>voiceId.value=$event,checked:voiceId.value===props.voice.id,type:`radio`,name:_ctx.name,value:props.voice.id,class:`absolute cursor-pointer opacity-0`},null,8,_hoisted_3$7),[[vModelRadio,voiceId.value]]),createBaseVNode(`div`,_hoisted_4$6,[createBaseVNode(`div`,{class:normalizeClass([`size-5 border-2 rounded-full transition-colors duration-200`,[voiceId.value===props.voice.id?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[createBaseVNode(`div`,{class:normalizeClass([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[voiceId.value===props.voice.id?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),getPreviewUrl(_ctx.voice)?(openBlock(),createElementBlock(`button`,{key:0,absolute:``,"right-0":``,top:`0`,"z-3":``,class:normalizeClass([`translate-x-[-50%] translate-y-[50%]`,[_ctx.currentlyPlayingId===_ctx.voice.id?`text-white dark:text-white`:``]]),onClick:togglePlayback},[_ctx.currentlyPlayingId===_ctx.voice.id?(openBlock(),createElementBlock(`div`,_hoisted_5$5)):(openBlock(),createElementBlock(`div`,_hoisted_6$4))],2)):(openBlock(),createElementBlock(`div`,_hoisted_7$3,` No preview available `)),createBaseVNode(`div`,_hoisted_8$3,[createBaseVNode(`div`,_hoisted_9$3,[createBaseVNode(`span`,{class:normalizeClass([`line-clamp-1 font-medium`,[voiceId.value===_ctx.voice.id?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},toDisplayString(_ctx.voice.name),3)]),formatVoiceAttributes(_ctx.voice).length>0?(openBlock(),createElementBlock(`div`,_hoisted_10$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(formatVoiceAttributes(_ctx.voice),(attribute,attrIndex)=>(openBlock(),createElementBlock(`span`,{key:attrIndex,class:normalizeClass([`inline-flex items-center rounded-md px-1.5 py-0.5 text-xs`,[voiceId.value===_ctx.voice.id?`bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400`:`bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300`]])},toDisplayString(attribute),3))),128))])):createCommentVNode(``,!0),_ctx.voice.customizable&&voiceId.value===_ctx.voice.id?(openBlock(),createElementBlock(`div`,_hoisted_11$2,[createVNode(unref(Input_default),{modelValue:customVoiceName.value,"onUpdate:modelValue":_cache$1[1]||=$event=>customVoiceName.value=$event,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:_ctx.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),_ctx.voice.description?(openBlock(),createElementBlock(`div`,{key:2,class:normalizeClass([`line-clamp-2 mt-1 text-xs`,[voiceId.value===_ctx.voice.id?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]])},toDisplayString(_ctx.voice.description),3)):createCommentVNode(``,!0)])])]),createBaseVNode(`div`,_hoisted_12$2,[createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[_ctx.showVisualizer&&_ctx.currentlyPlayingId===_ctx.voice.id&&_ctx.audioStream?(openBlock(),createElementBlock(`div`,_hoisted_13$2,[createVNode(unref(AudioSpectrum_default),{stream:_ctx.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:withCtx(({frequencies})=>[createVNode(unref(AudioSpectrumVisualizer_default),{frequencies,"bars-class":voiceId.value===_ctx.voice.id?`bg-primary-500 dark:bg-primary-400`:`bg-neutral-400 dark:bg-neutral-600`},null,8,[`frequencies`,`bars-class`])]),_:1},8,[`stream`])])):createCommentVNode(``,!0)]),_:1})])],2))}}),VoiceCard_default=__plugin_vue_export_helper_default(VoiceCard_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fd4023c4`]]);const _hoisted_1$18={class:`voice-preview-player`},_hoisted_2$9={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},_hoisted_3$6=[`placeholder`],_hoisted_4$5={class:`mt-4 space-y-2`},_hoisted_5$4={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},_hoisted_6$3={key:1,class:`flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},_hoisted_7$2={class:`flex flex-col`},_hoisted_8$2={class:`font-medium`},_hoisted_9$2={class:`text-sm text-amber-600 dark:text-amber-400`},_hoisted_10$2={class:`relative`};var VoiceCardManySelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`VoiceCardManySelect`,props:mergeModels({voices:{},searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search voices...`},searchNoResultsTitle:{default:`No voices found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} voices`},customInputPlaceholder:{default:`Enter custom voice name`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},playButtonText:{default:`Play sample`},pauseButtonText:{default:`Pause`},showVisualizer:{type:Boolean,default:!0},listClass:{default:``}},{"search-query":{required:!1,default:``},"search-queryModifiers":{},"voice-id":{required:!1,default:``},"voice-idModifiers":{}}),emits:[`update:search-query`,`update:voice-id`],setup(__props){let props=__props,isListExpanded=ref(!1),currentlyPlayingId=ref(),audioElements=ref(new Map),audioStreams=ref(new Map),audioContexts=ref(new Map),audioSources=ref(new Map),sharedAudioContext=ref(null);function initAudioContext(){return sharedAudioContext.value||=new(window.AudioContext||window.webkitAudioContext),sharedAudioContext.value}let searchQuery=useModel(__props,`search-query`),voiceId=useModel(__props,`voice-id`),filteredVoices=computed(()=>{if(!searchQuery.value)return props.voices;let query=searchQuery.value.toLowerCase();return props.voices.filter(voice=>{let nameMatch=voice.name.toLowerCase().includes(query),descMatch=voice.description&&voice.description.toLowerCase().includes(query),tagMatch=voice.tags&&voice.tags.some(tag=>tag.toLowerCase().includes(query)),labelMatch=voice.labels&&Object.values(voice.labels).some(value$1=>typeof value$1==`string`&&value$1.toLowerCase().includes(query)),langMatch=voice.languages&&voice.languages.some(lang=>lang.name.toLowerCase().includes(query)||lang.code.toLowerCase().includes(query));return nameMatch||descMatch||tagMatch||labelMatch||langMatch})});function getPreviewUrl(voice){return voice.previewURL||voice.preview_audio_url}function getAudioElement(voice){let previewUrl=getPreviewUrl(voice);if(!previewUrl)return null;if(audioElements.value.has(voice.id))return audioElements.value.get(voice.id)||null;let audio=new Audio(previewUrl);return audio.crossOrigin=`anonymous`,audio.preload=`auto`,audio.addEventListener(`ended`,()=>{if(currentlyPlayingId.value===voice.id){currentlyPlayingId.value=void 0;let stream=audioStreams.value.get(voice.id);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(voice.id))}}),audioElements.value.set(voice.id,audio),audio}function createAudioStream(audio,voiceId$1){try{if(audioStreams.value.has(voiceId$1))return audioStreams.value.get(voiceId$1)||null;let audioContext=initAudioContext();if(audioSources.value.has(voiceId$1)){let source$1=audioSources.value.get(voiceId$1),destination$1=audioContext.createMediaStreamDestination();source$1.connect(destination$1);let stream$1=destination$1.stream;return audioStreams.value.set(voiceId$1,stream$1),stream$1}let source=audioContext.createMediaElementSource(audio);audioSources.value.set(voiceId$1,source),source.connect(audioContext.destination);let destination=audioContext.createMediaStreamDestination();source.connect(destination);let stream=destination.stream;return audioStreams.value.set(voiceId$1,stream),stream}catch(error){return console.error(`Failed to create audio stream for visualizer:`,error),null}}function togglePlayback(voice){try{let previewUrl=getPreviewUrl(voice);if(!previewUrl)return;let audio=getAudioElement(voice);if(!audio)return;if(currentlyPlayingId.value===voice.id){audio.pause(),currentlyPlayingId.value=void 0;let stream=audioStreams.value.get(voice.id);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(voice.id));return}if(currentlyPlayingId.value){let currentAudio=audioElements.value.get(currentlyPlayingId.value);currentAudio&¤tAudio.pause();let stream=audioStreams.value.get(currentlyPlayingId.value);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(currentlyPlayingId.value))}props.showVisualizer&&!audioStreams.value.has(voice.id)&&createAudioStream(audio,voice.id),audio.currentTime=0,audio.play().catch(error=>{console.error(`Failed to play audio:`,error)}),currentlyPlayingId.value=voice.id}catch(err){console.error(err),currentlyPlayingId.value=void 0}}function cleanup(){audioElements.value.forEach(audio=>{audio.pause(),audio.src=``}),audioElements.value.clear(),audioStreams.value.forEach(stream=>{stream.getTracks().forEach(track$1=>track$1.stop())}),audioStreams.value.clear(),audioContexts.value.forEach(context$1=>{context$1.state!==`closed`&&context$1.close()}),audioContexts.value.clear(),audioSources.value.clear(),currentlyPlayingId.value=void 0}watch(searchQuery,()=>{if(currentlyPlayingId.value){let audio=audioElements.value.get(currentlyPlayingId.value);audio&&audio.pause();let stream=audioStreams.value.get(currentlyPlayingId.value);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(currentlyPlayingId.value)),currentlyPlayingId.value=void 0}}),onBeforeUnmount(cleanup);let customVoiceName=ref(``);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$18,[_ctx.searchable?(openBlock(),createElementBlock(`div`,_hoisted_2$9,[_cache$1[4]||=createBaseVNode(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[createBaseVNode(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>searchQuery.value=$event,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:_ctx.searchPlaceholder},null,8,_hoisted_3$6),[[vModelText,searchQuery.value]])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$5,[searchQuery.value?(openBlock(),createElementBlock(`div`,_hoisted_5$4,toDisplayString(_ctx.searchResultsText.replace(`{count}`,filteredVoices.value.length.toString()).replace(`{total}`,_ctx.voices.length.toString())),1)):createCommentVNode(``,!0),searchQuery.value&&filteredVoices.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_6$3,[_cache$1[5]||=createBaseVNode(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),createBaseVNode(`div`,_hoisted_7$2,[createBaseVNode(`span`,_hoisted_8$2,toDisplayString(_ctx.searchNoResultsTitle),1),createBaseVNode(`span`,_hoisted_9$2,toDisplayString(_ctx.searchNoResultsDescription.replace(`{query}`,searchQuery.value)),1)])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_10$2,[createBaseVNode(`div`,{class:normalizeClass([`grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto scrollbar-none`,[isListExpanded.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``,...props.listClass?typeof props.listClass==`string`?[props.listClass]:props.listClass:[`max-h-[calc(100dvh-7lh)]`]]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredVoices.value,voice=>(openBlock(),createBlock(VoiceCard_default,{key:voice.id,"voice-id":voiceId.value,"onUpdate:voiceId":_cache$1[1]||=$event=>voiceId.value=$event,"custom-voice-name":customVoiceName.value,"onUpdate:customVoiceName":_cache$1[2]||=$event=>customVoiceName.value=$event,name:`voice`,voice,"currently-playing-id":currentlyPlayingId.value,"custom-input-placeholder":_ctx.customInputPlaceholder,"show-visualizer":_ctx.showVisualizer,"audio-stream":audioStreams.value.get(voice.id),onTogglePlayback:togglePlayback},null,8,[`voice-id`,`custom-voice-name`,`voice`,`currently-playing-id`,`custom-input-placeholder`,`show-visualizer`,`audio-stream`]))),128))],2),createBaseVNode(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:normalizeClass([isListExpanded.value?`w-full`:`mt-4 w-full rounded-lg`])},[createBaseVNode(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:normalizeClass([isListExpanded.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:_cache$1[3]||=$event=>isListExpanded.value=!isListExpanded.value},[createBaseVNode(`span`,null,toDisplayString(isListExpanded.value?_ctx.collapseButtonText:_ctx.expandButtonText),1),createBaseVNode(`div`,{class:normalizeClass([isListExpanded.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-linear":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),VoiceCardManySelect_default=__plugin_vue_export_helper_default(VoiceCardManySelect_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-9ae13460`]]),BidirectionalTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`BidirectionalTransition`,props:{fromClass:{},activeClass:{},toClass:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(Transition,{"enter-from-class":_ctx.fromClass,"enter-active-class":_ctx.activeClass,"enter-to-class":_ctx.toClass,"leave-from-class":_ctx.toClass,"leave-active-class":_ctx.activeClass,"leave-to-class":_ctx.fromClass},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`enter-from-class`,`enter-active-class`,`enter-to-class`,`leave-from-class`,`leave-active-class`,`leave-to-class`]))}}),BidirectionalTransition_default=BidirectionalTransition_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$17=[`disabled`],_hoisted_2$8={class:`flex flex-row items-center justify-center gap-2`},_hoisted_3$5={key:0,class:`w-4`},_hoisted_4$4={key:0,class:`i-svg-spinners:ring-resize h-4 w-4`},_hoisted_5$3={key:0};var Button_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Button`,props:{icon:{},label:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:`primary`},size:{default:`md`},theme:{default:`default`},block:{type:Boolean,default:!1}},setup(__props){let props=__props,isDisabled=computed(()=>props.disabled||props.loading),variantClasses={primary:{default:`bg-primary-500/15 hover:bg-primary-500/20 active:bg-primary-500/30 dark:bg-primary-700/30 dark:hover:bg-primary-700/40 dark:active:bg-primary-700/30 focus:ring-primary-300/60 dark:focus:ring-primary-600/30 border-2 border-solid border-primary-500/5 dark:border-primary-900/40 text-primary-950 dark:text-primary-100`},secondary:{default:`bg-neutral-400/15 hover:bg-neutral-400/20 active:bg-neutral-400/30 dark:bg-neutral-700/60 dark:hover:bg-neutral-700/80 dark:active:bg-neutral-700/60 focus:ring-neutral-300/30 dark:focus:ring-neutral-600/60 dark:focus:ring-neutral-600/30 border-2 border-solid border-neutral-300/30 dark:border-neutral-700/30 text-neutral-950 dark:text-neutral-100`},danger:{default:`bg-red-500/15 hover:bg-red-500/20 active:bg-red-500/30 dark:bg-red-700/30 dark:hover:bg-red-700/40 dark:active:bg-red-700/30 focus:ring-red-300/30 dark:focus:ring-red-600/60 dark:focus:ring-red-600/30 border-2 border-solid border-red-200/30 dark:border-red-900/30 text-red-950 dark:text-red-100`}},sizeClasses={sm:`px-3 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`},baseClasses=computed(()=>[`rounded-lg font-medium outline-none`,`transition-all duration-200 ease-in-out`,`disabled:cursor-not-allowed disabled:opacity-50`,props.block?`w-full`:``,sizeClasses[props.size],variantClasses[props.variant][props.theme],{"opacity-50 cursor-not-allowed":isDisabled.value},`focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900`]);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`button`,{disabled:isDisabled.value,class:normalizeClass(baseClasses.value)},[createBaseVNode(`div`,_hoisted_2$8,[createVNode(unref(BidirectionalTransition_default),{"from-class":`opacity-0 mr-0! w-0!`,"active-class":`transition-[width,margin] ease-in-out overflow-hidden transition-100`},{default:withCtx(()=>[_ctx.loading||_ctx.icon?(openBlock(),createElementBlock(`div`,_hoisted_3$5,[_ctx.loading?(openBlock(),createElementBlock(`div`,_hoisted_4$4)):_ctx.icon?(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`h-4 w-4`,_ctx.icon])},null,2)):createCommentVNode(``,!0)])):createCommentVNode(``,!0)]),_:1}),_ctx.label?(openBlock(),createElementBlock(`span`,_hoisted_5$3,toDisplayString(_ctx.label),1)):renderSlot(_ctx.$slots,`default`,{key:1})])],10,_hoisted_1$17))}}),Button_default=Button_vue_vue_type_script_setup_true_lang_default,Screen_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Screen`,setup(__props){let containerRef=ref(),breakpoints=useBreakpoints(breakpointsTailwind),{width,height}=useWindowSize(),containerElementBounding=useElementBounding(containerRef,{immediate:!0,windowResize:!0,reset:!0}),isMobile=computed(()=>breakpoints.between(`sm`,`md`).value||breakpoints.smaller(`sm`).value),isTablet=computed(()=>breakpoints.between(`md`,`lg`).value),isDesktop=computed(()=>breakpoints.greaterOrEqual(`lg`).value),canvasWidth=computed(()=>isDesktop.value?containerElementBounding.width.value:isMobile.value||isTablet.value?width.value-16:containerElementBounding.width.value),canvasHeight=ref(0);return watch([width,height,containerRef],()=>{let bounding=containerRef.value?.parentElement?.getBoundingClientRect();isDesktop.value||isMobile.value||isTablet.value?canvasHeight.value=bounding?.height||0:canvasHeight.value=600}),watch([containerElementBounding.width,containerElementBounding.height],()=>{isDesktop.value||isMobile.value||isTablet.value?canvasHeight.value=containerElementBounding.height.value:canvasHeight.value=600}),onMounted(async()=>{containerRef.value&&containerElementBounding.update()}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`containerRef`,ref:containerRef,"h-full":``,"w-full":``},[renderSlot(_ctx.$slots,`default`,{width:canvasWidth.value,height:canvasHeight.value})],512))}}),Screen_default=Screen_vue_vue_type_script_setup_true_lang_default,Skeleton_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Skeleton`,props:{animation:{default:`pulse`}},setup(__props){let props=__props;return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`skeleton`,props.animation===`none`?``:`skeleton-${props.animation}`]),bg:`neutral-200 dark:neutral-800`,overflow:`hidden`},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],2))}}),Skeleton_default=__plugin_vue_export_helper_default(Skeleton_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fa4a54cc`]]),CursorFloating_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`CursorFloating`,props:{intensity:{default:1.5}},setup(__props){let props=__props,cardRef=ref(null),transformStyle=ref(``),gradientPosition=ref(`50% 50%`),sparklePosition=ref(`50% 50%`),sparkleOpacity=ref(.5);function handleMouseMove(event){if(!cardRef.value)return;let card=cardRef.value,rect=card.getBoundingClientRect(),x$3=event.clientX-rect.left,y$3=event.clientY-rect.top,cardWidth=card.offsetWidth,cardHeight=card.offsetHeight,xPercent=Math.abs(Math.floor(100/cardWidth*x$3)-100),yPercent=Math.abs(Math.floor(100/cardHeight*y$3)-100),leftPos=50+(xPercent-50)/1.5,topPos=50+(yPercent-50)/1.5,sparkleX=50+(xPercent-50)/7,sparkleY=50+(yPercent-50)/7,rotateY=(leftPos-50)/1.5*.2*props.intensity,rotateX=(topPos-50)/2*-1*.2*props.intensity,pAngle=50-xPercent+(50-yPercent),opacity=.5+Math.abs(pAngle)*.008*props.intensity;transformStyle.value=`perspective(1200px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale3d(${1+.015*props.intensity}, ${1+.015*props.intensity}, ${1+.015*props.intensity})`,gradientPosition.value=`${leftPos}% ${topPos}%`,sparklePosition.value=`${sparkleX}% ${sparkleY}%`,sparkleOpacity.value=opacity}function resetCard(){transformStyle.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`,gradientPosition.value=`50% 50%`,sparklePosition.value=`50% 50%`,sparkleOpacity.value=.5}return onMounted(()=>{transformStyle.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`cardRef`,ref:cardRef,class:`card-hover-effect`,style:normalizeStyle({transform:transformStyle.value,"--effect-intensity":_ctx.intensity}),onMousemove:handleMouseMove,onMouseleave:resetCard},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],36))}}),CursorFloating_default=__plugin_vue_export_helper_default(CursorFloating_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-24a7a9d5`]]),ProviderAccountIdInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderAccountIdInput`,props:mergeModels({placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:props.label||`Account ID`,description:props.description||`Account ID`,placeholder:props.placeholder,required:props.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderAccountIdInput_default=ProviderAccountIdInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$16=[`onClick`],_hoisted_2$7={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_3$4={"mt-4":``};var ProviderAdvancedSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderAdvancedSettings`,props:{title:{},initialVisible:{type:Boolean}},setup(__props){let props=__props,visible=ref(props.initialVisible||!1);function toggleVisible(){visible.value=!visible.value}return(_ctx,_cache$1)=>(openBlock(),createBlock(Collapsable_default,{"w-full":``},{trigger:withCtx(slotProps=>[createBaseVNode(`button`,{transition:`all ease-in-out duration-250`,"w-full":``,flex:``,"items-center":``,"gap-1.5":``,"outline-none":``,class:`[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0`,onClick:()=>slotProps.setVisible(!slotProps.visible)&&toggleVisible()},[createBaseVNode(`h2`,_hoisted_2$7,[createBaseVNode(`span`,null,toDisplayString(_ctx.title||`Advanced`),1)]),createBaseVNode(`div`,{transform:``,transition:`transform duration-250`,class:normalizeClass({"rotate-180":slotProps.visible})},_cache$1[0]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``},null,-1)],2)],8,_hoisted_1$16)]),default:withCtx(()=>[createBaseVNode(`div`,_hoisted_3$4,[renderSlot(_ctx.$slots,`default`)])]),_:3}))}}),ProviderAdvancedSettings_default=ProviderAdvancedSettings_vue_vue_type_script_setup_true_lang_default; /*! * shared v11.1.9 * (c) 2025 kazuya kawaguchi @@ -3852,7 +3852,7 @@ function defineStore(id$1,setup,setupOptions){let options$1,isSetupStore=typeof const inBrowser=typeof window<`u`,makeSymbol=(name$2,shareable=!1)=>shareable?Symbol.for(name$2):Symbol(name$2),generateFormatCacheKey=(locale,key$1,source)=>friendlyJSONstringify({l:locale,k:key$1,s:source}),friendlyJSONstringify=json=>JSON.stringify(json).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),isNumber=val=>typeof val==`number`&&isFinite(val),isDate=val=>toTypeString(val)===`[object Date]`,isRegExp=val=>toTypeString(val)===`[object RegExp]`,isEmptyObject=val=>isPlainObject$3(val)&&Object.keys(val).length===0,assign=Object.assign,_create=Object.create,create$1=(obj=null)=>_create(obj);let _globalThis;const getGlobalThis=()=>_globalThis||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:create$1();function escapeHtml(rawText){return rawText.replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}const hasOwnProperty$1=Object.prototype.hasOwnProperty;function hasOwn$1(obj,key$1){return hasOwnProperty$1.call(obj,key$1)}const isArray$1=Array.isArray,isFunction=val=>typeof val==`function`,isString=val=>typeof val==`string`,isBoolean=val=>typeof val==`boolean`,isObject=val=>typeof val==`object`&&!!val,isPromise=val=>isObject(val)&&isFunction(val.then)&&isFunction(val.catch),objectToString=Object.prototype.toString,toTypeString=value$1=>objectToString.call(value$1),isPlainObject$3=val=>toTypeString(val)===`[object Object]`,toDisplayString$1=val=>val==null?``:isArray$1(val)||isPlainObject$3(val)&&val.toString===objectToString?JSON.stringify(val,null,2):String(val);function join$1(items,separator=``){return items.reduce((str,item,index$1)=>index$1===0?str+item:str+separator+item,``)}function warn(msg,err){typeof console<`u`&&(console.warn(`[intlify] `+msg),err&&console.warn(err.stack))}const isNotObjectOrIsArray=val=>!isObject(val)||isArray$1(val);function deepCopy(src,des){if(isNotObjectOrIsArray(src)||isNotObjectOrIsArray(des))throw Error(`Invalid value`);let stack$1=[{src,des}];for(;stack$1.length;){let{src:src$1,des:des$1}=stack$1.pop();Object.keys(src$1).forEach(key$1=>{key$1!==`__proto__`&&(isObject(src$1[key$1])&&!isObject(des$1[key$1])&&(des$1[key$1]=Array.isArray(src$1[key$1])?[]:create$1()),isNotObjectOrIsArray(des$1[key$1])||isNotObjectOrIsArray(src$1[key$1])?des$1[key$1]=src$1[key$1]:stack$1.push({src:src$1[key$1],des:des$1[key$1]}))})}}function createPosition(line,column,offset$2){return{line,column,offset:offset$2}}function createLocation(start,end,source){let loc={start,end};return source!=null&&(loc.source=source),loc}const CompileErrorCodes={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},COMPILE_ERROR_CODES_EXTEND_POINT=17,errorMessages$2={[CompileErrorCodes.EXPECTED_TOKEN]:`Expected token: '{0}'`,[CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]:`Invalid token in placeholder: '{0}'`,[CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:`Unterminated single quote in placeholder`,[CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]:`Unknown escape sequence: \\{0}`,[CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]:`Invalid unicode escape sequence: {0}`,[CompileErrorCodes.UNBALANCED_CLOSING_BRACE]:`Unbalanced closing brace`,[CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]:`Unterminated closing brace`,[CompileErrorCodes.EMPTY_PLACEHOLDER]:`Empty placeholder`,[CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]:`Not allowed nest placeholder`,[CompileErrorCodes.INVALID_LINKED_FORMAT]:`Invalid linked format`,[CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]:`Plural must have messages`,[CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]:`Unexpected empty linked modifier`,[CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]:`Unexpected empty linked key`,[CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]:`Unexpected lexical analysis in token: '{0}'`,[CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]:`unhandled codegen node type: '{0}'`,[CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]:`unhandled mimifier node type: '{0}'`};function createCompileError(code$1,loc,options$1={}){let{domain,messages,args}=options$1,msg=code$1,error=SyntaxError(String(msg));return error.code=code$1,loc&&(error.location=loc),error.domain=domain,error}function defaultOnError$1(error){throw error}const CHAR_SP=` `,CHAR_CR=`\r`,CHAR_LF=` `,CHAR_LS=`\u2028`,CHAR_PS=`\u2029`;function createScanner(str){let _buf=str,_index=0,_line=1,_column=1,_peekOffset=0,isCRLF=index$2=>_buf[index$2]===CHAR_CR&&_buf[index$2+1]===CHAR_LF,isLF=index$2=>_buf[index$2]===CHAR_LF,isPS=index$2=>_buf[index$2]===CHAR_PS,isLS=index$2=>_buf[index$2]===CHAR_LS,isLineEnd=index$2=>isCRLF(index$2)||isLF(index$2)||isPS(index$2)||isLS(index$2),index$1=()=>_index,line=()=>_line,column=()=>_column,peekOffset=()=>_peekOffset,charAt=offset$2=>isCRLF(offset$2)||isPS(offset$2)||isLS(offset$2)?CHAR_LF:_buf[offset$2],currentChar=()=>charAt(_index),currentPeek=()=>charAt(_index+_peekOffset);function next(){return _peekOffset=0,isLineEnd(_index)&&(_line++,_column=0),isCRLF(_index)&&_index++,_index++,_column++,_buf[_index]}function peek$1(){return isCRLF(_index+_peekOffset)&&_peekOffset++,_peekOffset++,_buf[_index+_peekOffset]}function reset(){_index=0,_line=1,_column=1,_peekOffset=0}function resetPeek(offset$2=0){_peekOffset=offset$2}function skipToPeek(){let target$1=_index+_peekOffset;for(;target$1!==_index;)next();_peekOffset=0}return{index:index$1,line,column,peekOffset,charAt,currentChar,currentPeek,next,peek:peek$1,reset,resetPeek,skipToPeek}}const EOF=void 0,DOT=`.`,LITERAL_DELIMITER=`'`,ERROR_DOMAIN$3=`tokenizer`;function createTokenizer$1(source,options$1={}){let location$1=options$1.location!==!1,_scnr=createScanner(source),currentOffset=()=>_scnr.index(),currentPosition=()=>createPosition(_scnr.line(),_scnr.column(),_scnr.index()),_initLoc=currentPosition(),_initOffset=currentOffset(),_context$1={currentType:13,offset:_initOffset,startLoc:_initLoc,endLoc:_initLoc,lastType:13,lastOffset:_initOffset,lastStartLoc:_initLoc,lastEndLoc:_initLoc,braceNest:0,inLinked:!1,text:``},context$1=()=>_context$1,{onError}=options$1;function emitError(code$1,pos,offset$2,...args){let ctx=context$1();if(pos.column+=offset$2,pos.offset+=offset$2,onError){let loc=location$1?createLocation(ctx.startLoc,pos):null,err=createCompileError(code$1,loc,{domain:ERROR_DOMAIN$3,args});onError(err)}}function getToken(context$2,type,value$1){context$2.endLoc=currentPosition(),context$2.currentType=type;let token={type};return location$1&&(token.loc=createLocation(context$2.startLoc,context$2.endLoc)),value$1!=null&&(token.value=value$1),token}let getEndToken=context$2=>getToken(context$2,13);function eat(scnr,ch$1){return scnr.currentChar()===ch$1?(scnr.next(),ch$1):(emitError(CompileErrorCodes.EXPECTED_TOKEN,currentPosition(),0,ch$1),``)}function peekSpaces(scnr){let buf=``;for(;scnr.currentPeek()===CHAR_SP||scnr.currentPeek()===CHAR_LF;)buf+=scnr.currentPeek(),scnr.peek();return buf}function skipSpaces(scnr){let buf=peekSpaces(scnr);return scnr.skipToPeek(),buf}function isIdentifierStart(ch$1){if(ch$1===EOF)return!1;let cc$2=ch$1.charCodeAt(0);return cc$2>=97&&cc$2<=122||cc$2>=65&&cc$2<=90||cc$2===95}function isNumberStart(ch$1){if(ch$1===EOF)return!1;let cc$2=ch$1.charCodeAt(0);return cc$2>=48&&cc$2<=57}function isNamedIdentifierStart(scnr,context$2){let{currentType}=context$2;if(currentType!==2)return!1;peekSpaces(scnr);let ret=isIdentifierStart(scnr.currentPeek());return scnr.resetPeek(),ret}function isListIdentifierStart(scnr,context$2){let{currentType}=context$2;if(currentType!==2)return!1;peekSpaces(scnr);let ch$1=scnr.currentPeek()===`-`?scnr.peek():scnr.currentPeek(),ret=isNumberStart(ch$1);return scnr.resetPeek(),ret}function isLiteralStart(scnr,context$2){let{currentType}=context$2;if(currentType!==2)return!1;peekSpaces(scnr);let ret=scnr.currentPeek()===LITERAL_DELIMITER;return scnr.resetPeek(),ret}function isLinkedDotStart(scnr,context$2){let{currentType}=context$2;if(currentType!==7)return!1;peekSpaces(scnr);let ret=scnr.currentPeek()===`.`;return scnr.resetPeek(),ret}function isLinkedModifierStart(scnr,context$2){let{currentType}=context$2;if(currentType!==8)return!1;peekSpaces(scnr);let ret=isIdentifierStart(scnr.currentPeek());return scnr.resetPeek(),ret}function isLinkedDelimiterStart(scnr,context$2){let{currentType}=context$2;if(!(currentType===7||currentType===11))return!1;peekSpaces(scnr);let ret=scnr.currentPeek()===`:`;return scnr.resetPeek(),ret}function isLinkedReferStart(scnr,context$2){let{currentType}=context$2;if(currentType!==9)return!1;let fn$6=()=>{let ch$1=scnr.currentPeek();return ch$1===`{`?isIdentifierStart(scnr.peek()):ch$1===`@`||ch$1===`|`||ch$1===`:`||ch$1===`.`||ch$1===CHAR_SP||!ch$1?!1:ch$1===CHAR_LF?(scnr.peek(),fn$6()):isTextStart(scnr,!1)},ret=fn$6();return scnr.resetPeek(),ret}function isPluralStart(scnr){peekSpaces(scnr);let ret=scnr.currentPeek()===`|`;return scnr.resetPeek(),ret}function isTextStart(scnr,reset=!0){let fn$6=(hasSpace=!1,prev=``)=>{let ch$1=scnr.currentPeek();return ch$1===`{`||ch$1===`@`||!ch$1?hasSpace:ch$1===`|`?!(prev===CHAR_SP||prev===CHAR_LF):ch$1===CHAR_SP?(scnr.peek(),fn$6(!0,CHAR_SP)):ch$1===CHAR_LF?(scnr.peek(),fn$6(!0,CHAR_LF)):!0},ret=fn$6();return reset&&scnr.resetPeek(),ret}function takeChar(scnr,fn$6){let ch$1=scnr.currentChar();return ch$1===EOF?EOF:fn$6(ch$1)?(scnr.next(),ch$1):null}function isIdentifier(ch$1){let cc$2=ch$1.charCodeAt(0);return cc$2>=97&&cc$2<=122||cc$2>=65&&cc$2<=90||cc$2>=48&&cc$2<=57||cc$2===95||cc$2===36}function takeIdentifierChar(scnr){return takeChar(scnr,isIdentifier)}function isNamedIdentifier(ch$1){let cc$2=ch$1.charCodeAt(0);return cc$2>=97&&cc$2<=122||cc$2>=65&&cc$2<=90||cc$2>=48&&cc$2<=57||cc$2===95||cc$2===36||cc$2===45}function takeNamedIdentifierChar(scnr){return takeChar(scnr,isNamedIdentifier)}function isDigit(ch$1){let cc$2=ch$1.charCodeAt(0);return cc$2>=48&&cc$2<=57}function takeDigit(scnr){return takeChar(scnr,isDigit)}function isHexDigit(ch$1){let cc$2=ch$1.charCodeAt(0);return cc$2>=48&&cc$2<=57||cc$2>=65&&cc$2<=70||cc$2>=97&&cc$2<=102}function takeHexDigit(scnr){return takeChar(scnr,isHexDigit)}function getDigits(scnr){let ch$1=``,num$2=``;for(;ch$1=takeDigit(scnr);)num$2+=ch$1;return num$2}function readText(scnr){let buf=``;for(;;){let ch$1=scnr.currentChar();if(ch$1===`{`||ch$1===`}`||ch$1===`@`||ch$1===`|`||!ch$1)break;if(ch$1===CHAR_SP||ch$1===CHAR_LF)if(isTextStart(scnr))buf+=ch$1,scnr.next();else if(isPluralStart(scnr))break;else buf+=ch$1,scnr.next();else buf+=ch$1,scnr.next()}return buf}function readNamedIdentifier(scnr){skipSpaces(scnr);let ch$1=``,name$2=``;for(;ch$1=takeNamedIdentifierChar(scnr);)name$2+=ch$1;return scnr.currentChar()===EOF&&emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,currentPosition(),0),name$2}function readListIdentifier(scnr){skipSpaces(scnr);let value$1=``;return scnr.currentChar()===`-`?(scnr.next(),value$1+=`-${getDigits(scnr)}`):value$1+=getDigits(scnr),scnr.currentChar()===EOF&&emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,currentPosition(),0),value$1}function isLiteral$1(ch$1){return ch$1!==LITERAL_DELIMITER&&ch$1!==CHAR_LF}function readLiteral(scnr){skipSpaces(scnr),eat(scnr,`'`);let ch$1=``,literal=``;for(;ch$1=takeChar(scnr,isLiteral$1);)ch$1===`\\`?literal+=readEscapeSequence(scnr):literal+=ch$1;let current=scnr.currentChar();return current===CHAR_LF||current===EOF?(emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,currentPosition(),0),current===CHAR_LF&&(scnr.next(),eat(scnr,`'`)),literal):(eat(scnr,`'`),literal)}function readEscapeSequence(scnr){let ch$1=scnr.currentChar();switch(ch$1){case`\\`:case`'`:return scnr.next(),`\\${ch$1}`;case`u`:return readUnicodeEscapeSequence(scnr,ch$1,4);case`U`:return readUnicodeEscapeSequence(scnr,ch$1,6);default:return emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,currentPosition(),0,ch$1),``}}function readUnicodeEscapeSequence(scnr,unicode,digits$1){eat(scnr,unicode);let sequence=``;for(let i$1=0;i$1{let ch$1=scnr.currentChar();return ch$1===`{`||ch$1===`@`||ch$1===`|`||ch$1===`(`||ch$1===`)`||!ch$1||ch$1===CHAR_SP?buf:(buf+=ch$1,scnr.next(),fn$6(buf))};return fn$6(``)}function readPlural(scnr){skipSpaces(scnr);let plural=eat(scnr,`|`);return skipSpaces(scnr),plural}function readTokenInPlaceholder(scnr,context$2){let token=null,ch$1=scnr.currentChar();switch(ch$1){case`{`:return context$2.braceNest>=1&&emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,currentPosition(),0),scnr.next(),token=getToken(context$2,2,`{`),skipSpaces(scnr),context$2.braceNest++,token;case`}`:return context$2.braceNest>0&&context$2.currentType===2&&emitError(CompileErrorCodes.EMPTY_PLACEHOLDER,currentPosition(),0),scnr.next(),token=getToken(context$2,3,`}`),context$2.braceNest--,context$2.braceNest>0&&skipSpaces(scnr),context$2.inLinked&&context$2.braceNest===0&&(context$2.inLinked=!1),token;case`@`:return context$2.braceNest>0&&emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,currentPosition(),0),token=readTokenInLinked(scnr,context$2)||getEndToken(context$2),context$2.braceNest=0,token;default:{let validNamedIdentifier=!0,validListIdentifier=!0,validLiteral=!0;if(isPluralStart(scnr))return context$2.braceNest>0&&emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,currentPosition(),0),token=getToken(context$2,1,readPlural(scnr)),context$2.braceNest=0,context$2.inLinked=!1,token;if(context$2.braceNest>0&&(context$2.currentType===4||context$2.currentType===5||context$2.currentType===6))return emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,currentPosition(),0),context$2.braceNest=0,readToken(scnr,context$2);if(validNamedIdentifier=isNamedIdentifierStart(scnr,context$2))return token=getToken(context$2,4,readNamedIdentifier(scnr)),skipSpaces(scnr),token;if(validListIdentifier=isListIdentifierStart(scnr,context$2))return token=getToken(context$2,5,readListIdentifier(scnr)),skipSpaces(scnr),token;if(validLiteral=isLiteralStart(scnr,context$2))return token=getToken(context$2,6,readLiteral(scnr)),skipSpaces(scnr),token;if(!validNamedIdentifier&&!validListIdentifier&&!validLiteral)return token=getToken(context$2,12,readInvalidIdentifier(scnr)),emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,currentPosition(),0,token.value),skipSpaces(scnr),token;break}}return token}function readTokenInLinked(scnr,context$2){let{currentType}=context$2,token=null,ch$1=scnr.currentChar();switch((currentType===7||currentType===8||currentType===11||currentType===9)&&(ch$1===CHAR_LF||ch$1===CHAR_SP)&&emitError(CompileErrorCodes.INVALID_LINKED_FORMAT,currentPosition(),0),ch$1){case`@`:return scnr.next(),token=getToken(context$2,7,`@`),context$2.inLinked=!0,token;case`.`:return skipSpaces(scnr),scnr.next(),getToken(context$2,8,`.`);case`:`:return skipSpaces(scnr),scnr.next(),getToken(context$2,9,`:`);default:return isPluralStart(scnr)?(token=getToken(context$2,1,readPlural(scnr)),context$2.braceNest=0,context$2.inLinked=!1,token):isLinkedDotStart(scnr,context$2)||isLinkedDelimiterStart(scnr,context$2)?(skipSpaces(scnr),readTokenInLinked(scnr,context$2)):isLinkedModifierStart(scnr,context$2)?(skipSpaces(scnr),getToken(context$2,11,readLinkedModifier(scnr))):isLinkedReferStart(scnr,context$2)?(skipSpaces(scnr),ch$1===`{`?readTokenInPlaceholder(scnr,context$2)||token:getToken(context$2,10,readLinkedRefer(scnr))):(currentType===7&&emitError(CompileErrorCodes.INVALID_LINKED_FORMAT,currentPosition(),0),context$2.braceNest=0,context$2.inLinked=!1,readToken(scnr,context$2))}}function readToken(scnr,context$2){let token={type:13};if(context$2.braceNest>0)return readTokenInPlaceholder(scnr,context$2)||getEndToken(context$2);if(context$2.inLinked)return readTokenInLinked(scnr,context$2)||getEndToken(context$2);let ch$1=scnr.currentChar();switch(ch$1){case`{`:return readTokenInPlaceholder(scnr,context$2)||getEndToken(context$2);case`}`:return emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE,currentPosition(),0),scnr.next(),getToken(context$2,3,`}`);case`@`:return readTokenInLinked(scnr,context$2)||getEndToken(context$2);default:if(isPluralStart(scnr))return token=getToken(context$2,1,readPlural(scnr)),context$2.braceNest=0,context$2.inLinked=!1,token;if(isTextStart(scnr))return getToken(context$2,0,readText(scnr));break}return token}function nextToken(){let{currentType,offset:offset$2,startLoc,endLoc}=_context$1;return _context$1.lastType=currentType,_context$1.lastOffset=offset$2,_context$1.lastStartLoc=startLoc,_context$1.lastEndLoc=endLoc,_context$1.offset=currentOffset(),_context$1.startLoc=currentPosition(),_scnr.currentChar()===EOF?getToken(_context$1,13):readToken(_scnr,_context$1)}return{nextToken,currentOffset,currentPosition,context:context$1}}const ERROR_DOMAIN$2=`parser`,KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(match,codePoint4,codePoint6){switch(match){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let codePoint=parseInt(codePoint4||codePoint6,16);return codePoint<=55295||codePoint>=57344?String.fromCodePoint(codePoint):`�`}}}function createParser(options$1={}){let location$1=options$1.location!==!1,{onError}=options$1;function emitError(tokenzer,code$1,start,offset$2,...args){let end=tokenzer.currentPosition();if(end.offset+=offset$2,end.column+=offset$2,onError){let loc=location$1?createLocation(start,end):null,err=createCompileError(code$1,loc,{domain:ERROR_DOMAIN$2,args});onError(err)}}function startNode(type,offset$2,loc){let node$1={type};return location$1&&(node$1.start=offset$2,node$1.end=offset$2,node$1.loc={start:loc,end:loc}),node$1}function endNode(node$1,offset$2,pos,type){location$1&&(node$1.end=offset$2,node$1.loc&&(node$1.loc.end=pos))}function parseText(tokenizer,value$1){let context$1=tokenizer.context(),node$1=startNode(3,context$1.offset,context$1.startLoc);return node$1.value=value$1,endNode(node$1,tokenizer.currentOffset(),tokenizer.currentPosition()),node$1}function parseList(tokenizer,index$1){let context$1=tokenizer.context(),{lastOffset:offset$2,lastStartLoc:loc}=context$1,node$1=startNode(5,offset$2,loc);return node$1.index=parseInt(index$1,10),tokenizer.nextToken(),endNode(node$1,tokenizer.currentOffset(),tokenizer.currentPosition()),node$1}function parseNamed$1(tokenizer,key$1){let context$1=tokenizer.context(),{lastOffset:offset$2,lastStartLoc:loc}=context$1,node$1=startNode(4,offset$2,loc);return node$1.key=key$1,tokenizer.nextToken(),endNode(node$1,tokenizer.currentOffset(),tokenizer.currentPosition()),node$1}function parseLiteral(tokenizer,value$1){let context$1=tokenizer.context(),{lastOffset:offset$2,lastStartLoc:loc}=context$1,node$1=startNode(9,offset$2,loc);return node$1.value=value$1.replace(KNOWN_ESCAPES,fromEscapeSequence),tokenizer.nextToken(),endNode(node$1,tokenizer.currentOffset(),tokenizer.currentPosition()),node$1}function parseLinkedModifier(tokenizer){let token=tokenizer.nextToken(),context$1=tokenizer.context(),{lastOffset:offset$2,lastStartLoc:loc}=context$1,node$1=startNode(8,offset$2,loc);return token.type===11?(token.value??emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,getTokenCaption(token)),node$1.value=token.value||``,endNode(node$1,tokenizer.currentOffset(),tokenizer.currentPosition()),{node:node$1}):(emitError(tokenizer,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,context$1.lastStartLoc,0),node$1.value=``,endNode(node$1,offset$2,loc),{nextConsumeToken:token,node:node$1})}function parseLinkedKey(tokenizer,value$1){let context$1=tokenizer.context(),node$1=startNode(7,context$1.offset,context$1.startLoc);return node$1.value=value$1,endNode(node$1,tokenizer.currentOffset(),tokenizer.currentPosition()),node$1}function parseLinked(tokenizer){let context$1=tokenizer.context(),linkedNode=startNode(6,context$1.offset,context$1.startLoc),token=tokenizer.nextToken();if(token.type===8){let parsed=parseLinkedModifier(tokenizer);linkedNode.modifier=parsed.node,token=parsed.nextConsumeToken||tokenizer.nextToken()}switch(token.type!==9&&emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,getTokenCaption(token)),token=tokenizer.nextToken(),token.type===2&&(token=tokenizer.nextToken()),token.type){case 10:token.value??emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,getTokenCaption(token)),linkedNode.key=parseLinkedKey(tokenizer,token.value||``);break;case 4:token.value??emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,getTokenCaption(token)),linkedNode.key=parseNamed$1(tokenizer,token.value||``);break;case 5:token.value??emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,getTokenCaption(token)),linkedNode.key=parseList(tokenizer,token.value||``);break;case 6:token.value??emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,getTokenCaption(token)),linkedNode.key=parseLiteral(tokenizer,token.value||``);break;default:{emitError(tokenizer,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,context$1.lastStartLoc,0);let nextContext=tokenizer.context(),emptyLinkedKeyNode=startNode(7,nextContext.offset,nextContext.startLoc);return emptyLinkedKeyNode.value=``,endNode(emptyLinkedKeyNode,nextContext.offset,nextContext.startLoc),linkedNode.key=emptyLinkedKeyNode,endNode(linkedNode,nextContext.offset,nextContext.startLoc),{nextConsumeToken:token,node:linkedNode}}}return endNode(linkedNode,tokenizer.currentOffset(),tokenizer.currentPosition()),{node:linkedNode}}function parseMessage(tokenizer){let context$1=tokenizer.context(),startOffset=context$1.currentType===1?tokenizer.currentOffset():context$1.offset,startLoc=context$1.currentType===1?context$1.endLoc:context$1.startLoc,node$1=startNode(2,startOffset,startLoc);node$1.items=[];let nextToken=null;do{let token=nextToken||tokenizer.nextToken();switch(nextToken=null,token.type){case 0:token.value??emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,getTokenCaption(token)),node$1.items.push(parseText(tokenizer,token.value||``));break;case 5:token.value??emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,getTokenCaption(token)),node$1.items.push(parseList(tokenizer,token.value||``));break;case 4:token.value??emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,getTokenCaption(token)),node$1.items.push(parseNamed$1(tokenizer,token.value||``));break;case 6:token.value??emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,getTokenCaption(token)),node$1.items.push(parseLiteral(tokenizer,token.value||``));break;case 7:{let parsed=parseLinked(tokenizer);node$1.items.push(parsed.node),nextToken=parsed.nextConsumeToken||null;break}}}while(context$1.currentType!==13&&context$1.currentType!==1);let endOffset=context$1.currentType===1?context$1.lastOffset:tokenizer.currentOffset(),endLoc=context$1.currentType===1?context$1.lastEndLoc:tokenizer.currentPosition();return endNode(node$1,endOffset,endLoc),node$1}function parsePlural(tokenizer,offset$2,loc,msgNode){let context$1=tokenizer.context(),hasEmptyMessage=msgNode.items.length===0,node$1=startNode(1,offset$2,loc);node$1.cases=[],node$1.cases.push(msgNode);do{let msg=parseMessage(tokenizer);hasEmptyMessage||=msg.items.length===0,node$1.cases.push(msg)}while(context$1.currentType!==13);return hasEmptyMessage&&emitError(tokenizer,CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,loc,0),endNode(node$1,tokenizer.currentOffset(),tokenizer.currentPosition()),node$1}function parseResource(tokenizer){let context$1=tokenizer.context(),{offset:offset$2,startLoc}=context$1,msgNode=parseMessage(tokenizer);return context$1.currentType===13?msgNode:parsePlural(tokenizer,offset$2,startLoc,msgNode)}function parse$4(source){let tokenizer=createTokenizer$1(source,assign({},options$1)),context$1=tokenizer.context(),node$1=startNode(0,context$1.offset,context$1.startLoc);return location$1&&node$1.loc&&(node$1.loc.source=source),node$1.body=parseResource(tokenizer),options$1.onCacheKey&&(node$1.cacheKey=options$1.onCacheKey(source)),context$1.currentType!==13&&emitError(tokenizer,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,context$1.lastStartLoc,0,source[context$1.offset]||``),endNode(node$1,tokenizer.currentOffset(),tokenizer.currentPosition()),node$1}return{parse:parse$4}}function getTokenCaption(token){if(token.type===13)return`EOF`;let name$2=(token.value||``).replace(/\r?\n/gu,`\\n`);return name$2.length>10?name$2.slice(0,9)+`…`:name$2}function createTransformer(ast,options$1={}){let _context$1={ast,helpers:new Set},context$1=()=>_context$1,helper=name$2=>(_context$1.helpers.add(name$2),name$2);return{context:context$1,helper}}function traverseNodes(nodes,transformer){for(let i$1=0;i$1optimizeMessageNode(c$4)),ast}function optimizeMessageNode(message$1){if(message$1.items.length===1){let item=message$1.items[0];(item.type===3||item.type===9)&&(message$1.static=item.value,delete item.value)}else{let values=[];for(let i$1=0;i$1_context$1;function push$1(code$1,node$1){_context$1.code+=code$1}function _newline(n$2,withBreakLine=!0){let _breakLineCode=withBreakLine?breakLineCode:``;push$1(_needIndent?_breakLineCode+` `.repeat(n$2):_breakLineCode)}function indent(withNewLine=!0){let level=++_context$1.indentLevel;withNewLine&&_newline(level)}function deindent(withNewLine=!0){let level=--_context$1.indentLevel;withNewLine&&_newline(level)}function newline(){_newline(_context$1.indentLevel)}let helper=key$1=>`_${key$1}`,needIndent=()=>_context$1.needIndent;return{context:context$1,push:push$1,indent,deindent,newline,helper,needIndent}}function generateLinkedNode(generator,node$1){let{helper}=generator;generator.push(`${helper(`linked`)}(`),generateNode(generator,node$1.key),node$1.modifier?(generator.push(`, `),generateNode(generator,node$1.modifier),generator.push(`, _type`)):generator.push(`, undefined, _type`),generator.push(`)`)}function generateMessageNode(generator,node$1){let{helper,needIndent}=generator;generator.push(`${helper(`normalize`)}([`),generator.indent(needIndent());let length=node$1.items.length;for(let i$1=0;i$11){generator.push(`${helper(`plural`)}([`),generator.indent(needIndent());let length=node$1.cases.length;for(let i$1=0;i$1{let mode=isString(options$1.mode)?options$1.mode:`normal`,filename=isString(options$1.filename)?options$1.filename:`message.intl`,sourceMap=!!options$1.sourceMap,breakLineCode=options$1.breakLineCode==null?mode===`arrow`?`;`:` `:options$1.breakLineCode,needIndent=options$1.needIndent?options$1.needIndent:mode!==`arrow`,helpers=ast.helpers||[],generator=createCodeGenerator(ast,{mode,filename,sourceMap,breakLineCode,needIndent});generator.push(mode===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),generator.indent(needIndent),helpers.length>0&&(generator.push(`const { ${join$1(helpers.map(s$1=>`${s$1}: _${s$1}`),`, `)} } = ctx`),generator.newline()),generator.push(`return `),generateNode(generator,ast),generator.deindent(needIndent),generator.push(`}`),delete ast.helpers;let{code:code$1,map}=generator.context();return{ast,code:code$1,map:map?map.toJSON():void 0}};function baseCompile(source,options$1={}){let assignedOptions=assign({},options$1),jit=!!assignedOptions.jit,enalbeMinify=!!assignedOptions.minify,enambeOptimize=assignedOptions.optimize==null?!0:assignedOptions.optimize,parser=createParser(assignedOptions),ast=parser.parse(source);return jit?(enambeOptimize&&optimize(ast),enalbeMinify&&minify(ast),{ast,code:``}):(transform(ast,assignedOptions),generate(ast,assignedOptions))}function initFeatureFlags$1(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(getGlobalThis().__INTLIFY_PROD_DEVTOOLS__=!1)}function isMessageAST(val){return isObject(val)&&resolveType(val)===0&&(hasOwn$1(val,`b`)||hasOwn$1(val,`body`))}const PROPS_BODY=[`b`,`body`];function resolveBody(node$1){return resolveProps(node$1,PROPS_BODY)}const PROPS_CASES=[`c`,`cases`];function resolveCases(node$1){return resolveProps(node$1,PROPS_CASES,[])}const PROPS_STATIC=[`s`,`static`];function resolveStatic(node$1){return resolveProps(node$1,PROPS_STATIC)}const PROPS_ITEMS=[`i`,`items`];function resolveItems(node$1){return resolveProps(node$1,PROPS_ITEMS,[])}const PROPS_TYPE=[`t`,`type`];function resolveType(node$1){return resolveProps(node$1,PROPS_TYPE)}const PROPS_VALUE=[`v`,`value`];function resolveValue$1(node$1,type){let resolved=resolveProps(node$1,PROPS_VALUE);if(resolved!=null)return resolved;throw createUnhandleNodeError(type)}const PROPS_MODIFIER=[`m`,`modifier`];function resolveLinkedModifier(node$1){return resolveProps(node$1,PROPS_MODIFIER)}const PROPS_KEY=[`k`,`key`];function resolveLinkedKey(node$1){let resolved=resolveProps(node$1,PROPS_KEY);if(resolved)return resolved;throw createUnhandleNodeError(6)}function resolveProps(node$1,props,defaultValue){for(let i$1=0;i$1formatParts(ctx,ast);return msg}function formatParts(ctx,ast){let body$2=resolveBody(ast);if(body$2==null)throw createUnhandleNodeError(0);let type=resolveType(body$2);if(type===1){let plural=body$2,cases=resolveCases(plural);return ctx.plural(cases.reduce((messages,c$4)=>[...messages,formatMessageParts(ctx,c$4)],[]))}else return formatMessageParts(ctx,body$2)}function formatMessageParts(ctx,node$1){let static_=resolveStatic(node$1);if(static_!=null)return ctx.type===`text`?static_:ctx.normalize([static_]);{let messages=resolveItems(node$1).reduce((acm,c$4)=>[...acm,formatMessagePart(ctx,c$4)],[]);return ctx.normalize(messages)}}function formatMessagePart(ctx,node$1){let type=resolveType(node$1);switch(type){case 3:return resolveValue$1(node$1,type);case 9:return resolveValue$1(node$1,type);case 4:{let named$1=node$1;if(hasOwn$1(named$1,`k`)&&named$1.k)return ctx.interpolate(ctx.named(named$1.k));if(hasOwn$1(named$1,`key`)&&named$1.key)return ctx.interpolate(ctx.named(named$1.key));throw createUnhandleNodeError(type)}case 5:{let list$2=node$1;if(hasOwn$1(list$2,`i`)&&isNumber(list$2.i))return ctx.interpolate(ctx.list(list$2.i));if(hasOwn$1(list$2,`index`)&&isNumber(list$2.index))return ctx.interpolate(ctx.list(list$2.index));throw createUnhandleNodeError(type)}case 6:{let linked=node$1,modifier=resolveLinkedModifier(linked),key$1=resolveLinkedKey(linked);return ctx.linked(formatMessagePart(ctx,key$1),modifier?formatMessagePart(ctx,modifier):void 0,ctx.type)}case 7:return resolveValue$1(node$1,type);case 8:return resolveValue$1(node$1,type);default:throw Error(`unhandled node on format message part: ${type}`)}}const defaultOnCacheKey=message$1=>message$1;let compileCache=create$1();function baseCompile$1(message$1,options$1={}){let detectError=!1,onError=options$1.onError||defaultOnError$1;return options$1.onError=err=>{detectError=!0,onError(err)},{...baseCompile(message$1,options$1),detectError}}function compile(message$1,context$1){if(isString(message$1)){let warnHtmlMessage=isBoolean(context$1.warnHtmlMessage)?context$1.warnHtmlMessage:!0,onCacheKey=context$1.onCacheKey||defaultOnCacheKey,cacheKey=onCacheKey(message$1),cached=compileCache[cacheKey];if(cached)return cached;let{ast,detectError}=baseCompile$1(message$1,{...context$1,location:!1,jit:!0}),msg=format$1(ast);return detectError?msg:compileCache[cacheKey]=msg}else{let cacheKey=message$1.cacheKey;if(cacheKey){let cached=compileCache[cacheKey];return cached||(compileCache[cacheKey]=format$1(message$1))}else return format$1(message$1)}}let devtools=null;function setDevToolsHook(hook){devtools=hook}function initI18nDevTools(i18n$1,version$1,meta){devtools&&devtools.emit(`i18n:init`,{timestamp:Date.now(),i18n:i18n$1,version:version$1,meta})}const translateDevTools=createDevToolsHook(`function:translate`);function createDevToolsHook(hook){return payloads=>devtools&&devtools.emit(hook,payloads)}const CoreErrorCodes={INVALID_ARGUMENT:COMPILE_ERROR_CODES_EXTEND_POINT,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},CORE_ERROR_CODES_EXTEND_POINT=24;function createCoreError(code$1){return createCompileError(code$1,null,void 0)}const errorMessages$1={[CoreErrorCodes.INVALID_ARGUMENT]:`Invalid arguments`,[CoreErrorCodes.INVALID_DATE_ARGUMENT]:`The date provided is an invalid Date object.Make sure your Date represents a valid date.`,[CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]:`The argument provided is not a valid ISO date string`,[CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]:`Not support non-string message`,[CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:`cannot support promise value`,[CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:`cannot support async function`,[CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]:`cannot support locale type`};function getLocale$1(context$1,options$1){return options$1.locale==null?resolveLocale(context$1.locale):resolveLocale(options$1.locale)}let _resolveLocale;function resolveLocale(locale){if(isString(locale))return locale;if(isFunction(locale)){if(locale.resolvedOnce&&_resolveLocale!=null)return _resolveLocale;if(locale.constructor.name===`Function`){let resolve$1=locale();if(isPromise(resolve$1))throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _resolveLocale=resolve$1}else throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE)}function fallbackWithSimple(ctx,fallback,start){return[...new Set([start,...isArray$1(fallback)?fallback:isObject(fallback)?Object.keys(fallback):isString(fallback)?[fallback]:[start]])]}function fallbackWithLocaleChain(ctx,fallback,start){let startLocale=isString(start)?start:DEFAULT_LOCALE,context$1=ctx;context$1.__localeChainCache||=new Map;let chain=context$1.__localeChainCache.get(startLocale);if(!chain){chain=[];let block=[start];for(;isArray$1(block);)block=appendBlockToChain(chain,block,fallback);let defaults=isArray$1(fallback)||!isPlainObject$3(fallback)?fallback:fallback.default?fallback.default:null;block=isString(defaults)?[defaults]:defaults,isArray$1(block)&&appendBlockToChain(chain,block,!1),context$1.__localeChainCache.set(startLocale,chain)}return chain}function appendBlockToChain(chain,block,blocks){let follow=!0;for(let i$1=0;i$1{key$1===void 0?key$1=newChar:key$1+=newChar},actions[1]=()=>{key$1!==void 0&&(keys$3.push(key$1),key$1=void 0)},actions[2]=()=>{actions[0](),subPathDepth++},actions[3]=()=>{if(subPathDepth>0)subPathDepth--,mode=4,actions[0]();else{if(subPathDepth=0,key$1===void 0||(key$1=formatSubPath(key$1),key$1===!1))return!1;actions[1]()}};function maybeUnescapeQuote(){let nextChar=path[index$1+1];if(mode===5&&nextChar===`'`||mode===6&&nextChar===`"`)return index$1++,newChar=`\\`+nextChar,actions[0](),!0}for(;mode!==null;)if(index$1++,c$4=path[index$1],!(c$4===`\\`&&maybeUnescapeQuote())){if(type=getPathCharType(c$4),typeMap=pathStateMachine[mode],transition=typeMap[type]||typeMap.l||8,transition===8||(mode=transition[0],transition[1]!==void 0&&(action=actions[transition[1]],action&&(newChar=c$4,action()===!1))))return;if(mode===7)return keys$3}}const cache=new Map;function resolveWithKeyValue(obj,path){return isObject(obj)?obj[path]:null}function resolveValue(obj,path){if(!isObject(obj))return null;let hit=cache.get(path);if(hit||(hit=parse$1(path),hit&&cache.set(path,hit)),!hit)return null;let len=hit.length,last=obj,i$1=0;for(;i$1`${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(val,type)=>type===`text`&&isString(val)?val.toUpperCase():type===`vnode`&&isObject(val)&&`__v_isVNode`in val?val.children.toUpperCase():val,lower:(val,type)=>type===`text`&&isString(val)?val.toLowerCase():type===`vnode`&&isObject(val)&&`__v_isVNode`in val?val.children.toLowerCase():val,capitalize:(val,type)=>type===`text`&&isString(val)?capitalize(val):type===`vnode`&&isObject(val)&&`__v_isVNode`in val?capitalize(val.children):val}}let _compiler;function registerMessageCompiler(compiler$1){_compiler=compiler$1}let _resolver;function registerMessageResolver(resolver$1){_resolver=resolver$1}let _fallbacker;function registerLocaleFallbacker(fallbacker){_fallbacker=fallbacker}let _additionalMeta=null;const setAdditionalMeta=meta=>{_additionalMeta=meta},getAdditionalMeta=()=>_additionalMeta;let _fallbackContext=null;const setFallbackContext=context$1=>{_fallbackContext=context$1},getFallbackContext=()=>_fallbackContext;let _cid=0;function createCoreContext(options$1={}){let onWarn=isFunction(options$1.onWarn)?options$1.onWarn:warn,version$1=isString(options$1.version)?options$1.version:VERSION$1,locale=isString(options$1.locale)||isFunction(options$1.locale)?options$1.locale:DEFAULT_LOCALE,_locale=isFunction(locale)?DEFAULT_LOCALE:locale,fallbackLocale=isArray$1(options$1.fallbackLocale)||isPlainObject$3(options$1.fallbackLocale)||isString(options$1.fallbackLocale)||options$1.fallbackLocale===!1?options$1.fallbackLocale:_locale,messages=isPlainObject$3(options$1.messages)?options$1.messages:createResources(_locale),datetimeFormats=isPlainObject$3(options$1.datetimeFormats)?options$1.datetimeFormats:createResources(_locale),numberFormats=isPlainObject$3(options$1.numberFormats)?options$1.numberFormats:createResources(_locale),modifiers=assign(create$1(),options$1.modifiers,getDefaultLinkedModifiers()),pluralRules=options$1.pluralRules||create$1(),missing=isFunction(options$1.missing)?options$1.missing:null,missingWarn=isBoolean(options$1.missingWarn)||isRegExp(options$1.missingWarn)?options$1.missingWarn:!0,fallbackWarn=isBoolean(options$1.fallbackWarn)||isRegExp(options$1.fallbackWarn)?options$1.fallbackWarn:!0,fallbackFormat=!!options$1.fallbackFormat,unresolving=!!options$1.unresolving,postTranslation=isFunction(options$1.postTranslation)?options$1.postTranslation:null,processor=isPlainObject$3(options$1.processor)?options$1.processor:null,warnHtmlMessage=isBoolean(options$1.warnHtmlMessage)?options$1.warnHtmlMessage:!0,escapeParameter=!!options$1.escapeParameter,messageCompiler=isFunction(options$1.messageCompiler)?options$1.messageCompiler:_compiler,messageResolver=isFunction(options$1.messageResolver)?options$1.messageResolver:_resolver||resolveWithKeyValue,localeFallbacker=isFunction(options$1.localeFallbacker)?options$1.localeFallbacker:_fallbacker||fallbackWithSimple,fallbackContext=isObject(options$1.fallbackContext)?options$1.fallbackContext:void 0,internalOptions=options$1,__datetimeFormatters=isObject(internalOptions.__datetimeFormatters)?internalOptions.__datetimeFormatters:new Map,__numberFormatters=isObject(internalOptions.__numberFormatters)?internalOptions.__numberFormatters:new Map,__meta=isObject(internalOptions.__meta)?internalOptions.__meta:{};_cid++;let context$1={version:version$1,cid:_cid,locale,fallbackLocale,messages,modifiers,pluralRules,missing,missingWarn,fallbackWarn,fallbackFormat,unresolving,postTranslation,processor,warnHtmlMessage,escapeParameter,messageCompiler,messageResolver,localeFallbacker,fallbackContext,onWarn,__meta};return context$1.datetimeFormats=datetimeFormats,context$1.numberFormats=numberFormats,context$1.__datetimeFormatters=__datetimeFormatters,context$1.__numberFormatters=__numberFormatters,__INTLIFY_PROD_DEVTOOLS__&&initI18nDevTools(context$1,version$1,__meta),context$1}const createResources=locale=>({[locale]:create$1()});function handleMissing(context$1,key$1,locale,missingWarn,type){let{missing,onWarn}=context$1;if(missing!==null){let ret=missing(context$1,locale,key$1,type);return isString(ret)?ret:key$1}else return key$1}function updateFallbackLocale(ctx,locale,fallback){let context$1=ctx;context$1.__localeChainCache=new Map,ctx.localeFallbacker(ctx,fallback,locale)}function isAlmostSameLocale(locale,compareLocale){return locale===compareLocale?!1:locale.split(`-`)[0]===compareLocale.split(`-`)[0]}function isImplicitFallback(targetLocale,locales){let index$1=locales.indexOf(targetLocale);if(index$1===-1)return!1;for(let i$1=index$1+1;i$1{DATETIME_FORMAT_OPTIONS_KEYS.includes(key$1)?overrides[key$1]=arg2[key$1]:options$1[key$1]=arg2[key$1]}),isString(arg3)?options$1.locale=arg3:isPlainObject$3(arg3)&&(overrides=arg3),isPlainObject$3(arg4)&&(overrides=arg4),[options$1.key||``,value$1,options$1,overrides]}function clearDateTimeFormat(ctx,locale,format$2){let context$1=ctx;for(let key$1 in format$2){let id$1=`${locale}__${key$1}`;if(!context$1.__datetimeFormatters.has(id$1))continue;context$1.__datetimeFormatters.delete(id$1)}}function number$1(context$1,...args){let{numberFormats,unresolving,fallbackLocale,onWarn,localeFallbacker}=context$1,{__numberFormatters}=context$1,[key$1,value$1,options$1,overrides]=parseNumberArgs(...args),missingWarn=isBoolean(options$1.missingWarn)?options$1.missingWarn:context$1.missingWarn,fallbackWarn=isBoolean(options$1.fallbackWarn)?options$1.fallbackWarn:context$1.fallbackWarn,part=!!options$1.part,locale=getLocale$1(context$1,options$1),locales=localeFallbacker(context$1,fallbackLocale,locale);if(!isString(key$1)||key$1===``)return new Intl.NumberFormat(locale,overrides).format(value$1);let numberFormat={},targetLocale,format$2=null,from=locale,to$2=null,type=`number format`;for(let i$1=0;i$1{NUMBER_FORMAT_OPTIONS_KEYS.includes(key$1)?overrides[key$1]=arg2[key$1]:options$1[key$1]=arg2[key$1]}),isString(arg3)?options$1.locale=arg3:isPlainObject$3(arg3)&&(overrides=arg3),isPlainObject$3(arg4)&&(overrides=arg4),[options$1.key||``,value$1,options$1,overrides]}function clearNumberFormat(ctx,locale,format$2){let context$1=ctx;for(let key$1 in format$2){let id$1=`${locale}__${key$1}`;if(!context$1.__numberFormatters.has(id$1))continue;context$1.__numberFormatters.delete(id$1)}}const DEFAULT_MODIFIER=str=>str,DEFAULT_MESSAGE=ctx=>``,DEFAULT_MESSAGE_DATA_TYPE=`text`,DEFAULT_NORMALIZE=values=>values.length===0?``:join$1(values),DEFAULT_INTERPOLATE=toDisplayString$1;function pluralDefault(choice,choicesLength){return choice=Math.abs(choice),choicesLength===2?choice?choice>1?1:0:1:choice?Math.min(choice,2):0}function getPluralIndex(options$1){let index$1=isNumber(options$1.pluralIndex)?options$1.pluralIndex:-1;return options$1.named&&(isNumber(options$1.named.count)||isNumber(options$1.named.n))?isNumber(options$1.named.count)?options$1.named.count:isNumber(options$1.named.n)?options$1.named.n:index$1:index$1}function normalizeNamed(pluralIndex,props){props.count||=pluralIndex,props.n||=pluralIndex}function createMessageContext(options$1={}){let locale=options$1.locale,pluralIndex=getPluralIndex(options$1),pluralRule=isObject(options$1.pluralRules)&&isString(locale)&&isFunction(options$1.pluralRules[locale])?options$1.pluralRules[locale]:pluralDefault,orgPluralRule=isObject(options$1.pluralRules)&&isString(locale)&&isFunction(options$1.pluralRules[locale])?pluralDefault:void 0,plural=messages=>messages[pluralRule(pluralIndex,messages.length,orgPluralRule)],_list=options$1.list||[],list$2=index$1=>_list[index$1],_named=options$1.named||create$1();isNumber(options$1.pluralIndex)&&normalizeNamed(pluralIndex,_named);let named$1=key$1=>_named[key$1];function message$1(key$1,useLinked){let msg=isFunction(options$1.messages)?options$1.messages(key$1,!!useLinked):isObject(options$1.messages)?options$1.messages[key$1]:!1;return msg||(options$1.parent?options$1.parent.message(key$1):DEFAULT_MESSAGE)}let _modifier=name$2=>options$1.modifiers?options$1.modifiers[name$2]:DEFAULT_MODIFIER,normalize$3=isPlainObject$3(options$1.processor)&&isFunction(options$1.processor.normalize)?options$1.processor.normalize:DEFAULT_NORMALIZE,interpolate$1=isPlainObject$3(options$1.processor)&&isFunction(options$1.processor.interpolate)?options$1.processor.interpolate:DEFAULT_INTERPOLATE,type=isPlainObject$3(options$1.processor)&&isString(options$1.processor.type)?options$1.processor.type:DEFAULT_MESSAGE_DATA_TYPE,linked=(key$1,...args)=>{let[arg1,arg2]=args,type$1=`text`,modifier=``;args.length===1?isObject(arg1)?(modifier=arg1.modifier||modifier,type$1=arg1.type||type$1):isString(arg1)&&(modifier=arg1||modifier):args.length===2&&(isString(arg1)&&(modifier=arg1||modifier),isString(arg2)&&(type$1=arg2||type$1));let ret=message$1(key$1,!0)(ctx),msg=type$1===`vnode`&&isArray$1(ret)&&modifier?ret[0]:ret;return modifier?_modifier(modifier)(msg,type$1):msg},ctx={list:list$2,named:named$1,plural,linked,message:message$1,type,interpolate:interpolate$1,normalize:normalize$3,values:assign(create$1(),_list,_named)};return ctx}const NOOP_MESSAGE_FUNCTION=()=>``,isMessageFunction=val=>isFunction(val);function translate(context$1,...args){let{fallbackFormat,postTranslation,unresolving,messageCompiler,fallbackLocale,messages}=context$1,[key$1,options$1]=parseTranslateArgs(...args),missingWarn=isBoolean(options$1.missingWarn)?options$1.missingWarn:context$1.missingWarn,fallbackWarn=isBoolean(options$1.fallbackWarn)?options$1.fallbackWarn:context$1.fallbackWarn,escapeParameter=isBoolean(options$1.escapeParameter)?options$1.escapeParameter:context$1.escapeParameter,resolvedMessage=!!options$1.resolvedMessage,defaultMsgOrKey=isString(options$1.default)||isBoolean(options$1.default)?isBoolean(options$1.default)?messageCompiler?key$1:()=>key$1:options$1.default:fallbackFormat?messageCompiler?key$1:()=>key$1:null,enableDefaultMsg=fallbackFormat||defaultMsgOrKey!=null&&(isString(defaultMsgOrKey)||isFunction(defaultMsgOrKey)),locale=getLocale$1(context$1,options$1);escapeParameter&&escapeParams(options$1);let[formatScope,targetLocale,message$1]=resolvedMessage?[key$1,locale,messages[locale]||create$1()]:resolveMessageFormat(context$1,key$1,locale,fallbackLocale,fallbackWarn,missingWarn),format$2=formatScope,cacheBaseKey=key$1;if(!resolvedMessage&&!(isString(format$2)||isMessageAST(format$2)||isMessageFunction(format$2))&&enableDefaultMsg&&(format$2=defaultMsgOrKey,cacheBaseKey=format$2),!resolvedMessage&&(!(isString(format$2)||isMessageAST(format$2)||isMessageFunction(format$2))||!isString(targetLocale)))return unresolving?NOT_REOSLVED:key$1;let occurred=!1,onError=()=>{occurred=!0},msg=isMessageFunction(format$2)?format$2:compileMessageFormat(context$1,key$1,targetLocale,format$2,cacheBaseKey,onError);if(occurred)return format$2;let ctxOptions=getMessageContextOptions(context$1,targetLocale,message$1,options$1),msgContext=createMessageContext(ctxOptions),messaged=evaluateMessage(context$1,msg,msgContext),ret=postTranslation?postTranslation(messaged,key$1):messaged;if(__INTLIFY_PROD_DEVTOOLS__){let payloads={timestamp:Date.now(),key:isString(key$1)?key$1:isMessageFunction(format$2)?format$2.key:``,locale:targetLocale||(isMessageFunction(format$2)?format$2.locale:``),format:isString(format$2)?format$2:isMessageFunction(format$2)?format$2.source:``,message:ret};payloads.meta=assign({},context$1.__meta,getAdditionalMeta()||{}),translateDevTools(payloads)}return ret}function escapeParams(options$1){isArray$1(options$1.list)?options$1.list=options$1.list.map(item=>isString(item)?escapeHtml(item):item):isObject(options$1.named)&&Object.keys(options$1.named).forEach(key$1=>{isString(options$1.named[key$1])&&(options$1.named[key$1]=escapeHtml(options$1.named[key$1]))})}function resolveMessageFormat(context$1,key$1,locale,fallbackLocale,fallbackWarn,missingWarn){let{messages,onWarn,messageResolver:resolveValue$2,localeFallbacker}=context$1,locales=localeFallbacker(context$1,fallbackLocale,locale),message$1=create$1(),targetLocale,format$2=null,from=locale,to$2=null,type=`translate`;for(let i$1=0;i$1format$2;return msg$1.locale=targetLocale,msg$1.key=key$1,msg$1}let start=null,startTag,endTag,msg=messageCompiler(format$2,getCompileContext(context$1,targetLocale,cacheBaseKey,format$2,warnHtmlMessage,onError));return msg.locale=targetLocale,msg.key=key$1,msg.source=format$2,msg}function evaluateMessage(context$1,msg,msgCtx){let start=null,startTag,endTag,messaged=msg(msgCtx);return messaged}function parseTranslateArgs(...args){let[arg1,arg2,arg3]=args,options$1=create$1();if(!isString(arg1)&&!isNumber(arg1)&&!isMessageFunction(arg1)&&!isMessageAST(arg1))throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);let key$1=isNumber(arg1)?String(arg1):(isMessageFunction(arg1),arg1);return isNumber(arg2)?options$1.plural=arg2:isString(arg2)?options$1.default=arg2:isPlainObject$3(arg2)&&!isEmptyObject(arg2)?options$1.named=arg2:isArray$1(arg2)&&(options$1.list=arg2),isNumber(arg3)?options$1.plural=arg3:isString(arg3)?options$1.default=arg3:isPlainObject$3(arg3)&&assign(options$1,arg3),[key$1,options$1]}function getCompileContext(context$1,locale,key$1,source,warnHtmlMessage,onError){return{locale,key:key$1,warnHtmlMessage,onError:err=>{throw onError&&onError(err),err},onCacheKey:source$1=>generateFormatCacheKey(locale,key$1,source$1)}}function getMessageContextOptions(context$1,locale,message$1,options$1){let{modifiers,pluralRules,messageResolver:resolveValue$2,fallbackLocale,fallbackWarn,missingWarn,fallbackContext}=context$1,resolveMessage=(key$1,useLinked)=>{let val=resolveValue$2(message$1,key$1);if(val==null&&(fallbackContext||useLinked)){let[,,message$2]=resolveMessageFormat(fallbackContext||context$1,key$1,locale,fallbackLocale,fallbackWarn,missingWarn);val=resolveValue$2(message$2,key$1)}if(isString(val)||isMessageAST(val)){let occurred=!1,onError=()=>{occurred=!0},msg=compileMessageFormat(context$1,key$1,locale,val,key$1,onError);return occurred?NOOP_MESSAGE_FUNCTION:msg}else if(isMessageFunction(val))return val;else return NOOP_MESSAGE_FUNCTION},ctxOptions={locale,modifiers,pluralRules,messages:resolveMessage};return context$1.processor&&(ctxOptions.processor=context$1.processor),options$1.list&&(ctxOptions.list=options$1.list),options$1.named&&(ctxOptions.named=options$1.named),isNumber(options$1.plural)&&(ctxOptions.pluralIndex=options$1.plural),ctxOptions}initFeatureFlags$1();const VERSION=`11.1.9`;function initFeatureFlags(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(getGlobalThis().__INTLIFY_PROD_DEVTOOLS__=!1)}const I18nErrorCodes={UNEXPECTED_RETURN_TYPE:CORE_ERROR_CODES_EXTEND_POINT,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34,DUPLICATE_USE_I18N_CALLING:35};function createI18nError(code$1,...args){return createCompileError(code$1,null,void 0)}const errorMessages={[I18nErrorCodes.UNEXPECTED_RETURN_TYPE]:`Unexpected return type in composer`,[I18nErrorCodes.INVALID_ARGUMENT]:`Invalid argument`,[I18nErrorCodes.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[I18nErrorCodes.NOT_INSTALLED]:"Need to install with `app.use` function",[I18nErrorCodes.UNEXPECTED_ERROR]:`Unexpected error`,[I18nErrorCodes.REQUIRED_VALUE]:`Required in value: {0}`,[I18nErrorCodes.INVALID_VALUE]:`Invalid value`,[I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:`Cannot setup vue-devtools plugin`,[I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N]:`Not compatible legacy VueI18n.`,[I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:`Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly`,[I18nErrorCodes.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope"},TranslateVNodeSymbol=makeSymbol(`__translateVNode`),DatetimePartsSymbol=makeSymbol(`__datetimeParts`),NumberPartsSymbol=makeSymbol(`__numberParts`),SetPluralRulesSymbol=makeSymbol(`__setPluralRules`);makeSymbol(`__intlifyMeta`);const InejctWithOptionSymbol=makeSymbol(`__injectWithOption`),DisposeSymbol=makeSymbol(`__dispose`),I18nWarnCodes={FALLBACK_TO_ROOT:CORE_WARN_CODES_EXTEND_POINT,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12},warnMessages={[I18nWarnCodes.FALLBACK_TO_ROOT]:`Fall back to {type} '{key}' with root locale.`,[I18nWarnCodes.NOT_FOUND_PARENT_SCOPE]:`Not found parent scope. use the global scope.`,[I18nWarnCodes.IGNORE_OBJ_FLATTEN]:`Ignore object flatten: '{key}' key has an string value`,[I18nWarnCodes.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead. -About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[I18nWarnCodes.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:`'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.`};function handleFlatJson(obj){if(!isObject(obj)||isMessageAST(obj))return obj;for(let key$1 in obj){if(!hasOwn$1(obj,key$1))continue;if(!key$1.includes(`.`))isObject(obj[key$1])&&handleFlatJson(obj[key$1]);else{let subKeys=key$1.split(`.`),lastIndex=subKeys.length-1,currentObj=obj,hasStringValue=!1;for(let i$1=0;i$1{if(`locale`in custom&&`resource`in custom){let{locale:locale$1,resource}=custom;locale$1?(ret[locale$1]=ret[locale$1]||create$1(),deepCopy(resource,ret[locale$1])):deepCopy(resource,ret)}else isString(custom)&&deepCopy(JSON.parse(custom),ret)}),messageResolver==null&&flatJson)for(let key$1 in ret)hasOwn$1(ret,key$1)&&handleFlatJson(ret[key$1]);return ret}function getComponentOptions(instance){return instance.type}function adjustI18nResources(gl,options$1,componentOptions){let messages=isObject(options$1.messages)?options$1.messages:create$1();`__i18nGlobal`in componentOptions&&(messages=getLocaleMessages(gl.locale.value,{messages,__i18n:componentOptions.__i18nGlobal}));let locales=Object.keys(messages);if(locales.length&&locales.forEach(locale=>{gl.mergeLocaleMessage(locale,messages[locale])}),isObject(options$1.datetimeFormats)){let locales$1=Object.keys(options$1.datetimeFormats);locales$1.length&&locales$1.forEach(locale=>{gl.mergeDateTimeFormat(locale,options$1.datetimeFormats[locale])})}if(isObject(options$1.numberFormats)){let locales$1=Object.keys(options$1.numberFormats);locales$1.length&&locales$1.forEach(locale=>{gl.mergeNumberFormat(locale,options$1.numberFormats[locale])})}}function createTextNode(key$1){return createVNode(Text,null,key$1,0)}const DEVTOOLS_META=`__INTLIFY_META__`,NOOP_RETURN_ARRAY=()=>[],NOOP_RETURN_FALSE=()=>!1;let composerID=0;function defineCoreMissingHandler(missing){return(ctx,locale,key$1,type)=>missing(locale,key$1,getCurrentInstance()||void 0,type)}const getMetaInfo=()=>{let instance=getCurrentInstance(),meta=null;return instance&&(meta=getComponentOptions(instance)[DEVTOOLS_META])?{[DEVTOOLS_META]:meta}:null};function createComposer(options$1={}){let{__root,__injectWithOption}=options$1,_isGlobal=__root===void 0,flatJson=options$1.flatJson,_ref=inBrowser?ref:shallowRef,_inheritLocale=isBoolean(options$1.inheritLocale)?options$1.inheritLocale:!0,_locale=_ref(__root&&_inheritLocale?__root.locale.value:isString(options$1.locale)?options$1.locale:DEFAULT_LOCALE),_fallbackLocale=_ref(__root&&_inheritLocale?__root.fallbackLocale.value:isString(options$1.fallbackLocale)||isArray$1(options$1.fallbackLocale)||isPlainObject$3(options$1.fallbackLocale)||options$1.fallbackLocale===!1?options$1.fallbackLocale:_locale.value),_messages=_ref(getLocaleMessages(_locale.value,options$1)),_datetimeFormats=_ref(isPlainObject$3(options$1.datetimeFormats)?options$1.datetimeFormats:{[_locale.value]:{}}),_numberFormats=_ref(isPlainObject$3(options$1.numberFormats)?options$1.numberFormats:{[_locale.value]:{}}),_missingWarn=__root?__root.missingWarn:isBoolean(options$1.missingWarn)||isRegExp(options$1.missingWarn)?options$1.missingWarn:!0,_fallbackWarn=__root?__root.fallbackWarn:isBoolean(options$1.fallbackWarn)||isRegExp(options$1.fallbackWarn)?options$1.fallbackWarn:!0,_fallbackRoot=__root?__root.fallbackRoot:isBoolean(options$1.fallbackRoot)?options$1.fallbackRoot:!0,_fallbackFormat=!!options$1.fallbackFormat,_missing=isFunction(options$1.missing)?options$1.missing:null,_runtimeMissing=isFunction(options$1.missing)?defineCoreMissingHandler(options$1.missing):null,_postTranslation=isFunction(options$1.postTranslation)?options$1.postTranslation:null,_warnHtmlMessage=__root?__root.warnHtmlMessage:isBoolean(options$1.warnHtmlMessage)?options$1.warnHtmlMessage:!0,_escapeParameter=!!options$1.escapeParameter,_modifiers=__root?__root.modifiers:isPlainObject$3(options$1.modifiers)?options$1.modifiers:{},_pluralRules=options$1.pluralRules||__root&&__root.pluralRules,_context$1,getCoreContext=()=>{_isGlobal&&setFallbackContext(null);let ctxOptions={version:VERSION,locale:_locale.value,fallbackLocale:_fallbackLocale.value,messages:_messages.value,modifiers:_modifiers,pluralRules:_pluralRules,missing:_runtimeMissing===null?void 0:_runtimeMissing,missingWarn:_missingWarn,fallbackWarn:_fallbackWarn,fallbackFormat:_fallbackFormat,unresolving:!0,postTranslation:_postTranslation===null?void 0:_postTranslation,warnHtmlMessage:_warnHtmlMessage,escapeParameter:_escapeParameter,messageResolver:options$1.messageResolver,messageCompiler:options$1.messageCompiler,__meta:{framework:`vue`}};ctxOptions.datetimeFormats=_datetimeFormats.value,ctxOptions.numberFormats=_numberFormats.value,ctxOptions.__datetimeFormatters=isPlainObject$3(_context$1)?_context$1.__datetimeFormatters:void 0,ctxOptions.__numberFormatters=isPlainObject$3(_context$1)?_context$1.__numberFormatters:void 0;let ctx=createCoreContext(ctxOptions);return _isGlobal&&setFallbackContext(ctx),ctx};_context$1=getCoreContext(),updateFallbackLocale(_context$1,_locale.value,_fallbackLocale.value);function trackReactivityValues(){return[_locale.value,_fallbackLocale.value,_messages.value,_datetimeFormats.value,_numberFormats.value]}let locale=computed({get:()=>_locale.value,set:val=>{_context$1.locale=val,_locale.value=val}}),fallbackLocale=computed({get:()=>_fallbackLocale.value,set:val=>{_context$1.fallbackLocale=val,_fallbackLocale.value=val,updateFallbackLocale(_context$1,_locale.value,val)}}),messages=computed(()=>_messages.value),datetimeFormats=computed(()=>_datetimeFormats.value),numberFormats=computed(()=>_numberFormats.value);function getPostTranslationHandler(){return isFunction(_postTranslation)?_postTranslation:null}function setPostTranslationHandler(handler){_postTranslation=handler,_context$1.postTranslation=handler}function getMissingHandler(){return _missing}function setMissingHandler(handler){handler!==null&&(_runtimeMissing=defineCoreMissingHandler(handler)),_missing=handler,_context$1.missing=_runtimeMissing}function isResolvedTranslateMessage(type,arg){return type!==`translate`||!arg.resolvedMessage}let wrapWithDeps=(fn$6,argumentParser,warnType,fallbackSuccess,fallbackFail,successCondition)=>{trackReactivityValues();let ret;try{__INTLIFY_PROD_DEVTOOLS__,_isGlobal||(_context$1.fallbackContext=__root?getFallbackContext():void 0),ret=fn$6(_context$1)}finally{__INTLIFY_PROD_DEVTOOLS__,_isGlobal||(_context$1.fallbackContext=void 0)}if(warnType!==`translate exists`&&isNumber(ret)&&ret===NOT_REOSLVED||warnType===`translate exists`&&!ret){let[key$1,arg2]=argumentParser();return __root&&_fallbackRoot?fallbackSuccess(__root):fallbackFail(key$1)}else if(successCondition(ret))return ret;else throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function t(...args){return wrapWithDeps(context$1=>Reflect.apply(translate,null,[context$1,...args]),()=>parseTranslateArgs(...args),`translate`,root$3=>Reflect.apply(root$3.t,root$3,[...args]),key$1=>key$1,val=>isString(val))}function rt$5(...args){let[arg1,arg2,arg3]=args;if(arg3&&!isObject(arg3))throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);return t(arg1,arg2,assign({resolvedMessage:!0},arg3||{}))}function d$2(...args){return wrapWithDeps(context$1=>Reflect.apply(datetime,null,[context$1,...args]),()=>parseDateTimeArgs(...args),`datetime format`,root$3=>Reflect.apply(root$3.d,root$3,[...args]),()=>MISSING_RESOLVE_VALUE,val=>isString(val)||isArray$1(val))}function n$2(...args){return wrapWithDeps(context$1=>Reflect.apply(number$1,null,[context$1,...args]),()=>parseNumberArgs(...args),`number format`,root$3=>Reflect.apply(root$3.n,root$3,[...args]),()=>MISSING_RESOLVE_VALUE,val=>isString(val)||isArray$1(val))}function normalize$3(values){return values.map(val=>isString(val)||isNumber(val)||isBoolean(val)?createTextNode(String(val)):val)}let interpolate$1=val=>val,processor={normalize:normalize$3,interpolate:interpolate$1,type:`vnode`};function translateVNode(...args){return wrapWithDeps(context$1=>{let ret,_context$2=context$1;try{_context$2.processor=processor,ret=Reflect.apply(translate,null,[_context$2,...args])}finally{_context$2.processor=null}return ret},()=>parseTranslateArgs(...args),`translate`,root$3=>root$3[TranslateVNodeSymbol](...args),key$1=>[createTextNode(key$1)],val=>isArray$1(val))}function numberParts(...args){return wrapWithDeps(context$1=>Reflect.apply(number$1,null,[context$1,...args]),()=>parseNumberArgs(...args),`number format`,root$3=>root$3[NumberPartsSymbol](...args),NOOP_RETURN_ARRAY,val=>isString(val)||isArray$1(val))}function datetimeParts(...args){return wrapWithDeps(context$1=>Reflect.apply(datetime,null,[context$1,...args]),()=>parseDateTimeArgs(...args),`datetime format`,root$3=>root$3[DatetimePartsSymbol](...args),NOOP_RETURN_ARRAY,val=>isString(val)||isArray$1(val))}function setPluralRules(rules){_pluralRules=rules,_context$1.pluralRules=_pluralRules}function te$3(key$1,locale$1){return wrapWithDeps(()=>{if(!key$1)return!1;let targetLocale=isString(locale$1)?locale$1:_locale.value,message$1=getLocaleMessage(targetLocale),resolved=_context$1.messageResolver(message$1,key$1);return isMessageAST(resolved)||isMessageFunction(resolved)||isString(resolved)},()=>[key$1],`translate exists`,root$3=>Reflect.apply(root$3.te,root$3,[key$1,locale$1]),NOOP_RETURN_FALSE,val=>isBoolean(val))}function resolveMessages(key$1){let messages$1=null,locales=fallbackWithLocaleChain(_context$1,_fallbackLocale.value,_locale.value);for(let i$1=0;i$1{_inheritLocale&&(_locale.value=val,_context$1.locale=val,updateFallbackLocale(_context$1,_locale.value,_fallbackLocale.value))}),watch(__root.fallbackLocale,val=>{_inheritLocale&&(_fallbackLocale.value=val,_context$1.fallbackLocale=val,updateFallbackLocale(_context$1,_locale.value,_fallbackLocale.value))}));let composer={id:composerID,locale,fallbackLocale,get inheritLocale(){return _inheritLocale},set inheritLocale(val){_inheritLocale=val,val&&__root&&(_locale.value=__root.locale.value,_fallbackLocale.value=__root.fallbackLocale.value,updateFallbackLocale(_context$1,_locale.value,_fallbackLocale.value))},get availableLocales(){return Object.keys(_messages.value).sort()},messages,get modifiers(){return _modifiers},get pluralRules(){return _pluralRules||{}},get isGlobal(){return _isGlobal},get missingWarn(){return _missingWarn},set missingWarn(val){_missingWarn=val,_context$1.missingWarn=_missingWarn},get fallbackWarn(){return _fallbackWarn},set fallbackWarn(val){_fallbackWarn=val,_context$1.fallbackWarn=_fallbackWarn},get fallbackRoot(){return _fallbackRoot},set fallbackRoot(val){_fallbackRoot=val},get fallbackFormat(){return _fallbackFormat},set fallbackFormat(val){_fallbackFormat=val,_context$1.fallbackFormat=_fallbackFormat},get warnHtmlMessage(){return _warnHtmlMessage},set warnHtmlMessage(val){_warnHtmlMessage=val,_context$1.warnHtmlMessage=val},get escapeParameter(){return _escapeParameter},set escapeParameter(val){_escapeParameter=val,_context$1.escapeParameter=val},t,getLocaleMessage,setLocaleMessage,mergeLocaleMessage,getPostTranslationHandler,setPostTranslationHandler,getMissingHandler,setMissingHandler,[SetPluralRulesSymbol]:setPluralRules};return composer.datetimeFormats=datetimeFormats,composer.numberFormats=numberFormats,composer.rt=rt$5,composer.te=te$3,composer.tm=tm$1,composer.d=d$2,composer.n=n$2,composer.getDateTimeFormat=getDateTimeFormat,composer.setDateTimeFormat=setDateTimeFormat,composer.mergeDateTimeFormat=mergeDateTimeFormat,composer.getNumberFormat=getNumberFormat,composer.setNumberFormat=setNumberFormat,composer.mergeNumberFormat=mergeNumberFormat,composer[InejctWithOptionSymbol]=__injectWithOption,composer[TranslateVNodeSymbol]=translateVNode,composer[DatetimePartsSymbol]=datetimeParts,composer[NumberPartsSymbol]=numberParts,composer}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:val=>val===`parent`||val===`global`,default:`parent`},i18n:{type:Object}};function getInterpolateArg({slots},keys$3){if(keys$3.length===1&&keys$3[0]===`default`){let ret=slots.default?slots.default():[];return ret.reduce((slot,current)=>[...slot,...current.type===Fragment?current.children:[current]],[])}else return keys$3.reduce((arg,key$1)=>{let slot=slots[key$1];return slot&&(arg[key$1]=slot()),arg},create$1())}function getFragmentableTag(){return Fragment}const TranslationImpl=defineComponent({name:`i18n-t`,props:assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:val=>isNumber(val)||!isNaN(val)}},baseFormatProps),setup(props,context$1){let{slots,attrs}=context$1,i18n$1=props.i18n||useI18n({useScope:props.scope,__useComponent:!0});return()=>{let keys$3=Object.keys(slots).filter(key$1=>key$1[0]!==`_`),options$1=create$1();props.locale&&(options$1.locale=props.locale),props.plural!==void 0&&(options$1.plural=isString(props.plural)?+props.plural:props.plural);let arg=getInterpolateArg(context$1,keys$3),children=i18n$1[TranslateVNodeSymbol](props.keypath,arg,options$1),assignedAttrs=assign(create$1(),attrs),tag=isString(props.tag)||isObject(props.tag)?props.tag:getFragmentableTag();return h(tag,assignedAttrs,children)}}}),Translation=TranslationImpl;function isVNode$1(target$1){return isArray$1(target$1)&&!isString(target$1[0])}function renderFormatter(props,context$1,slotKeys,partFormatter){let{slots,attrs}=context$1;return()=>{let options$1={part:!0},overrides=create$1();props.locale&&(options$1.locale=props.locale),isString(props.format)?options$1.key=props.format:isObject(props.format)&&(isString(props.format.key)&&(options$1.key=props.format.key),overrides=Object.keys(props.format).reduce((options$2,prop)=>slotKeys.includes(prop)?assign(create$1(),options$2,{[prop]:props.format[prop]}):options$2,create$1()));let parts=partFormatter(props.value,options$1,overrides),children=[options$1.key];isArray$1(parts)?children=parts.map((part,index$1)=>{let slot=slots[part.type],node$1=slot?slot({[part.type]:part.value,index:index$1,parts}):[part.value];return isVNode$1(node$1)&&(node$1[0].key=`${part.type}-${index$1}`),node$1}):isString(parts)&&(children=[parts]);let assignedAttrs=assign(create$1(),attrs),tag=isString(props.tag)||isObject(props.tag)?props.tag:getFragmentableTag();return h(tag,assignedAttrs,children)}}const NumberFormatImpl=defineComponent({name:`i18n-n`,props:assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(props,context$1){let i18n$1=props.i18n||useI18n({useScope:props.scope,__useComponent:!0});return renderFormatter(props,context$1,NUMBER_FORMAT_OPTIONS_KEYS,(...args)=>i18n$1[NumberPartsSymbol](...args))}}),NumberFormat=NumberFormatImpl;function getComposer$1(i18n$1,instance){let i18nInternal=i18n$1;if(i18n$1.mode===`composition`)return i18nInternal.__getInstance(instance)||i18n$1.global;{let vueI18n=i18nInternal.__getInstance(instance);return vueI18n==null?i18n$1.global.__composer:vueI18n.__composer}}function vTDirective(i18n$1){let _process=binding=>{let{instance,value:value$1}=binding;if(!instance||!instance.$)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);let composer=getComposer$1(i18n$1,instance.$),parsedValue=parseValue(value$1);return[Reflect.apply(composer.t,composer,[...makeParams(parsedValue)]),composer]},register=(el$1,binding)=>{let[textContent,composer]=_process(binding);inBrowser&&i18n$1.global===composer&&(el$1.__i18nWatcher=watch(composer.locale,()=>{binding.instance&&binding.instance.$forceUpdate()})),el$1.__composer=composer,el$1.textContent=textContent},unregister=el$1=>{inBrowser&&el$1.__i18nWatcher&&(el$1.__i18nWatcher(),el$1.__i18nWatcher=void 0,delete el$1.__i18nWatcher),el$1.__composer&&(el$1.__composer=void 0,delete el$1.__composer)},update=(el$1,{value:value$1})=>{if(el$1.__composer){let composer=el$1.__composer,parsedValue=parseValue(value$1);el$1.textContent=Reflect.apply(composer.t,composer,[...makeParams(parsedValue)])}},getSSRProps=binding=>{let[textContent]=_process(binding);return{textContent}};return{created:register,unmounted:unregister,beforeUpdate:update,getSSRProps}}function parseValue(value$1){if(isString(value$1))return{path:value$1};if(isPlainObject$3(value$1)){if(!(`path`in value$1))throw createI18nError(I18nErrorCodes.REQUIRED_VALUE,`path`);return value$1}else throw createI18nError(I18nErrorCodes.INVALID_VALUE)}function makeParams(value$1){let{path,locale,args,choice,plural}=value$1,options$1={},named$1=args||{};return isString(locale)&&(options$1.locale=locale),isNumber(choice)&&(options$1.plural=choice),isNumber(plural)&&(options$1.plural=plural),[path,named$1,options$1]}function apply(app,i18n$1,...options$1){let pluginOptions=isPlainObject$3(options$1[0])?options$1[0]:{},globalInstall=isBoolean(pluginOptions.globalInstall)?pluginOptions.globalInstall:!0;globalInstall&&([Translation.name,`I18nT`].forEach(name$2=>app.component(name$2,Translation)),[NumberFormat.name,`I18nN`].forEach(name$2=>app.component(name$2,NumberFormat)),[DatetimeFormat.name,`I18nD`].forEach(name$2=>app.component(name$2,DatetimeFormat))),app.directive(`t`,vTDirective(i18n$1))}const I18nInjectionKey=makeSymbol(`global-vue-i18n`);function createI18n(options$1={}){let __legacyMode=!1,__globalInjection=isBoolean(options$1.globalInjection)?options$1.globalInjection:!0,__instances=new Map,[globalScope,__global]=createGlobal(options$1,__legacyMode),symbol=makeSymbol(``);function __getInstance(component){return __instances.get(component)||null}function __setInstance(component,instance){__instances.set(component,instance)}function __deleteInstance(component){__instances.delete(component)}let i18n$1={get mode(){return`composition`},async install(app,...options$2){if(app.__VUE_I18N_SYMBOL__=symbol,app.provide(app.__VUE_I18N_SYMBOL__,i18n$1),isPlainObject$3(options$2[0])){let opts=options$2[0];i18n$1.__composerExtend=opts.__composerExtend,i18n$1.__vueI18nExtend=opts.__vueI18nExtend}let globalReleaseHandler=null;__globalInjection&&(globalReleaseHandler=injectGlobalFields(app,i18n$1.global)),apply(app,i18n$1,...options$2);let unmountApp=app.unmount;app.unmount=()=>{globalReleaseHandler&&globalReleaseHandler(),i18n$1.dispose(),unmountApp()}},get global(){return __global},dispose(){globalScope.stop()},__instances,__getInstance,__setInstance,__deleteInstance};return i18n$1}function useI18n(options$1={}){let instance=getCurrentInstance();if(instance==null)throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(!instance.isCE&&instance.appContext.app!=null&&!instance.appContext.app.__VUE_I18N_SYMBOL__)throw createI18nError(I18nErrorCodes.NOT_INSTALLED);let i18n$1=getI18nInstance(instance),gl=getGlobalComposer(i18n$1),componentOptions=getComponentOptions(instance),scope=getScope(options$1,componentOptions);if(scope===`global`)return adjustI18nResources(gl,options$1,componentOptions),gl;if(scope===`parent`){let composer$1=getComposer(i18n$1,instance,options$1.__useComponent);return composer$1??=gl,composer$1}let i18nInternal=i18n$1,composer=i18nInternal.__getInstance(instance);if(composer==null){let composerOptions=assign({},options$1);`__i18n`in componentOptions&&(composerOptions.__i18n=componentOptions.__i18n),gl&&(composerOptions.__root=gl),composer=createComposer(composerOptions),i18nInternal.__composerExtend&&(composer[DisposeSymbol]=i18nInternal.__composerExtend(composer)),setupLifeCycle(i18nInternal,instance,composer),i18nInternal.__setInstance(instance,composer)}return composer}function createGlobal(options$1,legacyMode){let scope=effectScope(),obj=scope.run(()=>createComposer(options$1));if(obj==null)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);return[scope,obj]}function getI18nInstance(instance){let i18n$1=inject(instance.isCE?I18nInjectionKey:instance.appContext.app.__VUE_I18N_SYMBOL__);if(!i18n$1)throw createI18nError(instance.isCE?I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE:I18nErrorCodes.UNEXPECTED_ERROR);return i18n$1}function getScope(options$1,componentOptions){return isEmptyObject(options$1)?`__i18n`in componentOptions?`local`:`global`:options$1.useScope?options$1.useScope:`local`}function getGlobalComposer(i18n$1){return i18n$1.mode===`composition`?i18n$1.global:i18n$1.global.__composer}function getComposer(i18n$1,target$1,useComponent=!1){let composer=null,root$3=target$1.root,current=getParentComponentInstance(target$1,useComponent);for(;current!=null;){let i18nInternal=i18n$1;if(i18n$1.mode===`composition`&&(composer=i18nInternal.__getInstance(current)),composer!=null||root$3===current)break;current=current.parent}return composer}function getParentComponentInstance(target$1,useComponent=!1){return target$1==null?null:useComponent&&target$1.vnode.ctx||target$1.parent}function setupLifeCycle(i18n$1,target$1,composer){let emitter=null;onMounted(()=>{},target$1),onUnmounted(()=>{let _composer=composer;i18n$1.__deleteInstance(target$1);let dispose$1=_composer[DisposeSymbol];dispose$1&&(dispose$1(),delete _composer[DisposeSymbol])},target$1)}const globalExportProps=[`locale`,`fallbackLocale`,`availableLocales`],globalExportMethods=[`t`,`rt`,`d`,`n`,`tm`,`te`];function injectGlobalFields(app,composer){let i18n$1=Object.create(null);globalExportProps.forEach(prop=>{let desc=Object.getOwnPropertyDescriptor(composer,prop);if(!desc)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);let wrap$2=isRef(desc.value)?{get(){return desc.value.value},set(val){desc.value.value=val}}:{get(){return desc.get&&desc.get()}};Object.defineProperty(i18n$1,prop,wrap$2)}),app.config.globalProperties.$i18n=i18n$1,globalExportMethods.forEach(method=>{let desc=Object.getOwnPropertyDescriptor(composer,method);if(!desc||!desc.value)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);Object.defineProperty(app.config.globalProperties,`$${method}`,desc)});let dispose$1=()=>{delete app.config.globalProperties.$i18n,globalExportMethods.forEach(method=>{delete app.config.globalProperties[`$${method}`]})};return dispose$1}const DatetimeFormatImpl=defineComponent({name:`i18n-d`,props:assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(props,context$1){let i18n$1=props.i18n||useI18n({useScope:props.scope,__useComponent:!0});return renderFormatter(props,context$1,DATETIME_FORMAT_OPTIONS_KEYS,(...args)=>i18n$1[DatetimePartsSymbol](...args))}}),DatetimeFormat=DatetimeFormatImpl;if(initFeatureFlags(),registerMessageCompiler(compile),registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain),__INTLIFY_PROD_DEVTOOLS__){let target$1=getGlobalThis();target$1.__INTLIFY__=!0,setDevToolsHook(target$1.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var ProviderApiKeyInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderApiKeyInput`,props:mergeModels({providerName:{},placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,{t}=useI18n(),modelValue=useModel(__props,`modelValue`),computedDescription=computed(()=>props.description||`API Key for ${props.providerName}`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:_ctx.label||unref(t)(`settings.pages.providers.common.fields.field.api-key.label`),description:computedDescription.value,placeholder:_ctx.placeholder,required:_ctx.required,type:`password`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderApiKeyInput_default=ProviderApiKeyInput_vue_vue_type_script_setup_true_lang_default,ProviderBaseUrlInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderBaseUrlInput`,props:mergeModels({placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:props.label||`Base URL`,description:props.description||`Custom base URL (optional)`,placeholder:props.placeholder,required:props.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderBaseUrlInput_default=ProviderBaseUrlInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$16={flex:`~ col gap-6`},_hoisted_2$7={flex:`~ row`,"items-center":``,"justify-between":``},_hoisted_3$4={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_4$4={text:`neutral-400 dark:neutral-500`};var ProviderBasicSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderBasicSettings`,props:{title:{},description:{},onReset:{type:Function}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$16,[createBaseVNode(`div`,_hoisted_2$7,[createBaseVNode(`div`,null,[createBaseVNode(`h2`,_hoisted_3$4,toDisplayString(_ctx.title||`Basic`),1),createBaseVNode(`div`,_hoisted_4$4,[createBaseVNode(`span`,null,toDisplayString(_ctx.description||`Essential settings`),1)])]),_ctx.onReset?(openBlock(),createElementBlock(`button`,{key:0,title:`Reset settings`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-2":``,transition:`all duration-250 ease-in-out`,text:`neutral-500 dark:neutral-400`,bg:`transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700`,onClick:_cache$1[0]||=(...args)=>_ctx.onReset&&_ctx.onReset(...args)},_cache$1[1]||=[createBaseVNode(`div`,{"i-solar:refresh-bold-duotone":``,"text-xl":``},null,-1)])):createCommentVNode(``,!0)]),renderSlot(_ctx.$slots,`default`)]))}}),ProviderBasicSettings_default=ProviderBasicSettings_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$15={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-6`};var ProviderSettingsContainer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsContainer`,setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$15,[renderSlot(_ctx.$slots,`default`)]))}}),ProviderSettingsContainer_default=ProviderSettingsContainer_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$14={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":``};var ProviderSettingsLayout2_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsLayout2`,props:{providerName:{},providerIcon:{},providerIconColor:{},onBack:{type:Function}},setup(__props){return(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$14,[createBaseVNode(`div`,{text:`60`,class:normalizeClass(_ctx.providerIcon||_ctx.providerIconColor)},null,2)])),[[_directive_motion]])],64)}}}),ProviderSettingsLayout2_default=ProviderSettingsLayout2_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$13={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":``};var ProviderSettingsLayout_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsLayout`,props:{providerName:{},providerIcon:{},providerIconColor:{},onBack:{type:Function}},setup(__props){return(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$13,[createBaseVNode(`div`,{text:`60`,class:normalizeClass(_ctx.providerIcon||_ctx.providerIconColor)},null,2)])),[[_directive_motion]])],64)}}}),ProviderSettingsLayout_default=ProviderSettingsLayout_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$12={"w-full":``,"rounded-xl":``},_hoisted_2$6={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},_hoisted_3$3={class:`inline-flex items-center gap-4`},_hoisted_4$3={flex:`~ col gap-4`},_hoisted_5$3=[`placeholder`],_hoisted_6$3=[`placeholder`],_hoisted_7$2={flex:`~ col gap-6`},_hoisted_8$2={grid:`~ cols-2 gap-4`},_hoisted_9$2={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_10$1={class:`text-xs text-neutral-500 dark:text-neutral-400`},_hoisted_11$1=[`value`],_hoisted_12$1={flex:`~ row`,"gap-4":``},_hoisted_13$1=[`disabled`],_hoisted_14$1={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_15$1={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_16$1={key:2,class:`mt-2 text-sm text-red-500`},_hoisted_17$1={key:3,class:`mt-2 text-sm text-red-500`},_hoisted_18$1={key:4,class:`mt-2 text-sm text-red-500`},_hoisted_19$1=[`src`];var SpeechPlayground_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SpeechPlayground`,props:{defaultText:{},availableVoices:{},generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(__props,{expose:__expose}){let props=__props,{t}=useI18n(),testText=ref(props.defaultText||`Hello! This is a test of the voice synthesis.`),isGenerating=ref(!1),audioUrl=ref(``),errorMessage=ref(``),audioPlayer=ref(null),useSSML=ref(!1),ssmlText=ref(``),selectedVoice=ref(``);watch(()=>props.availableVoices,newVoices=>{newVoices.length>0&&!selectedVoice.value&&(selectedVoice.value=newVoices[0]?.id||``)},{immediate:!0});async function handleGenerateTestSpeech(){if(!(!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value)){isGenerating.value=!0,errorMessage.value=``;try{audioUrl.value&&stopTestAudio();let input=useSSML.value?ssmlText.value:testText.value,response=await props.generateSpeech(input,selectedVoice.value,useSSML.value);audioUrl.value=URL.createObjectURL(new Blob([response])),setTimeout(()=>{audioPlayer.value&&audioPlayer.value.play()},100)}catch(error){console.error(`Error generating speech:`,error),errorMessage.value=error instanceof Error?error.message:`An unknown error occurred`}finally{isGenerating.value=!1}}}function stopTestAudio(){audioPlayer.value&&(audioPlayer.value.pause(),audioPlayer.value.currentTime=0),audioUrl.value&&(URL.revokeObjectURL(audioUrl.value),audioUrl.value=``)}return onUnmounted(()=>{audioUrl.value&&URL.revokeObjectURL(audioUrl.value)}),__expose({testText,ssmlText,useSSML,selectedVoice,isGenerating,audioUrl,errorMessage,audioPlayer,generateTestSpeech:handleGenerateTestSpeech,stopTestAudio}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$12,[createBaseVNode(`h2`,_hoisted_2$6,[createBaseVNode(`div`,_hoisted_3$3,[createVNode(unref(TestDummyMarker_default)),createBaseVNode(`div`,null,toDisplayString(unref(t)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),createBaseVNode(`div`,_hoisted_4$3,[createVNode(unref(FieldCheckbox_default),{modelValue:useSSML.value,"onUpdate:modelValue":_cache$1[0]||=$event=>useSSML.value=$event,label:unref(t)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label`),description:unref(t)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description`)},null,8,[`modelValue`,`label`,`description`]),useSSML.value?withDirectives((openBlock(),createElementBlock(`textarea`,{key:1,"onUpdate:modelValue":_cache$1[2]||=$event=>ssmlText.value=$event,placeholder:unref(t)(`settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-48":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"font-mono":``,"outline-none":``},null,8,_hoisted_6$3)),[[vModelText,ssmlText.value]]):withDirectives((openBlock(),createElementBlock(`textarea`,{key:0,"onUpdate:modelValue":_cache$1[1]||=$event=>testText.value=$event,placeholder:unref(t)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-24":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"outline-none":``},null,8,_hoisted_5$3)),[[vModelText,testText.value]]),createBaseVNode(`div`,_hoisted_7$2,[createBaseVNode(`label`,_hoisted_8$2,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_9$2,toDisplayString(unref(t)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label`)),1),createBaseVNode(`div`,_hoisted_10$1,toDisplayString(unref(t)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description`)),1)]),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":_cache$1[3]||=$event=>selectedVoice.value=$event,border:`neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600`,transition:`border duration-250 ease-in-out`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``},[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.availableVoices,voice=>(openBlock(),createElementBlock(`option`,{key:voice.id,value:voice.id},toDisplayString(voice.name),9,_hoisted_11$1))),128))],512),[[vModelSelect,selectedVoice.value]])])]),createBaseVNode(`div`,_hoisted_12$1,[createBaseVNode(`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:isGenerating.value||!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value||!_ctx.apiKeyConfigured,class:normalizeClass({"opacity-50 cursor-not-allowed":isGenerating.value||!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value||!_ctx.apiKeyConfigured}),bg:`neutral-700 dark:neutral-300`,onClick:handleGenerateTestSpeech},[createBaseVNode(`div`,_hoisted_14$1,[_cache$1[4]||=createBaseVNode(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),createBaseVNode(`span`,null,toDisplayString(isGenerating.value?unref(t)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):unref(t)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,_hoisted_13$1),audioUrl.value?(openBlock(),createElementBlock(`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:stopTestAudio},[createBaseVNode(`div`,_hoisted_15$1,[_cache$1[5]||=createBaseVNode(`div`,{"i-solar:stop-circle-bold-duotone":``},null,-1),createBaseVNode(`span`,null,toDisplayString(unref(t)(`settings.pages.modules.speech.sections.section.playground.buttons.stop.label`)),1)])])):createCommentVNode(``,!0)]),_ctx.apiKeyConfigured?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_16$1,toDisplayString(unref(t)(`settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key`)),1)),selectedVoice.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_17$1,toDisplayString(unref(t)(`settings.pages.modules.speech.sections.section.playground.select-voice.required`)),1)),errorMessage.value?(openBlock(),createElementBlock(`div`,_hoisted_18$1,toDisplayString(errorMessage.value),1)):createCommentVNode(``,!0),audioUrl.value?(openBlock(),createElementBlock(`audio`,{key:5,ref_key:`audioPlayer`,ref:audioPlayer,src:audioUrl.value,controls:``,class:`mt-2 w-full`},null,8,_hoisted_19$1)):createCommentVNode(``,!0)]),renderSlot(_ctx.$slots,`default`)]))}}),SpeechPlayground_default=SpeechPlayground_vue_vue_type_script_setup_true_lang_default,XSAIError$2=class extends Error{response;constructor(message$1,response){super(message$1),this.name=`XSAIError`,this.response=response}};const strCamelToSnake$2=str=>str.replace(/[A-Z]/g,s$1=>`_${s$1.toLowerCase()}`),objCamelToSnake$1=obj=>Object.fromEntries(Object.entries(obj).map(([k$4,v$2])=>[strCamelToSnake$2(k$4),v$2])),clean$2=obj=>Object.fromEntries(Object.entries(obj).filter(([,v$2])=>v$2!==void 0)),requestBody=body$2=>JSON.stringify(objCamelToSnake$1(clean$2({...body$2,abortSignal:void 0,apiKey:void 0,baseURL:void 0,fetch:void 0,headers:void 0}))),requestHeaders$1=(headers,apiKey)=>clean$2({Authorization:apiKey===void 0?void 0:`Bearer ${apiKey}`,...headers}),requestURL$1=(path,baseURL)=>{let base=baseURL.toString();return new URL(path,base.endsWith(`/`)?base:`${base}/`)},responseCatch$1=async res=>{if(!res.ok)throw new XSAIError$2(`Remote sent ${res.status} response: ${await res.text()}`,res);if(!res.body)throw new XSAIError$2(`Response body is empty from remote server`,res);if(!(res.body instanceof ReadableStream))throw new XSAIError$2(`Expected Response body to be a ReadableStream, but got ${String(res.body)}; Content Type is ${res.headers.get(`Content-Type`)}`,res);return res},responseJSON$1=async res=>responseCatch$1(res).then(async res2=>{let text$5=await res2.text();try{return JSON.parse(text$5)}catch{throw Error(`Failed to parse response, response body: ${text$5}`)}}),generateSpeech=async options$1=>(options$1.fetch??globalThis.fetch)(requestURL$1(`audio/speech`,options$1.baseURL),{body:requestBody(options$1),headers:requestHeaders$1({"Content-Type":`application/json`,...options$1.headers},options$1.apiKey),method:`POST`,signal:options$1.abortSignal}).then(responseCatch$1).then(async res=>res.arrayBuffer());function calculateVolumeWithLinearNormalize(analyser){let dataBuffer=new Uint8Array(analyser.frequencyBinCount);analyser.getByteFrequencyData(dataBuffer);let volumeVector=[];for(let i$1=0;i$1<700;i$1+=80)volumeVector.push(dataBuffer[i$1]);let volumeSum=dataBuffer.map(v$2=>v$2**1.2).map(v$2=>v$2*1.2).reduce((acc,cur)=>acc+cur,0);return volumeSum/dataBuffer.length/100}function calculateVolumeWithMinMaxNormalize(analyser){let dataBuffer=new Uint8Array(analyser.frequencyBinCount);analyser.getByteFrequencyData(dataBuffer);let volumeVector=[];for(let i$1=0;i$1<700;i$1+=80)volumeVector.push(dataBuffer[i$1]);let amplifiedVolumeVector=dataBuffer.map(v$2=>v$2**1.5),min$1=Math.min(...amplifiedVolumeVector),max$1=Math.max(...amplifiedVolumeVector),range=max$1-min$1,normalizedVolumeVector;normalizedVolumeVector=range===0?amplifiedVolumeVector.map(()=>0):amplifiedVolumeVector.map(v$2=>(v$2-min$1)/range);let volumeSum=normalizedVolumeVector.reduce((acc,cur)=>acc+cur,0);return volumeSum/dataBuffer.length}function calculateVolume(analyser,mode=`linear`){switch(mode){case`linear`:return calculateVolumeWithLinearNormalize(analyser);case`minmax`:return calculateVolumeWithMinMaxNormalize(analyser)}}const useAudioContext=defineStore(`AudioContext`,()=>{let audioContext=new AudioContext;return{audioContext,calculateVolume}}),useSpeakingStore=defineStore(`SpeakingStore`,()=>{let nowSpeakingAvatarBorderOpacityMin=30,nowSpeakingAvatarBorderOpacityMax=100,mouthOpenSize=ref(0),nowSpeaking=ref(!1),nowSpeakingAvatarBorderOpacity=computed(()=>nowSpeaking.value?(nowSpeakingAvatarBorderOpacityMin+(nowSpeakingAvatarBorderOpacityMax-nowSpeakingAvatarBorderOpacityMin)*mouthOpenSize.value)/100:nowSpeakingAvatarBorderOpacityMin);return{mouthOpenSize,nowSpeaking,nowSpeakingAvatarBorderOpacity}});async function*readableStreamToAsyncIterator(res,func){let reader=res.getReader();try{for(;;){let{done,value:value$1}=await reader.read();if(done)return;yield func(value$1)}}finally{reader.releaseLock()}}const isPlainObject$2=value$1=>value$1!=null&&Object.getPrototypeOf(value$1)===Object.prototype,merge$2=(defaults,user)=>{let merged={...defaults};if(!user)return merged;for(let[key$1,value$1]of Object.entries(user)){if(value$1===void 0)continue;if(isPlainObject$2(merged[key$1])&&isPlainObject$2(value$1)){merged[key$1]=merge$2(merged[key$1],value$1);continue}merged[key$1]=value$1}return merged},sleep$1=async delay=>new Promise(resolve$1=>setTimeout(resolve$1,delay));var States=function(States$1){return States$1.Literal=`literal`,States$1.Special=`special`,States$1}(States||{});function peek(array,index$1,offset$2){return index$1+offset$2<0||index$1+offset$2>=array.length-1?``:array[index$1+offset$2]}function useLlmmarkerParser(options$1){let state=States.Literal,buffer$1=``;return{async consume(textPart){for(let i$1=0;i$1`?(current+=peek(textPart,i$1,1),newState=States.Literal,i$1++):current===`<`?newState=States.Special:current===`>`&&(newState=States.Literal),state===States.Literal&&newState===States.Special?buffer$1!==``&&(await options$1.onLiteral?.(buffer$1),buffer$1=``):state===States.Special&&newState===States.Literal&&buffer$1!==``&&(buffer$1+=current,await options$1.onSpecial?.(buffer$1),buffer$1=``),state===States.Literal&&newState===States.Literal?(await options$1.onLiteral?.(current),buffer$1=``):state===States.Special&&newState===States.Literal?buffer$1=``:buffer$1+=current,state=newState}},async end(){buffer$1!==``&&(state===States.Literal?await options$1.onLiteral?.(buffer$1):buffer$1.endsWith(`|>`)&&await options$1.onSpecial?.(buffer$1))}}}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$3(definitions,space$1){let property={},normal={};for(let definition$29 of definitions)Object.assign(property,definition$29.property),Object.assign(normal,definition$29.normal);return new Schema(property,normal,space$1)}function normalize$1(value$1){return value$1.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$1)){if(value$1.charAt(4)===`-`){let rest=value$1.slice(5).replace(dash,camelcase);property=`data`+rest.charAt(0).toUpperCase()+rest.slice(1)}else{let rest=value$1.slice(4);if(!dash.test(rest)){let dashes=rest.replace(cap,kebab);dashes.charAt(0)!==`-`&&(dashes=`-`+dashes),value$1=`data`+dashes}}Type=DefinedInfo}return new Type(property,value$1)}function kebab($0){return`-`+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()}const html$1=merge$3([aria,html$4,xlink,xmlns,xml],`html`),svg=merge$3([aria,svg$1,xlink,xmlns,xml],`svg`),own$7={}.hasOwnProperty;function zwitch(key$1,options$1){let settings=options$1||{};function one$3(value$1,...parameters){let fn$6=one$3.invalid,handlers$3=one$3.handlers;if(value$1&&own$7.call(value$1,key$1)){let id$1=String(value$1[key$1]);fn$6=own$7.call(handlers$3,id$1)?handlers$3[id$1]:one$3.unknown}if(fn$6)return fn$6.call(this,value$1,...parameters)}return one$3.handlers=settings.handlers||{},one$3.invalid=settings.invalid,one$3.unknown=settings.unknown,one$3}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$1,options$1){if(value$1=value$1.replace(options$1.subset?charactersToExpressionCached(options$1.subset):defaultSubsetRegex,basic),options$1.subset||options$1.escapeOnly)return value$1;return value$1.replace(surrogatePairsRegex,surrogate).replace(controlCharactersRegex,basic);function surrogate(pair,index$1,all$3){return options$1.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all$3.charCodeAt(index$1+2),options$1)}function basic(character,index$1,all$3){return options$1.format(character.charCodeAt(0),all$3.charCodeAt(index$1+1),options$1)}}function charactersToExpressionCached(subset$4){let cached=subsetToRegexCache.get(subset$4);return cached||(cached=charactersToExpression(subset$4),subsetToRegexCache.set(subset$4,cached)),cached}function charactersToExpression(subset$4){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$6={}.hasOwnProperty,characters={};let key;for(key in characterEntitiesHtml4)own$6.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$6.call(characters,character)){let name$2=characters[character],value$1=`&`+name$2;return omit&&characterEntitiesLegacy.includes(name$2)&&!dangerous.includes(name$2)&&(!attribute||next&&next!==61&¬AlphanumericRegex.test(String.fromCharCode(next)))?value$1:value$1+`;`}return``}function formatSmart(code$1,next,options$1){let numeric=toHexadecimal(code$1,next,options$1.omitOptionalSemicolons),named$1;if((options$1.useNamedReferences||options$1.useShortestReferences)&&(named$1=toNamed(code$1,next,options$1.omitOptionalSemicolons,options$1.attribute)),(options$1.useShortestReferences||!named$1)&&options$1.useShortestReferences){let decimal=toDecimal(code$1,next,options$1.omitOptionalSemicolons);decimal.length|^->||--!>|`],commentEntitySubset=[`<`,`>`];function comment$1(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(_1,_2,_3,state){return``}function ccount(value$1,character){let source=String(value$1);if(typeof character!=`string`)throw TypeError(`Expected character`);let count$1=0,index$1=source.indexOf(character);for(;index$1!==-1;)count$1++,index$1=source.indexOf(character,index$1+character.length);return count$1}function stringify(values,options$1){let settings=options$1||{},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$1=/[ \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$1){return value$1.replace(re$1,``)===``}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(increment$1){return sibling;function sibling(parent,index$1,includeWhitespace){let siblings$2=parent?parent.children:emptyChildren$1,offset$2=(index$1||0)+increment$1,next=siblings$2[offset$2];if(!includeWhitespace)for(;next&&whitespace(next);)offset$2+=increment$1,next=siblings$2[offset$2];return next}}const own$5={}.hasOwnProperty;function omission(handlers$3){return omit;function omit(node$1,index$1,parent){return own$5.call(handlers$3,node$1.tagName)&&handlers$3[node$1.tagName](node$1,index$1,parent)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd:dd$1,dt:dt$2,head:headOrColgroupOrCaption,html:html$3,li:li$1,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr:tr$1});function headOrColgroupOrCaption(_$2,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(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function body$1(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function p(_$2,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$1(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`li`}function dt$2(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`))}function dd$1(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`)}function rubyElement(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`rp`||next.tagName===`rt`)}function optgroup(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`optgroup`}function option(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`option`||next.tagName===`optgroup`)}function thead(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`))}function tbody$1(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`)}function tfoot(_$2,index$1,parent){return!siblingAfter(parent,index$1)}function tr$1(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`tr`}function cells(_$2,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$1=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$1.has(child$1.tagName))return!1;seen$1.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:[[` +About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[I18nWarnCodes.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:`'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.`};function handleFlatJson(obj){if(!isObject(obj)||isMessageAST(obj))return obj;for(let key$1 in obj){if(!hasOwn$1(obj,key$1))continue;if(!key$1.includes(`.`))isObject(obj[key$1])&&handleFlatJson(obj[key$1]);else{let subKeys=key$1.split(`.`),lastIndex=subKeys.length-1,currentObj=obj,hasStringValue=!1;for(let i$1=0;i$1{if(`locale`in custom&&`resource`in custom){let{locale:locale$1,resource}=custom;locale$1?(ret[locale$1]=ret[locale$1]||create$1(),deepCopy(resource,ret[locale$1])):deepCopy(resource,ret)}else isString(custom)&&deepCopy(JSON.parse(custom),ret)}),messageResolver==null&&flatJson)for(let key$1 in ret)hasOwn$1(ret,key$1)&&handleFlatJson(ret[key$1]);return ret}function getComponentOptions(instance){return instance.type}function adjustI18nResources(gl,options$1,componentOptions){let messages=isObject(options$1.messages)?options$1.messages:create$1();`__i18nGlobal`in componentOptions&&(messages=getLocaleMessages(gl.locale.value,{messages,__i18n:componentOptions.__i18nGlobal}));let locales=Object.keys(messages);if(locales.length&&locales.forEach(locale=>{gl.mergeLocaleMessage(locale,messages[locale])}),isObject(options$1.datetimeFormats)){let locales$1=Object.keys(options$1.datetimeFormats);locales$1.length&&locales$1.forEach(locale=>{gl.mergeDateTimeFormat(locale,options$1.datetimeFormats[locale])})}if(isObject(options$1.numberFormats)){let locales$1=Object.keys(options$1.numberFormats);locales$1.length&&locales$1.forEach(locale=>{gl.mergeNumberFormat(locale,options$1.numberFormats[locale])})}}function createTextNode(key$1){return createVNode(Text,null,key$1,0)}const DEVTOOLS_META=`__INTLIFY_META__`,NOOP_RETURN_ARRAY=()=>[],NOOP_RETURN_FALSE=()=>!1;let composerID=0;function defineCoreMissingHandler(missing){return(ctx,locale,key$1,type)=>missing(locale,key$1,getCurrentInstance()||void 0,type)}const getMetaInfo=()=>{let instance=getCurrentInstance(),meta=null;return instance&&(meta=getComponentOptions(instance)[DEVTOOLS_META])?{[DEVTOOLS_META]:meta}:null};function createComposer(options$1={}){let{__root,__injectWithOption}=options$1,_isGlobal=__root===void 0,flatJson=options$1.flatJson,_ref=inBrowser?ref:shallowRef,_inheritLocale=isBoolean(options$1.inheritLocale)?options$1.inheritLocale:!0,_locale=_ref(__root&&_inheritLocale?__root.locale.value:isString(options$1.locale)?options$1.locale:DEFAULT_LOCALE),_fallbackLocale=_ref(__root&&_inheritLocale?__root.fallbackLocale.value:isString(options$1.fallbackLocale)||isArray$1(options$1.fallbackLocale)||isPlainObject$3(options$1.fallbackLocale)||options$1.fallbackLocale===!1?options$1.fallbackLocale:_locale.value),_messages=_ref(getLocaleMessages(_locale.value,options$1)),_datetimeFormats=_ref(isPlainObject$3(options$1.datetimeFormats)?options$1.datetimeFormats:{[_locale.value]:{}}),_numberFormats=_ref(isPlainObject$3(options$1.numberFormats)?options$1.numberFormats:{[_locale.value]:{}}),_missingWarn=__root?__root.missingWarn:isBoolean(options$1.missingWarn)||isRegExp(options$1.missingWarn)?options$1.missingWarn:!0,_fallbackWarn=__root?__root.fallbackWarn:isBoolean(options$1.fallbackWarn)||isRegExp(options$1.fallbackWarn)?options$1.fallbackWarn:!0,_fallbackRoot=__root?__root.fallbackRoot:isBoolean(options$1.fallbackRoot)?options$1.fallbackRoot:!0,_fallbackFormat=!!options$1.fallbackFormat,_missing=isFunction(options$1.missing)?options$1.missing:null,_runtimeMissing=isFunction(options$1.missing)?defineCoreMissingHandler(options$1.missing):null,_postTranslation=isFunction(options$1.postTranslation)?options$1.postTranslation:null,_warnHtmlMessage=__root?__root.warnHtmlMessage:isBoolean(options$1.warnHtmlMessage)?options$1.warnHtmlMessage:!0,_escapeParameter=!!options$1.escapeParameter,_modifiers=__root?__root.modifiers:isPlainObject$3(options$1.modifiers)?options$1.modifiers:{},_pluralRules=options$1.pluralRules||__root&&__root.pluralRules,_context$1,getCoreContext=()=>{_isGlobal&&setFallbackContext(null);let ctxOptions={version:VERSION,locale:_locale.value,fallbackLocale:_fallbackLocale.value,messages:_messages.value,modifiers:_modifiers,pluralRules:_pluralRules,missing:_runtimeMissing===null?void 0:_runtimeMissing,missingWarn:_missingWarn,fallbackWarn:_fallbackWarn,fallbackFormat:_fallbackFormat,unresolving:!0,postTranslation:_postTranslation===null?void 0:_postTranslation,warnHtmlMessage:_warnHtmlMessage,escapeParameter:_escapeParameter,messageResolver:options$1.messageResolver,messageCompiler:options$1.messageCompiler,__meta:{framework:`vue`}};ctxOptions.datetimeFormats=_datetimeFormats.value,ctxOptions.numberFormats=_numberFormats.value,ctxOptions.__datetimeFormatters=isPlainObject$3(_context$1)?_context$1.__datetimeFormatters:void 0,ctxOptions.__numberFormatters=isPlainObject$3(_context$1)?_context$1.__numberFormatters:void 0;let ctx=createCoreContext(ctxOptions);return _isGlobal&&setFallbackContext(ctx),ctx};_context$1=getCoreContext(),updateFallbackLocale(_context$1,_locale.value,_fallbackLocale.value);function trackReactivityValues(){return[_locale.value,_fallbackLocale.value,_messages.value,_datetimeFormats.value,_numberFormats.value]}let locale=computed({get:()=>_locale.value,set:val=>{_context$1.locale=val,_locale.value=val}}),fallbackLocale=computed({get:()=>_fallbackLocale.value,set:val=>{_context$1.fallbackLocale=val,_fallbackLocale.value=val,updateFallbackLocale(_context$1,_locale.value,val)}}),messages=computed(()=>_messages.value),datetimeFormats=computed(()=>_datetimeFormats.value),numberFormats=computed(()=>_numberFormats.value);function getPostTranslationHandler(){return isFunction(_postTranslation)?_postTranslation:null}function setPostTranslationHandler(handler){_postTranslation=handler,_context$1.postTranslation=handler}function getMissingHandler(){return _missing}function setMissingHandler(handler){handler!==null&&(_runtimeMissing=defineCoreMissingHandler(handler)),_missing=handler,_context$1.missing=_runtimeMissing}function isResolvedTranslateMessage(type,arg){return type!==`translate`||!arg.resolvedMessage}let wrapWithDeps=(fn$6,argumentParser,warnType,fallbackSuccess,fallbackFail,successCondition)=>{trackReactivityValues();let ret;try{__INTLIFY_PROD_DEVTOOLS__,_isGlobal||(_context$1.fallbackContext=__root?getFallbackContext():void 0),ret=fn$6(_context$1)}finally{__INTLIFY_PROD_DEVTOOLS__,_isGlobal||(_context$1.fallbackContext=void 0)}if(warnType!==`translate exists`&&isNumber(ret)&&ret===NOT_REOSLVED||warnType===`translate exists`&&!ret){let[key$1,arg2]=argumentParser();return __root&&_fallbackRoot?fallbackSuccess(__root):fallbackFail(key$1)}else if(successCondition(ret))return ret;else throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function t(...args){return wrapWithDeps(context$1=>Reflect.apply(translate,null,[context$1,...args]),()=>parseTranslateArgs(...args),`translate`,root$3=>Reflect.apply(root$3.t,root$3,[...args]),key$1=>key$1,val=>isString(val))}function rt$5(...args){let[arg1,arg2,arg3]=args;if(arg3&&!isObject(arg3))throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);return t(arg1,arg2,assign({resolvedMessage:!0},arg3||{}))}function d$2(...args){return wrapWithDeps(context$1=>Reflect.apply(datetime,null,[context$1,...args]),()=>parseDateTimeArgs(...args),`datetime format`,root$3=>Reflect.apply(root$3.d,root$3,[...args]),()=>MISSING_RESOLVE_VALUE,val=>isString(val)||isArray$1(val))}function n$2(...args){return wrapWithDeps(context$1=>Reflect.apply(number$1,null,[context$1,...args]),()=>parseNumberArgs(...args),`number format`,root$3=>Reflect.apply(root$3.n,root$3,[...args]),()=>MISSING_RESOLVE_VALUE,val=>isString(val)||isArray$1(val))}function normalize$3(values){return values.map(val=>isString(val)||isNumber(val)||isBoolean(val)?createTextNode(String(val)):val)}let interpolate$1=val=>val,processor={normalize:normalize$3,interpolate:interpolate$1,type:`vnode`};function translateVNode(...args){return wrapWithDeps(context$1=>{let ret,_context$2=context$1;try{_context$2.processor=processor,ret=Reflect.apply(translate,null,[_context$2,...args])}finally{_context$2.processor=null}return ret},()=>parseTranslateArgs(...args),`translate`,root$3=>root$3[TranslateVNodeSymbol](...args),key$1=>[createTextNode(key$1)],val=>isArray$1(val))}function numberParts(...args){return wrapWithDeps(context$1=>Reflect.apply(number$1,null,[context$1,...args]),()=>parseNumberArgs(...args),`number format`,root$3=>root$3[NumberPartsSymbol](...args),NOOP_RETURN_ARRAY,val=>isString(val)||isArray$1(val))}function datetimeParts(...args){return wrapWithDeps(context$1=>Reflect.apply(datetime,null,[context$1,...args]),()=>parseDateTimeArgs(...args),`datetime format`,root$3=>root$3[DatetimePartsSymbol](...args),NOOP_RETURN_ARRAY,val=>isString(val)||isArray$1(val))}function setPluralRules(rules){_pluralRules=rules,_context$1.pluralRules=_pluralRules}function te$3(key$1,locale$1){return wrapWithDeps(()=>{if(!key$1)return!1;let targetLocale=isString(locale$1)?locale$1:_locale.value,message$1=getLocaleMessage(targetLocale),resolved=_context$1.messageResolver(message$1,key$1);return isMessageAST(resolved)||isMessageFunction(resolved)||isString(resolved)},()=>[key$1],`translate exists`,root$3=>Reflect.apply(root$3.te,root$3,[key$1,locale$1]),NOOP_RETURN_FALSE,val=>isBoolean(val))}function resolveMessages(key$1){let messages$1=null,locales=fallbackWithLocaleChain(_context$1,_fallbackLocale.value,_locale.value);for(let i$1=0;i$1{_inheritLocale&&(_locale.value=val,_context$1.locale=val,updateFallbackLocale(_context$1,_locale.value,_fallbackLocale.value))}),watch(__root.fallbackLocale,val=>{_inheritLocale&&(_fallbackLocale.value=val,_context$1.fallbackLocale=val,updateFallbackLocale(_context$1,_locale.value,_fallbackLocale.value))}));let composer={id:composerID,locale,fallbackLocale,get inheritLocale(){return _inheritLocale},set inheritLocale(val){_inheritLocale=val,val&&__root&&(_locale.value=__root.locale.value,_fallbackLocale.value=__root.fallbackLocale.value,updateFallbackLocale(_context$1,_locale.value,_fallbackLocale.value))},get availableLocales(){return Object.keys(_messages.value).sort()},messages,get modifiers(){return _modifiers},get pluralRules(){return _pluralRules||{}},get isGlobal(){return _isGlobal},get missingWarn(){return _missingWarn},set missingWarn(val){_missingWarn=val,_context$1.missingWarn=_missingWarn},get fallbackWarn(){return _fallbackWarn},set fallbackWarn(val){_fallbackWarn=val,_context$1.fallbackWarn=_fallbackWarn},get fallbackRoot(){return _fallbackRoot},set fallbackRoot(val){_fallbackRoot=val},get fallbackFormat(){return _fallbackFormat},set fallbackFormat(val){_fallbackFormat=val,_context$1.fallbackFormat=_fallbackFormat},get warnHtmlMessage(){return _warnHtmlMessage},set warnHtmlMessage(val){_warnHtmlMessage=val,_context$1.warnHtmlMessage=val},get escapeParameter(){return _escapeParameter},set escapeParameter(val){_escapeParameter=val,_context$1.escapeParameter=val},t,getLocaleMessage,setLocaleMessage,mergeLocaleMessage,getPostTranslationHandler,setPostTranslationHandler,getMissingHandler,setMissingHandler,[SetPluralRulesSymbol]:setPluralRules};return composer.datetimeFormats=datetimeFormats,composer.numberFormats=numberFormats,composer.rt=rt$5,composer.te=te$3,composer.tm=tm$1,composer.d=d$2,composer.n=n$2,composer.getDateTimeFormat=getDateTimeFormat,composer.setDateTimeFormat=setDateTimeFormat,composer.mergeDateTimeFormat=mergeDateTimeFormat,composer.getNumberFormat=getNumberFormat,composer.setNumberFormat=setNumberFormat,composer.mergeNumberFormat=mergeNumberFormat,composer[InejctWithOptionSymbol]=__injectWithOption,composer[TranslateVNodeSymbol]=translateVNode,composer[DatetimePartsSymbol]=datetimeParts,composer[NumberPartsSymbol]=numberParts,composer}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:val=>val===`parent`||val===`global`,default:`parent`},i18n:{type:Object}};function getInterpolateArg({slots},keys$3){if(keys$3.length===1&&keys$3[0]===`default`){let ret=slots.default?slots.default():[];return ret.reduce((slot,current)=>[...slot,...current.type===Fragment?current.children:[current]],[])}else return keys$3.reduce((arg,key$1)=>{let slot=slots[key$1];return slot&&(arg[key$1]=slot()),arg},create$1())}function getFragmentableTag(){return Fragment}const TranslationImpl=defineComponent({name:`i18n-t`,props:assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:val=>isNumber(val)||!isNaN(val)}},baseFormatProps),setup(props,context$1){let{slots,attrs}=context$1,i18n$1=props.i18n||useI18n({useScope:props.scope,__useComponent:!0});return()=>{let keys$3=Object.keys(slots).filter(key$1=>key$1[0]!==`_`),options$1=create$1();props.locale&&(options$1.locale=props.locale),props.plural!==void 0&&(options$1.plural=isString(props.plural)?+props.plural:props.plural);let arg=getInterpolateArg(context$1,keys$3),children=i18n$1[TranslateVNodeSymbol](props.keypath,arg,options$1),assignedAttrs=assign(create$1(),attrs),tag=isString(props.tag)||isObject(props.tag)?props.tag:getFragmentableTag();return h(tag,assignedAttrs,children)}}}),Translation=TranslationImpl;function isVNode$1(target$1){return isArray$1(target$1)&&!isString(target$1[0])}function renderFormatter(props,context$1,slotKeys,partFormatter){let{slots,attrs}=context$1;return()=>{let options$1={part:!0},overrides=create$1();props.locale&&(options$1.locale=props.locale),isString(props.format)?options$1.key=props.format:isObject(props.format)&&(isString(props.format.key)&&(options$1.key=props.format.key),overrides=Object.keys(props.format).reduce((options$2,prop)=>slotKeys.includes(prop)?assign(create$1(),options$2,{[prop]:props.format[prop]}):options$2,create$1()));let parts=partFormatter(props.value,options$1,overrides),children=[options$1.key];isArray$1(parts)?children=parts.map((part,index$1)=>{let slot=slots[part.type],node$1=slot?slot({[part.type]:part.value,index:index$1,parts}):[part.value];return isVNode$1(node$1)&&(node$1[0].key=`${part.type}-${index$1}`),node$1}):isString(parts)&&(children=[parts]);let assignedAttrs=assign(create$1(),attrs),tag=isString(props.tag)||isObject(props.tag)?props.tag:getFragmentableTag();return h(tag,assignedAttrs,children)}}const NumberFormatImpl=defineComponent({name:`i18n-n`,props:assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(props,context$1){let i18n$1=props.i18n||useI18n({useScope:props.scope,__useComponent:!0});return renderFormatter(props,context$1,NUMBER_FORMAT_OPTIONS_KEYS,(...args)=>i18n$1[NumberPartsSymbol](...args))}}),NumberFormat=NumberFormatImpl;function getComposer$1(i18n$1,instance){let i18nInternal=i18n$1;if(i18n$1.mode===`composition`)return i18nInternal.__getInstance(instance)||i18n$1.global;{let vueI18n=i18nInternal.__getInstance(instance);return vueI18n==null?i18n$1.global.__composer:vueI18n.__composer}}function vTDirective(i18n$1){let _process=binding=>{let{instance,value:value$1}=binding;if(!instance||!instance.$)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);let composer=getComposer$1(i18n$1,instance.$),parsedValue=parseValue(value$1);return[Reflect.apply(composer.t,composer,[...makeParams(parsedValue)]),composer]},register=(el$1,binding)=>{let[textContent,composer]=_process(binding);inBrowser&&i18n$1.global===composer&&(el$1.__i18nWatcher=watch(composer.locale,()=>{binding.instance&&binding.instance.$forceUpdate()})),el$1.__composer=composer,el$1.textContent=textContent},unregister=el$1=>{inBrowser&&el$1.__i18nWatcher&&(el$1.__i18nWatcher(),el$1.__i18nWatcher=void 0,delete el$1.__i18nWatcher),el$1.__composer&&(el$1.__composer=void 0,delete el$1.__composer)},update=(el$1,{value:value$1})=>{if(el$1.__composer){let composer=el$1.__composer,parsedValue=parseValue(value$1);el$1.textContent=Reflect.apply(composer.t,composer,[...makeParams(parsedValue)])}},getSSRProps=binding=>{let[textContent]=_process(binding);return{textContent}};return{created:register,unmounted:unregister,beforeUpdate:update,getSSRProps}}function parseValue(value$1){if(isString(value$1))return{path:value$1};if(isPlainObject$3(value$1)){if(!(`path`in value$1))throw createI18nError(I18nErrorCodes.REQUIRED_VALUE,`path`);return value$1}else throw createI18nError(I18nErrorCodes.INVALID_VALUE)}function makeParams(value$1){let{path,locale,args,choice,plural}=value$1,options$1={},named$1=args||{};return isString(locale)&&(options$1.locale=locale),isNumber(choice)&&(options$1.plural=choice),isNumber(plural)&&(options$1.plural=plural),[path,named$1,options$1]}function apply(app,i18n$1,...options$1){let pluginOptions=isPlainObject$3(options$1[0])?options$1[0]:{},globalInstall=isBoolean(pluginOptions.globalInstall)?pluginOptions.globalInstall:!0;globalInstall&&([Translation.name,`I18nT`].forEach(name$2=>app.component(name$2,Translation)),[NumberFormat.name,`I18nN`].forEach(name$2=>app.component(name$2,NumberFormat)),[DatetimeFormat.name,`I18nD`].forEach(name$2=>app.component(name$2,DatetimeFormat))),app.directive(`t`,vTDirective(i18n$1))}const I18nInjectionKey=makeSymbol(`global-vue-i18n`);function createI18n(options$1={}){let __legacyMode=!1,__globalInjection=isBoolean(options$1.globalInjection)?options$1.globalInjection:!0,__instances=new Map,[globalScope,__global]=createGlobal(options$1,__legacyMode),symbol=makeSymbol(``);function __getInstance(component){return __instances.get(component)||null}function __setInstance(component,instance){__instances.set(component,instance)}function __deleteInstance(component){__instances.delete(component)}let i18n$1={get mode(){return`composition`},async install(app,...options$2){if(app.__VUE_I18N_SYMBOL__=symbol,app.provide(app.__VUE_I18N_SYMBOL__,i18n$1),isPlainObject$3(options$2[0])){let opts=options$2[0];i18n$1.__composerExtend=opts.__composerExtend,i18n$1.__vueI18nExtend=opts.__vueI18nExtend}let globalReleaseHandler=null;__globalInjection&&(globalReleaseHandler=injectGlobalFields(app,i18n$1.global)),apply(app,i18n$1,...options$2);let unmountApp=app.unmount;app.unmount=()=>{globalReleaseHandler&&globalReleaseHandler(),i18n$1.dispose(),unmountApp()}},get global(){return __global},dispose(){globalScope.stop()},__instances,__getInstance,__setInstance,__deleteInstance};return i18n$1}function useI18n(options$1={}){let instance=getCurrentInstance();if(instance==null)throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(!instance.isCE&&instance.appContext.app!=null&&!instance.appContext.app.__VUE_I18N_SYMBOL__)throw createI18nError(I18nErrorCodes.NOT_INSTALLED);let i18n$1=getI18nInstance(instance),gl=getGlobalComposer(i18n$1),componentOptions=getComponentOptions(instance),scope=getScope(options$1,componentOptions);if(scope===`global`)return adjustI18nResources(gl,options$1,componentOptions),gl;if(scope===`parent`){let composer$1=getComposer(i18n$1,instance,options$1.__useComponent);return composer$1??=gl,composer$1}let i18nInternal=i18n$1,composer=i18nInternal.__getInstance(instance);if(composer==null){let composerOptions=assign({},options$1);`__i18n`in componentOptions&&(composerOptions.__i18n=componentOptions.__i18n),gl&&(composerOptions.__root=gl),composer=createComposer(composerOptions),i18nInternal.__composerExtend&&(composer[DisposeSymbol]=i18nInternal.__composerExtend(composer)),setupLifeCycle(i18nInternal,instance,composer),i18nInternal.__setInstance(instance,composer)}return composer}function createGlobal(options$1,legacyMode){let scope=effectScope(),obj=scope.run(()=>createComposer(options$1));if(obj==null)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);return[scope,obj]}function getI18nInstance(instance){let i18n$1=inject(instance.isCE?I18nInjectionKey:instance.appContext.app.__VUE_I18N_SYMBOL__);if(!i18n$1)throw createI18nError(instance.isCE?I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE:I18nErrorCodes.UNEXPECTED_ERROR);return i18n$1}function getScope(options$1,componentOptions){return isEmptyObject(options$1)?`__i18n`in componentOptions?`local`:`global`:options$1.useScope?options$1.useScope:`local`}function getGlobalComposer(i18n$1){return i18n$1.mode===`composition`?i18n$1.global:i18n$1.global.__composer}function getComposer(i18n$1,target$1,useComponent=!1){let composer=null,root$3=target$1.root,current=getParentComponentInstance(target$1,useComponent);for(;current!=null;){let i18nInternal=i18n$1;if(i18n$1.mode===`composition`&&(composer=i18nInternal.__getInstance(current)),composer!=null||root$3===current)break;current=current.parent}return composer}function getParentComponentInstance(target$1,useComponent=!1){return target$1==null?null:useComponent&&target$1.vnode.ctx||target$1.parent}function setupLifeCycle(i18n$1,target$1,composer){let emitter=null;onMounted(()=>{},target$1),onUnmounted(()=>{let _composer=composer;i18n$1.__deleteInstance(target$1);let dispose$1=_composer[DisposeSymbol];dispose$1&&(dispose$1(),delete _composer[DisposeSymbol])},target$1)}const globalExportProps=[`locale`,`fallbackLocale`,`availableLocales`],globalExportMethods=[`t`,`rt`,`d`,`n`,`tm`,`te`];function injectGlobalFields(app,composer){let i18n$1=Object.create(null);globalExportProps.forEach(prop=>{let desc=Object.getOwnPropertyDescriptor(composer,prop);if(!desc)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);let wrap$2=isRef(desc.value)?{get(){return desc.value.value},set(val){desc.value.value=val}}:{get(){return desc.get&&desc.get()}};Object.defineProperty(i18n$1,prop,wrap$2)}),app.config.globalProperties.$i18n=i18n$1,globalExportMethods.forEach(method=>{let desc=Object.getOwnPropertyDescriptor(composer,method);if(!desc||!desc.value)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);Object.defineProperty(app.config.globalProperties,`$${method}`,desc)});let dispose$1=()=>{delete app.config.globalProperties.$i18n,globalExportMethods.forEach(method=>{delete app.config.globalProperties[`$${method}`]})};return dispose$1}const DatetimeFormatImpl=defineComponent({name:`i18n-d`,props:assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(props,context$1){let i18n$1=props.i18n||useI18n({useScope:props.scope,__useComponent:!0});return renderFormatter(props,context$1,DATETIME_FORMAT_OPTIONS_KEYS,(...args)=>i18n$1[DatetimePartsSymbol](...args))}}),DatetimeFormat=DatetimeFormatImpl;if(initFeatureFlags(),registerMessageCompiler(compile),registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain),__INTLIFY_PROD_DEVTOOLS__){let target$1=getGlobalThis();target$1.__INTLIFY__=!0,setDevToolsHook(target$1.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var ProviderApiKeyInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderApiKeyInput`,props:mergeModels({providerName:{},placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,{t}=useI18n(),modelValue=useModel(__props,`modelValue`),computedDescription=computed(()=>props.description||`API Key for ${props.providerName}`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:_ctx.label||unref(t)(`settings.pages.providers.common.fields.field.api-key.label`),description:computedDescription.value,placeholder:_ctx.placeholder,required:_ctx.required,type:`password`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderApiKeyInput_default=ProviderApiKeyInput_vue_vue_type_script_setup_true_lang_default,ProviderBaseUrlInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderBaseUrlInput`,props:mergeModels({placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:props.label||`Base URL`,description:props.description||`Custom base URL (optional)`,placeholder:props.placeholder,required:props.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderBaseUrlInput_default=ProviderBaseUrlInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$15={flex:`~ col gap-6`},_hoisted_2$6={flex:`~ row`,"items-center":``,"justify-between":``},_hoisted_3$3={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_4$3={text:`neutral-400 dark:neutral-500`};var ProviderBasicSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderBasicSettings`,props:{title:{},description:{},onReset:{type:Function}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$15,[createBaseVNode(`div`,_hoisted_2$6,[createBaseVNode(`div`,null,[createBaseVNode(`h2`,_hoisted_3$3,toDisplayString(_ctx.title||`Basic`),1),createBaseVNode(`div`,_hoisted_4$3,[createBaseVNode(`span`,null,toDisplayString(_ctx.description||`Essential settings`),1)])]),_ctx.onReset?(openBlock(),createElementBlock(`button`,{key:0,title:`Reset settings`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-2":``,transition:`all duration-250 ease-in-out`,text:`neutral-500 dark:neutral-400`,bg:`transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700`,onClick:_cache$1[0]||=(...args)=>_ctx.onReset&&_ctx.onReset(...args)},_cache$1[1]||=[createBaseVNode(`div`,{"i-solar:refresh-bold-duotone":``,"text-xl":``},null,-1)])):createCommentVNode(``,!0)]),renderSlot(_ctx.$slots,`default`)]))}}),ProviderBasicSettings_default=ProviderBasicSettings_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$14={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-6`};var ProviderSettingsContainer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsContainer`,setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$14,[renderSlot(_ctx.$slots,`default`)]))}}),ProviderSettingsContainer_default=ProviderSettingsContainer_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$13={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":``};var ProviderSettingsLayout2_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsLayout2`,props:{providerName:{},providerIcon:{},providerIconColor:{},onBack:{type:Function}},setup(__props){return(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$13,[createBaseVNode(`div`,{text:`60`,class:normalizeClass(_ctx.providerIcon||_ctx.providerIconColor)},null,2)])),[[_directive_motion]])],64)}}}),ProviderSettingsLayout2_default=ProviderSettingsLayout2_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$12={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":``};var ProviderSettingsLayout_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsLayout`,props:{providerName:{},providerIcon:{},providerIconColor:{},onBack:{type:Function}},setup(__props){return(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$12,[createBaseVNode(`div`,{text:`60`,class:normalizeClass(_ctx.providerIcon||_ctx.providerIconColor)},null,2)])),[[_directive_motion]])],64)}}}),ProviderSettingsLayout_default=ProviderSettingsLayout_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$11={"w-full":``,"rounded-xl":``},_hoisted_2$5={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},_hoisted_3$2={class:`inline-flex items-center gap-4`},_hoisted_4$2={flex:`~ col gap-4`},_hoisted_5$2=[`placeholder`],_hoisted_6$2=[`placeholder`],_hoisted_7$1={flex:`~ col gap-6`},_hoisted_8$1={grid:`~ cols-2 gap-4`},_hoisted_9$1={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_10$1={class:`text-xs text-neutral-500 dark:text-neutral-400`},_hoisted_11$1=[`value`],_hoisted_12$1={flex:`~ row`,"gap-4":``},_hoisted_13$1=[`disabled`],_hoisted_14$1={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_15$1={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_16$1={key:2,class:`mt-2 text-sm text-red-500`},_hoisted_17$1={key:3,class:`mt-2 text-sm text-red-500`},_hoisted_18$1={key:4,class:`mt-2 text-sm text-red-500`},_hoisted_19$1=[`src`];var SpeechPlayground_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SpeechPlayground`,props:{defaultText:{},availableVoices:{},generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(__props,{expose:__expose}){let props=__props,{t}=useI18n(),testText=ref(props.defaultText||`Hello! This is a test of the voice synthesis.`),isGenerating=ref(!1),audioUrl=ref(``),errorMessage=ref(``),audioPlayer=ref(null),useSSML=ref(!1),ssmlText=ref(``),selectedVoice=ref(``);watch(()=>props.availableVoices,newVoices=>{newVoices.length>0&&!selectedVoice.value&&(selectedVoice.value=newVoices[0]?.id||``)},{immediate:!0});async function handleGenerateTestSpeech(){if(!(!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value)){isGenerating.value=!0,errorMessage.value=``;try{audioUrl.value&&stopTestAudio();let input=useSSML.value?ssmlText.value:testText.value,response=await props.generateSpeech(input,selectedVoice.value,useSSML.value);audioUrl.value=URL.createObjectURL(new Blob([response])),setTimeout(()=>{audioPlayer.value&&audioPlayer.value.play()},100)}catch(error){console.error(`Error generating speech:`,error),errorMessage.value=error instanceof Error?error.message:`An unknown error occurred`}finally{isGenerating.value=!1}}}function stopTestAudio(){audioPlayer.value&&(audioPlayer.value.pause(),audioPlayer.value.currentTime=0),audioUrl.value&&(URL.revokeObjectURL(audioUrl.value),audioUrl.value=``)}return onUnmounted(()=>{audioUrl.value&&URL.revokeObjectURL(audioUrl.value)}),__expose({testText,ssmlText,useSSML,selectedVoice,isGenerating,audioUrl,errorMessage,audioPlayer,generateTestSpeech:handleGenerateTestSpeech,stopTestAudio}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$11,[createBaseVNode(`h2`,_hoisted_2$5,[createBaseVNode(`div`,_hoisted_3$2,[createVNode(unref(TestDummyMarker_default)),createBaseVNode(`div`,null,toDisplayString(unref(t)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),createBaseVNode(`div`,_hoisted_4$2,[createVNode(unref(FieldCheckbox_default),{modelValue:useSSML.value,"onUpdate:modelValue":_cache$1[0]||=$event=>useSSML.value=$event,label:unref(t)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label`),description:unref(t)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description`)},null,8,[`modelValue`,`label`,`description`]),useSSML.value?withDirectives((openBlock(),createElementBlock(`textarea`,{key:1,"onUpdate:modelValue":_cache$1[2]||=$event=>ssmlText.value=$event,placeholder:unref(t)(`settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-48":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"font-mono":``,"outline-none":``},null,8,_hoisted_6$2)),[[vModelText,ssmlText.value]]):withDirectives((openBlock(),createElementBlock(`textarea`,{key:0,"onUpdate:modelValue":_cache$1[1]||=$event=>testText.value=$event,placeholder:unref(t)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-24":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"outline-none":``},null,8,_hoisted_5$2)),[[vModelText,testText.value]]),createBaseVNode(`div`,_hoisted_7$1,[createBaseVNode(`label`,_hoisted_8$1,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_9$1,toDisplayString(unref(t)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label`)),1),createBaseVNode(`div`,_hoisted_10$1,toDisplayString(unref(t)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description`)),1)]),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":_cache$1[3]||=$event=>selectedVoice.value=$event,border:`neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600`,transition:`border duration-250 ease-in-out`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``},[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.availableVoices,voice=>(openBlock(),createElementBlock(`option`,{key:voice.id,value:voice.id},toDisplayString(voice.name),9,_hoisted_11$1))),128))],512),[[vModelSelect,selectedVoice.value]])])]),createBaseVNode(`div`,_hoisted_12$1,[createBaseVNode(`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:isGenerating.value||!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value||!_ctx.apiKeyConfigured,class:normalizeClass({"opacity-50 cursor-not-allowed":isGenerating.value||!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value||!_ctx.apiKeyConfigured}),bg:`neutral-700 dark:neutral-300`,onClick:handleGenerateTestSpeech},[createBaseVNode(`div`,_hoisted_14$1,[_cache$1[4]||=createBaseVNode(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),createBaseVNode(`span`,null,toDisplayString(isGenerating.value?unref(t)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):unref(t)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,_hoisted_13$1),audioUrl.value?(openBlock(),createElementBlock(`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:stopTestAudio},[createBaseVNode(`div`,_hoisted_15$1,[_cache$1[5]||=createBaseVNode(`div`,{"i-solar:stop-circle-bold-duotone":``},null,-1),createBaseVNode(`span`,null,toDisplayString(unref(t)(`settings.pages.modules.speech.sections.section.playground.buttons.stop.label`)),1)])])):createCommentVNode(``,!0)]),_ctx.apiKeyConfigured?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_16$1,toDisplayString(unref(t)(`settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key`)),1)),selectedVoice.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_17$1,toDisplayString(unref(t)(`settings.pages.modules.speech.sections.section.playground.select-voice.required`)),1)),errorMessage.value?(openBlock(),createElementBlock(`div`,_hoisted_18$1,toDisplayString(errorMessage.value),1)):createCommentVNode(``,!0),audioUrl.value?(openBlock(),createElementBlock(`audio`,{key:5,ref_key:`audioPlayer`,ref:audioPlayer,src:audioUrl.value,controls:``,class:`mt-2 w-full`},null,8,_hoisted_19$1)):createCommentVNode(``,!0)]),renderSlot(_ctx.$slots,`default`)]))}}),SpeechPlayground_default=SpeechPlayground_vue_vue_type_script_setup_true_lang_default,XSAIError$2=class extends Error{response;constructor(message$1,response){super(message$1),this.name=`XSAIError`,this.response=response}};const strCamelToSnake$2=str=>str.replace(/[A-Z]/g,s$1=>`_${s$1.toLowerCase()}`),objCamelToSnake$1=obj=>Object.fromEntries(Object.entries(obj).map(([k$4,v$2])=>[strCamelToSnake$2(k$4),v$2])),clean$2=obj=>Object.fromEntries(Object.entries(obj).filter(([,v$2])=>v$2!==void 0)),requestBody=body$2=>JSON.stringify(objCamelToSnake$1(clean$2({...body$2,abortSignal:void 0,apiKey:void 0,baseURL:void 0,fetch:void 0,headers:void 0}))),requestHeaders$1=(headers,apiKey)=>clean$2({Authorization:apiKey===void 0?void 0:`Bearer ${apiKey}`,...headers}),requestURL$1=(path,baseURL)=>{let base=baseURL.toString();return new URL(path,base.endsWith(`/`)?base:`${base}/`)},responseCatch$1=async res=>{if(!res.ok)throw new XSAIError$2(`Remote sent ${res.status} response: ${await res.text()}`,res);if(!res.body)throw new XSAIError$2(`Response body is empty from remote server`,res);if(!(res.body instanceof ReadableStream))throw new XSAIError$2(`Expected Response body to be a ReadableStream, but got ${String(res.body)}; Content Type is ${res.headers.get(`Content-Type`)}`,res);return res},responseJSON$1=async res=>responseCatch$1(res).then(async res2=>{let text$5=await res2.text();try{return JSON.parse(text$5)}catch{throw Error(`Failed to parse response, response body: ${text$5}`)}}),generateSpeech=async options$1=>(options$1.fetch??globalThis.fetch)(requestURL$1(`audio/speech`,options$1.baseURL),{body:requestBody(options$1),headers:requestHeaders$1({"Content-Type":`application/json`,...options$1.headers},options$1.apiKey),method:`POST`,signal:options$1.abortSignal}).then(responseCatch$1).then(async res=>res.arrayBuffer());function calculateVolumeWithLinearNormalize(analyser){let dataBuffer=new Uint8Array(analyser.frequencyBinCount);analyser.getByteFrequencyData(dataBuffer);let volumeVector=[];for(let i$1=0;i$1<700;i$1+=80)volumeVector.push(dataBuffer[i$1]);let volumeSum=dataBuffer.map(v$2=>v$2**1.2).map(v$2=>v$2*1.2).reduce((acc,cur)=>acc+cur,0);return volumeSum/dataBuffer.length/100}function calculateVolumeWithMinMaxNormalize(analyser){let dataBuffer=new Uint8Array(analyser.frequencyBinCount);analyser.getByteFrequencyData(dataBuffer);let volumeVector=[];for(let i$1=0;i$1<700;i$1+=80)volumeVector.push(dataBuffer[i$1]);let amplifiedVolumeVector=dataBuffer.map(v$2=>v$2**1.5),min$1=Math.min(...amplifiedVolumeVector),max$1=Math.max(...amplifiedVolumeVector),range=max$1-min$1,normalizedVolumeVector;normalizedVolumeVector=range===0?amplifiedVolumeVector.map(()=>0):amplifiedVolumeVector.map(v$2=>(v$2-min$1)/range);let volumeSum=normalizedVolumeVector.reduce((acc,cur)=>acc+cur,0);return volumeSum/dataBuffer.length}function calculateVolume(analyser,mode=`linear`){switch(mode){case`linear`:return calculateVolumeWithLinearNormalize(analyser);case`minmax`:return calculateVolumeWithMinMaxNormalize(analyser)}}const useAudioContext=defineStore(`AudioContext`,()=>{let audioContext=new AudioContext;return{audioContext,calculateVolume}}),useSpeakingStore=defineStore(`SpeakingStore`,()=>{let nowSpeakingAvatarBorderOpacityMin=30,nowSpeakingAvatarBorderOpacityMax=100,mouthOpenSize=ref(0),nowSpeaking=ref(!1),nowSpeakingAvatarBorderOpacity=computed(()=>nowSpeaking.value?(nowSpeakingAvatarBorderOpacityMin+(nowSpeakingAvatarBorderOpacityMax-nowSpeakingAvatarBorderOpacityMin)*mouthOpenSize.value)/100:nowSpeakingAvatarBorderOpacityMin);return{mouthOpenSize,nowSpeaking,nowSpeakingAvatarBorderOpacity}});async function*readableStreamToAsyncIterator(res,func){let reader=res.getReader();try{for(;;){let{done,value:value$1}=await reader.read();if(done)return;yield func(value$1)}}finally{reader.releaseLock()}}const isPlainObject$2=value$1=>value$1!=null&&Object.getPrototypeOf(value$1)===Object.prototype,merge$2=(defaults,user)=>{let merged={...defaults};if(!user)return merged;for(let[key$1,value$1]of Object.entries(user)){if(value$1===void 0)continue;if(isPlainObject$2(merged[key$1])&&isPlainObject$2(value$1)){merged[key$1]=merge$2(merged[key$1],value$1);continue}merged[key$1]=value$1}return merged},sleep$1=async delay=>new Promise(resolve$1=>setTimeout(resolve$1,delay));var States=function(States$1){return States$1.Literal=`literal`,States$1.Special=`special`,States$1}(States||{});function peek(array,index$1,offset$2){return index$1+offset$2<0||index$1+offset$2>=array.length-1?``:array[index$1+offset$2]}function useLlmmarkerParser(options$1){let state=States.Literal,buffer$1=``;return{async consume(textPart){for(let i$1=0;i$1`?(current+=peek(textPart,i$1,1),newState=States.Literal,i$1++):current===`<`?newState=States.Special:current===`>`&&(newState=States.Literal),state===States.Literal&&newState===States.Special?buffer$1!==``&&(await options$1.onLiteral?.(buffer$1),buffer$1=``):state===States.Special&&newState===States.Literal&&buffer$1!==``&&(buffer$1+=current,await options$1.onSpecial?.(buffer$1),buffer$1=``),state===States.Literal&&newState===States.Literal?(await options$1.onLiteral?.(current),buffer$1=``):state===States.Special&&newState===States.Literal?buffer$1=``:buffer$1+=current,state=newState}},async end(){buffer$1!==``&&(state===States.Literal?await options$1.onLiteral?.(buffer$1):buffer$1.endsWith(`|>`)&&await options$1.onSpecial?.(buffer$1))}}}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$3(definitions,space$1){let property={},normal={};for(let definition$29 of definitions)Object.assign(property,definition$29.property),Object.assign(normal,definition$29.normal);return new Schema(property,normal,space$1)}function normalize$1(value$1){return value$1.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$1)){if(value$1.charAt(4)===`-`){let rest=value$1.slice(5).replace(dash,camelcase);property=`data`+rest.charAt(0).toUpperCase()+rest.slice(1)}else{let rest=value$1.slice(4);if(!dash.test(rest)){let dashes=rest.replace(cap,kebab);dashes.charAt(0)!==`-`&&(dashes=`-`+dashes),value$1=`data`+dashes}}Type=DefinedInfo}return new Type(property,value$1)}function kebab($0){return`-`+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()}const html$1=merge$3([aria,html$4,xlink,xmlns,xml],`html`),svg=merge$3([aria,svg$1,xlink,xmlns,xml],`svg`),own$7={}.hasOwnProperty;function zwitch(key$1,options$1){let settings=options$1||{};function one$3(value$1,...parameters){let fn$6=one$3.invalid,handlers$3=one$3.handlers;if(value$1&&own$7.call(value$1,key$1)){let id$1=String(value$1[key$1]);fn$6=own$7.call(handlers$3,id$1)?handlers$3[id$1]:one$3.unknown}if(fn$6)return fn$6.call(this,value$1,...parameters)}return one$3.handlers=settings.handlers||{},one$3.invalid=settings.invalid,one$3.unknown=settings.unknown,one$3}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$1,options$1){if(value$1=value$1.replace(options$1.subset?charactersToExpressionCached(options$1.subset):defaultSubsetRegex,basic),options$1.subset||options$1.escapeOnly)return value$1;return value$1.replace(surrogatePairsRegex,surrogate).replace(controlCharactersRegex,basic);function surrogate(pair,index$1,all$3){return options$1.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all$3.charCodeAt(index$1+2),options$1)}function basic(character,index$1,all$3){return options$1.format(character.charCodeAt(0),all$3.charCodeAt(index$1+1),options$1)}}function charactersToExpressionCached(subset$4){let cached=subsetToRegexCache.get(subset$4);return cached||(cached=charactersToExpression(subset$4),subsetToRegexCache.set(subset$4,cached)),cached}function charactersToExpression(subset$4){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$6={}.hasOwnProperty,characters={};let key;for(key in characterEntitiesHtml4)own$6.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$6.call(characters,character)){let name$2=characters[character],value$1=`&`+name$2;return omit&&characterEntitiesLegacy.includes(name$2)&&!dangerous.includes(name$2)&&(!attribute||next&&next!==61&¬AlphanumericRegex.test(String.fromCharCode(next)))?value$1:value$1+`;`}return``}function formatSmart(code$1,next,options$1){let numeric=toHexadecimal(code$1,next,options$1.omitOptionalSemicolons),named$1;if((options$1.useNamedReferences||options$1.useShortestReferences)&&(named$1=toNamed(code$1,next,options$1.omitOptionalSemicolons,options$1.attribute)),(options$1.useShortestReferences||!named$1)&&options$1.useShortestReferences){let decimal=toDecimal(code$1,next,options$1.omitOptionalSemicolons);decimal.length|^->||--!>|`],commentEntitySubset=[`<`,`>`];function comment$1(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(_1,_2,_3,state){return``}function ccount(value$1,character){let source=String(value$1);if(typeof character!=`string`)throw TypeError(`Expected character`);let count$1=0,index$1=source.indexOf(character);for(;index$1!==-1;)count$1++,index$1=source.indexOf(character,index$1+character.length);return count$1}function stringify(values,options$1){let settings=options$1||{},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$1=/[ \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$1){return value$1.replace(re$1,``)===``}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(increment$1){return sibling;function sibling(parent,index$1,includeWhitespace){let siblings$2=parent?parent.children:emptyChildren$1,offset$2=(index$1||0)+increment$1,next=siblings$2[offset$2];if(!includeWhitespace)for(;next&&whitespace(next);)offset$2+=increment$1,next=siblings$2[offset$2];return next}}const own$5={}.hasOwnProperty;function omission(handlers$3){return omit;function omit(node$1,index$1,parent){return own$5.call(handlers$3,node$1.tagName)&&handlers$3[node$1.tagName](node$1,index$1,parent)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd:dd$1,dt:dt$2,head:headOrColgroupOrCaption,html:html$3,li:li$1,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr:tr$1});function headOrColgroupOrCaption(_$2,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(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function body$1(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function p(_$2,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$1(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`li`}function dt$2(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`))}function dd$1(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`)}function rubyElement(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`rp`||next.tagName===`rt`)}function optgroup(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`optgroup`}function option(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`option`||next.tagName===`optgroup`)}function thead(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`))}function tbody$1(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`)}function tfoot(_$2,index$1,parent){return!siblingAfter(parent,index$1)}function tr$1(_$2,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`tr`}function cells(_$2,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$1=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$1.has(child$1.tagName))return!1;seen$1.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 @@ -4988,31 +4988,11 @@ void main() { * https://github.com/pixiv/three-vrm/blob/release/LICENSE */ function toTrianglesDrawMode(geometry,drawMode){if(drawMode===TrianglesDrawMode)return console.warn(`THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.`),geometry;if(drawMode===TriangleFanDrawMode||drawMode===TriangleStripDrawMode){let index$1=geometry.getIndex();if(index$1===null){let indices=[],position$2=geometry.getAttribute(`position`);if(position$2!==void 0){for(let i$1=0;i$1=2.0 are supported.`));return}let parser=new GLTFParser(json,{path:path||this.resourcePath||``,crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});parser.fileLoader.setRequestHeader(this.requestHeader);for(let i$1=0;i$1=0&&plugins[extensionName]===void 0&&console.warn(`THREE.GLTFLoader: Unknown extension "`+extensionName+`".`)}}parser.setExtensions(extensions),parser.setPlugins(plugins),parser.parse(onLoad,onError)}parseAsync(data$12,path){let scope=this;return new Promise(function(resolve$1,reject){scope.parse(data$12,path,resolve$1,reject)})}};function GLTFRegistry(){let objects={};return{get:function(key$1){return objects[key$1]},add:function(key$1,object){objects[key$1]=object},remove:function(key$1){delete objects[key$1]},removeAll:function(){objects={}}}}const EXTENSIONS={KHR_BINARY_GLTF:`KHR_binary_glTF`,KHR_DRACO_MESH_COMPRESSION:`KHR_draco_mesh_compression`,KHR_LIGHTS_PUNCTUAL:`KHR_lights_punctual`,KHR_MATERIALS_CLEARCOAT:`KHR_materials_clearcoat`,KHR_MATERIALS_DISPERSION:`KHR_materials_dispersion`,KHR_MATERIALS_IOR:`KHR_materials_ior`,KHR_MATERIALS_SHEEN:`KHR_materials_sheen`,KHR_MATERIALS_SPECULAR:`KHR_materials_specular`,KHR_MATERIALS_TRANSMISSION:`KHR_materials_transmission`,KHR_MATERIALS_IRIDESCENCE:`KHR_materials_iridescence`,KHR_MATERIALS_ANISOTROPY:`KHR_materials_anisotropy`,KHR_MATERIALS_UNLIT:`KHR_materials_unlit`,KHR_MATERIALS_VOLUME:`KHR_materials_volume`,KHR_TEXTURE_BASISU:`KHR_texture_basisu`,KHR_TEXTURE_TRANSFORM:`KHR_texture_transform`,KHR_MESH_QUANTIZATION:`KHR_mesh_quantization`,KHR_MATERIALS_EMISSIVE_STRENGTH:`KHR_materials_emissive_strength`,EXT_MATERIALS_BUMP:`EXT_materials_bump`,EXT_TEXTURE_WEBP:`EXT_texture_webp`,EXT_TEXTURE_AVIF:`EXT_texture_avif`,EXT_MESHOPT_COMPRESSION:`EXT_meshopt_compression`,EXT_MESH_GPU_INSTANCING:`EXT_mesh_gpu_instancing`};var GLTFLightsExtension=class{constructor(parser){this.parser=parser,this.name=EXTENSIONS.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let parser=this.parser,nodeDefs=this.parser.json.nodes||[];for(let nodeIndex=0,nodeLength=nodeDefs.length;nodeIndex=0)throw Error(`THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures`);return null}return parser.loadTextureImage(textureIndex,extension$1.source,loader$1)}},GLTFTextureWebPExtension=class{constructor(parser){this.parser=parser,this.name=EXTENSIONS.EXT_TEXTURE_WEBP}loadTexture(textureIndex){let name$2=this.name,parser=this.parser,json=parser.json,textureDef=json.textures[textureIndex];if(!textureDef.extensions||!textureDef.extensions[name$2])return null;let extension$1=textureDef.extensions[name$2],source=json.images[extension$1.source],loader$1=parser.textureLoader;if(source.uri){let handler=parser.options.manager.getHandler(source.uri);handler!==null&&(loader$1=handler)}return parser.loadTextureImage(textureIndex,extension$1.source,loader$1)}},GLTFTextureAVIFExtension=class{constructor(parser){this.parser=parser,this.name=EXTENSIONS.EXT_TEXTURE_AVIF}loadTexture(textureIndex){let name$2=this.name,parser=this.parser,json=parser.json,textureDef=json.textures[textureIndex];if(!textureDef.extensions||!textureDef.extensions[name$2])return null;let extension$1=textureDef.extensions[name$2],source=json.images[extension$1.source],loader$1=parser.textureLoader;if(source.uri){let handler=parser.options.manager.getHandler(source.uri);handler!==null&&(loader$1=handler)}return parser.loadTextureImage(textureIndex,extension$1.source,loader$1)}},GLTFMeshoptCompression=class{constructor(parser){this.name=EXTENSIONS.EXT_MESHOPT_COMPRESSION,this.parser=parser}loadBufferView(index$1){let json=this.parser.json,bufferView=json.bufferViews[index$1];if(bufferView.extensions&&bufferView.extensions[this.name]){let extensionDef=bufferView.extensions[this.name],buffer$1=this.parser.getDependency(`buffer`,extensionDef.buffer),decoder=this.parser.options.meshoptDecoder;if(!decoder||!decoder.supported){if(json.extensionsRequired&&json.extensionsRequired.indexOf(this.name)>=0)throw Error(`THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files`);return null}return buffer$1.then(function(res){let byteOffset=extensionDef.byteOffset||0,byteLength=extensionDef.byteLength||0,count$1=extensionDef.count,stride=extensionDef.byteStride,source=new Uint8Array(res,byteOffset,byteLength);return decoder.decodeGltfBufferAsync?decoder.decodeGltfBufferAsync(count$1,stride,source,extensionDef.mode,extensionDef.filter).then(function(res$1){return res$1.buffer}):decoder.ready.then(function(){let result=new ArrayBuffer(count$1*stride);return decoder.decodeGltfBuffer(new Uint8Array(result),count$1,stride,source,extensionDef.mode,extensionDef.filter),result})})}else return null}},GLTFMeshGpuInstancing=class{constructor(parser){this.name=EXTENSIONS.EXT_MESH_GPU_INSTANCING,this.parser=parser}createNodeMesh(nodeIndex){let json=this.parser.json,nodeDef=json.nodes[nodeIndex];if(!nodeDef.extensions||!nodeDef.extensions[this.name]||nodeDef.mesh===void 0)return null;let meshDef=json.meshes[nodeDef.mesh];for(let primitive of meshDef.primitives)if(primitive.mode!==WEBGL_CONSTANTS.TRIANGLES&&primitive.mode!==WEBGL_CONSTANTS.TRIANGLE_STRIP&&primitive.mode!==WEBGL_CONSTANTS.TRIANGLE_FAN&&primitive.mode!==void 0)return null;let extensionDef=nodeDef.extensions[this.name],attributesDef=extensionDef.attributes,pending=[],attributes={};for(let key$1 in attributesDef)pending.push(this.parser.getDependency(`accessor`,attributesDef[key$1]).then(accessor=>(attributes[key$1]=accessor,attributes[key$1])));return pending.length<1?null:(pending.push(this.parser.createNodeMesh(nodeIndex)),Promise.all(pending).then(results=>{let nodeObject=results.pop(),meshes=nodeObject.isGroup?nodeObject.children:[nodeObject],count$1=results[0].count,instancedMeshes=[];for(let mesh of meshes){let m$3=new Matrix4,p$5=new Vector3,q$2=new Quaternion,s$1=new Vector3(1,1,1),instancedMesh=new InstancedMesh(mesh.geometry,mesh.material,count$1);for(let i$1=0;i$10||uri.search(/^data\:image\/jpeg/)===0?`image/jpeg`:uri.search(/\.webp($|\?)/i)>0||uri.search(/^data\:image\/webp/)===0?`image/webp`:uri.search(/\.ktx2($|\?)/i)>0||uri.search(/^data\:image\/ktx2/)===0?`image/ktx2`:`image/png`}const _identityMatrix=new Matrix4;var GLTFParser=class{constructor(json={},options$1={}){this.json=json,this.extensions={},this.plugins={},this.options=options$1,this.cache=new GLTFRegistry,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let isSafari=!1,safariVersion=-1,isFirefox=!1,firefoxVersion=-1;if(typeof navigator<`u`){let userAgent=navigator.userAgent;isSafari=/^((?!chrome|android).)*safari/i.test(userAgent)===!0;let safariMatch=userAgent.match(/Version\/(\d+)/);safariVersion=isSafari&&safariMatch?parseInt(safariMatch[1],10):-1,isFirefox=userAgent.indexOf(`Firefox`)>-1,firefoxVersion=isFirefox?userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>`u`||isSafari&&safariVersion<17||isFirefox&&firefoxVersion<98?this.textureLoader=new TextureLoader(this.options.manager):this.textureLoader=new ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new FileLoader(this.options.manager),this.fileLoader.setResponseType(`arraybuffer`),this.options.crossOrigin===`use-credentials`&&this.fileLoader.setWithCredentials(!0)}setExtensions(extensions){this.extensions=extensions}setPlugins(plugins){this.plugins=plugins}parse(onLoad,onError){let parser=this,json=this.json,extensions=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(ext){return ext._markDefs&&ext._markDefs()}),Promise.all(this._invokeAll(function(ext){return ext.beforeRoot&&ext.beforeRoot()})).then(function(){return Promise.all([parser.getDependencies(`scene`),parser.getDependencies(`animation`),parser.getDependencies(`camera`)])}).then(function(dependencies){let result={scene:dependencies[0][json.scene||0],scenes:dependencies[0],animations:dependencies[1],cameras:dependencies[2],asset:json.asset,parser,userData:{}};return addUnknownExtensionsToUserData(extensions,result,json),assignExtrasToUserData(result,json),Promise.all(parser._invokeAll(function(ext){return ext.afterRoot&&ext.afterRoot(result)})).then(function(){for(let scene of result.scenes)scene.updateMatrixWorld();onLoad(result)})}).catch(onError)}_markDefs(){let nodeDefs=this.json.nodes||[],skinDefs=this.json.skins||[],meshDefs=this.json.meshes||[];for(let skinIndex=0,skinLength=skinDefs.length;skinIndex{let mappings=this.associations.get(original);mappings!=null&&this.associations.set(clone$2,mappings);for(let[i$1,child]of original.children.entries())updateMappings(child,clone$2.children[i$1])};return updateMappings(object,ref$1),ref$1.name+=`_instance_`+ cache$1.uses[index$1]++,ref$1}_invokeOne(func){let extensions=Object.values(this.plugins);extensions.push(this);for(let i$1=0;i$1=2&&bufferAttribute.setY(index$1,sparseValues[i$1*itemSize+1]),itemSize>=3&&bufferAttribute.setZ(index$1,sparseValues[i$1*itemSize+2]),itemSize>=4&&bufferAttribute.setW(index$1,sparseValues[i$1*itemSize+3]),itemSize>=5)throw Error(`THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.`)}bufferAttribute.normalized=normalized}return bufferAttribute})}loadTexture(textureIndex){let json=this.json,options$1=this.options,textureDef=json.textures[textureIndex],sourceIndex=textureDef.source,sourceDef=json.images[sourceIndex],loader$1=this.textureLoader;if(sourceDef.uri){let handler=options$1.manager.getHandler(sourceDef.uri);handler!==null&&(loader$1=handler)}return this.loadTextureImage(textureIndex,sourceIndex,loader$1)}loadTextureImage(textureIndex,sourceIndex,loader$1){let parser=this,json=this.json,textureDef=json.textures[textureIndex],sourceDef=json.images[sourceIndex],cacheKey=(sourceDef.uri||sourceDef.bufferView)+`:`+textureDef.sampler;if(this.textureCache[cacheKey])return this.textureCache[cacheKey];let promise=this.loadImageSource(sourceIndex,loader$1).then(function(texture){texture.flipY=!1,texture.name=textureDef.name||sourceDef.name||``,texture.name===``&&typeof sourceDef.uri==`string`&&sourceDef.uri.startsWith(`data:image/`)===!1&&(texture.name=sourceDef.uri);let samplers=json.samplers||{},sampler=samplers[textureDef.sampler]||{};return texture.magFilter=WEBGL_FILTERS[sampler.magFilter]||LinearFilter,texture.minFilter=WEBGL_FILTERS[sampler.minFilter]||LinearMipmapLinearFilter,texture.wrapS=WEBGL_WRAPPINGS[sampler.wrapS]||RepeatWrapping,texture.wrapT=WEBGL_WRAPPINGS[sampler.wrapT]||RepeatWrapping,texture.generateMipmaps=!texture.isCompressedTexture&&texture.minFilter!==NearestFilter&&texture.minFilter!==LinearFilter,parser.associations.set(texture,{textures:textureIndex}),texture}).catch(function(){return null});return this.textureCache[cacheKey]=promise,promise}loadImageSource(sourceIndex,loader$1){let parser=this,json=this.json,options$1=this.options;if(this.sourceCache[sourceIndex]!==void 0)return this.sourceCache[sourceIndex].then(texture=>texture.clone());let sourceDef=json.images[sourceIndex],URL$1=self.URL||self.webkitURL,sourceURI=sourceDef.uri||``,isObjectURL=!1;if(sourceDef.bufferView!==void 0)sourceURI=parser.getDependency(`bufferView`,sourceDef.bufferView).then(function(bufferView){isObjectURL=!0;let blob=new Blob([bufferView],{type:sourceDef.mimeType});return sourceURI=URL$1.createObjectURL(blob),sourceURI});else if(sourceDef.uri===void 0)throw Error(`THREE.GLTFLoader: Image `+sourceIndex+` is missing URI and bufferView`);let promise=Promise.resolve(sourceURI).then(function(sourceURI$1){return new Promise(function(resolve$1,reject){let onLoad=resolve$1;loader$1.isImageBitmapLoader===!0&&(onLoad=function(imageBitmap){let texture=new Texture(imageBitmap);texture.needsUpdate=!0,resolve$1(texture)}),loader$1.load(LoaderUtils.resolveURL(sourceURI$1,options$1.path),onLoad,void 0,reject)})}).then(function(texture){return isObjectURL===!0&&URL$1.revokeObjectURL(sourceURI),assignExtrasToUserData(texture,sourceDef),texture.userData.mimeType=sourceDef.mimeType||getImageURIMimeType(sourceDef.uri),texture}).catch(function(error){throw console.error(`THREE.GLTFLoader: Couldn't load texture`,sourceURI),error});return this.sourceCache[sourceIndex]=promise,promise}assignTexture(materialParams,mapName,mapDef,colorSpace){let parser=this;return this.getDependency(`texture`,mapDef.index).then(function(texture){if(!texture)return null;if(mapDef.texCoord!==void 0&&mapDef.texCoord>0&&(texture=texture.clone(),texture.channel=mapDef.texCoord),parser.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM]){let transform$1=mapDef.extensions===void 0?void 0:mapDef.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM];if(transform$1){let gltfReference=parser.associations.get(texture);texture=parser.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM].extendTexture(texture,transform$1),parser.associations.set(texture,gltfReference)}}return colorSpace!==void 0&&(texture.colorSpace=colorSpace),materialParams[mapName]=texture,texture})}assignFinalMaterial(mesh){let geometry=mesh.geometry,material=mesh.material,useDerivativeTangents=geometry.attributes.tangent===void 0,useVertexColors=geometry.attributes.color!==void 0,useFlatShading=geometry.attributes.normal===void 0;if(mesh.isPoints){let cacheKey=`PointsMaterial:`+material.uuid,pointsMaterial=this.cache.get(cacheKey);pointsMaterial||(pointsMaterial=new PointsMaterial,Material.prototype.copy.call(pointsMaterial,material),pointsMaterial.color.copy(material.color),pointsMaterial.map=material.map,pointsMaterial.sizeAttenuation=!1,this.cache.add(cacheKey,pointsMaterial)),material=pointsMaterial}else if(mesh.isLine){let cacheKey=`LineBasicMaterial:`+material.uuid,lineMaterial=this.cache.get(cacheKey);lineMaterial||(lineMaterial=new LineBasicMaterial,Material.prototype.copy.call(lineMaterial,material),lineMaterial.color.copy(material.color),lineMaterial.map=material.map,this.cache.add(cacheKey,lineMaterial)),material=lineMaterial}if(useDerivativeTangents||useVertexColors||useFlatShading){let cacheKey=`ClonedMaterial:`+material.uuid+`:`;useDerivativeTangents&&(cacheKey+=`derivative-tangents:`),useVertexColors&&(cacheKey+=`vertex-colors:`),useFlatShading&&(cacheKey+=`flat-shading:`);let cachedMaterial=this.cache.get(cacheKey);cachedMaterial||(cachedMaterial=material.clone(),useVertexColors&&(cachedMaterial.vertexColors=!0),useFlatShading&&(cachedMaterial.flatShading=!0),useDerivativeTangents&&(cachedMaterial.normalScale&&(cachedMaterial.normalScale.y*=-1),cachedMaterial.clearcoatNormalScale&&(cachedMaterial.clearcoatNormalScale.y*=-1)),this.cache.add(cacheKey,cachedMaterial),this.associations.set(cachedMaterial,this.associations.get(material))),material=cachedMaterial}mesh.material=material}getMaterialType(){return MeshStandardMaterial}loadMaterial(materialIndex){let parser=this,json=this.json,extensions=this.extensions,materialDef=json.materials[materialIndex],materialType,materialParams={},materialExtensions=materialDef.extensions||{},pending=[];if(materialExtensions[EXTENSIONS.KHR_MATERIALS_UNLIT]){let kmuExtension=extensions[EXTENSIONS.KHR_MATERIALS_UNLIT];materialType=kmuExtension.getMaterialType(),pending.push(kmuExtension.extendParams(materialParams,materialDef,parser))}else{let metallicRoughness=materialDef.pbrMetallicRoughness||{};if(materialParams.color=new Color(1,1,1),materialParams.opacity=1,Array.isArray(metallicRoughness.baseColorFactor)){let array=metallicRoughness.baseColorFactor;materialParams.color.setRGB(array[0],array[1],array[2],LinearSRGBColorSpace),materialParams.opacity=array[3]}metallicRoughness.baseColorTexture!==void 0&&pending.push(parser.assignTexture(materialParams,`map`,metallicRoughness.baseColorTexture,SRGBColorSpace)),materialParams.metalness=metallicRoughness.metallicFactor===void 0?1:metallicRoughness.metallicFactor,materialParams.roughness=metallicRoughness.roughnessFactor===void 0?1:metallicRoughness.roughnessFactor,metallicRoughness.metallicRoughnessTexture!==void 0&&(pending.push(parser.assignTexture(materialParams,`metalnessMap`,metallicRoughness.metallicRoughnessTexture)),pending.push(parser.assignTexture(materialParams,`roughnessMap`,metallicRoughness.metallicRoughnessTexture))),materialType=this._invokeOne(function(ext){return ext.getMaterialType&&ext.getMaterialType(materialIndex)}),pending.push(Promise.all(this._invokeAll(function(ext){return ext.extendMaterialParams&&ext.extendMaterialParams(materialIndex,materialParams)})))}materialDef.doubleSided===!0&&(materialParams.side=DoubleSide);let alphaMode=materialDef.alphaMode||ALPHA_MODES.OPAQUE;if(alphaMode===ALPHA_MODES.BLEND?(materialParams.transparent=!0,materialParams.depthWrite=!1):(materialParams.transparent=!1,alphaMode===ALPHA_MODES.MASK&&(materialParams.alphaTest=materialDef.alphaCutoff===void 0?.5:materialDef.alphaCutoff)),materialDef.normalTexture!==void 0&&materialType!==MeshBasicMaterial&&(pending.push(parser.assignTexture(materialParams,`normalMap`,materialDef.normalTexture)),materialParams.normalScale=new Vector2(1,1),materialDef.normalTexture.scale!==void 0)){let scale$1=materialDef.normalTexture.scale;materialParams.normalScale.set(scale$1,scale$1)}if(materialDef.occlusionTexture!==void 0&&materialType!==MeshBasicMaterial&&(pending.push(parser.assignTexture(materialParams,`aoMap`,materialDef.occlusionTexture)),materialDef.occlusionTexture.strength!==void 0&&(materialParams.aoMapIntensity=materialDef.occlusionTexture.strength)),materialDef.emissiveFactor!==void 0&&materialType!==MeshBasicMaterial){let emissiveFactor=materialDef.emissiveFactor;materialParams.emissive=new Color().setRGB(emissiveFactor[0],emissiveFactor[1],emissiveFactor[2],LinearSRGBColorSpace)}return materialDef.emissiveTexture!==void 0&&materialType!==MeshBasicMaterial&&pending.push(parser.assignTexture(materialParams,`emissiveMap`,materialDef.emissiveTexture,SRGBColorSpace)),Promise.all(pending).then(function(){let material=new materialType(materialParams);return materialDef.name&&(material.name=materialDef.name),assignExtrasToUserData(material,materialDef),parser.associations.set(material,{materials:materialIndex}),materialDef.extensions&&addUnknownExtensionsToUserData(extensions,material,materialDef),material})}createUniqueName(originalName){let sanitizedName=PropertyBinding.sanitizeNodeName(originalName||``);return sanitizedName in this.nodeNamesUsed?sanitizedName+`_`+ ++this.nodeNamesUsed[sanitizedName]:(this.nodeNamesUsed[sanitizedName]=0,sanitizedName)}loadGeometries(primitives){let parser=this,extensions=this.extensions,cache$1=this.primitiveCache;function createDracoPrimitive(primitive){return extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(primitive,parser).then(function(geometry){return addPrimitiveAttributes(geometry,primitive,parser)})}let pending=[];for(let i$1=0,il$1=primitives.length;i$10&&updateMorphTargets(mesh,meshDef),mesh.name=parser.createUniqueName(meshDef.name||`mesh_`+meshIndex),assignExtrasToUserData(mesh,meshDef),primitive.extensions&&addUnknownExtensionsToUserData(extensions,mesh,primitive),parser.assignFinalMaterial(mesh),meshes.push(mesh)}for(let i$1=0,il$1=meshes.length;i$11?new Group:objects.length===1?objects[0]:new Object3D,node$1!==objects[0])for(let i$1=0,il$1=objects.length;i$11){let mapping=parser.associations.get(node$1);parser.associations.set(node$1,{...mapping})}return parser.associations.get(node$1).nodes=nodeIndex,node$1}),this.nodeCache[nodeIndex]}loadScene(sceneIndex){let extensions=this.extensions,sceneDef=this.json.scenes[sceneIndex],parser=this,scene=new Group;sceneDef.name&&(scene.name=parser.createUniqueName(sceneDef.name)),assignExtrasToUserData(scene,sceneDef),sceneDef.extensions&&addUnknownExtensionsToUserData(extensions,scene,sceneDef);let nodeIds=sceneDef.nodes||[],pending=[];for(let i$1=0,il$1=nodeIds.length;i$1{let reducedAssociations=new Map;for(let[key$1,value$1]of parser.associations)(key$1 instanceof Material||key$1 instanceof Texture)&&reducedAssociations.set(key$1,value$1);return node$1.traverse(node$2=>{let mappings=parser.associations.get(node$2);mappings!=null&&reducedAssociations.set(node$2,mappings)}),reducedAssociations};return parser.associations=reduceAssociations(scene),scene})}_createAnimationTracks(node$1,inputAccessor,outputAccessor,sampler,target$1){let tracks=[],targetName=node$1.name?node$1.name:node$1.uuid,targetNames=[];PATH_PROPERTIES[target$1.path]===PATH_PROPERTIES.weights?node$1.traverse(function(object){object.morphTargetInfluences&&targetNames.push(object.name?object.name:object.uuid)}):targetNames.push(targetName);let TypedKeyframeTrack;switch(PATH_PROPERTIES[target$1.path]){case PATH_PROPERTIES.weights:TypedKeyframeTrack=NumberKeyframeTrack;break;case PATH_PROPERTIES.rotation:TypedKeyframeTrack=QuaternionKeyframeTrack;break;case PATH_PROPERTIES.translation:case PATH_PROPERTIES.scale:TypedKeyframeTrack=VectorKeyframeTrack;break;default:switch(outputAccessor.itemSize){case 1:TypedKeyframeTrack=NumberKeyframeTrack;break;case 2:case 3:default:TypedKeyframeTrack=VectorKeyframeTrack;break}break}let interpolation=sampler.interpolation===void 0?InterpolateLinear:INTERPOLATION[sampler.interpolation],outputArray=this._getArrayFromAccessor(outputAccessor);for(let j$1=0,jl$1=targetNames.length;j$1new VRMLoaderPlugin(parser)),loader.register(parser=>new VRMAnimationLoaderPlugin(parser)),loader)}async function loadVRMAnimation(url){let loader$1=useVRMLoader(),gltf=await loader$1.loadAsync(url),userData=gltf.userData;if(!userData.vrmAnimations){console.warn(`No VRM animations found in the .vrma file`);return}if(userData.vrmAnimations.length===0){console.warn(`No VRM animations found in the .vrma file`);return}return userData.vrmAnimations[0]}async function clipFromVRMAnimation(vrm,animation){if(!vrm){console.warn(`No VRM found`);return}if(animation)return createVRMAnimationClip(animation,vrm)}function useBlink(){let isBlinking=ref(!1),blinkProgress=ref(0),timeSinceLastBlink=ref(0),BLINK_DURATION=.2,MIN_BLINK_INTERVAL=1,MAX_BLINK_INTERVAL=6,nextBlinkTime=ref(Math.random()*(MAX_BLINK_INTERVAL-MIN_BLINK_INTERVAL)+MIN_BLINK_INTERVAL);function update(vrm,delta){if(vrm?.expressionManager&&(timeSinceLastBlink.value+=delta,!isBlinking.value&&timeSinceLastBlink.value>=nextBlinkTime.value&&(isBlinking.value=!0,blinkProgress.value=0),isBlinking.value)){blinkProgress.value+=delta/BLINK_DURATION;let blinkValue=Math.sin(Math.PI*blinkProgress.value);vrm.expressionManager.setValue(`blink`,blinkValue),blinkProgress.value>=1&&(isBlinking.value=!1,timeSinceLastBlink.value=0,vrm.expressionManager.setValue(`blink`,0),nextBlinkTime.value=Math.random()*(MAX_BLINK_INTERVAL-MIN_BLINK_INTERVAL)+MIN_BLINK_INTERVAL)}}return{update}}function useIdleEyeSaccades(){let nextSaccadeAfter=-1,fixationTarget,timeSinceLastSaccade=0;function updateFixationTarget(){fixationTarget?fixationTarget.set(randFloat(-.25,.25),randFloat(-.2,.15),-.65):fixationTarget=new Vector3(randFloat(-.25,.25),randFloat(-.2,.15),-.65)}function update(vrm,delta){!vrm?.expressionManager||!vrm.lookAt||(timeSinceLastSaccade>=nextSaccadeAfter?(updateFixationTarget(),timeSinceLastSaccade=0,nextSaccadeAfter=randomSaccadeInterval()/1e3):fixationTarget||updateFixationTarget(),vrm.lookAt.target||(vrm.lookAt.target=new Object3D),vrm.lookAt.target.position.lerp(fixationTarget,randFloat(.2,.5)),vrm.lookAt?.update(delta),timeSinceLastSaccade+=delta)}return{update}}async function loadVrm(model,options$1){let loader$1=useVRMLoader(),gltf=await loader$1.loadAsync(model,progress$1=>options$1?.onProgress?.(progress$1)),userData=gltf.userData;if(!userData.vrm)return;let _vrm=userData.vrm;if(VRMUtils.removeUnnecessaryVertices(_vrm.scene),VRMUtils.combineSkeletons(_vrm.scene),_vrm.scene.traverse(object=>{object.frustumCulled=!1}),options$1?.lookAt&&_vrm.lookAt){let lookAtQuatProxy=new VRMLookAtQuaternionProxy(_vrm.lookAt);lookAtQuatProxy.name=`lookAtQuaternionProxy`,_vrm.scene.add(lookAtQuatProxy)}return options$1?.scene&&options$1.scene.add(_vrm.scene),options$1?.position&&_vrm.scene.position.set(...options$1.position),_vrm}function useVRMEmote(vrm){let currentEmotion=ref(null),isTransitioning=ref(!1),transitionProgress=ref(0),currentExpressionValues=ref(new Map),targetExpressionValues=ref(new Map),resetTimeout=ref(),lerp$3=(start,end,t)=>start+(end-start)*t,easeInOutCubic=t=>t<.5?4*t*t*t:1-(-2*t+2)**3/2,emotionStates=new Map([[`happy`,{expression:[{name:`happy`,value:1,duration:.3},{name:`aa`,value:.3}],blendDuration:.3}],[`sad`,{expression:[{name:`sad`,value:1},{name:`oh`,value:.2}],blendDuration:.3}],[`angry`,{expression:[{name:`angry`,value:1},{name:`ee`,value:.4}],blendDuration:.2}],[`surprised`,{expression:[{name:`Surprised`,value:1},{name:`oh`,value:.6}],blendDuration:.1}],[`neutral`,{expression:[{name:`neutral`,value:1}],blendDuration:.5}]]),clearResetTimeout=()=>{resetTimeout.value&&(clearTimeout(resetTimeout.value),resetTimeout.value=void 0)},setEmotion=emotionName=>{if(clearResetTimeout(),!emotionStates.has(emotionName)){console.warn(`Emotion ${emotionName} not found`);return}let emotionState=emotionStates.get(emotionName);if(currentEmotion.value=emotionName,isTransitioning.value=!0,transitionProgress.value=0,vrm.expressionManager){let expressionNames=Object.keys(vrm.expressionManager.expressionMap);for(let name$2 of expressionNames)vrm.expressionManager.setValue(name$2,0)}currentExpressionValues.value.clear(),targetExpressionValues.value.clear();for(let expr of emotionState.expression||[]){let currentValue=vrm.expressionManager?.getValue(expr.name)||0;currentExpressionValues.value.set(expr.name,currentValue),targetExpressionValues.value.set(expr.name,expr.value)}},setEmotionWithResetAfter=(emotionName,ms$1)=>{clearResetTimeout(),setEmotion(emotionName),resetTimeout.value=setTimeout(()=>{setEmotion(`neutral`),resetTimeout.value=void 0},ms$1)},update=deltaTime=>{if(!isTransitioning.value||!currentEmotion.value)return;let emotionState=emotionStates.get(currentEmotion.value),blendDuration=emotionState.blendDuration||.3;transitionProgress.value+=deltaTime/blendDuration,transitionProgress.value>=1&&(transitionProgress.value=1,isTransitioning.value=!1);for(let[exprName,targetValue]of targetExpressionValues.value){let startValue=currentExpressionValues.value.get(exprName)||0,currentValue=lerp$3(startValue,targetValue,easeInOutCubic(transitionProgress.value));vrm.expressionManager?.setValue(exprName,currentValue)}},addEmotionState=(emotionName,state)=>{emotionStates.set(emotionName,state)},removeEmotionState=emotionName=>{emotionStates.delete(emotionName)},dispose$1=()=>{clearResetTimeout()};return{currentEmotion,isTransitioning,setEmotion,setEmotionWithResetAfter,update,addEmotionState,removeEmotionState,dispose:dispose$1}}function useWhisper(url,options$1){let opts=merge$2({onLoading:()=>{},onInitiate:()=>{},onProgress:()=>{},onDone:()=>{},onReady:()=>{},onStart:()=>{},onUpdate:()=>{},onComplete:()=>{}},options$1),{post:whisperPost,data:whisperData,terminate}=useWebWorker(url,{type:`module`}),status=ref(null),loadingMessage=ref(``),loadingProgress=ref([]),transcribing=ref(!1),tps=ref(0),result=ref(``);return watch(whisperData,e$3=>{switch(e$3.status){case`loading`:status.value=`loading`,loadingMessage.value=e$3.data,opts.onLoading?.(e$3.data);break;case`initiate`:loadingProgress.value.push(e$3),opts.onInitiate?.(e$3);break;case`progress`:loadingProgress.value=loadingProgress.value.map(item=>item.file===e$3.file?{...item,...e$3}:item),opts.onProgress?.(e$3);break;case`done`:loadingProgress.value=loadingProgress.value.filter(item=>item.file!==e$3.file),opts.onDone?.(e$3);break;case`ready`:status.value=`ready`,opts.onReady?.();break;case`start`:transcribing.value=!0,opts.onStart?.();break;case`update`:tps.value=e$3.tps,opts.onUpdate?.(e$3.tps);break;case`complete`:transcribing.value=!1,result.value=e$3.output[0]||``,console.debug(`Whisper result:`,result.value),opts.onComplete?.(e$3.output[0]);break}}),onUnmounted(()=>{terminate()}),{transcribe:message$1=>whisperPost(message$1),status,loadingMessage,loadingProgress,transcribing,tps,result,load:()=>whisperPost({type:`load`}),terminate}}const listModels=async options$1=>(options$1.fetch??globalThis.fetch)(requestURL$1(`models`,options$1.baseURL),{headers:requestHeaders$1(options$1.headers,options$1.apiKey),signal:options$1.abortSignal}).then(responseJSON$1).then(({data:data$12})=>data$12),chat=async options$1=>(options$1.fetch??globalThis.fetch)(requestURL$1(`chat/completions`,options$1.baseURL),{body:requestBody({...options$1,tools:options$1.tools?.map(tool$1=>({function:clean$2({...tool$1.function,returns:void 0}),type:`function`}))}),headers:requestHeaders$1({"Content-Type":`application/json`,...options$1.headers},options$1.apiKey),method:`POST`,signal:options$1.abortSignal}).then(responseCatch$1),determineStepType=({finishReason,maxSteps,stepsLength,toolCallsLength})=>{if(stepsLength===0)return`initial`;if(stepsLength0&&finishReason===`tool_calls`)return`tool-result`;if(![`error`,`length`].includes(finishReason))return`continue`}return`done`},wrapToolResult=result=>typeof result==`string`||Array.isArray(result)&&result.every(item=>!!(typeof item==`object`&&`type`in item&&[`audio`,`image`,`text`].includes(item.type)))?result:JSON.stringify(result),executeTool=async({abortSignal,messages,toolCall,tools:tools$2})=>{let tool$1=tools$2?.find(tool2=>tool2.function.name===toolCall.function.name);if(!tool$1){let availableTools=tools$2?.map(tool2=>tool2.function.name),availableToolsErrorMsg=availableTools==null||availableTools.length===0?`No tools are available`:`Available tools: ${availableTools.join(`, `)}`;throw Error(`Model tried to call unavailable tool "${toolCall.function.name}", ${availableToolsErrorMsg}.`)}let toolCallId=toolCall.id,toolName=toolCall.function.name,parsedArgs=JSON.parse(toolCall.function.arguments),result=wrapToolResult(await tool$1.execute(parsedArgs,{abortSignal,messages,toolCallId})),completionToolCall={args:toolCall.function.arguments,toolCallId,toolCallType:toolCall.type,toolName},completionToolResult={args:parsedArgs,result,toolCallId,toolName},message$1={content:result,role:`tool`,tool_call_id:toolCallId};return{completionToolCall,completionToolResult,message:message$1,parsedArgs,result,toolName}},strCamelToSnake$1=str=>str.replace(/[A-Z]/g,s$1=>`_${s$1.toLowerCase()}`),objCamelToSnake$2=obj=>Object.fromEntries(Object.entries(obj).map(([k$4,v$2])=>[strCamelToSnake$1(k$4),v$2]));var XSAIError$1=class extends Error{response;constructor(message$1,response){super(message$1),this.name=`XSAIError`,this.response=response}};const CHUNK_HEADER_PREFIX=`data:`,parseChunk=text$5=>{if(!text$5||!text$5.startsWith(CHUNK_HEADER_PREFIX))return[void 0,!1];let content$2=text$5.slice(5),data$12=content$2.startsWith(` `)?content$2.slice(1):content$2;if(data$12===`[DONE]`)return[void 0,!0];if(data$12.startsWith(`{`)&&data$12.includes(`"error":`))throw Error(`Error from server: ${data$12}`);let chunk=JSON.parse(data$12);return[chunk,!1]},streamText=async options$1=>{let chunkCtrl,stepCtrl,textCtrl,chunkStream=new ReadableStream({start:controller=>chunkCtrl=controller}),stepStream=new ReadableStream({start:controller=>stepCtrl=controller}),textStream=new ReadableStream({start:controller=>textCtrl=controller}),maxSteps=options$1.maxSteps??1,decoder=new TextDecoder,steps$1=[],stepOne=async options2=>{let step={choices:[],finishReason:`error`,messages:structuredClone(options2.messages),stepType:`initial`,toolCalls:[],toolResults:[]},choiceState={},buffer$1=``,finishReason,usage,shouldOutputText=!0,endToolCallByIndex=(state,idx)=>{state.endedToolCallIndex.has(idx)||(state.endedToolCallIndex.add(idx),state.currentToolIndex=null)};if(await chat({...options2,maxSteps:void 0,stream:!0,streamOptions:options2.streamOptions==null?void 0:objCamelToSnake$2(options2.streamOptions)}).then(async res=>res.body.pipeThrough(new TransformStream({transform:async(chunk,controller)=>{let text$5=decoder.decode(chunk,{stream:!0});buffer$1+=text$5;let lines=buffer$1.split(` -`);buffer$1=lines.pop()??``;for(let line of lines)try{let[chunk2,isEnd]=parseChunk(line);if(isEnd)break;chunk2&&controller.enqueue(chunk2)}catch(error){controller.error(error)}}})).pipeTo(new WritableStream({abort:reason=>{chunkCtrl.error(reason),stepCtrl.error(reason),textCtrl.error(reason)},close:()=>{options2.onEvent?.({finishReason,type:`finish`,usage})},write:async chunk=>{if(options2.onChunk?.(chunk),chunkCtrl.enqueue(chunk),usage=chunk.usage,chunk.choices==null||chunk.choices.length===0)return;let choice=chunk.choices[0];choice.delta.tool_calls&&(shouldOutputText=!1);let{delta,finish_reason,index:index$1,...rest}=choice,choiceSnapshot=step.choices[index$1]??={finishReason:finish_reason,index:index$1,message:{role:`assistant`}};if(finish_reason!==void 0){if(finishReason=finish_reason,step.finishReason=finish_reason,choiceSnapshot.finishReason=finish_reason,finish_reason===`length`)throw new XSAIError$1(`length exceeded`);if(finish_reason===`content_filter`)throw new XSAIError$1(`content filter`)}Object.assign(choiceSnapshot,rest);let{content:content$2,refusal,tool_calls,...rests}=delta,message$1=choiceSnapshot.message;Object.assign(message$1,rests),refusal!==void 0&&(message$1.refusal=(message$1.refusal||``)+(refusal||``),options2.onEvent?.({refusal:message$1.refusal,type:`refusal`})),content$2!==void 0&&(message$1.content=(message$1.content||``)+(content$2||``),shouldOutputText&&textCtrl?.enqueue(content$2),options2.onEvent?.({text:content$2,type:`text-delta`}));for(let tool_call of tool_calls||[]){options2.onEvent?.({toolCall:tool_call,type:`tool-call-delta`});let{function:fn$6,id:id$1,index:index2,type}=tool_call;message$1.toolCalls??={};let toolCall=message$1.toolCalls[index2]??={function:{arguments:``,name:fn$6.name,parsedArguments:{}},id:id$1,index:index2,type};toolCall.function.arguments+=fn$6.arguments}let state=choiceState[index$1]??={calledToolCallIndex:new Set,currentToolIndex:null,endedToolCallIndex:new Set,index:index$1,toolCallErrors:{},toolCallResults:{}};finish_reason&&state.currentToolIndex!==null&&endToolCallByIndex(state,state.currentToolIndex);for(let toolCall of delta.tool_calls||[])state.currentToolIndex!==toolCall.index&&state.currentToolIndex!==null&&endToolCallByIndex(state,state.currentToolIndex),state.calledToolCallIndex.add(toolCall.index),state.currentToolIndex=toolCall.index}}))),step.messages.push({content:step.choices[0]?.message.content??``,refusal:step.choices[0]?.message.refusal,role:`assistant`,tool_calls:Object.values(step.choices[0]?.message.toolCalls??{}).map(toolCall=>({function:{arguments:toolCall.function.arguments,name:toolCall.function.name},id:toolCall.id,index:toolCall.index,type:toolCall.type}))}),await Promise.allSettled(step.choices.map(async choice=>{let state=choiceState[choice.index];return Promise.allSettled([...state.endedToolCallIndex].map(async idx=>{let toolCall=choice.message.toolCalls[idx];if(step.toolCalls.push({args:toolCall.function.arguments,toolCallId:toolCall.id,toolCallType:`function`,toolName:toolCall.function.name}),!state.toolCallResults[toolCall.id]){options2.onEvent?.({toolCall,type:`tool-call`});try{let{completionToolResult,message:message$1,parsedArgs,result}=await executeTool({abortSignal:options2.abortSignal,messages:options2.messages,toolCall,tools:options2.tools});toolCall.function.parsedArguments=parsedArgs,state.toolCallResults[toolCall.id]=result,step.messages.push(message$1),step.toolResults.push(completionToolResult),options2.onEvent?.({id:toolCall.id,result,type:`tool-call-result`})}catch(error){state.toolCallErrors[idx]=error}}}))})),step.stepType=determineStepType({finishReason:step.finishReason,maxSteps,stepsLength:steps$1.length,toolCallsLength:step.toolCalls.length}),steps$1.push(step),stepCtrl.enqueue(step),options2.onStepFinish?.(step),!shouldOutputText)return async()=>stepOne({...options2,messages:step.messages})},invokeFunctionCalls=async()=>{let ret=await stepOne(options$1);for(;typeof ret==`function`&&steps$1.length{chunkCtrl.error(error),stepCtrl.error(error),textCtrl.error(error)}),Promise.resolve({chunkStream,stepStream,textStream})},strictJsonSchema=schema=>({...schema,additionalProperties:!1}),missingDependenciesUrl=`https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies`,tryImport=async(result,name$2)=>{try{return await result}catch{throw Error(`xsschema: Missing dependencies "${name$2}". see ${missingDependenciesUrl}`)}},getToJsonSchemaFn=async vendor=>{switch(vendor){case`arktype`:return __vitePreload(()=>import(`./arktype-C-GObzDh-o7JLSWxh.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`effect`:return __vitePreload(()=>import(`./effect-DBSVVF8G-CH9BzHgp.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`sury`:return __vitePreload(()=>import(`./sury-GtnkadyM-BJxUNG_3.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`valibot`:return __vitePreload(()=>import(`./valibot-CbgwcZn_-DF-kgftH.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`zod`:return __vitePreload(()=>import(`./zod-CD8IEU5z-BtqngZG1.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());default:throw Error(`xsschema: Unsupported schema vendor "${vendor}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},toJsonSchema=async schema=>getToJsonSchemaFn(schema[`~standard`].vendor).then(async toJsonSchema2=>toJsonSchema2(schema)),tool=async({description,execute,name:name$2,parameters})=>{let schema=await toJsonSchema(parameters);return{execute,function:{description,name:name$2,parameters:strictJsonSchema(schema),strict:!0},type:`function`}};var util;(function(util$1){util$1.assertEqual=_$2=>{};function assertIs(_arg){}util$1.assertIs=assertIs;function assertNever(_x$1){throw Error()}util$1.assertNever=assertNever,util$1.arrayToEnum=items=>{let obj={};for(let item of items)obj[item]=item;return obj},util$1.getValidEnumValues=obj=>{let validKeys=util$1.objectKeys(obj).filter(k$4=>typeof obj[obj[k$4]]!=`number`),filtered={};for(let k$4 of validKeys)filtered[k$4]=obj[k$4];return util$1.objectValues(filtered)},util$1.objectValues=obj=>util$1.objectKeys(obj).map(function(e$3){return obj[e$3]}),util$1.objectKeys=typeof Object.keys==`function`?obj=>Object.keys(obj):object=>{let keys$3=[];for(let key$1 in object)Object.prototype.hasOwnProperty.call(object,key$1)&&keys$3.push(key$1);return keys$3},util$1.find=(arr,checker)=>{for(let item of arr)if(checker(item))return item},util$1.isInteger=typeof Number.isInteger==`function`?val=>Number.isInteger(val):val=>typeof val==`number`&&Number.isFinite(val)&&Math.floor(val)===val;function joinValues(array,separator=` | `){return array.map(val=>typeof val==`string`?`'${val}'`:val).join(separator)}util$1.joinValues=joinValues,util$1.jsonStringifyReplacer=(_$2,value$1)=>typeof value$1==`bigint`?value$1.toString():value$1})(util||={});var objectUtil;(function(objectUtil$1){objectUtil$1.mergeShapes=(first,second)=>({...first,...second})})(objectUtil||={});const ZodParsedType=util.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),getParsedType=data$12=>{let t=typeof data$12;switch(t){case`undefined`:return ZodParsedType.undefined;case`string`:return ZodParsedType.string;case`number`:return Number.isNaN(data$12)?ZodParsedType.nan:ZodParsedType.number;case`boolean`:return ZodParsedType.boolean;case`function`:return ZodParsedType.function;case`bigint`:return ZodParsedType.bigint;case`symbol`:return ZodParsedType.symbol;case`object`:return Array.isArray(data$12)?ZodParsedType.array:data$12===null?ZodParsedType.null:data$12.then&&typeof data$12.then==`function`&&data$12.catch&&typeof data$12.catch==`function`?ZodParsedType.promise:typeof Map<`u`&&data$12 instanceof Map?ZodParsedType.map:typeof Set<`u`&&data$12 instanceof Set?ZodParsedType.set:typeof Date<`u`&&data$12 instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]);var ZodError=class ZodError extends Error{get errors(){return this.issues}constructor(issues){super(),this.issues=[],this.addIssue=sub=>{this.issues=[...this.issues,sub]},this.addIssues=(subs=[])=>{this.issues=[...this.issues,...subs]};let actualProto=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,actualProto):this.__proto__=actualProto,this.name=`ZodError`,this.issues=issues}format(_mapper){let mapper=_mapper||function(issue){return issue.message},fieldErrors={_errors:[]},processError=error=>{for(let issue of error.issues)if(issue.code===`invalid_union`)issue.unionErrors.map(processError);else if(issue.code===`invalid_return_type`)processError(issue.returnTypeError);else if(issue.code===`invalid_arguments`)processError(issue.argumentsError);else if(issue.path.length===0)fieldErrors._errors.push(mapper(issue));else{let curr=fieldErrors,i$1=0;for(;i$1issue.message){let fieldErrors={},formErrors=[];for(let sub of this.issues)if(sub.path.length>0){let firstEl=sub.path[0];fieldErrors[firstEl]=fieldErrors[firstEl]||[],fieldErrors[firstEl].push(mapper(sub))}else formErrors.push(mapper(sub));return{formErrors,fieldErrors}}get formErrors(){return this.flatten()}};ZodError.create=issues=>{let error=new ZodError(issues);return error};const errorMap=(issue,_ctx)=>{let message$1;switch(issue.code){case ZodIssueCode.invalid_type:message$1=issue.received===ZodParsedType.undefined?`Required`:`Expected ${issue.expected}, received ${issue.received}`;break;case ZodIssueCode.invalid_literal:message$1=`Invalid literal value, expected ${JSON.stringify(issue.expected,util.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:message$1=`Unrecognized key(s) in object: ${util.joinValues(issue.keys,`, `)}`;break;case ZodIssueCode.invalid_union:message$1=`Invalid input`;break;case ZodIssueCode.invalid_union_discriminator:message$1=`Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;break;case ZodIssueCode.invalid_enum_value:message$1=`Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;break;case ZodIssueCode.invalid_arguments:message$1=`Invalid function arguments`;break;case ZodIssueCode.invalid_return_type:message$1=`Invalid function return type`;break;case ZodIssueCode.invalid_date:message$1=`Invalid date`;break;case ZodIssueCode.invalid_string:typeof issue.validation==`object`?`includes`in issue.validation?(message$1=`Invalid input: must include "${issue.validation.includes}"`,typeof issue.validation.position==`number`&&(message$1=`${message$1} at one or more positions greater than or equal to ${issue.validation.position}`)):`startsWith`in issue.validation?message$1=`Invalid input: must start with "${issue.validation.startsWith}"`:`endsWith`in issue.validation?message$1=`Invalid input: must end with "${issue.validation.endsWith}"`:util.assertNever(issue.validation):message$1=issue.validation===`regex`?`Invalid`:`Invalid ${issue.validation}`;break;case ZodIssueCode.too_small:message$1=issue.type===`array`?`Array must contain ${issue.exact?`exactly`:issue.inclusive?`at least`:`more than`} ${issue.minimum} element(s)`:issue.type===`string`?`String must contain ${issue.exact?`exactly`:issue.inclusive?`at least`:`over`} ${issue.minimum} character(s)`:issue.type===`number`||issue.type===`bigint`?`Number must be ${issue.exact?`exactly equal to `:issue.inclusive?`greater than or equal to `:`greater than `}${issue.minimum}`:issue.type===`date`?`Date must be ${issue.exact?`exactly equal to `:issue.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(issue.minimum))}`:`Invalid input`;break;case ZodIssueCode.too_big:message$1=issue.type===`array`?`Array must contain ${issue.exact?`exactly`:issue.inclusive?`at most`:`less than`} ${issue.maximum} element(s)`:issue.type===`string`?`String must contain ${issue.exact?`exactly`:issue.inclusive?`at most`:`under`} ${issue.maximum} character(s)`:issue.type===`number`?`Number must be ${issue.exact?`exactly`:issue.inclusive?`less than or equal to`:`less than`} ${issue.maximum}`:issue.type===`bigint`?`BigInt must be ${issue.exact?`exactly`:issue.inclusive?`less than or equal to`:`less than`} ${issue.maximum}`:issue.type===`date`?`Date must be ${issue.exact?`exactly`:issue.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(issue.maximum))}`:`Invalid input`;break;case ZodIssueCode.custom:message$1=`Invalid input`;break;case ZodIssueCode.invalid_intersection_types:message$1=`Intersection results could not be merged`;break;case ZodIssueCode.not_multiple_of:message$1=`Number must be a multiple of ${issue.multipleOf}`;break;case ZodIssueCode.not_finite:message$1=`Number must be finite`;break;default:message$1=_ctx.defaultError,util.assertNever(issue)}return{message:message$1}};var en_default$1=errorMap;let overrideErrorMap=en_default$1;function getErrorMap(){return overrideErrorMap}const makeIssue=params=>{let{data:data$12,path,errorMaps,issueData}=params,fullPath=[...path,...issueData.path||[]],fullIssue={...issueData,path:fullPath};if(issueData.message!==void 0)return{...issueData,path:fullPath,message:issueData.message};let errorMessage=``,maps=errorMaps.filter(m$3=>!!m$3).slice().reverse();for(let map of maps)errorMessage=map(fullIssue,{data:data$12,defaultError:errorMessage}).message;return{...issueData,path:fullPath,message:errorMessage}};function addIssueToContext(ctx,issueData){let overrideMap=getErrorMap(),issue=makeIssue({issueData,data:ctx.data,path:ctx.path,errorMaps:[ctx.common.contextualErrorMap,ctx.schemaErrorMap,overrideMap,overrideMap===en_default$1?void 0:en_default$1].filter(x$3=>!!x$3)});ctx.common.issues.push(issue)}var ParseStatus=class ParseStatus{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(status,results){let arrayValue=[];for(let s$1 of results){if(s$1.status===`aborted`)return INVALID;s$1.status===`dirty`&&status.dirty(),arrayValue.push(s$1.value)}return{status:status.value,value:arrayValue}}static async mergeObjectAsync(status,pairs){let syncPairs=[];for(let pair of pairs){let key$1=await pair.key,value$1=await pair.value;syncPairs.push({key:key$1,value:value$1})}return ParseStatus.mergeObjectSync(status,syncPairs)}static mergeObjectSync(status,pairs){let finalObject={};for(let pair of pairs){let{key:key$1,value:value$1}=pair;if(key$1.status===`aborted`||value$1.status===`aborted`)return INVALID;key$1.status===`dirty`&&status.dirty(),value$1.status===`dirty`&&status.dirty(),key$1.value!==`__proto__`&&(value$1.value!==void 0||pair.alwaysSet)&&(finalObject[key$1.value]=value$1.value)}return{status:status.value,value:finalObject}}};const INVALID=Object.freeze({status:`aborted`}),DIRTY=value$1=>({status:`dirty`,value:value$1}),OK=value$1=>({status:`valid`,value:value$1}),isAborted=x$3=>x$3.status===`aborted`,isDirty=x$3=>x$3.status===`dirty`,isValid=x$3=>x$3.status===`valid`,isAsync=x$3=>typeof Promise<`u`&&x$3 instanceof Promise;var errorUtil;(function(errorUtil$1){errorUtil$1.errToObj=message$1=>typeof message$1==`string`?{message:message$1}:message$1||{},errorUtil$1.toString=message$1=>typeof message$1==`string`?message$1:message$1?.message})(errorUtil||={});var ParseInputLazyPath=class{constructor(parent,value$1,path,key$1){this._cachedPath=[],this.parent=parent,this.data=value$1,this._path=path,this._key=key$1}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const handleResult=(ctx,result)=>{if(isValid(result))return{success:!0,data:result.value};if(!ctx.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let error=new ZodError(ctx.common.issues);return this._error=error,this._error}}};function processCreateParams(params){if(!params)return{};let{errorMap:errorMap$1,invalid_type_error,required_error,description}=params;if(errorMap$1&&(invalid_type_error||required_error))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(errorMap$1)return{errorMap:errorMap$1,description};let customMap=(iss,ctx)=>{let{message:message$1}=params;return iss.code===`invalid_enum_value`?{message:message$1??ctx.defaultError}:ctx.data===void 0?{message:message$1??required_error??ctx.defaultError}:iss.code===`invalid_type`?{message:message$1??invalid_type_error??ctx.defaultError}:{message:ctx.defaultError}};return{errorMap:customMap,description}}var ZodType=class{get description(){return this._def.description}_getType(input){return getParsedType(input.data)}_getOrReturnCtx(input,ctx){return ctx||{common:input.parent.common,data:input.data,parsedType:getParsedType(input.data),schemaErrorMap:this._def.errorMap,path:input.path,parent:input.parent}}_processInputParams(input){return{status:new ParseStatus,ctx:{common:input.parent.common,data:input.data,parsedType:getParsedType(input.data),schemaErrorMap:this._def.errorMap,path:input.path,parent:input.parent}}}_parseSync(input){let result=this._parse(input);if(isAsync(result))throw Error(`Synchronous parse encountered promise.`);return result}_parseAsync(input){let result=this._parse(input);return Promise.resolve(result)}parse(data$12,params){let result=this.safeParse(data$12,params);if(result.success)return result.data;throw result.error}safeParse(data$12,params){let ctx={common:{issues:[],async:params?.async??!1,contextualErrorMap:params?.errorMap},path:params?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:data$12,parsedType:getParsedType(data$12)},result=this._parseSync({data:data$12,path:ctx.path,parent:ctx});return handleResult(ctx,result)}"~validate"(data$12){let ctx={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:data$12,parsedType:getParsedType(data$12)};if(!this[`~standard`].async)try{let result=this._parseSync({data:data$12,path:[],parent:ctx});return isValid(result)?{value:result.value}:{issues:ctx.common.issues}}catch(err){err?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),ctx.common={issues:[],async:!0}}return this._parseAsync({data:data$12,path:[],parent:ctx}).then(result=>isValid(result)?{value:result.value}:{issues:ctx.common.issues})}async parseAsync(data$12,params){let result=await this.safeParseAsync(data$12,params);if(result.success)return result.data;throw result.error}async safeParseAsync(data$12,params){let ctx={common:{issues:[],contextualErrorMap:params?.errorMap,async:!0},path:params?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:data$12,parsedType:getParsedType(data$12)},maybeAsyncResult=this._parse({data:data$12,path:ctx.path,parent:ctx}),result=await(isAsync(maybeAsyncResult)?maybeAsyncResult:Promise.resolve(maybeAsyncResult));return handleResult(ctx,result)}refine(check$1,message$1){let getIssueProperties=val=>typeof message$1==`string`||message$1===void 0?{message:message$1}:typeof message$1==`function`?message$1(val):message$1;return this._refinement((val,ctx)=>{let result=check$1(val),setError=()=>ctx.addIssue({code:ZodIssueCode.custom,...getIssueProperties(val)});return typeof Promise<`u`&&result instanceof Promise?result.then(data$12=>data$12?!0:(setError(),!1)):result?!0:(setError(),!1)})}refinement(check$1,refinementData){return this._refinement((val,ctx)=>check$1(val)?!0:(ctx.addIssue(typeof refinementData==`function`?refinementData(val,ctx):refinementData),!1))}_refinement(refinement){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:`refinement`,refinement}})}superRefine(refinement){return this._refinement(refinement)}constructor(def$1){this.spa=this.safeParseAsync,this._def=def$1,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:data$12=>this[`~validate`](data$12)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(option$1){return ZodUnion.create([this,option$1],this._def)}and(incoming){return ZodIntersection.create(this,incoming,this._def)}transform(transform$1){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:`transform`,transform:transform$1}})}default(def$1){let defaultValueFunc=typeof def$1==`function`?def$1:()=>def$1;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:defaultValueFunc,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(def$1){let catchValueFunc=typeof def$1==`function`?def$1:()=>def$1;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:catchValueFunc,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(description){let This=this.constructor;return new This({...this._def,description})}pipe(target$1){return ZodPipeline.create(this,target$1)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,jwtRegex=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;let emojiRegex;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4CidrRegex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Regex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ipv6CidrRegex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64urlRegex=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dateRegexSource=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,dateRegex=RegExp(`^${dateRegexSource}$`);function timeRegexSource(args){let secondsRegexSource=`[0-5]\\d`;args.precision?secondsRegexSource=`${secondsRegexSource}\\.\\d{${args.precision}}`:args.precision??(secondsRegexSource=`${secondsRegexSource}(\\.\\d+)?`);let secondsQuantifier=args.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`}function timeRegex(args){return RegExp(`^${timeRegexSource(args)}$`)}function datetimeRegex(args){let regex=`${dateRegexSource}T${timeRegexSource(args)}`,opts=[];return opts.push(args.local?`Z?`:`Z`),args.offset&&opts.push(`([+-]\\d{2}:?\\d{2})`),regex=`${regex}(${opts.join(`|`)})`,RegExp(`^${regex}$`)}function isValidIP(ip$1,version$1){return!!((version$1===`v4`||!version$1)&&ipv4Regex.test(ip$1)||(version$1===`v6`||!version$1)&&ipv6Regex.test(ip$1))}function isValidJWT(jwt,alg){if(!jwtRegex.test(jwt))return!1;try{let[header]=jwt.split(`.`);if(!header)return!1;let base64=header.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(header.length+(4-header.length%4)%4,`=`),decoded=JSON.parse(atob(base64));return!(typeof decoded!=`object`||!decoded||`typ`in decoded&&decoded?.typ!==`JWT`||!decoded.alg||alg&&decoded.alg!==alg)}catch{return!1}}function isValidCidr(ip$1,version$1){return!!((version$1===`v4`||!version$1)&&ipv4CidrRegex.test(ip$1)||(version$1===`v6`||!version$1)&&ipv6CidrRegex.test(ip$1))}var ZodString=class ZodString extends ZodType{_parse(input){this._def.coerce&&(input.data=String(input.data));let parsedType=this._getType(input);if(parsedType!==ZodParsedType.string){let ctx$1=this._getOrReturnCtx(input);return addIssueToContext(ctx$1,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:ctx$1.parsedType}),INVALID}let status=new ParseStatus,ctx;for(let check$1 of this._def.checks)if(check$1.kind===`min`)input.data.lengthcheck$1.value&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.too_big,maximum:check$1.value,type:`string`,inclusive:!0,exact:!1,message:check$1.message}),status.dirty());else if(check$1.kind===`length`){let tooBig=input.data.length>check$1.value,tooSmall=input.data.lengthregex.test(data$12),{validation,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(message$1)})}_addCheck(check$1){return new ZodString({...this._def,checks:[...this._def.checks,check$1]})}email(message$1){return this._addCheck({kind:`email`,...errorUtil.errToObj(message$1)})}url(message$1){return this._addCheck({kind:`url`,...errorUtil.errToObj(message$1)})}emoji(message$1){return this._addCheck({kind:`emoji`,...errorUtil.errToObj(message$1)})}uuid(message$1){return this._addCheck({kind:`uuid`,...errorUtil.errToObj(message$1)})}nanoid(message$1){return this._addCheck({kind:`nanoid`,...errorUtil.errToObj(message$1)})}cuid(message$1){return this._addCheck({kind:`cuid`,...errorUtil.errToObj(message$1)})}cuid2(message$1){return this._addCheck({kind:`cuid2`,...errorUtil.errToObj(message$1)})}ulid(message$1){return this._addCheck({kind:`ulid`,...errorUtil.errToObj(message$1)})}base64(message$1){return this._addCheck({kind:`base64`,...errorUtil.errToObj(message$1)})}base64url(message$1){return this._addCheck({kind:`base64url`,...errorUtil.errToObj(message$1)})}jwt(options$1){return this._addCheck({kind:`jwt`,...errorUtil.errToObj(options$1)})}ip(options$1){return this._addCheck({kind:`ip`,...errorUtil.errToObj(options$1)})}cidr(options$1){return this._addCheck({kind:`cidr`,...errorUtil.errToObj(options$1)})}datetime(options$1){return typeof options$1==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:options$1}):this._addCheck({kind:`datetime`,precision:options$1?.precision===void 0?null:options$1?.precision,offset:options$1?.offset??!1,local:options$1?.local??!1,...errorUtil.errToObj(options$1?.message)})}date(message$1){return this._addCheck({kind:`date`,message:message$1})}time(options$1){return typeof options$1==`string`?this._addCheck({kind:`time`,precision:null,message:options$1}):this._addCheck({kind:`time`,precision:options$1?.precision===void 0?null:options$1?.precision,...errorUtil.errToObj(options$1?.message)})}duration(message$1){return this._addCheck({kind:`duration`,...errorUtil.errToObj(message$1)})}regex(regex,message$1){return this._addCheck({kind:`regex`,regex,...errorUtil.errToObj(message$1)})}includes(value$1,options$1){return this._addCheck({kind:`includes`,value:value$1,position:options$1?.position,...errorUtil.errToObj(options$1?.message)})}startsWith(value$1,message$1){return this._addCheck({kind:`startsWith`,value:value$1,...errorUtil.errToObj(message$1)})}endsWith(value$1,message$1){return this._addCheck({kind:`endsWith`,value:value$1,...errorUtil.errToObj(message$1)})}min(minLength,message$1){return this._addCheck({kind:`min`,value:minLength,...errorUtil.errToObj(message$1)})}max(maxLength,message$1){return this._addCheck({kind:`max`,value:maxLength,...errorUtil.errToObj(message$1)})}length(len,message$1){return this._addCheck({kind:`length`,value:len,...errorUtil.errToObj(message$1)})}nonempty(message$1){return this.min(1,errorUtil.errToObj(message$1))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(ch$1=>ch$1.kind===`datetime`)}get isDate(){return!!this._def.checks.find(ch$1=>ch$1.kind===`date`)}get isTime(){return!!this._def.checks.find(ch$1=>ch$1.kind===`time`)}get isDuration(){return!!this._def.checks.find(ch$1=>ch$1.kind===`duration`)}get isEmail(){return!!this._def.checks.find(ch$1=>ch$1.kind===`email`)}get isURL(){return!!this._def.checks.find(ch$1=>ch$1.kind===`url`)}get isEmoji(){return!!this._def.checks.find(ch$1=>ch$1.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(ch$1=>ch$1.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(ch$1=>ch$1.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(ch$1=>ch$1.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(ch$1=>ch$1.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(ch$1=>ch$1.kind===`ulid`)}get isIP(){return!!this._def.checks.find(ch$1=>ch$1.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(ch$1=>ch$1.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(ch$1=>ch$1.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(ch$1=>ch$1.kind===`base64url`)}get minLength(){let min$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`min`&&(min$1===null||ch$1.value>min$1)&&(min$1=ch$1.value);return min$1}get maxLength(){let max$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`max`&&(max$1===null||ch$1.valuenew ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:params?.coerce??!1,...processCreateParams(params)});function floatSafeRemainder(val,step){let valDecCount=(val.toString().split(`.`)[1]||``).length,stepDecCount=(step.toString().split(`.`)[1]||``).length,decCount=valDecCount>stepDecCount?valDecCount:stepDecCount,valInt=Number.parseInt(val.toFixed(decCount).replace(`.`,``)),stepInt=Number.parseInt(step.toFixed(decCount).replace(`.`,``));return valInt%stepInt/10**decCount}var ZodNumber=class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(input){this._def.coerce&&(input.data=Number(input.data));let parsedType=this._getType(input);if(parsedType!==ZodParsedType.number){let ctx$1=this._getOrReturnCtx(input);return addIssueToContext(ctx$1,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:ctx$1.parsedType}),INVALID}let ctx,status=new ParseStatus;for(let check$1 of this._def.checks)if(check$1.kind===`int`)util.isInteger(input.data)||(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:`integer`,received:`float`,message:check$1.message}),status.dirty());else if(check$1.kind===`min`){let tooSmall=check$1.inclusive?input.datacheck$1.value:input.data>=check$1.value;tooBig&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.too_big,maximum:check$1.value,type:`number`,inclusive:check$1.inclusive,exact:!1,message:check$1.message}),status.dirty())}else check$1.kind===`multipleOf`?floatSafeRemainder(input.data,check$1.value)!==0&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.not_multiple_of,multipleOf:check$1.value,message:check$1.message}),status.dirty()):check$1.kind===`finite`?Number.isFinite(input.data)||(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.not_finite,message:check$1.message}),status.dirty()):util.assertNever(check$1);return{status:status.value,value:input.data}}gte(value$1,message$1){return this.setLimit(`min`,value$1,!0,errorUtil.toString(message$1))}gt(value$1,message$1){return this.setLimit(`min`,value$1,!1,errorUtil.toString(message$1))}lte(value$1,message$1){return this.setLimit(`max`,value$1,!0,errorUtil.toString(message$1))}lt(value$1,message$1){return this.setLimit(`max`,value$1,!1,errorUtil.toString(message$1))}setLimit(kind,value$1,inclusive,message$1){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind,value:value$1,inclusive,message:errorUtil.toString(message$1)}]})}_addCheck(check$1){return new ZodNumber({...this._def,checks:[...this._def.checks,check$1]})}int(message$1){return this._addCheck({kind:`int`,message:errorUtil.toString(message$1)})}positive(message$1){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:errorUtil.toString(message$1)})}negative(message$1){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:errorUtil.toString(message$1)})}nonpositive(message$1){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:errorUtil.toString(message$1)})}nonnegative(message$1){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:errorUtil.toString(message$1)})}multipleOf(value$1,message$1){return this._addCheck({kind:`multipleOf`,value:value$1,message:errorUtil.toString(message$1)})}finite(message$1){return this._addCheck({kind:`finite`,message:errorUtil.toString(message$1)})}safe(message$1){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:errorUtil.toString(message$1)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:errorUtil.toString(message$1)})}get minValue(){let min$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`min`&&(min$1===null||ch$1.value>min$1)&&(min$1=ch$1.value);return min$1}get maxValue(){let max$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`max`&&(max$1===null||ch$1.valuech$1.kind===`int`||ch$1.kind===`multipleOf`&&util.isInteger(ch$1.value))}get isFinite(){let max$1=null,min$1=null;for(let ch$1 of this._def.checks)if(ch$1.kind===`finite`||ch$1.kind===`int`||ch$1.kind===`multipleOf`)return!0;else ch$1.kind===`min`?(min$1===null||ch$1.value>min$1)&&(min$1=ch$1.value):ch$1.kind===`max`&&(max$1===null||ch$1.valuenew ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:params?.coerce||!1,...processCreateParams(params)});var ZodBigInt=class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(input){if(this._def.coerce)try{input.data=BigInt(input.data)}catch{return this._getInvalidInput(input)}let parsedType=this._getType(input);if(parsedType!==ZodParsedType.bigint)return this._getInvalidInput(input);let ctx,status=new ParseStatus;for(let check$1 of this._def.checks)if(check$1.kind===`min`){let tooSmall=check$1.inclusive?input.datacheck$1.value:input.data>=check$1.value;tooBig&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.too_big,type:`bigint`,maximum:check$1.value,inclusive:check$1.inclusive,message:check$1.message}),status.dirty())}else check$1.kind===`multipleOf`?input.data%check$1.value!==BigInt(0)&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.not_multiple_of,multipleOf:check$1.value,message:check$1.message}),status.dirty()):util.assertNever(check$1);return{status:status.value,value:input.data}}_getInvalidInput(input){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:ctx.parsedType}),INVALID}gte(value$1,message$1){return this.setLimit(`min`,value$1,!0,errorUtil.toString(message$1))}gt(value$1,message$1){return this.setLimit(`min`,value$1,!1,errorUtil.toString(message$1))}lte(value$1,message$1){return this.setLimit(`max`,value$1,!0,errorUtil.toString(message$1))}lt(value$1,message$1){return this.setLimit(`max`,value$1,!1,errorUtil.toString(message$1))}setLimit(kind,value$1,inclusive,message$1){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind,value:value$1,inclusive,message:errorUtil.toString(message$1)}]})}_addCheck(check$1){return new ZodBigInt({...this._def,checks:[...this._def.checks,check$1]})}positive(message$1){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:errorUtil.toString(message$1)})}negative(message$1){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:errorUtil.toString(message$1)})}nonpositive(message$1){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:errorUtil.toString(message$1)})}nonnegative(message$1){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:errorUtil.toString(message$1)})}multipleOf(value$1,message$1){return this._addCheck({kind:`multipleOf`,value:value$1,message:errorUtil.toString(message$1)})}get minValue(){let min$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`min`&&(min$1===null||ch$1.value>min$1)&&(min$1=ch$1.value);return min$1}get maxValue(){let max$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`max`&&(max$1===null||ch$1.valuenew ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:params?.coerce??!1,...processCreateParams(params)});var ZodBoolean=class extends ZodType{_parse(input){this._def.coerce&&(input.data=!!input.data);let parsedType=this._getType(input);if(parsedType!==ZodParsedType.boolean){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:ctx.parsedType}),INVALID}return OK(input.data)}};ZodBoolean.create=params=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:params?.coerce||!1,...processCreateParams(params)});var ZodDate=class ZodDate extends ZodType{_parse(input){this._def.coerce&&(input.data=new Date(input.data));let parsedType=this._getType(input);if(parsedType!==ZodParsedType.date){let ctx$1=this._getOrReturnCtx(input);return addIssueToContext(ctx$1,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:ctx$1.parsedType}),INVALID}if(Number.isNaN(input.data.getTime())){let ctx$1=this._getOrReturnCtx(input);return addIssueToContext(ctx$1,{code:ZodIssueCode.invalid_date}),INVALID}let status=new ParseStatus,ctx;for(let check$1 of this._def.checks)check$1.kind===`min`?input.data.getTime()check$1.value&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.too_big,message:check$1.message,inclusive:!0,exact:!1,maximum:check$1.value,type:`date`}),status.dirty()):util.assertNever(check$1);return{status:status.value,value:new Date(input.data.getTime())}}_addCheck(check$1){return new ZodDate({...this._def,checks:[...this._def.checks,check$1]})}min(minDate,message$1){return this._addCheck({kind:`min`,value:minDate.getTime(),message:errorUtil.toString(message$1)})}max(maxDate,message$1){return this._addCheck({kind:`max`,value:maxDate.getTime(),message:errorUtil.toString(message$1)})}get minDate(){let min$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`min`&&(min$1===null||ch$1.value>min$1)&&(min$1=ch$1.value);return min$1==null?null:new Date(min$1)}get maxDate(){let max$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`max`&&(max$1===null||ch$1.valuenew ZodDate({checks:[],coerce:params?.coerce||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(params)});var ZodSymbol=class extends ZodType{_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.symbol){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:ctx.parsedType}),INVALID}return OK(input.data)}};ZodSymbol.create=params=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(params)});var ZodUndefined=class extends ZodType{_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.undefined){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:ctx.parsedType}),INVALID}return OK(input.data)}};ZodUndefined.create=params=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(params)});var ZodNull=class extends ZodType{_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.null){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:ctx.parsedType}),INVALID}return OK(input.data)}};ZodNull.create=params=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(params)});var ZodAny=class extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(input){return OK(input.data)}};ZodAny.create=params=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(params)});var ZodUnknown=class extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(input){return OK(input.data)}};ZodUnknown.create=params=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(params)});var ZodNever=class extends ZodType{_parse(input){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:ctx.parsedType}),INVALID}};ZodNever.create=params=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(params)});var ZodVoid=class extends ZodType{_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.undefined){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:ctx.parsedType}),INVALID}return OK(input.data)}};ZodVoid.create=params=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(params)});var ZodArray=class ZodArray extends ZodType{_parse(input){let{ctx,status}=this._processInputParams(input),def$1=this._def;if(ctx.parsedType!==ZodParsedType.array)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:ctx.parsedType}),INVALID;if(def$1.exactLength!==null){let tooBig=ctx.data.length>def$1.exactLength.value,tooSmall=ctx.data.lengthdef$1.maxLength.value&&(addIssueToContext(ctx,{code:ZodIssueCode.too_big,maximum:def$1.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:def$1.maxLength.message}),status.dirty()),ctx.common.async)return Promise.all([...ctx.data].map((item,i$1)=>def$1.type._parseAsync(new ParseInputLazyPath(ctx,item,ctx.path,i$1)))).then(result$1=>ParseStatus.mergeArray(status,result$1));let result=[...ctx.data].map((item,i$1)=>def$1.type._parseSync(new ParseInputLazyPath(ctx,item,ctx.path,i$1)));return ParseStatus.mergeArray(status,result)}get element(){return this._def.type}min(minLength,message$1){return new ZodArray({...this._def,minLength:{value:minLength,message:errorUtil.toString(message$1)}})}max(maxLength,message$1){return new ZodArray({...this._def,maxLength:{value:maxLength,message:errorUtil.toString(message$1)}})}length(len,message$1){return new ZodArray({...this._def,exactLength:{value:len,message:errorUtil.toString(message$1)}})}nonempty(message$1){return this.min(1,message$1)}};ZodArray.create=(schema,params)=>new ZodArray({type:schema,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(params)});function deepPartialify(schema){if(schema instanceof ZodObject){let newShape={};for(let key$1 in schema.shape){let fieldSchema=schema.shape[key$1];newShape[key$1]=ZodOptional.create(deepPartialify(fieldSchema))}return new ZodObject({...schema._def,shape:()=>newShape})}else if(schema instanceof ZodArray)return new ZodArray({...schema._def,type:deepPartialify(schema.element)});else if(schema instanceof ZodOptional)return ZodOptional.create(deepPartialify(schema.unwrap()));else if(schema instanceof ZodNullable)return ZodNullable.create(deepPartialify(schema.unwrap()));else if(schema instanceof ZodTuple)return ZodTuple.create(schema.items.map(item=>deepPartialify(item)));else return schema}var ZodObject=class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let shape=this._def.shape(),keys$3=util.objectKeys(shape);return this._cached={shape,keys:keys$3},this._cached}_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.object){let ctx$1=this._getOrReturnCtx(input);return addIssueToContext(ctx$1,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:ctx$1.parsedType}),INVALID}let{status,ctx}=this._processInputParams(input),{shape,keys:shapeKeys}=this._getCached(),extraKeys=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys===`strip`))for(let key$1 in ctx.data)shapeKeys.includes(key$1)||extraKeys.push(key$1);let pairs=[];for(let key$1 of shapeKeys){let keyValidator=shape[key$1],value$1=ctx.data[key$1];pairs.push({key:{status:`valid`,value:key$1},value:keyValidator._parse(new ParseInputLazyPath(ctx,value$1,ctx.path,key$1)),alwaysSet:key$1 in ctx.data})}if(this._def.catchall instanceof ZodNever){let unknownKeys=this._def.unknownKeys;if(unknownKeys===`passthrough`)for(let key$1 of extraKeys)pairs.push({key:{status:`valid`,value:key$1},value:{status:`valid`,value:ctx.data[key$1]}});else if(unknownKeys===`strict`)extraKeys.length>0&&(addIssueToContext(ctx,{code:ZodIssueCode.unrecognized_keys,keys:extraKeys}),status.dirty());else if(unknownKeys!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let catchall=this._def.catchall;for(let key$1 of extraKeys){let value$1=ctx.data[key$1];pairs.push({key:{status:`valid`,value:key$1},value:catchall._parse(new ParseInputLazyPath(ctx,value$1,ctx.path,key$1)),alwaysSet:key$1 in ctx.data})}}return ctx.common.async?Promise.resolve().then(async()=>{let syncPairs=[];for(let pair of pairs){let key$1=await pair.key,value$1=await pair.value;syncPairs.push({key:key$1,value:value$1,alwaysSet:pair.alwaysSet})}return syncPairs}).then(syncPairs=>ParseStatus.mergeObjectSync(status,syncPairs)):ParseStatus.mergeObjectSync(status,pairs)}get shape(){return this._def.shape()}strict(message$1){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:`strict`,...message$1===void 0?{}:{errorMap:(issue,ctx)=>{let defaultError=this._def.errorMap?.(issue,ctx).message??ctx.defaultError;return issue.code===`unrecognized_keys`?{message:errorUtil.errToObj(message$1).message??defaultError}:{message:defaultError}}}})}strip(){return new ZodObject({...this._def,unknownKeys:`strip`})}passthrough(){return new ZodObject({...this._def,unknownKeys:`passthrough`})}extend(augmentation){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...augmentation})})}merge(merging){let merged=new ZodObject({unknownKeys:merging._def.unknownKeys,catchall:merging._def.catchall,shape:()=>({...this._def.shape(),...merging._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject});return merged}setKey(key$1,schema){return this.augment({[key$1]:schema})}catchall(index$1){return new ZodObject({...this._def,catchall:index$1})}pick(mask){let shape={};for(let key$1 of util.objectKeys(mask))mask[key$1]&&this.shape[key$1]&&(shape[key$1]=this.shape[key$1]);return new ZodObject({...this._def,shape:()=>shape})}omit(mask){let shape={};for(let key$1 of util.objectKeys(this.shape))mask[key$1]||(shape[key$1]=this.shape[key$1]);return new ZodObject({...this._def,shape:()=>shape})}deepPartial(){return deepPartialify(this)}partial(mask){let newShape={};for(let key$1 of util.objectKeys(this.shape)){let fieldSchema=this.shape[key$1];mask&&!mask[key$1]?newShape[key$1]=fieldSchema:newShape[key$1]=fieldSchema.optional()}return new ZodObject({...this._def,shape:()=>newShape})}required(mask){let newShape={};for(let key$1 of util.objectKeys(this.shape))if(mask&&!mask[key$1])newShape[key$1]=this.shape[key$1];else{let fieldSchema=this.shape[key$1],newField=fieldSchema;for(;newField instanceof ZodOptional;)newField=newField._def.innerType;newShape[key$1]=newField}return new ZodObject({...this._def,shape:()=>newShape})}keyof(){return createZodEnum(util.objectKeys(this.shape))}};ZodObject.create=(shape,params)=>new ZodObject({shape:()=>shape,unknownKeys:`strip`,catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(params)}),ZodObject.strictCreate=(shape,params)=>new ZodObject({shape:()=>shape,unknownKeys:`strict`,catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(params)}),ZodObject.lazycreate=(shape,params)=>new ZodObject({shape,unknownKeys:`strip`,catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(params)});var ZodUnion=class extends ZodType{_parse(input){let{ctx}=this._processInputParams(input),options$1=this._def.options;function handleResults(results){for(let result of results)if(result.result.status===`valid`)return result.result;for(let result of results)if(result.result.status===`dirty`)return ctx.common.issues.push(...result.ctx.common.issues),result.result;let unionErrors=results.map(result=>new ZodError(result.ctx.common.issues));return addIssueToContext(ctx,{code:ZodIssueCode.invalid_union,unionErrors}),INVALID}if(ctx.common.async)return Promise.all(options$1.map(async option$1=>{let childCtx={...ctx,common:{...ctx.common,issues:[]},parent:null};return{result:await option$1._parseAsync({data:ctx.data,path:ctx.path,parent:childCtx}),ctx:childCtx}})).then(handleResults);{let dirty,issues=[];for(let option$1 of options$1){let childCtx={...ctx,common:{...ctx.common,issues:[]},parent:null},result=option$1._parseSync({data:ctx.data,path:ctx.path,parent:childCtx});if(result.status===`valid`)return result;result.status===`dirty`&&!dirty&&(dirty={result,ctx:childCtx}),childCtx.common.issues.length&&issues.push(childCtx.common.issues)}if(dirty)return ctx.common.issues.push(...dirty.ctx.common.issues),dirty.result;let unionErrors=issues.map(issues$1=>new ZodError(issues$1));return addIssueToContext(ctx,{code:ZodIssueCode.invalid_union,unionErrors}),INVALID}}get options(){return this._def.options}};ZodUnion.create=(types$1,params)=>new ZodUnion({options:types$1,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(params)});const getDiscriminator=type=>type instanceof ZodLazy?getDiscriminator(type.schema):type instanceof ZodEffects?getDiscriminator(type.innerType()):type instanceof ZodLiteral?[type.value]:type instanceof ZodEnum?type.options:type instanceof ZodNativeEnum?util.objectValues(type.enum):type instanceof ZodDefault?getDiscriminator(type._def.innerType):type instanceof ZodUndefined?[void 0]:type instanceof ZodNull?[null]:type instanceof ZodOptional?[void 0,...getDiscriminator(type.unwrap())]:type instanceof ZodNullable?[null,...getDiscriminator(type.unwrap())]:type instanceof ZodBranded||type instanceof ZodReadonly?getDiscriminator(type.unwrap()):type instanceof ZodCatch?getDiscriminator(type._def.innerType):[];var ZodDiscriminatedUnion=class ZodDiscriminatedUnion extends ZodType{_parse(input){let{ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.object)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:ctx.parsedType}),INVALID;let discriminator=this.discriminator,discriminatorValue=ctx.data[discriminator],option$1=this.optionsMap.get(discriminatorValue);return option$1?ctx.common.async?option$1._parseAsync({data:ctx.data,path:ctx.path,parent:ctx}):option$1._parseSync({data:ctx.data,path:ctx.path,parent:ctx}):(addIssueToContext(ctx,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[discriminator]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(discriminator,options$1,params){let optionsMap=new Map;for(let type of options$1){let discriminatorValues=getDiscriminator(type.shape[discriminator]);if(!discriminatorValues.length)throw Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);for(let value$1 of discriminatorValues){if(optionsMap.has(value$1))throw Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value$1)}`);optionsMap.set(value$1,type)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator,options:options$1,optionsMap,...processCreateParams(params)})}};function mergeValues(a$2,b$4){let aType=getParsedType(a$2),bType=getParsedType(b$4);if(a$2===b$4)return{valid:!0,data:a$2};if(aType===ZodParsedType.object&&bType===ZodParsedType.object){let bKeys=util.objectKeys(b$4),sharedKeys=util.objectKeys(a$2).filter(key$1=>bKeys.indexOf(key$1)!==-1),newObj={...a$2,...b$4};for(let key$1 of sharedKeys){let sharedValue=mergeValues(a$2[key$1],b$4[key$1]);if(!sharedValue.valid)return{valid:!1};newObj[key$1]=sharedValue.data}return{valid:!0,data:newObj}}else if(aType===ZodParsedType.array&&bType===ZodParsedType.array){if(a$2.length!==b$4.length)return{valid:!1};let newArray=[];for(let index$1=0;index$1{if(isAborted(parsedLeft)||isAborted(parsedRight))return INVALID;let merged=mergeValues(parsedLeft.value,parsedRight.value);return merged.valid?((isDirty(parsedLeft)||isDirty(parsedRight))&&status.dirty(),{status:status.value,value:merged.data}):(addIssueToContext(ctx,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return ctx.common.async?Promise.all([this._def.left._parseAsync({data:ctx.data,path:ctx.path,parent:ctx}),this._def.right._parseAsync({data:ctx.data,path:ctx.path,parent:ctx})]).then(([left,right])=>handleParsed(left,right)):handleParsed(this._def.left._parseSync({data:ctx.data,path:ctx.path,parent:ctx}),this._def.right._parseSync({data:ctx.data,path:ctx.path,parent:ctx}))}};ZodIntersection.create=(left,right,params)=>new ZodIntersection({left,right,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(params)});var ZodTuple=class ZodTuple extends ZodType{_parse(input){let{status,ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.array)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:ctx.parsedType}),INVALID;if(ctx.data.lengththis._def.items.length&&(addIssueToContext(ctx,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),status.dirty());let items=[...ctx.data].map((item,itemIndex)=>{let schema=this._def.items[itemIndex]||this._def.rest;return schema?schema._parse(new ParseInputLazyPath(ctx,item,ctx.path,itemIndex)):null}).filter(x$3=>!!x$3);return ctx.common.async?Promise.all(items).then(results=>ParseStatus.mergeArray(status,results)):ParseStatus.mergeArray(status,items)}get items(){return this._def.items}rest(rest){return new ZodTuple({...this._def,rest})}};ZodTuple.create=(schemas,params)=>{if(!Array.isArray(schemas))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new ZodTuple({items:schemas,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(params)})};var ZodRecord=class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(input){let{status,ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.object)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:ctx.parsedType}),INVALID;let pairs=[],keyType=this._def.keyType,valueType=this._def.valueType;for(let key$1 in ctx.data)pairs.push({key:keyType._parse(new ParseInputLazyPath(ctx,key$1,ctx.path,key$1)),value:valueType._parse(new ParseInputLazyPath(ctx,ctx.data[key$1],ctx.path,key$1)),alwaysSet:key$1 in ctx.data});return ctx.common.async?ParseStatus.mergeObjectAsync(status,pairs):ParseStatus.mergeObjectSync(status,pairs)}get element(){return this._def.valueType}static create(first,second,third){return second instanceof ZodType?new ZodRecord({keyType:first,valueType:second,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(third)}):new ZodRecord({keyType:ZodString.create(),valueType:first,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(second)})}},ZodMap=class extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(input){let{status,ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.map)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:ctx.parsedType}),INVALID;let keyType=this._def.keyType,valueType=this._def.valueType,pairs=[...ctx.data.entries()].map(([key$1,value$1],index$1)=>({key:keyType._parse(new ParseInputLazyPath(ctx,key$1,ctx.path,[index$1,`key`])),value:valueType._parse(new ParseInputLazyPath(ctx,value$1,ctx.path,[index$1,`value`]))}));if(ctx.common.async){let finalMap=new Map;return Promise.resolve().then(async()=>{for(let pair of pairs){let key$1=await pair.key,value$1=await pair.value;if(key$1.status===`aborted`||value$1.status===`aborted`)return INVALID;(key$1.status===`dirty`||value$1.status===`dirty`)&&status.dirty(),finalMap.set(key$1.value,value$1.value)}return{status:status.value,value:finalMap}})}else{let finalMap=new Map;for(let pair of pairs){let key$1=pair.key,value$1=pair.value;if(key$1.status===`aborted`||value$1.status===`aborted`)return INVALID;(key$1.status===`dirty`||value$1.status===`dirty`)&&status.dirty(),finalMap.set(key$1.value,value$1.value)}return{status:status.value,value:finalMap}}}};ZodMap.create=(keyType,valueType,params)=>new ZodMap({valueType,keyType,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(params)});var ZodSet=class ZodSet extends ZodType{_parse(input){let{status,ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.set)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:ctx.parsedType}),INVALID;let def$1=this._def;def$1.minSize!==null&&ctx.data.sizedef$1.maxSize.value&&(addIssueToContext(ctx,{code:ZodIssueCode.too_big,maximum:def$1.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:def$1.maxSize.message}),status.dirty());let valueType=this._def.valueType;function finalizeSet(elements$1){let parsedSet=new Set;for(let element$3 of elements$1){if(element$3.status===`aborted`)return INVALID;element$3.status===`dirty`&&status.dirty(),parsedSet.add(element$3.value)}return{status:status.value,value:parsedSet}}let elements=[...ctx.data.values()].map((item,i$1)=>valueType._parse(new ParseInputLazyPath(ctx,item,ctx.path,i$1)));return ctx.common.async?Promise.all(elements).then(elements$1=>finalizeSet(elements$1)):finalizeSet(elements)}min(minSize,message$1){return new ZodSet({...this._def,minSize:{value:minSize,message:errorUtil.toString(message$1)}})}max(maxSize,message$1){return new ZodSet({...this._def,maxSize:{value:maxSize,message:errorUtil.toString(message$1)}})}size(size$2,message$1){return this.min(size$2,message$1).max(size$2,message$1)}nonempty(message$1){return this.min(1,message$1)}};ZodSet.create=(valueType,params)=>new ZodSet({valueType,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(params)});var ZodFunction=class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(input){let{ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.function)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:ctx.parsedType}),INVALID;function makeArgsIssue(args,error){return makeIssue({data:args,path:ctx.path,errorMaps:[ctx.common.contextualErrorMap,ctx.schemaErrorMap,getErrorMap(),en_default$1].filter(x$3=>!!x$3),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:error}})}function makeReturnsIssue(returns,error){return makeIssue({data:returns,path:ctx.path,errorMaps:[ctx.common.contextualErrorMap,ctx.schemaErrorMap,getErrorMap(),en_default$1].filter(x$3=>!!x$3),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:error}})}let params={errorMap:ctx.common.contextualErrorMap},fn$6=ctx.data;if(this._def.returns instanceof ZodPromise){let me$2=this;return OK(async function(...args){let error=new ZodError([]),parsedArgs=await me$2._def.args.parseAsync(args,params).catch(e$3=>{throw error.addIssue(makeArgsIssue(args,e$3)),error}),result=await Reflect.apply(fn$6,this,parsedArgs),parsedReturns=await me$2._def.returns._def.type.parseAsync(result,params).catch(e$3=>{throw error.addIssue(makeReturnsIssue(result,e$3)),error});return parsedReturns})}else{let me$2=this;return OK(function(...args){let parsedArgs=me$2._def.args.safeParse(args,params);if(!parsedArgs.success)throw new ZodError([makeArgsIssue(args,parsedArgs.error)]);let result=Reflect.apply(fn$6,this,parsedArgs.data),parsedReturns=me$2._def.returns.safeParse(result,params);if(!parsedReturns.success)throw new ZodError([makeReturnsIssue(result,parsedReturns.error)]);return parsedReturns.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...items){return new ZodFunction({...this._def,args:ZodTuple.create(items).rest(ZodUnknown.create())})}returns(returnType){return new ZodFunction({...this._def,returns:returnType})}implement(func){let validatedFunc=this.parse(func);return validatedFunc}strictImplement(func){let validatedFunc=this.parse(func);return validatedFunc}static create(args,returns,params){return new ZodFunction({args:args||ZodTuple.create([]).rest(ZodUnknown.create()),returns:returns||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(params)})}},ZodLazy=class extends ZodType{get schema(){return this._def.getter()}_parse(input){let{ctx}=this._processInputParams(input),lazySchema=this._def.getter();return lazySchema._parse({data:ctx.data,path:ctx.path,parent:ctx})}};ZodLazy.create=(getter,params)=>new ZodLazy({getter,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(params)});var ZodLiteral=class extends ZodType{_parse(input){if(input.data!==this._def.value){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{received:ctx.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:`valid`,value:input.data}}get value(){return this._def.value}};ZodLiteral.create=(value$1,params)=>new ZodLiteral({value:value$1,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(params)});function createZodEnum(values,params){return new ZodEnum({values,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(params)})}var ZodEnum=class ZodEnum extends ZodType{_parse(input){if(typeof input.data!=`string`){let ctx=this._getOrReturnCtx(input),expectedValues=this._def.values;return addIssueToContext(ctx,{expected:util.joinValues(expectedValues),received:ctx.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(this._cache||=new Set(this._def.values),!this._cache.has(input.data)){let ctx=this._getOrReturnCtx(input),expectedValues=this._def.values;return addIssueToContext(ctx,{received:ctx.data,code:ZodIssueCode.invalid_enum_value,options:expectedValues}),INVALID}return OK(input.data)}get options(){return this._def.values}get enum(){let enumValues={};for(let val of this._def.values)enumValues[val]=val;return enumValues}get Values(){let enumValues={};for(let val of this._def.values)enumValues[val]=val;return enumValues}get Enum(){let enumValues={};for(let val of this._def.values)enumValues[val]=val;return enumValues}extract(values,newDef=this._def){return ZodEnum.create(values,{...this._def,...newDef})}exclude(values,newDef=this._def){return ZodEnum.create(this.options.filter(opt=>!values.includes(opt)),{...this._def,...newDef})}};ZodEnum.create=createZodEnum;var ZodNativeEnum=class extends ZodType{_parse(input){let nativeEnumValues=util.getValidEnumValues(this._def.values),ctx=this._getOrReturnCtx(input);if(ctx.parsedType!==ZodParsedType.string&&ctx.parsedType!==ZodParsedType.number){let expectedValues=util.objectValues(nativeEnumValues);return addIssueToContext(ctx,{expected:util.joinValues(expectedValues),received:ctx.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(this._cache||=new Set(util.getValidEnumValues(this._def.values)),!this._cache.has(input.data)){let expectedValues=util.objectValues(nativeEnumValues);return addIssueToContext(ctx,{received:ctx.data,code:ZodIssueCode.invalid_enum_value,options:expectedValues}),INVALID}return OK(input.data)}get enum(){return this._def.values}};ZodNativeEnum.create=(values,params)=>new ZodNativeEnum({values,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(params)});var ZodPromise=class extends ZodType{unwrap(){return this._def.type}_parse(input){let{ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.promise&&ctx.common.async===!1)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:ctx.parsedType}),INVALID;let promisified=ctx.parsedType===ZodParsedType.promise?ctx.data:Promise.resolve(ctx.data);return OK(promisified.then(data$12=>this._def.type.parseAsync(data$12,{path:ctx.path,errorMap:ctx.common.contextualErrorMap})))}};ZodPromise.create=(schema,params)=>new ZodPromise({type:schema,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(params)});var ZodEffects=class extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(input){let{status,ctx}=this._processInputParams(input),effect$1=this._def.effect||null,checkCtx={addIssue:arg=>{addIssueToContext(ctx,arg),arg.fatal?status.abort():status.dirty()},get path(){return ctx.path}};if(checkCtx.addIssue=checkCtx.addIssue.bind(checkCtx),effect$1.type===`preprocess`){let processed=effect$1.transform(ctx.data,checkCtx);if(ctx.common.async)return Promise.resolve(processed).then(async processed$1=>{if(status.value===`aborted`)return INVALID;let result=await this._def.schema._parseAsync({data:processed$1,path:ctx.path,parent:ctx});return result.status===`aborted`?INVALID:result.status===`dirty`||status.value===`dirty`?DIRTY(result.value):result});{if(status.value===`aborted`)return INVALID;let result=this._def.schema._parseSync({data:processed,path:ctx.path,parent:ctx});return result.status===`aborted`?INVALID:result.status===`dirty`||status.value===`dirty`?DIRTY(result.value):result}}if(effect$1.type===`refinement`){let executeRefinement=acc=>{let result=effect$1.refinement(acc,checkCtx);if(ctx.common.async)return Promise.resolve(result);if(result instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return acc};if(ctx.common.async===!1){let inner=this._def.schema._parseSync({data:ctx.data,path:ctx.path,parent:ctx});return inner.status===`aborted`?INVALID:(inner.status===`dirty`&&status.dirty(),executeRefinement(inner.value),{status:status.value,value:inner.value})}else return this._def.schema._parseAsync({data:ctx.data,path:ctx.path,parent:ctx}).then(inner=>inner.status===`aborted`?INVALID:(inner.status===`dirty`&&status.dirty(),executeRefinement(inner.value).then(()=>({status:status.value,value:inner.value}))))}if(effect$1.type===`transform`)if(ctx.common.async===!1){let base=this._def.schema._parseSync({data:ctx.data,path:ctx.path,parent:ctx});if(!isValid(base))return INVALID;let result=effect$1.transform(base.value,checkCtx);if(result instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:status.value,value:result}}else return this._def.schema._parseAsync({data:ctx.data,path:ctx.path,parent:ctx}).then(base=>isValid(base)?Promise.resolve(effect$1.transform(base.value,checkCtx)).then(result=>({status:status.value,value:result})):INVALID);util.assertNever(effect$1)}};ZodEffects.create=(schema,effect$1,params)=>new ZodEffects({schema,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:effect$1,...processCreateParams(params)}),ZodEffects.createWithPreprocess=(preprocess$1,schema,params)=>new ZodEffects({schema,effect:{type:`preprocess`,transform:preprocess$1},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(params)});var ZodOptional=class extends ZodType{_parse(input){let parsedType=this._getType(input);return parsedType===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(input)}unwrap(){return this._def.innerType}};ZodOptional.create=(type,params)=>new ZodOptional({innerType:type,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(params)});var ZodNullable=class extends ZodType{_parse(input){let parsedType=this._getType(input);return parsedType===ZodParsedType.null?OK(null):this._def.innerType._parse(input)}unwrap(){return this._def.innerType}};ZodNullable.create=(type,params)=>new ZodNullable({innerType:type,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(params)});var ZodDefault=class extends ZodType{_parse(input){let{ctx}=this._processInputParams(input),data$12=ctx.data;return ctx.parsedType===ZodParsedType.undefined&&(data$12=this._def.defaultValue()),this._def.innerType._parse({data:data$12,path:ctx.path,parent:ctx})}removeDefault(){return this._def.innerType}};ZodDefault.create=(type,params)=>new ZodDefault({innerType:type,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof params.default==`function`?params.default:()=>params.default,...processCreateParams(params)});var ZodCatch=class extends ZodType{_parse(input){let{ctx}=this._processInputParams(input),newCtx={...ctx,common:{...ctx.common,issues:[]}},result=this._def.innerType._parse({data:newCtx.data,path:newCtx.path,parent:{...newCtx}});return isAsync(result)?result.then(result$1=>({status:`valid`,value:result$1.status===`valid`?result$1.value:this._def.catchValue({get error(){return new ZodError(newCtx.common.issues)},input:newCtx.data})})):{status:`valid`,value:result.status===`valid`?result.value:this._def.catchValue({get error(){return new ZodError(newCtx.common.issues)},input:newCtx.data})}}removeCatch(){return this._def.innerType}};ZodCatch.create=(type,params)=>new ZodCatch({innerType:type,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof params.catch==`function`?params.catch:()=>params.catch,...processCreateParams(params)});var ZodNaN=class extends ZodType{_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.nan){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:ctx.parsedType}),INVALID}return{status:`valid`,value:input.data}}};ZodNaN.create=params=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(params)});const BRAND=Symbol(`zod_brand`);var ZodBranded=class extends ZodType{_parse(input){let{ctx}=this._processInputParams(input),data$12=ctx.data;return this._def.type._parse({data:data$12,path:ctx.path,parent:ctx})}unwrap(){return this._def.type}},ZodPipeline=class ZodPipeline extends ZodType{_parse(input){let{status,ctx}=this._processInputParams(input);if(ctx.common.async){let handleAsync=async()=>{let inResult=await this._def.in._parseAsync({data:ctx.data,path:ctx.path,parent:ctx});return inResult.status===`aborted`?INVALID:inResult.status===`dirty`?(status.dirty(),DIRTY(inResult.value)):this._def.out._parseAsync({data:inResult.value,path:ctx.path,parent:ctx})};return handleAsync()}else{let inResult=this._def.in._parseSync({data:ctx.data,path:ctx.path,parent:ctx});return inResult.status===`aborted`?INVALID:inResult.status===`dirty`?(status.dirty(),{status:`dirty`,value:inResult.value}):this._def.out._parseSync({data:inResult.value,path:ctx.path,parent:ctx})}}static create(a$2,b$4){return new ZodPipeline({in:a$2,out:b$4,typeName:ZodFirstPartyTypeKind.ZodPipeline})}},ZodReadonly=class extends ZodType{_parse(input){let result=this._def.innerType._parse(input),freeze=data$12=>(isValid(data$12)&&(data$12.value=Object.freeze(data$12.value)),data$12);return isAsync(result)?result.then(data$12=>freeze(data$12)):freeze(result)}unwrap(){return this._def.innerType}};ZodReadonly.create=(type,params)=>new ZodReadonly({innerType:type,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(params)});const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(ZodFirstPartyTypeKind$1){ZodFirstPartyTypeKind$1.ZodString=`ZodString`,ZodFirstPartyTypeKind$1.ZodNumber=`ZodNumber`,ZodFirstPartyTypeKind$1.ZodNaN=`ZodNaN`,ZodFirstPartyTypeKind$1.ZodBigInt=`ZodBigInt`,ZodFirstPartyTypeKind$1.ZodBoolean=`ZodBoolean`,ZodFirstPartyTypeKind$1.ZodDate=`ZodDate`,ZodFirstPartyTypeKind$1.ZodSymbol=`ZodSymbol`,ZodFirstPartyTypeKind$1.ZodUndefined=`ZodUndefined`,ZodFirstPartyTypeKind$1.ZodNull=`ZodNull`,ZodFirstPartyTypeKind$1.ZodAny=`ZodAny`,ZodFirstPartyTypeKind$1.ZodUnknown=`ZodUnknown`,ZodFirstPartyTypeKind$1.ZodNever=`ZodNever`,ZodFirstPartyTypeKind$1.ZodVoid=`ZodVoid`,ZodFirstPartyTypeKind$1.ZodArray=`ZodArray`,ZodFirstPartyTypeKind$1.ZodObject=`ZodObject`,ZodFirstPartyTypeKind$1.ZodUnion=`ZodUnion`,ZodFirstPartyTypeKind$1.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,ZodFirstPartyTypeKind$1.ZodIntersection=`ZodIntersection`,ZodFirstPartyTypeKind$1.ZodTuple=`ZodTuple`,ZodFirstPartyTypeKind$1.ZodRecord=`ZodRecord`,ZodFirstPartyTypeKind$1.ZodMap=`ZodMap`,ZodFirstPartyTypeKind$1.ZodSet=`ZodSet`,ZodFirstPartyTypeKind$1.ZodFunction=`ZodFunction`,ZodFirstPartyTypeKind$1.ZodLazy=`ZodLazy`,ZodFirstPartyTypeKind$1.ZodLiteral=`ZodLiteral`,ZodFirstPartyTypeKind$1.ZodEnum=`ZodEnum`,ZodFirstPartyTypeKind$1.ZodEffects=`ZodEffects`,ZodFirstPartyTypeKind$1.ZodNativeEnum=`ZodNativeEnum`,ZodFirstPartyTypeKind$1.ZodOptional=`ZodOptional`,ZodFirstPartyTypeKind$1.ZodNullable=`ZodNullable`,ZodFirstPartyTypeKind$1.ZodDefault=`ZodDefault`,ZodFirstPartyTypeKind$1.ZodCatch=`ZodCatch`,ZodFirstPartyTypeKind$1.ZodPromise=`ZodPromise`,ZodFirstPartyTypeKind$1.ZodBranded=`ZodBranded`,ZodFirstPartyTypeKind$1.ZodPipeline=`ZodPipeline`,ZodFirstPartyTypeKind$1.ZodReadonly=`ZodReadonly`})(ZodFirstPartyTypeKind||={});const stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,tools$1=[tool({name:`debug_random_number`,description:`Generate a random number between 0 and 1`,execute:async()=>new Promise(resolve$1=>{setTimeout(()=>{resolve$1(Math.random().toString())},1e3)}),parameters:objectType({})})],debug=async()=>Promise.all(tools$1);function __classPrivateFieldGet(receiver,state,kind,f$3){if(kind===`a`&&!f$3)throw TypeError(`Private accessor was defined without a getter`);if(typeof state==`function`?receiver!==state||!f$3:!state.has(receiver))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return kind===`m`?f$3:kind===`a`?f$3.call(receiver):f$3?f$3.value:state.get(receiver)}function __classPrivateFieldSet(receiver,state,value$1,kind,f$3){if(kind===`m`)throw TypeError(`Private method is not writable`);if(kind===`a`&&!f$3)throw TypeError(`Private accessor was defined without a setter`);if(typeof state==`function`?receiver!==state||!f$3:!state.has(receiver))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return kind===`a`?f$3.call(receiver,value$1):f$3?f$3.value=value$1:state.set(receiver,value$1),value$1}var _Channel_onmessage,_Channel_nextMessageIndex,_Channel_pendingMessages,_Channel_messageEndIndex,_Resource_rid;const SERIALIZE_TO_IPC_FN=`__TAURI_TO_IPC_KEY__`;function transformCallback(callback,once=!1){return window.__TAURI_INTERNALS__.transformCallback(callback,once)}var Channel=class{constructor(onmessage){_Channel_onmessage.set(this,void 0),_Channel_nextMessageIndex.set(this,0),_Channel_pendingMessages.set(this,[]),_Channel_messageEndIndex.set(this,void 0),__classPrivateFieldSet(this,_Channel_onmessage,onmessage||(()=>{}),`f`),this.id=transformCallback(rawMessage=>{let index$1=rawMessage.index;if(`end`in rawMessage){index$1==__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)?this.cleanupCallback():__classPrivateFieldSet(this,_Channel_messageEndIndex,index$1,`f`);return}let message$1=rawMessage.message;if(index$1==__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)){for(__classPrivateFieldGet(this,_Channel_onmessage,`f`).call(this,message$1),__classPrivateFieldSet(this,_Channel_nextMessageIndex,__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)+1,`f`);__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)in __classPrivateFieldGet(this,_Channel_pendingMessages,`f`);){let message$2=__classPrivateFieldGet(this,_Channel_pendingMessages,`f`)[__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)];__classPrivateFieldGet(this,_Channel_onmessage,`f`).call(this,message$2),delete __classPrivateFieldGet(this,_Channel_pendingMessages,`f`)[__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)],__classPrivateFieldSet(this,_Channel_nextMessageIndex,__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)+1,`f`)}__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)===__classPrivateFieldGet(this,_Channel_messageEndIndex,`f`)&&this.cleanupCallback()}else __classPrivateFieldGet(this,_Channel_pendingMessages,`f`)[index$1]=message$1})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(handler){__classPrivateFieldSet(this,_Channel_onmessage,handler,`f`)}get onmessage(){return __classPrivateFieldGet(this,_Channel_onmessage,`f`)}[(_Channel_onmessage=new WeakMap,_Channel_nextMessageIndex=new WeakMap,_Channel_pendingMessages=new WeakMap,_Channel_messageEndIndex=new WeakMap,SERIALIZE_TO_IPC_FN)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[SERIALIZE_TO_IPC_FN]()}};async function invoke(cmd,args={},options$1){return window.__TAURI_INTERNALS__.invoke(cmd,args,options$1)}_Resource_rid=new WeakMap;async function connectServer(command,args){await invoke(`plugin:mcp|connect_server`,{command,args})}async function disconnectServer(){await invoke(`plugin:mcp|disconnect_server`)}async function listTools(){return await invoke(`plugin:mcp|list_tools`)}async function callTool(name$2,args){return await invoke(`plugin:mcp|call_tool`,{name:name$2,args})}const tools=[tool({name:`mcp_list_tools`,description:`List all tools available on the MCP server`,execute:async(_$2,__)=>await listTools(),parameters:objectType({})}),tool({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,args})=>(await connectServer(command,args),`success`),parameters:objectType({command:stringType().describe(`The command to connect to the MCP server`),args:arrayType(stringType()).describe(`The arguments to pass to the MCP server`)})}),tool({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 disconnectServer(),`success`),parameters:objectType({})}),tool({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:name$2,parameters})=>{let parametersObject=Object.fromEntries(parameters.map(({name:name$3,value:value$1})=>[name$3,value$1])),result=await callTool(name$2,parametersObject);return result},parameters:objectType({name:stringType().describe(`The name of the tool to call`),parameters:arrayType(objectType({name:stringType().describe(`The name of the parameter`),value:unionType([stringType(),numberType(),booleanType(),objectType({})]).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`)})})],mcp=async()=>Promise.all(tools),useLLM=defineStore(`llm`,()=>{async function stream(model,chatProvider,messages,options$1){let headers=options$1?.headers;return await streamText({...chatProvider.chat(model),maxSteps:10,messages:messages.map(msg=>({...msg,content:msg.role===`error`?`User encountered error: ${msg.content}`:msg.content,role:msg.role===`error`?`user`:msg.role})),headers,tools:[...await mcp(),...await debug()],onEvent(event){event.type===`tool-call`?options$1?.onToolCall?.(event.toolCall):event.type===`tool-call-result`&&options$1?.onToolCallResult?.({id:event.id,result:event.result})}})}async function models$1(apiUrl,apiKey){if(apiUrl===``)return[];try{return await listModels({baseURL:apiUrl.endsWith(`/`)?apiUrl:`${apiUrl}/`,apiKey})}catch(err){if(String(err).includes(`Failed to construct 'URL': Invalid URL`))return[];throw err}}return{models:models$1,stream}}),createChatProvider=options$1=>({chat:model=>Object.assign(options$1,{model})}),createEmbedProvider=options$1=>({embed:model=>Object.assign(options$1,{model})}),createImageProvider=options$1=>({image:model=>Object.assign(options$1,{model})}),createModelProvider=options$1=>({model:()=>options$1}),createSpeechProvider=options$1=>({speech:model=>Object.assign(options$1,{model})}),createTranscriptionProvider=options$1=>({transcription:model=>Object.assign(options$1,{model})}),createMetadataProvider=(id$1,otherMeta)=>({metadata:{id:id$1,...otherMeta}}),merge$1=(...arr)=>Object.assign(arr[0],...arr.slice(1)),createAnthropic=(apiKey,baseURL=`https://api.anthropic.com/v1/`)=>merge$1(createMetadataProvider(`anthropic`),createChatProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createDeepSeek=(apiKey,baseURL=`https://api.deepseek.com/`)=>merge$1(createMetadataProvider(`deepseek`),createChatProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createFireworks=(apiKey,baseURL=`https://api.fireworks.ai/inference/v1/`)=>merge$1(createMetadataProvider(`fireworks`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createGoogleGenerativeAI=(apiKey,baseURL=`https://generativelanguage.googleapis.com/v1beta/openai/`)=>merge$1(createMetadataProvider(`google-generative-ai`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createMistral=(apiKey,baseURL=`https://api.mistral.ai/v1/`)=>merge$1(createMetadataProvider(`mistral`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createMoonshot=(apiKey,baseURL=`https://api.moonshot.cn/v1/`)=>merge$1(createMetadataProvider(`moonshot`),createChatProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createNovita=(apiKey,baseURL=`https://api.novita.ai/v3/openai/`)=>merge$1(createMetadataProvider(`novita`),createChatProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createOpenAI=(apiKey,baseURL=`https://api.openai.com/v1/`)=>merge$1(createMetadataProvider(`openai`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}),createImageProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL}),createSpeechProvider({apiKey,baseURL}),createTranscriptionProvider({apiKey,baseURL})),createOpenRouter=(apiKey,baseURL=``)=>merge$1(createMetadataProvider(`openrouter`),{chat:(model,openRouterOptions)=>{let requestOptions={apiKey,baseURL,model},toOpenRouterOptions=({extraHeaders,models:models$1,provider})=>{extraHeaders!=null&&(requestOptions.headers??={},Object.assign(requestOptions.headers,extraHeaders));let transformedProvider;return provider!=null&&(transformedProvider=objCamelToSnake$1(provider)),objCamelToSnake$1({models:models$1,provider:transformedProvider})};return{...openRouterOptions?toOpenRouterOptions(openRouterOptions):{},...requestOptions}}},createModelProvider({apiKey,baseURL})),createPerplexity=(apiKey,baseURL=`https://api.perplexity.ai/`)=>merge$1(createMetadataProvider(`perplexity`),createChatProvider({apiKey,baseURL})),createTogetherAI=(apiKey,baseURL=`https://api.together.xyz/v1/`)=>merge$1(createMetadataProvider(`together-ai`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL,fetch:async(...args)=>globalThis.fetch(...args).then(async res=>res.json()).then(data$12=>Response.json({data:data$12,object:`list`}))})),createWorkersAI=(apiKey,accountId)=>{let baseURL=`https://api.cloudflare.com/client/v4/accounts/${accountId}/ai/v1/`;return merge$1(createMetadataProvider(`workers-ai`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}))},createXAI=(apiKey,baseURL=`https://api.x.ai/v1/`)=>merge$1(createMetadataProvider(`xai`),createChatProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createOllama=(baseURL=`http://localhost:11434/v1/`)=>merge$1(createMetadataProvider(`ollama`),createChatProvider({baseURL}),createEmbedProvider({baseURL}),createModelProvider({baseURL})),decodeBase64=b64=>{let binString=atob(b64),size$2=binString.length,bytes=new Uint8Array(size$2);for(let i$1=0;i$1merge$1(createMetadataProvider(`player2`),createChatProvider({baseURL,headers:{"player2-game-key":gameKey}}),createSpeechProvider({baseURL,fetch:async(input,reqInit)=>{let newUrl=`${input.toString().slice(0,-12)}tts/speak`;try{let{input:input2,response_format,speed,voice,...rest}=JSON.parse(reqInit?.body),modified={audio_format:response_format,play_in_app:!1,speed:speed??1,text:input2,voice_ids:voice==null?[]:[voice],...rest};reqInit&&(reqInit.body=JSON.stringify(modified))}catch(err){console.warn(`Could not parse body as JSON:`,err)}return globalThis.fetch(newUrl,reqInit).then(async res=>res.json()).then(json=>{let base64=json.data??``,bytes=decodeBase64(base64);return new Response(bytes,{headers:{"Content-Type":`audio/mpeg`},status:200})})},headers:{"player2-game-key":gameKey}}));async function check(){try{if(isInNodejsRuntime())return{supported:!1,isNode:!0,reason:``,fp16Supported:!1};if(typeof navigator>`u`||!navigator.gpu)return{supported:!1,isNode:!1,reason:`WebGPU is not available (navigator.gpu is undefined)`,fp16Supported:!1};let adapter=await navigator.gpu.requestAdapter();return adapter?{supported:!0,isNode:!1,reason:``,adapter,fp16Supported:adapter.features.has(`shader-f16`)}:{supported:!1,isNode:!1,reason:`WebGPU is not supported (no adapter found)`,fp16Supported:!1}}catch(error){let errorMessage=error instanceof Error?error.toString():String(error);return{supported:!1,isNode:!1,reason:errorMessage,fp16Supported:!1}}}function isInNodejsRuntime(){return typeof process<`u`&&`versions`in process&&process.versions!=null&&typeof process.versions==`object`&&`node`in process.versions&&process.versions.node!=null}async function isWebGPUSupported(){return check().then(result=>result.supported)}const merge=(...arr)=>Object.assign(arr[0],...arr.slice(1));var XSAIError=class extends Error{response;constructor(message$1,response){super(message$1),this.name=`XSAIError`,this.response=response}};const strCamelToSnake=str=>str.replace(/[A-Z]/g,s$1=>`_${s$1.toLowerCase()}`),objCamelToSnake=obj=>Object.fromEntries(Object.entries(obj).map(([k$4,v$2])=>[strCamelToSnake(k$4),v$2])),clean$1=obj=>Object.fromEntries(Object.entries(obj).filter(([,v$2])=>v$2!==void 0)),requestHeaders=(headers,apiKey)=>clean$1({Authorization:apiKey===void 0?void 0:`Bearer ${apiKey}`,...headers}),requestURL=(path,baseURL)=>{let base=baseURL.toString();return new URL(path,base.endsWith(`/`)?base:`${base}/`)},responseCatch=async res=>{if(!res.ok)throw new XSAIError(`Remote sent ${res.status} response: ${await res.text()}`,res);if(!res.body)throw new XSAIError(`Response body is empty from remote server`,res);if(!(res.body instanceof ReadableStream))throw new XSAIError(`Expected Response body to be a ReadableStream, but got ${String(res.body)}; Content Type is ${res.headers.get(`Content-Type`)}`,res);return res},responseJSON=async res=>responseCatch(res).then(async res2=>{let text$5=await res2.text();try{return JSON.parse(text$5)}catch{throw Error(`Failed to parse response, response body: ${text$5}`)}});var createUnElevenLabs=(apiKey,baseURL=`http://localhost:5933/v1/`)=>{let toUnSpeechOptions=({applyTextNormalization,languageCode,nextRequestIds,nextText,previousRequestIds,previousText,pronunciationDictionaryLocators,seed,voiceSettings})=>({extraBody:objCamelToSnake({applyTextNormalization,languageCode,nextRequestIds,nextText,previousRequestIds,previousText,pronunciationDictionaryLocators:pronunciationDictionaryLocators?pronunciationDictionaryLocators.map(pdl=>objCamelToSnake(pdl)):void 0,seed,voiceSettings:objCamelToSnake(voiceSettings??{similarityBoost:.75,stability:.5})})}),speechProvider={speech:(model,options$1)=>({...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL,model:`elevenlabs/${model}`})},voiceProvider={voice:options$1=>(baseURL.endsWith(`v1/`)?baseURL=baseURL.slice(0,-3):baseURL.endsWith(`v1`)&&(baseURL=baseURL.slice(0,-2)),{query:`provider=elevenlabs`,...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL})};return merge(speechProvider,voiceProvider)},createUnMicrosoft=(apiKey,baseURL=`http://localhost:5933/v1/`)=>{let toUnSpeechOptions=options$1=>{let{deploymentId,region,sampleRate}=options$1,extraBody={deploymentId,region,sampleRate};return`disableSsml`in options$1?extraBody.disableSsml=options$1.disableSsml:`lang`in options$1&&(extraBody.lang=options$1.lang,extraBody.gender=options$1.gender,extraBody.voice=options$1.voice),{extraBody:objCamelToSnake(extraBody)}},speechProvider={speech:(model,options$1)=>({...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL,model:`microsoft/${model}`})},voiceProvider={voice:options$1=>(baseURL.endsWith(`v1/`)?baseURL=baseURL.slice(0,-3):baseURL.endsWith(`v1`)&&(baseURL=baseURL.slice(0,-2)),{query:`region=${options$1?.region}&provider=microsoft`,...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL})};return merge(speechProvider,voiceProvider)},createUnVolcengine=(apiKey,baseURL=`http://localhost:5933/v1/`)=>{let toUnSpeechOptions=options$1=>{let extraBody={app:{appid:options$1.app?.appId,token:apiKey}};return options$1.app!==void 0&&(extraBody.app={...options$1.app,appid:options$1.app?.appId,token:apiKey}),options$1.user!==void 0&&(extraBody.user=options$1.user),options$1.audio!==void 0&&(extraBody.audio=options$1.audio),{extraBody:objCamelToSnake(extraBody)}},speechProvider={speech:(model,options$1)=>({...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL,model:`volcengine/${model}`})},voiceProvider={voice:options$1=>(baseURL.endsWith(`v1/`)?baseURL=baseURL.slice(0,-3):baseURL.endsWith(`v1`)&&(baseURL=baseURL.slice(0,-2)),{query:`provider=volcengine`,...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL})};return merge(speechProvider,voiceProvider)},createUnAlibabaCloud=(apiKey,baseURL=`http://localhost:5933/v1/`)=>{let toUnSpeechOptions=options$1=>{let{sampleRate,volume,rate,pitch}=options$1,extraBody={sampleRate,volume,rate,pitch};return Object.keys(extraBody).forEach(key$1=>extraBody[key$1]===void 0&&delete extraBody[key$1]),{extraBody:objCamelToSnake(extraBody)}},speechProvider={speech:(model,options$1)=>({...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL,model:`alibaba/${model}`})},voiceProvider={voice:options$1=>{let adjustedBaseURL=baseURL;return adjustedBaseURL.endsWith(`v1/`)?adjustedBaseURL=adjustedBaseURL.slice(0,-3):adjustedBaseURL.endsWith(`v1`)&&(adjustedBaseURL=adjustedBaseURL.slice(0,-2)),{query:`provider=alibaba`,...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL:adjustedBaseURL}}};return merge(speechProvider,voiceProvider)},listVoices=async options$1=>(options$1.fetch??globalThis.fetch)(requestURL(options$1.query?`api/voices?${options$1.query}`:`api/voices`,options$1.baseURL),{headers:requestHeaders({...options$1.headers},options$1.apiKey),method:`GET`,signal:options$1.abortSignal}).then(responseJSON).then(({voices})=>voices);const models=[{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`}],useProvidersStore=defineStore(`providers`,()=>{let providerCredentials=useLocalStorage(`settings/credentials/providers`,{}),{t}=useI18n();async function fetchOpenRouterModels(config){try{let response=await fetch(`https://openrouter.ai/api/v1/models`,{headers:{Authorization:`Bearer ${config.apiKey.trim()}`,"Content-Type":`application/json`}});if(!response.ok)throw Error(`Failed to fetch OpenRouter models: ${response.statusText}`);let data$12=await response.json();return data$12.data.map(model=>({id:model.id,name:model.name||model.id,provider:`openrouter-ai`,description:model.description||``,contextLength:model.context_length,deprecated:!1}))}catch(error){throw console.error(`Error fetching OpenRouter models:`,error),error}}let providerMetadata={"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:config=>createOpenRouter(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>fetchOpenRouterModels(config)},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createOpenAI(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>config.baseUrl?fetch(`${config.baseUrl.trim()}models`).then(response=>response.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:config=>createOpenAI(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>config.baseUrl?fetch(`${config.baseUrl.trim()}models`).then(response=>response.ok).catch(()=>!1):!1}},"browser-local-audio-speech":{id:`browser-local-audio-speech`,category:`speech`,tasks:[`text-to-speech`,`tts`],isAvailableBy:async()=>{let webGPUAvailable=await isWebGPUSupported();if(webGPUAvailable)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let memory=globalThis.navigator.deviceMemory;if(memory>=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:config=>createOpenAI(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>config.baseUrl?fetch(`${config.baseUrl.trim()}models`).then(response=>response.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 webGPUAvailable=await isWebGPUSupported();if(webGPUAvailable)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let memory=globalThis.navigator.deviceMemory;if(memory>=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:config=>createOpenAI(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>config.baseUrl?fetch(`${config.baseUrl.trim()}models`).then(response=>response.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:config=>createOllama(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOllama(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>config.baseUrl?fetch(`${config.baseUrl.trim()}models`).then(response=>response.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:config=>createOllama(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOllama(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.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:config=>createOllama(config.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:config=>!!config.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:config=>createOpenAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createOpenAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createOpenAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createAnthropic(config.apiKey.trim(),config.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:config=>!!config.apiKey&&!!config.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:config=>createGoogleGenerativeAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createGoogleGenerativeAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`google-generative-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createXAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createXAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`xai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createDeepSeek(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createDeepSeek(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`deepseek`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createUnElevenLabs(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async()=>models.map(model=>({id:model.model_id,name:model.name,provider:`elevenlabs`,description:model.description,contextLength:0,deprecated:!1})),listVoices:async config=>{let provider=createUnElevenLabs(config.apiKey.trim(),config.baseUrl.trim()),voices=await listVoices({...provider.voice()}),ariaIndex=voices.findIndex(voice=>voice.name.includes(`Aria`)),billIndex=voices.findIndex(voice=>voice.name.includes(`Bill`)),startIndex=ariaIndex===-1?0:ariaIndex,endIndex=billIndex===-1?voices.length-1:billIndex,lowerIndex=Math.min(startIndex,endIndex),higherIndex=Math.max(startIndex,endIndex),rearrangedVoices=[...voices.slice(0,lowerIndex),...voices.slice(higherIndex+1),...voices.slice(lowerIndex,higherIndex+1)];return rearrangedVoices.map(voice=>({id:voice.id,name:voice.name,provider:`elevenlabs`,previewURL:voice.preview_audio_url,languages:voice.languages}))}},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createUnMicrosoft(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`v1`,name:`v1`,provider:`microsoft-speech`,description:``,contextLength:0,deprecated:!1}],listVoices:async config=>{let provider=createUnMicrosoft(config.apiKey.trim(),config.baseUrl.trim()),voices=await listVoices({...provider.voice({region:config.region})});return voices.map(voice=>({id:voice.id,name:voice.name,provider:`microsoft-speech`,previewURL:voice.preview_audio_url,languages:voice.languages,gender:voice.labels?.gender}))}},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createUnAlibabaCloud(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listVoices:async config=>{let provider=createUnAlibabaCloud(config.apiKey.trim(),config.baseUrl.trim()),voices=await listVoices({...provider.voice()});return voices.map(voice=>({id:voice.id,name:voice.name,provider:`alibaba-cloud-model-studio`,previewURL:voice.preview_audio_url,languages:voice.languages,gender:voice.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:config=>!!config.apiKey&&!!config.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:config=>createUnVolcengine(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listVoices:async config=>{let provider=createUnVolcengine(config.apiKey.trim(),config.baseUrl.trim()),voices=await listVoices({...provider.voice()});return voices.map(voice=>({id:voice.id,name:voice.name,provider:`volcano-engine`,previewURL:voice.preview_audio_url,languages:voice.languages,gender:voice.labels?.gender}))},listModels:async()=>[{id:`v1`,name:`v1`,provider:`volcano-engine`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.baseUrl&&!!config.app&&!!config.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:config=>createTogetherAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createTogetherAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`together-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createNovita(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createNovita(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`novita-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createFireworks(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createFireworks(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`fireworks-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createOpenAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`featherless-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createWorkersAI(config.apiKey.trim(),config.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createPerplexity(config.apiKey.trim(),config.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:config=>!!config.apiKey&&!!config.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:config=>createMistral(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createMistral(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`mistral-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createMoonshot(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createMoonshot(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`moonshot-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.baseUrl}},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:config=>createPlayer2(config.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`player2-model`,name:`Player2 Model`,provider:`player2`}]},validators:{validateProviderConfig:config=>!!config.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:config=>createPlayer2(config.baseUrl.trim(),`airi`),capabilities:{listVoices:async()=>await fetch(`http://localhost:4315/v1/tts/voices`).then(res=>res.json()).then(({voices})=>voices.map(({id:id$1,language,name:name$2,gender})=>({id:id$1,name:name$2,provider:`player2-speech`,gender,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`}}[language]]})))},validators:{validateProviderConfig:config=>!!config.baseUrl}}};async function validateProvider(providerId){let config=providerCredentials.value[providerId];if(!config)return!1;let metadata=providerMetadata[providerId];return metadata?await metadata.validators.validateProviderConfig(config):!1}let configuredProviders=ref({});function initializeProvider(providerId){if(!providerCredentials.value[providerId]){let metadata=providerMetadata[providerId],defaultOptions=metadata.defaultOptions?.()||{};providerCredentials.value[providerId]={baseUrl:defaultOptions.baseUrl||``}}}Object.keys(providerMetadata).forEach(initializeProvider);async function updateConfigurationStatus(){await Promise.all(Object.keys(providerMetadata).map(async providerId=>{configuredProviders.value[providerId]=await validateProvider(providerId)}))}updateConfigurationStatus(),watch(providerCredentials,updateConfigurationStatus,{deep:!0});let availableProviders=computed(()=>Object.keys(providerMetadata).filter(providerId=>configuredProviders.value[providerId])),availableModels=ref({}),isLoadingModels=ref({}),modelLoadError=ref({});async function fetchModelsForProvider(providerId){let config=providerCredentials.value[providerId];if(!config)return[];let metadata=providerMetadata[providerId];if(!metadata)return[];isLoadingModels.value[providerId]=!0,modelLoadError.value[providerId]=null;try{let models$1=metadata.capabilities.listModels?await metadata.capabilities.listModels(config):[];return availableModels.value[providerId]=models$1.map(model=>({id:model.id,name:model.name,description:model.description,contextLength:model.contextLength,deprecated:model.deprecated,provider:providerId})),availableModels.value[providerId]}catch(error){return console.error(`Error fetching models for ${providerId}:`,error),modelLoadError.value[providerId]=error instanceof Error?error.message:`Unknown error`,[]}finally{isLoadingModels.value[providerId]=!1}}function getModelsForProvider(providerId){return availableModels.value[providerId]||[]}let allAvailableModels=computed(()=>{let models$1=[];for(let providerId of availableProviders.value)models$1.push(...availableModels.value[providerId]||[]);return models$1});async function loadModelsForConfiguredProviders(){for(let providerId of availableProviders.value)providerMetadata[providerId].capabilities.listModels&&await fetchModelsForProvider(providerId)}function getProviderMetadata(providerId){let metadata=providerMetadata[providerId];if(!metadata)throw Error(`Provider metadata for ${providerId} not found`);return{...metadata,localizedName:t(metadata.nameKey,metadata.name),localizedDescription:t(metadata.descriptionKey,metadata.description)}}let allProvidersMetadata=computed(()=>Object.values(providerMetadata).map(metadata=>({...metadata,localizedName:t(metadata.nameKey,metadata.name),localizedDescription:t(metadata.descriptionKey,metadata.description),configured:configuredProviders.value[metadata.id]||!1})));function getProviderInstance(providerId){let config=providerCredentials.value[providerId];if(!config)throw Error(`Provider credentials for ${providerId} not found`);let metadata=providerMetadata[providerId];if(!metadata)throw Error(`Provider metadata for ${providerId} not found`);try{return metadata.createProvider(config)}catch(error){throw console.error(`Error creating provider instance for ${providerId}:`,error),error}}let availableProvidersMetadata=computedAsync(async()=>{let providers=[];for(let provider of allProvidersMetadata.value){let p$5=getProviderMetadata(provider.id),isAvailableBy=p$5.isAvailableBy||(()=>!0),isAvailable=await isAvailableBy();isAvailable&&providers.push(provider)}return providers},[]),allChatProvidersMetadata=computed(()=>availableProvidersMetadata.value.filter(metadata=>metadata.category===`chat`)),allAudioSpeechProvidersMetadata=computed(()=>availableProvidersMetadata.value.filter(metadata=>metadata.category===`speech`)),allAudioTranscriptionProvidersMetadata=computed(()=>availableProvidersMetadata.value.filter(metadata=>metadata.category===`transcription`)),configuredChatProvidersMetadata=computed(()=>allChatProvidersMetadata.value.filter(metadata=>configuredProviders.value[metadata.id])),configuredSpeechProvidersMetadata=computed(()=>allAudioSpeechProvidersMetadata.value.filter(metadata=>configuredProviders.value[metadata.id])),configuredTranscriptionProvidersMetadata=computed(()=>allAudioTranscriptionProvidersMetadata.value.filter(metadata=>configuredProviders.value[metadata.id]));function getProviderConfig(providerId){return providerCredentials.value[providerId]}return{providers:providerCredentials,getProviderConfig,availableProviders,configuredProviders,providerMetadata,getProviderMetadata,allProvidersMetadata,initializeProvider,validateProvider,availableModels,isLoadingModels,modelLoadError,fetchModelsForProvider,getModelsForProvider,allAvailableModels,loadModelsForConfiguredProviders,getProviderInstance,availableProvidersMetadata,allChatProvidersMetadata,allAudioSpeechProvidersMetadata,allAudioTranscriptionProvidersMetadata,configuredChatProvidersMetadata,configuredSpeechProvidersMetadata,configuredTranscriptionProvidersMetadata}}),useConsciousnessStore=defineStore(`consciousness`,()=>{let providersStore=useProvidersStore(),activeProvider=useLocalStorage(`settings/consciousness/active-provider`,``),activeModel=useLocalStorage(`settings/consciousness/active-model`,``),activeCustomModelName=useLocalStorage(`settings/consciousness/active-custom-model`,``),expandedDescriptions=ref({}),modelSearchQuery=ref(``),supportsModelListing=computed(()=>providersStore.getProviderMetadata(activeProvider.value)?.capabilities.listModels!==void 0),providerModels=computed(()=>providersStore.getModelsForProvider(activeProvider.value)),isLoadingActiveProviderModels=computed(()=>providersStore.isLoadingModels[activeProvider.value]||!1),activeProviderModelError=computed(()=>providersStore.modelLoadError[activeProvider.value]||null),filteredModels=computed(()=>{if(!modelSearchQuery.value.trim())return providerModels.value;let query=modelSearchQuery.value.toLowerCase().trim();return providerModels.value.filter(model=>model.name.toLowerCase().includes(query)||model.id.toLowerCase().includes(query)||model.description&&model.description.toLowerCase().includes(query))});function resetModelSelection(){activeModel.value=``,activeCustomModelName.value=``,expandedDescriptions.value={},modelSearchQuery.value=``}async function loadModelsForProvider(provider){provider&&providersStore.getProviderMetadata(provider)?.capabilities.listModels!==void 0&&await providersStore.fetchModelsForProvider(provider)}async function getModelsForProvider(provider){return provider&&providersStore.getProviderMetadata(provider)?.capabilities.listModels!==void 0?providersStore.getModelsForProvider(provider):[]}let player2Interval;watch(activeProvider,async newProvider=>{await loadModelsForProvider(newProvider),resetModelSelection(),newProvider===`player2`?player2Interval=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):(player2Interval&&clearInterval(player2Interval),player2Interval=void 0)});let configured=computed(()=>!!activeProvider.value&&!!activeModel.value);return{configured,activeProvider,activeModel,customModelName:activeCustomModelName,expandedDescriptions,modelSearchQuery,supportsModelListing,providerModels,isLoadingActiveProviderModels,activeProviderModelError,filteredModels,resetModelSelection,loadModelsForProvider,getModelsForProvider}}),noncharacter=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;function escape(value$1,subset$4,unsafe$2){let result=clean(value$1);return unsafe$2?result.replace(unsafe$2,encode):encode(result);function encode(value$2){return stringifyEntitiesLight(value$2,{subset:subset$4})}}function clean(value$1){return String(value$1||``).replace(noncharacter,``)}const unsafe$1=/]]>/g,subset$3=[`>`];function cdata(node$1){return``}function comment(node$1){return``}const subset$2=[` `,` +`);buffer$1=lines.pop()??``;for(let line of lines)try{let[chunk2,isEnd]=parseChunk(line);if(isEnd)break;chunk2&&controller.enqueue(chunk2)}catch(error){controller.error(error)}}})).pipeTo(new WritableStream({abort:reason=>{chunkCtrl.error(reason),stepCtrl.error(reason),textCtrl.error(reason)},close:()=>{options2.onEvent?.({finishReason,type:`finish`,usage})},write:async chunk=>{if(options2.onChunk?.(chunk),chunkCtrl.enqueue(chunk),usage=chunk.usage,chunk.choices==null||chunk.choices.length===0)return;let choice=chunk.choices[0];choice.delta.tool_calls&&(shouldOutputText=!1);let{delta,finish_reason,index:index$1,...rest}=choice,choiceSnapshot=step.choices[index$1]??={finishReason:finish_reason,index:index$1,message:{role:`assistant`}};if(finish_reason!==void 0){if(finishReason=finish_reason,step.finishReason=finish_reason,choiceSnapshot.finishReason=finish_reason,finish_reason===`length`)throw new XSAIError$1(`length exceeded`);if(finish_reason===`content_filter`)throw new XSAIError$1(`content filter`)}Object.assign(choiceSnapshot,rest);let{content:content$2,refusal,tool_calls,...rests}=delta,message$1=choiceSnapshot.message;Object.assign(message$1,rests),refusal!==void 0&&(message$1.refusal=(message$1.refusal||``)+(refusal||``),options2.onEvent?.({refusal:message$1.refusal,type:`refusal`})),content$2!==void 0&&(message$1.content=(message$1.content||``)+(content$2||``),shouldOutputText&&textCtrl?.enqueue(content$2),options2.onEvent?.({text:content$2,type:`text-delta`}));for(let tool_call of tool_calls||[]){options2.onEvent?.({toolCall:tool_call,type:`tool-call-delta`});let{function:fn$6,id:id$1,index:index2,type}=tool_call;message$1.toolCalls??={};let toolCall=message$1.toolCalls[index2]??={function:{arguments:``,name:fn$6.name,parsedArguments:{}},id:id$1,index:index2,type};toolCall.function.arguments+=fn$6.arguments}let state=choiceState[index$1]??={calledToolCallIndex:new Set,currentToolIndex:null,endedToolCallIndex:new Set,index:index$1,toolCallErrors:{},toolCallResults:{}};finish_reason&&state.currentToolIndex!==null&&endToolCallByIndex(state,state.currentToolIndex);for(let toolCall of delta.tool_calls||[])state.currentToolIndex!==toolCall.index&&state.currentToolIndex!==null&&endToolCallByIndex(state,state.currentToolIndex),state.calledToolCallIndex.add(toolCall.index),state.currentToolIndex=toolCall.index}}))),step.messages.push({content:step.choices[0]?.message.content??``,refusal:step.choices[0]?.message.refusal,role:`assistant`,tool_calls:Object.values(step.choices[0]?.message.toolCalls??{}).map(toolCall=>({function:{arguments:toolCall.function.arguments,name:toolCall.function.name},id:toolCall.id,index:toolCall.index,type:toolCall.type}))}),await Promise.allSettled(step.choices.map(async choice=>{let state=choiceState[choice.index];return Promise.allSettled([...state.endedToolCallIndex].map(async idx=>{let toolCall=choice.message.toolCalls[idx];if(step.toolCalls.push({args:toolCall.function.arguments,toolCallId:toolCall.id,toolCallType:`function`,toolName:toolCall.function.name}),!state.toolCallResults[toolCall.id]){options2.onEvent?.({toolCall,type:`tool-call`});try{let{completionToolResult,message:message$1,parsedArgs,result}=await executeTool({abortSignal:options2.abortSignal,messages:options2.messages,toolCall,tools:options2.tools});toolCall.function.parsedArguments=parsedArgs,state.toolCallResults[toolCall.id]=result,step.messages.push(message$1),step.toolResults.push(completionToolResult),options2.onEvent?.({id:toolCall.id,result,type:`tool-call-result`})}catch(error){state.toolCallErrors[idx]=error}}}))})),step.stepType=determineStepType({finishReason:step.finishReason,maxSteps,stepsLength:steps$1.length,toolCallsLength:step.toolCalls.length}),steps$1.push(step),stepCtrl.enqueue(step),options2.onStepFinish?.(step),!shouldOutputText)return async()=>stepOne({...options2,messages:step.messages})},invokeFunctionCalls=async()=>{let ret=await stepOne(options$1);for(;typeof ret==`function`&&steps$1.length{chunkCtrl.error(error),stepCtrl.error(error),textCtrl.error(error)}),Promise.resolve({chunkStream,stepStream,textStream})},strictJsonSchema=schema=>({...schema,additionalProperties:!1}),missingDependenciesUrl=`https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies`,tryImport=async(result,name$2)=>{try{return await result}catch{throw Error(`xsschema: Missing dependencies "${name$2}". see ${missingDependenciesUrl}`)}},getToJsonSchemaFn=async vendor=>{switch(vendor){case`arktype`:return __vitePreload(()=>import(`./arktype-C-GObzDh-o7JLSWxh.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`effect`:return __vitePreload(()=>import(`./effect-DBSVVF8G-BdFsO4ps.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`sury`:return __vitePreload(()=>import(`./sury-GtnkadyM-DKj7Iepm.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`valibot`:return __vitePreload(()=>import(`./valibot-CbgwcZn_-BuwxpHVF.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`zod`:return __vitePreload(()=>import(`./zod-CD8IEU5z-D4TCz3Sz.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());default:throw Error(`xsschema: Unsupported schema vendor "${vendor}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},toJsonSchema=async schema=>getToJsonSchemaFn(schema[`~standard`].vendor).then(async toJsonSchema2=>toJsonSchema2(schema)),tool=async({description,execute,name:name$2,parameters})=>{let schema=await toJsonSchema(parameters);return{execute,function:{description,name:name$2,parameters:strictJsonSchema(schema),strict:!0},type:`function`}};var util;(function(util$1){util$1.assertEqual=_$2=>{};function assertIs(_arg){}util$1.assertIs=assertIs;function assertNever(_x$1){throw Error()}util$1.assertNever=assertNever,util$1.arrayToEnum=items=>{let obj={};for(let item of items)obj[item]=item;return obj},util$1.getValidEnumValues=obj=>{let validKeys=util$1.objectKeys(obj).filter(k$4=>typeof obj[obj[k$4]]!=`number`),filtered={};for(let k$4 of validKeys)filtered[k$4]=obj[k$4];return util$1.objectValues(filtered)},util$1.objectValues=obj=>util$1.objectKeys(obj).map(function(e$3){return obj[e$3]}),util$1.objectKeys=typeof Object.keys==`function`?obj=>Object.keys(obj):object=>{let keys$3=[];for(let key$1 in object)Object.prototype.hasOwnProperty.call(object,key$1)&&keys$3.push(key$1);return keys$3},util$1.find=(arr,checker)=>{for(let item of arr)if(checker(item))return item},util$1.isInteger=typeof Number.isInteger==`function`?val=>Number.isInteger(val):val=>typeof val==`number`&&Number.isFinite(val)&&Math.floor(val)===val;function joinValues(array,separator=` | `){return array.map(val=>typeof val==`string`?`'${val}'`:val).join(separator)}util$1.joinValues=joinValues,util$1.jsonStringifyReplacer=(_$2,value$1)=>typeof value$1==`bigint`?value$1.toString():value$1})(util||={});var objectUtil;(function(objectUtil$1){objectUtil$1.mergeShapes=(first,second)=>({...first,...second})})(objectUtil||={});const ZodParsedType=util.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),getParsedType=data$12=>{let t=typeof data$12;switch(t){case`undefined`:return ZodParsedType.undefined;case`string`:return ZodParsedType.string;case`number`:return Number.isNaN(data$12)?ZodParsedType.nan:ZodParsedType.number;case`boolean`:return ZodParsedType.boolean;case`function`:return ZodParsedType.function;case`bigint`:return ZodParsedType.bigint;case`symbol`:return ZodParsedType.symbol;case`object`:return Array.isArray(data$12)?ZodParsedType.array:data$12===null?ZodParsedType.null:data$12.then&&typeof data$12.then==`function`&&data$12.catch&&typeof data$12.catch==`function`?ZodParsedType.promise:typeof Map<`u`&&data$12 instanceof Map?ZodParsedType.map:typeof Set<`u`&&data$12 instanceof Set?ZodParsedType.set:typeof Date<`u`&&data$12 instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]);var ZodError=class ZodError extends Error{get errors(){return this.issues}constructor(issues){super(),this.issues=[],this.addIssue=sub=>{this.issues=[...this.issues,sub]},this.addIssues=(subs=[])=>{this.issues=[...this.issues,...subs]};let actualProto=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,actualProto):this.__proto__=actualProto,this.name=`ZodError`,this.issues=issues}format(_mapper){let mapper=_mapper||function(issue){return issue.message},fieldErrors={_errors:[]},processError=error=>{for(let issue of error.issues)if(issue.code===`invalid_union`)issue.unionErrors.map(processError);else if(issue.code===`invalid_return_type`)processError(issue.returnTypeError);else if(issue.code===`invalid_arguments`)processError(issue.argumentsError);else if(issue.path.length===0)fieldErrors._errors.push(mapper(issue));else{let curr=fieldErrors,i$1=0;for(;i$1issue.message){let fieldErrors={},formErrors=[];for(let sub of this.issues)if(sub.path.length>0){let firstEl=sub.path[0];fieldErrors[firstEl]=fieldErrors[firstEl]||[],fieldErrors[firstEl].push(mapper(sub))}else formErrors.push(mapper(sub));return{formErrors,fieldErrors}}get formErrors(){return this.flatten()}};ZodError.create=issues=>{let error=new ZodError(issues);return error};const errorMap=(issue,_ctx)=>{let message$1;switch(issue.code){case ZodIssueCode.invalid_type:message$1=issue.received===ZodParsedType.undefined?`Required`:`Expected ${issue.expected}, received ${issue.received}`;break;case ZodIssueCode.invalid_literal:message$1=`Invalid literal value, expected ${JSON.stringify(issue.expected,util.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:message$1=`Unrecognized key(s) in object: ${util.joinValues(issue.keys,`, `)}`;break;case ZodIssueCode.invalid_union:message$1=`Invalid input`;break;case ZodIssueCode.invalid_union_discriminator:message$1=`Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;break;case ZodIssueCode.invalid_enum_value:message$1=`Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;break;case ZodIssueCode.invalid_arguments:message$1=`Invalid function arguments`;break;case ZodIssueCode.invalid_return_type:message$1=`Invalid function return type`;break;case ZodIssueCode.invalid_date:message$1=`Invalid date`;break;case ZodIssueCode.invalid_string:typeof issue.validation==`object`?`includes`in issue.validation?(message$1=`Invalid input: must include "${issue.validation.includes}"`,typeof issue.validation.position==`number`&&(message$1=`${message$1} at one or more positions greater than or equal to ${issue.validation.position}`)):`startsWith`in issue.validation?message$1=`Invalid input: must start with "${issue.validation.startsWith}"`:`endsWith`in issue.validation?message$1=`Invalid input: must end with "${issue.validation.endsWith}"`:util.assertNever(issue.validation):message$1=issue.validation===`regex`?`Invalid`:`Invalid ${issue.validation}`;break;case ZodIssueCode.too_small:message$1=issue.type===`array`?`Array must contain ${issue.exact?`exactly`:issue.inclusive?`at least`:`more than`} ${issue.minimum} element(s)`:issue.type===`string`?`String must contain ${issue.exact?`exactly`:issue.inclusive?`at least`:`over`} ${issue.minimum} character(s)`:issue.type===`number`||issue.type===`bigint`?`Number must be ${issue.exact?`exactly equal to `:issue.inclusive?`greater than or equal to `:`greater than `}${issue.minimum}`:issue.type===`date`?`Date must be ${issue.exact?`exactly equal to `:issue.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(issue.minimum))}`:`Invalid input`;break;case ZodIssueCode.too_big:message$1=issue.type===`array`?`Array must contain ${issue.exact?`exactly`:issue.inclusive?`at most`:`less than`} ${issue.maximum} element(s)`:issue.type===`string`?`String must contain ${issue.exact?`exactly`:issue.inclusive?`at most`:`under`} ${issue.maximum} character(s)`:issue.type===`number`?`Number must be ${issue.exact?`exactly`:issue.inclusive?`less than or equal to`:`less than`} ${issue.maximum}`:issue.type===`bigint`?`BigInt must be ${issue.exact?`exactly`:issue.inclusive?`less than or equal to`:`less than`} ${issue.maximum}`:issue.type===`date`?`Date must be ${issue.exact?`exactly`:issue.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(issue.maximum))}`:`Invalid input`;break;case ZodIssueCode.custom:message$1=`Invalid input`;break;case ZodIssueCode.invalid_intersection_types:message$1=`Intersection results could not be merged`;break;case ZodIssueCode.not_multiple_of:message$1=`Number must be a multiple of ${issue.multipleOf}`;break;case ZodIssueCode.not_finite:message$1=`Number must be finite`;break;default:message$1=_ctx.defaultError,util.assertNever(issue)}return{message:message$1}};var en_default$1=errorMap;let overrideErrorMap=en_default$1;function getErrorMap(){return overrideErrorMap}const makeIssue=params=>{let{data:data$12,path,errorMaps,issueData}=params,fullPath=[...path,...issueData.path||[]],fullIssue={...issueData,path:fullPath};if(issueData.message!==void 0)return{...issueData,path:fullPath,message:issueData.message};let errorMessage=``,maps=errorMaps.filter(m$3=>!!m$3).slice().reverse();for(let map of maps)errorMessage=map(fullIssue,{data:data$12,defaultError:errorMessage}).message;return{...issueData,path:fullPath,message:errorMessage}};function addIssueToContext(ctx,issueData){let overrideMap=getErrorMap(),issue=makeIssue({issueData,data:ctx.data,path:ctx.path,errorMaps:[ctx.common.contextualErrorMap,ctx.schemaErrorMap,overrideMap,overrideMap===en_default$1?void 0:en_default$1].filter(x$3=>!!x$3)});ctx.common.issues.push(issue)}var ParseStatus=class ParseStatus{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(status,results){let arrayValue=[];for(let s$1 of results){if(s$1.status===`aborted`)return INVALID;s$1.status===`dirty`&&status.dirty(),arrayValue.push(s$1.value)}return{status:status.value,value:arrayValue}}static async mergeObjectAsync(status,pairs){let syncPairs=[];for(let pair of pairs){let key$1=await pair.key,value$1=await pair.value;syncPairs.push({key:key$1,value:value$1})}return ParseStatus.mergeObjectSync(status,syncPairs)}static mergeObjectSync(status,pairs){let finalObject={};for(let pair of pairs){let{key:key$1,value:value$1}=pair;if(key$1.status===`aborted`||value$1.status===`aborted`)return INVALID;key$1.status===`dirty`&&status.dirty(),value$1.status===`dirty`&&status.dirty(),key$1.value!==`__proto__`&&(value$1.value!==void 0||pair.alwaysSet)&&(finalObject[key$1.value]=value$1.value)}return{status:status.value,value:finalObject}}};const INVALID=Object.freeze({status:`aborted`}),DIRTY=value$1=>({status:`dirty`,value:value$1}),OK=value$1=>({status:`valid`,value:value$1}),isAborted=x$3=>x$3.status===`aborted`,isDirty=x$3=>x$3.status===`dirty`,isValid=x$3=>x$3.status===`valid`,isAsync=x$3=>typeof Promise<`u`&&x$3 instanceof Promise;var errorUtil;(function(errorUtil$1){errorUtil$1.errToObj=message$1=>typeof message$1==`string`?{message:message$1}:message$1||{},errorUtil$1.toString=message$1=>typeof message$1==`string`?message$1:message$1?.message})(errorUtil||={});var ParseInputLazyPath=class{constructor(parent,value$1,path,key$1){this._cachedPath=[],this.parent=parent,this.data=value$1,this._path=path,this._key=key$1}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const handleResult=(ctx,result)=>{if(isValid(result))return{success:!0,data:result.value};if(!ctx.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let error=new ZodError(ctx.common.issues);return this._error=error,this._error}}};function processCreateParams(params){if(!params)return{};let{errorMap:errorMap$1,invalid_type_error,required_error,description}=params;if(errorMap$1&&(invalid_type_error||required_error))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(errorMap$1)return{errorMap:errorMap$1,description};let customMap=(iss,ctx)=>{let{message:message$1}=params;return iss.code===`invalid_enum_value`?{message:message$1??ctx.defaultError}:ctx.data===void 0?{message:message$1??required_error??ctx.defaultError}:iss.code===`invalid_type`?{message:message$1??invalid_type_error??ctx.defaultError}:{message:ctx.defaultError}};return{errorMap:customMap,description}}var ZodType=class{get description(){return this._def.description}_getType(input){return getParsedType(input.data)}_getOrReturnCtx(input,ctx){return ctx||{common:input.parent.common,data:input.data,parsedType:getParsedType(input.data),schemaErrorMap:this._def.errorMap,path:input.path,parent:input.parent}}_processInputParams(input){return{status:new ParseStatus,ctx:{common:input.parent.common,data:input.data,parsedType:getParsedType(input.data),schemaErrorMap:this._def.errorMap,path:input.path,parent:input.parent}}}_parseSync(input){let result=this._parse(input);if(isAsync(result))throw Error(`Synchronous parse encountered promise.`);return result}_parseAsync(input){let result=this._parse(input);return Promise.resolve(result)}parse(data$12,params){let result=this.safeParse(data$12,params);if(result.success)return result.data;throw result.error}safeParse(data$12,params){let ctx={common:{issues:[],async:params?.async??!1,contextualErrorMap:params?.errorMap},path:params?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:data$12,parsedType:getParsedType(data$12)},result=this._parseSync({data:data$12,path:ctx.path,parent:ctx});return handleResult(ctx,result)}"~validate"(data$12){let ctx={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:data$12,parsedType:getParsedType(data$12)};if(!this[`~standard`].async)try{let result=this._parseSync({data:data$12,path:[],parent:ctx});return isValid(result)?{value:result.value}:{issues:ctx.common.issues}}catch(err){err?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),ctx.common={issues:[],async:!0}}return this._parseAsync({data:data$12,path:[],parent:ctx}).then(result=>isValid(result)?{value:result.value}:{issues:ctx.common.issues})}async parseAsync(data$12,params){let result=await this.safeParseAsync(data$12,params);if(result.success)return result.data;throw result.error}async safeParseAsync(data$12,params){let ctx={common:{issues:[],contextualErrorMap:params?.errorMap,async:!0},path:params?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:data$12,parsedType:getParsedType(data$12)},maybeAsyncResult=this._parse({data:data$12,path:ctx.path,parent:ctx}),result=await(isAsync(maybeAsyncResult)?maybeAsyncResult:Promise.resolve(maybeAsyncResult));return handleResult(ctx,result)}refine(check$1,message$1){let getIssueProperties=val=>typeof message$1==`string`||message$1===void 0?{message:message$1}:typeof message$1==`function`?message$1(val):message$1;return this._refinement((val,ctx)=>{let result=check$1(val),setError=()=>ctx.addIssue({code:ZodIssueCode.custom,...getIssueProperties(val)});return typeof Promise<`u`&&result instanceof Promise?result.then(data$12=>data$12?!0:(setError(),!1)):result?!0:(setError(),!1)})}refinement(check$1,refinementData){return this._refinement((val,ctx)=>check$1(val)?!0:(ctx.addIssue(typeof refinementData==`function`?refinementData(val,ctx):refinementData),!1))}_refinement(refinement){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:`refinement`,refinement}})}superRefine(refinement){return this._refinement(refinement)}constructor(def$1){this.spa=this.safeParseAsync,this._def=def$1,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:data$12=>this[`~validate`](data$12)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(option$1){return ZodUnion.create([this,option$1],this._def)}and(incoming){return ZodIntersection.create(this,incoming,this._def)}transform(transform$1){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:`transform`,transform:transform$1}})}default(def$1){let defaultValueFunc=typeof def$1==`function`?def$1:()=>def$1;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:defaultValueFunc,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(def$1){let catchValueFunc=typeof def$1==`function`?def$1:()=>def$1;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:catchValueFunc,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(description){let This=this.constructor;return new This({...this._def,description})}pipe(target$1){return ZodPipeline.create(this,target$1)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,jwtRegex=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;let emojiRegex;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4CidrRegex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Regex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ipv6CidrRegex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64urlRegex=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dateRegexSource=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,dateRegex=RegExp(`^${dateRegexSource}$`);function timeRegexSource(args){let secondsRegexSource=`[0-5]\\d`;args.precision?secondsRegexSource=`${secondsRegexSource}\\.\\d{${args.precision}}`:args.precision??(secondsRegexSource=`${secondsRegexSource}(\\.\\d+)?`);let secondsQuantifier=args.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`}function timeRegex(args){return RegExp(`^${timeRegexSource(args)}$`)}function datetimeRegex(args){let regex=`${dateRegexSource}T${timeRegexSource(args)}`,opts=[];return opts.push(args.local?`Z?`:`Z`),args.offset&&opts.push(`([+-]\\d{2}:?\\d{2})`),regex=`${regex}(${opts.join(`|`)})`,RegExp(`^${regex}$`)}function isValidIP(ip$1,version$1){return!!((version$1===`v4`||!version$1)&&ipv4Regex.test(ip$1)||(version$1===`v6`||!version$1)&&ipv6Regex.test(ip$1))}function isValidJWT(jwt,alg){if(!jwtRegex.test(jwt))return!1;try{let[header]=jwt.split(`.`);if(!header)return!1;let base64=header.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(header.length+(4-header.length%4)%4,`=`),decoded=JSON.parse(atob(base64));return!(typeof decoded!=`object`||!decoded||`typ`in decoded&&decoded?.typ!==`JWT`||!decoded.alg||alg&&decoded.alg!==alg)}catch{return!1}}function isValidCidr(ip$1,version$1){return!!((version$1===`v4`||!version$1)&&ipv4CidrRegex.test(ip$1)||(version$1===`v6`||!version$1)&&ipv6CidrRegex.test(ip$1))}var ZodString=class ZodString extends ZodType{_parse(input){this._def.coerce&&(input.data=String(input.data));let parsedType=this._getType(input);if(parsedType!==ZodParsedType.string){let ctx$1=this._getOrReturnCtx(input);return addIssueToContext(ctx$1,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:ctx$1.parsedType}),INVALID}let status=new ParseStatus,ctx;for(let check$1 of this._def.checks)if(check$1.kind===`min`)input.data.lengthcheck$1.value&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.too_big,maximum:check$1.value,type:`string`,inclusive:!0,exact:!1,message:check$1.message}),status.dirty());else if(check$1.kind===`length`){let tooBig=input.data.length>check$1.value,tooSmall=input.data.lengthregex.test(data$12),{validation,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(message$1)})}_addCheck(check$1){return new ZodString({...this._def,checks:[...this._def.checks,check$1]})}email(message$1){return this._addCheck({kind:`email`,...errorUtil.errToObj(message$1)})}url(message$1){return this._addCheck({kind:`url`,...errorUtil.errToObj(message$1)})}emoji(message$1){return this._addCheck({kind:`emoji`,...errorUtil.errToObj(message$1)})}uuid(message$1){return this._addCheck({kind:`uuid`,...errorUtil.errToObj(message$1)})}nanoid(message$1){return this._addCheck({kind:`nanoid`,...errorUtil.errToObj(message$1)})}cuid(message$1){return this._addCheck({kind:`cuid`,...errorUtil.errToObj(message$1)})}cuid2(message$1){return this._addCheck({kind:`cuid2`,...errorUtil.errToObj(message$1)})}ulid(message$1){return this._addCheck({kind:`ulid`,...errorUtil.errToObj(message$1)})}base64(message$1){return this._addCheck({kind:`base64`,...errorUtil.errToObj(message$1)})}base64url(message$1){return this._addCheck({kind:`base64url`,...errorUtil.errToObj(message$1)})}jwt(options$1){return this._addCheck({kind:`jwt`,...errorUtil.errToObj(options$1)})}ip(options$1){return this._addCheck({kind:`ip`,...errorUtil.errToObj(options$1)})}cidr(options$1){return this._addCheck({kind:`cidr`,...errorUtil.errToObj(options$1)})}datetime(options$1){return typeof options$1==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:options$1}):this._addCheck({kind:`datetime`,precision:options$1?.precision===void 0?null:options$1?.precision,offset:options$1?.offset??!1,local:options$1?.local??!1,...errorUtil.errToObj(options$1?.message)})}date(message$1){return this._addCheck({kind:`date`,message:message$1})}time(options$1){return typeof options$1==`string`?this._addCheck({kind:`time`,precision:null,message:options$1}):this._addCheck({kind:`time`,precision:options$1?.precision===void 0?null:options$1?.precision,...errorUtil.errToObj(options$1?.message)})}duration(message$1){return this._addCheck({kind:`duration`,...errorUtil.errToObj(message$1)})}regex(regex,message$1){return this._addCheck({kind:`regex`,regex,...errorUtil.errToObj(message$1)})}includes(value$1,options$1){return this._addCheck({kind:`includes`,value:value$1,position:options$1?.position,...errorUtil.errToObj(options$1?.message)})}startsWith(value$1,message$1){return this._addCheck({kind:`startsWith`,value:value$1,...errorUtil.errToObj(message$1)})}endsWith(value$1,message$1){return this._addCheck({kind:`endsWith`,value:value$1,...errorUtil.errToObj(message$1)})}min(minLength,message$1){return this._addCheck({kind:`min`,value:minLength,...errorUtil.errToObj(message$1)})}max(maxLength,message$1){return this._addCheck({kind:`max`,value:maxLength,...errorUtil.errToObj(message$1)})}length(len,message$1){return this._addCheck({kind:`length`,value:len,...errorUtil.errToObj(message$1)})}nonempty(message$1){return this.min(1,errorUtil.errToObj(message$1))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(ch$1=>ch$1.kind===`datetime`)}get isDate(){return!!this._def.checks.find(ch$1=>ch$1.kind===`date`)}get isTime(){return!!this._def.checks.find(ch$1=>ch$1.kind===`time`)}get isDuration(){return!!this._def.checks.find(ch$1=>ch$1.kind===`duration`)}get isEmail(){return!!this._def.checks.find(ch$1=>ch$1.kind===`email`)}get isURL(){return!!this._def.checks.find(ch$1=>ch$1.kind===`url`)}get isEmoji(){return!!this._def.checks.find(ch$1=>ch$1.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(ch$1=>ch$1.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(ch$1=>ch$1.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(ch$1=>ch$1.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(ch$1=>ch$1.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(ch$1=>ch$1.kind===`ulid`)}get isIP(){return!!this._def.checks.find(ch$1=>ch$1.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(ch$1=>ch$1.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(ch$1=>ch$1.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(ch$1=>ch$1.kind===`base64url`)}get minLength(){let min$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`min`&&(min$1===null||ch$1.value>min$1)&&(min$1=ch$1.value);return min$1}get maxLength(){let max$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`max`&&(max$1===null||ch$1.valuenew ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:params?.coerce??!1,...processCreateParams(params)});function floatSafeRemainder(val,step){let valDecCount=(val.toString().split(`.`)[1]||``).length,stepDecCount=(step.toString().split(`.`)[1]||``).length,decCount=valDecCount>stepDecCount?valDecCount:stepDecCount,valInt=Number.parseInt(val.toFixed(decCount).replace(`.`,``)),stepInt=Number.parseInt(step.toFixed(decCount).replace(`.`,``));return valInt%stepInt/10**decCount}var ZodNumber=class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(input){this._def.coerce&&(input.data=Number(input.data));let parsedType=this._getType(input);if(parsedType!==ZodParsedType.number){let ctx$1=this._getOrReturnCtx(input);return addIssueToContext(ctx$1,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:ctx$1.parsedType}),INVALID}let ctx,status=new ParseStatus;for(let check$1 of this._def.checks)if(check$1.kind===`int`)util.isInteger(input.data)||(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:`integer`,received:`float`,message:check$1.message}),status.dirty());else if(check$1.kind===`min`){let tooSmall=check$1.inclusive?input.datacheck$1.value:input.data>=check$1.value;tooBig&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.too_big,maximum:check$1.value,type:`number`,inclusive:check$1.inclusive,exact:!1,message:check$1.message}),status.dirty())}else check$1.kind===`multipleOf`?floatSafeRemainder(input.data,check$1.value)!==0&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.not_multiple_of,multipleOf:check$1.value,message:check$1.message}),status.dirty()):check$1.kind===`finite`?Number.isFinite(input.data)||(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.not_finite,message:check$1.message}),status.dirty()):util.assertNever(check$1);return{status:status.value,value:input.data}}gte(value$1,message$1){return this.setLimit(`min`,value$1,!0,errorUtil.toString(message$1))}gt(value$1,message$1){return this.setLimit(`min`,value$1,!1,errorUtil.toString(message$1))}lte(value$1,message$1){return this.setLimit(`max`,value$1,!0,errorUtil.toString(message$1))}lt(value$1,message$1){return this.setLimit(`max`,value$1,!1,errorUtil.toString(message$1))}setLimit(kind,value$1,inclusive,message$1){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind,value:value$1,inclusive,message:errorUtil.toString(message$1)}]})}_addCheck(check$1){return new ZodNumber({...this._def,checks:[...this._def.checks,check$1]})}int(message$1){return this._addCheck({kind:`int`,message:errorUtil.toString(message$1)})}positive(message$1){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:errorUtil.toString(message$1)})}negative(message$1){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:errorUtil.toString(message$1)})}nonpositive(message$1){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:errorUtil.toString(message$1)})}nonnegative(message$1){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:errorUtil.toString(message$1)})}multipleOf(value$1,message$1){return this._addCheck({kind:`multipleOf`,value:value$1,message:errorUtil.toString(message$1)})}finite(message$1){return this._addCheck({kind:`finite`,message:errorUtil.toString(message$1)})}safe(message$1){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:errorUtil.toString(message$1)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:errorUtil.toString(message$1)})}get minValue(){let min$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`min`&&(min$1===null||ch$1.value>min$1)&&(min$1=ch$1.value);return min$1}get maxValue(){let max$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`max`&&(max$1===null||ch$1.valuech$1.kind===`int`||ch$1.kind===`multipleOf`&&util.isInteger(ch$1.value))}get isFinite(){let max$1=null,min$1=null;for(let ch$1 of this._def.checks)if(ch$1.kind===`finite`||ch$1.kind===`int`||ch$1.kind===`multipleOf`)return!0;else ch$1.kind===`min`?(min$1===null||ch$1.value>min$1)&&(min$1=ch$1.value):ch$1.kind===`max`&&(max$1===null||ch$1.valuenew ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:params?.coerce||!1,...processCreateParams(params)});var ZodBigInt=class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(input){if(this._def.coerce)try{input.data=BigInt(input.data)}catch{return this._getInvalidInput(input)}let parsedType=this._getType(input);if(parsedType!==ZodParsedType.bigint)return this._getInvalidInput(input);let ctx,status=new ParseStatus;for(let check$1 of this._def.checks)if(check$1.kind===`min`){let tooSmall=check$1.inclusive?input.datacheck$1.value:input.data>=check$1.value;tooBig&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.too_big,type:`bigint`,maximum:check$1.value,inclusive:check$1.inclusive,message:check$1.message}),status.dirty())}else check$1.kind===`multipleOf`?input.data%check$1.value!==BigInt(0)&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.not_multiple_of,multipleOf:check$1.value,message:check$1.message}),status.dirty()):util.assertNever(check$1);return{status:status.value,value:input.data}}_getInvalidInput(input){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:ctx.parsedType}),INVALID}gte(value$1,message$1){return this.setLimit(`min`,value$1,!0,errorUtil.toString(message$1))}gt(value$1,message$1){return this.setLimit(`min`,value$1,!1,errorUtil.toString(message$1))}lte(value$1,message$1){return this.setLimit(`max`,value$1,!0,errorUtil.toString(message$1))}lt(value$1,message$1){return this.setLimit(`max`,value$1,!1,errorUtil.toString(message$1))}setLimit(kind,value$1,inclusive,message$1){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind,value:value$1,inclusive,message:errorUtil.toString(message$1)}]})}_addCheck(check$1){return new ZodBigInt({...this._def,checks:[...this._def.checks,check$1]})}positive(message$1){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:errorUtil.toString(message$1)})}negative(message$1){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:errorUtil.toString(message$1)})}nonpositive(message$1){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:errorUtil.toString(message$1)})}nonnegative(message$1){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:errorUtil.toString(message$1)})}multipleOf(value$1,message$1){return this._addCheck({kind:`multipleOf`,value:value$1,message:errorUtil.toString(message$1)})}get minValue(){let min$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`min`&&(min$1===null||ch$1.value>min$1)&&(min$1=ch$1.value);return min$1}get maxValue(){let max$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`max`&&(max$1===null||ch$1.valuenew ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:params?.coerce??!1,...processCreateParams(params)});var ZodBoolean=class extends ZodType{_parse(input){this._def.coerce&&(input.data=!!input.data);let parsedType=this._getType(input);if(parsedType!==ZodParsedType.boolean){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:ctx.parsedType}),INVALID}return OK(input.data)}};ZodBoolean.create=params=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:params?.coerce||!1,...processCreateParams(params)});var ZodDate=class ZodDate extends ZodType{_parse(input){this._def.coerce&&(input.data=new Date(input.data));let parsedType=this._getType(input);if(parsedType!==ZodParsedType.date){let ctx$1=this._getOrReturnCtx(input);return addIssueToContext(ctx$1,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:ctx$1.parsedType}),INVALID}if(Number.isNaN(input.data.getTime())){let ctx$1=this._getOrReturnCtx(input);return addIssueToContext(ctx$1,{code:ZodIssueCode.invalid_date}),INVALID}let status=new ParseStatus,ctx;for(let check$1 of this._def.checks)check$1.kind===`min`?input.data.getTime()check$1.value&&(ctx=this._getOrReturnCtx(input,ctx),addIssueToContext(ctx,{code:ZodIssueCode.too_big,message:check$1.message,inclusive:!0,exact:!1,maximum:check$1.value,type:`date`}),status.dirty()):util.assertNever(check$1);return{status:status.value,value:new Date(input.data.getTime())}}_addCheck(check$1){return new ZodDate({...this._def,checks:[...this._def.checks,check$1]})}min(minDate,message$1){return this._addCheck({kind:`min`,value:minDate.getTime(),message:errorUtil.toString(message$1)})}max(maxDate,message$1){return this._addCheck({kind:`max`,value:maxDate.getTime(),message:errorUtil.toString(message$1)})}get minDate(){let min$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`min`&&(min$1===null||ch$1.value>min$1)&&(min$1=ch$1.value);return min$1==null?null:new Date(min$1)}get maxDate(){let max$1=null;for(let ch$1 of this._def.checks)ch$1.kind===`max`&&(max$1===null||ch$1.valuenew ZodDate({checks:[],coerce:params?.coerce||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(params)});var ZodSymbol=class extends ZodType{_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.symbol){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:ctx.parsedType}),INVALID}return OK(input.data)}};ZodSymbol.create=params=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(params)});var ZodUndefined=class extends ZodType{_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.undefined){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:ctx.parsedType}),INVALID}return OK(input.data)}};ZodUndefined.create=params=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(params)});var ZodNull=class extends ZodType{_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.null){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:ctx.parsedType}),INVALID}return OK(input.data)}};ZodNull.create=params=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(params)});var ZodAny=class extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(input){return OK(input.data)}};ZodAny.create=params=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(params)});var ZodUnknown=class extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(input){return OK(input.data)}};ZodUnknown.create=params=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(params)});var ZodNever=class extends ZodType{_parse(input){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:ctx.parsedType}),INVALID}};ZodNever.create=params=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(params)});var ZodVoid=class extends ZodType{_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.undefined){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:ctx.parsedType}),INVALID}return OK(input.data)}};ZodVoid.create=params=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(params)});var ZodArray=class ZodArray extends ZodType{_parse(input){let{ctx,status}=this._processInputParams(input),def$1=this._def;if(ctx.parsedType!==ZodParsedType.array)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:ctx.parsedType}),INVALID;if(def$1.exactLength!==null){let tooBig=ctx.data.length>def$1.exactLength.value,tooSmall=ctx.data.lengthdef$1.maxLength.value&&(addIssueToContext(ctx,{code:ZodIssueCode.too_big,maximum:def$1.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:def$1.maxLength.message}),status.dirty()),ctx.common.async)return Promise.all([...ctx.data].map((item,i$1)=>def$1.type._parseAsync(new ParseInputLazyPath(ctx,item,ctx.path,i$1)))).then(result$1=>ParseStatus.mergeArray(status,result$1));let result=[...ctx.data].map((item,i$1)=>def$1.type._parseSync(new ParseInputLazyPath(ctx,item,ctx.path,i$1)));return ParseStatus.mergeArray(status,result)}get element(){return this._def.type}min(minLength,message$1){return new ZodArray({...this._def,minLength:{value:minLength,message:errorUtil.toString(message$1)}})}max(maxLength,message$1){return new ZodArray({...this._def,maxLength:{value:maxLength,message:errorUtil.toString(message$1)}})}length(len,message$1){return new ZodArray({...this._def,exactLength:{value:len,message:errorUtil.toString(message$1)}})}nonempty(message$1){return this.min(1,message$1)}};ZodArray.create=(schema,params)=>new ZodArray({type:schema,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(params)});function deepPartialify(schema){if(schema instanceof ZodObject){let newShape={};for(let key$1 in schema.shape){let fieldSchema=schema.shape[key$1];newShape[key$1]=ZodOptional.create(deepPartialify(fieldSchema))}return new ZodObject({...schema._def,shape:()=>newShape})}else if(schema instanceof ZodArray)return new ZodArray({...schema._def,type:deepPartialify(schema.element)});else if(schema instanceof ZodOptional)return ZodOptional.create(deepPartialify(schema.unwrap()));else if(schema instanceof ZodNullable)return ZodNullable.create(deepPartialify(schema.unwrap()));else if(schema instanceof ZodTuple)return ZodTuple.create(schema.items.map(item=>deepPartialify(item)));else return schema}var ZodObject=class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let shape=this._def.shape(),keys$3=util.objectKeys(shape);return this._cached={shape,keys:keys$3},this._cached}_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.object){let ctx$1=this._getOrReturnCtx(input);return addIssueToContext(ctx$1,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:ctx$1.parsedType}),INVALID}let{status,ctx}=this._processInputParams(input),{shape,keys:shapeKeys}=this._getCached(),extraKeys=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys===`strip`))for(let key$1 in ctx.data)shapeKeys.includes(key$1)||extraKeys.push(key$1);let pairs=[];for(let key$1 of shapeKeys){let keyValidator=shape[key$1],value$1=ctx.data[key$1];pairs.push({key:{status:`valid`,value:key$1},value:keyValidator._parse(new ParseInputLazyPath(ctx,value$1,ctx.path,key$1)),alwaysSet:key$1 in ctx.data})}if(this._def.catchall instanceof ZodNever){let unknownKeys=this._def.unknownKeys;if(unknownKeys===`passthrough`)for(let key$1 of extraKeys)pairs.push({key:{status:`valid`,value:key$1},value:{status:`valid`,value:ctx.data[key$1]}});else if(unknownKeys===`strict`)extraKeys.length>0&&(addIssueToContext(ctx,{code:ZodIssueCode.unrecognized_keys,keys:extraKeys}),status.dirty());else if(unknownKeys!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let catchall=this._def.catchall;for(let key$1 of extraKeys){let value$1=ctx.data[key$1];pairs.push({key:{status:`valid`,value:key$1},value:catchall._parse(new ParseInputLazyPath(ctx,value$1,ctx.path,key$1)),alwaysSet:key$1 in ctx.data})}}return ctx.common.async?Promise.resolve().then(async()=>{let syncPairs=[];for(let pair of pairs){let key$1=await pair.key,value$1=await pair.value;syncPairs.push({key:key$1,value:value$1,alwaysSet:pair.alwaysSet})}return syncPairs}).then(syncPairs=>ParseStatus.mergeObjectSync(status,syncPairs)):ParseStatus.mergeObjectSync(status,pairs)}get shape(){return this._def.shape()}strict(message$1){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:`strict`,...message$1===void 0?{}:{errorMap:(issue,ctx)=>{let defaultError=this._def.errorMap?.(issue,ctx).message??ctx.defaultError;return issue.code===`unrecognized_keys`?{message:errorUtil.errToObj(message$1).message??defaultError}:{message:defaultError}}}})}strip(){return new ZodObject({...this._def,unknownKeys:`strip`})}passthrough(){return new ZodObject({...this._def,unknownKeys:`passthrough`})}extend(augmentation){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...augmentation})})}merge(merging){let merged=new ZodObject({unknownKeys:merging._def.unknownKeys,catchall:merging._def.catchall,shape:()=>({...this._def.shape(),...merging._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject});return merged}setKey(key$1,schema){return this.augment({[key$1]:schema})}catchall(index$1){return new ZodObject({...this._def,catchall:index$1})}pick(mask){let shape={};for(let key$1 of util.objectKeys(mask))mask[key$1]&&this.shape[key$1]&&(shape[key$1]=this.shape[key$1]);return new ZodObject({...this._def,shape:()=>shape})}omit(mask){let shape={};for(let key$1 of util.objectKeys(this.shape))mask[key$1]||(shape[key$1]=this.shape[key$1]);return new ZodObject({...this._def,shape:()=>shape})}deepPartial(){return deepPartialify(this)}partial(mask){let newShape={};for(let key$1 of util.objectKeys(this.shape)){let fieldSchema=this.shape[key$1];mask&&!mask[key$1]?newShape[key$1]=fieldSchema:newShape[key$1]=fieldSchema.optional()}return new ZodObject({...this._def,shape:()=>newShape})}required(mask){let newShape={};for(let key$1 of util.objectKeys(this.shape))if(mask&&!mask[key$1])newShape[key$1]=this.shape[key$1];else{let fieldSchema=this.shape[key$1],newField=fieldSchema;for(;newField instanceof ZodOptional;)newField=newField._def.innerType;newShape[key$1]=newField}return new ZodObject({...this._def,shape:()=>newShape})}keyof(){return createZodEnum(util.objectKeys(this.shape))}};ZodObject.create=(shape,params)=>new ZodObject({shape:()=>shape,unknownKeys:`strip`,catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(params)}),ZodObject.strictCreate=(shape,params)=>new ZodObject({shape:()=>shape,unknownKeys:`strict`,catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(params)}),ZodObject.lazycreate=(shape,params)=>new ZodObject({shape,unknownKeys:`strip`,catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(params)});var ZodUnion=class extends ZodType{_parse(input){let{ctx}=this._processInputParams(input),options$1=this._def.options;function handleResults(results){for(let result of results)if(result.result.status===`valid`)return result.result;for(let result of results)if(result.result.status===`dirty`)return ctx.common.issues.push(...result.ctx.common.issues),result.result;let unionErrors=results.map(result=>new ZodError(result.ctx.common.issues));return addIssueToContext(ctx,{code:ZodIssueCode.invalid_union,unionErrors}),INVALID}if(ctx.common.async)return Promise.all(options$1.map(async option$1=>{let childCtx={...ctx,common:{...ctx.common,issues:[]},parent:null};return{result:await option$1._parseAsync({data:ctx.data,path:ctx.path,parent:childCtx}),ctx:childCtx}})).then(handleResults);{let dirty,issues=[];for(let option$1 of options$1){let childCtx={...ctx,common:{...ctx.common,issues:[]},parent:null},result=option$1._parseSync({data:ctx.data,path:ctx.path,parent:childCtx});if(result.status===`valid`)return result;result.status===`dirty`&&!dirty&&(dirty={result,ctx:childCtx}),childCtx.common.issues.length&&issues.push(childCtx.common.issues)}if(dirty)return ctx.common.issues.push(...dirty.ctx.common.issues),dirty.result;let unionErrors=issues.map(issues$1=>new ZodError(issues$1));return addIssueToContext(ctx,{code:ZodIssueCode.invalid_union,unionErrors}),INVALID}}get options(){return this._def.options}};ZodUnion.create=(types$1,params)=>new ZodUnion({options:types$1,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(params)});const getDiscriminator=type=>type instanceof ZodLazy?getDiscriminator(type.schema):type instanceof ZodEffects?getDiscriminator(type.innerType()):type instanceof ZodLiteral?[type.value]:type instanceof ZodEnum?type.options:type instanceof ZodNativeEnum?util.objectValues(type.enum):type instanceof ZodDefault?getDiscriminator(type._def.innerType):type instanceof ZodUndefined?[void 0]:type instanceof ZodNull?[null]:type instanceof ZodOptional?[void 0,...getDiscriminator(type.unwrap())]:type instanceof ZodNullable?[null,...getDiscriminator(type.unwrap())]:type instanceof ZodBranded||type instanceof ZodReadonly?getDiscriminator(type.unwrap()):type instanceof ZodCatch?getDiscriminator(type._def.innerType):[];var ZodDiscriminatedUnion=class ZodDiscriminatedUnion extends ZodType{_parse(input){let{ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.object)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:ctx.parsedType}),INVALID;let discriminator=this.discriminator,discriminatorValue=ctx.data[discriminator],option$1=this.optionsMap.get(discriminatorValue);return option$1?ctx.common.async?option$1._parseAsync({data:ctx.data,path:ctx.path,parent:ctx}):option$1._parseSync({data:ctx.data,path:ctx.path,parent:ctx}):(addIssueToContext(ctx,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[discriminator]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(discriminator,options$1,params){let optionsMap=new Map;for(let type of options$1){let discriminatorValues=getDiscriminator(type.shape[discriminator]);if(!discriminatorValues.length)throw Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);for(let value$1 of discriminatorValues){if(optionsMap.has(value$1))throw Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value$1)}`);optionsMap.set(value$1,type)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator,options:options$1,optionsMap,...processCreateParams(params)})}};function mergeValues(a$2,b$4){let aType=getParsedType(a$2),bType=getParsedType(b$4);if(a$2===b$4)return{valid:!0,data:a$2};if(aType===ZodParsedType.object&&bType===ZodParsedType.object){let bKeys=util.objectKeys(b$4),sharedKeys=util.objectKeys(a$2).filter(key$1=>bKeys.indexOf(key$1)!==-1),newObj={...a$2,...b$4};for(let key$1 of sharedKeys){let sharedValue=mergeValues(a$2[key$1],b$4[key$1]);if(!sharedValue.valid)return{valid:!1};newObj[key$1]=sharedValue.data}return{valid:!0,data:newObj}}else if(aType===ZodParsedType.array&&bType===ZodParsedType.array){if(a$2.length!==b$4.length)return{valid:!1};let newArray=[];for(let index$1=0;index$1{if(isAborted(parsedLeft)||isAborted(parsedRight))return INVALID;let merged=mergeValues(parsedLeft.value,parsedRight.value);return merged.valid?((isDirty(parsedLeft)||isDirty(parsedRight))&&status.dirty(),{status:status.value,value:merged.data}):(addIssueToContext(ctx,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return ctx.common.async?Promise.all([this._def.left._parseAsync({data:ctx.data,path:ctx.path,parent:ctx}),this._def.right._parseAsync({data:ctx.data,path:ctx.path,parent:ctx})]).then(([left,right])=>handleParsed(left,right)):handleParsed(this._def.left._parseSync({data:ctx.data,path:ctx.path,parent:ctx}),this._def.right._parseSync({data:ctx.data,path:ctx.path,parent:ctx}))}};ZodIntersection.create=(left,right,params)=>new ZodIntersection({left,right,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(params)});var ZodTuple=class ZodTuple extends ZodType{_parse(input){let{status,ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.array)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:ctx.parsedType}),INVALID;if(ctx.data.lengththis._def.items.length&&(addIssueToContext(ctx,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),status.dirty());let items=[...ctx.data].map((item,itemIndex)=>{let schema=this._def.items[itemIndex]||this._def.rest;return schema?schema._parse(new ParseInputLazyPath(ctx,item,ctx.path,itemIndex)):null}).filter(x$3=>!!x$3);return ctx.common.async?Promise.all(items).then(results=>ParseStatus.mergeArray(status,results)):ParseStatus.mergeArray(status,items)}get items(){return this._def.items}rest(rest){return new ZodTuple({...this._def,rest})}};ZodTuple.create=(schemas,params)=>{if(!Array.isArray(schemas))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new ZodTuple({items:schemas,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(params)})};var ZodRecord=class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(input){let{status,ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.object)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:ctx.parsedType}),INVALID;let pairs=[],keyType=this._def.keyType,valueType=this._def.valueType;for(let key$1 in ctx.data)pairs.push({key:keyType._parse(new ParseInputLazyPath(ctx,key$1,ctx.path,key$1)),value:valueType._parse(new ParseInputLazyPath(ctx,ctx.data[key$1],ctx.path,key$1)),alwaysSet:key$1 in ctx.data});return ctx.common.async?ParseStatus.mergeObjectAsync(status,pairs):ParseStatus.mergeObjectSync(status,pairs)}get element(){return this._def.valueType}static create(first,second,third){return second instanceof ZodType?new ZodRecord({keyType:first,valueType:second,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(third)}):new ZodRecord({keyType:ZodString.create(),valueType:first,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(second)})}},ZodMap=class extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(input){let{status,ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.map)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:ctx.parsedType}),INVALID;let keyType=this._def.keyType,valueType=this._def.valueType,pairs=[...ctx.data.entries()].map(([key$1,value$1],index$1)=>({key:keyType._parse(new ParseInputLazyPath(ctx,key$1,ctx.path,[index$1,`key`])),value:valueType._parse(new ParseInputLazyPath(ctx,value$1,ctx.path,[index$1,`value`]))}));if(ctx.common.async){let finalMap=new Map;return Promise.resolve().then(async()=>{for(let pair of pairs){let key$1=await pair.key,value$1=await pair.value;if(key$1.status===`aborted`||value$1.status===`aborted`)return INVALID;(key$1.status===`dirty`||value$1.status===`dirty`)&&status.dirty(),finalMap.set(key$1.value,value$1.value)}return{status:status.value,value:finalMap}})}else{let finalMap=new Map;for(let pair of pairs){let key$1=pair.key,value$1=pair.value;if(key$1.status===`aborted`||value$1.status===`aborted`)return INVALID;(key$1.status===`dirty`||value$1.status===`dirty`)&&status.dirty(),finalMap.set(key$1.value,value$1.value)}return{status:status.value,value:finalMap}}}};ZodMap.create=(keyType,valueType,params)=>new ZodMap({valueType,keyType,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(params)});var ZodSet=class ZodSet extends ZodType{_parse(input){let{status,ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.set)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:ctx.parsedType}),INVALID;let def$1=this._def;def$1.minSize!==null&&ctx.data.sizedef$1.maxSize.value&&(addIssueToContext(ctx,{code:ZodIssueCode.too_big,maximum:def$1.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:def$1.maxSize.message}),status.dirty());let valueType=this._def.valueType;function finalizeSet(elements$1){let parsedSet=new Set;for(let element$3 of elements$1){if(element$3.status===`aborted`)return INVALID;element$3.status===`dirty`&&status.dirty(),parsedSet.add(element$3.value)}return{status:status.value,value:parsedSet}}let elements=[...ctx.data.values()].map((item,i$1)=>valueType._parse(new ParseInputLazyPath(ctx,item,ctx.path,i$1)));return ctx.common.async?Promise.all(elements).then(elements$1=>finalizeSet(elements$1)):finalizeSet(elements)}min(minSize,message$1){return new ZodSet({...this._def,minSize:{value:minSize,message:errorUtil.toString(message$1)}})}max(maxSize,message$1){return new ZodSet({...this._def,maxSize:{value:maxSize,message:errorUtil.toString(message$1)}})}size(size$2,message$1){return this.min(size$2,message$1).max(size$2,message$1)}nonempty(message$1){return this.min(1,message$1)}};ZodSet.create=(valueType,params)=>new ZodSet({valueType,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(params)});var ZodFunction=class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(input){let{ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.function)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:ctx.parsedType}),INVALID;function makeArgsIssue(args,error){return makeIssue({data:args,path:ctx.path,errorMaps:[ctx.common.contextualErrorMap,ctx.schemaErrorMap,getErrorMap(),en_default$1].filter(x$3=>!!x$3),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:error}})}function makeReturnsIssue(returns,error){return makeIssue({data:returns,path:ctx.path,errorMaps:[ctx.common.contextualErrorMap,ctx.schemaErrorMap,getErrorMap(),en_default$1].filter(x$3=>!!x$3),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:error}})}let params={errorMap:ctx.common.contextualErrorMap},fn$6=ctx.data;if(this._def.returns instanceof ZodPromise){let me$2=this;return OK(async function(...args){let error=new ZodError([]),parsedArgs=await me$2._def.args.parseAsync(args,params).catch(e$3=>{throw error.addIssue(makeArgsIssue(args,e$3)),error}),result=await Reflect.apply(fn$6,this,parsedArgs),parsedReturns=await me$2._def.returns._def.type.parseAsync(result,params).catch(e$3=>{throw error.addIssue(makeReturnsIssue(result,e$3)),error});return parsedReturns})}else{let me$2=this;return OK(function(...args){let parsedArgs=me$2._def.args.safeParse(args,params);if(!parsedArgs.success)throw new ZodError([makeArgsIssue(args,parsedArgs.error)]);let result=Reflect.apply(fn$6,this,parsedArgs.data),parsedReturns=me$2._def.returns.safeParse(result,params);if(!parsedReturns.success)throw new ZodError([makeReturnsIssue(result,parsedReturns.error)]);return parsedReturns.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...items){return new ZodFunction({...this._def,args:ZodTuple.create(items).rest(ZodUnknown.create())})}returns(returnType){return new ZodFunction({...this._def,returns:returnType})}implement(func){let validatedFunc=this.parse(func);return validatedFunc}strictImplement(func){let validatedFunc=this.parse(func);return validatedFunc}static create(args,returns,params){return new ZodFunction({args:args||ZodTuple.create([]).rest(ZodUnknown.create()),returns:returns||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(params)})}},ZodLazy=class extends ZodType{get schema(){return this._def.getter()}_parse(input){let{ctx}=this._processInputParams(input),lazySchema=this._def.getter();return lazySchema._parse({data:ctx.data,path:ctx.path,parent:ctx})}};ZodLazy.create=(getter,params)=>new ZodLazy({getter,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(params)});var ZodLiteral=class extends ZodType{_parse(input){if(input.data!==this._def.value){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{received:ctx.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:`valid`,value:input.data}}get value(){return this._def.value}};ZodLiteral.create=(value$1,params)=>new ZodLiteral({value:value$1,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(params)});function createZodEnum(values,params){return new ZodEnum({values,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(params)})}var ZodEnum=class ZodEnum extends ZodType{_parse(input){if(typeof input.data!=`string`){let ctx=this._getOrReturnCtx(input),expectedValues=this._def.values;return addIssueToContext(ctx,{expected:util.joinValues(expectedValues),received:ctx.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(this._cache||=new Set(this._def.values),!this._cache.has(input.data)){let ctx=this._getOrReturnCtx(input),expectedValues=this._def.values;return addIssueToContext(ctx,{received:ctx.data,code:ZodIssueCode.invalid_enum_value,options:expectedValues}),INVALID}return OK(input.data)}get options(){return this._def.values}get enum(){let enumValues={};for(let val of this._def.values)enumValues[val]=val;return enumValues}get Values(){let enumValues={};for(let val of this._def.values)enumValues[val]=val;return enumValues}get Enum(){let enumValues={};for(let val of this._def.values)enumValues[val]=val;return enumValues}extract(values,newDef=this._def){return ZodEnum.create(values,{...this._def,...newDef})}exclude(values,newDef=this._def){return ZodEnum.create(this.options.filter(opt=>!values.includes(opt)),{...this._def,...newDef})}};ZodEnum.create=createZodEnum;var ZodNativeEnum=class extends ZodType{_parse(input){let nativeEnumValues=util.getValidEnumValues(this._def.values),ctx=this._getOrReturnCtx(input);if(ctx.parsedType!==ZodParsedType.string&&ctx.parsedType!==ZodParsedType.number){let expectedValues=util.objectValues(nativeEnumValues);return addIssueToContext(ctx,{expected:util.joinValues(expectedValues),received:ctx.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(this._cache||=new Set(util.getValidEnumValues(this._def.values)),!this._cache.has(input.data)){let expectedValues=util.objectValues(nativeEnumValues);return addIssueToContext(ctx,{received:ctx.data,code:ZodIssueCode.invalid_enum_value,options:expectedValues}),INVALID}return OK(input.data)}get enum(){return this._def.values}};ZodNativeEnum.create=(values,params)=>new ZodNativeEnum({values,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(params)});var ZodPromise=class extends ZodType{unwrap(){return this._def.type}_parse(input){let{ctx}=this._processInputParams(input);if(ctx.parsedType!==ZodParsedType.promise&&ctx.common.async===!1)return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:ctx.parsedType}),INVALID;let promisified=ctx.parsedType===ZodParsedType.promise?ctx.data:Promise.resolve(ctx.data);return OK(promisified.then(data$12=>this._def.type.parseAsync(data$12,{path:ctx.path,errorMap:ctx.common.contextualErrorMap})))}};ZodPromise.create=(schema,params)=>new ZodPromise({type:schema,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(params)});var ZodEffects=class extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(input){let{status,ctx}=this._processInputParams(input),effect$1=this._def.effect||null,checkCtx={addIssue:arg=>{addIssueToContext(ctx,arg),arg.fatal?status.abort():status.dirty()},get path(){return ctx.path}};if(checkCtx.addIssue=checkCtx.addIssue.bind(checkCtx),effect$1.type===`preprocess`){let processed=effect$1.transform(ctx.data,checkCtx);if(ctx.common.async)return Promise.resolve(processed).then(async processed$1=>{if(status.value===`aborted`)return INVALID;let result=await this._def.schema._parseAsync({data:processed$1,path:ctx.path,parent:ctx});return result.status===`aborted`?INVALID:result.status===`dirty`||status.value===`dirty`?DIRTY(result.value):result});{if(status.value===`aborted`)return INVALID;let result=this._def.schema._parseSync({data:processed,path:ctx.path,parent:ctx});return result.status===`aborted`?INVALID:result.status===`dirty`||status.value===`dirty`?DIRTY(result.value):result}}if(effect$1.type===`refinement`){let executeRefinement=acc=>{let result=effect$1.refinement(acc,checkCtx);if(ctx.common.async)return Promise.resolve(result);if(result instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return acc};if(ctx.common.async===!1){let inner=this._def.schema._parseSync({data:ctx.data,path:ctx.path,parent:ctx});return inner.status===`aborted`?INVALID:(inner.status===`dirty`&&status.dirty(),executeRefinement(inner.value),{status:status.value,value:inner.value})}else return this._def.schema._parseAsync({data:ctx.data,path:ctx.path,parent:ctx}).then(inner=>inner.status===`aborted`?INVALID:(inner.status===`dirty`&&status.dirty(),executeRefinement(inner.value).then(()=>({status:status.value,value:inner.value}))))}if(effect$1.type===`transform`)if(ctx.common.async===!1){let base=this._def.schema._parseSync({data:ctx.data,path:ctx.path,parent:ctx});if(!isValid(base))return INVALID;let result=effect$1.transform(base.value,checkCtx);if(result instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:status.value,value:result}}else return this._def.schema._parseAsync({data:ctx.data,path:ctx.path,parent:ctx}).then(base=>isValid(base)?Promise.resolve(effect$1.transform(base.value,checkCtx)).then(result=>({status:status.value,value:result})):INVALID);util.assertNever(effect$1)}};ZodEffects.create=(schema,effect$1,params)=>new ZodEffects({schema,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:effect$1,...processCreateParams(params)}),ZodEffects.createWithPreprocess=(preprocess$1,schema,params)=>new ZodEffects({schema,effect:{type:`preprocess`,transform:preprocess$1},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(params)});var ZodOptional=class extends ZodType{_parse(input){let parsedType=this._getType(input);return parsedType===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(input)}unwrap(){return this._def.innerType}};ZodOptional.create=(type,params)=>new ZodOptional({innerType:type,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(params)});var ZodNullable=class extends ZodType{_parse(input){let parsedType=this._getType(input);return parsedType===ZodParsedType.null?OK(null):this._def.innerType._parse(input)}unwrap(){return this._def.innerType}};ZodNullable.create=(type,params)=>new ZodNullable({innerType:type,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(params)});var ZodDefault=class extends ZodType{_parse(input){let{ctx}=this._processInputParams(input),data$12=ctx.data;return ctx.parsedType===ZodParsedType.undefined&&(data$12=this._def.defaultValue()),this._def.innerType._parse({data:data$12,path:ctx.path,parent:ctx})}removeDefault(){return this._def.innerType}};ZodDefault.create=(type,params)=>new ZodDefault({innerType:type,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof params.default==`function`?params.default:()=>params.default,...processCreateParams(params)});var ZodCatch=class extends ZodType{_parse(input){let{ctx}=this._processInputParams(input),newCtx={...ctx,common:{...ctx.common,issues:[]}},result=this._def.innerType._parse({data:newCtx.data,path:newCtx.path,parent:{...newCtx}});return isAsync(result)?result.then(result$1=>({status:`valid`,value:result$1.status===`valid`?result$1.value:this._def.catchValue({get error(){return new ZodError(newCtx.common.issues)},input:newCtx.data})})):{status:`valid`,value:result.status===`valid`?result.value:this._def.catchValue({get error(){return new ZodError(newCtx.common.issues)},input:newCtx.data})}}removeCatch(){return this._def.innerType}};ZodCatch.create=(type,params)=>new ZodCatch({innerType:type,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof params.catch==`function`?params.catch:()=>params.catch,...processCreateParams(params)});var ZodNaN=class extends ZodType{_parse(input){let parsedType=this._getType(input);if(parsedType!==ZodParsedType.nan){let ctx=this._getOrReturnCtx(input);return addIssueToContext(ctx,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:ctx.parsedType}),INVALID}return{status:`valid`,value:input.data}}};ZodNaN.create=params=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(params)});const BRAND=Symbol(`zod_brand`);var ZodBranded=class extends ZodType{_parse(input){let{ctx}=this._processInputParams(input),data$12=ctx.data;return this._def.type._parse({data:data$12,path:ctx.path,parent:ctx})}unwrap(){return this._def.type}},ZodPipeline=class ZodPipeline extends ZodType{_parse(input){let{status,ctx}=this._processInputParams(input);if(ctx.common.async){let handleAsync=async()=>{let inResult=await this._def.in._parseAsync({data:ctx.data,path:ctx.path,parent:ctx});return inResult.status===`aborted`?INVALID:inResult.status===`dirty`?(status.dirty(),DIRTY(inResult.value)):this._def.out._parseAsync({data:inResult.value,path:ctx.path,parent:ctx})};return handleAsync()}else{let inResult=this._def.in._parseSync({data:ctx.data,path:ctx.path,parent:ctx});return inResult.status===`aborted`?INVALID:inResult.status===`dirty`?(status.dirty(),{status:`dirty`,value:inResult.value}):this._def.out._parseSync({data:inResult.value,path:ctx.path,parent:ctx})}}static create(a$2,b$4){return new ZodPipeline({in:a$2,out:b$4,typeName:ZodFirstPartyTypeKind.ZodPipeline})}},ZodReadonly=class extends ZodType{_parse(input){let result=this._def.innerType._parse(input),freeze=data$12=>(isValid(data$12)&&(data$12.value=Object.freeze(data$12.value)),data$12);return isAsync(result)?result.then(data$12=>freeze(data$12)):freeze(result)}unwrap(){return this._def.innerType}};ZodReadonly.create=(type,params)=>new ZodReadonly({innerType:type,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(params)});const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(ZodFirstPartyTypeKind$1){ZodFirstPartyTypeKind$1.ZodString=`ZodString`,ZodFirstPartyTypeKind$1.ZodNumber=`ZodNumber`,ZodFirstPartyTypeKind$1.ZodNaN=`ZodNaN`,ZodFirstPartyTypeKind$1.ZodBigInt=`ZodBigInt`,ZodFirstPartyTypeKind$1.ZodBoolean=`ZodBoolean`,ZodFirstPartyTypeKind$1.ZodDate=`ZodDate`,ZodFirstPartyTypeKind$1.ZodSymbol=`ZodSymbol`,ZodFirstPartyTypeKind$1.ZodUndefined=`ZodUndefined`,ZodFirstPartyTypeKind$1.ZodNull=`ZodNull`,ZodFirstPartyTypeKind$1.ZodAny=`ZodAny`,ZodFirstPartyTypeKind$1.ZodUnknown=`ZodUnknown`,ZodFirstPartyTypeKind$1.ZodNever=`ZodNever`,ZodFirstPartyTypeKind$1.ZodVoid=`ZodVoid`,ZodFirstPartyTypeKind$1.ZodArray=`ZodArray`,ZodFirstPartyTypeKind$1.ZodObject=`ZodObject`,ZodFirstPartyTypeKind$1.ZodUnion=`ZodUnion`,ZodFirstPartyTypeKind$1.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,ZodFirstPartyTypeKind$1.ZodIntersection=`ZodIntersection`,ZodFirstPartyTypeKind$1.ZodTuple=`ZodTuple`,ZodFirstPartyTypeKind$1.ZodRecord=`ZodRecord`,ZodFirstPartyTypeKind$1.ZodMap=`ZodMap`,ZodFirstPartyTypeKind$1.ZodSet=`ZodSet`,ZodFirstPartyTypeKind$1.ZodFunction=`ZodFunction`,ZodFirstPartyTypeKind$1.ZodLazy=`ZodLazy`,ZodFirstPartyTypeKind$1.ZodLiteral=`ZodLiteral`,ZodFirstPartyTypeKind$1.ZodEnum=`ZodEnum`,ZodFirstPartyTypeKind$1.ZodEffects=`ZodEffects`,ZodFirstPartyTypeKind$1.ZodNativeEnum=`ZodNativeEnum`,ZodFirstPartyTypeKind$1.ZodOptional=`ZodOptional`,ZodFirstPartyTypeKind$1.ZodNullable=`ZodNullable`,ZodFirstPartyTypeKind$1.ZodDefault=`ZodDefault`,ZodFirstPartyTypeKind$1.ZodCatch=`ZodCatch`,ZodFirstPartyTypeKind$1.ZodPromise=`ZodPromise`,ZodFirstPartyTypeKind$1.ZodBranded=`ZodBranded`,ZodFirstPartyTypeKind$1.ZodPipeline=`ZodPipeline`,ZodFirstPartyTypeKind$1.ZodReadonly=`ZodReadonly`})(ZodFirstPartyTypeKind||={});const stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,tools$1=[tool({name:`debug_random_number`,description:`Generate a random number between 0 and 1`,execute:async()=>new Promise(resolve$1=>{setTimeout(()=>{resolve$1(Math.random().toString())},1e3)}),parameters:objectType({})})],debug=async()=>Promise.all(tools$1);function __classPrivateFieldGet(receiver,state,kind,f$3){if(kind===`a`&&!f$3)throw TypeError(`Private accessor was defined without a getter`);if(typeof state==`function`?receiver!==state||!f$3:!state.has(receiver))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return kind===`m`?f$3:kind===`a`?f$3.call(receiver):f$3?f$3.value:state.get(receiver)}function __classPrivateFieldSet(receiver,state,value$1,kind,f$3){if(kind===`m`)throw TypeError(`Private method is not writable`);if(kind===`a`&&!f$3)throw TypeError(`Private accessor was defined without a setter`);if(typeof state==`function`?receiver!==state||!f$3:!state.has(receiver))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return kind===`a`?f$3.call(receiver,value$1):f$3?f$3.value=value$1:state.set(receiver,value$1),value$1}var _Channel_onmessage,_Channel_nextMessageIndex,_Channel_pendingMessages,_Channel_messageEndIndex,_Resource_rid;const SERIALIZE_TO_IPC_FN=`__TAURI_TO_IPC_KEY__`;function transformCallback(callback,once=!1){return window.__TAURI_INTERNALS__.transformCallback(callback,once)}var Channel=class{constructor(onmessage){_Channel_onmessage.set(this,void 0),_Channel_nextMessageIndex.set(this,0),_Channel_pendingMessages.set(this,[]),_Channel_messageEndIndex.set(this,void 0),__classPrivateFieldSet(this,_Channel_onmessage,onmessage||(()=>{}),`f`),this.id=transformCallback(rawMessage=>{let index$1=rawMessage.index;if(`end`in rawMessage){index$1==__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)?this.cleanupCallback():__classPrivateFieldSet(this,_Channel_messageEndIndex,index$1,`f`);return}let message$1=rawMessage.message;if(index$1==__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)){for(__classPrivateFieldGet(this,_Channel_onmessage,`f`).call(this,message$1),__classPrivateFieldSet(this,_Channel_nextMessageIndex,__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)+1,`f`);__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)in __classPrivateFieldGet(this,_Channel_pendingMessages,`f`);){let message$2=__classPrivateFieldGet(this,_Channel_pendingMessages,`f`)[__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)];__classPrivateFieldGet(this,_Channel_onmessage,`f`).call(this,message$2),delete __classPrivateFieldGet(this,_Channel_pendingMessages,`f`)[__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)],__classPrivateFieldSet(this,_Channel_nextMessageIndex,__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)+1,`f`)}__classPrivateFieldGet(this,_Channel_nextMessageIndex,`f`)===__classPrivateFieldGet(this,_Channel_messageEndIndex,`f`)&&this.cleanupCallback()}else __classPrivateFieldGet(this,_Channel_pendingMessages,`f`)[index$1]=message$1})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(handler){__classPrivateFieldSet(this,_Channel_onmessage,handler,`f`)}get onmessage(){return __classPrivateFieldGet(this,_Channel_onmessage,`f`)}[(_Channel_onmessage=new WeakMap,_Channel_nextMessageIndex=new WeakMap,_Channel_pendingMessages=new WeakMap,_Channel_messageEndIndex=new WeakMap,SERIALIZE_TO_IPC_FN)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[SERIALIZE_TO_IPC_FN]()}};async function invoke(cmd,args={},options$1){return window.__TAURI_INTERNALS__.invoke(cmd,args,options$1)}_Resource_rid=new WeakMap;async function connectServer(command,args){await invoke(`plugin:mcp|connect_server`,{command,args})}async function disconnectServer(){await invoke(`plugin:mcp|disconnect_server`)}async function listTools(){return await invoke(`plugin:mcp|list_tools`)}async function callTool(name$2,args){return await invoke(`plugin:mcp|call_tool`,{name:name$2,args})}const tools=[tool({name:`mcp_list_tools`,description:`List all tools available on the MCP server`,execute:async(_$2,__)=>await listTools(),parameters:objectType({})}),tool({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,args})=>(await connectServer(command,args),`success`),parameters:objectType({command:stringType().describe(`The command to connect to the MCP server`),args:arrayType(stringType()).describe(`The arguments to pass to the MCP server`)})}),tool({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 disconnectServer(),`success`),parameters:objectType({})}),tool({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:name$2,parameters})=>{let parametersObject=Object.fromEntries(parameters.map(({name:name$3,value:value$1})=>[name$3,value$1])),result=await callTool(name$2,parametersObject);return result},parameters:objectType({name:stringType().describe(`The name of the tool to call`),parameters:arrayType(objectType({name:stringType().describe(`The name of the parameter`),value:unionType([stringType(),numberType(),booleanType(),objectType({})]).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`)})})],mcp=async()=>Promise.all(tools),useLLM=defineStore(`llm`,()=>{async function stream(model,chatProvider,messages,options$1){let headers=options$1?.headers;return await streamText({...chatProvider.chat(model),maxSteps:10,messages:messages.map(msg=>({...msg,content:msg.role===`error`?`User encountered error: ${msg.content}`:msg.content,role:msg.role===`error`?`user`:msg.role})),headers,tools:[...await mcp(),...await debug()],onEvent(event){event.type===`tool-call`?options$1?.onToolCall?.(event.toolCall):event.type===`tool-call-result`&&options$1?.onToolCallResult?.({id:event.id,result:event.result})}})}async function models$1(apiUrl,apiKey){if(apiUrl===``)return[];try{return await listModels({baseURL:apiUrl.endsWith(`/`)?apiUrl:`${apiUrl}/`,apiKey})}catch(err){if(String(err).includes(`Failed to construct 'URL': Invalid URL`))return[];throw err}}return{models:models$1,stream}}),createChatProvider=options$1=>({chat:model=>Object.assign(options$1,{model})}),createEmbedProvider=options$1=>({embed:model=>Object.assign(options$1,{model})}),createImageProvider=options$1=>({image:model=>Object.assign(options$1,{model})}),createModelProvider=options$1=>({model:()=>options$1}),createSpeechProvider=options$1=>({speech:model=>Object.assign(options$1,{model})}),createTranscriptionProvider=options$1=>({transcription:model=>Object.assign(options$1,{model})}),createMetadataProvider=(id$1,otherMeta)=>({metadata:{id:id$1,...otherMeta}}),merge$1=(...arr)=>Object.assign(arr[0],...arr.slice(1)),createAnthropic=(apiKey,baseURL=`https://api.anthropic.com/v1/`)=>merge$1(createMetadataProvider(`anthropic`),createChatProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createDeepSeek=(apiKey,baseURL=`https://api.deepseek.com/`)=>merge$1(createMetadataProvider(`deepseek`),createChatProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createFireworks=(apiKey,baseURL=`https://api.fireworks.ai/inference/v1/`)=>merge$1(createMetadataProvider(`fireworks`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createGoogleGenerativeAI=(apiKey,baseURL=`https://generativelanguage.googleapis.com/v1beta/openai/`)=>merge$1(createMetadataProvider(`google-generative-ai`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createMistral=(apiKey,baseURL=`https://api.mistral.ai/v1/`)=>merge$1(createMetadataProvider(`mistral`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createMoonshot=(apiKey,baseURL=`https://api.moonshot.cn/v1/`)=>merge$1(createMetadataProvider(`moonshot`),createChatProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createNovita=(apiKey,baseURL=`https://api.novita.ai/v3/openai/`)=>merge$1(createMetadataProvider(`novita`),createChatProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createOpenAI=(apiKey,baseURL=`https://api.openai.com/v1/`)=>merge$1(createMetadataProvider(`openai`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}),createImageProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL}),createSpeechProvider({apiKey,baseURL}),createTranscriptionProvider({apiKey,baseURL})),createOpenRouter=(apiKey,baseURL=``)=>merge$1(createMetadataProvider(`openrouter`),{chat:(model,openRouterOptions)=>{let requestOptions={apiKey,baseURL,model},toOpenRouterOptions=({extraHeaders,models:models$1,provider})=>{extraHeaders!=null&&(requestOptions.headers??={},Object.assign(requestOptions.headers,extraHeaders));let transformedProvider;return provider!=null&&(transformedProvider=objCamelToSnake$1(provider)),objCamelToSnake$1({models:models$1,provider:transformedProvider})};return{...openRouterOptions?toOpenRouterOptions(openRouterOptions):{},...requestOptions}}},createModelProvider({apiKey,baseURL})),createPerplexity=(apiKey,baseURL=`https://api.perplexity.ai/`)=>merge$1(createMetadataProvider(`perplexity`),createChatProvider({apiKey,baseURL})),createTogetherAI=(apiKey,baseURL=`https://api.together.xyz/v1/`)=>merge$1(createMetadataProvider(`together-ai`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL,fetch:async(...args)=>globalThis.fetch(...args).then(async res=>res.json()).then(data$12=>Response.json({data:data$12,object:`list`}))})),createWorkersAI=(apiKey,accountId)=>{let baseURL=`https://api.cloudflare.com/client/v4/accounts/${accountId}/ai/v1/`;return merge$1(createMetadataProvider(`workers-ai`),createChatProvider({apiKey,baseURL}),createEmbedProvider({apiKey,baseURL}))},createXAI=(apiKey,baseURL=`https://api.x.ai/v1/`)=>merge$1(createMetadataProvider(`xai`),createChatProvider({apiKey,baseURL}),createModelProvider({apiKey,baseURL})),createOllama=(baseURL=`http://localhost:11434/v1/`)=>merge$1(createMetadataProvider(`ollama`),createChatProvider({baseURL}),createEmbedProvider({baseURL}),createModelProvider({baseURL})),decodeBase64=b64=>{let binString=atob(b64),size$2=binString.length,bytes=new Uint8Array(size$2);for(let i$1=0;i$1merge$1(createMetadataProvider(`player2`),createChatProvider({baseURL,headers:{"player2-game-key":gameKey}}),createSpeechProvider({baseURL,fetch:async(input,reqInit)=>{let newUrl=`${input.toString().slice(0,-12)}tts/speak`;try{let{input:input2,response_format,speed,voice,...rest}=JSON.parse(reqInit?.body),modified={audio_format:response_format,play_in_app:!1,speed:speed??1,text:input2,voice_ids:voice==null?[]:[voice],...rest};reqInit&&(reqInit.body=JSON.stringify(modified))}catch(err){console.warn(`Could not parse body as JSON:`,err)}return globalThis.fetch(newUrl,reqInit).then(async res=>res.json()).then(json=>{let base64=json.data??``,bytes=decodeBase64(base64);return new Response(bytes,{headers:{"Content-Type":`audio/mpeg`},status:200})})},headers:{"player2-game-key":gameKey}}));async function check(){try{if(isInNodejsRuntime())return{supported:!1,isNode:!0,reason:``,fp16Supported:!1};if(typeof navigator>`u`||!navigator.gpu)return{supported:!1,isNode:!1,reason:`WebGPU is not available (navigator.gpu is undefined)`,fp16Supported:!1};let adapter=await navigator.gpu.requestAdapter();return adapter?{supported:!0,isNode:!1,reason:``,adapter,fp16Supported:adapter.features.has(`shader-f16`)}:{supported:!1,isNode:!1,reason:`WebGPU is not supported (no adapter found)`,fp16Supported:!1}}catch(error){let errorMessage=error instanceof Error?error.toString():String(error);return{supported:!1,isNode:!1,reason:errorMessage,fp16Supported:!1}}}function isInNodejsRuntime(){return typeof process<`u`&&`versions`in process&&process.versions!=null&&typeof process.versions==`object`&&`node`in process.versions&&process.versions.node!=null}async function isWebGPUSupported(){return check().then(result=>result.supported)}const merge=(...arr)=>Object.assign(arr[0],...arr.slice(1));var XSAIError=class extends Error{response;constructor(message$1,response){super(message$1),this.name=`XSAIError`,this.response=response}};const strCamelToSnake=str=>str.replace(/[A-Z]/g,s$1=>`_${s$1.toLowerCase()}`),objCamelToSnake=obj=>Object.fromEntries(Object.entries(obj).map(([k$4,v$2])=>[strCamelToSnake(k$4),v$2])),clean$1=obj=>Object.fromEntries(Object.entries(obj).filter(([,v$2])=>v$2!==void 0)),requestHeaders=(headers,apiKey)=>clean$1({Authorization:apiKey===void 0?void 0:`Bearer ${apiKey}`,...headers}),requestURL=(path,baseURL)=>{let base=baseURL.toString();return new URL(path,base.endsWith(`/`)?base:`${base}/`)},responseCatch=async res=>{if(!res.ok)throw new XSAIError(`Remote sent ${res.status} response: ${await res.text()}`,res);if(!res.body)throw new XSAIError(`Response body is empty from remote server`,res);if(!(res.body instanceof ReadableStream))throw new XSAIError(`Expected Response body to be a ReadableStream, but got ${String(res.body)}; Content Type is ${res.headers.get(`Content-Type`)}`,res);return res},responseJSON=async res=>responseCatch(res).then(async res2=>{let text$5=await res2.text();try{return JSON.parse(text$5)}catch{throw Error(`Failed to parse response, response body: ${text$5}`)}});var createUnElevenLabs=(apiKey,baseURL=`http://localhost:5933/v1/`)=>{let toUnSpeechOptions=({applyTextNormalization,languageCode,nextRequestIds,nextText,previousRequestIds,previousText,pronunciationDictionaryLocators,seed,voiceSettings})=>({extraBody:objCamelToSnake({applyTextNormalization,languageCode,nextRequestIds,nextText,previousRequestIds,previousText,pronunciationDictionaryLocators:pronunciationDictionaryLocators?pronunciationDictionaryLocators.map(pdl=>objCamelToSnake(pdl)):void 0,seed,voiceSettings:objCamelToSnake(voiceSettings??{similarityBoost:.75,stability:.5})})}),speechProvider={speech:(model,options$1)=>({...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL,model:`elevenlabs/${model}`})},voiceProvider={voice:options$1=>(baseURL.endsWith(`v1/`)?baseURL=baseURL.slice(0,-3):baseURL.endsWith(`v1`)&&(baseURL=baseURL.slice(0,-2)),{query:`provider=elevenlabs`,...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL})};return merge(speechProvider,voiceProvider)},createUnMicrosoft=(apiKey,baseURL=`http://localhost:5933/v1/`)=>{let toUnSpeechOptions=options$1=>{let{deploymentId,region,sampleRate}=options$1,extraBody={deploymentId,region,sampleRate};return`disableSsml`in options$1?extraBody.disableSsml=options$1.disableSsml:`lang`in options$1&&(extraBody.lang=options$1.lang,extraBody.gender=options$1.gender,extraBody.voice=options$1.voice),{extraBody:objCamelToSnake(extraBody)}},speechProvider={speech:(model,options$1)=>({...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL,model:`microsoft/${model}`})},voiceProvider={voice:options$1=>(baseURL.endsWith(`v1/`)?baseURL=baseURL.slice(0,-3):baseURL.endsWith(`v1`)&&(baseURL=baseURL.slice(0,-2)),{query:`region=${options$1?.region}&provider=microsoft`,...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL})};return merge(speechProvider,voiceProvider)},createUnVolcengine=(apiKey,baseURL=`http://localhost:5933/v1/`)=>{let toUnSpeechOptions=options$1=>{let extraBody={app:{appid:options$1.app?.appId,token:apiKey}};return options$1.app!==void 0&&(extraBody.app={...options$1.app,appid:options$1.app?.appId,token:apiKey}),options$1.user!==void 0&&(extraBody.user=options$1.user),options$1.audio!==void 0&&(extraBody.audio=options$1.audio),{extraBody:objCamelToSnake(extraBody)}},speechProvider={speech:(model,options$1)=>({...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL,model:`volcengine/${model}`})},voiceProvider={voice:options$1=>(baseURL.endsWith(`v1/`)?baseURL=baseURL.slice(0,-3):baseURL.endsWith(`v1`)&&(baseURL=baseURL.slice(0,-2)),{query:`provider=volcengine`,...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL})};return merge(speechProvider,voiceProvider)},createUnAlibabaCloud=(apiKey,baseURL=`http://localhost:5933/v1/`)=>{let toUnSpeechOptions=options$1=>{let{sampleRate,volume,rate,pitch}=options$1,extraBody={sampleRate,volume,rate,pitch};return Object.keys(extraBody).forEach(key$1=>extraBody[key$1]===void 0&&delete extraBody[key$1]),{extraBody:objCamelToSnake(extraBody)}},speechProvider={speech:(model,options$1)=>({...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL,model:`alibaba/${model}`})},voiceProvider={voice:options$1=>{let adjustedBaseURL=baseURL;return adjustedBaseURL.endsWith(`v1/`)?adjustedBaseURL=adjustedBaseURL.slice(0,-3):adjustedBaseURL.endsWith(`v1`)&&(adjustedBaseURL=adjustedBaseURL.slice(0,-2)),{query:`provider=alibaba`,...options$1?toUnSpeechOptions(options$1):{},apiKey,baseURL:adjustedBaseURL}}};return merge(speechProvider,voiceProvider)},listVoices=async options$1=>(options$1.fetch??globalThis.fetch)(requestURL(options$1.query?`api/voices?${options$1.query}`:`api/voices`,options$1.baseURL),{headers:requestHeaders({...options$1.headers},options$1.apiKey),method:`GET`,signal:options$1.abortSignal}).then(responseJSON).then(({voices})=>voices);const models=[{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`}],useProvidersStore=defineStore(`providers`,()=>{let providerCredentials=useLocalStorage(`settings/credentials/providers`,{}),{t}=useI18n();async function fetchOpenRouterModels(config){try{let response=await fetch(`https://openrouter.ai/api/v1/models`,{headers:{Authorization:`Bearer ${config.apiKey.trim()}`,"Content-Type":`application/json`}});if(!response.ok)throw Error(`Failed to fetch OpenRouter models: ${response.statusText}`);let data$12=await response.json();return data$12.data.map(model=>({id:model.id,name:model.name||model.id,provider:`openrouter-ai`,description:model.description||``,contextLength:model.context_length,deprecated:!1}))}catch(error){throw console.error(`Error fetching OpenRouter models:`,error),error}}let providerMetadata={"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:config=>createOpenRouter(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>fetchOpenRouterModels(config)},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createOpenAI(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>config.baseUrl?fetch(`${config.baseUrl.trim()}models`).then(response=>response.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:config=>createOpenAI(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>config.baseUrl?fetch(`${config.baseUrl.trim()}models`).then(response=>response.ok).catch(()=>!1):!1}},"browser-local-audio-speech":{id:`browser-local-audio-speech`,category:`speech`,tasks:[`text-to-speech`,`tts`],isAvailableBy:async()=>{let webGPUAvailable=await isWebGPUSupported();if(webGPUAvailable)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let memory=globalThis.navigator.deviceMemory;if(memory>=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:config=>createOpenAI(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>config.baseUrl?fetch(`${config.baseUrl.trim()}models`).then(response=>response.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 webGPUAvailable=await isWebGPUSupported();if(webGPUAvailable)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let memory=globalThis.navigator.deviceMemory;if(memory>=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:config=>createOpenAI(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>config.baseUrl?fetch(`${config.baseUrl.trim()}models`).then(response=>response.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:config=>createOllama(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOllama(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>config.baseUrl?fetch(`${config.baseUrl.trim()}models`).then(response=>response.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:config=>createOllama(config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOllama(config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.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:config=>createOllama(config.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:config=>!!config.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:config=>createOpenAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createOpenAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createOpenAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createAnthropic(config.apiKey.trim(),config.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:config=>!!config.apiKey&&!!config.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:config=>createGoogleGenerativeAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createGoogleGenerativeAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`google-generative-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createXAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createXAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`xai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createDeepSeek(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createDeepSeek(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`deepseek`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createUnElevenLabs(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async()=>models.map(model=>({id:model.model_id,name:model.name,provider:`elevenlabs`,description:model.description,contextLength:0,deprecated:!1})),listVoices:async config=>{let provider=createUnElevenLabs(config.apiKey.trim(),config.baseUrl.trim()),voices=await listVoices({...provider.voice()}),ariaIndex=voices.findIndex(voice=>voice.name.includes(`Aria`)),billIndex=voices.findIndex(voice=>voice.name.includes(`Bill`)),startIndex=ariaIndex===-1?0:ariaIndex,endIndex=billIndex===-1?voices.length-1:billIndex,lowerIndex=Math.min(startIndex,endIndex),higherIndex=Math.max(startIndex,endIndex),rearrangedVoices=[...voices.slice(0,lowerIndex),...voices.slice(higherIndex+1),...voices.slice(lowerIndex,higherIndex+1)];return rearrangedVoices.map(voice=>({id:voice.id,name:voice.name,provider:`elevenlabs`,previewURL:voice.preview_audio_url,languages:voice.languages}))}},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createUnMicrosoft(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`v1`,name:`v1`,provider:`microsoft-speech`,description:``,contextLength:0,deprecated:!1}],listVoices:async config=>{let provider=createUnMicrosoft(config.apiKey.trim(),config.baseUrl.trim()),voices=await listVoices({...provider.voice({region:config.region})});return voices.map(voice=>({id:voice.id,name:voice.name,provider:`microsoft-speech`,previewURL:voice.preview_audio_url,languages:voice.languages,gender:voice.labels?.gender}))}},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createUnAlibabaCloud(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listVoices:async config=>{let provider=createUnAlibabaCloud(config.apiKey.trim(),config.baseUrl.trim()),voices=await listVoices({...provider.voice()});return voices.map(voice=>({id:voice.id,name:voice.name,provider:`alibaba-cloud-model-studio`,previewURL:voice.preview_audio_url,languages:voice.languages,gender:voice.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:config=>!!config.apiKey&&!!config.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:config=>createUnVolcengine(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listVoices:async config=>{let provider=createUnVolcengine(config.apiKey.trim(),config.baseUrl.trim()),voices=await listVoices({...provider.voice()});return voices.map(voice=>({id:voice.id,name:voice.name,provider:`volcano-engine`,previewURL:voice.preview_audio_url,languages:voice.languages,gender:voice.labels?.gender}))},listModels:async()=>[{id:`v1`,name:`v1`,provider:`volcano-engine`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.baseUrl&&!!config.app&&!!config.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:config=>createTogetherAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createTogetherAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`together-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createNovita(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createNovita(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`novita-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createFireworks(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createFireworks(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`fireworks-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createOpenAI(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createOpenAI(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`featherless-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createWorkersAI(config.apiKey.trim(),config.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createPerplexity(config.apiKey.trim(),config.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:config=>!!config.apiKey&&!!config.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:config=>createMistral(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createMistral(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`mistral-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.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:config=>createMoonshot(config.apiKey.trim(),config.baseUrl.trim()),capabilities:{listModels:async config=>(await listModels({...createMoonshot(config.apiKey.trim(),config.baseUrl.trim()).model()})).map(model=>({id:model.id,name:model.id,provider:`moonshot-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:config=>!!config.apiKey&&!!config.baseUrl}},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:config=>createPlayer2(config.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`player2-model`,name:`Player2 Model`,provider:`player2`}]},validators:{validateProviderConfig:config=>!!config.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:config=>createPlayer2(config.baseUrl.trim(),`airi`),capabilities:{listVoices:async()=>await fetch(`http://localhost:4315/v1/tts/voices`).then(res=>res.json()).then(({voices})=>voices.map(({id:id$1,language,name:name$2,gender})=>({id:id$1,name:name$2,provider:`player2-speech`,gender,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`}}[language]]})))},validators:{validateProviderConfig:config=>!!config.baseUrl}}};async function validateProvider(providerId){let config=providerCredentials.value[providerId];if(!config)return!1;let metadata=providerMetadata[providerId];return metadata?await metadata.validators.validateProviderConfig(config):!1}let configuredProviders=ref({});function initializeProvider(providerId){if(!providerCredentials.value[providerId]){let metadata=providerMetadata[providerId],defaultOptions=metadata.defaultOptions?.()||{};providerCredentials.value[providerId]={baseUrl:defaultOptions.baseUrl||``}}}Object.keys(providerMetadata).forEach(initializeProvider);async function updateConfigurationStatus(){await Promise.all(Object.keys(providerMetadata).map(async providerId=>{configuredProviders.value[providerId]=await validateProvider(providerId)}))}updateConfigurationStatus(),watch(providerCredentials,updateConfigurationStatus,{deep:!0});let availableProviders=computed(()=>Object.keys(providerMetadata).filter(providerId=>configuredProviders.value[providerId])),availableModels=ref({}),isLoadingModels=ref({}),modelLoadError=ref({});async function fetchModelsForProvider(providerId){let config=providerCredentials.value[providerId];if(!config)return[];let metadata=providerMetadata[providerId];if(!metadata)return[];isLoadingModels.value[providerId]=!0,modelLoadError.value[providerId]=null;try{let models$1=metadata.capabilities.listModels?await metadata.capabilities.listModels(config):[];return availableModels.value[providerId]=models$1.map(model=>({id:model.id,name:model.name,description:model.description,contextLength:model.contextLength,deprecated:model.deprecated,provider:providerId})),availableModels.value[providerId]}catch(error){return console.error(`Error fetching models for ${providerId}:`,error),modelLoadError.value[providerId]=error instanceof Error?error.message:`Unknown error`,[]}finally{isLoadingModels.value[providerId]=!1}}function getModelsForProvider(providerId){return availableModels.value[providerId]||[]}let allAvailableModels=computed(()=>{let models$1=[];for(let providerId of availableProviders.value)models$1.push(...availableModels.value[providerId]||[]);return models$1});async function loadModelsForConfiguredProviders(){for(let providerId of availableProviders.value)providerMetadata[providerId].capabilities.listModels&&await fetchModelsForProvider(providerId)}function getProviderMetadata(providerId){let metadata=providerMetadata[providerId];if(!metadata)throw Error(`Provider metadata for ${providerId} not found`);return{...metadata,localizedName:t(metadata.nameKey,metadata.name),localizedDescription:t(metadata.descriptionKey,metadata.description)}}let allProvidersMetadata=computed(()=>Object.values(providerMetadata).map(metadata=>({...metadata,localizedName:t(metadata.nameKey,metadata.name),localizedDescription:t(metadata.descriptionKey,metadata.description),configured:configuredProviders.value[metadata.id]||!1})));function getProviderInstance(providerId){let config=providerCredentials.value[providerId];if(!config)throw Error(`Provider credentials for ${providerId} not found`);let metadata=providerMetadata[providerId];if(!metadata)throw Error(`Provider metadata for ${providerId} not found`);try{return metadata.createProvider(config)}catch(error){throw console.error(`Error creating provider instance for ${providerId}:`,error),error}}let availableProvidersMetadata=computedAsync(async()=>{let providers=[];for(let provider of allProvidersMetadata.value){let p$5=getProviderMetadata(provider.id),isAvailableBy=p$5.isAvailableBy||(()=>!0),isAvailable=await isAvailableBy();isAvailable&&providers.push(provider)}return providers},[]),allChatProvidersMetadata=computed(()=>availableProvidersMetadata.value.filter(metadata=>metadata.category===`chat`)),allAudioSpeechProvidersMetadata=computed(()=>availableProvidersMetadata.value.filter(metadata=>metadata.category===`speech`)),allAudioTranscriptionProvidersMetadata=computed(()=>availableProvidersMetadata.value.filter(metadata=>metadata.category===`transcription`)),configuredChatProvidersMetadata=computed(()=>allChatProvidersMetadata.value.filter(metadata=>configuredProviders.value[metadata.id])),configuredSpeechProvidersMetadata=computed(()=>allAudioSpeechProvidersMetadata.value.filter(metadata=>configuredProviders.value[metadata.id])),configuredTranscriptionProvidersMetadata=computed(()=>allAudioTranscriptionProvidersMetadata.value.filter(metadata=>configuredProviders.value[metadata.id]));function getProviderConfig(providerId){return providerCredentials.value[providerId]}return{providers:providerCredentials,getProviderConfig,availableProviders,configuredProviders,providerMetadata,getProviderMetadata,allProvidersMetadata,initializeProvider,validateProvider,availableModels,isLoadingModels,modelLoadError,fetchModelsForProvider,getModelsForProvider,allAvailableModels,loadModelsForConfiguredProviders,getProviderInstance,availableProvidersMetadata,allChatProvidersMetadata,allAudioSpeechProvidersMetadata,allAudioTranscriptionProvidersMetadata,configuredChatProvidersMetadata,configuredSpeechProvidersMetadata,configuredTranscriptionProvidersMetadata}}),useConsciousnessStore=defineStore(`consciousness`,()=>{let providersStore=useProvidersStore(),activeProvider=useLocalStorage(`settings/consciousness/active-provider`,``),activeModel=useLocalStorage(`settings/consciousness/active-model`,``),activeCustomModelName=useLocalStorage(`settings/consciousness/active-custom-model`,``),expandedDescriptions=ref({}),modelSearchQuery=ref(``),supportsModelListing=computed(()=>providersStore.getProviderMetadata(activeProvider.value)?.capabilities.listModels!==void 0),providerModels=computed(()=>providersStore.getModelsForProvider(activeProvider.value)),isLoadingActiveProviderModels=computed(()=>providersStore.isLoadingModels[activeProvider.value]||!1),activeProviderModelError=computed(()=>providersStore.modelLoadError[activeProvider.value]||null),filteredModels=computed(()=>{if(!modelSearchQuery.value.trim())return providerModels.value;let query=modelSearchQuery.value.toLowerCase().trim();return providerModels.value.filter(model=>model.name.toLowerCase().includes(query)||model.id.toLowerCase().includes(query)||model.description&&model.description.toLowerCase().includes(query))});function resetModelSelection(){activeModel.value=``,activeCustomModelName.value=``,expandedDescriptions.value={},modelSearchQuery.value=``}async function loadModelsForProvider(provider){provider&&providersStore.getProviderMetadata(provider)?.capabilities.listModels!==void 0&&await providersStore.fetchModelsForProvider(provider)}async function getModelsForProvider(provider){return provider&&providersStore.getProviderMetadata(provider)?.capabilities.listModels!==void 0?providersStore.getModelsForProvider(provider):[]}let player2Interval;watch(activeProvider,async newProvider=>{await loadModelsForProvider(newProvider),resetModelSelection(),newProvider===`player2`?player2Interval=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):(player2Interval&&clearInterval(player2Interval),player2Interval=void 0)});let configured=computed(()=>!!activeProvider.value&&!!activeModel.value);return{configured,activeProvider,activeModel,customModelName:activeCustomModelName,expandedDescriptions,modelSearchQuery,supportsModelListing,providerModels,isLoadingActiveProviderModels,activeProviderModelError,filteredModels,resetModelSelection,loadModelsForProvider,getModelsForProvider}}),noncharacter=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;function escape(value$1,subset$4,unsafe$2){let result=clean(value$1);return unsafe$2?result.replace(unsafe$2,encode):encode(result);function encode(value$2){return stringifyEntitiesLight(value$2,{subset:subset$4})}}function clean(value$1){return String(value$1||``).replace(noncharacter,``)}const unsafe$1=/]]>/g,subset$3=[`>`];function cdata(node$1){return``}function comment(node$1){return``}const subset$2=[` `,` `,` `,`"`,`&`,`'`,`/`,`<`,`=`,`>`];function name$1(value$1){return escape(value$1,subset$2)}function value(value$1,state){let result=String(value$1),quote=state.options.quote||`"`;if(state.options.quoteSmart){let other=quote===`"`?`'`:`"`;ccount(result,quote)>ccount(result,other)&&(quote=other)}return quote+escape(result,[`<`,`&`,quote])+quote}function doctype(node$1,state){let nodeName=name$1(node$1.name),pub=node$1.public,sys=node$1.system,result=``}const own$1={}.hasOwnProperty;function element(node$1,state){let nodeName=name$1(node$1.name),content$2=all(node$1,state),attributes=node$1.attributes||{},close=content$2?!1:state.options.closeEmptyElements,attrs=[],key$1;for(key$1 in attributes)if(own$1.call(attributes,key$1)){let result=attributes[key$1];result!=null&&attrs.push(name$1(key$1)+`=`+value(result,state))}return`<`+nodeName+(attrs.length===0?``:` `+attrs.join(` `))+(close?(state.options.tightClose?``:` `)+`/`:``)+`>`+content$2+(close?``:``)}const unsafe=/\?>/g,subset$1=[`>`];function instruction(node$1){let nodeName=name$1(node$1.name)||`x`,result=escape(node$1.value,subset$1,unsafe);return``}const subset=[`&`,`<`];function text(node$1){return escape(node$1.value,subset)}function raw(node$1,state){return state.options.allowDangerousXml?node$1.value:text(node$1)}const own={}.hasOwnProperty,handlers={cdata,comment,doctype,element,instruction,raw,root:all,text};function one(node$1,state){let type=node$1&&node$1.type;if(!type)throw Error("Expected node, not `"+node$1+"`");if(!own.call(handlers,type))throw Error("Cannot compile unknown node `"+type+"`");let handle$1=handlers[type],result=handle$1(node$1,state);return result}function all(parent,state){let children=parent&&parent.children||[],index$1=-1,results=[];for(;++index$1{let providersStore=useProvidersStore(),activeSpeechProvider=useLocalStorage(`settings/speech/active-provider`,``),activeSpeechModel=useLocalStorage(`settings/speech/active-model`,`eleven_multilingual_v2`),activeSpeechVoiceId=useLocalStorage(`settings/speech/voice`,``),activeSpeechVoice=ref(),pitch=useLocalStorage(`settings/speech/pitch`,0),rate=useLocalStorage(`settings/speech/rate`,1),ssmlEnabled=useLocalStorage(`settings/speech/ssml-enabled`,!1),isLoadingSpeechProviderVoices=ref(!1),speechProviderError=ref(null),availableVoices=ref({}),selectedLanguage=useLocalStorage(`settings/speech/language`,`en-US`),modelSearchQuery=ref(``),availableSpeechProvidersMetadata=computed(()=>providersStore.availableProviders.filter(id$1=>isSpeechProvider(id$1)).map(id$1=>providersStore.getProviderMetadata(id$1))),supportsModelListing=computed(()=>providersStore.getProviderMetadata(activeSpeechProvider.value)?.capabilities.listModels!==void 0),providerModels=computed(()=>providersStore.getModelsForProvider(activeSpeechProvider.value)),isLoadingActiveProviderModels=computed(()=>providersStore.isLoadingModels[activeSpeechProvider.value]||!1),activeProviderModelError=computed(()=>providersStore.modelLoadError[activeSpeechProvider.value]||null),filteredModels=computed(()=>{if(!modelSearchQuery.value.trim())return providerModels.value;let query=modelSearchQuery.value.toLowerCase().trim();return providerModels.value.filter(model=>model.name.toLowerCase().includes(query)||model.id.toLowerCase().includes(query)||model.description&&model.description.toLowerCase().includes(query))}),supportsSSML=computed(()=>[`elevenlabs`,`microsoft-speech`,`azure-speech`,`google`,`alibaba-cloud-model-studio`,`volcengine`].includes(activeSpeechProvider.value));function isSpeechProvider(providerId){return[`elevenlabs`,`microsoft-speech`,`azure-speech`,`google`,`amazon`,`alibaba-cloud-model-studio`,`volcengine`,`player2-speech`].includes(providerId)}async function loadVoicesForProvider(provider){if(!provider||!isSpeechProvider(provider))return[];isLoadingSpeechProviderVoices.value=!0,speechProviderError.value=null;try{let voices=await providersStore.getProviderMetadata(provider).capabilities.listVoices?.(providersStore.getProviderConfig(provider))||[];return availableVoices.value[provider]=voices,voices}catch(error){return console.error(`Error fetching voices for ${provider}:`,error),speechProviderError.value=error instanceof Error?error.message:`Unknown error`,[]}finally{isLoadingSpeechProviderVoices.value=!1}}function getVoicesForProvider(provider){return availableVoices.value[provider]||[]}watch(activeSpeechProvider,async newProvider=>{newProvider&&await loadVoicesForProvider(newProvider)}),onMounted(()=>{loadVoicesForProvider(activeSpeechProvider.value).then(()=>{activeSpeechVoiceId.value&&(activeSpeechVoice.value=availableVoices.value[activeSpeechProvider.value]?.find(voice=>voice.id===activeSpeechVoiceId.value))})}),watch(activeSpeechVoiceId,voiceId=>{voiceId&&(activeSpeechVoice.value=availableVoices.value[activeSpeechProvider.value]?.find(voice=>voice.id===voiceId))},{immediate:!0}),watch(availableVoices,voices=>{activeSpeechVoiceId.value&&(activeSpeechVoice.value=voices[activeSpeechProvider.value]?.find(voice=>voice.id===activeSpeechVoiceId.value))},{immediate:!0});async function speech(provider,model,input,voice,providerConfig={}){let response=await generateSpeech({...provider.speech(model,{...providerConfig}),input,voice});return response}function generateSSML(text$5,voice,providerConfig){let pitch$1=providerConfig?.pitch,speed=providerConfig?.speed,volume=providerConfig?.volume,prosody={pitch:pitch$1==null?void 0:pitch$1>0?`+${pitch$1}%`:`-${pitch$1}%`,rate:speed==null?void 0:speed===1?`1`:`${speed}`,volume:volume==null?void 0:volume>0?`+${volume}%`:`${volume}%`},ssmlXast=x(`speak`,{version:`1.0`,xmlns:`http://www.w3.org/2001/10/synthesis`,"xml:lang":voice.languages[0]?.code||`en-US`},[x(`voice`,{name:voice.id,gender:voice.gender||`neutral`},[Object.entries(prosody).filter(([_$2,value$1])=>value$1!=null).length>0?x(`prosody`,{pitch:pitch$1==null?void 0:pitch$1>0?`+${pitch$1}%`:`-${pitch$1}%`,rate:speed==null?void 0:speed===1?`1`:`${speed}`,volume:volume==null?void 0:volume>0?`+${volume}%`:`${volume}%`},[text$5]):text$5])]);return toXml(ssmlXast)}let configured=computed(()=>!!activeSpeechProvider.value&&!!activeSpeechModel.value&&!!activeSpeechVoiceId.value);return{configured,activeSpeechProvider,activeSpeechModel,activeSpeechVoice,activeSpeechVoiceId,pitch,rate,ssmlEnabled,selectedLanguage,isLoadingSpeechProviderVoices,speechProviderError,availableVoices,modelSearchQuery,availableSpeechProvidersMetadata,supportsSSML,supportsModelListing,providerModels,isLoadingActiveProviderModels,activeProviderModelError,filteredModels,speech,loadVoicesForProvider,getVoicesForProvider,generateSSML,isSpeechProvider}}),useAiriCardStore=defineStore(`airi-card`,()=>{let cards=useLocalStorage(`airi-cards`,new Map),activeCardId=useLocalStorage(`airi-card-active-id`,`default`),activeCard=computed(()=>cards.value.get(activeCardId.value)),consciousnessStore=useConsciousnessStore(),speechStore=useSpeechStore(),{activeModel:activeConsciousnessModel}=storeToRefs(consciousnessStore),{activeSpeechVoiceId,activeSpeechModel}=storeToRefs(speechStore),addCard=card=>{let newCardId=crypto.randomUUID();return cards.value.set(newCardId,newAiriCard(card)),newCardId},removeCard=id$1=>{cards.value.delete(id$1)},getCard=id$1=>cards.value.get(id$1);function resolveAiriExtension(card){let existingExtension=`data`in card?card.data?.extensions?.airi:card.extensions?.airi,defaultModules={consciousness:{model:activeConsciousnessModel.value},speech:{model:activeSpeechModel.value,voice_id:activeSpeechVoiceId.value}};return existingExtension?{modules:{consciousness:{model:existingExtension.modules?.consciousness?.model??defaultModules.consciousness.model},speech:{model:existingExtension.modules?.speech?.model??defaultModules.speech.model,voice_id:existingExtension.modules?.speech?.voice_id??defaultModules.speech.voice_id,pitch:existingExtension.modules?.speech?.pitch,rate:existingExtension.modules?.speech?.rate,ssml:existingExtension.modules?.speech?.ssml,language:existingExtension.modules?.speech?.language},vrm:existingExtension.modules?.vrm,live2d:existingExtension.modules?.live2d},agents:existingExtension.agents??{}}:{modules:defaultModules,agents:{}}}function newAiriCard(card){if(`data`in card){let ccv3Card=card;return{name:ccv3Card.data.name,version:ccv3Card.data.character_version??`1.0.0`,description:ccv3Card.data.description??``,creator:ccv3Card.data.creator??``,notes:ccv3Card.data.creator_notes??``,notesMultilingual:ccv3Card.data.creator_notes_multilingual,personality:ccv3Card.data.personality??``,scenario:ccv3Card.data.scenario??``,greetings:[ccv3Card.data.first_mes,...ccv3Card.data.alternate_greetings??[]],greetingsGroupOnly:ccv3Card.data.group_only_greetings??[],systemPrompt:ccv3Card.data.system_prompt??``,postHistoryInstructions:ccv3Card.data.post_history_instructions??``,messageExample:ccv3Card.data.mes_example?ccv3Card.data.mes_example.split(` `).filter(Boolean).map(example=>example.split(` `).map(line=>{if(line.startsWith(`{{char}}:`)||line.startsWith(`{{user}}:`))return line;throw Error(`Invalid message example format: ${line}`)})):[],tags:ccv3Card.data.tags??[],extensions:{airi:resolveAiriExtension(ccv3Card),...ccv3Card.data.extensions}}}return{...card,extensions:{airi:resolveAiriExtension(card),...card.extensions}}}return onMounted(()=>{let{t}=useI18n();cards.value.set(`default`,newAiriCard({name:`ReLU`,version:`1.0.0`,description:system_v2_default(t(`base.prompt.prefix`),t(`base.prompt.suffix`)).content}))}),watch(activeCard,newCard=>{if(!newCard)return;let extension$1=resolveAiriExtension(newCard);extension$1&&(activeConsciousnessModel.value=extension$1?.modules?.consciousness?.model,activeSpeechModel.value=extension$1?.modules?.speech?.model,activeSpeechVoiceId.value=extension$1?.modules?.speech?.voice_id)}),{cards,activeCard,activeCardId,addCard,removeCard,getCard,currentModels:computed(()=>({consciousness:{model:activeConsciousnessModel.value},speech:{model:activeSpeechModel.value,voice_id:activeSpeechVoiceId.value}})),systemPrompt:computed(()=>{let card=activeCard.value;if(!card)return``;let components=[card.systemPrompt,card.description,card.personality].filter(Boolean);return components.join(` -`)})}}),useChatStore=defineStore(`chat`,()=>{let{stream}=useLLM(),{systemPrompt}=storeToRefs(useAiriCardStore()),sending=ref(!1),onBeforeMessageComposedHooks=ref([]),onAfterMessageComposedHooks=ref([]),onBeforeSendHooks=ref([]),onAfterSendHooks=ref([]),onTokenLiteralHooks=ref([]),onTokenSpecialHooks=ref([]),onStreamEndHooks=ref([]),onAssistantResponseEndHooks=ref([]);function onBeforeMessageComposed(cb$1){onBeforeMessageComposedHooks.value.push(cb$1)}function onAfterMessageComposed(cb$1){onAfterMessageComposedHooks.value.push(cb$1)}function onBeforeSend(cb$1){onBeforeSendHooks.value.push(cb$1)}function onAfterSend(cb$1){onAfterSendHooks.value.push(cb$1)}function onTokenLiteral(cb$1){onTokenLiteralHooks.value.push(cb$1)}function onTokenSpecial(cb$1){onTokenSpecialHooks.value.push(cb$1)}function onStreamEnd(cb$1){onStreamEndHooks.value.push(cb$1)}function onAssistantResponseEnd(cb$1){onAssistantResponseEndHooks.value.push(cb$1)}let messages=ref([{role:`system`,content:systemPrompt.value}]),streamingMessage=ref({role:`assistant`,content:``,slices:[],tool_results:[]});async function send(sendingMessage,options$1){try{if(sending.value=!0,!sendingMessage)return;for(let hook of onBeforeMessageComposedHooks.value)await hook(sendingMessage);let parser=useLlmmarkerParser({onLiteral:async literal=>{for(let hook of onTokenLiteralHooks.value)await hook(literal);streamingMessage.value.content+=literal;let lastSlice=streamingMessage.value.slices.at(-1);if(lastSlice?.type===`text`){lastSlice.text+=literal;return}streamingMessage.value.slices.push({type:`text`,text:literal})},onSpecial:async special=>{for(let hook of onTokenSpecialHooks.value)await hook(special)}}),slicesQueue=useQueue({handlers:[async ctx=>{if(ctx.data.type===`text`){await parser.consume(ctx.data.text);return}if(ctx.data.type===`tool-call`){streamingMessage.value.slices.push(ctx.data);return}ctx.data.type===`tool-call-result`&&streamingMessage.value.tool_results.push(ctx.data)}]});streamingMessage.value={role:`assistant`,content:``,slices:[],tool_results:[]},messages.value.push({role:`user`,content:sendingMessage}),messages.value.push(streamingMessage.value);let newMessages=messages.value.slice(0,messages.value.length-1).map(msg=>{if(msg.role===`assistant`){let{slices:_$2,...rest}=msg;return rest.tool_results=toRaw(rest.tool_results),toRaw(rest)}return toRaw(msg)});for(let hook of onAfterMessageComposedHooks.value)await hook(sendingMessage);for(let hook of onBeforeSendHooks.value)await hook(sendingMessage);let headers=options$1.providerConfig?.headers||{},res=await stream(options$1.model,options$1.chatProvider,newMessages,{headers,onToolCall(toolCall){slicesQueue.add({type:`tool-call`,toolCall})},onToolCallResult(toolCallResult){slicesQueue.add({type:`tool-call-result`,id:toolCallResult.id,result:toolCallResult.result})}});for(let hook of onAfterSendHooks.value)await hook(sendingMessage);let fullText=``;for await(let textPart of readableStreamToAsyncIterator(res.textStream,async v$2=>v$2))slicesQueue.add({type:`text`,text:textPart}),fullText+=textPart;await parser.end();for(let hook of onStreamEndHooks.value)await hook();for(let hook of onAssistantResponseEndHooks.value)await hook(fullText);console.debug(`LLM output:`,fullText)}catch(error){throw console.error(`Error sending message:`,error),error}finally{sending.value=!1}}return{sending,messages,streamingMessage,send,onBeforeMessageComposed,onAfterMessageComposed,onBeforeSend,onAfterSend,onTokenLiteral,onTokenSpecial,onStreamEnd,onAssistantResponseEnd}}),useLive2d=defineStore(`live2d`,()=>{let modelFile=ref(),modelUrl=ref(`/assets/live2d/models/hiyori_pro_zh.zip`),loadSource=ref(`url`),loadingModel=ref(!1),position$2=useLocalStorage(`settings/live2d/position`,{x:0,y:0}),positionInPercentageString=computed(()=>({x:`${position$2.value.x}%`,y:`${position$2.value.y}%`})),currentMotion=ref({group:`Idle`,index:0}),availableMotions=ref([]),motionMap=useLocalStorage(`settings/live2d/motion-map`,{}),scale$1=useLocalStorage(`settings/live2d/scale`,1);return{modelFile,modelUrl,loadSource,loadingModel,position:position$2,positionInPercentageString,currentMotion,availableMotions,motionMap,scale:scale$1}}),useMcpStore=defineStore(`mcp`,()=>{let serverCmd=useLocalStorage(`settings/mcp/server-cmd`,``),serverArgs=useLocalStorage(`settings/mcp/server-args`,``),connected=useLocalStorage(`mcp/connected`,!1);return{serverCmd,serverArgs,connected}}),useOnboardingStore=defineStore(`onboarding`,()=>{let providersStore=useProvidersStore(),hasCompletedSetup=useLocalStorage(`onboarding/completed`,!1),hasSkippedSetup=useLocalStorage(`onboarding/skipped`,!1),shouldShowSetup=ref(!1),hasEssentialProviderConfigured=computed(()=>{let essentialProviders=[`openai`,`anthropic`,`google-generative-ai`,`openrouter-ai`,`ollama`,`deepseek`];return essentialProviders.some(providerId=>providersStore.configuredProviders[providerId])}),needsOnboarding=computed(()=>hasCompletedSetup.value||hasSkippedSetup.value?(console.warn(`Onboarding already completed or skipped`),!1):hasEssentialProviderConfigured.value?(console.warn(`Essential provider already configured, no onboarding needed`),!1):!0);async function initializeSetupCheck(){needsOnboarding.value&&(await nextTick(),shouldShowSetup.value=!0)}function markSetupCompleted(){hasCompletedSetup.value=!0,hasSkippedSetup.value=!1,shouldShowSetup.value=!1}function markSetupSkipped(){hasSkippedSetup.value=!0,shouldShowSetup.value=!1}function resetSetupState(){hasCompletedSetup.value=!1,hasSkippedSetup.value=!1,shouldShowSetup.value=!1}function forceShowSetup(){shouldShowSetup.value=!0}return{hasCompletedSetup,hasSkippedSetup,shouldShowSetup,hasEssentialProviderConfigured,needsOnboarding,initializeSetupCheck,markSetupCompleted,markSetupSkipped,resetSetupState,forceShowSetup}}),WebSocket$1=globalThis.WebSocket,sleep=async delay=>new Promise(resolve$1=>setTimeout(resolve$1,delay));var Client=class{connected=!1;opts;websocket;eventListeners=new Map;reconnectAttempts=0;shouldClose=!1;constructor(options$1){if(this.opts={url:`ws://localhost:6121/ws`,possibleEvents:[],onError:()=>{},onClose:()=>{},autoConnect:!0,autoReconnect:!0,...options$1},this.opts.autoConnect)try{this.connect()}catch(err){console.error(err)}}async retryWithExponentialBackoff(fn$6,attempts=0,maxAttempts=-1){if(maxAttempts!==-1&&attempts>=maxAttempts){console.error(`Maximum retry attempts (${maxAttempts}) reached`);return}try{await fn$6()}catch(err){console.error(`Encountered an error when retrying`,err),await sleep(2**attempts*1e3),await this.retryWithExponentialBackoff(fn$6,attempts+1,maxAttempts)}}async tryReconnectWithExponentialBackoff(){await this.retryWithExponentialBackoff(()=>this._connect(),this.reconnectAttempts)}_connect(){return new Promise((resolve$1,reject)=>{if(this.shouldClose){resolve$1();return}if(this.connected){resolve$1();return}this.websocket=new WebSocket$1(this.opts.url),this.onEvent(`module:authenticated`,async event=>{let auth=event.data.authenticated;auth?this.tryAnnounce():this.retryWithExponentialBackoff(()=>this.tryAuthenticate())}),this.websocket.onerror=event=>{if(this.opts.onError?.(event),`error`in event&&event.error instanceof Error&&event.error.message===`Received network error or non-101 status code.`){if(this.connected=!1,!this.opts.autoReconnect){this.opts.onError?.(event),this.opts.onClose?.(),reject(event.error);return}reject(event.error)}},this.websocket.onclose=()=>{this.opts.onClose?.(),this.connected=!1,this.opts.autoReconnect?this.tryReconnectWithExponentialBackoff():this.opts.onClose?.()},this.websocket.onmessage=event=>{this.handleMessage(event)},this.websocket.onopen=()=>{this.reconnectAttempts=0,this.opts.token?this.tryAuthenticate():this.tryAnnounce(),this.connected=!0,resolve$1()}})}async connect(){await this.tryReconnectWithExponentialBackoff()}tryAnnounce(){this.send({type:`module:announce`,data:{name:this.opts.name,possibleEvents:this.opts.possibleEvents}})}tryAuthenticate(){this.opts.token&&this.send({type:`module:authenticate`,data:{token:this.opts.token||``}})}async handleMessage(event){try{let data$12=JSON.parse(event.data),listeners=this.eventListeners.get(data$12.type);if(!listeners)return;for(let listener of listeners)await listener(data$12)}catch(err){console.error(`Failed to parse message:`,err),this.opts.onError?.(err)}}onEvent(event,callback){this.eventListeners.get(event)||this.eventListeners.set(event,[]);let listeners=this.eventListeners.get(event);listeners&&listeners.push(callback)}send(data$12){this.websocket?.send(JSON.stringify(data$12))}sendRaw(data$12){this.websocket?.send(data$12)}close(){this.shouldClose=!0,this.connected&&this.websocket&&(this.websocket.close(),this.connected=!1)}};const useServerStore=defineStore(`server`,()=>{let server=ref();onMounted(()=>{server.value=new Client({name:`stage-web`,autoConnect:!1,autoReconnect:!0,onError:error=>{console.error(error)}})});function connect(){server.value?.connect()}return{server,connect}}),DEFAULT_THEME_COLORS_HUE=220.44,convert=converter_default(`oklch`),getHueFrom=color$2=>color$2?convert(color$2)?.h:DEFAULT_THEME_COLORS_HUE,useSettings=defineStore(`settings`,()=>{let selectedAudioDevice=ref(),language=useLocalStorage(`settings/language`,`en`),stageView=useLocalStorage(`settings/stage/view/model-renderer`,`2d`),isAudioInputOn=useLocalStorage(`settings/audio/input`,`false`),selectedAudioDeviceId=computed(()=>selectedAudioDevice.value?.deviceId),{audioInputs,ensurePermissions}=useDevicesList({constraints:{audio:!0}}),disableTransitions=useLocalStorage(`settings/disable-transitions`,!0),usePageSpecificTransitions=useLocalStorage(`settings/use-page-specific-transitions`,!0),themeColorsHue=useLocalStorage(`settings/theme/colors/hue`,DEFAULT_THEME_COLORS_HUE),themeColorsHueDynamic=useLocalStorage(`settings/theme/colors/hue-dynamic`,!1),allowVisibleOnAllWorkspaces=useLocalStorage(`settings/allow-visible-on-all-workspaces`,!0);function setThemeColorsHue(hue$2=DEFAULT_THEME_COLORS_HUE){themeColorsHue.value=hue$2,themeColorsHueDynamic.value=!1}function applyPrimaryColorFrom(color$2){setThemeColorsHue(getHueFrom(color$2))}function isColorSelectedForPrimary(hexColor){if(themeColorsHueDynamic.value)return!1;let h$3=getHueFrom(hexColor);if(!h$3)return!1;let hueDifference=Math.abs(h$3-themeColorsHue.value);return hueDifference<.01||hueDifference>359.99}return watch(isAudioInputOn,value$1=>{value$1===`false`&&(selectedAudioDevice.value=void 0),value$1===`true`&&ensurePermissions().then(()=>{selectedAudioDevice.value=audioInputs.value[0]})}),watch(audioInputs,()=>{isAudioInputOn.value===`true`&&!selectedAudioDevice.value&&(selectedAudioDevice.value=audioInputs.value[0])},{immediate:!0}),{disableTransitions,usePageSpecificTransitions,language,stageView,themeColorsHue,themeColorsHueDynamic,isAudioInputOn,selectedAudioDevice,selectedAudioDeviceId,allowVisibleOnAllWorkspaces,setThemeColorsHue,applyPrimaryColorFrom,isColorSelectedForPrimary}}),_hoisted_1$11={flex:`~ col md:row gap-6`},_hoisted_2$5={flex:`~ col gap-6`},_hoisted_3$2={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_4$2={flex:`~ col gap-4`},_hoisted_5$2={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},_hoisted_6$2={"w-full":``,"rounded-xl":``};var SpeechProviderSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SpeechProviderSettings`,props:{providerId:{},defaultModel:{},additionalSettings:{}},setup(__props){let props=__props,{t}=useI18n(),router$1=useRouter(),providersStore=useProvidersStore(),speechStore=useSpeechStore(),{providers}=storeToRefs(providersStore),providerMetadata=computed(()=>providersStore.getProviderMetadata(props.providerId)),apiKey=computed({get:()=>providers.value[props.providerId]?.apiKey||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].apiKey=value$1}}),baseUrl=computed({get:()=>providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].baseUrl=value$1}}),testText=ref(`Hello! This is a test of voice synthesis.`),isGenerating=ref(!1),audioUrl=ref(``),errorMessage=ref(``),audioPlayer=ref(null),useSSML=ref(!1),ssmlText=ref(``),activeSpeechVoice=ref(``),voiceSettings=ref({});function initializeVoiceSettings(){providers.value[props.providerId]?.voiceSettings?voiceSettings.value={...providers.value[props.providerId].voiceSettings}:voiceSettings.value={pitch:0,speed:1,volume:0,...props.additionalSettings}}onMounted(()=>{providersStore.initializeProvider(props.providerId),apiKey.value=providers.value[props.providerId]?.apiKey||``,baseUrl.value=providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``,initializeVoiceSettings(),providersStore.configuredProviders[props.providerId]&&speechStore.loadVoicesForProvider(props.providerId)});let debouncedUpdate=useDebounceFn(()=>{providers.value[props.providerId]={...providers.value[props.providerId],apiKey:apiKey.value,baseUrl:baseUrl.value||providerMetadata.value?.defaultOptions?.().baseUrl||``,voiceSettings:{...voiceSettings.value}}},1e3);watch([apiKey,baseUrl],debouncedUpdate),watch(voiceSettings,debouncedUpdate,{deep:!0});async function generateTestSpeech(){if(!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim())return;let provider=providersStore.getProviderInstance(props.providerId);if(!provider){console.error(`Failed to initialize speech provider`);return}if(!activeSpeechVoice.value){console.error(`No active speech voice selected`);return}isGenerating.value=!0,errorMessage.value=``;try{audioUrl.value&&stopTestAudio();let modelToUse=props.defaultModel||`default`,input=useSSML.value?ssmlText.value:testText.value,response=await generateSpeech({...provider.speech(modelToUse,{voiceSettings:voiceSettings.value}),input,voice:activeSpeechVoice.value});audioUrl.value=URL.createObjectURL(new Blob([response])),setTimeout(()=>{audioPlayer.value&&audioPlayer.value.play()},100)}catch(error){console.error(`Error generating speech:`,error),errorMessage.value=error instanceof Error?error.message:`An unknown error occurred`}finally{isGenerating.value=!1}}function stopTestAudio(){audioPlayer.value&&(audioPlayer.value.pause(),audioPlayer.value.currentTime=0),audioUrl.value&&(URL.revokeObjectURL(audioUrl.value),audioUrl.value=``)}onUnmounted(()=>{audioUrl.value&&URL.revokeObjectURL(audioUrl.value)});function handleResetVoiceSettings(){voiceSettings.value={...providerMetadata.value?.defaultOptions?.().voiceSettings||{}},debouncedUpdate()}function updateVoiceSetting(key$1,value$1){voiceSettings.value[key$1]=value$1}let slotData=computed(()=>({voiceSettings:voiceSettings.value,updateVoiceSettings:updateVoiceSetting,isGenerating:isGenerating.value,testText:testText.value,useSSML:useSSML.value,ssmlText:ssmlText.value,generateTestSpeech,stopTestAudio,audioUrl:audioUrl.value,audioPlayer:audioPlayer.value,errorMessage:errorMessage.value}));return(_ctx,_cache$1)=>(openBlock(),createBlock(ProviderSettingsLayout2_default,{"provider-name":providerMetadata.value?.localizedName,"provider-icon":providerMetadata.value?.icon,"on-back":()=>unref(router$1).back()},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$11,[createVNode(unref(ProviderSettingsContainer_default),{class:`w-full md:w-[40%]`},{default:withCtx(()=>[createVNode(unref(ProviderBasicSettings_default),{title:unref(t)(`settings.pages.providers.common.section.basic.title`),description:unref(t)(`settings.pages.providers.common.section.basic.description`),"on-reset":handleResetVoiceSettings},{default:withCtx(()=>[createVNode(unref(ProviderApiKeyInput_default),{modelValue:apiKey.value,"onUpdate:modelValue":_cache$1[0]||=$event=>apiKey.value=$event,"provider-name":providerMetadata.value?.localizedName,placeholder:`sk-`},null,8,[`modelValue`,`provider-name`]),renderSlot(_ctx.$slots,`basic-settings`)]),_:3},8,[`title`,`description`]),createBaseVNode(`div`,_hoisted_2$5,[createBaseVNode(`h2`,_hoisted_3$2,toDisplayString(unref(t)(`settings.pages.providers.common.section.voice.title`)),1),createBaseVNode(`div`,_hoisted_4$2,[renderSlot(_ctx.$slots,`voice-settings`,normalizeProps(guardReactiveProps(slotData.value)))])]),createVNode(unref(ProviderAdvancedSettings_default),{title:unref(t)(`settings.pages.providers.common.section.advanced.title`)},{default:withCtx(()=>[createVNode(unref(ProviderBaseUrlInput_default),{modelValue:baseUrl.value,"onUpdate:modelValue":_cache$1[1]||=$event=>baseUrl.value=$event,placeholder:providerMetadata.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`]),renderSlot(_ctx.$slots,`advanced-settings`)]),_:3},8,[`title`])]),_:3}),createBaseVNode(`div`,_hoisted_5$2,[createBaseVNode(`div`,_hoisted_6$2,[renderSlot(_ctx.$slots,`playground`,normalizeProps(guardReactiveProps(slotData.value)))])])])]),_:3},8,[`provider-name`,`provider-icon`,`on-back`]))}}),SpeechProviderSettings_default=SpeechProviderSettings_vue_vue_type_script_setup_true_lang_default,require_jszip_min=__commonJSMin((exports,module)=>{ -/*! - -JSZip v3.10.1 - A JavaScript class for generating and reading zip files - - -(c) 2009-2016 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. - -JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/main/LICENSE -*/ -(function(e$3){typeof exports==`object`&&module!==void 0?module.exports=e$3():typeof define==`function`&&define.amd?define([],e$3):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=e$3()})(function(){return function s$1(a$2,o$1,h$3){function u$1(r$2,e$4){if(!o$1[r$2]){if(!a$2[r$2]){var t=typeof __require==`function`&&__require;if(!e$4&&t)return t(r$2,!0);if(l$1)return l$1(r$2,!0);var n$2=Error(`Cannot find module '`+r$2+`'`);throw n$2.code=`MODULE_NOT_FOUND`,n$2}var i$1=o$1[r$2]={exports:{}};a$2[r$2][0].call(i$1.exports,function(e$5){var t$1=a$2[r$2][1][e$5];return u$1(t$1||e$5)},i$1,i$1.exports,s$1,a$2,o$1,h$3)}return o$1[r$2].exports}for(var l$1=typeof __require==`function`&&__require,e$3=0;e$3>2,s$1=(3&t$1)<<4|r$3>>4,a$2=1>6:64,o$1=2>4,r$3=(15&i$1)<<4|(s$1=p$5.indexOf(e$4.charAt(o$1++)))>>2,n$2=(3&s$1)<<6|(a$2=p$5.indexOf(e$4.charAt(o$1++))),l$1[h$3++]=t$1,s$1!==64&&(l$1[h$3++]=r$3),a$2!==64&&(l$1[h$3++]=n$2);return l$1}},{"./support":30,"./utils":32}],2:[function(e$3,t,r$2){"use strict";var n$2=e$3(`./external`),i$1=e$3(`./stream/DataWorker`),s$1=e$3(`./stream/Crc32Probe`),a$2=e$3(`./stream/DataLengthProbe`);function o$1(e$4,t$1,r$3,n$3,i$2){this.compressedSize=e$4,this.uncompressedSize=t$1,this.crc32=r$3,this.compression=n$3,this.compressedContent=i$2}o$1.prototype={getContentWorker:function(){var e$4=new i$1(n$2.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a$2(`data_length`)),t$1=this;return e$4.on(`end`,function(){if(this.streamInfo.data_length!==t$1.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e$4},getCompressedWorker:function(){return new i$1(n$2.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},o$1.createWorkerFrom=function(e$4,t$1,r$3){return e$4.pipe(new s$1).pipe(new a$2(`uncompressedSize`)).pipe(t$1.compressWorker(r$3)).pipe(new a$2(`compressedSize`)).withStreamInfo(`compression`,t$1)},t.exports=o$1},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e$3,t,r$2){"use strict";var n$2=e$3(`./stream/GenericWorker`);r$2.STORE={magic:`\0\0`,compressWorker:function(){return new n$2(`STORE compression`)},uncompressWorker:function(){return new n$2(`STORE decompression`)}},r$2.DEFLATE=e$3(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e$3,t,r$2){"use strict";var n$2=e$3(`./utils`),o$1=function(){for(var e$4,t$1=[],r$3=0;r$3<256;r$3++){e$4=r$3;for(var n$3=0;n$3<8;n$3++)e$4=1&e$4?3988292384^e$4>>>1:e$4>>>1;t$1[r$3]=e$4}return t$1}();t.exports=function(e$4,t$1){return e$4!==void 0&&e$4.length?n$2.getTypeOf(e$4)===`string`?function(e$5,t$2,r$3,n$3){var i$1=o$1,s$1=n$3+r$3;e$5^=-1;for(var a$2=n$3;a$2>>8^i$1[255&(e$5^t$2.charCodeAt(a$2))];return-1^e$5}(0|t$1,e$4,e$4.length,0):function(e$5,t$2,r$3,n$3){var i$1=o$1,s$1=n$3+r$3;e$5^=-1;for(var a$2=n$3;a$2>>8^i$1[255&(e$5^t$2[a$2])];return-1^e$5}(0|t$1,e$4,e$4.length,0):0}},{"./utils":32}],5:[function(e$3,t,r$2){"use strict";r$2.base64=!1,r$2.binary=!1,r$2.dir=!1,r$2.createFolders=!0,r$2.date=null,r$2.compression=null,r$2.compressionOptions=null,r$2.comment=null,r$2.unixPermissions=null,r$2.dosPermissions=null},{}],6:[function(e$3,t,r$2){"use strict";var n$2=null;n$2=typeof Promise<`u`?Promise:e$3(`lie`),t.exports={Promise:n$2}},{lie:37}],7:[function(e$3,t,r$2){"use strict";var n$2=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i$1=e$3(`pako`),s$1=e$3(`./utils`),a$2=e$3(`./stream/GenericWorker`),o$1=n$2?`uint8array`:`array`;function h$3(e$4,t$1){a$2.call(this,`FlateWorker/`+e$4),this._pako=null,this._pakoAction=e$4,this._pakoOptions=t$1,this.meta={}}r$2.magic=`\b\0`,s$1.inherits(h$3,a$2),h$3.prototype.processChunk=function(e$4){this.meta=e$4.meta,this._pako===null&&this._createPako(),this._pako.push(s$1.transformTo(o$1,e$4.data),!1)},h$3.prototype.flush=function(){a$2.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h$3.prototype.cleanUp=function(){a$2.prototype.cleanUp.call(this),this._pako=null},h$3.prototype._createPako=function(){this._pako=new i$1[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t$1=this;this._pako.onData=function(e$4){t$1.push({data:e$4,meta:t$1.meta})}},r$2.compressWorker=function(e$4){return new h$3(`Deflate`,e$4)},r$2.uncompressWorker=function(){return new h$3(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e$3,t,r$2){"use strict";function A$2(e$4,t$1){var r$3,n$3=``;for(r$3=0;r$3>>=8;return n$3}function n$2(e$4,t$1,r$3,n$3,i$2,s$2){var a$2,o$1,h$3=e$4.file,u$1=e$4.compression,l$1=s$2!==O$3.utf8encode,f$3=I.transformTo(`string`,s$2(h$3.name)),c$4=I.transformTo(`string`,O$3.utf8encode(h$3.name)),d$2=h$3.comment,p$5=I.transformTo(`string`,s$2(d$2)),m$3=I.transformTo(`string`,O$3.utf8encode(d$2)),_$2=c$4.length!==h$3.name.length,g$2=m$3.length!==d$2.length,b$4=``,v$2=``,y$3=``,w$2=h$3.dir,k$4=h$3.date,x$3={crc32:0,compressedSize:0,uncompressedSize:0};t$1&&!r$3||(x$3.crc32=e$4.crc32,x$3.compressedSize=e$4.compressedSize,x$3.uncompressedSize=e$4.uncompressedSize);var S$2=0;t$1&&(S$2|=8),l$1||!_$2&&!g$2||(S$2|=2048);var z$3=0,C$3=0;w$2&&(z$3|=16),i$2===`UNIX`?(C$3=798,z$3|=function(e$5,t$2){var r$4=e$5;return e$5||(r$4=t$2?16893:33204),(65535&r$4)<<16}(h$3.unixPermissions,w$2)):(C$3=20,z$3|=function(e$5){return 63&(e$5||0)}(h$3.dosPermissions)),a$2=k$4.getUTCHours(),a$2<<=6,a$2|=k$4.getUTCMinutes(),a$2<<=5,a$2|=k$4.getUTCSeconds()/2,o$1=k$4.getUTCFullYear()-1980,o$1<<=4,o$1|=k$4.getUTCMonth()+1,o$1<<=5,o$1|=k$4.getUTCDate(),_$2&&(v$2=A$2(1,1)+A$2(B$2(f$3),4)+c$4,b$4+=`up`+A$2(v$2.length,2)+v$2),g$2&&(y$3=A$2(1,1)+A$2(B$2(p$5),4)+m$3,b$4+=`uc`+A$2(y$3.length,2)+y$3);var E$2=``;return E$2+=` -\0`,E$2+=A$2(S$2,2),E$2+=u$1.magic,E$2+=A$2(a$2,2),E$2+=A$2(o$1,2),E$2+=A$2(x$3.crc32,4),E$2+=A$2(x$3.compressedSize,4),E$2+=A$2(x$3.uncompressedSize,4),E$2+=A$2(f$3.length,2),E$2+=A$2(b$4.length,2),{fileRecord:R$3.LOCAL_FILE_HEADER+E$2+f$3+b$4,dirRecord:R$3.CENTRAL_FILE_HEADER+A$2(C$3,2)+E$2+A$2(p$5.length,2)+`\0\0\0\0`+A$2(z$3,4)+A$2(n$3,4)+f$3+b$4+p$5}}var I=e$3(`../utils`),i$1=e$3(`../stream/GenericWorker`),O$3=e$3(`../utf8`),B$2=e$3(`../crc32`),R$3=e$3(`../signature`);function s$1(e$4,t$1,r$3,n$3){i$1.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t$1,this.zipPlatform=r$3,this.encodeFileName=n$3,this.streamFiles=e$4,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s$1,i$1),s$1.prototype.push=function(e$4){var t$1=e$4.meta.percent||0,r$3=this.entriesCount,n$3=this._sources.length;this.accumulate?this.contentBuffer.push(e$4):(this.bytesWritten+=e$4.data.length,i$1.prototype.push.call(this,{data:e$4.data,meta:{currentFile:this.currentFile,percent:r$3?(t$1+100*(r$3-n$3-1))/r$3:100}}))},s$1.prototype.openedSource=function(e$4){this.currentSourceOffset=this.bytesWritten,this.currentFile=e$4.file.name;var t$1=this.streamFiles&&!e$4.file.dir;if(t$1){var r$3=n$2(e$4,t$1,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r$3.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s$1.prototype.closedSource=function(e$4){this.accumulate=!1;var t$1=this.streamFiles&&!e$4.file.dir,r$3=n$2(e$4,t$1,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r$3.dirRecord),t$1)this.push({data:function(e$5){return R$3.DATA_DESCRIPTOR+A$2(e$5.crc32,4)+A$2(e$5.compressedSize,4)+A$2(e$5.uncompressedSize,4)}(e$4),meta:{percent:100}});else for(this.push({data:r$3.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s$1.prototype.flush=function(){for(var e$4=this.bytesWritten,t$1=0;t$1=this.index;t$1--)r$3=(r$3<<8)+this.byteAt(t$1);return this.index+=e$4,r$3},readString:function(e$4){return n$2.transformTo(`string`,this.readData(e$4))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e$4=this.readInt(4);return new Date(Date.UTC(1980+(e$4>>25&127),(e$4>>21&15)-1,e$4>>16&31,e$4>>11&31,e$4>>5&63,(31&e$4)<<1))}},t.exports=i$1},{"../utils":32}],19:[function(e$3,t,r$2){"use strict";var n$2=e$3(`./Uint8ArrayReader`);function i$1(e$4){n$2.call(this,e$4)}e$3(`../utils`).inherits(i$1,n$2),i$1.prototype.readData=function(e$4){this.checkOffset(e$4);var t$1=this.data.slice(this.zero+this.index,this.zero+this.index+e$4);return this.index+=e$4,t$1},t.exports=i$1},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e$3,t,r$2){"use strict";var n$2=e$3(`./DataReader`);function i$1(e$4){n$2.call(this,e$4)}e$3(`../utils`).inherits(i$1,n$2),i$1.prototype.byteAt=function(e$4){return this.data.charCodeAt(this.zero+e$4)},i$1.prototype.lastIndexOfSignature=function(e$4){return this.data.lastIndexOf(e$4)-this.zero},i$1.prototype.readAndCheckSignature=function(e$4){return e$4===this.readData(4)},i$1.prototype.readData=function(e$4){this.checkOffset(e$4);var t$1=this.data.slice(this.zero+this.index,this.zero+this.index+e$4);return this.index+=e$4,t$1},t.exports=i$1},{"../utils":32,"./DataReader":18}],21:[function(e$3,t,r$2){"use strict";var n$2=e$3(`./ArrayReader`);function i$1(e$4){n$2.call(this,e$4)}e$3(`../utils`).inherits(i$1,n$2),i$1.prototype.readData=function(e$4){if(this.checkOffset(e$4),e$4===0)return new Uint8Array;var t$1=this.data.subarray(this.zero+this.index,this.zero+this.index+e$4);return this.index+=e$4,t$1},t.exports=i$1},{"../utils":32,"./ArrayReader":17}],22:[function(e$3,t,r$2){"use strict";var n$2=e$3(`../utils`),i$1=e$3(`../support`),s$1=e$3(`./ArrayReader`),a$2=e$3(`./StringReader`),o$1=e$3(`./NodeBufferReader`),h$3=e$3(`./Uint8ArrayReader`);t.exports=function(e$4){var t$1=n$2.getTypeOf(e$4);return n$2.checkSupport(t$1),t$1!==`string`||i$1.uint8array?t$1===`nodebuffer`?new o$1(e$4):i$1.uint8array?new h$3(n$2.transformTo(`uint8array`,e$4)):new s$1(n$2.transformTo(`array`,e$4)):new a$2(e$4)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e$3,t,r$2){"use strict";r$2.LOCAL_FILE_HEADER=`PK`,r$2.CENTRAL_FILE_HEADER=`PK`,r$2.CENTRAL_DIRECTORY_END=`PK`,r$2.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,r$2.ZIP64_CENTRAL_DIRECTORY_END=`PK`,r$2.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e$3,t,r$2){"use strict";var n$2=e$3(`./GenericWorker`),i$1=e$3(`../utils`);function s$1(e$4){n$2.call(this,`ConvertWorker to `+e$4),this.destType=e$4}i$1.inherits(s$1,n$2),s$1.prototype.processChunk=function(e$4){this.push({data:i$1.transformTo(this.destType,e$4.data),meta:e$4.meta})},t.exports=s$1},{"../utils":32,"./GenericWorker":28}],25:[function(e$3,t,r$2){"use strict";var n$2=e$3(`./GenericWorker`),i$1=e$3(`../crc32`);function s$1(){n$2.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e$3(`../utils`).inherits(s$1,n$2),s$1.prototype.processChunk=function(e$4){this.streamInfo.crc32=i$1(e$4.data,this.streamInfo.crc32||0),this.push(e$4)},t.exports=s$1},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e$3,t,r$2){"use strict";var n$2=e$3(`../utils`),i$1=e$3(`./GenericWorker`);function s$1(e$4){i$1.call(this,`DataLengthProbe for `+e$4),this.propName=e$4,this.withStreamInfo(e$4,0)}n$2.inherits(s$1,i$1),s$1.prototype.processChunk=function(e$4){if(e$4){var t$1=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t$1+e$4.data.length}i$1.prototype.processChunk.call(this,e$4)},t.exports=s$1},{"../utils":32,"./GenericWorker":28}],27:[function(e$3,t,r$2){"use strict";var n$2=e$3(`../utils`),i$1=e$3(`./GenericWorker`);function s$1(e$4){i$1.call(this,`DataWorker`);var t$1=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e$4.then(function(e$5){t$1.dataIsReady=!0,t$1.data=e$5,t$1.max=e$5&&e$5.length||0,t$1.type=n$2.getTypeOf(e$5),t$1.isPaused||t$1._tickAndRepeat()},function(e$5){t$1.error(e$5)})}n$2.inherits(s$1,i$1),s$1.prototype.cleanUp=function(){i$1.prototype.cleanUp.call(this),this.data=null},s$1.prototype.resume=function(){return!!i$1.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n$2.delay(this._tickAndRepeat,[],this)),!0)},s$1.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n$2.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s$1.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e$4=null,t$1=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e$4=this.data.substring(this.index,t$1);break;case`uint8array`:e$4=this.data.subarray(this.index,t$1);break;case`array`:case`nodebuffer`:e$4=this.data.slice(this.index,t$1)}return this.index=t$1,this.push({data:e$4,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s$1},{"../utils":32,"./GenericWorker":28}],28:[function(e$3,t,r$2){"use strict";function n$2(e$4){this.name=e$4||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n$2.prototype={push:function(e$4){this.emit(`data`,e$4)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e$4){this.emit(`error`,e$4)}return!0},error:function(e$4){return!this.isFinished&&(this.isPaused?this.generatedError=e$4:(this.isFinished=!0,this.emit(`error`,e$4),this.previous&&this.previous.error(e$4),this.cleanUp()),!0)},on:function(e$4,t$1){return this._listeners[e$4].push(t$1),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e$4,t$1){if(this._listeners[e$4])for(var r$3=0;r$3 `+e$4:e$4}},t.exports=n$2},{}],29:[function(e$3,t,r$2){"use strict";var h$3=e$3(`../utils`),i$1=e$3(`./ConvertWorker`),s$1=e$3(`./GenericWorker`),u$1=e$3(`../base64`),n$2=e$3(`../support`),a$2=e$3(`../external`),o$1=null;if(n$2.nodestream)try{o$1=e$3(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function l$1(e$4,o$2){return new a$2.Promise(function(t$1,r$3){var n$3=[],i$2=e$4._internalType,s$2=e$4._outputType,a$3=e$4._mimeType;e$4.on(`data`,function(e$5,t$2){n$3.push(e$5),o$2&&o$2(t$2)}).on(`error`,function(e$5){n$3=[],r$3(e$5)}).on(`end`,function(){try{var e$5=function(e$6,t$2,r$4){switch(e$6){case`blob`:return h$3.newBlob(h$3.transformTo(`arraybuffer`,t$2),r$4);case`base64`:return u$1.encode(t$2);default:return h$3.transformTo(e$6,t$2)}}(s$2,function(e$6,t$2){var r$4,n$4=0,i$3=null,s$3=0;for(r$4=0;r$4`u`)r$2.blob=!1;else{var n$2=new ArrayBuffer(0);try{r$2.blob=new Blob([n$2],{type:`application/zip`}).size===0}catch{try{var i$1=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i$1.append(n$2),r$2.blob=i$1.getBlob(`application/zip`).size===0}catch{r$2.blob=!1}}}try{r$2.nodestream=!!e$3(`readable-stream`).Readable}catch{r$2.nodestream=!1}},{"readable-stream":16}],31:[function(e$3,t,s$1){"use strict";for(var o$1=e$3(`./utils`),h$3=e$3(`./support`),r$2=e$3(`./nodejsUtils`),n$2=e$3(`./stream/GenericWorker`),u$1=Array(256),i$1=0;i$1<256;i$1++)u$1[i$1]=252<=i$1?6:248<=i$1?5:240<=i$1?4:224<=i$1?3:192<=i$1?2:1;u$1[254]=u$1[254]=1;function a$2(){n$2.call(this,`utf-8 decode`),this.leftOver=null}function l$1(){n$2.call(this,`utf-8 encode`)}s$1.utf8encode=function(e$4){return h$3.nodebuffer?r$2.newBufferFrom(e$4,`utf-8`):function(e$5){var t$1,r$3,n$3,i$2,s$2,a$3=e$5.length,o$2=0;for(i$2=0;i$2>>6:(r$3<65536?t$1[s$2++]=224|r$3>>>12:(t$1[s$2++]=240|r$3>>>18,t$1[s$2++]=128|r$3>>>12&63),t$1[s$2++]=128|r$3>>>6&63),t$1[s$2++]=128|63&r$3);return t$1}(e$4)},s$1.utf8decode=function(e$4){return h$3.nodebuffer?o$1.transformTo(`nodebuffer`,e$4).toString(`utf-8`):function(e$5){var t$1,r$3,n$3,i$2,s$2=e$5.length,a$3=Array(2*s$2);for(t$1=r$3=0;t$1>10&1023,a$3[r$3++]=56320|1023&n$3)}return a$3.length!==r$3&&(a$3.subarray?a$3=a$3.subarray(0,r$3):a$3.length=r$3),o$1.applyFromCharCode(a$3)}(e$4=o$1.transformTo(h$3.uint8array?`uint8array`:`array`,e$4))},o$1.inherits(a$2,n$2),a$2.prototype.processChunk=function(e$4){var t$1=o$1.transformTo(h$3.uint8array?`uint8array`:`array`,e$4.data);if(this.leftOver&&this.leftOver.length){if(h$3.uint8array){var r$3=t$1;(t$1=new Uint8Array(r$3.length+this.leftOver.length)).set(this.leftOver,0),t$1.set(r$3,this.leftOver.length)}else t$1=this.leftOver.concat(t$1);this.leftOver=null}var n$3=function(e$5,t$2){var r$4;for((t$2||=e$5.length)>e$5.length&&(t$2=e$5.length),r$4=t$2-1;0<=r$4&&(192&e$5[r$4])==128;)r$4--;return r$4<0||r$4===0?t$2:r$4+u$1[e$5[r$4]]>t$2?r$4:t$2}(t$1),i$2=t$1;n$3!==t$1.length&&(h$3.uint8array?(i$2=t$1.subarray(0,n$3),this.leftOver=t$1.subarray(n$3,t$1.length)):(i$2=t$1.slice(0,n$3),this.leftOver=t$1.slice(n$3,t$1.length))),this.push({data:s$1.utf8decode(i$2),meta:e$4.meta})},a$2.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s$1.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s$1.Utf8DecodeWorker=a$2,o$1.inherits(l$1,n$2),l$1.prototype.processChunk=function(e$4){this.push({data:s$1.utf8encode(e$4.data),meta:e$4.meta})},s$1.Utf8EncodeWorker=l$1},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e$3,t,a$2){"use strict";var o$1=e$3(`./support`),h$3=e$3(`./base64`),r$2=e$3(`./nodejsUtils`),u$1=e$3(`./external`);function n$2(e$4){return e$4}function l$1(e$4,t$1){for(var r$3=0;r$3>8;this.dir=!!(16&this.externalFileAttributes),e$4==0&&(this.dosPermissions=63&this.externalFileAttributes),e$4==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e$4=n$2(this.extraFields[1].value);this.uncompressedSize===s$1.MAX_VALUE_32BITS&&(this.uncompressedSize=e$4.readInt(8)),this.compressedSize===s$1.MAX_VALUE_32BITS&&(this.compressedSize=e$4.readInt(8)),this.localHeaderOffset===s$1.MAX_VALUE_32BITS&&(this.localHeaderOffset=e$4.readInt(8)),this.diskNumberStart===s$1.MAX_VALUE_32BITS&&(this.diskNumberStart=e$4.readInt(4))}},readExtraFields:function(e$4){var t$1,r$3,n$3,i$2=e$4.index+this.extraFieldsLength;for(this.extraFields||={};e$4.index+4>>6:(r$3<65536?t$1[s$2++]=224|r$3>>>12:(t$1[s$2++]=240|r$3>>>18,t$1[s$2++]=128|r$3>>>12&63),t$1[s$2++]=128|r$3>>>6&63),t$1[s$2++]=128|63&r$3);return t$1},r$2.buf2binstring=function(e$4){return l$1(e$4,e$4.length)},r$2.binstring2buf=function(e$4){for(var t$1=new h$3.Buf8(e$4.length),r$3=0,n$3=t$1.length;r$3>10&1023,o$1[n$3++]=56320|1023&i$2)}return l$1(o$1,n$3)},r$2.utf8border=function(e$4,t$1){var r$3;for((t$1||=e$4.length)>e$4.length&&(t$1=e$4.length),r$3=t$1-1;0<=r$3&&(192&e$4[r$3])==128;)r$3--;return r$3<0||r$3===0?t$1:r$3+u$1[e$4[r$3]]>t$1?r$3:t$1}},{"./common":41}],43:[function(e$3,t,r$2){"use strict";t.exports=function(e$4,t$1,r$3,n$2){for(var i$1=65535&e$4|0,s$1=e$4>>>16&65535|0,a$2=0;r$3!==0;){for(r$3-=a$2=2e3>>1:e$4>>>1;t$1[r$3]=e$4}return t$1}();t.exports=function(e$4,t$1,r$3,n$2){var i$1=o$1,s$1=n$2+r$3;e$4^=-1;for(var a$2=n$2;a$2>>8^i$1[255&(e$4^t$1[a$2])];return-1^e$4}},{}],46:[function(e$3,t,r$2){"use strict";var h$3,c$4=e$3(`../utils/common`),u$1=e$3(`./trees`),d$2=e$3(`./adler32`),p$5=e$3(`./crc32`),n$2=e$3(`./messages`),l$1=0,f$3=4,m$3=0,_$2=-2,g$2=-1,b$4=4,i$1=2,v$2=8,y$3=9,s$1=286,a$2=30,o$1=19,w$2=2*s$1+1,k$4=15,x$3=3,S$2=258,z$3=S$2+x$3+1,C$3=42,E$2=113,A$2=1,I=2,O$3=3,B$2=4;function R$3(e$4,t$1){return e$4.msg=n$2[t$1],t$1}function T$1(e$4){return(e$4<<1)-(4e$4.avail_out&&(r$3=e$4.avail_out),r$3!==0&&(c$4.arraySet(e$4.output,t$1.pending_buf,t$1.pending_out,r$3,e$4.next_out),e$4.next_out+=r$3,t$1.pending_out+=r$3,e$4.total_out+=r$3,e$4.avail_out-=r$3,t$1.pending-=r$3,t$1.pending===0&&(t$1.pending_out=0))}function N$2(e$4,t$1){u$1._tr_flush_block(e$4,0<=e$4.block_start?e$4.block_start:-1,e$4.strstart-e$4.block_start,t$1),e$4.block_start=e$4.strstart,F$2(e$4.strm)}function U(e$4,t$1){e$4.pending_buf[e$4.pending++]=t$1}function P$2(e$4,t$1){e$4.pending_buf[e$4.pending++]=t$1>>>8&255,e$4.pending_buf[e$4.pending++]=255&t$1}function L$1(e$4,t$1){var r$3,n$3,i$2=e$4.max_chain_length,s$2=e$4.strstart,a$3=e$4.prev_length,o$2=e$4.nice_match,h$4=e$4.strstart>e$4.w_size-z$3?e$4.strstart-(e$4.w_size-z$3):0,u$2=e$4.window,l$2=e$4.w_mask,f$4=e$4.prev,c$5=e$4.strstart+S$2,d$3=u$2[s$2+a$3-1],p$6=u$2[s$2+a$3];e$4.prev_length>=e$4.good_match&&(i$2>>=2),o$2>e$4.lookahead&&(o$2=e$4.lookahead);do if(u$2[(r$3=t$1)+a$3]===p$6&&u$2[r$3+a$3-1]===d$3&&u$2[r$3]===u$2[s$2]&&u$2[++r$3]===u$2[s$2+1]){s$2+=2,r$3++;do;while(u$2[++s$2]===u$2[++r$3]&&u$2[++s$2]===u$2[++r$3]&&u$2[++s$2]===u$2[++r$3]&&u$2[++s$2]===u$2[++r$3]&&u$2[++s$2]===u$2[++r$3]&&u$2[++s$2]===u$2[++r$3]&&u$2[++s$2]===u$2[++r$3]&&u$2[++s$2]===u$2[++r$3]&&s$2h$4&&--i$2!=0);return a$3<=e$4.lookahead?a$3:e$4.lookahead}function j$1(e$4){var t$1,r$3,n$3,i$2,s$2,a$3,o$2,h$4,u$2,l$2,f$4=e$4.w_size;do{if(i$2=e$4.window_size-e$4.lookahead-e$4.strstart,e$4.strstart>=f$4+(f$4-z$3)){for(c$4.arraySet(e$4.window,e$4.window,f$4,f$4,0),e$4.match_start-=f$4,e$4.strstart-=f$4,e$4.block_start-=f$4,t$1=r$3=e$4.hash_size;n$3=e$4.head[--t$1],e$4.head[t$1]=f$4<=n$3?n$3-f$4:0,--r$3;);for(t$1=r$3=f$4;n$3=e$4.prev[--t$1],e$4.prev[t$1]=f$4<=n$3?n$3-f$4:0,--r$3;);i$2+=f$4}if(e$4.strm.avail_in===0)break;if(a$3=e$4.strm,o$2=e$4.window,h$4=e$4.strstart+e$4.lookahead,u$2=i$2,l$2=void 0,l$2=a$3.avail_in,u$2=x$3)for(s$2=e$4.strstart-e$4.insert,e$4.ins_h=e$4.window[s$2],e$4.ins_h=(e$4.ins_h<=x$3&&(e$4.ins_h=(e$4.ins_h<=x$3)if(n$3=u$1._tr_tally(e$4,e$4.strstart-e$4.match_start,e$4.match_length-x$3),e$4.lookahead-=e$4.match_length,e$4.match_length<=e$4.max_lazy_match&&e$4.lookahead>=x$3){for(e$4.match_length--;e$4.strstart++,e$4.ins_h=(e$4.ins_h<=x$3&&(e$4.ins_h=(e$4.ins_h<=x$3&&e$4.match_length<=e$4.prev_length){for(i$2=e$4.strstart+e$4.lookahead-x$3,n$3=u$1._tr_tally(e$4,e$4.strstart-1-e$4.prev_match,e$4.prev_length-x$3),e$4.lookahead-=e$4.prev_length-1,e$4.prev_length-=2;++e$4.strstart<=i$2&&(e$4.ins_h=(e$4.ins_h<e$4.pending_buf_size-5&&(r$3=e$4.pending_buf_size-5);;){if(e$4.lookahead<=1){if(j$1(e$4),e$4.lookahead===0&&t$1===l$1)return A$2;if(e$4.lookahead===0)break}e$4.strstart+=e$4.lookahead,e$4.lookahead=0;var n$3=e$4.block_start+r$3;if((e$4.strstart===0||e$4.strstart>=n$3)&&(e$4.lookahead=e$4.strstart-n$3,e$4.strstart=n$3,N$2(e$4,!1),e$4.strm.avail_out===0)||e$4.strstart-e$4.block_start>=e$4.w_size-z$3&&(N$2(e$4,!1),e$4.strm.avail_out===0))return A$2}return e$4.insert=0,t$1===f$3?(N$2(e$4,!0),e$4.strm.avail_out===0?O$3:B$2):(e$4.strstart>e$4.block_start&&(N$2(e$4,!1),e$4.strm.avail_out),A$2)}),new M$1(4,4,8,4,Z$1),new M$1(4,5,16,8,Z$1),new M$1(4,6,32,32,Z$1),new M$1(4,4,16,16,W$2),new M$1(8,16,32,32,W$2),new M$1(8,16,128,128,W$2),new M$1(8,32,128,256,W$2),new M$1(32,128,258,1024,W$2),new M$1(32,258,258,4096,W$2)],r$2.deflateInit=function(e$4,t$1){return Y$2(e$4,t$1,v$2,15,8,0)},r$2.deflateInit2=Y$2,r$2.deflateReset=K$1,r$2.deflateResetKeep=G$2,r$2.deflateSetHeader=function(e$4,t$1){return e$4&&e$4.state&&e$4.state.wrap===2?(e$4.state.gzhead=t$1,m$3):_$2},r$2.deflate=function(e$4,t$1){var r$3,n$3,i$2,s$2;if(!e$4||!e$4.state||5>8&255),U(n$3,n$3.gzhead.time>>16&255),U(n$3,n$3.gzhead.time>>24&255),U(n$3,n$3.level===9?2:2<=n$3.strategy||n$3.level<2?4:0),U(n$3,255&n$3.gzhead.os),n$3.gzhead.extra&&n$3.gzhead.extra.length&&(U(n$3,255&n$3.gzhead.extra.length),U(n$3,n$3.gzhead.extra.length>>8&255)),n$3.gzhead.hcrc&&(e$4.adler=p$5(e$4.adler,n$3.pending_buf,n$3.pending,0)),n$3.gzindex=0,n$3.status=69):(U(n$3,0),U(n$3,0),U(n$3,0),U(n$3,0),U(n$3,0),U(n$3,n$3.level===9?2:2<=n$3.strategy||n$3.level<2?4:0),U(n$3,3),n$3.status=E$2);else{var a$3=v$2+(n$3.w_bits-8<<4)<<8;a$3|=(2<=n$3.strategy||n$3.level<2?0:n$3.level<6?1:n$3.level===6?2:3)<<6,n$3.strstart!==0&&(a$3|=32),a$3+=31-a$3%31,n$3.status=E$2,P$2(n$3,a$3),n$3.strstart!==0&&(P$2(n$3,e$4.adler>>>16),P$2(n$3,65535&e$4.adler)),e$4.adler=1}if(n$3.status===69)if(n$3.gzhead.extra){for(i$2=n$3.pending;n$3.gzindex<(65535&n$3.gzhead.extra.length)&&(n$3.pending!==n$3.pending_buf_size||(n$3.gzhead.hcrc&&n$3.pending>i$2&&(e$4.adler=p$5(e$4.adler,n$3.pending_buf,n$3.pending-i$2,i$2)),F$2(e$4),i$2=n$3.pending,n$3.pending!==n$3.pending_buf_size));)U(n$3,255&n$3.gzhead.extra[n$3.gzindex]),n$3.gzindex++;n$3.gzhead.hcrc&&n$3.pending>i$2&&(e$4.adler=p$5(e$4.adler,n$3.pending_buf,n$3.pending-i$2,i$2)),n$3.gzindex===n$3.gzhead.extra.length&&(n$3.gzindex=0,n$3.status=73)}else n$3.status=73;if(n$3.status===73)if(n$3.gzhead.name){i$2=n$3.pending;do{if(n$3.pending===n$3.pending_buf_size&&(n$3.gzhead.hcrc&&n$3.pending>i$2&&(e$4.adler=p$5(e$4.adler,n$3.pending_buf,n$3.pending-i$2,i$2)),F$2(e$4),i$2=n$3.pending,n$3.pending===n$3.pending_buf_size)){s$2=1;break}s$2=n$3.gzindexi$2&&(e$4.adler=p$5(e$4.adler,n$3.pending_buf,n$3.pending-i$2,i$2)),s$2===0&&(n$3.gzindex=0,n$3.status=91)}else n$3.status=91;if(n$3.status===91)if(n$3.gzhead.comment){i$2=n$3.pending;do{if(n$3.pending===n$3.pending_buf_size&&(n$3.gzhead.hcrc&&n$3.pending>i$2&&(e$4.adler=p$5(e$4.adler,n$3.pending_buf,n$3.pending-i$2,i$2)),F$2(e$4),i$2=n$3.pending,n$3.pending===n$3.pending_buf_size)){s$2=1;break}s$2=n$3.gzindexi$2&&(e$4.adler=p$5(e$4.adler,n$3.pending_buf,n$3.pending-i$2,i$2)),s$2===0&&(n$3.status=103)}else n$3.status=103;if(n$3.status===103&&(n$3.gzhead.hcrc?(n$3.pending+2>n$3.pending_buf_size&&F$2(e$4),n$3.pending+2<=n$3.pending_buf_size&&(U(n$3,255&e$4.adler),U(n$3,e$4.adler>>8&255),e$4.adler=0,n$3.status=E$2)):n$3.status=E$2),n$3.pending!==0){if(F$2(e$4),e$4.avail_out===0)return n$3.last_flush=-1,m$3}else if(e$4.avail_in===0&&T$1(t$1)<=T$1(r$3)&&t$1!==f$3)return R$3(e$4,-5);if(n$3.status===666&&e$4.avail_in!==0)return R$3(e$4,-5);if(e$4.avail_in!==0||n$3.lookahead!==0||t$1!==l$1&&n$3.status!==666){var o$2=n$3.strategy===2?function(e$5,t$2){for(var r$4;;){if(e$5.lookahead===0&&(j$1(e$5),e$5.lookahead===0)){if(t$2===l$1)return A$2;break}if(e$5.match_length=0,r$4=u$1._tr_tally(e$5,0,e$5.window[e$5.strstart]),e$5.lookahead--,e$5.strstart++,r$4&&(N$2(e$5,!1),e$5.strm.avail_out===0))return A$2}return e$5.insert=0,t$2===f$3?(N$2(e$5,!0),e$5.strm.avail_out===0?O$3:B$2):e$5.last_lit&&(N$2(e$5,!1),e$5.strm.avail_out===0)?A$2:I}(n$3,t$1):n$3.strategy===3?function(e$5,t$2){for(var r$4,n$4,i$3,s$3,a$4=e$5.window;;){if(e$5.lookahead<=S$2){if(j$1(e$5),e$5.lookahead<=S$2&&t$2===l$1)return A$2;if(e$5.lookahead===0)break}if(e$5.match_length=0,e$5.lookahead>=x$3&&0e$5.lookahead&&(e$5.match_length=e$5.lookahead)}if(e$5.match_length>=x$3?(r$4=u$1._tr_tally(e$5,1,e$5.match_length-x$3),e$5.lookahead-=e$5.match_length,e$5.strstart+=e$5.match_length,e$5.match_length=0):(r$4=u$1._tr_tally(e$5,0,e$5.window[e$5.strstart]),e$5.lookahead--,e$5.strstart++),r$4&&(N$2(e$5,!1),e$5.strm.avail_out===0))return A$2}return e$5.insert=0,t$2===f$3?(N$2(e$5,!0),e$5.strm.avail_out===0?O$3:B$2):e$5.last_lit&&(N$2(e$5,!1),e$5.strm.avail_out===0)?A$2:I}(n$3,t$1):h$3[n$3.level].func(n$3,t$1);if(o$2!==O$3&&o$2!==B$2||(n$3.status=666),o$2===A$2||o$2===O$3)return e$4.avail_out===0&&(n$3.last_flush=-1),m$3;if(o$2===I&&(t$1===1?u$1._tr_align(n$3):t$1!==5&&(u$1._tr_stored_block(n$3,0,0,!1),t$1===3&&(D$1(n$3.head),n$3.lookahead===0&&(n$3.strstart=0,n$3.block_start=0,n$3.insert=0))),F$2(e$4),e$4.avail_out===0))return n$3.last_flush=-1,m$3}return t$1===f$3?n$3.wrap<=0?1:(n$3.wrap===2?(U(n$3,255&e$4.adler),U(n$3,e$4.adler>>8&255),U(n$3,e$4.adler>>16&255),U(n$3,e$4.adler>>24&255),U(n$3,255&e$4.total_in),U(n$3,e$4.total_in>>8&255),U(n$3,e$4.total_in>>16&255),U(n$3,e$4.total_in>>24&255)):(P$2(n$3,e$4.adler>>>16),P$2(n$3,65535&e$4.adler)),F$2(e$4),0=r$3.w_size&&(s$2===0&&(D$1(r$3.head),r$3.strstart=0,r$3.block_start=0,r$3.insert=0),u$2=new c$4.Buf8(r$3.w_size),c$4.arraySet(u$2,t$1,l$2-r$3.w_size,r$3.w_size,0),t$1=u$2,l$2=r$3.w_size),a$3=e$4.avail_in,o$2=e$4.next_in,h$4=e$4.input,e$4.avail_in=l$2,e$4.next_in=0,e$4.input=t$1,j$1(r$3);r$3.lookahead>=x$3;){for(n$3=r$3.strstart,i$2=r$3.lookahead-(x$3-1);r$3.ins_h=(r$3.ins_h<>>=y$3=v$2>>>24,p$5-=y$3,(y$3=v$2>>>16&255)==0)C$3[s$1++]=65535&v$2;else{if(!(16&y$3)){if(!(64&y$3)){v$2=m$3[(65535&v$2)+(d$2&(1<>>=y$3,p$5-=y$3),p$5<15&&(d$2+=z$3[n$2++]<>>=y$3=v$2>>>24,p$5-=y$3,!(16&(y$3=v$2>>>16&255))){if(!(64&y$3)){v$2=_$2[(65535&v$2)+(d$2&(1<>>=y$3,p$5-=y$3,(y$3=s$1-a$2)>3,d$2&=(1<<(p$5-=w$2<<3))-1,e$4.next_in=n$2,e$4.next_out=s$1,e$4.avail_in=n$2>>24&255)+(e$4>>>8&65280)+((65280&e$4)<<8)+((255&e$4)<<24)}function s$1(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a$2(e$4){var t$1;return e$4&&e$4.state?(t$1=e$4.state,e$4.total_in=e$4.total_out=t$1.total=0,e$4.msg=``,t$1.wrap&&(e$4.adler=1&t$1.wrap),t$1.mode=P$2,t$1.last=0,t$1.havedict=0,t$1.dmax=32768,t$1.head=null,t$1.hold=0,t$1.bits=0,t$1.lencode=t$1.lendyn=new I.Buf32(n$2),t$1.distcode=t$1.distdyn=new I.Buf32(i$1),t$1.sane=1,t$1.back=-1,N$2):U}function o$1(e$4){var t$1;return e$4&&e$4.state?((t$1=e$4.state).wsize=0,t$1.whave=0,t$1.wnext=0,a$2(e$4)):U}function h$3(e$4,t$1){var r$3,n$3;return e$4&&e$4.state?(n$3=e$4.state,t$1<0?(r$3=0,t$1=-t$1):(r$3=1+(t$1>>4),t$1<48&&(t$1&=15)),t$1&&(t$1<8||15=s$2.wsize?(I.arraySet(s$2.window,t$1,r$3-s$2.wsize,s$2.wsize,0),s$2.wnext=0,s$2.whave=s$2.wsize):(n$3<(i$2=s$2.wsize-s$2.wnext)&&(i$2=n$3),I.arraySet(s$2.window,t$1,r$3-n$3,i$2,s$2.wnext),(n$3-=i$2)?(I.arraySet(s$2.window,t$1,r$3-n$3,n$3,0),s$2.wnext=n$3,s$2.whave=s$2.wsize):(s$2.wnext+=i$2,s$2.wnext===s$2.wsize&&(s$2.wnext=0),s$2.whave>>8&255,r$3.check=B$2(r$3.check,E$2,2,0),l$2=u$2=0,r$3.mode=2;break}if(r$3.flags=0,r$3.head&&(r$3.head.done=!1),!(1&r$3.wrap)||(((255&u$2)<<8)+(u$2>>8))%31){e$4.msg=`incorrect header check`,r$3.mode=30;break}if((15&u$2)!=8){e$4.msg=`unknown compression method`,r$3.mode=30;break}if(l$2-=4,k$4=8+(15&(u$2>>>=4)),r$3.wbits===0)r$3.wbits=k$4;else if(k$4>r$3.wbits){e$4.msg=`invalid window size`,r$3.mode=30;break}r$3.dmax=1<>8&1),512&r$3.flags&&(E$2[0]=255&u$2,E$2[1]=u$2>>>8&255,r$3.check=B$2(r$3.check,E$2,2,0)),l$2=u$2=0,r$3.mode=3;case 3:for(;l$2<32;){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>>8&255,E$2[2]=u$2>>>16&255,E$2[3]=u$2>>>24&255,r$3.check=B$2(r$3.check,E$2,4,0)),l$2=u$2=0,r$3.mode=4;case 4:for(;l$2<16;){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>8),512&r$3.flags&&(E$2[0]=255&u$2,E$2[1]=u$2>>>8&255,r$3.check=B$2(r$3.check,E$2,2,0)),l$2=u$2=0,r$3.mode=5;case 5:if(1024&r$3.flags){for(;l$2<16;){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>>8&255,r$3.check=B$2(r$3.check,E$2,2,0)),l$2=u$2=0}else r$3.head&&(r$3.head.extra=null);r$3.mode=6;case 6:if(1024&r$3.flags&&(o$2<(d$2=r$3.length)&&(d$2=o$2),d$2&&(r$3.head&&(k$4=r$3.head.extra_len-r$3.length,r$3.head.extra||(r$3.head.extra=Array(r$3.head.extra_len)),I.arraySet(r$3.head.extra,n$3,s$2,d$2,k$4)),512&r$3.flags&&(r$3.check=B$2(r$3.check,n$3,d$2,s$2)),o$2-=d$2,s$2+=d$2,r$3.length-=d$2),r$3.length))break e;r$3.length=0,r$3.mode=7;case 7:if(2048&r$3.flags){if(o$2===0)break e;for(d$2=0;k$4=n$3[s$2+ d$2++],r$3.head&&k$4&&r$3.length<65536&&(r$3.head.name+=String.fromCharCode(k$4)),k$4&&d$2>9&1,r$3.head.done=!0),e$4.adler=r$3.check=0,r$3.mode=12;break;case 10:for(;l$2<32;){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>>=7&l$2,l$2-=7&l$2,r$3.mode=27;break}for(;l$2<3;){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>>=1)){case 0:r$3.mode=14;break;case 1:if(j$1(r$3),r$3.mode=20,t$1!==6)break;u$2>>>=2,l$2-=2;break e;case 2:r$3.mode=17;break;case 3:e$4.msg=`invalid block type`,r$3.mode=30}u$2>>>=2,l$2-=2;break;case 14:for(u$2>>>=7&l$2,l$2-=7&l$2;l$2<32;){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>>16^65535)){e$4.msg=`invalid stored block lengths`,r$3.mode=30;break}if(r$3.length=65535&u$2,l$2=u$2=0,r$3.mode=15,t$1===6)break e;case 15:r$3.mode=16;case 16:if(d$2=r$3.length){if(o$2>>=5,l$2-=5,r$3.ndist=1+(31&u$2),u$2>>>=5,l$2-=5,r$3.ncode=4+(15&u$2),u$2>>>=4,l$2-=4,286>>=3,l$2-=3}for(;r$3.have<19;)r$3.lens[A$2[r$3.have++]]=0;if(r$3.lencode=r$3.lendyn,r$3.lenbits=7,S$2={bits:r$3.lenbits},x$3=T$1(0,r$3.lens,0,19,r$3.lencode,0,r$3.work,S$2),r$3.lenbits=S$2.bits,x$3){e$4.msg=`invalid code lengths set`,r$3.mode=30;break}r$3.have=0,r$3.mode=19;case 19:for(;r$3.have>>16&255,b$4=65535&C$3,!((_$2=C$3>>>24)<=l$2);){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>>=_$2,l$2-=_$2,r$3.lens[r$3.have++]=b$4;else{if(b$4===16){for(z$3=_$2+2;l$2>>=_$2,l$2-=_$2,r$3.have===0){e$4.msg=`invalid bit length repeat`,r$3.mode=30;break}k$4=r$3.lens[r$3.have-1],d$2=3+(3&u$2),u$2>>>=2,l$2-=2}else if(b$4===17){for(z$3=_$2+3;l$2>>=_$2)),u$2>>>=3,l$2-=3}else{for(z$3=_$2+7;l$2>>=_$2)),u$2>>>=7,l$2-=7}if(r$3.have+d$2>r$3.nlen+r$3.ndist){e$4.msg=`invalid bit length repeat`,r$3.mode=30;break}for(;d$2--;)r$3.lens[r$3.have++]=k$4}}if(r$3.mode===30)break;if(r$3.lens[256]===0){e$4.msg=`invalid code -- missing end-of-block`,r$3.mode=30;break}if(r$3.lenbits=9,S$2={bits:r$3.lenbits},x$3=T$1(D$1,r$3.lens,0,r$3.nlen,r$3.lencode,0,r$3.work,S$2),r$3.lenbits=S$2.bits,x$3){e$4.msg=`invalid literal/lengths set`,r$3.mode=30;break}if(r$3.distbits=6,r$3.distcode=r$3.distdyn,S$2={bits:r$3.distbits},x$3=T$1(F$2,r$3.lens,r$3.nlen,r$3.ndist,r$3.distcode,0,r$3.work,S$2),r$3.distbits=S$2.bits,x$3){e$4.msg=`invalid distances set`,r$3.mode=30;break}if(r$3.mode=20,t$1===6)break e;case 20:r$3.mode=21;case 21:if(6<=o$2&&258<=h$4){e$4.next_out=a$3,e$4.avail_out=h$4,e$4.next_in=s$2,e$4.avail_in=o$2,r$3.hold=u$2,r$3.bits=l$2,R$3(e$4,c$5),a$3=e$4.next_out,i$2=e$4.output,h$4=e$4.avail_out,s$2=e$4.next_in,n$3=e$4.input,o$2=e$4.avail_in,u$2=r$3.hold,l$2=r$3.bits,r$3.mode===12&&(r$3.back=-1);break}for(r$3.back=0;g$2=(C$3=r$3.lencode[u$2&(1<>>16&255,b$4=65535&C$3,!((_$2=C$3>>>24)<=l$2);){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>v$2)])>>>16&255,b$4=65535&C$3,!(v$2+(_$2=C$3>>>24)<=l$2);){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>>=v$2,l$2-=v$2,r$3.back+=v$2}if(u$2>>>=_$2,l$2-=_$2,r$3.back+=_$2,r$3.length=b$4,g$2===0){r$3.mode=26;break}if(32&g$2){r$3.back=-1,r$3.mode=12;break}if(64&g$2){e$4.msg=`invalid literal/length code`,r$3.mode=30;break}r$3.extra=15&g$2,r$3.mode=22;case 22:if(r$3.extra){for(z$3=r$3.extra;l$2>>=r$3.extra,l$2-=r$3.extra,r$3.back+=r$3.extra}r$3.was=r$3.length,r$3.mode=23;case 23:for(;g$2=(C$3=r$3.distcode[u$2&(1<>>16&255,b$4=65535&C$3,!((_$2=C$3>>>24)<=l$2);){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>v$2)])>>>16&255,b$4=65535&C$3,!(v$2+(_$2=C$3>>>24)<=l$2);){if(o$2===0)break e;o$2--,u$2+=n$3[s$2++]<>>=v$2,l$2-=v$2,r$3.back+=v$2}if(u$2>>>=_$2,l$2-=_$2,r$3.back+=_$2,64&g$2){e$4.msg=`invalid distance code`,r$3.mode=30;break}r$3.offset=b$4,r$3.extra=15&g$2,r$3.mode=24;case 24:if(r$3.extra){for(z$3=r$3.extra;l$2>>=r$3.extra,l$2-=r$3.extra,r$3.back+=r$3.extra}if(r$3.offset>r$3.dmax){e$4.msg=`invalid distance too far back`,r$3.mode=30;break}r$3.mode=25;case 25:if(h$4===0)break e;if(d$2=c$5-h$4,r$3.offset>d$2){if((d$2=r$3.offset-d$2)>r$3.whave&&r$3.sane){e$4.msg=`invalid distance too far back`,r$3.mode=30;break}p$5=d$2>r$3.wnext?(d$2-=r$3.wnext,r$3.wsize-d$2):r$3.wnext-d$2,d$2>r$3.length&&(d$2=r$3.length),m$3=r$3.window}else m$3=i$2,p$5=a$3-r$3.offset,d$2=r$3.length;for(h$4d$2?(m$3=R$3[T$1+a$2[v$2]],A$2[I+a$2[v$2]]):(m$3=96,0),h$3=1<>S$2)+(u$1-=h$3)]=p$5<<24|m$3<<16|_$2|0,u$1!==0;);for(h$3=1<>=1;if(h$3===0?E$2=0:(E$2&=h$3-1,E$2+=h$3),v$2++,--O$3[b$4]==0){if(b$4===w$2)break;b$4=t$1[r$3+a$2[v$2]]}if(k$4>>7)]}function U(e$4,t$1){e$4.pending_buf[e$4.pending++]=255&t$1,e$4.pending_buf[e$4.pending++]=t$1>>>8&255}function P$2(e$4,t$1,r$3){e$4.bi_valid>d$2-r$3?(e$4.bi_buf|=t$1<>d$2-e$4.bi_valid,e$4.bi_valid+=r$3-d$2):(e$4.bi_buf|=t$1<>>=1,r$3<<=1,0<--t$1;);return r$3>>>1}function Z$1(e$4,t$1,r$3){var n$3,i$2,s$2=Array(g$2+1),a$3=0;for(n$3=1;n$3<=g$2;n$3++)s$2[n$3]=a$3=a$3+r$3[n$3-1]<<1;for(i$2=0;i$2<=t$1;i$2++){var o$2=e$4[2*i$2+1];o$2!==0&&(e$4[2*i$2]=j$1(s$2[o$2]++,o$2))}}function W$2(e$4){var t$1;for(t$1=0;t$1>1;1<=r$3;r$3--)G$2(e$4,s$2,r$3);for(i$2=h$4;r$3=e$4.heap[1],e$4.heap[1]=e$4.heap[e$4.heap_len--],G$2(e$4,s$2,1),n$3=e$4.heap[1],e$4.heap[--e$4.heap_max]=r$3,e$4.heap[--e$4.heap_max]=n$3,s$2[2*i$2]=s$2[2*r$3]+s$2[2*n$3],e$4.depth[i$2]=(e$4.depth[r$3]>=e$4.depth[n$3]?e$4.depth[r$3]:e$4.depth[n$3])+1,s$2[2*r$3+1]=s$2[2*n$3+1]=i$2,e$4.heap[1]=i$2++,G$2(e$4,s$2,1),2<=e$4.heap_len;);e$4.heap[--e$4.heap_max]=e$4.heap[1],function(e$5,t$2){var r$4,n$4,i$3,s$3,a$4,o$3,h$5=t$2.dyn_tree,u$3=t$2.max_code,l$2=t$2.stat_desc.static_tree,f$4=t$2.stat_desc.has_stree,c$5=t$2.stat_desc.extra_bits,d$3=t$2.stat_desc.extra_base,p$6=t$2.stat_desc.max_length,m$4=0;for(s$3=0;s$3<=g$2;s$3++)e$5.bl_count[s$3]=0;for(h$5[2*e$5.heap[e$5.heap_max]+1]=0,r$4=e$5.heap_max+1;r$4<_$2;r$4++)p$6<(s$3=h$5[2*h$5[2*(n$4=e$5.heap[r$4])+1]+1]+1)&&(s$3=p$6,m$4++),h$5[2*n$4+1]=s$3,u$3>=7;n$3>>=1)if(1&r$4&&e$5.dyn_ltree[2*t$2]!==0)return o$1;if(e$5.dyn_ltree[18]!==0||e$5.dyn_ltree[20]!==0||e$5.dyn_ltree[26]!==0)return h$3;for(t$2=32;t$2>>3,(s$2=e$4.static_len+3+7>>>3)<=i$2&&(i$2=s$2)):i$2=s$2=r$3+5,r$3+4<=i$2&&t$1!==-1?J$2(e$4,t$1,r$3,n$3):e$4.strategy===4||s$2===i$2?(P$2(e$4,2+(n$3?1:0),3),K$1(e$4,z$3,C$3)):(P$2(e$4,4+(n$3?1:0),3),function(e$5,t$2,r$4,n$4){var i$3;for(P$2(e$5,t$2-257,5),P$2(e$5,r$4-1,5),P$2(e$5,n$4-4,4),i$3=0;i$3>>8&255,e$4.pending_buf[e$4.d_buf+2*e$4.last_lit+1]=255&t$1,e$4.pending_buf[e$4.l_buf+e$4.last_lit]=255&r$3,e$4.last_lit++,t$1===0?e$4.dyn_ltree[2*r$3]++:(e$4.matches++,t$1--,e$4.dyn_ltree[2*(A$2[r$3]+u$1+1)]++,e$4.dyn_dtree[2*N$2(t$1)]++),e$4.last_lit===e$4.lit_bufsize-1},r$2._tr_align=function(e$4){P$2(e$4,2,3),L$1(e$4,m$3,z$3),function(e$5){e$5.bi_valid===16?(U(e$5,e$5.bi_buf),e$5.bi_buf=0,e$5.bi_valid=0):8<=e$5.bi_valid&&(e$5.pending_buf[e$5.pending++]=255&e$5.bi_buf,e$5.bi_buf>>=8,e$5.bi_valid-=8)}(e$4)}},{"../utils/common":41}],53:[function(e$3,t,r$2){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e$3,t,r$2){(function(e$4){(function(r$3,n$2){"use strict";if(!r$3.setImmediate){var i$1,s$1,t$1,a$2,o$1=1,h$3={},u$1=!1,l$1=r$3.document,e$5=Object.getPrototypeOf&&Object.getPrototypeOf(r$3);e$5=e$5&&e$5.setTimeout?e$5:r$3,i$1={}.toString.call(r$3.process)===`[object process]`?function(e$6){process.nextTick(function(){c$4(e$6)})}:function(){if(r$3.postMessage&&!r$3.importScripts){var e$6=!0,t$2=r$3.onmessage;return r$3.onmessage=function(){e$6=!1},r$3.postMessage(``,`*`),r$3.onmessage=t$2,e$6}}()?(a$2=`setImmediate$`+Math.random()+`$`,r$3.addEventListener?r$3.addEventListener(`message`,d$2,!1):r$3.attachEvent(`onmessage`,d$2),function(e$6){r$3.postMessage(a$2+e$6,`*`)}):r$3.MessageChannel?((t$1=new MessageChannel).port1.onmessage=function(e$6){c$4(e$6.data)},function(e$6){t$1.port2.postMessage(e$6)}):l$1&&`onreadystatechange`in l$1.createElement(`script`)?(s$1=l$1.documentElement,function(e$6){var t$2=l$1.createElement(`script`);t$2.onreadystatechange=function(){c$4(e$6),t$2.onreadystatechange=null,s$1.removeChild(t$2),t$2=null},s$1.appendChild(t$2)}):function(e$6){setTimeout(c$4,0,e$6)},e$5.setImmediate=function(e$6){typeof e$6!=`function`&&(e$6=Function(``+e$6));for(var t$2=Array(arguments.length-1),r$4=0;r$4`u`?e$4===void 0?this:e$4:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}),require_localforage=__commonJSMin((exports,module)=>{ -/*! -localForage -- Offline Storage, Improved -Version 1.10.0 -https://localforage.github.io/localForage -(c) 2013-2017 Mozilla, Apache License 2.0 -*/ -(function(f$3){if(typeof exports==`object`&&module!==void 0)module.exports=f$3();else if(typeof define==`function`&&define.amd)define([],f$3);else{var g$2;g$2=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this,g$2.localforage=f$3()}})(function(){var define$1,module$1,exports$1;return function e$3(t,n$2,r$2){function s$1(o$2,u$1){if(!n$2[o$2]){if(!t[o$2]){var a$2=typeof __require==`function`&&__require;if(!u$1&&a$2)return a$2(o$2,!0);if(i$1)return i$1(o$2,!0);var f$3=Error(`Cannot find module '`+o$2+`'`);throw f$3.code=`MODULE_NOT_FOUND`,f$3}var l$1=n$2[o$2]={exports:{}};t[o$2][0].call(l$1.exports,function(e$4){var n$3=t[o$2][1][e$4];return s$1(n$3||e$4)},l$1,l$1.exports,e$3,t,n$2,r$2)}return n$2[o$2].exports}for(var i$1=typeof __require==`function`&&__require,o$1=0;o$1`u`&&_dereq_(3);var Promise$1=Promise;function executeCallback(promise,callback){callback&&promise.then(function(result){callback(null,result)},function(error){callback(error)})}function executeTwoCallbacks(promise,callback,errorCallback){typeof callback==`function`&&promise.then(callback),typeof errorCallback==`function`&&promise.catch(errorCallback)}function normalizeKey$1(key$3){return typeof key$3!=`string`&&(console.warn(key$3+` used as a key, but it is not a string.`),key$3=String(key$3)),key$3}function getCallback(){if(arguments.length&&typeof arguments[arguments.length-1]==`function`)return arguments[arguments.length-1]}var DETECT_BLOB_SUPPORT_STORE=`local-forage-detect-blob-support`,supportsBlobs=void 0,dbContexts={},toString$4=Object.prototype.toString,READ_ONLY=`readonly`,READ_WRITE=`readwrite`;function _binStringToArrayBuffer(bin){for(var length$3=bin.length,buf=new ArrayBuffer(length$3),arr=new Uint8Array(buf),i$1=0;i$1=43)}}).catch(function(){return!1})}function _checkBlobSupport(idb$1){return typeof supportsBlobs==`boolean`?Promise$1.resolve(supportsBlobs):_checkBlobSupportWithoutCaching(idb$1).then(function(value$1){return supportsBlobs=value$1,supportsBlobs})}function _deferReadiness(dbInfo){var dbContext=dbContexts[dbInfo.name],deferredOperation={};deferredOperation.promise=new Promise$1(function(resolve$1,reject){deferredOperation.resolve=resolve$1,deferredOperation.reject=reject}),dbContext.deferredOperations.push(deferredOperation),dbContext.dbReady?dbContext.dbReady=dbContext.dbReady.then(function(){return deferredOperation.promise}):dbContext.dbReady=deferredOperation.promise}function _advanceReadiness(dbInfo){var dbContext=dbContexts[dbInfo.name],deferredOperation=dbContext.deferredOperations.pop();if(deferredOperation)return deferredOperation.resolve(),deferredOperation.promise}function _rejectReadiness(dbInfo,err){var dbContext=dbContexts[dbInfo.name],deferredOperation=dbContext.deferredOperations.pop();if(deferredOperation)return deferredOperation.reject(err),deferredOperation.promise}function _getConnection(dbInfo,upgradeNeeded){return new Promise$1(function(resolve$1,reject){if(dbContexts[dbInfo.name]=dbContexts[dbInfo.name]||createDbContext(),dbInfo.db)if(upgradeNeeded)_deferReadiness(dbInfo),dbInfo.db.close();else return resolve$1(dbInfo.db);var dbArgs=[dbInfo.name];upgradeNeeded&&dbArgs.push(dbInfo.version);var openreq=idb.open.apply(idb,dbArgs);upgradeNeeded&&(openreq.onupgradeneeded=function(e$3){var db=openreq.result;try{db.createObjectStore(dbInfo.storeName),e$3.oldVersion<=1&&db.createObjectStore(DETECT_BLOB_SUPPORT_STORE)}catch(ex){if(ex.name===`ConstraintError`)console.warn(`The database "`+dbInfo.name+`" has been upgraded from version `+e$3.oldVersion+` to version `+e$3.newVersion+`, but the storage "`+dbInfo.storeName+`" already exists.`);else throw ex}}),openreq.onerror=function(e$3){e$3.preventDefault(),reject(openreq.error)},openreq.onsuccess=function(){var db=openreq.result;db.onversionchange=function(e$3){e$3.target.close()},resolve$1(db),_advanceReadiness(dbInfo)}})}function _getOriginalConnection(dbInfo){return _getConnection(dbInfo,!1)}function _getUpgradedConnection(dbInfo){return _getConnection(dbInfo,!0)}function _isUpgradeNeeded(dbInfo,defaultVersion){if(!dbInfo.db)return!0;var isNewStore=!dbInfo.db.objectStoreNames.contains(dbInfo.storeName),isDowngrade=dbInfo.versiondbInfo.db.version;if(isDowngrade&&(dbInfo.version!==defaultVersion&&console.warn(`The database "`+dbInfo.name+`" can't be downgraded from version `+dbInfo.db.version+` to version `+dbInfo.version+`.`),dbInfo.version=dbInfo.db.version),isUpgrade||isNewStore){if(isNewStore){var incVersion=dbInfo.db.version+1;incVersion>dbInfo.version&&(dbInfo.version=incVersion)}return!0}return!1}function _encodeBlob(blob){return new Promise$1(function(resolve$1,reject){var reader=new FileReader;reader.onerror=reject,reader.onloadend=function(e$3){var base64=btoa(e$3.target.result||``);resolve$1({__local_forage_encoded_blob:!0,data:base64,type:blob.type})},reader.readAsBinaryString(blob)})}function _decodeBlob(encodedBlob){var arrayBuff=_binStringToArrayBuffer(atob(encodedBlob.data));return createBlob([arrayBuff],{type:encodedBlob.type})}function _isEncodedBlob(value$1){return value$1&&value$1.__local_forage_encoded_blob}function _fullyReady(callback){var self$1=this,promise=self$1._initReady().then(function(){var dbContext=dbContexts[self$1._dbInfo.name];if(dbContext&&dbContext.dbReady)return dbContext.dbReady});return executeTwoCallbacks(promise,callback,callback),promise}function _tryReconnect(dbInfo){_deferReadiness(dbInfo);for(var dbContext=dbContexts[dbInfo.name],forages=dbContext.forages,i$1=0;i$10&&(!dbInfo.db||err.name===`InvalidStateError`||err.name===`NotFoundError`))return Promise$1.resolve().then(function(){if(!dbInfo.db||err.name===`NotFoundError`&&!dbInfo.db.objectStoreNames.contains(dbInfo.storeName)&&dbInfo.version<=dbInfo.db.version)return dbInfo.db&&(dbInfo.version=dbInfo.db.version+1),_getUpgradedConnection(dbInfo)}).then(function(){return _tryReconnect(dbInfo).then(function(){createTransaction(dbInfo,mode,callback,retries-1)})}).catch(callback);callback(err)}}function createDbContext(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function _initStorage(options$1){var self$1=this,dbInfo={db:null};if(options$1)for(var i$1 in options$1)dbInfo[i$1]=options$1[i$1];var dbContext=dbContexts[dbInfo.name];dbContext||(dbContext=createDbContext(),dbContexts[dbInfo.name]=dbContext),dbContext.forages.push(self$1),self$1._initReady||(self$1._initReady=self$1.ready,self$1.ready=_fullyReady);var initPromises=[];function ignoreErrors(){return Promise$1.resolve()}for(var j$1=0;j$1>4,bytes[p$5++]=(encoded2&15)<<4|encoded3>>2,bytes[p$5++]=(encoded3&3)<<6|encoded4&63;return buffer$1}function bufferToString(buffer$1){var bytes=new Uint8Array(buffer$1),base64String=``,i$1;for(i$1=0;i$1>2],base64String+=BASE_CHARS[(bytes[i$1]&3)<<4|bytes[i$1+1]>>4],base64String+=BASE_CHARS[(bytes[i$1+1]&15)<<2|bytes[i$1+2]>>6],base64String+=BASE_CHARS[bytes[i$1+2]&63];return bytes.length%3==2?base64String=base64String.substring(0,base64String.length-1)+`=`:bytes.length%3==1&&(base64String=base64String.substring(0,base64String.length-2)+`==`),base64String}function serialize$1(value$1,callback){var valueType=``;if(value$1&&(valueType=toString$1$1.call(value$1)),value$1&&(valueType===`[object ArrayBuffer]`||value$1.buffer&&toString$1$1.call(value$1.buffer)===`[object ArrayBuffer]`)){var buffer$1,marker=SERIALIZED_MARKER;value$1 instanceof ArrayBuffer?(buffer$1=value$1,marker+=TYPE_ARRAYBUFFER):(buffer$1=value$1.buffer,valueType===`[object Int8Array]`?marker+=TYPE_INT8ARRAY:valueType===`[object Uint8Array]`?marker+=TYPE_UINT8ARRAY:valueType===`[object Uint8ClampedArray]`?marker+=TYPE_UINT8CLAMPEDARRAY:valueType===`[object Int16Array]`?marker+=TYPE_INT16ARRAY:valueType===`[object Uint16Array]`?marker+=TYPE_UINT16ARRAY:valueType===`[object Int32Array]`?marker+=TYPE_INT32ARRAY:valueType===`[object Uint32Array]`?marker+=TYPE_UINT32ARRAY:valueType===`[object Float32Array]`?marker+=TYPE_FLOAT32ARRAY:valueType===`[object Float64Array]`?marker+=TYPE_FLOAT64ARRAY:callback(Error(`Failed to get type for BinaryArray`))),callback(marker+bufferToString(buffer$1))}else if(valueType===`[object Blob]`){var fileReader=new FileReader;fileReader.onload=function(){var str=BLOB_TYPE_PREFIX+value$1.type+`~`+bufferToString(this.result);callback(SERIALIZED_MARKER+TYPE_BLOB+str)},fileReader.readAsArrayBuffer(value$1)}else try{callback(JSON.stringify(value$1))}catch(e$3){console.error(`Couldn't convert value into a JSON string: `,value$1),callback(null,e$3)}}function deserialize$1(value$1){if(value$1.substring(0,SERIALIZED_MARKER_LENGTH)!==SERIALIZED_MARKER)return JSON.parse(value$1);var serializedString=value$1.substring(TYPE_SERIALIZED_MARKER_LENGTH),type=value$1.substring(SERIALIZED_MARKER_LENGTH,TYPE_SERIALIZED_MARKER_LENGTH),blobType;if(type===TYPE_BLOB&&BLOB_TYPE_PREFIX_REGEX.test(serializedString)){var matcher=serializedString.match(BLOB_TYPE_PREFIX_REGEX);blobType=matcher[1],serializedString=serializedString.substring(matcher[0].length)}var buffer$1=stringToBuffer(serializedString);switch(type){case TYPE_ARRAYBUFFER:return buffer$1;case TYPE_BLOB:return createBlob([buffer$1],{type:blobType});case TYPE_INT8ARRAY:return new Int8Array(buffer$1);case TYPE_UINT8ARRAY:return new Uint8Array(buffer$1);case TYPE_UINT8CLAMPEDARRAY:return new Uint8ClampedArray(buffer$1);case TYPE_INT16ARRAY:return new Int16Array(buffer$1);case TYPE_UINT16ARRAY:return new Uint16Array(buffer$1);case TYPE_INT32ARRAY:return new Int32Array(buffer$1);case TYPE_UINT32ARRAY:return new Uint32Array(buffer$1);case TYPE_FLOAT32ARRAY:return new Float32Array(buffer$1);case TYPE_FLOAT64ARRAY:return new Float64Array(buffer$1);default:throw Error(`Unkown type: `+type)}}var localforageSerializer={serialize:serialize$1,deserialize:deserialize$1,stringToBuffer,bufferToString};function createDbTable(t,dbInfo,callback,errorCallback){t.executeSql(`CREATE TABLE IF NOT EXISTS `+dbInfo.storeName+` (id INTEGER PRIMARY KEY, key unique, value)`,[],callback,errorCallback)}function _initStorage$1(options$1){var self$1=this,dbInfo={db:null};if(options$1)for(var i$1 in options$1)dbInfo[i$1]=typeof options$1[i$1]==`string`?options$1[i$1]:options$1[i$1].toString();var dbInfoPromise=new Promise$1(function(resolve$1,reject){try{dbInfo.db=openDatabase(dbInfo.name,String(dbInfo.version),dbInfo.description,dbInfo.size)}catch(e$3){return reject(e$3)}dbInfo.db.transaction(function(t){createDbTable(t,dbInfo,function(){self$1._dbInfo=dbInfo,resolve$1()},function(t$1,error){reject(error)})},reject)});return dbInfo.serializer=localforageSerializer,dbInfoPromise}function tryExecuteSql(t,dbInfo,sqlStatement,args,callback,errorCallback){t.executeSql(sqlStatement,args,callback,function(t$1,error){error.code===error.SYNTAX_ERR?t$1.executeSql(`SELECT name FROM sqlite_master WHERE type='table' AND name = ?`,[dbInfo.storeName],function(t$2,results){results.rows.length?errorCallback(t$2,error):createDbTable(t$2,dbInfo,function(){t$2.executeSql(sqlStatement,args,callback,errorCallback)},errorCallback)},errorCallback):errorCallback(t$1,error)},errorCallback)}function getItem$1(key$3,callback){var self$1=this;key$3=normalizeKey$1(key$3);var promise=new Promise$1(function(resolve$1,reject){self$1.ready().then(function(){var dbInfo=self$1._dbInfo;dbInfo.db.transaction(function(t){tryExecuteSql(t,dbInfo,`SELECT * FROM `+dbInfo.storeName+` WHERE key = ? LIMIT 1`,[key$3],function(t$1,results){var result=results.rows.length?results.rows.item(0).value:null;result&&=dbInfo.serializer.deserialize(result),resolve$1(result)},function(t$1,error){reject(error)})})}).catch(reject)});return executeCallback(promise,callback),promise}function iterate$1(iterator$1,callback){var self$1=this,promise=new Promise$1(function(resolve$1,reject){self$1.ready().then(function(){var dbInfo=self$1._dbInfo;dbInfo.db.transaction(function(t){tryExecuteSql(t,dbInfo,`SELECT * FROM `+dbInfo.storeName,[],function(t$1,results){for(var rows=results.rows,length$3=rows.length,i$1=0;i$10){resolve$1(_setItem.apply(self$1,[key$3,originalValue,callback,retriesLeft-1]));return}reject(sqlError)}})})}).catch(reject)});return executeCallback(promise,callback),promise}function setItem$1(key$3,value$1,callback){return _setItem.apply(this,[key$3,value$1,callback,1])}function removeItem$1(key$3,callback){var self$1=this;key$3=normalizeKey$1(key$3);var promise=new Promise$1(function(resolve$1,reject){self$1.ready().then(function(){var dbInfo=self$1._dbInfo;dbInfo.db.transaction(function(t){tryExecuteSql(t,dbInfo,`DELETE FROM `+dbInfo.storeName+` WHERE key = ?`,[key$3],function(){resolve$1()},function(t$1,error){reject(error)})})}).catch(reject)});return executeCallback(promise,callback),promise}function clear$1(callback){var self$1=this,promise=new Promise$1(function(resolve$1,reject){self$1.ready().then(function(){var dbInfo=self$1._dbInfo;dbInfo.db.transaction(function(t){tryExecuteSql(t,dbInfo,`DELETE FROM `+dbInfo.storeName,[],function(){resolve$1()},function(t$1,error){reject(error)})})}).catch(reject)});return executeCallback(promise,callback),promise}function length$1(callback){var self$1=this,promise=new Promise$1(function(resolve$1,reject){self$1.ready().then(function(){var dbInfo=self$1._dbInfo;dbInfo.db.transaction(function(t){tryExecuteSql(t,dbInfo,`SELECT COUNT(key) as c FROM `+dbInfo.storeName,[],function(t$1,results){var result=results.rows.item(0).c;resolve$1(result)},function(t$1,error){reject(error)})})}).catch(reject)});return executeCallback(promise,callback),promise}function key$1$1(n$2,callback){var self$1=this,promise=new Promise$1(function(resolve$1,reject){self$1.ready().then(function(){var dbInfo=self$1._dbInfo;dbInfo.db.transaction(function(t){tryExecuteSql(t,dbInfo,`SELECT key FROM `+dbInfo.storeName+` WHERE id = ? LIMIT 1`,[n$2+1],function(t$1,results){var result=results.rows.length?results.rows.item(0).key:null;resolve$1(result)},function(t$1,error){reject(error)})})}).catch(reject)});return executeCallback(promise,callback),promise}function keys$1$1(callback){var self$1=this,promise=new Promise$1(function(resolve$1,reject){self$1.ready().then(function(){var dbInfo=self$1._dbInfo;dbInfo.db.transaction(function(t){tryExecuteSql(t,dbInfo,`SELECT key FROM `+dbInfo.storeName,[],function(t$1,results){for(var keys$4=[],i$1=0;i$1 '__WebKitDatabaseInfoTable__'`,[],function(t$1,results){for(var storeNames=[],i$1=0;i$10}function _initStorage$2(options$1){var self$1=this,dbInfo={};if(options$1)for(var i$1 in options$1)dbInfo[i$1]=options$1[i$1];return dbInfo.keyPrefix=_getKeyPrefix(options$1,self$1._defaultConfig),_isLocalStorageUsable()?(self$1._dbInfo=dbInfo,dbInfo.serializer=localforageSerializer,Promise$1.resolve()):Promise$1.reject()}function clear$2(callback){var self$1=this,promise=self$1.ready().then(function(){for(var keyPrefix=self$1._dbInfo.keyPrefix,i$1=localStorage.length-1;i$1>=0;i$1--){var key$3=localStorage.key(i$1);key$3.indexOf(keyPrefix)===0&&localStorage.removeItem(key$3)}});return executeCallback(promise,callback),promise}function getItem$2(key$3,callback){var self$1=this;key$3=normalizeKey$1(key$3);var promise=self$1.ready().then(function(){var dbInfo=self$1._dbInfo,result=localStorage.getItem(dbInfo.keyPrefix+key$3);return result&&=dbInfo.serializer.deserialize(result),result});return executeCallback(promise,callback),promise}function iterate$2(iterator$1,callback){var self$1=this,promise=self$1.ready().then(function(){for(var dbInfo=self$1._dbInfo,keyPrefix=dbInfo.keyPrefix,keyPrefixLength=keyPrefix.length,length$3=localStorage.length,iterationNumber=1,i$1=0;i$1=0;i$1--){var key$3=localStorage.key(i$1);key$3.indexOf(keyPrefix)===0&&localStorage.removeItem(key$3)}}):Promise$1.reject(`Invalid arguments`),executeCallback(promise,callback),promise}var localStorageWrapper={_driver:`localStorageWrapper`,_initStorage:_initStorage$2,_support:isLocalStorageValid(),iterate:iterate$2,getItem:getItem$2,setItem:setItem$2,removeItem:removeItem$2,clear:clear$2,length:length$2,key:key$2,keys:keys$2$1,dropInstance:dropInstance$2},sameValue=function(x$3,y$3){return x$3===y$3||typeof x$3==`number`&&typeof y$3==`number`&&isNaN(x$3)&&isNaN(y$3)},includes=function(array,searchElement){for(var len=array.length,i$1=0;i$10}function W(t,n$2){return t.compare(n$2)<=0}function G(t,n$2){return t.compare(n$2)>=0}function V(t,n$2,e$3){return G(t,n$2)&&W(t,e$3)}function v(t,n$2,e$3){return P(t,n$2)&&q(t,e$3)}function H(t,n$2,e$3){let r$2=$14e0f24ef4ac5c92$export$2061056d06d7cdf7(t,e$3);return n$2>r$2?t.subtract({days:r$2+7-n$2}):n$2===r$2?t:t.subtract({days:r$2-n$2})}function J(t,n$2,e$3){let r$2=$14e0f24ef4ac5c92$export$2061056d06d7cdf7(t,e$3),a$2=n$2===0?6:n$2-1;return r$2===a$2?t:r$2>a$2?t.add({days:7-r$2+a$2}):t.add({days:a$2-r$2})}function b(t,n$2,e$3,r$2){if(e$3===void 0&&r$2===void 0)return!0;let a$2=t.add({days:1});if(r$2!=null&&r$2(a$2)||e$3!=null&&e$3(a$2))return!1;let s$1=n$2;for(;a$2.compare(s$1)<0;)if(a$2=a$2.add({days:1}),r$2!=null&&r$2(a$2)||e$3!=null&&e$3(a$2))return!1;return!0}function A(t,n$2){let e$3=[],r$2=t.add({days:1}),a$2=n$2;for(;r$2.compare(a$2)<0;)e$3.push(r$2),r$2=r$2.add({days:1});return e$3}function y(t){let{dateObj:n$2,weekStartsOn:e$3,fixedWeeks:r$2,locale:a$2}=t,s$1=R(n$2),o$1=Array.from({length:s$1},(D$1,u$1)=>n$2.set({day:u$1+1})),f$3=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(n$2),i$1=$14e0f24ef4ac5c92$export$a2258d9c4118825c(n$2),x$3=H(f$3,e$3,a$2),T$1=J(i$1,e$3,a$2),l$1=A(x$3.subtract({days:1}),f$3),c$4=A(i$1,T$1.add({days:1})),g$2=l$1.length+o$1.length+c$4.length;if(r$2&&g$2<42){let D$1=42-g$2,u$1=c$4[c$4.length-1];u$1||=$14e0f24ef4ac5c92$export$a2258d9c4118825c(n$2);let k$4=Array.from({length:D$1},(K$1,C$3)=>{let I=C$3+1;return u$1.add({days:I})});c$4.push(...k$4)}let p$5=l$1.concat(o$1,c$4),B$2=N(p$5,7);return{value:n$2,cells:p$5,rows:B$2}}function rt$1(t){let{numberOfMonths:n$2,dateObj:e$3,...r$2}=t,a$2=[];if(!n$2||n$2===1)return a$2.push(y({...r$2,dateObj:e$3})),a$2;a$2.push(y({...r$2,dateObj:e$3}));for(let s$1=1;s$1{let i$1=inject(n$2,r$2);if(i$1||i$1===null)return i$1;throw Error(`Injection \`${n$2.toString()}\` not found. Component must be used within ${Array.isArray(a$2)?`one of the following components: ${a$2.join(`, `)}`:`\`${a$2}\``}`)},r$2=>(provide(n$2,r$2),r$2)]}function jt(a$2,t,e$3){let n$2=e$3.originalEvent.target,l$1=new CustomEvent(a$2,{bubbles:!1,cancelable:!0,detail:e$3});t&&n$2.addEventListener(a$2,t,{once:!0}),n$2.dispatchEvent(l$1)}function Ut(a$2,t=-1/0,e$3=1/0){return Math.min(e$3,Math.max(t,a$2))}function Da(a$2,t){let e$3=a$2,n$2=t.toString(),l$1=n$2.indexOf(`.`),s$1=l$1>=0?n$2.length-l$1:0;if(s$1>0){let r$2=10**s$1;e$3=Math.round(e$3*r$2)/r$2}return e$3}function Wr(a$2,t,e$3,n$2){t=Number(t),e$3=Number(e$3);let l$1=(a$2-(Number.isNaN(t)?0:t))%n$2,s$1=Da(Math.abs(l$1)*2>=n$2?a$2+Math.sign(l$1)*(n$2-Math.abs(l$1)):a$2-l$1,n$2);return Number.isNaN(t)?!Number.isNaN(e$3)&&s$1>e$3&&(s$1=Math.floor(Da(e$3/n$2,n$2))*n$2):s$1e$3&&(s$1=t+Math.floor(Da((e$3-t)/n$2,n$2))*n$2),s$1=Da(s$1,n$2),s$1}function jr(a$2){return a$2&&a$2.__esModule&&Object.prototype.hasOwnProperty.call(a$2,`default`)?a$2.default:a$2}var Ur=function a$2(t,e$3){if(t===e$3)return!0;if(t&&e$3&&typeof t==`object`&&typeof e$3==`object`){if(t.constructor!==e$3.constructor)return!1;var n$2,l$1,s$1;if(Array.isArray(t)){if(n$2=t.length,n$2!=e$3.length)return!1;for(l$1=n$2;l$1--!==0;)if(!a$2(t[l$1],e$3[l$1]))return!1;return!0}if(t.constructor===RegExp)return t.source===e$3.source&&t.flags===e$3.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e$3.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e$3.toString();if(s$1=Object.keys(t),n$2=s$1.length,n$2!==Object.keys(e$3).length)return!1;for(l$1=n$2;l$1--!==0;)if(!Object.prototype.hasOwnProperty.call(e$3,s$1[l$1]))return!1;for(l$1=n$2;l$1--!==0;){var r$2=s$1[l$1];if(!a$2(t[r$2],e$3[r$2]))return!1}return!0}return t!==t&&e$3!==e$3};const Qe=jr(Ur);function Gr(a$2,t){if(a$2.length!==t.length)return!1;for(let e$3=0;e$3Qe(i$1,t)),l$1=a$2.findIndex(i$1=>Qe(i$1,e$3));if(n$2===-1||l$1===-1)return[];let[s$1,r$2]=[n$2,l$1].sort((i$1,u$1)=>i$1-u$1);return a$2.slice(s$1,r$2+1)}const ha=typeof document<`u`;function ht$1(a$2){return a$2==null}function Yt(a$2){let{defaultValue:t,defaultPlaceholder:e$3,granularity:n$2=`day`,locale:l$1=`en`}=a$2;if(Array.isArray(t)&&t.length)return t.at(-1).copy();if(t&&!Array.isArray(t))return t.copy();if(e$3)return e$3.copy();let s$1=new Date,r$2=s$1.getFullYear(),i$1=s$1.getMonth()+1,u$1=s$1.getDate(),d$2=[`hour`,`minute`,`second`],c$4=new $fb18d541ea1ad717$export$ad991b66133851cf(l$1),f$3=$64244302c3013299$export$dd0bbc9b26defe37(c$4.resolvedOptions().calendar);return d$2.includes(n$2??`day`)?$11d87f3f76e88657$export$b4a036af3fc0b032(new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(r$2,i$1,u$1,0,0,0),f$3):$11d87f3f76e88657$export$b4a036af3fc0b032(new $35ea8db9cb2ccb90$export$99faa760c7908e4f(r$2,i$1,u$1),f$3)}const qr=`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(`.`),Yr=[`year`,`month`,`day`],gn={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 Xr(a$2){if(Wo(a$2))return gn[a$2];{let t=ei(a$2);return Wo(t)?gn[t]:gn.en}}function bn(a$2,t,e$3){return Zr(a$2)?Xr(e$3)[a$2]:Qr(a$2)?t:Jr(a$2)?`––`:``}function Wo(a$2){return qr.includes(a$2)}function Zr(a$2){return Yr.includes(a$2)}function Jr(a$2){return a$2===`hour`||a$2===`minute`||a$2===`second`}function Qr(a$2){return a$2===`era`||a$2===`dayPeriod`}function ei(a$2){return Intl.Locale?new Intl.Locale(a$2).language:a$2.split(`-`)[0]}const Wn=[`day`,`month`,`year`],xl=[`hour`,`minute`,`second`,`dayPeriod`],Sl=[...Wn,...xl];function ti(a$2){return Wn.includes(a$2)}function El(a$2){return Sl.includes(a$2)}function ai(a$2,t){let e$3={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 a$2===`day`&&(delete e$3.second,delete e$3.hour,delete e$3.minute,delete e$3.timeZoneName),a$2===`hour`&&(delete e$3.minute,delete e$3.second),a$2===`minute`&&delete e$3.second,e$3}function Pl(a$2){let t=a$2.querySelector(`[data-selected]`);if(t)return t.focus();let e$3=a$2.querySelector(`[data-today]`);if(e$3)return e$3.focus();let n$2=a$2.querySelector(`[data-radix-vue-calendar-day]`);if(n$2)return n$2.focus()}function ni(a$2,t){var e$3;let n$2=shallowRef();return watchEffect(()=>{n$2.value=a$2()},{...t,flush:(e$3=void 0,`sync`)}),readonly(n$2)}function oi(a$2,t){let e$3,n$2,l$1,s$1=ref(!0),r$2=()=>{s$1.value=!0,l$1()};watch(a$2,r$2,{flush:`sync`});let i$1=typeof t==`function`?t:t.get,u$1=typeof t==`function`?void 0:t.set,d$2=customRef((c$4,f$3)=>(n$2=c$4,l$1=f$3,{get(){return s$1.value&&(e$3=i$1(),s$1.value=!1),n$2(),e$3},set(v$2){u$1?.(v$2)}}));return Object.isExtensible(d$2)&&(d$2.trigger=r$2),d$2}function bt$1(a$2){return getCurrentScope()?(onScopeDispose(a$2),!0):!1}function ua(){let a$2=new Set,t=l$1=>{a$2.delete(l$1)};return{on:l$1=>{a$2.add(l$1);let s$1=()=>t(l$1);return bt$1(s$1),{off:s$1}},off:t,trigger:(...l$1)=>Promise.all(Array.from(a$2).map(s$1=>s$1(...l$1)))}}function li(a$2){let t=!1,e$3,n$2=effectScope(!0);return(...l$1)=>(t||(e$3=n$2.run(()=>a$2(...l$1)),t=!0),e$3)}function Dl(a$2){let t=0,e$3,n$2,l$1=()=>{--t,n$2&&t<=0&&(n$2.stop(),e$3=void 0,n$2=void 0)};return(...s$1)=>(t+=1,e$3||(n$2=effectScope(!0),e$3=n$2.run(()=>a$2(...s$1))),bt$1(l$1),e$3)}function je(a$2){return typeof a$2==`function`?a$2():unref(a$2)}function si(a$2){if(!isRef(a$2))return reactive(a$2);let t=new Proxy({},{get(e$3,n$2,l$1){return unref(Reflect.get(a$2.value,n$2,l$1))},set(e$3,n$2,l$1){return isRef(a$2.value[n$2])&&!isRef(l$1)?a$2.value[n$2].value=l$1:a$2.value[n$2]=l$1,!0},deleteProperty(e$3,n$2){return Reflect.deleteProperty(a$2.value,n$2)},has(e$3,n$2){return Reflect.has(a$2.value,n$2)},ownKeys(){return Object.keys(a$2.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return reactive(t)}function $l(a$2){return si(computed(a$2))}const Je=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const ri=a$2=>typeof a$2<`u`,ii=a$2=>a$2!=null,ui=Object.prototype.toString,di=a$2=>ui.call(a$2)===`[object Object]`,Na=()=>{},jo=ci();function ci(){var a$2,t;return Je&&(a$2=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 Bl(a$2,t){function e$3(...n$2){return new Promise((l$1,s$1)=>{Promise.resolve(a$2(()=>t.apply(this,n$2),{fn:t,thisArg:this,args:n$2})).then(l$1).catch(s$1)})}return e$3}function fi(a$2,t={}){let e$3,n$2,l$1=Na,s$1=i$1=>{clearTimeout(i$1),l$1(),l$1=Na};return i$1=>{let u$1=je(a$2),d$2=je(t.maxWait);return e$3&&s$1(e$3),u$1<=0||d$2!==void 0&&d$2<=0?(n$2&&(s$1(n$2),n$2=null),Promise.resolve(i$1())):new Promise((c$4,f$3)=>{l$1=t.rejectOnCancel?f$3:c$4,d$2&&!n$2&&(n$2=setTimeout(()=>{e$3&&s$1(e$3),n$2=null,c$4(i$1())},d$2)),e$3=setTimeout(()=>{n$2&&s$1(n$2),n$2=null,c$4(i$1())},u$1)})}}function Tl(a$2){return getCurrentInstance()}function Tt$1(a$2,t=1e4){return customRef((e$3,n$2)=>{let l$1=je(a$2),s$1,r$2=()=>setTimeout(()=>{l$1=je(a$2),n$2()},je(t));return bt$1(()=>{clearTimeout(s$1)}),{get(){return e$3(),l$1},set(i$1){l$1=i$1,n$2(),clearTimeout(s$1),s$1=r$2()}}})}function jn(a$2,t=200,e$3={}){return Bl(fi(t,e$3),a$2)}function hi(a$2,t){Tl()&&onBeforeUnmount(a$2,t)}function yi(a$2,t=!0,e$3){Tl()?onMounted(a$2,e$3):t?a$2():nextTick(a$2)}function Un(a$2,t,e$3={}){let{immediate:n$2=!0}=e$3,l$1=ref(!1),s$1=null;function r$2(){s$1&&(clearTimeout(s$1),s$1=null)}function i$1(){l$1.value=!1,r$2()}function u$1(...d$2){r$2(),l$1.value=!0,s$1=setTimeout(()=>{l$1.value=!1,s$1=null,a$2(...d$2)},je(t))}return n$2&&(l$1.value=!0,Je&&u$1()),bt$1(i$1),{isPending:readonly(l$1),start:u$1,stop:i$1}}function gi(a$2=1e3,t={}){let{controls:e$3=!1,callback:n$2}=t,l$1=Un(n$2??Na,a$2,t),s$1=computed(()=>!l$1.isPending.value);return e$3?{ready:s$1,...l$1}:s$1}function bi(a$2,t,e$3){let n$2=watch(a$2,(...l$1)=>(nextTick(()=>n$2()),t(...l$1)),e$3);return n$2}function $e$1(a$2){var t;let e$3=je(a$2);return(t=e$3?.$el)??e$3}const Rt=Je?window:void 0;function He(...a$2){let t,e$3,n$2,l$1;if(typeof a$2[0]==`string`||Array.isArray(a$2[0])?([e$3,n$2,l$1]=a$2,t=Rt):[t,e$3,n$2,l$1]=a$2,!t)return Na;Array.isArray(e$3)||(e$3=[e$3]),Array.isArray(n$2)||(n$2=[n$2]);let s$1=[],r$2=()=>{s$1.forEach(c$4=>c$4()),s$1.length=0},i$1=(c$4,f$3,v$2,p$5)=>(c$4.addEventListener(f$3,v$2,p$5),()=>c$4.removeEventListener(f$3,v$2,p$5)),u$1=watch(()=>[$e$1(t),je(l$1)],([c$4,f$3])=>{if(r$2(),!c$4)return;let v$2=di(f$3)?{...f$3}:f$3;s$1.push(...e$3.flatMap(p$5=>n$2.map(g$2=>i$1(c$4,p$5,g$2,v$2))))},{immediate:!0,flush:`post`}),d$2=()=>{u$1(),r$2()};return bt$1(d$2),d$2}function Ci(a$2){return typeof a$2==`function`?a$2:typeof a$2==`string`?t=>t.key===a$2:Array.isArray(a$2)?t=>a$2.includes(t.key):()=>!0}function Gn(...a$2){let t,e$3,n$2={};a$2.length===3?(t=a$2[0],e$3=a$2[1],n$2=a$2[2]):a$2.length===2?typeof a$2[1]==`object`?(t=!0,e$3=a$2[0],n$2=a$2[1]):(t=a$2[0],e$3=a$2[1]):(t=!0,e$3=a$2[0]);let{target:l$1=Rt,eventName:s$1=`keydown`,passive:r$2=!1,dedupe:i$1=!1}=n$2,u$1=Ci(t);return He(l$1,s$1,c$4=>{c$4.repeat&&je(i$1)||u$1(c$4)&&e$3(c$4)},r$2)}function Ga(){let a$2=ref(!1),t=getCurrentInstance();return t&&onMounted(()=>{a$2.value=!0},t),a$2}function Rl(a$2){let t=Ga();return computed(()=>(t.value,!!a$2()))}function Al(a$2,t,e$3={}){let{window:n$2=Rt,...l$1}=e$3,s$1,r$2=Rl(()=>n$2&&`MutationObserver`in n$2),i$1=()=>{s$1&&(s$1.disconnect(),s$1=void 0)},u$1=computed(()=>{let v$2=je(a$2),p$5=(Array.isArray(v$2)?v$2:[v$2]).map($e$1).filter(ii);return new Set(p$5)}),d$2=watch(()=>u$1.value,v$2=>{i$1(),r$2.value&&v$2.size&&(s$1=new MutationObserver(t),v$2.forEach(p$5=>s$1.observe(p$5,l$1)))},{immediate:!0,flush:`post`}),c$4=()=>s$1?.takeRecords(),f$3=()=>{i$1(),d$2()};return bt$1(f$3),{isSupported:r$2,stop:f$3,takeRecords:c$4}}function wi(a$2={}){var t;let{window:e$3=Rt,deep:n$2=!0,triggerOnRemoval:l$1=!1}=a$2,s$1=(t=a$2.document)??e$3?.document,r$2=()=>{var d$2;let c$4=s$1?.activeElement;if(n$2)for(;c$4!=null&&c$4.shadowRoot;)c$4=(d$2=c$4?.shadowRoot)?.activeElement;return c$4},i$1=ref(),u$1=()=>{i$1.value=r$2()};return e$3&&(He(e$3,`blur`,d$2=>{d$2.relatedTarget===null&&u$1()},!0),He(e$3,`focus`,u$1,!0)),l$1&&Al(s$1,d$2=>{d$2.filter(c$4=>c$4.removedNodes.length).map(c$4=>Array.from(c$4.removedNodes)).flat().forEach(c$4=>{c$4===i$1.value&&u$1()})},{childList:!0,subtree:!0}),u$1(),i$1}function Ol(a$2,t={}){let{immediate:e$3=!0,fpsLimit:n$2=void 0,window:l$1=Rt}=t,s$1=ref(!1),r$2=n$2?1e3/n$2:null,i$1=0,u$1=null;function d$2(v$2){if(!s$1.value||!l$1)return;i$1||=v$2;let p$5=v$2-i$1;if(r$2&&p$5null,()=>t.proxy.$el);return onUpdated(e$3.trigger),onMounted(e$3.trigger),e$3}function tt(a$2,t,e$3={}){let{window:n$2=Rt,...l$1}=e$3,s$1,r$2=Rl(()=>n$2&&`ResizeObserver`in n$2),i$1=()=>{s$1&&(s$1.disconnect(),s$1=void 0)},u$1=computed(()=>Array.isArray(a$2)?a$2.map(f$3=>$e$1(f$3)):[$e$1(a$2)]),d$2=watch(u$1,f$3=>{if(i$1(),r$2.value&&n$2){s$1=new ResizeObserver(t);for(let v$2 of f$3)v$2&&s$1.observe(v$2,l$1)}},{immediate:!0,flush:`post`}),c$4=()=>{i$1(),d$2()};return bt$1(c$4),{isSupported:r$2,stop:c$4}}function Si(a$2,t={}){let e$3=wi(t),n$2=computed(()=>$e$1(a$2));return{focused:computed(()=>n$2.value&&e$3.value?n$2.value.contains(e$3.value):!1)}}function kl(a$2=xi()){let t=shallowRef(),e$3=()=>{let n$2=$e$1(a$2);n$2&&(t.value=n$2.parentElement)};return yi(e$3),watch(()=>je(a$2),e$3),t}function ne(a$2,t,e$3,n$2={}){var l$1,s$1,r$2;let{clone:i$1=!1,passive:u$1=!1,eventName:d$2,deep:c$4=!1,defaultValue:f$3,shouldEmit:v$2}=n$2,p$5=getCurrentInstance(),g$2=e$3||p$5?.emit||(l$1=p$5?.$emit)?.bind(p$5)||(r$2=(s$1=p$5?.proxy)?.$emit)?.bind(p$5?.proxy),m$3=d$2;t||=`modelValue`,m$3||=`update:${t.toString()}`;let _$2=h$3=>i$1?typeof i$1==`function`?i$1(h$3):_i(h$3):h$3,C$3=()=>ri(a$2[t])?_$2(a$2[t]):f$3,$$2=h$3=>{v$2?v$2(h$3)&&g$2(m$3,h$3):g$2(m$3,h$3)};if(u$1){let h$3=C$3(),E$2=ref(h$3),P$2=!1;return watch(()=>a$2[t],D$1=>{P$2||(P$2=!0,E$2.value=_$2(D$1),nextTick(()=>P$2=!1))}),watch(E$2,D$1=>{!P$2&&(D$1!==a$2[t]||c$4)&&$$2(D$1)},{deep:c$4}),E$2}else return computed({get(){return C$3()},set(h$3){$$2(h$3)}})}function qa(a$2){return a$2?a$2.flatMap(t=>t.type===Fragment?qa(t.children):[t]):[]}function me(){let a$2=document.activeElement;if(a$2==null)return null;for(;a$2!=null&&a$2.shadowRoot!=null&&a$2.shadowRoot.activeElement!=null;)a$2=a$2.shadowRoot.activeElement;return a$2}const Ei=[`INPUT`,`TEXTAREA`];function At(a$2,t,e$3,n$2={}){if(!t||n$2.enableIgnoredElement&&Ei.includes(t.nodeName))return null;let{arrowKeyOptions:l$1=`both`,attributeName:s$1=`[data-radix-vue-collection-item]`,itemsArray:r$2=[],loop:i$1=!0,dir:u$1=`ltr`,preventScroll:d$2=!0,focus:c$4=!1}=n$2,[f$3,v$2,p$5,g$2,m$3,_$2]=[a$2.key===`ArrowRight`,a$2.key===`ArrowLeft`,a$2.key===`ArrowUp`,a$2.key===`ArrowDown`,a$2.key===`Home`,a$2.key===`End`],C$3=p$5||g$2,$$2=f$3||v$2;if(!m$3&&!_$2&&(!C$3&&!$$2||l$1===`vertical`&&$$2||l$1===`horizontal`&&C$3))return null;let h$3=e$3?Array.from(e$3.querySelectorAll(s$1)):r$2;if(!h$3.length)return null;d$2&&a$2.preventDefault();let E$2=null;return $$2||C$3?E$2=Ml(h$3,t,{goForward:C$3?g$2:u$1===`ltr`?f$3:v$2,loop:i$1}):m$3?E$2=h$3.at(0)||null:_$2&&(E$2=h$3.at(-1)||null),c$4&&E$2?.focus(),E$2}function Ml(a$2,t,e$3,n$2=a$2.length){if(--n$2===0)return null;let l$1=a$2.indexOf(t),s$1=e$3.goForward?l$1+1:l$1-1;if(!e$3.loop&&(s$1<0||s$1>=a$2.length))return null;let r$2=(s$1+a$2.length)%a$2.length,i$1=a$2[r$2];return i$1?i$1.hasAttribute(`disabled`)&&i$1.getAttribute(`disabled`)!==`false`?Ml(a$2,i$1,e$3,n$2):i$1:null}function Cn(a$2){if(typeof a$2!=`object`||!a$2)return!1;let t=Object.getPrototypeOf(a$2);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in a$2?!1:Symbol.toStringTag in a$2?Object.prototype.toString.call(a$2)===`[object Module]`:!0}function $n(a$2,t,e$3=`.`,n$2){if(!Cn(t))return $n(a$2,{},e$3,n$2);let l$1=Object.assign({},t);for(let s$1 in a$2){if(s$1===`__proto__`||s$1===`constructor`)continue;let r$2=a$2[s$1];r$2!=null&&(n$2&&n$2(l$1,s$1,r$2,e$3)||(Array.isArray(r$2)&&Array.isArray(l$1[s$1])?l$1[s$1]=[...r$2,...l$1[s$1]]:Cn(r$2)&&Cn(l$1[s$1])?l$1[s$1]=$n(r$2,l$1[s$1],(e$3?`${e$3}.`:``)+s$1.toString(),n$2):l$1[s$1]=r$2))}return l$1}function Pi(a$2){return(...t)=>t.reduce((e$3,n$2)=>$n(e$3,n$2,``,a$2),{})}const Di=Pi(),[Ya,$i]=te(`ConfigProvider`),xv=defineComponent({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(a$2){let t=a$2,{dir:e$3,scrollBody:n$2,nonce:l$1}=toRefs(t);return $i({dir:e$3,scrollBody:n$2,nonce:l$1,useId:t.useId}),(s$1,r$2)=>renderSlot(s$1.$slots,`default`)}});let Bi=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,Ii=(a$2=21)=>{let t=``,e$3=a$2;for(;e$3--;)t+=Bi[Math.random()*64|0];return t};const Ti=Dl(()=>{let a$2=ref(new Map),t=ref(),e$3=computed(()=>{for(let r$2 of a$2.value.values())if(r$2)return!0;return!1}),n$2=Ya({scrollBody:ref(!0)}),l$1=null,s$1=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.body.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,jo&&l$1?.(),t.value=void 0};return watch(e$3,(r$2,i$1)=>{var f$3;if(!Je)return;if(!r$2){i$1&&s$1();return}t.value===void 0&&(t.value=document.body.style.overflow);let u$1=window.innerWidth-document.documentElement.clientWidth,d$2={padding:u$1,margin:0},c$4=(f$3=n$2.scrollBody)!=null&&f$3.value?typeof n$2.scrollBody.value==`object`?Di({padding:n$2.scrollBody.value.padding===!0?u$1:n$2.scrollBody.value.padding,margin:n$2.scrollBody.value.margin===!0?u$1:n$2.scrollBody.value.margin},d$2):d$2:{padding:0,margin:0};u$1>0&&(document.body.style.paddingRight=typeof c$4.padding==`number`?`${c$4.padding}px`:String(c$4.padding),document.body.style.marginRight=typeof c$4.margin==`number`?`${c$4.margin}px`:String(c$4.margin),document.body.style.setProperty(`--scrollbar-width`,`${u$1}px`),document.body.style.overflow=`hidden`),jo&&(l$1=He(document,`touchmove`,v$2=>Ri(v$2),{passive:!1})),nextTick(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})},{immediate:!0,flush:`sync`}),a$2});function ya(a$2){let t=Ii(6),e$3=Ti();e$3.value.set(t,a$2??!1);let n$2=computed({get:()=>e$3.value.get(t)??!1,set:l$1=>e$3.value.set(t,l$1)});return hi(()=>{e$3.value.delete(t)}),n$2}function Vl(a$2){let t=window.getComputedStyle(a$2);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&a$2.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}const Ai=`data-radix-vue-collection-item`;function Fe(a$2,t=Ai){let e$3=a$2??Symbol();return{createCollection:s$1=>{let r$2=ref([]);function i$1(){let u$1=$e$1(s$1);return u$1?r$2.value=Array.from(u$1.querySelectorAll(`[${t}]:not([data-disabled])`)):r$2.value=[]}return onBeforeUpdate(()=>{r$2.value=[]}),onMounted(i$1),onUpdated(i$1),watch(()=>s$1?.value,i$1,{immediate:!0}),provide(e$3,r$2),r$2},injectCollection:()=>inject(e$3,ref([]))}}function qn(a$2){let t=ref(a$2);function e$3(){return t.value}function n$2(m$3){t.value=m$3}function l$1(m$3,_$2){return new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,_$2).format(m$3)}function s$1(m$3,_$2=!0){return z(m$3)&&_$2?l$1($(m$3),{dateStyle:`long`,timeStyle:`long`}):l$1($(m$3),{dateStyle:`long`})}function r$2(m$3,_$2={}){return new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{month:`long`,year:`numeric`,..._$2}).format(m$3)}function i$1(m$3,_$2={}){return new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{month:`long`,..._$2}).format(m$3)}function u$1(){let m$3=$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2());return[1,2,3,4,5,6,7,8,9,10,11,12].map(C$3=>({label:i$1($(m$3.set({month:C$3}))),value:C$3}))}function d$2(m$3,_$2={}){return new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{year:`numeric`,..._$2}).format(m$3)}function c$4(m$3,_$2){return m(m$3)?new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{..._$2,timeZone:m$3.timeZone}).formatToParts($(m$3)):new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,_$2).formatToParts($(m$3))}function f$3(m$3,_$2=`narrow`){return new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{weekday:_$2}).format(m$3)}function v$2(m$3){var $$2;return($$2=new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{hour:`numeric`,minute:`numeric`}).formatToParts(m$3).find(h$3=>h$3.type===`dayPeriod`))?.value===`PM`?`PM`:`AM`}let p$5={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`};function g$2(m$3,_$2,C$3={}){let $$2={...p$5,...C$3},E$2=c$4(m$3,$$2).find(P$2=>P$2.type===_$2);return E$2?E$2.value:``}return{setLocale:n$2,getLocale:e$3,fullMonth:i$1,fullYear:d$2,fullMonthAndYear:r$2,toParts:c$4,custom:l$1,part:g$2,dayPeriod:v$2,selectedDate:s$1,dayOfWeek:f$3,getMonths:u$1}}function we(a$2){let t=Ya({dir:ref(`ltr`)});return computed(()=>{var e$3;return a$2?.value||(e$3=t.dir)?.value||`ltr`})}function Te$1(a$2){let t=getCurrentInstance(),e$3=t?.type.emits,n$2={};return e$3!=null&&e$3.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),e$3?.forEach(l$1=>{n$2[toHandlerKey(camelize(l$1))]=(...s$1)=>a$2(l$1,...s$1)}),n$2}let wn=0;function Yn(){watchEffect(a$2=>{if(!Je)return;let t=document.querySelectorAll(`[data-radix-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??Go()),document.body.insertAdjacentElement(`beforeend`,t[1]??Go()),wn++,a$2(()=>{wn===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e$3=>e$3.remove()),wn--})})}function Go(){let a$2=document.createElement(`span`);return a$2.setAttribute(`data-radix-focus-guard`,``),a$2.tabIndex=0,a$2.style.outline=`none`,a$2.style.opacity=`0`,a$2.style.position=`fixed`,a$2.style.pointerEvents=`none`,a$2}function at(a$2){return computed(()=>{var t;return je(a$2)?!!((t=$e$1(a$2))!=null&&t.closest(`form`)):!0})}function Ot$1(a$2){let t=getCurrentInstance(),e$3=Object.keys(t?.type.props??{}).reduce((l$1,s$1)=>{let r$2=(t?.type.props[s$1]).default;return r$2!==void 0&&(l$1[s$1]=r$2),l$1},{}),n$2=toRef(a$2);return computed(()=>{let l$1={},s$1=t?.vnode.props??{};return Object.keys(s$1).forEach(r$2=>{l$1[camelize(r$2)]=s$1[r$2]}),Object.keys({...e$3,...l$1}).reduce((r$2,i$1)=>(n$2.value[i$1]!==void 0&&(r$2[i$1]=n$2.value[i$1]),r$2),{})})}function Se(a$2,t){let e$3=Ot$1(a$2),n$2=t?Te$1(t):{};return computed(()=>({...e$3.value,...n$2}))}function R$1(){let a$2=getCurrentInstance(),t=ref(),e$3=computed(()=>{var r$2,i$1;return[`#text`,`#comment`].includes((r$2=t.value)?.$el.nodeName)?(i$1=t.value)?.$el.nextElementSibling:$e$1(t)}),n$2=Object.assign({},a$2.exposed),l$1={};for(let r$2 in a$2.props)Object.defineProperty(l$1,r$2,{enumerable:!0,configurable:!0,get:()=>a$2.props[r$2]});if(Object.keys(n$2).length>0)for(let r$2 in n$2)Object.defineProperty(l$1,r$2,{enumerable:!0,configurable:!0,get:()=>n$2[r$2]});Object.defineProperty(l$1,`$el`,{enumerable:!0,configurable:!0,get:()=>a$2.vnode.el}),a$2.exposed=l$1;function s$1(r$2){t.value=r$2,r$2&&(Object.defineProperty(l$1,`$el`,{enumerable:!0,configurable:!0,get:()=>r$2 instanceof Element?r$2:r$2.$el}),a$2.exposed=l$1)}return{forwardRef:s$1,currentRef:t,currentElement:e$3}}function Fl(a$2,t){let e$3=Tt$1(!1,300),n$2=ref(null),l$1=ua();function s$1(){n$2.value=null,e$3.value=!1}function r$2(i$1,u$1){let d$2=i$1.currentTarget,c$4={x:i$1.clientX,y:i$1.clientY},f$3=Oi(c$4,d$2.getBoundingClientRect()),v$2=ki(c$4,f$3),p$5=Mi(u$1.getBoundingClientRect()),g$2=Fi([...v$2,...p$5]);n$2.value=g$2,e$3.value=!0}return watchEffect(i$1=>{if(a$2.value&&t.value){let u$1=c$4=>r$2(c$4,t.value),d$2=c$4=>r$2(c$4,a$2.value);a$2.value.addEventListener(`pointerleave`,u$1),t.value.addEventListener(`pointerleave`,d$2),i$1(()=>{var c$4,f$3;(c$4=a$2.value)==null||c$4.removeEventListener(`pointerleave`,u$1),(f$3=t.value)==null||f$3.removeEventListener(`pointerleave`,d$2)})}}),watchEffect(i$1=>{var u$1;if(n$2.value){let d$2=c$4=>{var _$2,C$3;if(!n$2.value)return;let f$3=c$4.target,v$2={x:c$4.clientX,y:c$4.clientY},p$5=(_$2=a$2.value)?.contains(f$3)||(C$3=t.value)?.contains(f$3),g$2=!Vi(v$2,n$2.value),m$3=!!f$3.closest(`[data-grace-area-trigger]`);p$5?s$1():(g$2||m$3)&&(s$1(),l$1.trigger())};(u$1=a$2.value)==null||u$1.ownerDocument.addEventListener(`pointermove`,d$2),i$1(()=>{var c$4;return(c$4=a$2.value)?.ownerDocument.removeEventListener(`pointermove`,d$2)})}}),{isPointerInTransit:e$3,onPointerExit:l$1.on}}function Oi(a$2,t){let e$3=Math.abs(t.top-a$2.y),n$2=Math.abs(t.bottom-a$2.y),l$1=Math.abs(t.right-a$2.x),s$1=Math.abs(t.left-a$2.x);switch(Math.min(e$3,n$2,l$1,s$1)){case s$1:return`left`;case l$1:return`right`;case e$3:return`top`;case n$2:return`bottom`;default:throw Error(`unreachable`)}}function ki(a$2,t,e$3=5){let n$2=[];switch(t){case`top`:n$2.push({x:a$2.x-e$3,y:a$2.y+e$3},{x:a$2.x+e$3,y:a$2.y+e$3});break;case`bottom`:n$2.push({x:a$2.x-e$3,y:a$2.y-e$3},{x:a$2.x+e$3,y:a$2.y-e$3});break;case`left`:n$2.push({x:a$2.x+e$3,y:a$2.y-e$3},{x:a$2.x+e$3,y:a$2.y+e$3});break;case`right`:n$2.push({x:a$2.x-e$3,y:a$2.y-e$3},{x:a$2.x-e$3,y:a$2.y+e$3});break}return n$2}function Mi(a$2){let{top:t,right:e$3,bottom:n$2,left:l$1}=a$2;return[{x:l$1,y:t},{x:e$3,y:t},{x:e$3,y:n$2},{x:l$1,y:n$2}]}function Vi(a$2,t){let{x:e$3,y:n$2}=a$2,l$1=!1;for(let s$1=0,r$2=t.length-1;s$1n$2!=c$4>n$2&&e$3<(d$2-i$1)*(n$2-u$1)/(c$4-u$1)+i$1&&(l$1=!l$1)}return l$1}function Fi(a$2){let t=a$2.slice();return t.sort((e$3,n$2)=>e$3.xn$2.x?1:e$3.yn$2.y?1:0),Ni(t)}function Ni(a$2){if(a$2.length<=1)return a$2.slice();let t=[];for(let n$2=0;n$2=2;){let s$1=t[t.length-1],r$2=t[t.length-2];if((s$1.x-r$2.x)*(l$1.y-r$2.y)>=(s$1.y-r$2.y)*(l$1.x-r$2.x))t.pop();else break}t.push(l$1)}t.pop();let e$3=[];for(let n$2=a$2.length-1;n$2>=0;n$2--){let l$1=a$2[n$2];for(;e$3.length>=2;){let s$1=e$3[e$3.length-1],r$2=e$3[e$3.length-2];if((s$1.x-r$2.x)*(l$1.y-r$2.y)>=(s$1.y-r$2.y)*(l$1.x-r$2.x))e$3.pop();else break}e$3.push(l$1)}return e$3.pop(),t.length===1&&e$3.length===1&&t[0].x===e$3[0].x&&t[0].y===e$3[0].y?t:t.concat(e$3)}var Li=function(a$2){if(typeof document>`u`)return null;var t=Array.isArray(a$2)?a$2[0]:a$2;return t.ownerDocument.body},Kt=new WeakMap,$a=new WeakMap,Ba={},_n=0,Nl=function(a$2){return a$2&&(a$2.host||Nl(a$2.parentNode))},zi=function(a$2,t){return t.map(function(e$3){if(a$2.contains(e$3))return e$3;var n$2=Nl(e$3);return n$2&&a$2.contains(n$2)?n$2:(console.error(`aria-hidden`,e$3,`in not contained inside`,a$2,`. Doing nothing`),null)}).filter(function(e$3){return!!e$3})},Ki=function(a$2,t,e$3,n$2){var l$1=zi(t,Array.isArray(a$2)?a$2:[a$2]);Ba[e$3]||(Ba[e$3]=new WeakMap);var s$1=Ba[e$3],r$2=[],i$1=new Set,u$1=new Set(l$1),d$2=function(f$3){!f$3||i$1.has(f$3)||(i$1.add(f$3),d$2(f$3.parentNode))};l$1.forEach(d$2);var c$4=function(f$3){!f$3||u$1.has(f$3)||Array.prototype.forEach.call(f$3.children,function(v$2){if(i$1.has(v$2))c$4(v$2);else try{var p$5=v$2.getAttribute(n$2),g$2=p$5!==null&&p$5!==`false`,m$3=(Kt.get(v$2)||0)+1,_$2=(s$1.get(v$2)||0)+1;Kt.set(v$2,m$3),s$1.set(v$2,_$2),r$2.push(v$2),m$3===1&&g$2&&$a.set(v$2,!0),_$2===1&&v$2.setAttribute(e$3,`true`),g$2||v$2.setAttribute(n$2,`true`)}catch(C$3){console.error(`aria-hidden: cannot operate on `,v$2,C$3)}})};return c$4(t),i$1.clear(),_n++,function(){r$2.forEach(function(f$3){var v$2=Kt.get(f$3)-1,p$5=s$1.get(f$3)-1;Kt.set(f$3,v$2),s$1.set(f$3,p$5),v$2||($a.has(f$3)||f$3.removeAttribute(n$2),$a.delete(f$3)),p$5||f$3.removeAttribute(e$3)}),_n--,_n||(Kt=new WeakMap,Kt=new WeakMap,$a=new WeakMap,Ba={})}},Hi=function(a$2,t,e$3){e$3===void 0&&(e$3=`data-aria-hidden`);var n$2=Array.from(Array.isArray(a$2)?a$2:[a$2]),l$1=Li(a$2);return l$1?(n$2.push.apply(n$2,Array.from(l$1.querySelectorAll(`[aria-live]`))),Ki(n$2,l$1,e$3,`aria-hidden`)):function(){return null}};function ga(a$2){let t;watch(()=>$e$1(a$2),e$3=>{e$3?t=Hi(e$3):t&&t()}),onUnmounted(()=>{t&&t()})}let Wi=0;function ge(a$2,t=`radix`){if(a$2)return a$2;let e$3=Ya({useId:void 0});return useId$1?`${t}-${useId$1()}`:e$3.useId?`${t}-${e$3.useId()}`:`${t}-${++Wi}`}function ji(a$2,t){let e$3=ref(),n$2=(s$1,r$2)=>{if(t.multiple&&Array.isArray(a$2.value))if(t.selectionBehavior===`replace`)a$2.value=[s$1],e$3.value=s$1;else{let i$1=a$2.value.findIndex(u$1=>r$2(u$1));i$1===-1?a$2.value.push(s$1):a$2.value.splice(i$1,1)}else t.selectionBehavior===`replace`?a$2.value={...s$1}:!Array.isArray(a$2.value)&&r$2(a$2.value)?a$2.value=void 0:a$2.value={...s$1};return a$2.value};function l$1(s$1,r$2,i$1,u$1){var v$2;if(!(e$3!=null&&e$3.value)||!t.multiple||!Array.isArray(a$2.value))return;let c$4=(v$2=i$1().filter(p$5=>p$5.ref.dataset.disabled!==``).find(p$5=>p$5.ref===r$2))?.value;if(!c$4)return;let f$3=null;switch(s$1){case`prev`:case`next`:f$3=Bt$1(u$1,e$3.value,c$4);break;case`first`:f$3=Bt$1(u$1,e$3.value,u$1?.[0]);break;case`last`:f$3=Bt$1(u$1,e$3.value,u$1?.[u$1.length-1]);break}a$2.value=f$3}return{firstValue:e$3,onSelectItem:n$2,handleMultipleReplace:l$1}}function Ll(a$2){let t=ref(),e$3=computed(()=>{var l$1;return(l$1=t.value)?.width??0}),n$2=computed(()=>{var l$1;return(l$1=t.value)?.height??0});return onMounted(()=>{let l$1=$e$1(a$2);if(l$1){t.value={width:l$1.offsetWidth,height:l$1.offsetHeight};let s$1=new ResizeObserver(r$2=>{if(!Array.isArray(r$2)||!r$2.length)return;let i$1=r$2[0],u$1,d$2;if(`borderBoxSize`in i$1){let c$4=i$1.borderBoxSize,f$3=Array.isArray(c$4)?c$4[0]:c$4;u$1=f$3.inlineSize,d$2=f$3.blockSize}else u$1=l$1.offsetWidth,d$2=l$1.offsetHeight;t.value={width:u$1,height:d$2}});return s$1.observe(l$1,{box:`border-box`}),()=>s$1.unobserve(l$1)}else t.value=void 0}),{width:e$3,height:n$2}}function zl(a$2,t){let e$3=ref(a$2);function n$2(s$1){return t[e$3.value][s$1]??e$3.value}return{state:e$3,dispatch:s$1=>{e$3.value=n$2(s$1)}}}const Ui=`data-item-text`;function ba(a$2){let t=Tt$1(``,1e3);return{search:t,handleTypeaheadSearch:(l$1,s$1)=>{if(!(a$2!=null&&a$2.value)&&!s$1)return;t.value+=l$1;let r$2=a$2?.value??s$1,i$1=me(),u$1=r$2.map(p$5=>{var g$2;return{ref:p$5,textValue:(g$2=(p$5.querySelector(`[${Ui}]`)??p$5).textContent)?.trim()??``}}),d$2=u$1.find(p$5=>p$5.ref===i$1),c$4=u$1.map(p$5=>p$5.textValue),f$3=Zn(c$4,t.value,d$2?.textValue),v$2=u$1.find(p$5=>p$5.textValue===f$3);return v$2&&v$2.ref.focus(),v$2?.ref},resetTypeahead:()=>{t.value=``}}}function Xn(a$2,t){return a$2.map((e$3,n$2)=>a$2[(t+n$2)%a$2.length])}function Zn(a$2,t,e$3){let l$1=t.length>1&&Array.from(t).every(d$2=>d$2===t[0])?t[0]:t,s$1=e$3?a$2.indexOf(e$3):-1,r$2=Xn(a$2,Math.max(s$1,0));l$1.length===1&&(r$2=r$2.filter(d$2=>d$2!==e$3));let u$1=r$2.find(d$2=>d$2.toLowerCase().startsWith(l$1.toLowerCase()));return u$1===e$3?void 0:u$1}function nt(){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 Jn=defineComponent({name:`PrimitiveSlot`,inheritAttrs:!1,setup(a$2,{attrs:t,slots:e$3}){return()=>{var u$1,d$2;if(!e$3.default)return null;let n$2=qa(e$3.default()),l$1=n$2.findIndex(c$4=>c$4.type!==Comment);if(l$1===-1)return n$2;let s$1=n$2[l$1];(u$1=s$1.props)==null||delete u$1.ref;let r$2=s$1.props?mergeProps(t,s$1.props):t;t.class&&(d$2=s$1.props)!=null&&d$2.class&&delete s$1.props.class;let i$1=cloneVNode(s$1,r$2);for(let c$4 in r$2)c$4.startsWith(`on`)&&(i$1.props||={},i$1.props[c$4]=r$2[c$4]);return n$2.length===1?i$1:(n$2[l$1]=i$1,n$2)}}}),O$1=defineComponent({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(a$2,{attrs:t,slots:e$3}){let n$2=a$2.asChild?`template`:a$2.as;return typeof n$2==`string`&&[`area`,`img`,`input`].includes(n$2)?()=>h(n$2,t):n$2===`template`?()=>h(Jn,t,{default:e$3.default}):()=>h(a$2.as,t,{default:e$3.default})}});function Re(){let a$2=ref(),t=computed(()=>{var e$3,n$2;return[`#text`,`#comment`].includes((e$3=a$2.value)?.$el.nodeName)?(n$2=a$2.value)?.$el.nextElementSibling:$e$1(a$2)});return{primitiveElement:a$2,currentElement:t}}const[Kl,Gi]=te(`CollapsibleRoot`),qi=defineComponent({__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(a$2,{expose:t,emit:e$3}){let n$2=a$2,s$1=ne(n$2,`open`,e$3,{defaultValue:n$2.defaultOpen,passive:n$2.open===void 0}),r$2=ne(n$2,`disabled`);return Gi({contentId:``,disabled:r$2,open:s$1,onOpenToggle:()=>{s$1.value=!s$1.value}}),t({open:s$1}),R$1(),(i$1,u$1)=>(openBlock(),createBlock(unref(O$1),{as:i$1.as,"as-child":n$2.asChild,"data-state":unref(s$1)?`open`:`closed`,"data-disabled":unref(r$2)?``:void 0},{default:withCtx(()=>[renderSlot(i$1.$slots,`default`,{open:unref(s$1)})]),_:3},8,[`as`,`as-child`,`data-state`,`data-disabled`]))}}),Yi=defineComponent({__name:`CollapsibleTrigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2;R$1();let e$3=Kl();return(n$2,l$1)=>{var s$1,r$2;return openBlock(),createBlock(unref(O$1),{type:n$2.as===`button`?`button`:void 0,as:n$2.as,"as-child":t.asChild,"aria-controls":unref(e$3).contentId,"aria-expanded":unref(e$3).open.value,"data-state":unref(e$3).open.value?`open`:`closed`,"data-disabled":(s$1=unref(e$3).disabled)!=null&&s$1.value?``:void 0,disabled:(r$2=unref(e$3).disabled)?.value,onClick:unref(e$3).onOpenToggle},{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},8,[`type`,`as`,`as-child`,`aria-controls`,`aria-expanded`,`data-state`,`data-disabled`,`disabled`,`onClick`])}}});function Xi(a$2,t){var _$2;let e$3=ref({}),n$2=ref(`none`),l$1=ref(a$2),s$1=a$2.value?`mounted`:`unmounted`,r$2,i$1=(_$2=t.value)?.ownerDocument.defaultView??Rt,{state:u$1,dispatch:d$2}=zl(s$1,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),c$4=C$3=>{var $$2;if(Je){let h$3=new CustomEvent(C$3,{bubbles:!1,cancelable:!1});($$2=t.value)==null||$$2.dispatchEvent(h$3)}};watch(a$2,async(C$3,$$2)=>{var E$2;let h$3=$$2!==C$3;if(await nextTick(),h$3){let P$2=n$2.value,D$1=Ia(t.value);C$3?(d$2(`MOUNT`),c$4(`enter`),D$1===`none`&&c$4(`after-enter`)):D$1===`none`||(E$2=e$3.value)?.display===`none`?(d$2(`UNMOUNT`),c$4(`leave`),c$4(`after-leave`)):$$2&&P$2!==D$1?(d$2(`ANIMATION_OUT`),c$4(`leave`)):(d$2(`UNMOUNT`),c$4(`after-leave`))}},{immediate:!0});let f$3=C$3=>{let $$2=Ia(t.value),h$3=$$2.includes(C$3.animationName),E$2=u$1.value===`mounted`?`enter`:`leave`;if(C$3.target===t.value&&h$3&&(c$4(`after-${E$2}`),d$2(`ANIMATION_END`),!l$1.value)){let P$2=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,r$2=i$1?.setTimeout(()=>{var D$1;(D$1=t.value)?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=P$2)})}C$3.target===t.value&&$$2===`none`&&d$2(`ANIMATION_END`)},v$2=C$3=>{C$3.target===t.value&&(n$2.value=Ia(t.value))},p$5=watch(t,(C$3,$$2)=>{C$3?(e$3.value=getComputedStyle(C$3),C$3.addEventListener(`animationstart`,v$2),C$3.addEventListener(`animationcancel`,f$3),C$3.addEventListener(`animationend`,f$3)):(d$2(`ANIMATION_END`),r$2!==void 0&&i$1?.clearTimeout(r$2),$$2?.removeEventListener(`animationstart`,v$2),$$2?.removeEventListener(`animationcancel`,f$3),$$2?.removeEventListener(`animationend`,f$3))},{immediate:!0}),g$2=watch(u$1,()=>{let C$3=Ia(t.value);n$2.value=u$1.value===`mounted`?C$3:`none`});return onUnmounted(()=>{p$5(),g$2()}),{isPresent:computed(()=>[`mounted`,`unmountSuspended`].includes(u$1.value))}}function Ia(a$2){return a$2&&getComputedStyle(a$2).animationName||`none`}const Pe=defineComponent({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(a$2,{slots:t,expose:e$3}){var d$2;let{present:n$2,forceMount:l$1}=toRefs(a$2),s$1=ref(),{isPresent:r$2}=Xi(n$2,s$1);e$3({present:r$2});let i$1=t.default({present:r$2});i$1=qa(i$1||[]);let u$1=getCurrentInstance();if(i$1&&i$1?.length>1){let c$4=(d$2=u$1?.parent)!=null&&d$2.type.name?`<${u$1.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${c$4}\` 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(f$3=>` - ${f$3}`).join(` +`)})}}),useChatStore=defineStore(`chat`,()=>{let{stream}=useLLM(),{systemPrompt}=storeToRefs(useAiriCardStore()),sending=ref(!1),onBeforeMessageComposedHooks=ref([]),onAfterMessageComposedHooks=ref([]),onBeforeSendHooks=ref([]),onAfterSendHooks=ref([]),onTokenLiteralHooks=ref([]),onTokenSpecialHooks=ref([]),onStreamEndHooks=ref([]),onAssistantResponseEndHooks=ref([]);function onBeforeMessageComposed(cb$1){onBeforeMessageComposedHooks.value.push(cb$1)}function onAfterMessageComposed(cb$1){onAfterMessageComposedHooks.value.push(cb$1)}function onBeforeSend(cb$1){onBeforeSendHooks.value.push(cb$1)}function onAfterSend(cb$1){onAfterSendHooks.value.push(cb$1)}function onTokenLiteral(cb$1){onTokenLiteralHooks.value.push(cb$1)}function onTokenSpecial(cb$1){onTokenSpecialHooks.value.push(cb$1)}function onStreamEnd(cb$1){onStreamEndHooks.value.push(cb$1)}function onAssistantResponseEnd(cb$1){onAssistantResponseEndHooks.value.push(cb$1)}let messages=ref([{role:`system`,content:systemPrompt.value}]),streamingMessage=ref({role:`assistant`,content:``,slices:[],tool_results:[]});async function send(sendingMessage,options$1){try{if(sending.value=!0,!sendingMessage)return;for(let hook of onBeforeMessageComposedHooks.value)await hook(sendingMessage);let parser=useLlmmarkerParser({onLiteral:async literal=>{for(let hook of onTokenLiteralHooks.value)await hook(literal);streamingMessage.value.content+=literal;let lastSlice=streamingMessage.value.slices.at(-1);if(lastSlice?.type===`text`){lastSlice.text+=literal;return}streamingMessage.value.slices.push({type:`text`,text:literal})},onSpecial:async special=>{for(let hook of onTokenSpecialHooks.value)await hook(special)}}),slicesQueue=useQueue({handlers:[async ctx=>{if(ctx.data.type===`text`){await parser.consume(ctx.data.text);return}if(ctx.data.type===`tool-call`){streamingMessage.value.slices.push(ctx.data);return}ctx.data.type===`tool-call-result`&&streamingMessage.value.tool_results.push(ctx.data)}]});streamingMessage.value={role:`assistant`,content:``,slices:[],tool_results:[]},messages.value.push({role:`user`,content:sendingMessage}),messages.value.push(streamingMessage.value);let newMessages=messages.value.slice(0,messages.value.length-1).map(msg=>{if(msg.role===`assistant`){let{slices:_$2,...rest}=msg;return rest.tool_results=toRaw(rest.tool_results),toRaw(rest)}return toRaw(msg)});for(let hook of onAfterMessageComposedHooks.value)await hook(sendingMessage);for(let hook of onBeforeSendHooks.value)await hook(sendingMessage);let headers=options$1.providerConfig?.headers||{},res=await stream(options$1.model,options$1.chatProvider,newMessages,{headers,onToolCall(toolCall){slicesQueue.add({type:`tool-call`,toolCall})},onToolCallResult(toolCallResult){slicesQueue.add({type:`tool-call-result`,id:toolCallResult.id,result:toolCallResult.result})}});for(let hook of onAfterSendHooks.value)await hook(sendingMessage);let fullText=``;for await(let textPart of readableStreamToAsyncIterator(res.textStream,async v$2=>v$2))slicesQueue.add({type:`text`,text:textPart}),fullText+=textPart;await parser.end();for(let hook of onStreamEndHooks.value)await hook();for(let hook of onAssistantResponseEndHooks.value)await hook(fullText);console.debug(`LLM output:`,fullText)}catch(error){throw console.error(`Error sending message:`,error),error}finally{sending.value=!1}}return{sending,messages,streamingMessage,send,onBeforeMessageComposed,onAfterMessageComposed,onBeforeSend,onAfterSend,onTokenLiteral,onTokenSpecial,onStreamEnd,onAssistantResponseEnd}}),useLive2d=defineStore(`live2d`,()=>{let modelFile=ref(),modelUrl=ref(`/assets/live2d/models/hiyori_pro_zh.zip`),loadSource=ref(`url`),loadingModel=ref(!1),position$2=useLocalStorage(`settings/live2d/position`,{x:0,y:0}),positionInPercentageString=computed(()=>({x:`${position$2.value.x}%`,y:`${position$2.value.y}%`})),currentMotion=ref({group:`Idle`,index:0}),availableMotions=ref([]),motionMap=useLocalStorage(`settings/live2d/motion-map`,{}),scale$1=useLocalStorage(`settings/live2d/scale`,1);return{modelFile,modelUrl,loadSource,loadingModel,position:position$2,positionInPercentageString,currentMotion,availableMotions,motionMap,scale:scale$1}}),useMcpStore=defineStore(`mcp`,()=>{let serverCmd=useLocalStorage(`settings/mcp/server-cmd`,``),serverArgs=useLocalStorage(`settings/mcp/server-args`,``),connected=useLocalStorage(`mcp/connected`,!1);return{serverCmd,serverArgs,connected}}),useOnboardingStore=defineStore(`onboarding`,()=>{let providersStore=useProvidersStore(),hasCompletedSetup=useLocalStorage(`onboarding/completed`,!1),hasSkippedSetup=useLocalStorage(`onboarding/skipped`,!1),shouldShowSetup=ref(!1),hasEssentialProviderConfigured=computed(()=>{let essentialProviders=[`openai`,`anthropic`,`google-generative-ai`,`openrouter-ai`,`ollama`,`deepseek`];return essentialProviders.some(providerId=>providersStore.configuredProviders[providerId])}),needsOnboarding=computed(()=>hasCompletedSetup.value||hasSkippedSetup.value?(console.warn(`Onboarding already completed or skipped`),!1):hasEssentialProviderConfigured.value?(console.warn(`Essential provider already configured, no onboarding needed`),!1):!0);async function initializeSetupCheck(){needsOnboarding.value&&(await nextTick(),shouldShowSetup.value=!0)}function markSetupCompleted(){hasCompletedSetup.value=!0,hasSkippedSetup.value=!1,shouldShowSetup.value=!1}function markSetupSkipped(){hasSkippedSetup.value=!0,shouldShowSetup.value=!1}function resetSetupState(){hasCompletedSetup.value=!1,hasSkippedSetup.value=!1,shouldShowSetup.value=!1}function forceShowSetup(){shouldShowSetup.value=!0}return{hasCompletedSetup,hasSkippedSetup,shouldShowSetup,hasEssentialProviderConfigured,needsOnboarding,initializeSetupCheck,markSetupCompleted,markSetupSkipped,resetSetupState,forceShowSetup}}),WebSocket$1=globalThis.WebSocket,sleep=async delay=>new Promise(resolve$1=>setTimeout(resolve$1,delay));var Client=class{connected=!1;opts;websocket;eventListeners=new Map;reconnectAttempts=0;shouldClose=!1;constructor(options$1){if(this.opts={url:`ws://localhost:6121/ws`,possibleEvents:[],onError:()=>{},onClose:()=>{},autoConnect:!0,autoReconnect:!0,...options$1},this.opts.autoConnect)try{this.connect()}catch(err){console.error(err)}}async retryWithExponentialBackoff(fn$6,attempts=0,maxAttempts=-1){if(maxAttempts!==-1&&attempts>=maxAttempts){console.error(`Maximum retry attempts (${maxAttempts}) reached`);return}try{await fn$6()}catch(err){console.error(`Encountered an error when retrying`,err),await sleep(2**attempts*1e3),await this.retryWithExponentialBackoff(fn$6,attempts+1,maxAttempts)}}async tryReconnectWithExponentialBackoff(){await this.retryWithExponentialBackoff(()=>this._connect(),this.reconnectAttempts)}_connect(){return new Promise((resolve$1,reject)=>{if(this.shouldClose){resolve$1();return}if(this.connected){resolve$1();return}this.websocket=new WebSocket$1(this.opts.url),this.onEvent(`module:authenticated`,async event=>{let auth=event.data.authenticated;auth?this.tryAnnounce():this.retryWithExponentialBackoff(()=>this.tryAuthenticate())}),this.websocket.onerror=event=>{if(this.opts.onError?.(event),`error`in event&&event.error instanceof Error&&event.error.message===`Received network error or non-101 status code.`){if(this.connected=!1,!this.opts.autoReconnect){this.opts.onError?.(event),this.opts.onClose?.(),reject(event.error);return}reject(event.error)}},this.websocket.onclose=()=>{this.opts.onClose?.(),this.connected=!1,this.opts.autoReconnect?this.tryReconnectWithExponentialBackoff():this.opts.onClose?.()},this.websocket.onmessage=event=>{this.handleMessage(event)},this.websocket.onopen=()=>{this.reconnectAttempts=0,this.opts.token?this.tryAuthenticate():this.tryAnnounce(),this.connected=!0,resolve$1()}})}async connect(){await this.tryReconnectWithExponentialBackoff()}tryAnnounce(){this.send({type:`module:announce`,data:{name:this.opts.name,possibleEvents:this.opts.possibleEvents}})}tryAuthenticate(){this.opts.token&&this.send({type:`module:authenticate`,data:{token:this.opts.token||``}})}async handleMessage(event){try{let data$12=JSON.parse(event.data),listeners=this.eventListeners.get(data$12.type);if(!listeners)return;for(let listener of listeners)await listener(data$12)}catch(err){console.error(`Failed to parse message:`,err),this.opts.onError?.(err)}}onEvent(event,callback){this.eventListeners.get(event)||this.eventListeners.set(event,[]);let listeners=this.eventListeners.get(event);listeners&&listeners.push(callback)}send(data$12){this.websocket?.send(JSON.stringify(data$12))}sendRaw(data$12){this.websocket?.send(data$12)}close(){this.shouldClose=!0,this.connected&&this.websocket&&(this.websocket.close(),this.connected=!1)}};const useServerStore=defineStore(`server`,()=>{let server=ref();onMounted(()=>{server.value=new Client({name:`stage-web`,autoConnect:!1,autoReconnect:!0,onError:error=>{console.error(error)}})});function connect(){server.value?.connect()}return{server,connect}}),DEFAULT_THEME_COLORS_HUE=220.44,convert=converter_default(`oklch`),getHueFrom=color$2=>color$2?convert(color$2)?.h:DEFAULT_THEME_COLORS_HUE,useSettings=defineStore(`settings`,()=>{let selectedAudioDevice=ref(),language=useLocalStorage(`settings/language`,`en`),stageView=useLocalStorage(`settings/stage/view/model-renderer`,`2d`),isAudioInputOn=useLocalStorage(`settings/audio/input`,`false`),selectedAudioDeviceId=computed(()=>selectedAudioDevice.value?.deviceId),{audioInputs,ensurePermissions}=useDevicesList({constraints:{audio:!0}}),disableTransitions=useLocalStorage(`settings/disable-transitions`,!0),usePageSpecificTransitions=useLocalStorage(`settings/use-page-specific-transitions`,!0),themeColorsHue=useLocalStorage(`settings/theme/colors/hue`,DEFAULT_THEME_COLORS_HUE),themeColorsHueDynamic=useLocalStorage(`settings/theme/colors/hue-dynamic`,!1),allowVisibleOnAllWorkspaces=useLocalStorage(`settings/allow-visible-on-all-workspaces`,!0);function setThemeColorsHue(hue$2=DEFAULT_THEME_COLORS_HUE){themeColorsHue.value=hue$2,themeColorsHueDynamic.value=!1}function applyPrimaryColorFrom(color$2){setThemeColorsHue(getHueFrom(color$2))}function isColorSelectedForPrimary(hexColor){if(themeColorsHueDynamic.value)return!1;let h$3=getHueFrom(hexColor);if(!h$3)return!1;let hueDifference=Math.abs(h$3-themeColorsHue.value);return hueDifference<.01||hueDifference>359.99}return watch(isAudioInputOn,value$1=>{value$1===`false`&&(selectedAudioDevice.value=void 0),value$1===`true`&&ensurePermissions().then(()=>{selectedAudioDevice.value=audioInputs.value[0]})}),watch(audioInputs,()=>{isAudioInputOn.value===`true`&&!selectedAudioDevice.value&&(selectedAudioDevice.value=audioInputs.value[0])},{immediate:!0}),{disableTransitions,usePageSpecificTransitions,language,stageView,themeColorsHue,themeColorsHueDynamic,isAudioInputOn,selectedAudioDevice,selectedAudioDeviceId,allowVisibleOnAllWorkspaces,setThemeColorsHue,applyPrimaryColorFrom,isColorSelectedForPrimary}}),_hoisted_1$10={flex:`~ col md:row gap-6`},_hoisted_2$4={flex:`~ col gap-6`},_hoisted_3$1={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_4$1={flex:`~ col gap-4`},_hoisted_5$1={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},_hoisted_6$1={"w-full":``,"rounded-xl":``};var SpeechProviderSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SpeechProviderSettings`,props:{providerId:{},defaultModel:{},additionalSettings:{}},setup(__props){let props=__props,{t}=useI18n(),router$1=useRouter(),providersStore=useProvidersStore(),speechStore=useSpeechStore(),{providers}=storeToRefs(providersStore),providerMetadata=computed(()=>providersStore.getProviderMetadata(props.providerId)),apiKey=computed({get:()=>providers.value[props.providerId]?.apiKey||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].apiKey=value$1}}),baseUrl=computed({get:()=>providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].baseUrl=value$1}}),testText=ref(`Hello! This is a test of voice synthesis.`),isGenerating=ref(!1),audioUrl=ref(``),errorMessage=ref(``),audioPlayer=ref(null),useSSML=ref(!1),ssmlText=ref(``),activeSpeechVoice=ref(``),voiceSettings=ref({});function initializeVoiceSettings(){providers.value[props.providerId]?.voiceSettings?voiceSettings.value={...providers.value[props.providerId].voiceSettings}:voiceSettings.value={pitch:0,speed:1,volume:0,...props.additionalSettings}}onMounted(()=>{providersStore.initializeProvider(props.providerId),apiKey.value=providers.value[props.providerId]?.apiKey||``,baseUrl.value=providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``,initializeVoiceSettings(),providersStore.configuredProviders[props.providerId]&&speechStore.loadVoicesForProvider(props.providerId)});let debouncedUpdate=useDebounceFn(()=>{providers.value[props.providerId]={...providers.value[props.providerId],apiKey:apiKey.value,baseUrl:baseUrl.value||providerMetadata.value?.defaultOptions?.().baseUrl||``,voiceSettings:{...voiceSettings.value}}},1e3);watch([apiKey,baseUrl],debouncedUpdate),watch(voiceSettings,debouncedUpdate,{deep:!0});async function generateTestSpeech(){if(!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim())return;let provider=providersStore.getProviderInstance(props.providerId);if(!provider){console.error(`Failed to initialize speech provider`);return}if(!activeSpeechVoice.value){console.error(`No active speech voice selected`);return}isGenerating.value=!0,errorMessage.value=``;try{audioUrl.value&&stopTestAudio();let modelToUse=props.defaultModel||`default`,input=useSSML.value?ssmlText.value:testText.value,response=await generateSpeech({...provider.speech(modelToUse,{voiceSettings:voiceSettings.value}),input,voice:activeSpeechVoice.value});audioUrl.value=URL.createObjectURL(new Blob([response])),setTimeout(()=>{audioPlayer.value&&audioPlayer.value.play()},100)}catch(error){console.error(`Error generating speech:`,error),errorMessage.value=error instanceof Error?error.message:`An unknown error occurred`}finally{isGenerating.value=!1}}function stopTestAudio(){audioPlayer.value&&(audioPlayer.value.pause(),audioPlayer.value.currentTime=0),audioUrl.value&&(URL.revokeObjectURL(audioUrl.value),audioUrl.value=``)}onUnmounted(()=>{audioUrl.value&&URL.revokeObjectURL(audioUrl.value)});function handleResetVoiceSettings(){voiceSettings.value={...providerMetadata.value?.defaultOptions?.().voiceSettings||{}},debouncedUpdate()}function updateVoiceSetting(key$1,value$1){voiceSettings.value[key$1]=value$1}let slotData=computed(()=>({voiceSettings:voiceSettings.value,updateVoiceSettings:updateVoiceSetting,isGenerating:isGenerating.value,testText:testText.value,useSSML:useSSML.value,ssmlText:ssmlText.value,generateTestSpeech,stopTestAudio,audioUrl:audioUrl.value,audioPlayer:audioPlayer.value,errorMessage:errorMessage.value}));return(_ctx,_cache$1)=>(openBlock(),createBlock(ProviderSettingsLayout2_default,{"provider-name":providerMetadata.value?.localizedName,"provider-icon":providerMetadata.value?.icon,"on-back":()=>unref(router$1).back()},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$10,[createVNode(unref(ProviderSettingsContainer_default),{class:`w-full md:w-[40%]`},{default:withCtx(()=>[createVNode(unref(ProviderBasicSettings_default),{title:unref(t)(`settings.pages.providers.common.section.basic.title`),description:unref(t)(`settings.pages.providers.common.section.basic.description`),"on-reset":handleResetVoiceSettings},{default:withCtx(()=>[createVNode(unref(ProviderApiKeyInput_default),{modelValue:apiKey.value,"onUpdate:modelValue":_cache$1[0]||=$event=>apiKey.value=$event,"provider-name":providerMetadata.value?.localizedName,placeholder:`sk-`},null,8,[`modelValue`,`provider-name`]),renderSlot(_ctx.$slots,`basic-settings`)]),_:3},8,[`title`,`description`]),createBaseVNode(`div`,_hoisted_2$4,[createBaseVNode(`h2`,_hoisted_3$1,toDisplayString(unref(t)(`settings.pages.providers.common.section.voice.title`)),1),createBaseVNode(`div`,_hoisted_4$1,[renderSlot(_ctx.$slots,`voice-settings`,normalizeProps(guardReactiveProps(slotData.value)))])]),createVNode(unref(ProviderAdvancedSettings_default),{title:unref(t)(`settings.pages.providers.common.section.advanced.title`)},{default:withCtx(()=>[createVNode(unref(ProviderBaseUrlInput_default),{modelValue:baseUrl.value,"onUpdate:modelValue":_cache$1[1]||=$event=>baseUrl.value=$event,placeholder:providerMetadata.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`]),renderSlot(_ctx.$slots,`advanced-settings`)]),_:3},8,[`title`])]),_:3}),createBaseVNode(`div`,_hoisted_5$1,[createBaseVNode(`div`,_hoisted_6$1,[renderSlot(_ctx.$slots,`playground`,normalizeProps(guardReactiveProps(slotData.value)))])])])]),_:3},8,[`provider-name`,`provider-icon`,`on-back`]))}}),SpeechProviderSettings_default=SpeechProviderSettings_vue_vue_type_script_setup_true_lang_default;function N(t,n$2){let e$3=[];for(let r$2=0;r$20}function W(t,n$2){return t.compare(n$2)<=0}function G(t,n$2){return t.compare(n$2)>=0}function V(t,n$2,e$3){return G(t,n$2)&&W(t,e$3)}function v(t,n$2,e$3){return P(t,n$2)&&q(t,e$3)}function H(t,n$2,e$3){let r$2=$14e0f24ef4ac5c92$export$2061056d06d7cdf7(t,e$3);return n$2>r$2?t.subtract({days:r$2+7-n$2}):n$2===r$2?t:t.subtract({days:r$2-n$2})}function J(t,n$2,e$3){let r$2=$14e0f24ef4ac5c92$export$2061056d06d7cdf7(t,e$3),a$2=n$2===0?6:n$2-1;return r$2===a$2?t:r$2>a$2?t.add({days:7-r$2+a$2}):t.add({days:a$2-r$2})}function b(t,n$2,e$3,r$2){if(e$3===void 0&&r$2===void 0)return!0;let a$2=t.add({days:1});if(r$2!=null&&r$2(a$2)||e$3!=null&&e$3(a$2))return!1;let s$1=n$2;for(;a$2.compare(s$1)<0;)if(a$2=a$2.add({days:1}),r$2!=null&&r$2(a$2)||e$3!=null&&e$3(a$2))return!1;return!0}function A(t,n$2){let e$3=[],r$2=t.add({days:1}),a$2=n$2;for(;r$2.compare(a$2)<0;)e$3.push(r$2),r$2=r$2.add({days:1});return e$3}function y(t){let{dateObj:n$2,weekStartsOn:e$3,fixedWeeks:r$2,locale:a$2}=t,s$1=R(n$2),o$1=Array.from({length:s$1},(D$1,u$1)=>n$2.set({day:u$1+1})),f$3=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(n$2),i$1=$14e0f24ef4ac5c92$export$a2258d9c4118825c(n$2),x$3=H(f$3,e$3,a$2),T$1=J(i$1,e$3,a$2),l$1=A(x$3.subtract({days:1}),f$3),c$4=A(i$1,T$1.add({days:1})),g$2=l$1.length+o$1.length+c$4.length;if(r$2&&g$2<42){let D$1=42-g$2,u$1=c$4[c$4.length-1];u$1||=$14e0f24ef4ac5c92$export$a2258d9c4118825c(n$2);let k$4=Array.from({length:D$1},(K$1,C$3)=>{let I=C$3+1;return u$1.add({days:I})});c$4.push(...k$4)}let p$5=l$1.concat(o$1,c$4),B$2=N(p$5,7);return{value:n$2,cells:p$5,rows:B$2}}function rt$1(t){let{numberOfMonths:n$2,dateObj:e$3,...r$2}=t,a$2=[];if(!n$2||n$2===1)return a$2.push(y({...r$2,dateObj:e$3})),a$2;a$2.push(y({...r$2,dateObj:e$3}));for(let s$1=1;s$1{let i$1=inject(n$2,r$2);if(i$1||i$1===null)return i$1;throw Error(`Injection \`${n$2.toString()}\` not found. Component must be used within ${Array.isArray(a$2)?`one of the following components: ${a$2.join(`, `)}`:`\`${a$2}\``}`)},r$2=>(provide(n$2,r$2),r$2)]}function jt(a$2,t,e$3){let n$2=e$3.originalEvent.target,l$1=new CustomEvent(a$2,{bubbles:!1,cancelable:!0,detail:e$3});t&&n$2.addEventListener(a$2,t,{once:!0}),n$2.dispatchEvent(l$1)}function Ut(a$2,t=-1/0,e$3=1/0){return Math.min(e$3,Math.max(t,a$2))}function Da(a$2,t){let e$3=a$2,n$2=t.toString(),l$1=n$2.indexOf(`.`),s$1=l$1>=0?n$2.length-l$1:0;if(s$1>0){let r$2=10**s$1;e$3=Math.round(e$3*r$2)/r$2}return e$3}function Wr(a$2,t,e$3,n$2){t=Number(t),e$3=Number(e$3);let l$1=(a$2-(Number.isNaN(t)?0:t))%n$2,s$1=Da(Math.abs(l$1)*2>=n$2?a$2+Math.sign(l$1)*(n$2-Math.abs(l$1)):a$2-l$1,n$2);return Number.isNaN(t)?!Number.isNaN(e$3)&&s$1>e$3&&(s$1=Math.floor(Da(e$3/n$2,n$2))*n$2):s$1e$3&&(s$1=t+Math.floor(Da((e$3-t)/n$2,n$2))*n$2),s$1=Da(s$1,n$2),s$1}function jr(a$2){return a$2&&a$2.__esModule&&Object.prototype.hasOwnProperty.call(a$2,`default`)?a$2.default:a$2}var Ur=function a$2(t,e$3){if(t===e$3)return!0;if(t&&e$3&&typeof t==`object`&&typeof e$3==`object`){if(t.constructor!==e$3.constructor)return!1;var n$2,l$1,s$1;if(Array.isArray(t)){if(n$2=t.length,n$2!=e$3.length)return!1;for(l$1=n$2;l$1--!==0;)if(!a$2(t[l$1],e$3[l$1]))return!1;return!0}if(t.constructor===RegExp)return t.source===e$3.source&&t.flags===e$3.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e$3.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e$3.toString();if(s$1=Object.keys(t),n$2=s$1.length,n$2!==Object.keys(e$3).length)return!1;for(l$1=n$2;l$1--!==0;)if(!Object.prototype.hasOwnProperty.call(e$3,s$1[l$1]))return!1;for(l$1=n$2;l$1--!==0;){var r$2=s$1[l$1];if(!a$2(t[r$2],e$3[r$2]))return!1}return!0}return t!==t&&e$3!==e$3};const Qe=jr(Ur);function Gr(a$2,t){if(a$2.length!==t.length)return!1;for(let e$3=0;e$3Qe(i$1,t)),l$1=a$2.findIndex(i$1=>Qe(i$1,e$3));if(n$2===-1||l$1===-1)return[];let[s$1,r$2]=[n$2,l$1].sort((i$1,u$1)=>i$1-u$1);return a$2.slice(s$1,r$2+1)}const ha=typeof document<`u`;function ht$1(a$2){return a$2==null}function Yt(a$2){let{defaultValue:t,defaultPlaceholder:e$3,granularity:n$2=`day`,locale:l$1=`en`}=a$2;if(Array.isArray(t)&&t.length)return t.at(-1).copy();if(t&&!Array.isArray(t))return t.copy();if(e$3)return e$3.copy();let s$1=new Date,r$2=s$1.getFullYear(),i$1=s$1.getMonth()+1,u$1=s$1.getDate(),d$2=[`hour`,`minute`,`second`],c$4=new $fb18d541ea1ad717$export$ad991b66133851cf(l$1),f$3=$64244302c3013299$export$dd0bbc9b26defe37(c$4.resolvedOptions().calendar);return d$2.includes(n$2??`day`)?$11d87f3f76e88657$export$b4a036af3fc0b032(new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(r$2,i$1,u$1,0,0,0),f$3):$11d87f3f76e88657$export$b4a036af3fc0b032(new $35ea8db9cb2ccb90$export$99faa760c7908e4f(r$2,i$1,u$1),f$3)}const qr=`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(`.`),Yr=[`year`,`month`,`day`],gn={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 Xr(a$2){if(Wo(a$2))return gn[a$2];{let t=ei(a$2);return Wo(t)?gn[t]:gn.en}}function bn(a$2,t,e$3){return Zr(a$2)?Xr(e$3)[a$2]:Qr(a$2)?t:Jr(a$2)?`––`:``}function Wo(a$2){return qr.includes(a$2)}function Zr(a$2){return Yr.includes(a$2)}function Jr(a$2){return a$2===`hour`||a$2===`minute`||a$2===`second`}function Qr(a$2){return a$2===`era`||a$2===`dayPeriod`}function ei(a$2){return Intl.Locale?new Intl.Locale(a$2).language:a$2.split(`-`)[0]}const Wn=[`day`,`month`,`year`],xl=[`hour`,`minute`,`second`,`dayPeriod`],Sl=[...Wn,...xl];function ti(a$2){return Wn.includes(a$2)}function El(a$2){return Sl.includes(a$2)}function ai(a$2,t){let e$3={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 a$2===`day`&&(delete e$3.second,delete e$3.hour,delete e$3.minute,delete e$3.timeZoneName),a$2===`hour`&&(delete e$3.minute,delete e$3.second),a$2===`minute`&&delete e$3.second,e$3}function Pl(a$2){let t=a$2.querySelector(`[data-selected]`);if(t)return t.focus();let e$3=a$2.querySelector(`[data-today]`);if(e$3)return e$3.focus();let n$2=a$2.querySelector(`[data-radix-vue-calendar-day]`);if(n$2)return n$2.focus()}function ni(a$2,t){var e$3;let n$2=shallowRef();return watchEffect(()=>{n$2.value=a$2()},{...t,flush:(e$3=void 0,`sync`)}),readonly(n$2)}function oi(a$2,t){let e$3,n$2,l$1,s$1=ref(!0),r$2=()=>{s$1.value=!0,l$1()};watch(a$2,r$2,{flush:`sync`});let i$1=typeof t==`function`?t:t.get,u$1=typeof t==`function`?void 0:t.set,d$2=customRef((c$4,f$3)=>(n$2=c$4,l$1=f$3,{get(){return s$1.value&&(e$3=i$1(),s$1.value=!1),n$2(),e$3},set(v$2){u$1?.(v$2)}}));return Object.isExtensible(d$2)&&(d$2.trigger=r$2),d$2}function bt$1(a$2){return getCurrentScope()?(onScopeDispose(a$2),!0):!1}function ua(){let a$2=new Set,t=l$1=>{a$2.delete(l$1)};return{on:l$1=>{a$2.add(l$1);let s$1=()=>t(l$1);return bt$1(s$1),{off:s$1}},off:t,trigger:(...l$1)=>Promise.all(Array.from(a$2).map(s$1=>s$1(...l$1)))}}function li(a$2){let t=!1,e$3,n$2=effectScope(!0);return(...l$1)=>(t||(e$3=n$2.run(()=>a$2(...l$1)),t=!0),e$3)}function Dl(a$2){let t=0,e$3,n$2,l$1=()=>{--t,n$2&&t<=0&&(n$2.stop(),e$3=void 0,n$2=void 0)};return(...s$1)=>(t+=1,e$3||(n$2=effectScope(!0),e$3=n$2.run(()=>a$2(...s$1))),bt$1(l$1),e$3)}function je(a$2){return typeof a$2==`function`?a$2():unref(a$2)}function si(a$2){if(!isRef(a$2))return reactive(a$2);let t=new Proxy({},{get(e$3,n$2,l$1){return unref(Reflect.get(a$2.value,n$2,l$1))},set(e$3,n$2,l$1){return isRef(a$2.value[n$2])&&!isRef(l$1)?a$2.value[n$2].value=l$1:a$2.value[n$2]=l$1,!0},deleteProperty(e$3,n$2){return Reflect.deleteProperty(a$2.value,n$2)},has(e$3,n$2){return Reflect.has(a$2.value,n$2)},ownKeys(){return Object.keys(a$2.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return reactive(t)}function $l(a$2){return si(computed(a$2))}const Je=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const ri=a$2=>typeof a$2<`u`,ii=a$2=>a$2!=null,ui=Object.prototype.toString,di=a$2=>ui.call(a$2)===`[object Object]`,Na=()=>{},jo=ci();function ci(){var a$2,t;return Je&&(a$2=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 Bl(a$2,t){function e$3(...n$2){return new Promise((l$1,s$1)=>{Promise.resolve(a$2(()=>t.apply(this,n$2),{fn:t,thisArg:this,args:n$2})).then(l$1).catch(s$1)})}return e$3}function fi(a$2,t={}){let e$3,n$2,l$1=Na,s$1=i$1=>{clearTimeout(i$1),l$1(),l$1=Na};return i$1=>{let u$1=je(a$2),d$2=je(t.maxWait);return e$3&&s$1(e$3),u$1<=0||d$2!==void 0&&d$2<=0?(n$2&&(s$1(n$2),n$2=null),Promise.resolve(i$1())):new Promise((c$4,f$3)=>{l$1=t.rejectOnCancel?f$3:c$4,d$2&&!n$2&&(n$2=setTimeout(()=>{e$3&&s$1(e$3),n$2=null,c$4(i$1())},d$2)),e$3=setTimeout(()=>{n$2&&s$1(n$2),n$2=null,c$4(i$1())},u$1)})}}function Tl(a$2){return getCurrentInstance()}function Tt$1(a$2,t=1e4){return customRef((e$3,n$2)=>{let l$1=je(a$2),s$1,r$2=()=>setTimeout(()=>{l$1=je(a$2),n$2()},je(t));return bt$1(()=>{clearTimeout(s$1)}),{get(){return e$3(),l$1},set(i$1){l$1=i$1,n$2(),clearTimeout(s$1),s$1=r$2()}}})}function jn(a$2,t=200,e$3={}){return Bl(fi(t,e$3),a$2)}function hi(a$2,t){Tl()&&onBeforeUnmount(a$2,t)}function yi(a$2,t=!0,e$3){Tl()?onMounted(a$2,e$3):t?a$2():nextTick(a$2)}function Un(a$2,t,e$3={}){let{immediate:n$2=!0}=e$3,l$1=ref(!1),s$1=null;function r$2(){s$1&&(clearTimeout(s$1),s$1=null)}function i$1(){l$1.value=!1,r$2()}function u$1(...d$2){r$2(),l$1.value=!0,s$1=setTimeout(()=>{l$1.value=!1,s$1=null,a$2(...d$2)},je(t))}return n$2&&(l$1.value=!0,Je&&u$1()),bt$1(i$1),{isPending:readonly(l$1),start:u$1,stop:i$1}}function gi(a$2=1e3,t={}){let{controls:e$3=!1,callback:n$2}=t,l$1=Un(n$2??Na,a$2,t),s$1=computed(()=>!l$1.isPending.value);return e$3?{ready:s$1,...l$1}:s$1}function bi(a$2,t,e$3){let n$2=watch(a$2,(...l$1)=>(nextTick(()=>n$2()),t(...l$1)),e$3);return n$2}function $e$1(a$2){var t;let e$3=je(a$2);return(t=e$3?.$el)??e$3}const Rt=Je?window:void 0;function He(...a$2){let t,e$3,n$2,l$1;if(typeof a$2[0]==`string`||Array.isArray(a$2[0])?([e$3,n$2,l$1]=a$2,t=Rt):[t,e$3,n$2,l$1]=a$2,!t)return Na;Array.isArray(e$3)||(e$3=[e$3]),Array.isArray(n$2)||(n$2=[n$2]);let s$1=[],r$2=()=>{s$1.forEach(c$4=>c$4()),s$1.length=0},i$1=(c$4,f$3,v$2,p$5)=>(c$4.addEventListener(f$3,v$2,p$5),()=>c$4.removeEventListener(f$3,v$2,p$5)),u$1=watch(()=>[$e$1(t),je(l$1)],([c$4,f$3])=>{if(r$2(),!c$4)return;let v$2=di(f$3)?{...f$3}:f$3;s$1.push(...e$3.flatMap(p$5=>n$2.map(g$2=>i$1(c$4,p$5,g$2,v$2))))},{immediate:!0,flush:`post`}),d$2=()=>{u$1(),r$2()};return bt$1(d$2),d$2}function Ci(a$2){return typeof a$2==`function`?a$2:typeof a$2==`string`?t=>t.key===a$2:Array.isArray(a$2)?t=>a$2.includes(t.key):()=>!0}function Gn(...a$2){let t,e$3,n$2={};a$2.length===3?(t=a$2[0],e$3=a$2[1],n$2=a$2[2]):a$2.length===2?typeof a$2[1]==`object`?(t=!0,e$3=a$2[0],n$2=a$2[1]):(t=a$2[0],e$3=a$2[1]):(t=!0,e$3=a$2[0]);let{target:l$1=Rt,eventName:s$1=`keydown`,passive:r$2=!1,dedupe:i$1=!1}=n$2,u$1=Ci(t);return He(l$1,s$1,c$4=>{c$4.repeat&&je(i$1)||u$1(c$4)&&e$3(c$4)},r$2)}function Ga(){let a$2=ref(!1),t=getCurrentInstance();return t&&onMounted(()=>{a$2.value=!0},t),a$2}function Rl(a$2){let t=Ga();return computed(()=>(t.value,!!a$2()))}function Al(a$2,t,e$3={}){let{window:n$2=Rt,...l$1}=e$3,s$1,r$2=Rl(()=>n$2&&`MutationObserver`in n$2),i$1=()=>{s$1&&(s$1.disconnect(),s$1=void 0)},u$1=computed(()=>{let v$2=je(a$2),p$5=(Array.isArray(v$2)?v$2:[v$2]).map($e$1).filter(ii);return new Set(p$5)}),d$2=watch(()=>u$1.value,v$2=>{i$1(),r$2.value&&v$2.size&&(s$1=new MutationObserver(t),v$2.forEach(p$5=>s$1.observe(p$5,l$1)))},{immediate:!0,flush:`post`}),c$4=()=>s$1?.takeRecords(),f$3=()=>{i$1(),d$2()};return bt$1(f$3),{isSupported:r$2,stop:f$3,takeRecords:c$4}}function wi(a$2={}){var t;let{window:e$3=Rt,deep:n$2=!0,triggerOnRemoval:l$1=!1}=a$2,s$1=(t=a$2.document)??e$3?.document,r$2=()=>{var d$2;let c$4=s$1?.activeElement;if(n$2)for(;c$4!=null&&c$4.shadowRoot;)c$4=(d$2=c$4?.shadowRoot)?.activeElement;return c$4},i$1=ref(),u$1=()=>{i$1.value=r$2()};return e$3&&(He(e$3,`blur`,d$2=>{d$2.relatedTarget===null&&u$1()},!0),He(e$3,`focus`,u$1,!0)),l$1&&Al(s$1,d$2=>{d$2.filter(c$4=>c$4.removedNodes.length).map(c$4=>Array.from(c$4.removedNodes)).flat().forEach(c$4=>{c$4===i$1.value&&u$1()})},{childList:!0,subtree:!0}),u$1(),i$1}function Ol(a$2,t={}){let{immediate:e$3=!0,fpsLimit:n$2=void 0,window:l$1=Rt}=t,s$1=ref(!1),r$2=n$2?1e3/n$2:null,i$1=0,u$1=null;function d$2(v$2){if(!s$1.value||!l$1)return;i$1||=v$2;let p$5=v$2-i$1;if(r$2&&p$5null,()=>t.proxy.$el);return onUpdated(e$3.trigger),onMounted(e$3.trigger),e$3}function tt(a$2,t,e$3={}){let{window:n$2=Rt,...l$1}=e$3,s$1,r$2=Rl(()=>n$2&&`ResizeObserver`in n$2),i$1=()=>{s$1&&(s$1.disconnect(),s$1=void 0)},u$1=computed(()=>Array.isArray(a$2)?a$2.map(f$3=>$e$1(f$3)):[$e$1(a$2)]),d$2=watch(u$1,f$3=>{if(i$1(),r$2.value&&n$2){s$1=new ResizeObserver(t);for(let v$2 of f$3)v$2&&s$1.observe(v$2,l$1)}},{immediate:!0,flush:`post`}),c$4=()=>{i$1(),d$2()};return bt$1(c$4),{isSupported:r$2,stop:c$4}}function Si(a$2,t={}){let e$3=wi(t),n$2=computed(()=>$e$1(a$2));return{focused:computed(()=>n$2.value&&e$3.value?n$2.value.contains(e$3.value):!1)}}function kl(a$2=xi()){let t=shallowRef(),e$3=()=>{let n$2=$e$1(a$2);n$2&&(t.value=n$2.parentElement)};return yi(e$3),watch(()=>je(a$2),e$3),t}function ne(a$2,t,e$3,n$2={}){var l$1,s$1,r$2;let{clone:i$1=!1,passive:u$1=!1,eventName:d$2,deep:c$4=!1,defaultValue:f$3,shouldEmit:v$2}=n$2,p$5=getCurrentInstance(),g$2=e$3||p$5?.emit||(l$1=p$5?.$emit)?.bind(p$5)||(r$2=(s$1=p$5?.proxy)?.$emit)?.bind(p$5?.proxy),m$3=d$2;t||=`modelValue`,m$3||=`update:${t.toString()}`;let _$2=h$3=>i$1?typeof i$1==`function`?i$1(h$3):_i(h$3):h$3,C$3=()=>ri(a$2[t])?_$2(a$2[t]):f$3,$$2=h$3=>{v$2?v$2(h$3)&&g$2(m$3,h$3):g$2(m$3,h$3)};if(u$1){let h$3=C$3(),E$2=ref(h$3),P$2=!1;return watch(()=>a$2[t],D$1=>{P$2||(P$2=!0,E$2.value=_$2(D$1),nextTick(()=>P$2=!1))}),watch(E$2,D$1=>{!P$2&&(D$1!==a$2[t]||c$4)&&$$2(D$1)},{deep:c$4}),E$2}else return computed({get(){return C$3()},set(h$3){$$2(h$3)}})}function qa(a$2){return a$2?a$2.flatMap(t=>t.type===Fragment?qa(t.children):[t]):[]}function me(){let a$2=document.activeElement;if(a$2==null)return null;for(;a$2!=null&&a$2.shadowRoot!=null&&a$2.shadowRoot.activeElement!=null;)a$2=a$2.shadowRoot.activeElement;return a$2}const Ei=[`INPUT`,`TEXTAREA`];function At(a$2,t,e$3,n$2={}){if(!t||n$2.enableIgnoredElement&&Ei.includes(t.nodeName))return null;let{arrowKeyOptions:l$1=`both`,attributeName:s$1=`[data-radix-vue-collection-item]`,itemsArray:r$2=[],loop:i$1=!0,dir:u$1=`ltr`,preventScroll:d$2=!0,focus:c$4=!1}=n$2,[f$3,v$2,p$5,g$2,m$3,_$2]=[a$2.key===`ArrowRight`,a$2.key===`ArrowLeft`,a$2.key===`ArrowUp`,a$2.key===`ArrowDown`,a$2.key===`Home`,a$2.key===`End`],C$3=p$5||g$2,$$2=f$3||v$2;if(!m$3&&!_$2&&(!C$3&&!$$2||l$1===`vertical`&&$$2||l$1===`horizontal`&&C$3))return null;let h$3=e$3?Array.from(e$3.querySelectorAll(s$1)):r$2;if(!h$3.length)return null;d$2&&a$2.preventDefault();let E$2=null;return $$2||C$3?E$2=Ml(h$3,t,{goForward:C$3?g$2:u$1===`ltr`?f$3:v$2,loop:i$1}):m$3?E$2=h$3.at(0)||null:_$2&&(E$2=h$3.at(-1)||null),c$4&&E$2?.focus(),E$2}function Ml(a$2,t,e$3,n$2=a$2.length){if(--n$2===0)return null;let l$1=a$2.indexOf(t),s$1=e$3.goForward?l$1+1:l$1-1;if(!e$3.loop&&(s$1<0||s$1>=a$2.length))return null;let r$2=(s$1+a$2.length)%a$2.length,i$1=a$2[r$2];return i$1?i$1.hasAttribute(`disabled`)&&i$1.getAttribute(`disabled`)!==`false`?Ml(a$2,i$1,e$3,n$2):i$1:null}function Cn(a$2){if(typeof a$2!=`object`||!a$2)return!1;let t=Object.getPrototypeOf(a$2);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in a$2?!1:Symbol.toStringTag in a$2?Object.prototype.toString.call(a$2)===`[object Module]`:!0}function $n(a$2,t,e$3=`.`,n$2){if(!Cn(t))return $n(a$2,{},e$3,n$2);let l$1=Object.assign({},t);for(let s$1 in a$2){if(s$1===`__proto__`||s$1===`constructor`)continue;let r$2=a$2[s$1];r$2!=null&&(n$2&&n$2(l$1,s$1,r$2,e$3)||(Array.isArray(r$2)&&Array.isArray(l$1[s$1])?l$1[s$1]=[...r$2,...l$1[s$1]]:Cn(r$2)&&Cn(l$1[s$1])?l$1[s$1]=$n(r$2,l$1[s$1],(e$3?`${e$3}.`:``)+s$1.toString(),n$2):l$1[s$1]=r$2))}return l$1}function Pi(a$2){return(...t)=>t.reduce((e$3,n$2)=>$n(e$3,n$2,``,a$2),{})}const Di=Pi(),[Ya,$i]=te(`ConfigProvider`),xv=defineComponent({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(a$2){let t=a$2,{dir:e$3,scrollBody:n$2,nonce:l$1}=toRefs(t);return $i({dir:e$3,scrollBody:n$2,nonce:l$1,useId:t.useId}),(s$1,r$2)=>renderSlot(s$1.$slots,`default`)}});let Bi=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,Ii=(a$2=21)=>{let t=``,e$3=a$2;for(;e$3--;)t+=Bi[Math.random()*64|0];return t};const Ti=Dl(()=>{let a$2=ref(new Map),t=ref(),e$3=computed(()=>{for(let r$2 of a$2.value.values())if(r$2)return!0;return!1}),n$2=Ya({scrollBody:ref(!0)}),l$1=null,s$1=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.body.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,jo&&l$1?.(),t.value=void 0};return watch(e$3,(r$2,i$1)=>{var f$3;if(!Je)return;if(!r$2){i$1&&s$1();return}t.value===void 0&&(t.value=document.body.style.overflow);let u$1=window.innerWidth-document.documentElement.clientWidth,d$2={padding:u$1,margin:0},c$4=(f$3=n$2.scrollBody)!=null&&f$3.value?typeof n$2.scrollBody.value==`object`?Di({padding:n$2.scrollBody.value.padding===!0?u$1:n$2.scrollBody.value.padding,margin:n$2.scrollBody.value.margin===!0?u$1:n$2.scrollBody.value.margin},d$2):d$2:{padding:0,margin:0};u$1>0&&(document.body.style.paddingRight=typeof c$4.padding==`number`?`${c$4.padding}px`:String(c$4.padding),document.body.style.marginRight=typeof c$4.margin==`number`?`${c$4.margin}px`:String(c$4.margin),document.body.style.setProperty(`--scrollbar-width`,`${u$1}px`),document.body.style.overflow=`hidden`),jo&&(l$1=He(document,`touchmove`,v$2=>Ri(v$2),{passive:!1})),nextTick(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})},{immediate:!0,flush:`sync`}),a$2});function ya(a$2){let t=Ii(6),e$3=Ti();e$3.value.set(t,a$2??!1);let n$2=computed({get:()=>e$3.value.get(t)??!1,set:l$1=>e$3.value.set(t,l$1)});return hi(()=>{e$3.value.delete(t)}),n$2}function Vl(a$2){let t=window.getComputedStyle(a$2);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&a$2.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}const Ai=`data-radix-vue-collection-item`;function Fe(a$2,t=Ai){let e$3=a$2??Symbol();return{createCollection:s$1=>{let r$2=ref([]);function i$1(){let u$1=$e$1(s$1);return u$1?r$2.value=Array.from(u$1.querySelectorAll(`[${t}]:not([data-disabled])`)):r$2.value=[]}return onBeforeUpdate(()=>{r$2.value=[]}),onMounted(i$1),onUpdated(i$1),watch(()=>s$1?.value,i$1,{immediate:!0}),provide(e$3,r$2),r$2},injectCollection:()=>inject(e$3,ref([]))}}function qn(a$2){let t=ref(a$2);function e$3(){return t.value}function n$2(m$3){t.value=m$3}function l$1(m$3,_$2){return new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,_$2).format(m$3)}function s$1(m$3,_$2=!0){return z(m$3)&&_$2?l$1($(m$3),{dateStyle:`long`,timeStyle:`long`}):l$1($(m$3),{dateStyle:`long`})}function r$2(m$3,_$2={}){return new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{month:`long`,year:`numeric`,..._$2}).format(m$3)}function i$1(m$3,_$2={}){return new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{month:`long`,..._$2}).format(m$3)}function u$1(){let m$3=$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2());return[1,2,3,4,5,6,7,8,9,10,11,12].map(C$3=>({label:i$1($(m$3.set({month:C$3}))),value:C$3}))}function d$2(m$3,_$2={}){return new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{year:`numeric`,..._$2}).format(m$3)}function c$4(m$3,_$2){return m(m$3)?new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{..._$2,timeZone:m$3.timeZone}).formatToParts($(m$3)):new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,_$2).formatToParts($(m$3))}function f$3(m$3,_$2=`narrow`){return new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{weekday:_$2}).format(m$3)}function v$2(m$3){var $$2;return($$2=new $fb18d541ea1ad717$export$ad991b66133851cf(t.value,{hour:`numeric`,minute:`numeric`}).formatToParts(m$3).find(h$3=>h$3.type===`dayPeriod`))?.value===`PM`?`PM`:`AM`}let p$5={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`};function g$2(m$3,_$2,C$3={}){let $$2={...p$5,...C$3},E$2=c$4(m$3,$$2).find(P$2=>P$2.type===_$2);return E$2?E$2.value:``}return{setLocale:n$2,getLocale:e$3,fullMonth:i$1,fullYear:d$2,fullMonthAndYear:r$2,toParts:c$4,custom:l$1,part:g$2,dayPeriod:v$2,selectedDate:s$1,dayOfWeek:f$3,getMonths:u$1}}function we(a$2){let t=Ya({dir:ref(`ltr`)});return computed(()=>{var e$3;return a$2?.value||(e$3=t.dir)?.value||`ltr`})}function Te$1(a$2){let t=getCurrentInstance(),e$3=t?.type.emits,n$2={};return e$3!=null&&e$3.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),e$3?.forEach(l$1=>{n$2[toHandlerKey(camelize(l$1))]=(...s$1)=>a$2(l$1,...s$1)}),n$2}let wn=0;function Yn(){watchEffect(a$2=>{if(!Je)return;let t=document.querySelectorAll(`[data-radix-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??Go()),document.body.insertAdjacentElement(`beforeend`,t[1]??Go()),wn++,a$2(()=>{wn===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e$3=>e$3.remove()),wn--})})}function Go(){let a$2=document.createElement(`span`);return a$2.setAttribute(`data-radix-focus-guard`,``),a$2.tabIndex=0,a$2.style.outline=`none`,a$2.style.opacity=`0`,a$2.style.position=`fixed`,a$2.style.pointerEvents=`none`,a$2}function at(a$2){return computed(()=>{var t;return je(a$2)?!!((t=$e$1(a$2))!=null&&t.closest(`form`)):!0})}function Ot$1(a$2){let t=getCurrentInstance(),e$3=Object.keys(t?.type.props??{}).reduce((l$1,s$1)=>{let r$2=(t?.type.props[s$1]).default;return r$2!==void 0&&(l$1[s$1]=r$2),l$1},{}),n$2=toRef(a$2);return computed(()=>{let l$1={},s$1=t?.vnode.props??{};return Object.keys(s$1).forEach(r$2=>{l$1[camelize(r$2)]=s$1[r$2]}),Object.keys({...e$3,...l$1}).reduce((r$2,i$1)=>(n$2.value[i$1]!==void 0&&(r$2[i$1]=n$2.value[i$1]),r$2),{})})}function Se(a$2,t){let e$3=Ot$1(a$2),n$2=t?Te$1(t):{};return computed(()=>({...e$3.value,...n$2}))}function R$1(){let a$2=getCurrentInstance(),t=ref(),e$3=computed(()=>{var r$2,i$1;return[`#text`,`#comment`].includes((r$2=t.value)?.$el.nodeName)?(i$1=t.value)?.$el.nextElementSibling:$e$1(t)}),n$2=Object.assign({},a$2.exposed),l$1={};for(let r$2 in a$2.props)Object.defineProperty(l$1,r$2,{enumerable:!0,configurable:!0,get:()=>a$2.props[r$2]});if(Object.keys(n$2).length>0)for(let r$2 in n$2)Object.defineProperty(l$1,r$2,{enumerable:!0,configurable:!0,get:()=>n$2[r$2]});Object.defineProperty(l$1,`$el`,{enumerable:!0,configurable:!0,get:()=>a$2.vnode.el}),a$2.exposed=l$1;function s$1(r$2){t.value=r$2,r$2&&(Object.defineProperty(l$1,`$el`,{enumerable:!0,configurable:!0,get:()=>r$2 instanceof Element?r$2:r$2.$el}),a$2.exposed=l$1)}return{forwardRef:s$1,currentRef:t,currentElement:e$3}}function Fl(a$2,t){let e$3=Tt$1(!1,300),n$2=ref(null),l$1=ua();function s$1(){n$2.value=null,e$3.value=!1}function r$2(i$1,u$1){let d$2=i$1.currentTarget,c$4={x:i$1.clientX,y:i$1.clientY},f$3=Oi(c$4,d$2.getBoundingClientRect()),v$2=ki(c$4,f$3),p$5=Mi(u$1.getBoundingClientRect()),g$2=Fi([...v$2,...p$5]);n$2.value=g$2,e$3.value=!0}return watchEffect(i$1=>{if(a$2.value&&t.value){let u$1=c$4=>r$2(c$4,t.value),d$2=c$4=>r$2(c$4,a$2.value);a$2.value.addEventListener(`pointerleave`,u$1),t.value.addEventListener(`pointerleave`,d$2),i$1(()=>{var c$4,f$3;(c$4=a$2.value)==null||c$4.removeEventListener(`pointerleave`,u$1),(f$3=t.value)==null||f$3.removeEventListener(`pointerleave`,d$2)})}}),watchEffect(i$1=>{var u$1;if(n$2.value){let d$2=c$4=>{var _$2,C$3;if(!n$2.value)return;let f$3=c$4.target,v$2={x:c$4.clientX,y:c$4.clientY},p$5=(_$2=a$2.value)?.contains(f$3)||(C$3=t.value)?.contains(f$3),g$2=!Vi(v$2,n$2.value),m$3=!!f$3.closest(`[data-grace-area-trigger]`);p$5?s$1():(g$2||m$3)&&(s$1(),l$1.trigger())};(u$1=a$2.value)==null||u$1.ownerDocument.addEventListener(`pointermove`,d$2),i$1(()=>{var c$4;return(c$4=a$2.value)?.ownerDocument.removeEventListener(`pointermove`,d$2)})}}),{isPointerInTransit:e$3,onPointerExit:l$1.on}}function Oi(a$2,t){let e$3=Math.abs(t.top-a$2.y),n$2=Math.abs(t.bottom-a$2.y),l$1=Math.abs(t.right-a$2.x),s$1=Math.abs(t.left-a$2.x);switch(Math.min(e$3,n$2,l$1,s$1)){case s$1:return`left`;case l$1:return`right`;case e$3:return`top`;case n$2:return`bottom`;default:throw Error(`unreachable`)}}function ki(a$2,t,e$3=5){let n$2=[];switch(t){case`top`:n$2.push({x:a$2.x-e$3,y:a$2.y+e$3},{x:a$2.x+e$3,y:a$2.y+e$3});break;case`bottom`:n$2.push({x:a$2.x-e$3,y:a$2.y-e$3},{x:a$2.x+e$3,y:a$2.y-e$3});break;case`left`:n$2.push({x:a$2.x+e$3,y:a$2.y-e$3},{x:a$2.x+e$3,y:a$2.y+e$3});break;case`right`:n$2.push({x:a$2.x-e$3,y:a$2.y-e$3},{x:a$2.x-e$3,y:a$2.y+e$3});break}return n$2}function Mi(a$2){let{top:t,right:e$3,bottom:n$2,left:l$1}=a$2;return[{x:l$1,y:t},{x:e$3,y:t},{x:e$3,y:n$2},{x:l$1,y:n$2}]}function Vi(a$2,t){let{x:e$3,y:n$2}=a$2,l$1=!1;for(let s$1=0,r$2=t.length-1;s$1n$2!=c$4>n$2&&e$3<(d$2-i$1)*(n$2-u$1)/(c$4-u$1)+i$1&&(l$1=!l$1)}return l$1}function Fi(a$2){let t=a$2.slice();return t.sort((e$3,n$2)=>e$3.xn$2.x?1:e$3.yn$2.y?1:0),Ni(t)}function Ni(a$2){if(a$2.length<=1)return a$2.slice();let t=[];for(let n$2=0;n$2=2;){let s$1=t[t.length-1],r$2=t[t.length-2];if((s$1.x-r$2.x)*(l$1.y-r$2.y)>=(s$1.y-r$2.y)*(l$1.x-r$2.x))t.pop();else break}t.push(l$1)}t.pop();let e$3=[];for(let n$2=a$2.length-1;n$2>=0;n$2--){let l$1=a$2[n$2];for(;e$3.length>=2;){let s$1=e$3[e$3.length-1],r$2=e$3[e$3.length-2];if((s$1.x-r$2.x)*(l$1.y-r$2.y)>=(s$1.y-r$2.y)*(l$1.x-r$2.x))e$3.pop();else break}e$3.push(l$1)}return e$3.pop(),t.length===1&&e$3.length===1&&t[0].x===e$3[0].x&&t[0].y===e$3[0].y?t:t.concat(e$3)}var Li=function(a$2){if(typeof document>`u`)return null;var t=Array.isArray(a$2)?a$2[0]:a$2;return t.ownerDocument.body},Kt=new WeakMap,$a=new WeakMap,Ba={},_n=0,Nl=function(a$2){return a$2&&(a$2.host||Nl(a$2.parentNode))},zi=function(a$2,t){return t.map(function(e$3){if(a$2.contains(e$3))return e$3;var n$2=Nl(e$3);return n$2&&a$2.contains(n$2)?n$2:(console.error(`aria-hidden`,e$3,`in not contained inside`,a$2,`. Doing nothing`),null)}).filter(function(e$3){return!!e$3})},Ki=function(a$2,t,e$3,n$2){var l$1=zi(t,Array.isArray(a$2)?a$2:[a$2]);Ba[e$3]||(Ba[e$3]=new WeakMap);var s$1=Ba[e$3],r$2=[],i$1=new Set,u$1=new Set(l$1),d$2=function(f$3){!f$3||i$1.has(f$3)||(i$1.add(f$3),d$2(f$3.parentNode))};l$1.forEach(d$2);var c$4=function(f$3){!f$3||u$1.has(f$3)||Array.prototype.forEach.call(f$3.children,function(v$2){if(i$1.has(v$2))c$4(v$2);else try{var p$5=v$2.getAttribute(n$2),g$2=p$5!==null&&p$5!==`false`,m$3=(Kt.get(v$2)||0)+1,_$2=(s$1.get(v$2)||0)+1;Kt.set(v$2,m$3),s$1.set(v$2,_$2),r$2.push(v$2),m$3===1&&g$2&&$a.set(v$2,!0),_$2===1&&v$2.setAttribute(e$3,`true`),g$2||v$2.setAttribute(n$2,`true`)}catch(C$3){console.error(`aria-hidden: cannot operate on `,v$2,C$3)}})};return c$4(t),i$1.clear(),_n++,function(){r$2.forEach(function(f$3){var v$2=Kt.get(f$3)-1,p$5=s$1.get(f$3)-1;Kt.set(f$3,v$2),s$1.set(f$3,p$5),v$2||($a.has(f$3)||f$3.removeAttribute(n$2),$a.delete(f$3)),p$5||f$3.removeAttribute(e$3)}),_n--,_n||(Kt=new WeakMap,Kt=new WeakMap,$a=new WeakMap,Ba={})}},Hi=function(a$2,t,e$3){e$3===void 0&&(e$3=`data-aria-hidden`);var n$2=Array.from(Array.isArray(a$2)?a$2:[a$2]),l$1=Li(a$2);return l$1?(n$2.push.apply(n$2,Array.from(l$1.querySelectorAll(`[aria-live]`))),Ki(n$2,l$1,e$3,`aria-hidden`)):function(){return null}};function ga(a$2){let t;watch(()=>$e$1(a$2),e$3=>{e$3?t=Hi(e$3):t&&t()}),onUnmounted(()=>{t&&t()})}let Wi=0;function ge(a$2,t=`radix`){if(a$2)return a$2;let e$3=Ya({useId:void 0});return useId$1?`${t}-${useId$1()}`:e$3.useId?`${t}-${e$3.useId()}`:`${t}-${++Wi}`}function ji(a$2,t){let e$3=ref(),n$2=(s$1,r$2)=>{if(t.multiple&&Array.isArray(a$2.value))if(t.selectionBehavior===`replace`)a$2.value=[s$1],e$3.value=s$1;else{let i$1=a$2.value.findIndex(u$1=>r$2(u$1));i$1===-1?a$2.value.push(s$1):a$2.value.splice(i$1,1)}else t.selectionBehavior===`replace`?a$2.value={...s$1}:!Array.isArray(a$2.value)&&r$2(a$2.value)?a$2.value=void 0:a$2.value={...s$1};return a$2.value};function l$1(s$1,r$2,i$1,u$1){var v$2;if(!(e$3!=null&&e$3.value)||!t.multiple||!Array.isArray(a$2.value))return;let c$4=(v$2=i$1().filter(p$5=>p$5.ref.dataset.disabled!==``).find(p$5=>p$5.ref===r$2))?.value;if(!c$4)return;let f$3=null;switch(s$1){case`prev`:case`next`:f$3=Bt$1(u$1,e$3.value,c$4);break;case`first`:f$3=Bt$1(u$1,e$3.value,u$1?.[0]);break;case`last`:f$3=Bt$1(u$1,e$3.value,u$1?.[u$1.length-1]);break}a$2.value=f$3}return{firstValue:e$3,onSelectItem:n$2,handleMultipleReplace:l$1}}function Ll(a$2){let t=ref(),e$3=computed(()=>{var l$1;return(l$1=t.value)?.width??0}),n$2=computed(()=>{var l$1;return(l$1=t.value)?.height??0});return onMounted(()=>{let l$1=$e$1(a$2);if(l$1){t.value={width:l$1.offsetWidth,height:l$1.offsetHeight};let s$1=new ResizeObserver(r$2=>{if(!Array.isArray(r$2)||!r$2.length)return;let i$1=r$2[0],u$1,d$2;if(`borderBoxSize`in i$1){let c$4=i$1.borderBoxSize,f$3=Array.isArray(c$4)?c$4[0]:c$4;u$1=f$3.inlineSize,d$2=f$3.blockSize}else u$1=l$1.offsetWidth,d$2=l$1.offsetHeight;t.value={width:u$1,height:d$2}});return s$1.observe(l$1,{box:`border-box`}),()=>s$1.unobserve(l$1)}else t.value=void 0}),{width:e$3,height:n$2}}function zl(a$2,t){let e$3=ref(a$2);function n$2(s$1){return t[e$3.value][s$1]??e$3.value}return{state:e$3,dispatch:s$1=>{e$3.value=n$2(s$1)}}}const Ui=`data-item-text`;function ba(a$2){let t=Tt$1(``,1e3);return{search:t,handleTypeaheadSearch:(l$1,s$1)=>{if(!(a$2!=null&&a$2.value)&&!s$1)return;t.value+=l$1;let r$2=a$2?.value??s$1,i$1=me(),u$1=r$2.map(p$5=>{var g$2;return{ref:p$5,textValue:(g$2=(p$5.querySelector(`[${Ui}]`)??p$5).textContent)?.trim()??``}}),d$2=u$1.find(p$5=>p$5.ref===i$1),c$4=u$1.map(p$5=>p$5.textValue),f$3=Zn(c$4,t.value,d$2?.textValue),v$2=u$1.find(p$5=>p$5.textValue===f$3);return v$2&&v$2.ref.focus(),v$2?.ref},resetTypeahead:()=>{t.value=``}}}function Xn(a$2,t){return a$2.map((e$3,n$2)=>a$2[(t+n$2)%a$2.length])}function Zn(a$2,t,e$3){let l$1=t.length>1&&Array.from(t).every(d$2=>d$2===t[0])?t[0]:t,s$1=e$3?a$2.indexOf(e$3):-1,r$2=Xn(a$2,Math.max(s$1,0));l$1.length===1&&(r$2=r$2.filter(d$2=>d$2!==e$3));let u$1=r$2.find(d$2=>d$2.toLowerCase().startsWith(l$1.toLowerCase()));return u$1===e$3?void 0:u$1}function nt(){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 Jn=defineComponent({name:`PrimitiveSlot`,inheritAttrs:!1,setup(a$2,{attrs:t,slots:e$3}){return()=>{var u$1,d$2;if(!e$3.default)return null;let n$2=qa(e$3.default()),l$1=n$2.findIndex(c$4=>c$4.type!==Comment);if(l$1===-1)return n$2;let s$1=n$2[l$1];(u$1=s$1.props)==null||delete u$1.ref;let r$2=s$1.props?mergeProps(t,s$1.props):t;t.class&&(d$2=s$1.props)!=null&&d$2.class&&delete s$1.props.class;let i$1=cloneVNode(s$1,r$2);for(let c$4 in r$2)c$4.startsWith(`on`)&&(i$1.props||={},i$1.props[c$4]=r$2[c$4]);return n$2.length===1?i$1:(n$2[l$1]=i$1,n$2)}}}),O$1=defineComponent({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(a$2,{attrs:t,slots:e$3}){let n$2=a$2.asChild?`template`:a$2.as;return typeof n$2==`string`&&[`area`,`img`,`input`].includes(n$2)?()=>h(n$2,t):n$2===`template`?()=>h(Jn,t,{default:e$3.default}):()=>h(a$2.as,t,{default:e$3.default})}});function Re(){let a$2=ref(),t=computed(()=>{var e$3,n$2;return[`#text`,`#comment`].includes((e$3=a$2.value)?.$el.nodeName)?(n$2=a$2.value)?.$el.nextElementSibling:$e$1(a$2)});return{primitiveElement:a$2,currentElement:t}}const[Kl,Gi]=te(`CollapsibleRoot`),qi=defineComponent({__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(a$2,{expose:t,emit:e$3}){let n$2=a$2,s$1=ne(n$2,`open`,e$3,{defaultValue:n$2.defaultOpen,passive:n$2.open===void 0}),r$2=ne(n$2,`disabled`);return Gi({contentId:``,disabled:r$2,open:s$1,onOpenToggle:()=>{s$1.value=!s$1.value}}),t({open:s$1}),R$1(),(i$1,u$1)=>(openBlock(),createBlock(unref(O$1),{as:i$1.as,"as-child":n$2.asChild,"data-state":unref(s$1)?`open`:`closed`,"data-disabled":unref(r$2)?``:void 0},{default:withCtx(()=>[renderSlot(i$1.$slots,`default`,{open:unref(s$1)})]),_:3},8,[`as`,`as-child`,`data-state`,`data-disabled`]))}}),Yi=defineComponent({__name:`CollapsibleTrigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2;R$1();let e$3=Kl();return(n$2,l$1)=>{var s$1,r$2;return openBlock(),createBlock(unref(O$1),{type:n$2.as===`button`?`button`:void 0,as:n$2.as,"as-child":t.asChild,"aria-controls":unref(e$3).contentId,"aria-expanded":unref(e$3).open.value,"data-state":unref(e$3).open.value?`open`:`closed`,"data-disabled":(s$1=unref(e$3).disabled)!=null&&s$1.value?``:void 0,disabled:(r$2=unref(e$3).disabled)?.value,onClick:unref(e$3).onOpenToggle},{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},8,[`type`,`as`,`as-child`,`aria-controls`,`aria-expanded`,`data-state`,`data-disabled`,`disabled`,`onClick`])}}});function Xi(a$2,t){var _$2;let e$3=ref({}),n$2=ref(`none`),l$1=ref(a$2),s$1=a$2.value?`mounted`:`unmounted`,r$2,i$1=(_$2=t.value)?.ownerDocument.defaultView??Rt,{state:u$1,dispatch:d$2}=zl(s$1,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),c$4=C$3=>{var $$2;if(Je){let h$3=new CustomEvent(C$3,{bubbles:!1,cancelable:!1});($$2=t.value)==null||$$2.dispatchEvent(h$3)}};watch(a$2,async(C$3,$$2)=>{var E$2;let h$3=$$2!==C$3;if(await nextTick(),h$3){let P$2=n$2.value,D$1=Ia(t.value);C$3?(d$2(`MOUNT`),c$4(`enter`),D$1===`none`&&c$4(`after-enter`)):D$1===`none`||(E$2=e$3.value)?.display===`none`?(d$2(`UNMOUNT`),c$4(`leave`),c$4(`after-leave`)):$$2&&P$2!==D$1?(d$2(`ANIMATION_OUT`),c$4(`leave`)):(d$2(`UNMOUNT`),c$4(`after-leave`))}},{immediate:!0});let f$3=C$3=>{let $$2=Ia(t.value),h$3=$$2.includes(C$3.animationName),E$2=u$1.value===`mounted`?`enter`:`leave`;if(C$3.target===t.value&&h$3&&(c$4(`after-${E$2}`),d$2(`ANIMATION_END`),!l$1.value)){let P$2=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,r$2=i$1?.setTimeout(()=>{var D$1;(D$1=t.value)?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=P$2)})}C$3.target===t.value&&$$2===`none`&&d$2(`ANIMATION_END`)},v$2=C$3=>{C$3.target===t.value&&(n$2.value=Ia(t.value))},p$5=watch(t,(C$3,$$2)=>{C$3?(e$3.value=getComputedStyle(C$3),C$3.addEventListener(`animationstart`,v$2),C$3.addEventListener(`animationcancel`,f$3),C$3.addEventListener(`animationend`,f$3)):(d$2(`ANIMATION_END`),r$2!==void 0&&i$1?.clearTimeout(r$2),$$2?.removeEventListener(`animationstart`,v$2),$$2?.removeEventListener(`animationcancel`,f$3),$$2?.removeEventListener(`animationend`,f$3))},{immediate:!0}),g$2=watch(u$1,()=>{let C$3=Ia(t.value);n$2.value=u$1.value===`mounted`?C$3:`none`});return onUnmounted(()=>{p$5(),g$2()}),{isPresent:computed(()=>[`mounted`,`unmountSuspended`].includes(u$1.value))}}function Ia(a$2){return a$2&&getComputedStyle(a$2).animationName||`none`}const Pe=defineComponent({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(a$2,{slots:t,expose:e$3}){var d$2;let{present:n$2,forceMount:l$1}=toRefs(a$2),s$1=ref(),{isPresent:r$2}=Xi(n$2,s$1);e$3({present:r$2});let i$1=t.default({present:r$2});i$1=qa(i$1||[]);let u$1=getCurrentInstance();if(i$1&&i$1?.length>1){let c$4=(d$2=u$1?.parent)!=null&&d$2.type.name?`<${u$1.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${c$4}\` 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(f$3=>` - ${f$3}`).join(` `)].join(` `))}return()=>l$1.value||n$2.value||r$2.value?h(t.default({present:r$2})[0],{ref:c$4=>{let f$3=$e$1(c$4);return typeof f$3?.hasAttribute>`u`||(f$3!=null&&f$3.hasAttribute(`data-radix-popper-content-wrapper`)?s$1.value=f$3.firstElementChild:s$1.value=f$3),f$3}}):null}}),Zi=defineComponent({inheritAttrs:!1,__name:`CollapsibleContent`,props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=Kl();e$3.contentId||=ge(void 0,`radix-vue-collapsible-content`);let n$2=ref(),{forwardRef:l$1,currentElement:s$1}=R$1(),r$2=ref(0),i$1=ref(0),u$1=computed(()=>e$3.open.value),d$2=ref(u$1.value),c$4=ref();return watch(()=>{var f$3;return[u$1.value,(f$3=n$2.value)?.present]},async()=>{await nextTick();let f$3=s$1.value;if(!f$3)return;c$4.value=c$4.value||{transitionDuration:f$3.style.transitionDuration,animationName:f$3.style.animationName},f$3.style.transitionDuration=`0s`,f$3.style.animationName=`none`;let v$2=f$3.getBoundingClientRect();i$1.value=v$2.height,r$2.value=v$2.width,d$2.value||(f$3.style.transitionDuration=c$4.value.transitionDuration,f$3.style.animationName=c$4.value.animationName)},{immediate:!0}),onMounted(()=>{requestAnimationFrame(()=>{d$2.value=!1})}),(f$3,v$2)=>(openBlock(),createBlock(unref(Pe),{ref_key:`presentRef`,ref:n$2,present:f$3.forceMount||unref(e$3).open.value,"force-mount":!0},{default:withCtx(()=>{var p$5,g$2;return[createVNode(unref(O$1),mergeProps(f$3.$attrs,{id:unref(e$3).contentId,ref:unref(l$1),"as-child":t.asChild,as:f$3.as,"data-state":unref(e$3).open.value?`open`:`closed`,"data-disabled":(p$5=unref(e$3).disabled)!=null&&p$5.value?``:void 0,hidden:!((g$2=n$2.value)!=null&&g$2.present),style:{"--radix-collapsible-content-height":`${i$1.value}px`,"--radix-collapsible-content-width":`${r$2.value}px`}}),{default:withCtx(()=>{var m$3;return[(m$3=n$2.value)!=null&&m$3.present?renderSlot(f$3.$slots,`default`,{key:0}):createCommentVNode(``,!0)]}),_:3},16,[`id`,`as-child`,`as`,`data-state`,`data-disabled`,`hidden`,`style`])]}),_:3},8,[`present`]))}});function Hl({type:a$2,defaultValue:t,modelValue:e$3}){let n$2=e$3||t;if(ht$1(a$2)&&ht$1(e$3)&&ht$1(t))throw Error("Either the `type` or the `value` or `default-value` prop must be defined.");if(e$3!==void 0&&t!==void 0&&typeof e$3!=typeof t)throw Error(`Invalid prop \`value\` of value \`${e$3}\` supplied, should be the same type as the \`defaultValue\` prop, which is \`${t}\`. The \`value\` prop must be: ${a$2===`single`?`- a string`:a$2===`multiple`?`- an array of strings`:`- a string @@ -5027,7 +5007,7 @@ https://localforage.github.io/localForage - less than the value passed to \`max\` (or ${ca} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. -Defaulting to \`null\`.`),null)}function lf(a$2){return $o(a$2)&&!Number.isNaN(a$2)&&a$2>0?a$2:(console.error(`Invalid prop \`max\` of value \`${a$2}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ca}\`.`),ca)}const Ry=defineComponent({__name:`ProgressRoot`,props:{modelValue:{},max:{default:ca},getValueLabel:{type:Function,default:(a$2,t)=>`${Math.round(a$2/t*ca)}%`},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`update:max`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t;R$1();let l$1=ne(e$3,`modelValue`,n$2,{passive:e$3.modelValue===void 0}),s$1=ne(e$3,`max`,n$2,{passive:e$3.max===void 0});watch(()=>l$1.value,async i$1=>{let u$1=of(i$1,e$3.max);u$1!==i$1&&(await nextTick(),l$1.value=u$1)},{immediate:!0}),watch(()=>e$3.max,i$1=>{let u$1=lf(e$3.max);u$1!==i$1&&(s$1.value=u$1)},{immediate:!0});let r$2=computed(()=>ht$1(l$1.value)?`indeterminate`:l$1.value===s$1.value?`complete`:`loading`);return nf({modelValue:l$1,max:s$1,progressState:r$2}),(i$1,u$1)=>(openBlock(),createBlock(unref(O$1),{"as-child":i$1.asChild,as:i$1.as,"aria-valuemax":unref(s$1),"aria-valuemin":0,"aria-valuenow":$o(unref(l$1))?unref(l$1):void 0,"aria-valuetext":i$1.getValueLabel(unref(l$1),unref(s$1)),"aria-label":i$1.getValueLabel(unref(l$1),unref(s$1)),role:`progressbar`,"data-state":r$2.value,"data-value":unref(l$1)??void 0,"data-max":unref(s$1)},{default:withCtx(()=>[renderSlot(i$1.$slots,`default`,{modelValue:unref(l$1)})]),_:3},8,[`as-child`,`as`,`aria-valuemax`,`aria-valuenow`,`aria-valuetext`,`aria-label`,`data-state`,`data-value`,`data-max`]))}}),Ay=defineComponent({__name:`ProgressIndicator`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=af();return R$1(),(n$2,l$1)=>{var s$1;return openBlock(),createBlock(unref(O$1),mergeProps(t,{"data-state":unref(e$3).progressState.value,"data-value":(s$1=unref(e$3).modelValue)?.value??void 0,"data-max":unref(e$3).max.value}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`data-state`,`data-value`,`data-max`])}}}),[sf,rf]=te(`RadioGroupRoot`),Oy=defineComponent({__name:`RadioGroupRoot`,props:{modelValue:{},defaultValue:{},disabled:{type:Boolean,default:!1},name:{},required:{type:Boolean,default:!1},orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{forwardRef:l$1}=R$1(),s$1=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.modelValue===void 0}),{disabled:r$2,loop:i$1,orientation:u$1,name:d$2,required:c$4,dir:f$3}=toRefs(e$3),v$2=we(f$3);return rf({modelValue:s$1,changeModelValue:p$5=>{s$1.value=p$5},disabled:r$2,loop:i$1,orientation:u$1,name:d$2?.value,required:c$4}),(p$5,g$2)=>(openBlock(),createBlock(unref(Ft),{"as-child":``,orientation:unref(u$1),dir:unref(v$2),loop:unref(i$1)},{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(l$1),role:`radiogroup`,"data-disabled":unref(r$2)?``:void 0,"as-child":p$5.asChild,as:p$5.as,required:unref(c$4),"aria-orientation":unref(u$1),"aria-required":unref(c$4),dir:unref(v$2),name:unref(d$2)},{default:withCtx(()=>[renderSlot(p$5.$slots,`default`,{modelValue:unref(s$1)})]),_:3},8,[`data-disabled`,`as-child`,`as`,`required`,`aria-orientation`,`aria-required`,`dir`,`name`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),uf=[`value`,`checked`,`name`,`disabled`,`required`],df=defineComponent({__name:`Radio`,props:{id:{},value:{},disabled:{type:Boolean,default:!1},required:{type:Boolean},checked:{type:Boolean,default:void 0},name:{},asChild:{type:Boolean},as:{default:`button`}},emits:[`update:checked`],setup(a$2,{emit:t}){let e$3=a$2,l$1=ne(e$3,`checked`,t,{passive:e$3.checked===void 0}),{value:s$1}=toRefs(e$3),{forwardRef:r$2,currentElement:i$1}=R$1(),u$1=at(i$1),d$2=computed(()=>{var f$3;return e$3.id&&i$1.value?(f$3=document.querySelector(`[for="${e$3.id}"]`))?.innerText??e$3.value:void 0});function c$4(f$3){l$1.value=!0,u$1.value&&f$3.stopPropagation()}return(f$3,v$2)=>(openBlock(),createBlock(unref(O$1),mergeProps(f$3.$attrs,{id:f$3.id,ref:unref(r$2),role:`radio`,type:f$3.as===`button`?`button`:void 0,as:f$3.as,"aria-checked":unref(l$1),"aria-label":d$2.value,"as-child":f$3.asChild,disabled:f$3.disabled?``:void 0,"data-state":unref(l$1)?`checked`:`unchecked`,"data-disabled":f$3.disabled?``:void 0,value:unref(s$1),required:f$3.required,name:f$3.name,onClick:withModifiers(c$4,[`stop`])}),{default:withCtx(()=>[renderSlot(f$3.$slots,`default`,{checked:unref(l$1)}),unref(u$1)?(openBlock(),createElementBlock(`input`,{key:0,type:`radio`,tabindex:`-1`,"aria-hidden":`true`,value:unref(s$1),checked:!!unref(l$1),name:f$3.name,disabled:f$3.disabled,required:f$3.required,style:{transform:`translateX(-100%)`,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}},null,8,uf)):createCommentVNode(``,!0)]),_:3},16,[`id`,`type`,`as`,`aria-checked`,`aria-label`,`as-child`,`disabled`,`data-state`,`data-disabled`,`value`,`required`,`name`]))}}),[cf,ff]=te(`RadioGroupItem`),ky=defineComponent({inheritAttrs:!1,__name:`RadioGroupItem`,props:{id:{},value:{},disabled:{type:Boolean,default:!1},required:{type:Boolean},name:{},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,{forwardRef:e$3,currentElement:n$2}=R$1(),l$1=sf(),s$1=computed(()=>l$1.disabled.value||t.disabled),r$2=computed(()=>l$1.required.value||t.required),i$1=computed(()=>{var f$3;return(f$3=l$1.modelValue)?.value===t.value});ff({disabled:s$1,checked:i$1});let u$1=ref(!1),d$2=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`];He(`keydown`,f$3=>{d$2.includes(f$3.key)&&(u$1.value=!0)}),He(`keyup`,()=>{u$1.value=!1});function c$4(){setTimeout(()=>{var f$3;u$1.value&&((f$3=n$2.value)==null||f$3.click())},0)}return(f$3,v$2)=>(openBlock(),createBlock(unref(Nt$1),{checked:i$1.value,disabled:s$1.value,"as-child":``,focusable:!s$1.value,active:i$1.value},{default:withCtx(()=>[createVNode(df,mergeProps({...f$3.$attrs,...t},{ref:unref(e$3),checked:i$1.value,required:r$2.value,disabled:s$1.value,"onUpdate:checked":v$2[0]||=p$5=>unref(l$1).changeModelValue(f$3.value),onKeydown:v$2[1]||=withKeys(withModifiers(()=>{},[`prevent`]),[`enter`]),onFocus:c$4}),{default:withCtx(()=>[renderSlot(f$3.$slots,`default`)]),_:3},16,[`checked`,`required`,`disabled`])]),_:3},8,[`checked`,`disabled`,`focusable`,`active`]))}}),My=defineComponent({__name:`RadioGroupIndicator`,props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let{forwardRef:t}=R$1(),e$3=cf();return(n$2,l$1)=>(openBlock(),createBlock(unref(Pe),{present:n$2.forceMount||unref(e$3).checked.value},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps({ref:unref(t),"data-state":unref(e$3).checked.value?`checked`:`unchecked`,"data-disabled":unref(e$3).disabled.value?``:void 0,"as-child":n$2.asChild,as:n$2.as},n$2.$attrs),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`data-state`,`data-disabled`,`as-child`,`as`])]),_:3},8,[`present`]))}});function pf(a$2){let t=computed(()=>a$2.start.value?!!a$2.isDateDisabled(a$2.start.value):!1),e$3=computed(()=>a$2.end.value?!!a$2.isDateDisabled(a$2.end.value):!1),n$2=computed(()=>t.value||e$3.value?!1:!!(a$2.start.value&&a$2.end.value&&q(a$2.end.value,a$2.start.value))),l$1=c$4=>a$2.start.value?$14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2.start.value,c$4):!1,s$1=c$4=>a$2.end.value?$14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2.end.value,c$4):!1,r$2=c$4=>a$2.start.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2.start.value,c$4)||a$2.end.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2.end.value,c$4)?!0:a$2.end.value&&a$2.start.value?v(c$4,a$2.start.value,a$2.end.value):!1,i$1=computed(()=>{if(a$2.start.value&&a$2.end.value||!a$2.start.value||!a$2.focusedValue.value)return null;let c$4=q(a$2.start.value,a$2.focusedValue.value),f$3=c$4?a$2.start.value:a$2.focusedValue.value,v$2=c$4?a$2.focusedValue.value:a$2.start.value;return $14e0f24ef4ac5c92$export$ea39ec197993aef0(f$3,v$2)||b(f$3,v$2,a$2.isDateUnavailable,a$2.isDateDisabled)?{start:f$3,end:v$2}:null});return{isInvalid:n$2,isSelected:r$2,highlightedRange:i$1,isSelectionStart:l$1,isSelectionEnd:s$1,isHighlightedStart:c$4=>!i$1.value||!i$1.value.start?!1:$14e0f24ef4ac5c92$export$ea39ec197993aef0(i$1.value.start,c$4),isHighlightedEnd:c$4=>!i$1.value||!i$1.value.end?!1:$14e0f24ef4ac5c92$export$ea39ec197993aef0(i$1.value.end,c$4)}}const vf={style:{border:`0px`,clip:`rect(0px, 0px, 0px, 0px)`,"clip-path":`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0px`,position:`absolute`,"white-space":`nowrap`,width:`1px`}},mf={role:`heading`,"aria-level":`2`},[na,hf]=te(`RangeCalendarRoot`),yf=defineComponent({__name:`RangeCalendarRoot`,props:{defaultPlaceholder:{},defaultValue:{default:()=>({start:void 0,end:void 0})},modelValue:{},placeholder:{default:void 0},pagedNavigation:{type:Boolean,default:!1},preventDeselect:{type:Boolean,default:!1},weekStartsOn:{default:0},weekdayFormat:{default:`narrow`},calendarLabel:{},fixedWeeks:{type:Boolean,default:!1},maxValue:{},minValue:{},locale:{default:`en`},numberOfMonths:{default:1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},initialFocus:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:void 0},isDateUnavailable:{type:Function,default:void 0},dir:{},nextPage:{},prevPage:{},asChild:{type:Boolean},as:{default:`div`}},emits:[`update:modelValue`,`update:placeholder`,`update:startValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{disabled:l$1,readonly:s$1,initialFocus:r$2,pagedNavigation:i$1,weekStartsOn:u$1,weekdayFormat:d$2,fixedWeeks:c$4,numberOfMonths:f$3,preventDeselect:v$2,isDateUnavailable:p$5,isDateDisabled:g$2,calendarLabel:m$3,maxValue:_$2,minValue:C$3,locale:$$2,dir:h$3,nextPage:E$2,prevPage:P$2}=toRefs(e$3),{primitiveElement:D$1,currentElement:I}=Re(),M$1=we(h$3),V$2=ref(),A$2=ref(),F$2=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue??{start:void 0,end:void 0},passive:e$3.modelValue===void 0}),j$1=Yt({defaultPlaceholder:e$3.placeholder,defaultValue:F$2.value.start,locale:e$3.locale}),H$3=ref(F$2.value.start),Q$3=ref(F$2.value.end),G$2=ne(e$3,`placeholder`,n$2,{defaultValue:e$3.defaultPlaceholder??j$1.copy(),passive:e$3.placeholder===void 0});function J$2(he$2){G$2.value=he$2.copy()}let{fullCalendarLabel:z$3,headingValue:K$1,isDateDisabled:L$1,isDateUnavailable:N$2,isNextButtonDisabled:Z$1,isPrevButtonDisabled:Y$2,grid:re$3,weekdays:X$2,isOutsideVisibleView:se$1,nextPage:fe$2,prevPage:xe,formatter:Ee$2}=Jl({locale:$$2,placeholder:G$2,weekStartsOn:u$1,fixedWeeks:c$4,numberOfMonths:f$3,minValue:C$3,maxValue:_$2,disabled:l$1,weekdayFormat:d$2,pagedNavigation:i$1,isDateDisabled:g$2.value,isDateUnavailable:p$5.value,calendarLabel:m$3,nextPage:E$2,prevPage:P$2}),{isInvalid:be$2,isSelected:de$3,highlightedRange:Ie,isSelectionStart:Ae$1,isSelectionEnd:We,isHighlightedStart:Et$2,isHighlightedEnd:yr$1}=pf({start:H$3,end:Q$3,isDateDisabled:L$1,isDateUnavailable:N$2,focusedValue:A$2});return watch(F$2,he$2=>{var Ne$1,Ve$1,Ea,Fo;(!he$2||!he$2.start||H$3.value&&!$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(he$2.start,H$3.value))&&(H$3.value=(Ve$1=(Ne$1=he$2?.start)?.copy)?.call(Ne$1)),(!he$2||!he$2.end||Q$3.value&&!$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(he$2.end,Q$3.value))&&(Q$3.value=(Fo=(Ea=he$2?.end)?.copy)?.call(Ea))}),watch(H$3,he$2=>{he$2&&!$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(he$2,G$2.value)&&J$2(he$2),n$2(`update:startValue`,he$2)}),watch([H$3,Q$3],([he$2,Ne$1])=>{let Ve$1=F$2.value;if(!(Ve$1&&Ve$1.start&&Ve$1.end&&he$2&&Ne$1&&$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(Ve$1.start,he$2)&&$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(Ve$1.end,Ne$1)))if(he$2&&Ne$1){if(Ve$1.start&&Ve$1.end&&$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(Ve$1.start,he$2)&&$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(Ve$1.end,Ne$1))return;q(Ne$1,he$2)?F$2.value={start:Ne$1.copy(),end:he$2.copy()}:F$2.value={start:he$2.copy(),end:Ne$1.copy()}}else Ve$1.start&&Ve$1.end&&(F$2.value={start:he$2?.copy(),end:void 0})}),hf({isDateUnavailable:N$2,startValue:H$3,endValue:Q$3,formatter:Ee$2,modelValue:F$2,placeholder:G$2,disabled:l$1,initialFocus:r$2,pagedNavigation:i$1,weekStartsOn:u$1,weekdayFormat:d$2,fixedWeeks:c$4,numberOfMonths:f$3,readonly:s$1,preventDeselect:v$2,fullCalendarLabel:z$3,headingValue:K$1,isInvalid:be$2,isDateDisabled:L$1,highlightedRange:Ie,focusedValue:A$2,lastPressedDateValue:V$2,isSelected:de$3,isSelectionEnd:We,isSelectionStart:Ae$1,isNextButtonDisabled:Z$1,isPrevButtonDisabled:Y$2,isOutsideVisibleView:se$1,nextPage:fe$2,prevPage:xe,parentElement:I,onPlaceholderChange:J$2,locale:$$2,dir:M$1,isHighlightedStart:Et$2,isHighlightedEnd:yr$1}),onMounted(()=>{r$2.value&&Pl(I.value)}),(he$2,Ne$1)=>(openBlock(),createBlock(unref(O$1),{ref_key:`primitiveElement`,ref:D$1,as:he$2.as,"as-child":he$2.asChild,role:`application`,"aria-label":unref(z$3),"data-readonly":unref(s$1)?``:void 0,"data-disabled":unref(l$1)?``:void 0,"data-invalid":unref(be$2)?``:void 0,dir:unref(M$1)},{default:withCtx(()=>[createBaseVNode(`div`,vf,[createBaseVNode(`div`,mf,toDisplayString(unref(z$3)),1)]),renderSlot(he$2.$slots,`default`,{date:unref(G$2),grid:unref(re$3),weekDays:unref(X$2),weekStartsOn:unref(u$1),locale:unref($$2),fixedWeeks:unref(c$4)})]),_:3},8,[`as`,`as-child`,`aria-label`,`data-readonly`,`data-disabled`,`data-invalid`,`dir`]))}}),gf=defineComponent({__name:`RangeCalendarHeader`,props:{asChild:{type:Boolean},as:{default:`div`}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),bf=defineComponent({__name:`RangeCalendarHeading`,props:{asChild:{type:Boolean},as:{default:`div`}},setup(a$2){let t=a$2,e$3=na();return(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{"data-disabled":unref(e$3).disabled.value?``:void 0}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`,{headingValue:unref(e$3).headingValue.value},()=>[createTextVNode(toDisplayString(unref(e$3).headingValue.value),1)])]),_:3},16,[`data-disabled`]))}}),Cf=defineComponent({__name:`RangeCalendarGrid`,props:{asChild:{type:Boolean},as:{default:`table`}},setup(a$2){let t=a$2,e$3=na(),n$2=computed(()=>e$3.disabled.value?!0:void 0),l$1=computed(()=>e$3.readonly.value?!0:void 0);return(s$1,r$2)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{tabindex:`-1`,role:`grid`,"aria-readonly":l$1.value,"aria-disabled":n$2.value,"data-readonly":l$1.value&&``,"data-disabled":n$2.value&&``}),{default:withCtx(()=>[renderSlot(s$1.$slots,`default`)]),_:3},16,[`aria-readonly`,`aria-disabled`,`data-readonly`,`data-disabled`]))}}),wf=defineComponent({__name:`RangeCalendarCell`,props:{date:{},asChild:{type:Boolean},as:{default:`td`}},setup(a$2){let t=na();return(e$3,n$2)=>{var l$1,s$1;return openBlock(),createBlock(unref(O$1),{as:e$3.as,"as-child":e$3.asChild,role:`gridcell`,"aria-selected":unref(t).isSelected(e$3.date)?!0:void 0,"aria-disabled":unref(t).isDateDisabled(e$3.date)||(s$1=(l$1=unref(t)).isDateUnavailable)?.call(l$1,e$3.date),"data-disabled":unref(t).isDateDisabled(e$3.date)?``:void 0},{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-selected`,`aria-disabled`,`data-disabled`])}}}),_f=defineComponent({__name:`RangeCalendarHeadCell`,props:{asChild:{type:Boolean},as:{default:`th`}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),xf=defineComponent({__name:`RangeCalendarNext`,props:{step:{},nextPage:{},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=computed(()=>n$2.disabled.value||n$2.isNextButtonDisabled(t.step,t.nextPage)),n$2=na();return(l$1,s$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{"aria-label":`Next page`,type:l$1.as===`button`?`button`:void 0,"aria-disabled":e$3.value||void 0,"data-disabled":e$3.value||void 0,disabled:e$3.value,onClick:s$1[0]||=r$2=>unref(n$2).nextPage(t.step,t.nextPage)}),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`,{},()=>[createTextVNode(`Next page`)])]),_:3},16,[`type`,`aria-disabled`,`data-disabled`,`disabled`]))}}),Sf=defineComponent({__name:`RangeCalendarPrev`,props:{step:{},prevPage:{},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=computed(()=>n$2.disabled.value||n$2.isPrevButtonDisabled(t.step,t.prevPage)),n$2=na();return(l$1,s$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{"aria-label":`Previous page`,type:l$1.as===`button`?`button`:void 0,"aria-disabled":e$3.value||void 0,"data-disabled":e$3.value||void 0,disabled:e$3.value,onClick:s$1[0]||=r$2=>unref(n$2).prevPage(t.step,t.prevPage)}),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`,{},()=>[createTextVNode(`Prev page`)])]),_:3},16,[`type`,`aria-disabled`,`data-disabled`,`disabled`]))}}),Ef=defineComponent({__name:`RangeCalendarGridHead`,props:{asChild:{type:Boolean},as:{default:`thead`}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{"aria-hidden":`true`}),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),Pf=defineComponent({__name:`RangeCalendarGridBody`,props:{asChild:{type:Boolean},as:{default:`tbody`}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),Df=defineComponent({__name:`RangeCalendarGridRow`,props:{asChild:{type:Boolean},as:{default:`tr`}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),$f=defineComponent({__name:`RangeCalendarCellTrigger`,props:{day:{},month:{},asChild:{type:Boolean},as:{default:`div`}},setup(a$2){let t=a$2,e$3=na(),n$2=nt(),{primitiveElement:l$1,currentElement:s$1}=Re(),r$2=computed(()=>e$3.formatter.custom($(t.day),{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`})),i$1=computed(()=>e$3.isDateDisabled(t.day)),u$1=computed(()=>{var V$2;return(V$2=e$3.isDateUnavailable)?.call(e$3,t.day)}),d$2=computed(()=>e$3.isSelected(t.day)),c$4=computed(()=>e$3.isSelectionStart(t.day)),f$3=computed(()=>e$3.isSelectionEnd(t.day)),v$2=computed(()=>e$3.isHighlightedStart(t.day)),p$5=computed(()=>e$3.isHighlightedEnd(t.day)),g$2=computed(()=>e$3.highlightedRange.value?V(t.day,e$3.highlightedRange.value.start,e$3.highlightedRange.value.end):!1),m$3=`[data-radix-vue-calendar-cell-trigger]:not([data-disabled]):not([data-outside-view]):not([data-outside-visible-view])`,_$2=computed(()=>$14e0f24ef4ac5c92$export$629b0a497aa65267(t.day,$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),C$3=computed(()=>!$14e0f24ef4ac5c92$export$a18c89cbd24170ff(t.day,t.month)),$$2=computed(()=>e$3.isOutsideVisibleView(t.day)),h$3=computed(()=>t.day.day.toLocaleString(e$3.locale.value)),E$2=computed(()=>!e$3.disabled.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(t.day,e$3.placeholder.value));function P$2(V$2,A$2){var F$2;if(!e$3.readonly.value&&!(e$3.isDateDisabled(A$2)||(F$2=e$3.isDateUnavailable)!=null&&F$2.call(e$3,A$2))){if(e$3.lastPressedDateValue.value=A$2.copy(),e$3.startValue.value&&e$3.highlightedRange.value===null){if($14e0f24ef4ac5c92$export$ea39ec197993aef0(A$2,e$3.startValue.value)&&!e$3.preventDeselect.value&&!e$3.endValue.value){e$3.startValue.value=void 0,e$3.onPlaceholderChange(A$2);return}else if(!e$3.endValue.value){V$2.preventDefault(),e$3.lastPressedDateValue.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(e$3.lastPressedDateValue.value,A$2)&&(e$3.startValue.value=A$2.copy());return}}if(e$3.startValue.value&&e$3.endValue.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(e$3.endValue.value,A$2)&&!e$3.preventDeselect.value){e$3.startValue.value=void 0,e$3.endValue.value=void 0,e$3.onPlaceholderChange(A$2);return}e$3.startValue.value?e$3.endValue.value?e$3.endValue.value&&e$3.startValue.value&&(e$3.endValue.value=void 0,e$3.startValue.value=A$2.copy()):e$3.endValue.value=A$2.copy():e$3.startValue.value=A$2.copy()}}function D$1(V$2){P$2(V$2,t.day)}function I(){var V$2;e$3.isDateDisabled(t.day)||(V$2=e$3.isDateUnavailable)!=null&&V$2.call(e$3,t.day)||(e$3.focusedValue.value=t.day.copy())}function M$1(V$2){V$2.preventDefault(),V$2.stopPropagation();let A$2=e$3.parentElement.value,F$2=A$2?Array.from(A$2.querySelectorAll(m$3)):[],H$3=F$2.indexOf(s$1.value),Q$3=7,G$2=e$3.dir.value===`rtl`?-1:1;switch(V$2.code){case n$2.ARROW_RIGHT:H$3+=G$2;break;case n$2.ARROW_LEFT:H$3-=G$2;break;case n$2.ARROW_UP:H$3-=Q$3;break;case n$2.ARROW_DOWN:H$3+=Q$3;break;case n$2.ENTER:case n$2.SPACE_CODE:P$2(V$2,t.day);return;default:return}if(H$3>=0&&H$3{let J$2=A$2?Array.from(A$2.querySelectorAll(m$3)):[];if(!e$3.pagedNavigation.value){let z$3=R(e$3.placeholder.value);J$2[z$3-Math.abs(H$3)].focus();return}J$2[J$2.length-Math.abs(H$3)].focus()});return}if(H$3>=F$2.length){if(e$3.isNextButtonDisabled(`month`))return;e$3.nextPage(),nextTick(()=>{let J$2=A$2?Array.from(A$2.querySelectorAll(m$3)):[];if(!e$3.pagedNavigation.value){let z$3=R(e$3.placeholder.value.add({months:e$3.numberOfMonths.value-1}));J$2[J$2.length-z$3+H$3-F$2.length].focus();return}J$2[H$3-F$2.length].focus()})}}return(V$2,A$2)=>(openBlock(),createBlock(unref(O$1),mergeProps({ref_key:`primitiveElement`,ref:l$1},t,{role:`button`,"aria-label":r$2.value,"data-radix-vue-calendar-cell-trigger":``,"aria-selected":d$2.value?!0:void 0,"aria-disabled":i$1.value||u$1.value?!0:void 0,"data-highlighted":g$2.value?``:void 0,"data-selection-start":c$4.value?!0:void 0,"data-selection-end":f$3.value?!0:void 0,"data-highlighted-start":v$2.value?!0:void 0,"data-highlighted-end":p$5.value?!0:void 0,"data-selected":d$2.value?!0:void 0,"data-outside-visible-view":$$2.value?``:void 0,"data-value":V$2.day.toString(),"data-disabled":i$1.value?``:void 0,"data-unavailable":u$1.value?``:void 0,"data-today":_$2.value?``:void 0,"data-outside-view":C$3.value?``:void 0,"data-focused":E$2.value?``:void 0,tabindex:E$2.value?0:C$3.value||i$1.value?void 0:-1,onClick:D$1,onFocusin:I,onMouseenter:I,onKeydown:withKeys(M$1,[`up`,`down`,`left`,`right`,`enter`,`space`])}),{default:withCtx(()=>[renderSlot(V$2.$slots,`default`,{dayValue:h$3.value},()=>[createTextVNode(toDisplayString(h$3.value),1)])]),_:3},16,[`aria-label`,`aria-selected`,`aria-disabled`,`data-highlighted`,`data-selection-start`,`data-selection-end`,`data-highlighted-start`,`data-highlighted-end`,`data-selected`,`data-outside-visible-view`,`data-value`,`data-disabled`,`data-unavailable`,`data-today`,`data-outside-view`,`data-focused`,`tabindex`]))}}),[Ue,Bf]=te(`ScrollAreaRoot`),Vy=defineComponent({__name:`ScrollAreaRoot`,props:{type:{default:`hover`},dir:{},scrollHideDelay:{default:600},asChild:{type:Boolean},as:{}},setup(a$2,{expose:t}){let e$3=a$2,n$2=ref(0),l$1=ref(0),s$1=ref(),r$2=ref(),i$1=ref(),u$1=ref(),d$2=ref(!1),c$4=ref(!1),{type:f$3,dir:v$2,scrollHideDelay:p$5}=toRefs(e$3),g$2=we(v$2);function m$3(){var h$3;(h$3=s$1.value)==null||h$3.scrollTo({top:0})}function _$2(){var h$3;(h$3=s$1.value)==null||h$3.scrollTo({top:0,left:0})}t({viewport:s$1,scrollTop:m$3,scrollTopLeft:_$2});let{forwardRef:C$3,currentElement:$$2}=R$1();return Bf({type:f$3,dir:g$2,scrollHideDelay:p$5,scrollArea:$$2,viewport:s$1,onViewportChange:h$3=>{s$1.value=h$3||void 0},content:r$2,onContentChange:h$3=>{r$2.value=h$3},scrollbarX:i$1,scrollbarXEnabled:d$2,scrollbarY:u$1,scrollbarYEnabled:c$4,onScrollbarXChange:h$3=>{i$1.value=h$3||void 0},onScrollbarYChange:h$3=>{u$1.value=h$3||void 0},onScrollbarXEnabledChange:h$3=>{d$2.value=h$3},onScrollbarYEnabledChange:h$3=>{c$4.value=h$3},onCornerWidthChange:h$3=>{n$2.value=h$3},onCornerHeightChange:h$3=>{l$1.value=h$3}}),(h$3,E$2)=>(openBlock(),createBlock(unref(O$1),{ref:unref(C$3),"as-child":e$3.asChild,as:h$3.as,dir:unref(g$2),style:normalizeStyle({position:`relative`,"--radix-scroll-area-corner-width":`${n$2.value}px`,"--radix-scroll-area-corner-height":`${l$1.value}px`})},{default:withCtx(()=>[renderSlot(h$3.$slots,`default`)]),_:3},8,[`as-child`,`as`,`dir`,`style`]))}}),Fy=defineComponent({inheritAttrs:!1,__name:`ScrollAreaViewport`,props:{nonce:{},asChild:{type:Boolean},as:{}},setup(a$2,{expose:t}){let e$3=a$2,{nonce:n$2}=toRefs(e$3),l$1=Ja(n$2),s$1=Ue(),r$2=ref();onMounted(()=>{s$1.onViewportChange(r$2.value),s$1.onContentChange(u$1.value)}),t({viewportElement:r$2});let{forwardRef:i$1,currentElement:u$1}=R$1();return(d$2,c$4)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode(`div`,mergeProps({ref_key:`viewportElement`,ref:r$2,"data-radix-scroll-area-viewport":``,style:{overflowX:unref(s$1).scrollbarXEnabled.value?`scroll`:`hidden`,overflowY:unref(s$1).scrollbarYEnabled.value?`scroll`:`hidden`}},d$2.$attrs,{tabindex:0}),[createVNode(unref(O$1),{ref:unref(i$1),style:normalizeStyle({minWidth:unref(s$1).scrollbarXEnabled.value?`fit-content`:void 0}),"as-child":e$3.asChild,as:d$2.as},{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},8,[`style`,`as-child`,`as`])],16),createVNode(unref(O$1),{as:`style`,nonce:unref(l$1)},{default:withCtx(()=>[createTextVNode(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-radix-scroll-area-viewport]::-webkit-scrollbar { display:none; } `)]),_:1},8,[`nonce`])],64))}});function $s(a$2,t){return e$3=>{if(a$2[0]===a$2[1]||t[0]===t[1])return t[0];let n$2=(t[1]-t[0])/(a$2[1]-a$2[0]);return t[0]+n$2*(e$3-a$2[0])}}function ln(a$2){let t=Bs(a$2.viewport,a$2.content),e$3=a$2.scrollbar.paddingStart+a$2.scrollbar.paddingEnd,n$2=(a$2.scrollbar.size-e$3)*t;return Math.max(n$2,18)}function Bs(a$2,t){let e$3=a$2/t;return Number.isNaN(e$3)?0:e$3}function If(a$2,t=()=>{}){let e$3={left:a$2.scrollLeft,top:a$2.scrollTop},n$2=0;return function l$1(){let s$1={left:a$2.scrollLeft,top:a$2.scrollTop},r$2=e$3.left!==s$1.left,i$1=e$3.top!==s$1.top;(r$2||i$1)&&t(),e$3=s$1,n$2=window.requestAnimationFrame(l$1)}(),()=>window.cancelAnimationFrame(n$2)}function tl(a$2,t,e$3=`ltr`){let n$2=ln(t),l$1=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s$1=t.scrollbar.size-l$1,r$2=t.content-t.viewport,i$1=s$1-n$2,u$1=e$3===`ltr`?[0,r$2]:[r$2*-1,0],d$2=Ut(a$2,u$1[0],u$1[1]);return $s([0,r$2],[0,i$1])(d$2)}function Ra(a$2){return a$2?Number.parseInt(a$2,10):0}function Tf(a$2,t,e$3,n$2=`ltr`){let l$1=ln(e$3),s$1=l$1/2,r$2=t||s$1,i$1=l$1-r$2,u$1=e$3.scrollbar.paddingStart+r$2,d$2=e$3.scrollbar.size-e$3.scrollbar.paddingEnd-i$1,c$4=e$3.content-e$3.viewport,f$3=n$2===`ltr`?[0,c$4]:[c$4*-1,0];return $s([u$1,d$2],f$3)(a$2)}function al(a$2,t){return a$2>0&&a$2{document.addEventListener(`wheel`,m$3,{passive:!1})}),onUnmounted(()=>{document.removeEventListener(`wheel`,m$3)});function _$2(){var C$3,$$2,h$3,E$2,P$2;u$1.value&&(e$3.isHorizontal?s$1.handleSizeChange({content:(C$3=l$1.viewport.value)?.scrollWidth??0,viewport:($$2=l$1.viewport.value)?.offsetWidth??0,scrollbar:{size:u$1.value.clientWidth??0,paddingStart:Ra(getComputedStyle(u$1.value).paddingLeft),paddingEnd:Ra(getComputedStyle(u$1.value).paddingRight)}}):s$1.handleSizeChange({content:(h$3=l$1.viewport.value)?.scrollHeight??0,viewport:(E$2=l$1.viewport.value)?.offsetHeight??0,scrollbar:{size:(P$2=u$1.value)?.clientHeight??0,paddingStart:Ra(getComputedStyle(u$1.value).paddingLeft),paddingEnd:Ra(getComputedStyle(u$1.value).paddingRight)}}))}return tt(u$1,_$2),tt(l$1.content,_$2),(C$3,$$2)=>(openBlock(),createBlock(unref(O$1),{ref:unref(i$1),style:{position:`absolute`},"data-scrollbarimpl":``,as:unref(r$2).as.value,"as-child":unref(r$2).asChild.value,onPointerdown:v$2,onPointermove:p$5,onPointerup:g$2},{default:withCtx(()=>[renderSlot(C$3.$slots,`default`)]),_:3},8,[`as`,`as-child`]))}}),Rf=defineComponent({__name:`ScrollAreaScrollbarX`,setup(a$2){let t=Ue(),e$3=sn(),{forwardRef:n$2,currentElement:l$1}=R$1();onMounted(()=>{l$1.value&&t.onScrollbarXChange(l$1.value)});let s$1=computed(()=>e$3.sizes.value);return(r$2,i$1)=>(openBlock(),createBlock(Is,{ref:unref(n$2),"is-horizontal":!0,"data-orientation":`horizontal`,style:normalizeStyle({bottom:0,left:unref(t).dir.value===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:unref(t).dir.value===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":s$1.value?`${unref(ln)(s$1.value)}px`:void 0}),onOnDragScroll:i$1[0]||=u$1=>unref(e$3).onDragScroll(u$1.x)},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},8,[`style`]))}}),Af=defineComponent({__name:`ScrollAreaScrollbarY`,setup(a$2){let t=Ue(),e$3=sn(),{forwardRef:n$2,currentElement:l$1}=R$1();onMounted(()=>{l$1.value&&t.onScrollbarYChange(l$1.value)});let s$1=computed(()=>e$3.sizes.value);return(r$2,i$1)=>(openBlock(),createBlock(Is,{ref:unref(n$2),"is-horizontal":!1,"data-orientation":`vertical`,style:normalizeStyle({top:0,right:unref(t).dir.value===`ltr`?0:void 0,left:unref(t).dir.value===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":s$1.value?`${unref(ln)(s$1.value)}px`:void 0}),onOnDragScroll:i$1[0]||=u$1=>unref(e$3).onDragScroll(u$1.y)},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},8,[`style`]))}}),[sn,Of]=te(`ScrollAreaScrollbarVisible`),Bo=defineComponent({__name:`ScrollAreaScrollbarVisible`,setup(a$2){let t=Ue(),e$3=rn(),{forwardRef:n$2}=R$1(),l$1=ref({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),s$1=computed(()=>{let C$3=Bs(l$1.value.viewport,l$1.value.content);return C$3>0&&C$3<1}),r$2=ref(),i$1=ref(0);function u$1(C$3,$$2){if(p$5.value){let h$3=t.viewport.value.scrollLeft+C$3.deltaY;t.viewport.value.scrollLeft=h$3,al(h$3,$$2)&&C$3.preventDefault()}else{let h$3=t.viewport.value.scrollTop+C$3.deltaY;t.viewport.value.scrollTop=h$3,al(h$3,$$2)&&C$3.preventDefault()}}function d$2(C$3,$$2){p$5.value?i$1.value=$$2.x:i$1.value=$$2.y}function c$4(C$3){i$1.value=0}function f$3(C$3){l$1.value=C$3}function v$2(C$3,$$2){return Tf(C$3,i$1.value,l$1.value,$$2)}let p$5=computed(()=>e$3.isHorizontal.value);function g$2(C$3){p$5.value?t.viewport.value.scrollLeft=v$2(C$3,t.dir.value):t.viewport.value.scrollTop=v$2(C$3)}function m$3(){if(p$5.value){if(t.viewport.value&&r$2.value){let C$3=t.viewport.value.scrollLeft,$$2=tl(C$3,l$1.value,t.dir.value);r$2.value.style.transform=`translate3d(${$$2}px, 0, 0)`}}else if(t.viewport.value&&r$2.value){let C$3=t.viewport.value.scrollTop,$$2=tl(C$3,l$1.value);r$2.value.style.transform=`translate3d(0, ${$$2}px, 0)`}}function _$2(C$3){r$2.value=C$3}return Of({sizes:l$1,hasThumb:s$1,handleWheelScroll:u$1,handleThumbDown:d$2,handleThumbUp:c$4,handleSizeChange:f$3,onThumbPositionChange:m$3,onThumbChange:_$2,onDragScroll:g$2}),(C$3,$$2)=>p$5.value?(openBlock(),createBlock(Rf,mergeProps({key:0},C$3.$attrs,{ref:unref(n$2)}),{default:withCtx(()=>[renderSlot(C$3.$slots,`default`)]),_:3},16)):(openBlock(),createBlock(Af,mergeProps({key:1},C$3.$attrs,{ref:unref(n$2)}),{default:withCtx(()=>[renderSlot(C$3.$slots,`default`)]),_:3},16))}}),Ts=defineComponent({__name:`ScrollAreaScrollbarAuto`,props:{forceMount:{type:Boolean}},setup(a$2){let t=Ue(),e$3=rn(),{forwardRef:n$2}=R$1(),l$1=ref(!1),s$1=jn(()=>{if(t.viewport.value){let r$2=t.viewport.value.offsetWidths$1()),tt(t.viewport,s$1),tt(t.content,s$1),(r$2,i$1)=>(openBlock(),createBlock(unref(Pe),{present:r$2.forceMount||l$1.value},{default:withCtx(()=>[createVNode(Bo,mergeProps(r$2.$attrs,{ref:unref(n$2),"data-state":l$1.value?`visible`:`hidden`}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`data-state`])]),_:3},8,[`present`]))}}),kf=defineComponent({inheritAttrs:!1,__name:`ScrollAreaScrollbarHover`,props:{forceMount:{type:Boolean}},setup(a$2){let t=Ue(),{forwardRef:e$3}=R$1(),n$2,l$1=ref(!1);function s$1(){window.clearTimeout(n$2),l$1.value=!0}function r$2(){n$2=window.setTimeout(()=>{l$1.value=!1},t.scrollHideDelay.value)}return onMounted(()=>{let i$1=t.scrollArea.value;i$1&&(i$1.addEventListener(`pointerenter`,s$1),i$1.addEventListener(`pointerleave`,r$2))}),onUnmounted(()=>{let i$1=t.scrollArea.value;i$1&&(window.clearTimeout(n$2),i$1.removeEventListener(`pointerenter`,s$1),i$1.removeEventListener(`pointerleave`,r$2))}),(i$1,u$1)=>(openBlock(),createBlock(unref(Pe),{present:i$1.forceMount||l$1.value},{default:withCtx(()=>[createVNode(Ts,mergeProps(i$1.$attrs,{ref:unref(e$3),"data-state":l$1.value?`visible`:`hidden`}),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16,[`data-state`])]),_:3},8,[`present`]))}}),Mf=defineComponent({__name:`ScrollAreaScrollbarScroll`,props:{forceMount:{type:Boolean}},setup(a$2){let t=Ue(),e$3=rn(),{forwardRef:n$2}=R$1(),{state:l$1,dispatch:s$1}=zl(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});watchEffect(i$1=>{if(l$1.value===`idle`){let u$1=window.setTimeout(()=>s$1(`HIDE`),t.scrollHideDelay.value);i$1(()=>{window.clearTimeout(u$1)})}});let r$2=jn(()=>s$1(`SCROLL_END`),100);return watchEffect(i$1=>{let u$1=t.viewport.value,d$2=e$3.isHorizontal.value?`scrollLeft`:`scrollTop`;if(u$1){let c$4=u$1[d$2],f$3=()=>{let v$2=u$1[d$2];c$4!==v$2&&(s$1(`SCROLL`),r$2()),c$4=v$2};u$1.addEventListener(`scroll`,f$3),i$1(()=>{u$1.removeEventListener(`scroll`,f$3)})}}),(i$1,u$1)=>(openBlock(),createBlock(unref(Pe),{present:i$1.forceMount||unref(l$1)!==`hidden`},{default:withCtx(()=>[createVNode(Bo,mergeProps(i$1.$attrs,{ref:unref(n$2)}),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16)]),_:3},8,[`present`]))}}),[rn,Vf]=te(`ScrollAreaScrollbar`),Ny=defineComponent({inheritAttrs:!1,__name:`ScrollAreaScrollbar`,props:{orientation:{default:`vertical`},forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:`div`}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1(),n$2=Ue(),l$1=computed(()=>t.orientation===`horizontal`);watch(l$1,()=>{l$1.value?n$2.onScrollbarXEnabledChange(!0):n$2.onScrollbarYEnabledChange(!0)},{immediate:!0}),onUnmounted(()=>{n$2.onScrollbarXEnabledChange(!1),n$2.onScrollbarYEnabledChange(!1)});let{orientation:s$1,forceMount:r$2,asChild:i$1,as:u$1}=toRefs(t);return Vf({orientation:s$1,forceMount:r$2,isHorizontal:l$1,as:u$1,asChild:i$1}),(d$2,c$4)=>unref(n$2).type.value===`hover`?(openBlock(),createBlock(kf,mergeProps({key:0},d$2.$attrs,{ref:unref(e$3),"force-mount":unref(r$2)}),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16,[`force-mount`])):unref(n$2).type.value===`scroll`?(openBlock(),createBlock(Mf,mergeProps({key:1},d$2.$attrs,{ref:unref(e$3),"force-mount":unref(r$2)}),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16,[`force-mount`])):unref(n$2).type.value===`auto`?(openBlock(),createBlock(Ts,mergeProps({key:2},d$2.$attrs,{ref:unref(e$3),"force-mount":unref(r$2)}),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16,[`force-mount`])):unref(n$2).type.value===`always`?(openBlock(),createBlock(Bo,mergeProps({key:3},d$2.$attrs,{ref:unref(e$3),"data-state":`visible`}),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16)):createCommentVNode(``,!0)}}),Ly=defineComponent({__name:`ScrollAreaThumb`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=Ue(),n$2=sn();function l$1(v$2){let g$2=v$2.target.getBoundingClientRect(),m$3=v$2.clientX-g$2.left,_$2=v$2.clientY-g$2.top;n$2.handleThumbDown(v$2,{x:m$3,y:_$2})}function s$1(v$2){n$2.handleThumbUp(v$2)}let{forwardRef:r$2,currentElement:i$1}=R$1(),u$1=ref(),d$2=computed(()=>e$3.viewport.value);function c$4(){if(!u$1.value){let v$2=If(d$2.value,n$2.onThumbPositionChange);u$1.value=v$2,n$2.onThumbPositionChange()}}let f$3=computed(()=>n$2.sizes.value);return bi(f$3,()=>{n$2.onThumbChange(i$1.value),d$2.value&&(n$2.onThumbPositionChange(),d$2.value.addEventListener(`scroll`,c$4))}),onUnmounted(()=>{var v$2;d$2.value.removeEventListener(`scroll`,c$4),(v$2=e$3.viewport.value)==null||v$2.removeEventListener(`scroll`,c$4)}),(v$2,p$5)=>(openBlock(),createBlock(unref(O$1),{ref:unref(r$2),"data-state":unref(n$2).hasThumb?`visible`:`hidden`,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`},"as-child":t.asChild,as:v$2.as,onPointerdown:l$1,onPointerup:s$1},{default:withCtx(()=>[renderSlot(v$2.$slots,`default`)]),_:3},8,[`data-state`,`as-child`,`as`]))}}),Ff=defineComponent({__name:`ScrollAreaCornerImpl`,setup(a$2){let t=Ue(),e$3=ref(0),n$2=ref(0),l$1=computed(()=>!!e$3.value&&!!n$2.value);function s$1(){var u$1;let i$1=(u$1=t.scrollbarX.value)?.offsetHeight||0;t.onCornerHeightChange(i$1),n$2.value=i$1}function r$2(){var u$1;let i$1=(u$1=t.scrollbarY.value)?.offsetWidth||0;t.onCornerWidthChange(i$1),e$3.value=i$1}return tt(t.scrollbarX.value,s$1),tt(t.scrollbarY.value,r$2),watch(()=>t.scrollbarX.value,s$1),watch(()=>t.scrollbarY.value,r$2),(i$1,u$1)=>{var d$2;return l$1.value?(openBlock(),createBlock(unref(O$1),mergeProps({key:0,style:{width:`${e$3.value}px`,height:`${n$2.value}px`,position:`absolute`,right:unref(t).dir.value===`ltr`?0:void 0,left:unref(t).dir.value===`rtl`?0:void 0,bottom:0}},(d$2=i$1.$parent)?.$props),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16,[`style`])):createCommentVNode(``,!0)}}}),zy=defineComponent({__name:`ScrollAreaCorner`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1(),n$2=Ue(),l$1=computed(()=>!!n$2.scrollbarX.value&&!!n$2.scrollbarY.value),s$1=computed(()=>n$2.type.value!==`scroll`&&l$1.value);return(r$2,i$1)=>s$1.value?(openBlock(),createBlock(Ff,mergeProps({key:0},t,{ref:unref(e$3)}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16)):createCommentVNode(``,!0)}}),Nf=[`default-value`],Lf=defineComponent({__name:`BubbleSelect`,props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(a$2){let t=a$2,{value:e$3}=toRefs(t),n$2=ref();return(l$1,s$1)=>(openBlock(),createBlock(unref(Jt),{"as-child":``},{default:withCtx(()=>[withDirectives(createBaseVNode(`select`,mergeProps({ref_key:`selectElement`,ref:n$2},t,{"onUpdate:modelValue":s$1[0]||=r$2=>isRef(e$3)?e$3.value=r$2:null,"default-value":unref(e$3)}),[renderSlot(l$1.$slots,`default`)],16,Nf),[[vModelSelect,unref(e$3)]])]),_:3}))}}),zf={key:0,value:``},[xt,Rs]=te(`SelectRoot`),[Kf,Hf]=te(`SelectRoot`),Ky=defineComponent({__name:`SelectRoot`,props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{default:``},modelValue:{default:void 0},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:[`update:modelValue`,`update:open`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.modelValue===void 0}),s$1=ne(e$3,`open`,n$2,{defaultValue:e$3.defaultOpen,passive:e$3.open===void 0}),r$2=ref(),i$1=ref(),u$1=ref({x:0,y:0}),d$2=ref(!1),{required:c$4,disabled:f$3,dir:v$2}=toRefs(e$3),p$5=we(v$2);Rs({triggerElement:r$2,onTriggerChange:C$3=>{r$2.value=C$3},valueElement:i$1,onValueElementChange:C$3=>{i$1.value=C$3},valueElementHasChildren:d$2,onValueElementHasChildrenChange:C$3=>{d$2.value=C$3},contentId:``,modelValue:l$1,onValueChange:C$3=>{l$1.value=C$3},open:s$1,required:c$4,onOpenChange:C$3=>{s$1.value=C$3},dir:p$5,triggerPointerDownPosRef:u$1,disabled:f$3});let g$2=at(r$2),m$3=ref(new Set),_$2=computed(()=>Array.from(m$3.value).map(C$3=>{var $$2;return($$2=C$3.props)?.value}).join(`;`));return Hf({onNativeOptionAdd:C$3=>{m$3.value.add(C$3)},onNativeOptionRemove:C$3=>{m$3.value.delete(C$3)}}),(C$3,$$2)=>(openBlock(),createBlock(unref(kt),null,{default:withCtx(()=>[renderSlot(C$3.$slots,`default`,{modelValue:unref(l$1),open:unref(s$1)}),unref(g$2)?(openBlock(),createBlock(Lf,mergeProps({key:_$2.value},C$3.$attrs,{"aria-hidden":`true`,tabindex:`-1`,required:unref(c$4),name:C$3.name,autocomplete:C$3.autocomplete,disabled:unref(f$3),value:unref(l$1),onChange:$$2[0]||=h$3=>l$1.value=h$3.target.value}),{default:withCtx(()=>[unref(l$1)===void 0?(openBlock(),createElementBlock(`option`,zf)):createCommentVNode(``,!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Array.from(m$3.value),h$3=>(openBlock(),createBlock(resolveDynamicComponent(h$3),mergeProps({ref_for:!0},h$3.props,{key:h$3.key??``}),null,16))),128))]),_:1},16,[`required`,`name`,`autocomplete`,`disabled`,`value`])):createCommentVNode(``,!0)]),_:3}))}}),Wf=[` `,`Enter`,`ArrowUp`,`ArrowDown`],jf=[` `,`Enter`],qe=10;function As(a$2){return a$2===``||ht$1(a$2)}const Hy=defineComponent({__name:`SelectTrigger`,props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=xt(),n$2=computed(()=>{var p$5;return(p$5=e$3.disabled)?.value||t.disabled}),{forwardRef:l$1,currentElement:s$1}=R$1();e$3.contentId||=ge(void 0,`radix-vue-select-content`),onMounted(()=>{e$3.triggerElement=s$1});let{injectCollection:r$2}=Fe(),i$1=r$2(),{search:u$1,handleTypeaheadSearch:d$2,resetTypeahead:c$4}=ba(i$1);function f$3(){n$2.value||(e$3.onOpenChange(!0),c$4())}function v$2(p$5){f$3(),e$3.triggerPointerDownPosRef.value={x:Math.round(p$5.pageX),y:Math.round(p$5.pageY)}}return(p$5,g$2)=>(openBlock(),createBlock(unref(Mt),{"as-child":``},{default:withCtx(()=>{var m$3,_$2,C$3,$$2;return[createVNode(unref(O$1),{ref:unref(l$1),role:`combobox`,type:p$5.as===`button`?`button`:void 0,"aria-controls":unref(e$3).contentId,"aria-expanded":unref(e$3).open.value||!1,"aria-required":(m$3=unref(e$3).required)?.value,"aria-autocomplete":`none`,disabled:n$2.value,dir:(_$2=unref(e$3))?.dir.value,"data-state":(C$3=unref(e$3))!=null&&C$3.open.value?`open`:`closed`,"data-disabled":n$2.value?``:void 0,"data-placeholder":unref(As)(($$2=unref(e$3).modelValue)?.value)?``:void 0,"as-child":p$5.asChild,as:p$5.as,onClick:g$2[0]||=h$3=>{var E$2;(E$2=h$3?.currentTarget)==null||E$2.focus()},onPointerdown:g$2[1]||=h$3=>{if(h$3.pointerType===`touch`)return h$3.preventDefault();let E$2=h$3.target;E$2.hasPointerCapture(h$3.pointerId)&&E$2.releasePointerCapture(h$3.pointerId),h$3.button===0&&h$3.ctrlKey===!1&&(v$2(h$3),h$3.preventDefault())},onPointerup:g$2[2]||=withModifiers(h$3=>{h$3.pointerType===`touch`&&v$2(h$3)},[`prevent`]),onKeydown:g$2[3]||=h$3=>{let E$2=unref(u$1)!==``;!(h$3.ctrlKey||h$3.altKey||h$3.metaKey)&&h$3.key.length===1&&E$2&&h$3.key===` `||(unref(d$2)(h$3.key),unref(Wf).includes(h$3.key)&&(f$3(),h$3.preventDefault()))}},{default:withCtx(()=>[renderSlot(p$5.$slots,`default`)]),_:3},8,[`type`,`aria-controls`,`aria-expanded`,`aria-required`,`disabled`,`dir`,`data-state`,`data-disabled`,`data-placeholder`,`as-child`,`as`])]}),_:3}))}}),Wy=defineComponent({__name:`SelectPortal`,props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(rt$2),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),[Io,Uf]=te(`SelectItemAlignedPosition`),Gf=defineComponent({inheritAttrs:!1,__name:`SelectItemAlignedPosition`,props:{asChild:{type:Boolean},as:{}},emits:[`placed`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{injectCollection:l$1}=Fe(),s$1=xt(),r$2=St$1(),i$1=l$1(),u$1=ref(!1),d$2=ref(!0),c$4=ref(),{forwardRef:f$3,currentElement:v$2}=R$1(),{viewport:p$5,selectedItem:g$2,selectedItemText:m$3,focusSelectedItem:_$2}=r$2;function C$3(){if(s$1.triggerElement.value&&s$1.valueElement.value&&c$4.value&&v$2.value&&p$5!=null&&p$5.value&&g$2!=null&&g$2.value&&m$3!=null&&m$3.value){let E$2=s$1.triggerElement.value.getBoundingClientRect(),P$2=v$2.value.getBoundingClientRect(),D$1=s$1.valueElement.value.getBoundingClientRect(),I=m$3.value.getBoundingClientRect();if(s$1.dir.value!==`rtl`){let Ee$2=I.left-P$2.left,be$2=D$1.left-Ee$2,de$3=E$2.left-be$2,Ie=E$2.width+de$3,Ae$1=Math.max(Ie,P$2.width),We=window.innerWidth-qe,Et$2=Ut(be$2,qe,Math.max(qe,We-Ae$1));c$4.value.style.minWidth=`${Ie}px`,c$4.value.style.left=`${Et$2}px`}else{let Ee$2=P$2.right-I.right,be$2=window.innerWidth-D$1.right-Ee$2,de$3=window.innerWidth-E$2.right-be$2,Ie=E$2.width+de$3,Ae$1=Math.max(Ie,P$2.width),We=window.innerWidth-qe,Et$2=Ut(be$2,qe,Math.max(qe,We-Ae$1));c$4.value.style.minWidth=`${Ie}px`,c$4.value.style.right=`${Et$2}px`}let M$1=i$1.value,V$2=window.innerHeight-qe*2,A$2=p$5.value.scrollHeight,F$2=window.getComputedStyle(v$2.value),j$1=Number.parseInt(F$2.borderTopWidth,10),H$3=Number.parseInt(F$2.paddingTop,10),Q$3=Number.parseInt(F$2.borderBottomWidth,10),G$2=Number.parseInt(F$2.paddingBottom,10),J$2=j$1+H$3+A$2+G$2+Q$3,z$3=Math.min(g$2.value.offsetHeight*5,J$2),K$1=window.getComputedStyle(p$5.value),L$1=Number.parseInt(K$1.paddingTop,10),N$2=Number.parseInt(K$1.paddingBottom,10),Z$1=E$2.top+E$2.height/2-qe,Y$2=V$2-Z$1,re$3=g$2.value.offsetHeight/2,X$2=g$2.value.offsetTop+re$3,se$1=j$1+H$3+X$2,fe$2=J$2-se$1;if(se$1<=Z$1){let Ee$2=g$2.value===M$1[M$1.length-1];c$4.value.style.bottom=`0px`;let be$2=v$2.value.clientHeight-p$5.value.offsetTop-p$5.value.offsetHeight,de$3=Math.max(Y$2,re$3+(Ee$2?N$2:0)+be$2+Q$3),Ie=se$1+de$3;c$4.value.style.height=`${Ie}px`}else{let Ee$2=g$2.value===M$1[0];c$4.value.style.top=`0px`;let de$3=Math.max(Z$1,j$1+p$5.value.offsetTop+(Ee$2?L$1:0)+re$3)+fe$2;c$4.value.style.height=`${de$3}px`,p$5.value.scrollTop=se$1-Z$1+p$5.value.offsetTop}c$4.value.style.margin=`${qe}px 0`,c$4.value.style.minHeight=`${z$3}px`,c$4.value.style.maxHeight=`${V$2}px`,n$2(`placed`),requestAnimationFrame(()=>u$1.value=!0)}}let $$2=ref(``);onMounted(async()=>{await nextTick(),C$3(),v$2.value&&($$2.value=window.getComputedStyle(v$2.value).zIndex)});function h$3(E$2){E$2&&d$2.value===!0&&(C$3(),_$2?.(),d$2.value=!1)}return Uf({contentWrapper:c$4,shouldExpandOnScrollRef:u$1,onScrollButtonChange:h$3}),(E$2,P$2)=>(openBlock(),createElementBlock(`div`,{ref_key:`contentWrapperElement`,ref:c$4,style:normalizeStyle({display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:$$2.value})},[createVNode(unref(O$1),mergeProps({ref:unref(f$3),style:{boxSizing:`border-box`,maxHeight:`100%`}},{...E$2.$attrs,...e$3}),{default:withCtx(()=>[renderSlot(E$2.$slots,`default`)]),_:3},16)],4))}}),qf=defineComponent({__name:`SelectPopperPosition`,props:{side:{},sideOffset:{},align:{default:`start`},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:qe},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let e$3=Ot$1(a$2);return(n$2,l$1)=>(openBlock(),createBlock(unref(It),mergeProps(unref(e$3),{style:{boxSizing:`border-box`,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16))}}),zt={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[St$1,Yf]=te(`SelectContent`),Xf=defineComponent({__name:`SelectContentImpl`,props:{position:{default:`item-aligned`},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:`start`},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=xt();Yn(),ya(e$3.bodyLock);let{createCollection:s$1}=Fe(),r$2=ref();ga(r$2);let i$1=s$1(r$2),{search:u$1,handleTypeaheadSearch:d$2}=ba(i$1),c$4=ref(),f$3=ref(),v$2=ref(),p$5=ref(!1),g$2=ref(!1);function m$3(){f$3.value&&r$2.value&&In([f$3.value,r$2.value])}watch(p$5,()=>{m$3()});let{onOpenChange:_$2,triggerPointerDownPosRef:C$3}=l$1;watchEffect(P$2=>{if(!r$2.value)return;let D$1={x:0,y:0},I=V$2=>{var A$2,F$2;D$1={x:Math.abs(Math.round(V$2.pageX)-((A$2=C$3.value)?.x??0)),y:Math.abs(Math.round(V$2.pageY)-((F$2=C$3.value)?.y??0))}},M$1=V$2=>{var A$2;V$2.pointerType!==`touch`&&(D$1.x<=10&&D$1.y<=10?V$2.preventDefault():(A$2=r$2.value)!=null&&A$2.contains(V$2.target)||_$2(!1),document.removeEventListener(`pointermove`,I),C$3.value=null)};C$3.value!==null&&(document.addEventListener(`pointermove`,I),document.addEventListener(`pointerup`,M$1,{capture:!0,once:!0})),P$2(()=>{document.removeEventListener(`pointermove`,I),document.removeEventListener(`pointerup`,M$1,{capture:!0})})});function $$2(P$2){let D$1=P$2.ctrlKey||P$2.altKey||P$2.metaKey;if(P$2.key===`Tab`&&P$2.preventDefault(),!D$1&&P$2.key.length===1&&d$2(P$2.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(P$2.key)){let I=i$1.value;if([`ArrowUp`,`End`].includes(P$2.key)&&(I=I.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(P$2.key)){let M$1=P$2.target,V$2=I.indexOf(M$1);I=I.slice(V$2+1)}setTimeout(()=>In(I)),P$2.preventDefault()}}let h$3=computed(()=>e$3.position===`popper`?e$3:{}),E$2=Ot$1(h$3.value);return Yf({content:r$2,viewport:c$4,onViewportChange:P$2=>{c$4.value=P$2},itemRefCallback:(P$2,D$1,I)=>{var A$2,F$2;let M$1=!g$2.value&&!I;((A$2=l$1.modelValue)?.value!==void 0&&(F$2=l$1.modelValue)?.value===D$1||M$1)&&(f$3.value=P$2,M$1&&(g$2.value=!0))},selectedItem:f$3,selectedItemText:v$2,onItemLeave:()=>{var P$2;(P$2=r$2.value)==null||P$2.focus()},itemTextRefCallback:(P$2,D$1,I)=>{var A$2,F$2;let M$1=!g$2.value&&!I;((A$2=l$1.modelValue)?.value!==void 0&&(F$2=l$1.modelValue)?.value===D$1||M$1)&&(v$2.value=P$2)},focusSelectedItem:m$3,position:e$3.position,isPositioned:p$5,searchRef:u$1}),(P$2,D$1)=>(openBlock(),createBlock(unref(Za),{"as-child":``,onMountAutoFocus:D$1[6]||=withModifiers(()=>{},[`prevent`]),onUnmountAutoFocus:D$1[7]||=I=>{var M$1;n$2(`closeAutoFocus`,I),!I.defaultPrevented&&((M$1=unref(l$1).triggerElement.value)==null||M$1.focus({preventScroll:!0}),I.preventDefault())}},{default:withCtx(()=>[createVNode(unref(Ct$1),{"as-child":``,"disable-outside-pointer-events":``,onFocusOutside:D$1[2]||=withModifiers(()=>{},[`prevent`]),onDismiss:D$1[3]||=I=>unref(l$1).onOpenChange(!1),onEscapeKeyDown:D$1[4]||=I=>n$2(`escapeKeyDown`,I),onPointerDownOutside:D$1[5]||=I=>n$2(`pointerDownOutside`,I)},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(P$2.position===`popper`?qf:Gf),mergeProps({...P$2.$attrs,...unref(E$2)},{id:unref(l$1).contentId,ref:I=>{r$2.value=unref($e$1)(I)},role:`listbox`,"data-state":unref(l$1).open.value?`open`:`closed`,dir:unref(l$1).dir.value,style:{display:`flex`,flexDirection:`column`,outline:`none`},onContextmenu:D$1[0]||=withModifiers(()=>{},[`prevent`]),onPlaced:D$1[1]||=I=>p$5.value=!0,onKeydown:$$2}),{default:withCtx(()=>[renderSlot(P$2.$slots,`default`)]),_:3},16,[`id`,`data-state`,`dir`,`onKeydown`]))]),_:3})]),_:3}))}}),Zf=defineComponent({inheritAttrs:!1,__name:`SelectProvider`,props:{context:{}},setup(a$2){return Rs(a$2.context),(e$3,n$2)=>renderSlot(e$3.$slots,`default`)}}),Jf={key:1},jy=defineComponent({inheritAttrs:!1,__name:`SelectContent`,props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(a$2,{emit:t}){let e$3=a$2,l$1=Se(e$3,t),s$1=xt(),r$2=ref();onMounted(()=>{r$2.value=new DocumentFragment});let i$1=ref(),u$1=computed(()=>e$3.forceMount||s$1.open.value);return(d$2,c$4)=>{var f$3;return u$1.value?(openBlock(),createBlock(unref(Pe),{key:0,ref_key:`presenceRef`,ref:i$1,present:!0},{default:withCtx(()=>[createVNode(Xf,normalizeProps(guardReactiveProps({...unref(l$1),...d$2.$attrs})),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16)]),_:3},512)):!((f$3=i$1.value)!=null&&f$3.present)&&r$2.value?(openBlock(),createElementBlock(`div`,Jf,[(openBlock(),createBlock(Teleport,{to:r$2.value},[createVNode(Zf,{context:unref(s$1)},{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},8,[`context`])],8,[`to`]))])):createCommentVNode(``,!0)}}}),Uy=defineComponent({__name:`SelectArrow`,props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:`svg`}},setup(a$2){let t=a$2,e$3=xt(),n$2=St$1(zt);return(l$1,s$1)=>unref(e$3).open.value&&unref(n$2).position===`popper`?(openBlock(),createBlock(unref(Zt),normalizeProps(mergeProps({key:0},t)),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`)]),_:3},16)):createCommentVNode(``,!0)}}),Gy=defineComponent({__name:`SelectSeparator`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),mergeProps({"aria-hidden":`true`},t),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),[Os,Qf]=te(`SelectItem`),qy=defineComponent({__name:`SelectItem`,props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{disabled:e$3}=toRefs(t),n$2=xt(),l$1=St$1(zt),{forwardRef:s$1,currentElement:r$2}=R$1(),i$1=computed(()=>{var m$3;return(m$3=n$2.modelValue)?.value===t.value}),u$1=ref(!1),d$2=ref(t.textValue??``),c$4=ge(void 0,`radix-vue-select-item-text`);async function f$3(m$3){await nextTick(),!(m$3!=null&&m$3.defaultPrevented)&&(e$3.value||(n$2.onValueChange(t.value),n$2.onOpenChange(!1)))}async function v$2(m$3){var _$2;await nextTick(),!m$3.defaultPrevented&&(e$3.value?(_$2=l$1.onItemLeave)==null||_$2.call(l$1):m$3.currentTarget.focus({preventScroll:!0}))}async function p$5(m$3){var _$2;await nextTick(),!m$3.defaultPrevented&&m$3.currentTarget===me()&&((_$2=l$1.onItemLeave)==null||_$2.call(l$1))}async function g$2(m$3){var C$3;await nextTick(),!(m$3.defaultPrevented||(C$3=l$1.searchRef)?.value!==``&&m$3.key===` `)&&(jf.includes(m$3.key)&&f$3(),m$3.key===` `&&m$3.preventDefault())}if(t.value===``)throw Error(`A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return onMounted(()=>{r$2.value&&l$1.itemRefCallback(r$2.value,t.value,t.disabled)}),Qf({value:t.value,disabled:e$3,textId:c$4,isSelected:i$1,onItemTextChange:m$3=>{d$2.value=((d$2.value||m$3?.textContent)??``).trim()}}),(m$3,_$2)=>(openBlock(),createBlock(unref(O$1),{ref:unref(s$1),role:`option`,"data-radix-vue-collection-item":``,"aria-labelledby":unref(c$4),"data-highlighted":u$1.value?``:void 0,"aria-selected":i$1.value,"data-state":i$1.value?`checked`:`unchecked`,"aria-disabled":unref(e$3)||void 0,"data-disabled":unref(e$3)?``:void 0,tabindex:unref(e$3)?void 0:-1,as:m$3.as,"as-child":m$3.asChild,onFocus:_$2[0]||=C$3=>u$1.value=!0,onBlur:_$2[1]||=C$3=>u$1.value=!1,onPointerup:f$3,onPointerdown:_$2[2]||=C$3=>{C$3.currentTarget.focus({preventScroll:!0})},onTouchend:_$2[3]||=withModifiers(()=>{},[`prevent`,`stop`]),onPointermove:v$2,onPointerleave:p$5,onKeydown:g$2},{default:withCtx(()=>[renderSlot(m$3.$slots,`default`)]),_:3},8,[`aria-labelledby`,`data-highlighted`,`aria-selected`,`data-state`,`aria-disabled`,`data-disabled`,`tabindex`,`as`,`as-child`]))}}),Yy=defineComponent({__name:`SelectItemIndicator`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=a$2,e$3=Os();return(n$2,l$1)=>unref(e$3).isSelected.value?(openBlock(),createBlock(unref(O$1),mergeProps({key:0,"aria-hidden":`true`},t),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16)):createCommentVNode(``,!0)}}),[ep,tp]=te(`SelectGroup`),Xy=defineComponent({__name:`SelectGroup`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=ge(void 0,`radix-vue-select-group`);return tp({id:e$3}),(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps({role:`group`},t,{"aria-labelledby":unref(e$3)}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`aria-labelledby`]))}}),Zy=defineComponent({__name:`SelectLabel`,props:{for:{},asChild:{type:Boolean},as:{default:`div`}},setup(a$2){let t=a$2,e$3=ep({id:``});return(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{id:unref(e$3).id}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`id`]))}}),Jy=defineComponent({inheritAttrs:!1,__name:`SelectItemText`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=a$2,e$3=xt(),n$2=St$1(zt),l$1=Kf(),s$1=Os(),{forwardRef:r$2,currentElement:i$1}=R$1(),u$1=computed(()=>{var d$2;return h(`option`,{key:s$1.value,value:s$1.value,disabled:s$1.disabled.value,textContent:(d$2=i$1.value)?.textContent})});return onMounted(()=>{i$1.value&&(s$1.onItemTextChange(i$1.value),n$2.itemTextRefCallback(i$1.value,s$1.value,s$1.disabled.value),l$1.onNativeOptionAdd(u$1.value))}),onBeforeUnmount(()=>{l$1.onNativeOptionRemove(u$1.value)}),(d$2,c$4)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$1),mergeProps({id:unref(s$1).textId,ref:unref(r$2)},{...t,...d$2.$attrs},{"data-item-text":``}),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16,[`id`]),unref(s$1).isSelected.value&&unref(e$3).valueElement.value&&!unref(e$3).valueElementHasChildren.value?(openBlock(),createBlock(Teleport,{key:0,to:unref(e$3).valueElement.value},[renderSlot(d$2.$slots,`default`)],8,[`to`])):createCommentVNode(``,!0)],64))}}),Qy=defineComponent({__name:`SelectViewport`,props:{nonce:{},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{nonce:e$3}=toRefs(t),n$2=Ja(e$3),l$1=St$1(zt),s$1=l$1.position===`item-aligned`?Io():void 0,{forwardRef:r$2,currentElement:i$1}=R$1();onMounted(()=>{l$1?.onViewportChange(i$1.value)});let u$1=ref(0);function d$2(c$4){let f$3=c$4.currentTarget,{shouldExpandOnScrollRef:v$2,contentWrapper:p$5}=s$1??{};if(v$2!=null&&v$2.value&&p$5!=null&&p$5.value){let g$2=Math.abs(u$1.value-f$3.scrollTop);if(g$2>0){let m$3=window.innerHeight-qe*2,_$2=Number.parseFloat(p$5.value.style.minHeight),C$3=Number.parseFloat(p$5.value.style.height),$$2=Math.max(_$2,C$3);if($$20?P$2:0,p$5.value.style.justifyContent=`flex-end`)}}}u$1.value=f$3.scrollTop}return(c$4,f$3)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$1),mergeProps({ref:unref(r$2),"data-radix-select-viewport":``,role:`presentation`},{...c$4.$attrs,...t},{style:{position:`relative`,flex:1,overflow:`hidden auto`},onScroll:d$2}),{default:withCtx(()=>[renderSlot(c$4.$slots,`default`)]),_:3},16),createVNode(unref(O$1),{as:`style`,nonce:unref(n$2)},{default:withCtx(()=>[createTextVNode(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-select-viewport]::-webkit-scrollbar { display: none; } `)]),_:1},8,[`nonce`])],64))}}),ks=defineComponent({__name:`SelectScrollButtonImpl`,emits:[`autoScroll`],setup(a$2,{emit:t}){let e$3=t,{injectCollection:n$2}=Fe(),l$1=n$2(),s$1=St$1(zt),r$2=ref(null);function i$1(){r$2.value!==null&&(window.clearInterval(r$2.value),r$2.value=null)}watchEffect(()=>{let c$4=l$1.value.find(f$3=>f$3===me());c$4?.scrollIntoView({block:`nearest`})});function u$1(){r$2.value===null&&(r$2.value=window.setInterval(()=>{e$3(`autoScroll`)},50))}function d$2(){var c$4;(c$4=s$1.onItemLeave)==null||c$4.call(s$1),r$2.value===null&&(r$2.value=window.setInterval(()=>{e$3(`autoScroll`)},50))}return onBeforeUnmount(()=>i$1()),(c$4,f$3)=>{var v$2;return openBlock(),createBlock(unref(O$1),mergeProps({"aria-hidden":`true`,style:{flexShrink:0}},(v$2=c$4.$parent)?.$props,{onPointerdown:u$1,onPointermove:d$2,onPointerleave:f$3[0]||=()=>{i$1()}}),{default:withCtx(()=>[renderSlot(c$4.$slots,`default`)]),_:3},16)}}}),eg=defineComponent({__name:`SelectScrollUpButton`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=St$1(zt),e$3=t.position===`item-aligned`?Io():void 0,{forwardRef:n$2,currentElement:l$1}=R$1(),s$1=ref(!1);return watchEffect(r$2=>{var i$1,u$1;if((i$1=t.viewport)!=null&&i$1.value&&(u$1=t.isPositioned)!=null&&u$1.value){let d$2=function(){s$1.value=c$4.scrollTop>0},c$4=t.viewport.value;d$2(),c$4.addEventListener(`scroll`,d$2),r$2(()=>c$4.removeEventListener(`scroll`,d$2))}}),watch(l$1,()=>{l$1.value&&e$3?.onScrollButtonChange(l$1.value)}),(r$2,i$1)=>s$1.value?(openBlock(),createBlock(ks,{key:0,ref:unref(n$2),onAutoScroll:i$1[0]||=()=>{let{viewport:u$1,selectedItem:d$2}=unref(t);u$1!=null&&u$1.value&&d$2!=null&&d$2.value&&(u$1.value.scrollTop=u$1.value.scrollTop-d$2.value.offsetHeight)}},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},512)):createCommentVNode(``,!0)}}),tg=defineComponent({__name:`SelectScrollDownButton`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=St$1(zt),e$3=t.position===`item-aligned`?Io():void 0,{forwardRef:n$2,currentElement:l$1}=R$1(),s$1=ref(!1);return watchEffect(r$2=>{var i$1,u$1;if((i$1=t.viewport)!=null&&i$1.value&&(u$1=t.isPositioned)!=null&&u$1.value){let d$2=function(){let f$3=c$4.scrollHeight-c$4.clientHeight;s$1.value=Math.ceil(c$4.scrollTop)c$4.removeEventListener(`scroll`,d$2))}}),watch(l$1,()=>{l$1.value&&e$3?.onScrollButtonChange(l$1.value)}),(r$2,i$1)=>s$1.value?(openBlock(),createBlock(ks,{key:0,ref:unref(n$2),onAutoScroll:i$1[0]||=()=>{let{viewport:u$1,selectedItem:d$2}=unref(t);u$1!=null&&u$1.value&&d$2!=null&&d$2.value&&(u$1.value.scrollTop=u$1.value.scrollTop+d$2.value.offsetHeight)}},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},512)):createCommentVNode(``,!0)}}),ag=defineComponent({__name:`SelectValue`,props:{placeholder:{default:``},asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let{forwardRef:t,currentElement:e$3}=R$1(),n$2=xt(),l$1=useSlots();return onBeforeMount(()=>{var r$2;let s$1=!!qa((r$2=l$1?.default)?.call(l$1)).length;n$2.onValueElementHasChildrenChange(s$1)}),onMounted(()=>{n$2.valueElement=e$3}),(s$1,r$2)=>(openBlock(),createBlock(unref(O$1),{ref:unref(t),as:s$1.as,"as-child":s$1.asChild,style:{pointerEvents:`none`}},{default:withCtx(()=>{var i$1;return[unref(As)((i$1=unref(n$2).modelValue)?.value)?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(s$1.placeholder),1)],64)):renderSlot(s$1.$slots,`default`,{key:1})]}),_:3},8,[`as`,`as-child`]))}}),ng=defineComponent({__name:`SelectIcon`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){return(t,e$3)=>(openBlock(),createBlock(unref(O$1),{"aria-hidden":`true`,as:t.as,"as-child":t.asChild},{default:withCtx(()=>[renderSlot(t.$slots,`default`,{},()=>[createTextVNode(`▼`)])]),_:3},8,[`as`,`as-child`]))}}),Ms=defineComponent({__name:`BaseSeparator`,props:{orientation:{default:`horizontal`},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=[`horizontal`,`vertical`];function n$2(i$1){return e$3.includes(i$1)}let l$1=computed(()=>n$2(t.orientation)?t.orientation:`horizontal`),s$1=computed(()=>l$1.value===`vertical`?t.orientation:void 0),r$2=computed(()=>t.decorative?{role:`none`}:{"aria-orientation":s$1.value,role:`separator`});return(i$1,u$1)=>(openBlock(),createBlock(unref(O$1),mergeProps({as:i$1.as,"as-child":i$1.asChild,"data-orientation":l$1.value},r$2.value),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16,[`as`,`as-child`,`data-orientation`]))}}),ap=defineComponent({__name:`Separator`,props:{orientation:{default:`horizontal`},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(Ms,normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}});function np(a$2=[],t,e$3){let n$2=[...a$2];return n$2[e$3]=t,n$2.sort((l$1,s$1)=>l$1-s$1)}function Vs(a$2,t,e$3){let s$1=100/(e$3-t)*(a$2-t);return Ut(s$1,0,100)}function op(a$2,t){return t>2?`Value ${a$2+1} of ${t}`:t===2?[`Minimum`,`Maximum`][a$2]:void 0}function lp(a$2,t){if(a$2.length===1)return 0;let e$3=a$2.map(l$1=>Math.abs(l$1-t)),n$2=Math.min(...e$3);return e$3.indexOf(n$2)}function sp(a$2,t,e$3){let n$2=a$2/2,s$1=To([0,50],[0,n$2]);return(n$2-s$1(t)*e$3)*e$3}function rp(a$2){return a$2.slice(0,-1).map((t,e$3)=>a$2[e$3+1]-t)}function ip(a$2,t){if(t>0){let e$3=rp(a$2);return Math.min(...e$3)>=t}return!0}function To(a$2,t){return e$3=>{if(a$2[0]===a$2[1]||t[0]===t[1])return t[0];let n$2=(t[1]-t[0])/(a$2[1]-a$2[0]);return t[0]+n$2*(e$3-a$2[0])}}function up(a$2){return(String(a$2).split(`.`)[1]||``).length}function dp(a$2,t){let e$3=10**t;return Math.round(a$2*e$3)/e$3}const Fs=[`PageUp`,`PageDown`],Ns=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Ls={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},[zs,Ks]=te([`SliderVertical`,`SliderHorizontal`]),Hs=defineComponent({__name:`SliderImpl`,props:{asChild:{type:Boolean},as:{default:`span`}},emits:[`slideStart`,`slideMove`,`slideEnd`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=un();return(s$1,r$2)=>(openBlock(),createBlock(unref(O$1),mergeProps({"data-slider-impl":``},e$3,{onKeydown:r$2[0]||=i$1=>{i$1.key===`Home`?(n$2(`homeKeyDown`,i$1),i$1.preventDefault()):i$1.key===`End`?(n$2(`endKeyDown`,i$1),i$1.preventDefault()):unref(Fs).concat(unref(Ns)).includes(i$1.key)&&(n$2(`stepKeyDown`,i$1),i$1.preventDefault())},onPointerdown:r$2[1]||=i$1=>{let u$1=i$1.target;u$1.setPointerCapture(i$1.pointerId),i$1.preventDefault(),unref(l$1).thumbElements.value.includes(u$1)?u$1.focus():n$2(`slideStart`,i$1)},onPointermove:r$2[2]||=i$1=>{i$1.target.hasPointerCapture(i$1.pointerId)&&n$2(`slideMove`,i$1)},onPointerup:r$2[3]||=i$1=>{let u$1=i$1.target;u$1.hasPointerCapture(i$1.pointerId)&&(u$1.releasePointerCapture(i$1.pointerId),n$2(`slideEnd`,i$1))}}),{default:withCtx(()=>[renderSlot(s$1.$slots,`default`)]),_:3},16))}}),cp=defineComponent({__name:`SliderHorizontal`,props:{dir:{},min:{},max:{},inverted:{type:Boolean}},emits:[`slideEnd`,`slideStart`,`slideMove`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{max:l$1,min:s$1,dir:r$2,inverted:i$1}=toRefs(e$3),{forwardRef:u$1,currentElement:d$2}=R$1(),c$4=ref(),f$3=computed(()=>r$2?.value===`ltr`&&!i$1.value||r$2?.value!==`ltr`&&i$1.value);function v$2(p$5){let g$2=c$4.value||d$2.value.getBoundingClientRect(),m$3=[0,g$2.width],_$2=f$3.value?[s$1.value,l$1.value]:[l$1.value,s$1.value],C$3=To(m$3,_$2);return c$4.value=g$2,C$3(p$5-g$2.left)}return Ks({startEdge:f$3.value?`left`:`right`,endEdge:f$3.value?`right`:`left`,direction:f$3.value?1:-1,size:`width`}),(p$5,g$2)=>(openBlock(),createBlock(Hs,{ref:unref(u$1),dir:unref(r$2),"data-orientation":`horizontal`,style:{"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:g$2[0]||=m$3=>{let _$2=v$2(m$3.clientX);n$2(`slideStart`,_$2)},onSlideMove:g$2[1]||=m$3=>{let _$2=v$2(m$3.clientX);n$2(`slideMove`,_$2)},onSlideEnd:g$2[2]||=()=>{c$4.value=void 0,n$2(`slideEnd`)},onStepKeyDown:g$2[3]||=m$3=>{let _$2=f$3.value?`from-left`:`from-right`,C$3=unref(Ls)[_$2].includes(m$3.key);n$2(`stepKeyDown`,m$3,C$3?-1:1)},onEndKeyDown:g$2[4]||=m$3=>n$2(`endKeyDown`,m$3),onHomeKeyDown:g$2[5]||=m$3=>n$2(`homeKeyDown`,m$3)},{default:withCtx(()=>[renderSlot(p$5.$slots,`default`)]),_:3},8,[`dir`]))}}),fp=defineComponent({__name:`SliderVertical`,props:{min:{},max:{},inverted:{type:Boolean}},emits:[`slideEnd`,`slideStart`,`slideMove`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{max:l$1,min:s$1,inverted:r$2}=toRefs(e$3),{forwardRef:i$1,currentElement:u$1}=R$1(),d$2=ref(),c$4=computed(()=>!r$2.value);function f$3(v$2){let p$5=d$2.value||u$1.value.getBoundingClientRect(),g$2=[0,p$5.height],m$3=c$4.value?[l$1.value,s$1.value]:[s$1.value,l$1.value],_$2=To(g$2,m$3);return d$2.value=p$5,_$2(v$2-p$5.top)}return Ks({startEdge:c$4.value?`bottom`:`top`,endEdge:c$4.value?`top`:`bottom`,size:`height`,direction:c$4.value?1:-1}),(v$2,p$5)=>(openBlock(),createBlock(Hs,{ref:unref(i$1),"data-orientation":`vertical`,style:{"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:p$5[0]||=g$2=>{let m$3=f$3(g$2.clientY);n$2(`slideStart`,m$3)},onSlideMove:p$5[1]||=g$2=>{let m$3=f$3(g$2.clientY);n$2(`slideMove`,m$3)},onSlideEnd:p$5[2]||=()=>{d$2.value=void 0,n$2(`slideEnd`)},onStepKeyDown:p$5[3]||=g$2=>{let m$3=c$4.value?`from-bottom`:`from-top`,_$2=unref(Ls)[m$3].includes(g$2.key);n$2(`stepKeyDown`,g$2,_$2?-1:1)},onEndKeyDown:p$5[4]||=g$2=>n$2(`endKeyDown`,g$2),onHomeKeyDown:p$5[5]||=g$2=>n$2(`homeKeyDown`,g$2)},{default:withCtx(()=>[renderSlot(v$2.$slots,`default`)]),_:3},512))}}),pp=[`value`,`name`,`disabled`,`step`],[un,vp]=te(`SliderRoot`),og=defineComponent({inheritAttrs:!1,__name:`SliderRoot`,props:{name:{},defaultValue:{default:()=>[0]},modelValue:{},disabled:{type:Boolean,default:!1},orientation:{default:`horizontal`},dir:{},inverted:{type:Boolean,default:!1},min:{default:0},max:{default:100},step:{default:1},minStepsBetweenThumbs:{default:0},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`valueCommit`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{min:l$1,max:s$1,step:r$2,minStepsBetweenThumbs:i$1,orientation:u$1,disabled:d$2,dir:c$4}=toRefs(e$3),f$3=we(c$4),{forwardRef:v$2,currentElement:p$5}=R$1(),g$2=at(p$5);Ca();let m$3=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.modelValue===void 0}),_$2=ref(0),C$3=ref(m$3.value);function $$2(I){let M$1=lp(m$3.value,I);P$2(I,M$1)}function h$3(I){P$2(I,_$2.value)}function E$2(){let I=C$3.value[_$2.value];m$3.value[_$2.value]!==I&&n$2(`valueCommit`,toRaw(m$3.value))}function P$2(I,M$1,{commit:V$2}={commit:!1}){var Q$3;let A$2=up(r$2.value),F$2=dp(Math.round((I-l$1.value)/r$2.value)*r$2.value+l$1.value,A$2),j$1=Ut(F$2,l$1.value,s$1.value),H$3=np(m$3.value,j$1,M$1);if(ip(H$3,i$1.value*r$2.value)){_$2.value=H$3.indexOf(j$1);let G$2=String(H$3)!==String(m$3.value);G$2&&V$2&&n$2(`valueCommit`,H$3),G$2&&((Q$3=D$1.value[_$2.value])==null||Q$3.focus(),m$3.value=H$3)}}let D$1=ref([]);return vp({modelValue:m$3,valueIndexToChangeRef:_$2,thumbElements:D$1,orientation:u$1,min:l$1,max:s$1,disabled:d$2}),(I,M$1)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(wa),null,{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(u$1)===`horizontal`?cp:fp),mergeProps(I.$attrs,{ref:unref(v$2),"as-child":I.asChild,as:I.as,min:unref(l$1),max:unref(s$1),dir:unref(f$3),inverted:I.inverted,"aria-disabled":unref(d$2),"data-disabled":unref(d$2)?``:void 0,onPointerdown:M$1[0]||=()=>{unref(d$2)||(C$3.value=unref(m$3))},onSlideStart:M$1[1]||=V$2=>!unref(d$2)&&$$2(V$2),onSlideMove:M$1[2]||=V$2=>!unref(d$2)&&h$3(V$2),onSlideEnd:M$1[3]||=V$2=>!unref(d$2)&&E$2(),onHomeKeyDown:M$1[4]||=V$2=>!unref(d$2)&&P$2(unref(l$1),0,{commit:!0}),onEndKeyDown:M$1[5]||=V$2=>!unref(d$2)&&P$2(unref(s$1),unref(m$3).length-1,{commit:!0}),onStepKeyDown:M$1[6]||=(V$2,A$2)=>{if(!unref(d$2)){let H$3=unref(Fs).includes(V$2.key)||V$2.shiftKey&&unref(Ns).includes(V$2.key)?10:1,Q$3=_$2.value,G$2=unref(m$3)[Q$3],J$2=unref(r$2)*H$3*A$2;P$2(G$2+J$2,Q$3,{commit:!0})}}}),{default:withCtx(()=>[renderSlot(I.$slots,`default`,{modelValue:unref(m$3)})]),_:3},16,[`as-child`,`as`,`min`,`max`,`dir`,`inverted`,`aria-disabled`,`data-disabled`]))]),_:3}),unref(g$2)?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(unref(m$3),(V$2,A$2)=>(openBlock(),createElementBlock(`input`,{key:A$2,value:V$2,type:`number`,style:{display:`none`},name:I.name?I.name+(unref(m$3).length>1?`[]`:``):void 0,disabled:unref(d$2),step:unref(r$2)},null,8,pp))),128)):createCommentVNode(``,!0)],64))}}),mp=defineComponent({inheritAttrs:!1,__name:`SliderThumbImpl`,props:{index:{},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=un(),n$2=zs(),{forwardRef:l$1,currentElement:s$1}=R$1(),r$2=computed(()=>{var p$5,g$2;return(g$2=(p$5=e$3.modelValue)?.value)?.[t.index]}),i$1=computed(()=>r$2.value===void 0?0:Vs(r$2.value,e$3.min.value??0,e$3.max.value??100)),u$1=computed(()=>{var p$5,g$2;return op(t.index,(g$2=(p$5=e$3.modelValue)?.value)?.length??0)}),d$2=Ll(s$1),c$4=computed(()=>d$2[n$2.size].value),f$3=computed(()=>c$4.value?sp(c$4.value,i$1.value,n$2.direction):0),v$2=Ga();return onMounted(()=>{e$3.thumbElements.value.push(s$1.value)}),onUnmounted(()=>{let p$5=e$3.thumbElements.value.findIndex(g$2=>g$2===s$1.value)??-1;e$3.thumbElements.value.splice(p$5,1)}),(p$5,g$2)=>(openBlock(),createBlock(unref(Qt),null,{default:withCtx(()=>[createVNode(unref(O$1),mergeProps(p$5.$attrs,{ref:unref(l$1),role:`slider`,"data-radix-vue-collection-item":``,tabindex:unref(e$3).disabled.value?void 0:0,"aria-label":p$5.$attrs[`aria-label`]||u$1.value,"data-disabled":unref(e$3).disabled.value?``:void 0,"data-orientation":unref(e$3).orientation.value,"aria-valuenow":r$2.value,"aria-valuemin":unref(e$3).min.value,"aria-valuemax":unref(e$3).max.value,"aria-orientation":unref(e$3).orientation.value,"as-child":p$5.asChild,as:p$5.as,style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[unref(n$2).startEdge]:`calc(${i$1.value}% + ${f$3.value}px)`,display:!unref(v$2)&&r$2.value===void 0?`none`:void 0},onFocus:g$2[0]||=()=>{unref(e$3).valueIndexToChangeRef.value=p$5.index}}),{default:withCtx(()=>[renderSlot(p$5.$slots,`default`)]),_:3},16,[`tabindex`,`aria-label`,`data-disabled`,`data-orientation`,`aria-valuenow`,`aria-valuemin`,`aria-valuemax`,`aria-orientation`,`as-child`,`as`,`style`])]),_:3}))}}),lg=defineComponent({__name:`SliderThumb`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{getItems:e$3}=ea(),{forwardRef:n$2,currentElement:l$1}=R$1(),s$1=computed(()=>l$1.value?e$3().findIndex(r$2=>r$2.ref===l$1.value):-1);return(r$2,i$1)=>(openBlock(),createBlock(mp,mergeProps({ref:unref(n$2)},t,{index:s$1.value}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`index`]))}}),sg=defineComponent({__name:`SliderTrack`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=un();return R$1(),(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),{"as-child":e$3.asChild,as:e$3.as,"data-disabled":unref(t).disabled.value?``:void 0,"data-orientation":unref(t).orientation.value},{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},8,[`as-child`,`as`,`data-disabled`,`data-orientation`]))}}),rg=defineComponent({__name:`SliderRange`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=un(),e$3=zs();R$1();let n$2=computed(()=>{var r$2,i$1;return(i$1=(r$2=t.modelValue)?.value)?.map(u$1=>Vs(u$1,t.min.value,t.max.value))}),l$1=computed(()=>t.modelValue.value.length>1?Math.min(...n$2.value):0),s$1=computed(()=>100-Math.max(...n$2.value));return(r$2,i$1)=>(openBlock(),createBlock(unref(O$1),{"data-disabled":unref(t).disabled.value?``:void 0,"data-orientation":unref(t).orientation.value,"as-child":r$2.asChild,as:r$2.as,style:normalizeStyle({[unref(e$3).startEdge]:`${l$1.value}%`,[unref(e$3).endEdge]:`${s$1.value}%`})},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},8,[`data-disabled`,`data-orientation`,`as-child`,`as`,`style`]))}});let kn=null,$t$1=null;function hp(a$2,t){if(t){let e$3=(t&Xs)!==0,n$2=(t&Zs)!==0,l$1=(t&Js)!==0,s$1=(t&Qs)!==0;if(e$3)return l$1?`se-resize`:s$1?`ne-resize`:`e-resize`;if(n$2)return l$1?`sw-resize`:s$1?`nw-resize`:`w-resize`;if(l$1)return`s-resize`;if(s$1)return`n-resize`}switch(a$2){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function Ws(){$t$1!==null&&(document.head.removeChild($t$1),kn=null,$t$1=null)}function Pn(a$2,t){let e$3=hp(a$2,t);kn!==e$3&&(kn=e$3,$t$1===null&&($t$1=document.createElement(`style`),document.head.appendChild($t$1)),$t$1.innerHTML=`*{cursor: ${e$3}!important;}`)}function yp({defaultSize:a$2,dragState:t,layout:e$3,panelData:n$2,panelIndex:l$1,precision:s$1=3}){let r$2=e$3[l$1],i$1;return i$1=r$2==null?a$2===void 0?`1`:a$2.toPrecision(s$1):n$2.length===1?`1`:r$2.toPrecision(s$1),{flexBasis:0,flexGrow:i$1,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function js(a$2){return a$2.type===`keydown`}function Us(a$2){return a$2.type.startsWith(`mouse`)}function Gs(a$2){return a$2.type.startsWith(`touch`)}function dn(a$2){if(Us(a$2))return{x:a$2.clientX,y:a$2.clientY};if(Gs(a$2)){let t=a$2.touches[0];if(t&&t.clientX&&t.clientY)return{x:t.clientX,y:t.clientY}}return{x:1/0,y:1/0}}function qs(a$2,t){let e$3=a$2===`horizontal`,{x:n$2,y:l$1}=dn(t);return e$3?n$2:l$1}function gp(a$2,t,e$3){return a$2.xt.x&&a$2.yt.y}function pe(a$2,t=`Assertion failed!`){if(!a$2)throw console.error(t),Error(t)}function bp(a$2,t){if(a$2===t)throw Error(`Cannot compare node with itself`);let e$3={a:ll(a$2),b:ll(t)},n$2;for(;e$3.a.at(-1)===e$3.b.at(-1);)a$2=e$3.a.pop(),t=e$3.b.pop(),n$2=a$2;pe(n$2);let l$1={a:ol(nl(e$3.a)),b:ol(nl(e$3.b))};if(l$1.a===l$1.b){let s$1=n$2.childNodes,r$2={a:e$3.a.at(-1),b:e$3.b.at(-1)},i$1=s$1.length;for(;i$1--;){let u$1=s$1[i$1];if(u$1===r$2.a)return 1;if(u$1===r$2.b)return-1}}return Math.sign(l$1.a-l$1.b)}const Cp=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function wp(a$2){let t=getComputedStyle(Ys(a$2)).display;return t===`flex`||t===`inline-flex`}function _p(a$2){let t=getComputedStyle(a$2);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||wp(a$2))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||Cp.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function nl(a$2){let t=a$2.length;for(;t--;){let e$3=a$2[t];if(pe(e$3),_p(e$3))return e$3}return null}function ol(a$2){return a$2&&Number(getComputedStyle(a$2).zIndex)||0}function ll(a$2){let t=[];for(;a$2;)t.push(a$2),a$2=Ys(a$2);return t}function Ys(a$2){var t;return a$2.parentNode instanceof DocumentFragment&&(t=a$2.parentNode)?.host||a$2.parentNode}const Xs=1,Zs=2,Js=4,Qs=8;function xp(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}const Sp=xp()===`coarse`,yt$1=[];let cn$1=!1;const vt$1=new Map,fn=new Map,fa=new Set;function Ep(a$2,t,e$3,n$2,l$1){let{ownerDocument:s$1}=t,r$2={direction:e$3,element:t,hitAreaMargins:n$2,setResizeHandlerState:l$1},i$1=vt$1.get(s$1)??0;return vt$1.set(s$1,i$1+1),fa.add(r$2),Ha(),function(){fn.delete(a$2),fa.delete(r$2);let d$2=vt$1.get(s$1)??1;vt$1.set(s$1,d$2-1),Ha(),Ws(),d$2===1&&vt$1.delete(s$1)}}function Aa(a$2){let{target:t}=a$2,{x:e$3,y:n$2}=dn(a$2);cn$1=!0,Ro({target:t,x:e$3,y:n$2}),Ha(),yt$1.length>0&&(Ao(`down`,a$2),a$2.preventDefault())}function ct$1(a$2){let{x:t,y:e$3}=dn(a$2);if(!cn$1){let{target:n$2}=a$2;Ro({target:n$2,x:t,y:e$3})}Ao(`move`,a$2),er(),yt$1.length>0&&a$2.preventDefault()}function ft$1(a$2){let{target:t}=a$2,{x:e$3,y:n$2}=dn(a$2);fn.clear(),cn$1=!1,yt$1.length>0&&a$2.preventDefault(),Ao(`up`,a$2),Ro({target:t,x:e$3,y:n$2}),er(),Ha()}function Ro({target:a$2,x:t,y:e$3}){yt$1.splice(0);let n$2=null;a$2 instanceof HTMLElement&&(n$2=a$2),fa.forEach(l$1=>{let{element:s$1,hitAreaMargins:r$2}=l$1,i$1=s$1.getBoundingClientRect(),{bottom:u$1,left:d$2,right:c$4,top:f$3}=i$1,v$2=Sp?r$2.coarse:r$2.fine;if(t>=d$2-v$2&&t<=c$4+v$2&&e$3>=f$3-v$2&&e$3<=u$1+v$2){if(n$2!==null&&s$1!==n$2&&!s$1.contains(n$2)&&!n$2.contains(s$1)&&bp(n$2,s$1)>0){let g$2=n$2,m$3=!1;for(;g$2&&!g$2.contains(s$1);){if(gp(g$2.getBoundingClientRect(),i$1)){m$3=!0;break}g$2=g$2.parentElement}if(m$3)return}yt$1.push(l$1)}})}function Dn(a$2,t){fn.set(a$2,t)}function er(){let a$2=!1,t=!1;yt$1.forEach(n$2=>{let{direction:l$1}=n$2;l$1.value===`horizontal`?a$2=!0:t=!0});let e$3=0;fn.forEach(n$2=>{e$3|=n$2}),a$2&&t?Pn(`intersection`,e$3):a$2?Pn(`horizontal`,e$3):t?Pn(`vertical`,e$3):Ws()}function Ha(){vt$1.forEach((a$2,t)=>{let{body:e$3}=t;e$3.removeEventListener(`contextmenu`,ft$1),e$3.removeEventListener(`mousedown`,Aa),e$3.removeEventListener(`mouseleave`,ct$1),e$3.removeEventListener(`mousemove`,ct$1),e$3.removeEventListener(`touchmove`,ct$1),e$3.removeEventListener(`touchstart`,Aa)}),window.removeEventListener(`mouseup`,ft$1),window.removeEventListener(`touchcancel`,ft$1),window.removeEventListener(`touchend`,ft$1),fa.size>0&&(cn$1?(yt$1.length>0&&vt$1.forEach((a$2,t)=>{let{body:e$3}=t;a$2>0&&(e$3.addEventListener(`contextmenu`,ft$1),e$3.addEventListener(`mouseleave`,ct$1),e$3.addEventListener(`mousemove`,ct$1),e$3.addEventListener(`touchmove`,ct$1,{passive:!1}))}),window.addEventListener(`mouseup`,ft$1),window.addEventListener(`touchcancel`,ft$1),window.addEventListener(`touchend`,ft$1)):vt$1.forEach((a$2,t)=>{let{body:e$3}=t;a$2>0&&(e$3.addEventListener(`mousedown`,Aa),e$3.addEventListener(`mousemove`,ct$1),e$3.addEventListener(`touchmove`,ct$1,{passive:!1}),e$3.addEventListener(`touchstart`,Aa))}))}function Ao(a$2,t){fa.forEach(e$3=>{let{setResizeHandlerState:n$2}=e$3,l$1=yt$1.includes(e$3);n$2(a$2,l$1,t)})}const Oo=10;function pa(a$2,t,e$3=Oo){a$2=Number.parseFloat(a$2.toFixed(e$3)),t=Number.parseFloat(t.toFixed(e$3));let n$2=a$2-t;return n$2===0?0:n$2>0?1:-1}function Le(a$2,t,e$3){return pa(a$2,t,e$3)===0}function Wt({panelConstraints:a$2,panelIndex:t,size:e$3}){let n$2=a$2[t];pe(n$2!=null);let{collapsedSize:l$1=0,collapsible:s$1,maxSize:r$2=100,minSize:i$1=0}=n$2;if(pa(e$3,i$1)<0)if(s$1){let u$1=(l$1+i$1)/2;e$3=pa(e$3,u$1)<0?l$1:i$1}else e$3=i$1;return e$3=Math.min(r$2,e$3),e$3=Number.parseFloat(e$3.toFixed(Oo)),e$3}function Oa(a$2,t){if(a$2.length!==t.length)return!1;for(let e$3=0;e$30&&(a$2=a$2<0?0-_$2:_$2)}}}{let c$4=a$2<0?r$2:i$1,f$3=e$3[c$4];pe(f$3);let{collapsible:v$2}=f$3;if(v$2){let p$5=t[c$4];pe(p$5!=null);let g$2=e$3[c$4];pe(g$2);let{collapsedSize:m$3=0,minSize:_$2=0}=g$2;if(Le(p$5,_$2)){let C$3=p$5-m$3;pa(C$3,Math.abs(a$2))>0&&(a$2=a$2<0?0-C$3:C$3)}}}}{let c$4=a$2<0?1:-1,f$3=a$2<0?i$1:r$2,v$2=0;for(;;){let g$2=t[f$3];pe(g$2!=null);let _$2=Wt({panelConstraints:e$3,panelIndex:f$3,size:100})-g$2;if(v$2+=_$2,f$3+=c$4,f$3<0||f$3>=e$3.length)break}let p$5=Math.min(Math.abs(a$2),Math.abs(v$2));a$2=a$2<0?0-p$5:p$5}{let f$3=a$2<0?r$2:i$1;for(;f$3>=0&&f$3=0))break;a$2<0?f$3--:f$3++}}if(Le(u$1,0))return t;{let c$4=a$2<0?i$1:r$2,f$3=t[c$4];pe(f$3!=null);let v$2=f$3+u$1,p$5=Wt({panelConstraints:e$3,panelIndex:c$4,size:v$2});if(s$1[c$4]=p$5,!Le(p$5,v$2)){let g$2=v$2-p$5,_$2=a$2<0?i$1:r$2;for(;_$2>=0&&_$20?_$2--:_$2++}}}let d$2=s$1.reduce((c$4,f$3)=>f$3+c$4,0);return Le(d$2,100)?s$1:t}function tr(a$2,t=document){var n$2;if(!ha)return null;if(t instanceof HTMLElement&&(n$2=t?.dataset)?.panelGroupId===a$2)return t;let e$3=t.querySelector(`[data-panel-group][data-panel-group-id="${a$2}"]`);return e$3||null}function pn(a$2,t=document){if(!ha)return null;let e$3=t.querySelector(`[data-panel-resize-handle-id="${a$2}"]`);return e$3||null}function ar(a$2,t,e$3=document){return ha?va(a$2,e$3).findIndex(s$1=>s$1.getAttribute(`data-panel-resize-handle-id`)===t)??null:null}function va(a$2,t=document){return ha?Array.from(t.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${a$2}"]`)):[]}function Pp(a$2,t,e$3,n$2=document){var d$2,c$4;let l$1=pn(t,n$2),s$1=va(a$2,n$2),r$2=l$1?s$1.indexOf(l$1):-1,i$1=(d$2=e$3[r$2])?.id??null,u$1=(c$4=e$3[r$2+1])?.id??null;return[i$1,u$1]}function Dp(a$2,t,e$3,n$2,l$1){let s$1=e$3===`horizontal`,r$2=pn(t,l$1);pe(r$2);let i$1=r$2.getAttribute(`data-panel-group-id`);pe(i$1);let{initialCursorPosition:u$1}=n$2,d$2=qs(e$3,a$2),c$4=tr(i$1,l$1);pe(c$4);let f$3=c$4.getBoundingClientRect(),v$2=s$1?f$3.width:f$3.height;return(d$2-u$1)/v$2*100}function $p(a$2,t,e$3,n$2,l$1,s$1){if(js(a$2)){let r$2=e$3===`horizontal`,i$1=0;i$1=a$2.shiftKey?100:l$1??10;let u$1=0;switch(a$2.key){case`ArrowDown`:u$1=r$2?0:i$1;break;case`ArrowLeft`:u$1=r$2?-i$1:0;break;case`ArrowRight`:u$1=r$2?i$1:0;break;case`ArrowUp`:u$1=r$2?0:-i$1;break;case`End`:u$1=100;break;case`Home`:u$1=-100;break}return u$1}else return n$2==null?0:Dp(a$2,t,e$3,n$2,s$1)}function Bp({layout:a$2,panelsArray:t,pivotIndices:e$3}){let n$2=0,l$1=100,s$1=0,r$2=0,i$1=e$3[0];pe(i$1!=null),t.forEach((f$3,v$2)=>{let{constraints:p$5}=f$3,{maxSize:g$2=100,minSize:m$3=0}=p$5;v$2===i$1?(n$2=m$3,l$1=g$2):(s$1+=m$3,r$2+=g$2)});let u$1=Math.min(l$1,100-s$1),d$2=Math.max(n$2,100-r$2),c$4=a$2[i$1];return{valueMax:u$1,valueMin:d$2,valueNow:c$4}}function Ip({panelDataArray:a$2}){let t=Array(a$2.length),e$3=a$2.map(s$1=>s$1.constraints),n$2=0,l$1=100;for(let s$1=0;s$1{let s$1=a$2[l$1];pe(s$1);let{callbacks:r$2,constraints:i$1,id:u$1}=s$1,{collapsedSize:d$2=0,collapsible:c$4}=i$1,f$3=e$3[u$1];if(f$3==null||n$2!==f$3){e$3[u$1]=n$2;let{onCollapse:v$2,onExpand:p$5,onResize:g$2}=r$2;g$2&&g$2(n$2,f$3),c$4&&(v$2||p$5)&&(p$5&&(f$3==null||f$3===d$2)&&n$2!==d$2&&p$5(),v$2&&(f$3==null||f$3!==d$2)&&n$2===d$2&&v$2())}})}function Tp(a$2,t=10){let e$3=null;return(...l$1)=>{e$3!==null&&clearTimeout(e$3),e$3=setTimeout(()=>{a$2(...l$1)},t)}}function nr(a$2,t,e$3){let n$2=ar(a$2,t,e$3);return n$2==null?[-1,-1]:[n$2,n$2+1]}function Rp({layout:a$2,panelConstraints:t}){let e$3=[...a$2],n$2=e$3.reduce((s$1,r$2)=>s$1+r$2,0);if(e$3.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${e$3.map(s$1=>`${s$1}%`).join(`, `)}`);if(!Le(n$2,100)){console.warn(`WARNING: Invalid layout total size: ${e$3.map(s$1=>`${s$1}%`).join(`, `)}. Layout normalization will be applied.`);for(let s$1=0;s$1localStorage.getItem(t),a$2.setItem=(t,e$3)=>{localStorage.setItem(t,e$3)};else throw TypeError(`localStorage not supported in this environment`)}catch(t){console.error(t),a$2.getItem=()=>null,a$2.setItem=()=>{}}}function or(a$2){return`radix-vue:${a$2}`}function lr(a$2){return a$2.map(t=>{let{constraints:e$3,id:n$2,idIsFromProps:l$1,order:s$1}=t;return l$1?n$2:s$1?`${s$1}:${JSON.stringify(e$3)}`:JSON.stringify(e$3)}).sort((t,e$3)=>t.localeCompare(e$3)).join(`,`)}function sr(a$2,t){try{let e$3=or(a$2),n$2=t.getItem(e$3);if(n$2){let l$1=JSON.parse(n$2);if(typeof l$1==`object`&&l$1)return l$1}}catch{}return null}function Ap(a$2,t,e$3){let n$2=sr(a$2,e$3)??{},l$1=lr(t);return n$2[l$1]??null}function Op(a$2,t,e$3,n$2,l$1){let s$1=or(a$2),r$2=lr(t),i$1=sr(a$2,l$1)??{};i$1[r$2]={expandToSizes:Object.fromEntries(e$3.entries()),layout:n$2};try{l$1.setItem(s$1,JSON.stringify(i$1))}catch(u$1){console.error(u$1)}}function kp({eagerValuesRef:a$2,groupId:t,layout:e$3,panelDataArray:n$2,panelGroupElement:l$1,setLayout:s$1}){watchEffect(r$2=>{let i$1=l$1.value;if(!i$1)return;let u$1=va(t,i$1);for(let d$2=0;d$2{u$1.forEach(d$2=>{d$2.removeAttribute(`aria-controls`),d$2.removeAttribute(`aria-valuemax`),d$2.removeAttribute(`aria-valuemin`),d$2.removeAttribute(`aria-valuenow`)})})}),watchEffect(r$2=>{let i$1=l$1.value;if(!i$1)return;let u$1=a$2.value;pe(u$1);let{panelDataArray:d$2}=u$1,c$4=tr(t,i$1);pe(c$4!=null,`No group found for id "${t}"`);let f$3=va(t,i$1);pe(f$3);let v$2=f$3.map(p$5=>{let g$2=p$5.getAttribute(`data-panel-resize-handle-id`);pe(g$2);let[m$3,_$2]=Pp(t,g$2,d$2,i$1);if(m$3==null||_$2==null)return()=>{};let C$3=$$2=>{if(!$$2.defaultPrevented)switch($$2.key){case`Enter`:{$$2.preventDefault();let h$3=d$2.findIndex(E$2=>E$2.id===m$3);if(h$3>=0){let E$2=d$2[h$3];pe(E$2);let P$2=e$3.value[h$3],{collapsedSize:D$1=0,collapsible:I,minSize:M$1=0}=E$2.constraints;if(P$2!=null&&I){let V$2=sa({delta:Le(P$2,D$1)?M$1-D$1:D$1-P$2,layout:e$3.value,panelConstraints:d$2.map(A$2=>A$2.constraints),pivotIndices:nr(t,g$2,i$1),trigger:`keyboard`});e$3.value!==V$2&&s$1(V$2)}}break}}};return p$5.addEventListener(`keydown`,C$3),()=>{p$5.removeEventListener(`keydown`,C$3)}});r$2(()=>{v$2.forEach(p$5=>p$5())})})}const Mp=100,ra={getItem:a$2=>(sl(ra),ra.getItem(a$2)),setItem:(a$2,t)=>{sl(ra),ra.setItem(a$2,t)}},[rr,Vp]=te(`PanelGroup`),ig=defineComponent({__name:`SplitterGroup`,props:{id:{},autoSaveId:{default:null},direction:{},keyboardResizeBy:{default:10},storage:{default:()=>ra},asChild:{type:Boolean},as:{}},emits:[`layout`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1={},{direction:s$1}=toRefs(e$3),r$2=ge(e$3.id,`radix-vue-splitter-group`),i$1=we(),{forwardRef:u$1,currentElement:d$2}=R$1(),c$4=ref(null),f$3=ref([]),v$2=ref({}),p$5=ref(new Map),g$2=ref(0),m$3=computed(()=>({autoSaveId:e$3.autoSaveId,direction:e$3.direction,dragState:c$4.value,id:r$2,keyboardResizeBy:e$3.keyboardResizeBy,storage:e$3.storage})),_$2=ref({layout:f$3.value,panelDataArray:[],panelDataArrayChanged:!1}),C$3=z$3=>f$3.value=z$3;kp({eagerValuesRef:_$2,groupId:r$2,layout:f$3,panelDataArray:_$2.value.panelDataArray,setLayout:C$3,panelGroupElement:d$2}),watchEffect(()=>{let{panelDataArray:z$3}=_$2.value,{autoSaveId:K$1}=e$3;if(K$1){if(f$3.value.length===0||f$3.value.length!==z$3.length)return;let L$1=l$1[K$1];L$1||(L$1=Tp(Op,Mp),l$1[K$1]=L$1);let N$2=[...z$3],Z$1=new Map(p$5.value);L$1(K$1,N$2,Z$1,f$3.value,e$3.storage)}});function $$2(z$3,K$1){let{panelDataArray:L$1}=_$2.value,N$2=G$2(L$1,z$3);return yp({defaultSize:K$1,dragState:c$4.value,layout:f$3.value,panelData:L$1,panelIndex:N$2})}function h$3(z$3){let{panelDataArray:K$1}=_$2.value;K$1.push(z$3),K$1.sort((L$1,N$2)=>{let Z$1=L$1.order,Y$2=N$2.order;return Z$1==null&&Y$2==null?0:Z$1==null?-1:Y$2==null?1:Z$1-Y$2}),_$2.value.panelDataArrayChanged=!0}watch(()=>_$2.value.panelDataArrayChanged,()=>{if(_$2.value.panelDataArrayChanged){_$2.value.panelDataArrayChanged=!1;let{autoSaveId:z$3,storage:K$1}=m$3.value,{layout:L$1,panelDataArray:N$2}=_$2.value,Z$1=null;if(z$3){let re$3=Ap(z$3,N$2,K$1);re$3&&(p$5.value=new Map(Object.entries(re$3.expandToSizes)),Z$1=re$3.layout)}Z$1===null&&(Z$1=Ip({panelDataArray:N$2}));let Y$2=Rp({layout:Z$1,panelConstraints:N$2.map(re$3=>re$3.constraints)});Gr(L$1,Y$2)||(C$3(Y$2),_$2.value.layout=Y$2,n$2(`layout`,Y$2),la(N$2,Y$2,v$2.value))}});function E$2(z$3){return function(L$1){L$1.preventDefault();let N$2=d$2.value;if(!N$2)return()=>null;let{direction:Z$1,dragState:Y$2,id:re$3,keyboardResizeBy:X$2}=m$3.value,{layout:se$1,panelDataArray:fe$2}=_$2.value,{initialLayout:xe}=Y$2??{},Ee$2=nr(re$3,z$3,N$2),be$2=$p(L$1,z$3,Z$1,Y$2,X$2,N$2);if(be$2===0)return;let de$3=Z$1===`horizontal`;i$1.value===`rtl`&&de$3&&(be$2=-be$2);let Ie=fe$2.map(Et$2=>Et$2.constraints),Ae$1=sa({delta:be$2,layout:xe??se$1,panelConstraints:Ie,pivotIndices:Ee$2,trigger:js(L$1)?`keyboard`:`mouse-or-touch`}),We=!Oa(se$1,Ae$1);(Us(L$1)||Gs(L$1))&&g$2.value!==be$2&&(g$2.value=be$2,We?Dn(z$3,0):de$3?Dn(z$3,be$2<0?Xs:Zs):Dn(z$3,be$2<0?Js:Qs)),We&&(C$3(Ae$1),_$2.value.layout=Ae$1,n$2(`layout`,Ae$1),la(fe$2,Ae$1,v$2.value))}}function P$2(z$3,K$1){let{layout:L$1,panelDataArray:N$2}=_$2.value,Z$1=N$2.map(xe=>xe.constraints),{panelSize:Y$2,pivotIndices:re$3}=J$2(N$2,z$3,L$1);pe(Y$2!=null);let se$1=G$2(N$2,z$3)===N$2.length-1?Y$2-K$1:K$1-Y$2,fe$2=sa({delta:se$1,layout:L$1,panelConstraints:Z$1,pivotIndices:re$3,trigger:`imperative-api`});Oa(L$1,fe$2)||(C$3(fe$2),_$2.value.layout=fe$2,n$2(`layout`,fe$2),la(N$2,fe$2,v$2.value))}function D$1(z$3,K$1){let{layout:L$1,panelDataArray:N$2}=_$2.value,Z$1=G$2(N$2,z$3);N$2[Z$1]=z$3,_$2.value.panelDataArrayChanged=!0;let{collapsedSize:Y$2=0,collapsible:re$3}=K$1,{collapsedSize:X$2=0,collapsible:se$1,maxSize:fe$2=100,minSize:xe=0}=z$3.constraints,{panelSize:Ee$2}=J$2(N$2,z$3,L$1);Ee$2!==null&&(re$3&&se$1&&Ee$2===Y$2?Y$2!==X$2&&P$2(z$3,X$2):Ee$2fe$2&&P$2(z$3,fe$2))}function I(z$3,K$1){let{direction:L$1}=m$3.value,{layout:N$2}=_$2.value;if(!d$2.value)return;let Z$1=pn(z$3,d$2.value);pe(Z$1);let Y$2=qs(L$1,K$1);c$4.value={dragHandleId:z$3,dragHandleRect:Z$1.getBoundingClientRect(),initialCursorPosition:Y$2,initialLayout:N$2}}function M$1(){c$4.value=null}function V$2(z$3){let{panelDataArray:K$1}=_$2.value,L$1=G$2(K$1,z$3);L$1>=0&&(K$1.splice(L$1,1),delete v$2.value[z$3.id],_$2.value.panelDataArrayChanged=!0)}function A$2(z$3){let{layout:K$1,panelDataArray:L$1}=_$2.value;if(z$3.constraints.collapsible){let N$2=L$1.map(X$2=>X$2.constraints),{collapsedSize:Z$1=0,panelSize:Y$2,pivotIndices:re$3}=J$2(L$1,z$3,K$1);if(pe(Y$2!=null,`Panel size not found for panel "${z$3.id}"`),Y$2!==Z$1){p$5.value.set(z$3.id,Y$2);let se$1=G$2(L$1,z$3)===L$1.length-1?Y$2-Z$1:Z$1-Y$2,fe$2=sa({delta:se$1,layout:K$1,panelConstraints:N$2,pivotIndices:re$3,trigger:`imperative-api`});Oa(K$1,fe$2)||(C$3(fe$2),_$2.value.layout=fe$2,n$2(`layout`,fe$2),la(L$1,fe$2,v$2.value))}}}function F$2(z$3){let{layout:K$1,panelDataArray:L$1}=_$2.value;if(z$3.constraints.collapsible){let N$2=L$1.map(se$1=>se$1.constraints),{collapsedSize:Z$1=0,panelSize:Y$2,minSize:re$3=0,pivotIndices:X$2}=J$2(L$1,z$3,K$1);if(Y$2===Z$1){let se$1=p$5.value.get(z$3.id),fe$2=se$1!=null&&se$1>=re$3?se$1:re$3,Ee$2=G$2(L$1,z$3)===L$1.length-1?Y$2-fe$2:fe$2-Y$2,be$2=sa({delta:Ee$2,layout:K$1,panelConstraints:N$2,pivotIndices:X$2,trigger:`imperative-api`});Oa(K$1,be$2)||(C$3(be$2),_$2.value.layout=be$2,n$2(`layout`,be$2),la(L$1,be$2,v$2.value))}}}function j$1(z$3){let{layout:K$1,panelDataArray:L$1}=_$2.value,{panelSize:N$2}=J$2(L$1,z$3,K$1);return pe(N$2!=null,`Panel size not found for panel "${z$3.id}"`),N$2}function H$3(z$3){let{layout:K$1,panelDataArray:L$1}=_$2.value,{collapsedSize:N$2=0,collapsible:Z$1,panelSize:Y$2}=J$2(L$1,z$3,K$1);return Z$1?Y$2===void 0?z$3.constraints.defaultSize===z$3.constraints.collapsedSize:Y$2===N$2:!1}function Q$3(z$3){let{layout:K$1,panelDataArray:L$1}=_$2.value,{collapsedSize:N$2=0,collapsible:Z$1,panelSize:Y$2}=J$2(L$1,z$3,K$1);return pe(Y$2!=null,`Panel size not found for panel "${z$3.id}"`),!Z$1||Y$2>N$2}Vp({direction:s$1,dragState:c$4.value,groupId:r$2,reevaluatePanelConstraints:D$1,registerPanel:h$3,registerResizeHandle:E$2,resizePanel:P$2,startDragging:I,stopDragging:M$1,unregisterPanel:V$2,panelGroupElement:d$2,collapsePanel:A$2,expandPanel:F$2,isPanelCollapsed:H$3,isPanelExpanded:Q$3,getPanelSize:j$1,getPanelStyle:$$2});function G$2(z$3,K$1){return z$3.findIndex(L$1=>L$1===K$1||L$1.id===K$1.id)}function J$2(z$3,K$1,L$1){let N$2=G$2(z$3,K$1),Y$2=N$2===z$3.length-1?[N$2-1,N$2]:[N$2,N$2+1],re$3=L$1[N$2];return{...K$1.constraints,panelSize:re$3,pivotIndices:Y$2}}return(z$3,K$1)=>(openBlock(),createBlock(unref(O$1),{ref:unref(u$1),as:z$3.as,"as-child":z$3.asChild,style:normalizeStyle({display:`flex`,flexDirection:unref(s$1)===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`}),"data-panel-group":``,"data-orientation":unref(s$1),"data-panel-group-id":unref(r$2)},{default:withCtx(()=>[renderSlot(z$3.$slots,`default`,{layout:f$3.value})]),_:3},8,[`as`,`as-child`,`style`,`data-orientation`,`data-panel-group-id`]))}}),ug=defineComponent({__name:`SplitterPanel`,props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{}},emits:[`collapse`,`expand`,`resize`],setup(a$2,{expose:t,emit:e$3}){let n$2=a$2,l$1=e$3,s$1=rr();if(s$1===null)throw Error(`SplitterPanel components must be rendered within a SplitterGroup container`);let{collapsePanel:r$2,expandPanel:i$1,getPanelSize:u$1,getPanelStyle:d$2,isPanelCollapsed:c$4,resizePanel:f$3,groupId:v$2,reevaluatePanelConstraints:p$5,registerPanel:g$2,unregisterPanel:m$3}=s$1,_$2=ge(n$2.id,`radix-vue-splitter-panel`),C$3=computed(()=>({callbacks:{onCollapse:()=>l$1(`collapse`),onExpand:()=>l$1(`expand`),onResize:(...P$2)=>l$1(`resize`,...P$2)},constraints:{collapsedSize:n$2.collapsedSize&&Number.parseFloat(n$2.collapsedSize.toFixed(Oo)),collapsible:n$2.collapsible,defaultSize:n$2.defaultSize,maxSize:n$2.maxSize,minSize:n$2.minSize},id:_$2,idIsFromProps:n$2.id!==void 0,order:n$2.order}));watch(()=>C$3.value.constraints,(P$2,D$1)=>{(D$1.collapsedSize!==P$2.collapsedSize||D$1.collapsible!==P$2.collapsible||D$1.maxSize!==P$2.maxSize||D$1.minSize!==P$2.minSize)&&p$5(C$3.value,D$1)},{deep:!0}),onMounted(()=>{let P$2=C$3.value;g$2(P$2),onUnmounted(()=>{m$3(P$2)})});let $$2=computed(()=>d$2(C$3.value,n$2.defaultSize)),h$3=computed(()=>c$4(C$3.value)),E$2=computed(()=>!h$3.value);return t({collapse:()=>{r$2(C$3.value)},expand:()=>{i$1(C$3.value)},getSize(){return u$1(C$3.value)},resize:P$2=>{f$3(C$3.value,P$2)},isCollapsed:h$3,isExpanded:E$2}),(P$2,D$1)=>(openBlock(),createBlock(unref(O$1),{id:unref(_$2),style:normalizeStyle($$2.value),as:P$2.as,"as-child":P$2.asChild,"data-panel":``,"data-panel-collapsible":P$2.collapsible||void 0,"data-panel-group-id":unref(v$2),"data-panel-id":unref(_$2),"data-panel-size":Number.parseFloat(`${$$2.value.flexGrow}`).toFixed(1),"data-state":P$2.collapsible?h$3.value?`collapsed`:`expanded`:void 0},{default:withCtx(()=>[renderSlot(P$2.$slots,`default`,{isCollapsed:h$3.value,isExpanded:E$2.value})]),_:3},8,[`id`,`style`,`as`,`as-child`,`data-panel-collapsible`,`data-panel-group-id`,`data-panel-id`,`data-panel-size`,`data-state`]))}});function Fp({disabled:a$2,handleId:t,resizeHandler:e$3,panelGroupElement:n$2}){watchEffect(l$1=>{let s$1=n$2.value;if(a$2.value||e$3.value===null||s$1===null)return;let r$2=pn(t,s$1);if(r$2==null)return;let i$1=u$1=>{var d$2;if(!u$1.defaultPrevented)switch(u$1.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:u$1.preventDefault(),(d$2=e$3.value)==null||d$2.call(e$3,u$1);break;case`F6`:{u$1.preventDefault();let c$4=r$2.getAttribute(`data-panel-group-id`);pe(c$4);let f$3=va(c$4,s$1),v$2=ar(c$4,t,s$1);pe(v$2!==null);let p$5=u$1.shiftKey?v$2>0?v$2-1:f$3.length-1:v$2+1{r$2.removeEventListener(`keydown`,i$1)})})}const dg=defineComponent({__name:`SplitterResizeHandle`,props:{id:{},hitAreaMargins:{},tabindex:{default:0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`dragging`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{forwardRef:l$1,currentElement:s$1}=R$1(),{disabled:r$2}=toRefs(e$3),i$1=rr();if(i$1===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:u$1,groupId:d$2,registerResizeHandle:c$4,startDragging:f$3,stopDragging:v$2,panelGroupElement:p$5}=i$1,g$2=ge(e$3.id,`radix-vue-splitter-resize-handle`),m$3=ref(`inactive`),_$2=ref(!1),C$3=ref(null);return watch(r$2,()=>{ha&&(r$2.value?C$3.value=null:C$3.value=c$4(g$2))},{immediate:!0}),watchEffect($$2=>{var P$2,D$1;if(r$2.value||C$3.value===null)return;let h$3=s$1.value;if(!h$3)return;pe(h$3);let E$2=(I,M$1,V$2)=>{var A$2;if(M$1)switch(I){case`down`:m$3.value=`drag`,f$3(g$2,V$2),n$2(`dragging`,!0);break;case`move`:m$3.value!==`drag`&&(m$3.value=`hover`),(A$2=C$3.value)==null||A$2.call(C$3,V$2);break;case`up`:m$3.value=`hover`,v$2(),n$2(`dragging`,!1);break}else m$3.value=`inactive`};$$2(Ep(g$2,h$3,u$1,{coarse:(P$2=e$3.hitAreaMargins)?.coarse??15,fine:(D$1=e$3.hitAreaMargins)?.fine??5},E$2))}),Fp({disabled:r$2,resizeHandler:C$3,handleId:g$2,panelGroupElement:p$5}),($$2,h$3)=>(openBlock(),createBlock(unref(O$1),{id:unref(g$2),ref:unref(l$1),style:{touchAction:`none`,userSelect:`none`},as:$$2.as,"as-child":$$2.asChild,role:`separator`,"data-resize-handle":``,tabindex:$$2.tabindex,"data-state":m$3.value,"data-disabled":unref(r$2)?``:void 0,"data-orientation":unref(u$1),"data-panel-group-id":unref(d$2),"data-resize-handle-active":m$3.value===`drag`?`pointer`:_$2.value?`keyboard`:void 0,"data-resize-handle-state":m$3.value,"data-panel-resize-handle-enabled":!unref(r$2),"data-panel-resize-handle-id":unref(g$2),onBlur:h$3[0]||=E$2=>_$2.value=!1,onFocus:h$3[1]||=E$2=>_$2.value=!1},{default:withCtx(()=>[renderSlot($$2.$slots,`default`)]),_:3},8,[`id`,`as`,`as-child`,`tabindex`,`data-state`,`data-disabled`,`data-orientation`,`data-panel-group-id`,`data-resize-handle-active`,`data-resize-handle-state`,`data-panel-resize-handle-enabled`,`data-panel-resize-handle-id`]))}}),Np={"aria-live":`polite`,"aria-atomic":`true`,role:`status`,style:{transform:`translateX(-100%)`,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}},[ko,Lp]=te(`StepperRoot`),cg=defineComponent({__name:`StepperRoot`,props:{defaultValue:{default:1},orientation:{default:`horizontal`},dir:{},modelValue:{},linear:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{dir:l$1,orientation:s$1,linear:r$2}=toRefs(e$3),i$1=we(l$1);R$1();let u$1=ref(new Set),d$2=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.modelValue===void 0}),c$4=computed(()=>Array.from(u$1.value)),f$3=computed(()=>d$2.value===1),v$2=computed(()=>d$2.value===c$4.value.length),p$5=computed(()=>u$1.value.size);function g$2(h$3){h$3>p$5.value||h$3<1||u$1.value.size&&c$4.value[h$3]&&c$4.value[h$3].getAttribute(`disabled`)||r$2.value&&h$3>(d$2.value??1)+1||(d$2.value=h$3)}let m$3=ref(null),_$2=ref(null),C$3=computed(()=>m$3.value?m$3.value.getAttribute(`disabled`)===``:!0),$$2=computed(()=>_$2.value?_$2.value.getAttribute(`disabled`)===``:!0);return watch(d$2,async()=>{await nextTick(()=>{m$3.value=c$4.value.length&&d$2.value1?c$4.value[d$2.value-2]:null})}),watch(c$4,async()=>{await nextTick(()=>{m$3.value=c$4.value.length&&d$2.value1?c$4.value[d$2.value-2]:null})}),Lp({modelValue:d$2,changeModelValue:h$3=>{d$2.value=h$3},orientation:s$1,dir:i$1,linear:r$2,totalStepperItems:u$1}),(h$3,E$2)=>(openBlock(),createBlock(unref(O$1),{role:`group`,"aria-label":`progress`,as:h$3.as,"as-child":h$3.asChild,"data-linear":unref(r$2)?``:void 0,"data-orientation":h$3.orientation},{default:withCtx(()=>[renderSlot(h$3.$slots,`default`,{modelValue:unref(d$2),totalSteps:u$1.value.size,isNextDisabled:C$3.value,isPrevDisabled:$$2.value,isFirstStep:f$3.value,isLastStep:v$2.value,goToStep:g$2,nextStep:()=>g$2((unref(d$2)??1)+1),prevStep:()=>g$2((unref(d$2)??1)-1)}),createBaseVNode(`div`,Np,` Step `+toDisplayString(unref(d$2))+` of `+toDisplayString(u$1.value.size),1)]),_:3},8,[`as`,`as-child`,`data-linear`,`data-orientation`]))}}),[Sa,zp]=te(`StepperItem`),fg=defineComponent({__name:`StepperItem`,props:{step:{},disabled:{type:Boolean,default:!1},completed:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{disabled:e$3,step:n$2,completed:l$1}=toRefs(t),{forwardRef:s$1}=R$1(),r$2=ko(),i$1=ge(void 0,`radix-vue-stepper-item-title`),u$1=ge(void 0,`radix-vue-stepper-item-description`),d$2=computed(()=>l$1.value?`completed`:r$2.modelValue.value===n$2.value?`active`:r$2.modelValue.value>n$2.value?`completed`:`inactive`),c$4=computed(()=>e$3.value?!1:r$2.linear.value?n$2.value<=r$2.modelValue.value||n$2.value===r$2.modelValue.value+1:!0);return zp({titleId:i$1,descriptionId:u$1,state:d$2,disabled:e$3,step:n$2,isFocusable:c$4}),(f$3,v$2)=>(openBlock(),createBlock(unref(O$1),{ref:unref(s$1),as:f$3.as,"as-child":f$3.asChild,"aria-current":d$2.value===`active`?`true`:void 0,"data-state":d$2.value,disabled:unref(e$3)||!c$4.value?``:void 0,"data-disabled":unref(e$3)||!c$4.value?``:void 0,"data-orientation":unref(r$2).orientation.value},{default:withCtx(()=>[renderSlot(f$3.$slots,`default`,{state:d$2.value})]),_:3},8,[`as`,`as-child`,`aria-current`,`data-state`,`disabled`,`data-disabled`,`data-orientation`]))}}),pg=defineComponent({__name:`StepperTrigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=ko(),e$3=Sa(),n$2=nt(),l$1=computed(()=>Array.from(t.totalStepperItems.value));function s$1(d$2){if(!e$3.disabled.value){if(t.linear.value){if((e$3.step.value<=t.modelValue.value||e$3.step.value===t.modelValue.value+1)&&d$2.ctrlKey===!1){t.changeModelValue(e$3.step.value);return}}else if(d$2.ctrlKey===!1){t.changeModelValue(e$3.step.value);return}d$2.preventDefault()}}function r$2(d$2){d$2.preventDefault(),!e$3.disabled.value&&((d$2.key===n$2.ENTER||d$2.key===n$2.SPACE)&&!d$2.ctrlKey&&!d$2.shiftKey&&t.changeModelValue(e$3.step.value),[n$2.ARROW_LEFT,n$2.ARROW_RIGHT,n$2.ARROW_UP,n$2.ARROW_DOWN].includes(d$2.key)&&At(d$2,me(),void 0,{itemsArray:l$1.value,focus:!0,loop:!1,arrowKeyOptions:t.orientation.value,dir:t.dir.value}))}let{forwardRef:i$1,currentElement:u$1}=R$1();return onMounted(()=>{t.totalStepperItems.value.add(u$1.value)}),onUnmounted(()=>{t.totalStepperItems.value.delete(u$1.value)}),(d$2,c$4)=>(openBlock(),createBlock(unref(O$1),{ref:unref(i$1),type:d$2.as===`button`?`button`:void 0,as:d$2.as,"as-child":d$2.asChild,"data-state":unref(e$3).state.value,disabled:unref(e$3).disabled.value||!unref(e$3).isFocusable.value?``:void 0,"data-disabled":unref(e$3).disabled.value||!unref(e$3).isFocusable.value?``:void 0,"data-orientation":unref(t).orientation.value,tabindex:unref(e$3).isFocusable.value?0:-1,"aria-describedby":unref(e$3).descriptionId,"aria-labelledby":unref(e$3).titleId,onMousedown:withModifiers(s$1,[`left`]),onKeydown:withKeys(r$2,[`enter`,`space`,`left`,`right`,`up`,`down`])},{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},8,[`type`,`as`,`as-child`,`data-state`,`disabled`,`data-disabled`,`data-orientation`,`tabindex`,`aria-describedby`,`aria-labelledby`]))}}),vg=defineComponent({__name:`StepperDescription`,props:{asChild:{type:Boolean},as:{default:`p`}},setup(a$2){let t=a$2;R$1();let e$3=Sa();return(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{id:unref(e$3).descriptionId}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`id`]))}}),mg=defineComponent({__name:`StepperTitle`,props:{asChild:{type:Boolean},as:{default:`h4`}},setup(a$2){let t=a$2,e$3=Sa();return R$1(),(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{id:unref(e$3).titleId}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`id`]))}}),hg=defineComponent({__name:`StepperIndicator`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=Sa();return R$1(),(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`,{},()=>[createTextVNode(` Step `+toDisplayString(unref(e$3).step.value),1)])]),_:3},16))}}),yg=defineComponent({__name:`StepperSeparator`,props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=ko(),n$2=Sa();return R$1(),(l$1,s$1)=>(openBlock(),createBlock(unref(ap),mergeProps(t,{decorative:``,orientation:unref(e$3).orientation.value,"data-state":unref(n$2).state.value}),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`)]),_:3},16,[`orientation`,`data-state`]))}}),Kp=[`name`,`disabled`,`required`,`value`,`checked`,`data-state`,`data-disabled`],[Hp,Wp]=te(`SwitchRoot`),gg=defineComponent({__name:`SwitchRoot`,props:{defaultChecked:{type:Boolean},checked:{type:Boolean,default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{default:`on`},asChild:{type:Boolean},as:{default:`button`}},emits:[`update:checked`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{disabled:l$1}=toRefs(e$3),s$1=ne(e$3,`checked`,n$2,{defaultValue:e$3.defaultChecked,passive:e$3.checked===void 0});function r$2(){l$1.value||(s$1.value=!s$1.value)}let{forwardRef:i$1,currentElement:u$1}=R$1(),d$2=at(u$1),c$4=computed(()=>{var f$3;return e$3.id&&u$1.value?(f$3=document.querySelector(`[for="${e$3.id}"]`))?.innerText:void 0});return Wp({checked:s$1,toggleCheck:r$2,disabled:l$1}),(f$3,v$2)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$1),mergeProps(f$3.$attrs,{id:f$3.id,ref:unref(i$1),role:`switch`,type:f$3.as===`button`?`button`:void 0,value:f$3.value,"aria-label":f$3.$attrs[`aria-label`]||c$4.value,"aria-checked":unref(s$1),"aria-required":f$3.required,"data-state":unref(s$1)?`checked`:`unchecked`,"data-disabled":unref(l$1)?``:void 0,"as-child":f$3.asChild,as:f$3.as,disabled:unref(l$1),onClick:r$2,onKeydown:withKeys(withModifiers(r$2,[`prevent`]),[`enter`])}),{default:withCtx(()=>[renderSlot(f$3.$slots,`default`,{checked:unref(s$1)})]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]),unref(d$2)?(openBlock(),createElementBlock(`input`,{key:0,type:`checkbox`,name:f$3.name,tabindex:`-1`,"aria-hidden":`true`,disabled:unref(l$1),required:f$3.required,value:f$3.value,checked:!!unref(s$1),"data-state":unref(s$1)?`checked`:`unchecked`,"data-disabled":unref(l$1)?``:void 0,style:{transform:`translateX(-100%)`,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}},null,8,Kp)):createCommentVNode(``,!0)],64))}}),bg=defineComponent({__name:`SwitchThumb`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=Hp();return R$1(),(e$3,n$2)=>{var l$1;return openBlock(),createBlock(unref(O$1),{"data-state":(l$1=unref(t).checked)!=null&&l$1.value?`checked`:`unchecked`,"data-disabled":unref(t).disabled.value?``:void 0,"as-child":e$3.asChild,as:e$3.as},{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`])}}}),[vn,jp]=te(`TabsRoot`),Cg=defineComponent({__name:`TabsRoot`,props:{defaultValue:{},orientation:{default:`horizontal`},dir:{},activationMode:{default:`automatic`},modelValue:{},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{orientation:l$1,dir:s$1}=toRefs(e$3),r$2=we(s$1);R$1();let i$1=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.modelValue===void 0}),u$1=ref();return jp({modelValue:i$1,changeModelValue:d$2=>{i$1.value=d$2},orientation:l$1,dir:r$2,activationMode:e$3.activationMode,baseId:ge(void 0,`radix-vue-tabs`),tabsList:u$1}),(d$2,c$4)=>(openBlock(),createBlock(unref(O$1),{dir:unref(r$2),"data-orientation":unref(l$1),"as-child":d$2.asChild,as:d$2.as},{default:withCtx(()=>[renderSlot(d$2.$slots,`default`,{modelValue:unref(i$1)})]),_:3},8,[`dir`,`data-orientation`,`as-child`,`as`]))}}),wg=defineComponent({__name:`TabsList`,props:{loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{loop:e$3}=toRefs(t),{forwardRef:n$2,currentElement:l$1}=R$1(),s$1=vn();return s$1.tabsList=l$1,(r$2,i$1)=>(openBlock(),createBlock(unref(Ft),{"as-child":``,orientation:unref(s$1).orientation.value,dir:unref(s$1).dir.value,loop:unref(e$3)},{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(n$2),role:`tablist`,"as-child":r$2.asChild,as:r$2.as,"aria-orientation":unref(s$1).orientation.value},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},8,[`as-child`,`as`,`aria-orientation`])]),_:3},8,[`orientation`,`dir`,`loop`]))}});function ir(a$2,t){return`${a$2}-trigger-${t}`}function ur(a$2,t){return`${a$2}-content-${t}`}const _g=defineComponent({__name:`TabsContent`,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1(),n$2=vn(),l$1=computed(()=>ir(n$2.baseId,t.value)),s$1=computed(()=>ur(n$2.baseId,t.value)),r$2=computed(()=>t.value===n$2.modelValue.value),i$1=ref(r$2.value);return onMounted(()=>{requestAnimationFrame(()=>{i$1.value=!1})}),(u$1,d$2)=>(openBlock(),createBlock(unref(Pe),{present:r$2.value,"force-mount":``},{default:withCtx(({present:c$4})=>[createVNode(unref(O$1),{id:s$1.value,ref:unref(e$3),"as-child":u$1.asChild,as:u$1.as,role:`tabpanel`,"data-state":r$2.value?`active`:`inactive`,"data-orientation":unref(n$2).orientation.value,"aria-labelledby":l$1.value,hidden:!c$4.value,tabindex:`0`,style:normalizeStyle({animationDuration:i$1.value?`0s`:void 0})},{default:withCtx(()=>[u$1.forceMount||r$2.value?renderSlot(u$1.$slots,`default`,{key:0}):createCommentVNode(``,!0)]),_:2},1032,[`id`,`as-child`,`as`,`data-state`,`data-orientation`,`aria-labelledby`,`hidden`,`style`])]),_:3},8,[`present`]))}}),xg=defineComponent({__name:`TabsTrigger`,props:{value:{},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1(),n$2=vn(),l$1=computed(()=>ir(n$2.baseId,t.value)),s$1=computed(()=>ur(n$2.baseId,t.value)),r$2=computed(()=>t.value===n$2.modelValue.value);return(i$1,u$1)=>(openBlock(),createBlock(unref(Nt$1),{"as-child":``,focusable:!i$1.disabled,active:r$2.value},{default:withCtx(()=>[createVNode(unref(O$1),{id:l$1.value,ref:unref(e$3),role:`tab`,type:i$1.as===`button`?`button`:void 0,as:i$1.as,"as-child":i$1.asChild,"aria-selected":r$2.value?`true`:`false`,"aria-controls":s$1.value,"data-state":r$2.value?`active`:`inactive`,disabled:i$1.disabled,"data-disabled":i$1.disabled?``:void 0,"data-orientation":unref(n$2).orientation.value,onMousedown:u$1[0]||=withModifiers(d$2=>{!i$1.disabled&&d$2.ctrlKey===!1?unref(n$2).changeModelValue(i$1.value):d$2.preventDefault()},[`left`]),onKeydown:u$1[1]||=withKeys(d$2=>unref(n$2).changeModelValue(i$1.value),[`enter`,`space`]),onFocus:u$1[2]||=()=>{let d$2=unref(n$2).activationMode!==`manual`;!r$2.value&&!i$1.disabled&&d$2&&unref(n$2).changeModelValue(i$1.value)}},{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},8,[`id`,`type`,`as`,`as-child`,`aria-selected`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`data-orientation`])]),_:3},8,[`focusable`,`active`]))}}),Sg=defineComponent({__name:`TabsIndicator`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=vn();R$1();let n$2=ref(),l$1=ref({size:null,position:null});watch(()=>[e$3.modelValue.value,e$3?.dir.value],async()=>{await nextTick(),s$1()},{immediate:!0}),tt([e$3.tabsList,n$2],s$1);function s$1(){var r$2;n$2.value=(r$2=e$3.tabsList.value)?.querySelector(`[role="tab"][data-state="active"]`),n$2.value&&(e$3.orientation.value===`horizontal`?l$1.value={size:n$2.value.offsetWidth,position:n$2.value.offsetLeft}:l$1.value={size:n$2.value.offsetHeight,position:n$2.value.offsetTop})}return(r$2,i$1)=>typeof l$1.value.size==`number`?(openBlock(),createBlock(unref(O$1),mergeProps({key:0},t,{style:{"--radix-tabs-indicator-size":`${l$1.value.size}px`,"--radix-tabs-indicator-position":`${l$1.value.position}px`}}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`style`])):createCommentVNode(``,!0)}}),[mn,Up]=te(`TagsInputRoot`),Eg=defineComponent({__name:`TagsInputRoot`,props:{modelValue:{},defaultValue:{default:()=>[]},addOnPaste:{type:Boolean},addOnTab:{type:Boolean},addOnBlur:{type:Boolean},duplicate:{type:Boolean},disabled:{type:Boolean},delimiter:{default:`,`},dir:{},max:{default:0},required:{type:Boolean},name:{},id:{},convertValue:{},displayValue:{type:Function,default:a$2=>a$2.toString()},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`invalid`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{addOnPaste:l$1,disabled:s$1,delimiter:r$2,max:i$1,id:u$1,dir:d$2,addOnBlur:c$4,addOnTab:f$3}=toRefs(e$3),v$2=we(d$2),p$5=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:!0,deep:!0}),{forwardRef:g$2,currentElement:m$3}=R$1(),{focused:_$2}=Si(m$3),C$3=at(m$3),{getItems:$$2}=Ca(),h$3=ref(),E$2=ref(!1);return Up({modelValue:p$5,onAddValue:P$2=>{let D$1=p$5.value.length>0&&typeof p$5.value[0]==`object`,I=p$5.value.length>0&&typeof e$3.defaultValue[0]==`object`;if((D$1||I)&&typeof e$3.convertValue!=`function`)throw Error("You must provide a `convertValue` function when using objects as values.");let M$1=e$3.convertValue?e$3.convertValue(P$2):P$2;if(p$5.value.length>=i$1.value&&i$1.value)return n$2(`invalid`,M$1),!1;if(e$3.duplicate)return p$5.value=[...p$5.value,M$1],!0;if(p$5.value.includes(M$1))E$2.value=!0;else return p$5.value=[...p$5.value,M$1],!0;return n$2(`invalid`,M$1),!1},onRemoveValue:P$2=>{P$2!==-1&&(p$5.value=p$5.value.filter((D$1,I)=>I!==P$2))},onInputKeydown:P$2=>{let D$1=P$2.target,I=$$2().map(V$2=>V$2.ref).filter(V$2=>V$2.dataset.disabled!==``);if(!I.length)return;let M$1=I.at(-1);switch(P$2.key){case`Delete`:case`Backspace`:if(D$1.selectionStart!==0||D$1.selectionEnd!==0)break;if(h$3.value){let V$2=I.findIndex(A$2=>A$2===h$3.value);p$5.value=p$5.value.filter((A$2,F$2)=>F$2!==V$2),h$3.value=h$3.value===M$1?I.at(V$2-1):I.at(V$2+1),P$2.preventDefault()}else P$2.key===`Backspace`&&(h$3.value=M$1,P$2.preventDefault());break;case`Home`:case`End`:case`ArrowRight`:case`ArrowLeft`:{let V$2=P$2.key===`ArrowRight`&&v$2.value===`ltr`||P$2.key===`ArrowLeft`&&v$2.value===`rtl`,A$2=!V$2;if(D$1.selectionStart!==0||D$1.selectionEnd!==0)break;if(A$2&&!h$3.value)h$3.value=M$1,P$2.preventDefault();else if(V$2&&M$1&&h$3.value===M$1)h$3.value=void 0,P$2.preventDefault();else if(h$3.value){let F$2=At(P$2,h$3.value,void 0,{itemsArray:I,loop:!1,dir:v$2.value});F$2&&(h$3.value=F$2),P$2.preventDefault()}break}case`ArrowUp`:case`ArrowDown`:h$3.value&&P$2.preventDefault();break;default:h$3.value=void 0}},selectedElement:h$3,isInvalidInput:E$2,addOnPaste:l$1,addOnBlur:c$4,addOnTab:f$3,dir:v$2,disabled:s$1,delimiter:r$2,max:i$1,id:u$1,displayValue:e$3.displayValue}),(P$2,D$1)=>(openBlock(),createBlock(unref(wa),null,{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(g$2),dir:unref(v$2),as:P$2.as,"as-child":P$2.asChild,"data-invalid":E$2.value?``:void 0,"data-disabled":unref(s$1)?``:void 0,"data-focused":unref(_$2)?``:void 0},{default:withCtx(()=>[renderSlot(P$2.$slots,`default`,{modelValue:unref(p$5)}),unref(C$3)&&P$2.name?(openBlock(),createBlock(unref(no),{key:0,name:P$2.name,value:unref(p$5),required:P$2.required,disabled:unref(s$1)},null,8,[`name`,`value`,`required`,`disabled`])):createCommentVNode(``,!0)]),_:3},8,[`dir`,`as`,`as-child`,`data-invalid`,`data-disabled`,`data-focused`])]),_:3}))}}),Pg=defineComponent({__name:`TagsInputInput`,props:{placeholder:{},autoFocus:{type:Boolean},maxLength:{},asChild:{type:Boolean},as:{default:`input`}},setup(a$2){let t=a$2,e$3=mn(),{forwardRef:n$2,currentElement:l$1}=R$1();function s$1(p$5){if(!e$3.addOnBlur.value)return;let g$2=p$5.target;g$2.value&&e$3.onAddValue(g$2.value)&&(g$2.value=``)}function r$2(p$5){e$3.addOnTab.value&&c$4(p$5)}let i$1=ref(!1);function u$1(){i$1.value=!0}function d$2(){requestAnimationFrame(()=>{i$1.value=!1})}async function c$4(p$5){if(i$1.value||(await nextTick(),p$5.defaultPrevented))return;let g$2=p$5.target;g$2.value&&(e$3.onAddValue(g$2.value)&&(g$2.value=``),p$5.preventDefault())}function f$3(p$5){e$3.isInvalidInput.value=!1;let g$2=e$3.delimiter.value;if(g$2===p$5.data){let m$3=p$5.target;m$3.value=m$3.value.replaceAll(g$2,``),e$3.onAddValue(m$3.value)&&(m$3.value=``)}}function v$2(p$5){if(e$3.addOnPaste.value){p$5.preventDefault();let g$2=p$5.clipboardData;if(!g$2)return;let m$3=g$2.getData(`text`);e$3.delimiter.value?m$3.split(e$3.delimiter.value).forEach(C$3=>{e$3.onAddValue(C$3)}):e$3.onAddValue(m$3)}}return onMounted(()=>{let p$5=l$1.value.nodeName===`INPUT`?l$1.value:l$1.value.querySelector(`input`);p$5&&setTimeout(()=>{t.autoFocus&&p$5?.focus()},1)}),(p$5,g$2)=>{var m$3;return openBlock(),createBlock(unref(O$1),{id:(m$3=unref(e$3).id)?.value,ref:unref(n$2),type:`text`,autocomplete:`off`,autocorrect:`off`,autocapitalize:`off`,as:p$5.as,"as-child":p$5.asChild,maxlength:p$5.maxLength,placeholder:p$5.placeholder,disabled:unref(e$3).disabled.value,"data-invalid":unref(e$3).isInvalidInput.value?``:void 0,onInput:f$3,onKeydown:[withKeys(c$4,[`enter`]),withKeys(r$2,[`tab`]),unref(e$3).onInputKeydown],onBlur:s$1,onCompositionstart:u$1,onCompositionend:d$2,onPaste:v$2},{default:withCtx(()=>[renderSlot(p$5.$slots,`default`)]),_:3},8,[`id`,`as`,`as-child`,`maxlength`,`placeholder`,`disabled`,`data-invalid`,`onKeydown`])}}}),[dr,Gp]=te(`TagsInputItem`),Dg=defineComponent({__name:`TagsInputItem`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{value:e$3}=toRefs(t),n$2=mn(),{forwardRef:l$1,currentElement:s$1}=R$1(),r$2=computed(()=>n$2.selectedElement.value===s$1.value),i$1=computed(()=>t.disabled||n$2.disabled.value),u$1=Gp({value:e$3,isSelected:r$2,disabled:i$1,textId:``,displayValue:computed(()=>n$2.displayValue(e$3.value))});return(d$2,c$4)=>(openBlock(),createBlock(unref(Qt),null,{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(l$1),as:d$2.as,"as-child":d$2.asChild,"aria-labelledby":unref(u$1).textId,"aria-current":r$2.value,"data-disabled":i$1.value?``:void 0,"data-state":r$2.value?`active`:`inactive`},{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-labelledby`,`aria-current`,`data-disabled`,`data-state`])]),_:3}))}}),$g=defineComponent({__name:`TagsInputItemText`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=a$2,e$3=dr();return R$1(),e$3.textId||=ge(void 0,`radix-vue-tags-input-item-text`),(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{id:unref(e$3).textId}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`,{},()=>[createTextVNode(toDisplayString(unref(e$3).displayValue.value),1)])]),_:3},16,[`id`]))}}),Bg=defineComponent({__name:`TagsInputItemDelete`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2;R$1();let e$3=mn(),n$2=dr(),l$1=computed(()=>{var r$2;return(r$2=n$2.disabled)?.value||e$3.disabled.value});function s$1(){if(l$1.value)return;let r$2=e$3.modelValue.value.findIndex(i$1=>i$1===n$2.value.value);e$3.onRemoveValue(r$2)}return(r$2,i$1)=>(openBlock(),createBlock(unref(O$1),mergeProps({tabindex:`-1`},t,{"aria-labelledby":unref(n$2).textId,"aria-current":unref(n$2).isSelected.value,"data-state":unref(n$2).isSelected.value?`active`:`inactive`,"data-disabled":l$1.value?``:void 0,type:r$2.as===`button`?`button`:void 0,onClick:s$1}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`aria-labelledby`,`aria-current`,`data-state`,`data-disabled`,`type`]))}}),Ig=defineComponent({__name:`TagsInputClear`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2;R$1();let e$3=mn();function n$2(){e$3.disabled.value||(e$3.modelValue.value=[])}return(l$1,s$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{type:l$1.as===`button`?`button`:void 0,"data-disabled":unref(e$3).disabled.value?``:void 0,onClick:n$2}),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`)]),_:3},16,[`type`,`data-disabled`]))}}),[hn,qp]=te(`ToastProvider`),Tg=defineComponent({inheritAttrs:!1,__name:`ToastProvider`,props:{label:{default:`Notification`},duration:{default:5e3},swipeDirection:{default:`right`},swipeThreshold:{default:50}},setup(a$2){let t=a$2,{label:e$3,duration:n$2,swipeDirection:l$1,swipeThreshold:s$1}=toRefs(t),r$2=ref(),i$1=ref(0),u$1=ref(!1),d$2=ref(!1);if(t.label&&typeof t.label==`string`&&!t.label.trim()){let c$4="Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.";throw Error(c$4)}return qp({label:e$3,duration:n$2,swipeDirection:l$1,swipeThreshold:s$1,toastCount:i$1,viewport:r$2,onViewportChange(c$4){r$2.value=c$4},onToastAdd(){i$1.value++},onToastRemove(){i$1.value--},isFocusedToastEscapeKeyDownRef:u$1,isClosePausedRef:d$2}),(c$4,f$3)=>renderSlot(c$4.$slots,`default`)}}),Yp=`toast.swipeStart`,Xp=`toast.swipeMove`,Zp=`toast.swipeCancel`,Jp=`toast.swipeEnd`,Mn=`toast.viewportPause`,Vn=`toast.viewportResume`;function ka(a$2,t,e$3){let n$2=e$3.originalEvent.currentTarget,l$1=new CustomEvent(a$2,{bubbles:!1,cancelable:!0,detail:e$3});t&&n$2.addEventListener(a$2,t,{once:!0}),n$2.dispatchEvent(l$1)}function rl(a$2,t,e$3=0){let n$2=Math.abs(a$2.x),l$1=Math.abs(a$2.y),s$1=n$2>l$1;return t===`left`||t===`right`?s$1&&n$2>e$3:!s$1&&l$1>e$3}function Qp(a$2){return a$2.nodeType===a$2.ELEMENT_NODE}function cr(a$2){let t=[];return Array.from(a$2.childNodes).forEach(n$2=>{if(n$2.nodeType===n$2.TEXT_NODE&&n$2.textContent&&t.push(n$2.textContent),Qp(n$2)){let l$1=n$2.ariaHidden||n$2.hidden||n$2.style.display===`none`,s$1=n$2.dataset.radixToastAnnounceExclude===``;if(!l$1)if(s$1){let r$2=n$2.dataset.radixToastAnnounceAlt;r$2&&t.push(r$2)}else t.push(...cr(n$2))}}),t}const ev=defineComponent({__name:`ToastAnnounce`,setup(a$2){let t=hn(),e$3=gi(1e3),n$2=ref(!1);return Ol(()=>{n$2.value=!0}),(l$1,s$1)=>unref(e$3)||n$2.value?(openBlock(),createBlock(unref(Jt),{key:0},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t).label.value)+` `,1),renderSlot(l$1.$slots,`default`)]),_:3})):createCommentVNode(``,!0)}}),[tv,av]=te(`ToastRoot`),nv=defineComponent({inheritAttrs:!1,__name:`ToastRootImpl`,props:{type:{},open:{type:Boolean,default:!1},duration:{},asChild:{type:Boolean},as:{default:`li`}},emits:[`close`,`escapeKeyDown`,`pause`,`resume`,`swipeStart`,`swipeMove`,`swipeCancel`,`swipeEnd`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{forwardRef:l$1,currentElement:s$1}=R$1(),r$2=hn(),i$1=ref(null),u$1=ref(null),d$2=computed(()=>typeof e$3.duration==`number`?e$3.duration:r$2.duration.value),c$4=ref(0),f$3=ref(d$2.value),v$2=ref(0),p$5=ref(d$2.value),g$2=Ol(()=>{let $$2=new Date().getTime()-c$4.value;p$5.value=Math.max(f$3.value-$$2,0)},{fpsLimit:60});function m$3($$2){$$2<=0||$$2===1/0||Je&&(window.clearTimeout(v$2.value),c$4.value=new Date().getTime(),v$2.value=window.setTimeout(_$2,$$2))}function _$2(){var h$3,E$2;(h$3=s$1.value)!=null&&h$3.contains(me())&&((E$2=r$2.viewport.value)==null||E$2.focus()),r$2.isClosePausedRef.value=!1,n$2(`close`)}let C$3=computed(()=>s$1.value?cr(s$1.value):null);if(e$3.type&&![`foreground`,`background`].includes(e$3.type)){let $$2="Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.";throw Error($$2)}return watchEffect($$2=>{let h$3=r$2.viewport.value;if(h$3){let E$2=()=>{m$3(f$3.value),g$2.resume(),n$2(`resume`)},P$2=()=>{let D$1=new Date().getTime()-c$4.value;f$3.value-=D$1,window.clearTimeout(v$2.value),g$2.pause(),n$2(`pause`)};return h$3.addEventListener(Mn,P$2),h$3.addEventListener(Vn,E$2),()=>{h$3.removeEventListener(Mn,P$2),h$3.removeEventListener(Vn,E$2)}}}),watch(()=>[e$3.open,d$2.value],()=>{f$3.value=d$2.value,e$3.open&&!r$2.isClosePausedRef.value&&m$3(d$2.value)},{immediate:!0}),Gn(`Escape`,$$2=>{n$2(`escapeKeyDown`,$$2),$$2.defaultPrevented||(r$2.isFocusedToastEscapeKeyDownRef.value=!0,_$2())}),onMounted(()=>{r$2.onToastAdd()}),onUnmounted(()=>{r$2.onToastRemove()}),av({onClose:_$2}),($$2,h$3)=>(openBlock(),createElementBlock(Fragment,null,[C$3.value?(openBlock(),createBlock(ev,{key:0,role:`alert`,"aria-live":$$2.type===`foreground`?`assertive`:`polite`,"aria-atomic":`true`},{default:withCtx(()=>[createTextVNode(toDisplayString(C$3.value),1)]),_:1},8,[`aria-live`])):createCommentVNode(``,!0),unref(r$2).viewport.value?(openBlock(),createBlock(Teleport,{key:1,to:unref(r$2).viewport.value},[createVNode(unref(O$1),mergeProps({ref:unref(l$1),role:`alert`,"aria-live":`off`,"aria-atomic":`true`,tabindex:`0`,"data-radix-vue-collection-item":``},$$2.$attrs,{as:$$2.as,"as-child":$$2.asChild,"data-state":$$2.open?`open`:`closed`,"data-swipe-direction":unref(r$2).swipeDirection.value,style:{userSelect:`none`,touchAction:`none`},onPointerdown:h$3[0]||=withModifiers(E$2=>{i$1.value={x:E$2.clientX,y:E$2.clientY}},[`left`]),onPointermove:h$3[1]||=E$2=>{if(!i$1.value)return;let P$2=E$2.clientX-i$1.value.x,D$1=E$2.clientY-i$1.value.y,I=!!u$1.value,M$1=[`left`,`right`].includes(unref(r$2).swipeDirection.value),V$2=[`left`,`up`].includes(unref(r$2).swipeDirection.value)?Math.min:Math.max,A$2=M$1?V$2(0,P$2):0,F$2=M$1?0:V$2(0,D$1),j$1=E$2.pointerType===`touch`?10:2,H$3={x:A$2,y:F$2},Q$3={originalEvent:E$2,delta:H$3};I?(u$1.value=H$3,unref(ka)(unref(Xp),G$2=>n$2(`swipeMove`,G$2),Q$3)):unref(rl)(H$3,unref(r$2).swipeDirection.value,j$1)?(u$1.value=H$3,unref(ka)(unref(Yp),G$2=>n$2(`swipeStart`,G$2),Q$3),E$2.target.setPointerCapture(E$2.pointerId)):(Math.abs(P$2)>j$1||Math.abs(D$1)>j$1)&&(i$1.value=null)},onPointerup:h$3[2]||=E$2=>{let P$2=u$1.value,D$1=E$2.target;if(D$1.hasPointerCapture(E$2.pointerId)&&D$1.releasePointerCapture(E$2.pointerId),u$1.value=null,i$1.value=null,P$2){let I=E$2.currentTarget,M$1={originalEvent:E$2,delta:P$2};unref(rl)(P$2,unref(r$2).swipeDirection.value,unref(r$2).swipeThreshold.value)?unref(ka)(unref(Jp),V$2=>n$2(`swipeEnd`,V$2),M$1):unref(ka)(unref(Zp),V$2=>n$2(`swipeCancel`,V$2),M$1),I?.addEventListener(`click`,V$2=>V$2.preventDefault(),{once:!0})}}}),{default:withCtx(()=>[renderSlot($$2.$slots,`default`,{remaining:p$5.value,duration:d$2.value})]),_:3},16,[`as`,`as-child`,`data-state`,`data-swipe-direction`])],8,[`to`])):createCommentVNode(``,!0)],64))}}),Rg=defineComponent({__name:`ToastRoot`,props:{defaultOpen:{type:Boolean,default:!0},forceMount:{type:Boolean},type:{default:`foreground`},open:{type:Boolean,default:void 0},duration:{},asChild:{type:Boolean},as:{default:`li`}},emits:[`escapeKeyDown`,`pause`,`resume`,`swipeStart`,`swipeMove`,`swipeCancel`,`swipeEnd`,`update:open`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{forwardRef:l$1}=R$1(),s$1=ne(e$3,`open`,n$2,{defaultValue:e$3.defaultOpen,passive:e$3.open===void 0});return(r$2,i$1)=>(openBlock(),createBlock(unref(Pe),{present:r$2.forceMount||unref(s$1)},{default:withCtx(()=>[createVNode(nv,mergeProps({ref:unref(l$1),open:unref(s$1),type:r$2.type,as:r$2.as,"as-child":r$2.asChild,duration:r$2.duration},r$2.$attrs,{onClose:i$1[0]||=u$1=>s$1.value=!1,onPause:i$1[1]||=u$1=>n$2(`pause`),onResume:i$1[2]||=u$1=>n$2(`resume`),onEscapeKeyDown:i$1[3]||=u$1=>n$2(`escapeKeyDown`,u$1),onSwipeStart:i$1[4]||=u$1=>{n$2(`swipeStart`,u$1),u$1.currentTarget.setAttribute(`data-swipe`,`start`)},onSwipeMove:i$1[5]||=u$1=>{let{x:d$2,y:c$4}=u$1.detail.delta,f$3=u$1.currentTarget;f$3.setAttribute(`data-swipe`,`move`),f$3.style.setProperty(`--radix-toast-swipe-move-x`,`${d$2}px`),f$3.style.setProperty(`--radix-toast-swipe-move-y`,`${c$4}px`)},onSwipeCancel:i$1[6]||=u$1=>{let d$2=u$1.currentTarget;d$2.setAttribute(`data-swipe`,`cancel`),d$2.style.removeProperty(`--radix-toast-swipe-move-x`),d$2.style.removeProperty(`--radix-toast-swipe-move-y`),d$2.style.removeProperty(`--radix-toast-swipe-end-x`),d$2.style.removeProperty(`--radix-toast-swipe-end-y`)},onSwipeEnd:i$1[7]||=u$1=>{let{x:d$2,y:c$4}=u$1.detail.delta,f$3=u$1.currentTarget;f$3.setAttribute(`data-swipe`,`end`),f$3.style.removeProperty(`--radix-toast-swipe-move-x`),f$3.style.removeProperty(`--radix-toast-swipe-move-y`),f$3.style.setProperty(`--radix-toast-swipe-end-x`,`${d$2}px`),f$3.style.setProperty(`--radix-toast-swipe-end-y`,`${c$4}px`),s$1.value=!1}}),{default:withCtx(({remaining:u$1,duration:d$2})=>[renderSlot(r$2.$slots,`default`,{remaining:u$1,duration:d$2,open:unref(s$1)})]),_:3},16,[`open`,`type`,`as`,`as-child`,`duration`])]),_:3},8,[`present`]))}}),Ag=defineComponent({__name:`ToastPortal`,props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(rt$2),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),fr=defineComponent({__name:`ToastAnnounceExclude`,props:{altText:{},asChild:{type:Boolean},as:{}},setup(a$2){return(t,e$3)=>(openBlock(),createBlock(unref(O$1),{as:t.as,"as-child":t.asChild,"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":t.altText||void 0},{default:withCtx(()=>[renderSlot(t.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-radix-toast-announce-alt`]))}}),ov=defineComponent({__name:`ToastClose`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=tv(),{forwardRef:n$2}=R$1();return(l$1,s$1)=>(openBlock(),createBlock(fr,{"as-child":``},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps(t,{ref:unref(n$2),type:l$1.as===`button`?`button`:void 0,onClick:s$1[0]||=r$2=>unref(e$3).onClose()}),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`)]),_:3},16,[`type`])]),_:3}))}}),Og=defineComponent({__name:`ToastAction`,props:{altText:{},asChild:{type:Boolean},as:{}},setup(a$2){if(!a$2.altText)throw Error("Missing prop `altText` expected on `ToastAction`");let{forwardRef:e$3}=R$1();return(n$2,l$1)=>n$2.altText?(openBlock(),createBlock(fr,{key:0,"alt-text":n$2.altText,"as-child":``},{default:withCtx(()=>[createVNode(ov,{ref:unref(e$3),as:n$2.as,"as-child":n$2.asChild},{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},8,[`as`,`as-child`])]),_:3},8,[`alt-text`])):createCommentVNode(``,!0)}}),il=defineComponent({__name:`FocusProxy`,emits:[`focusFromOutsideViewport`],setup(a$2,{emit:t}){let e$3=t,n$2=hn();return(l$1,s$1)=>(openBlock(),createBlock(unref(Jt),{"aria-hidden":`true`,tabindex:`0`,style:{position:`fixed`},onFocus:s$1[0]||=r$2=>{var d$2;let i$1=r$2.relatedTarget;!((d$2=unref(n$2).viewport.value)!=null&&d$2.contains(i$1))&&e$3(`focusFromOutsideViewport`)}},{default:withCtx(()=>[renderSlot(l$1.$slots,`default`)]),_:3}))}}),kg=defineComponent({inheritAttrs:!1,__name:`ToastViewport`,props:{hotkey:{default:()=>[`F8`]},label:{type:[String,Function],default:`Notifications ({hotkey})`},asChild:{type:Boolean},as:{default:`ol`}},setup(a$2){let t=a$2,{hotkey:e$3,label:n$2}=toRefs(t),{forwardRef:l$1,currentElement:s$1}=R$1(),{createCollection:r$2}=Fe(),i$1=r$2(s$1),u$1=hn(),d$2=computed(()=>u$1.toastCount.value>0),c$4=ref(),f$3=ref(),v$2=computed(()=>e$3.value.join(`+`).replace(/Key/g,``).replace(/Digit/g,``));Gn(e$3.value,()=>{s$1.value.focus()}),onMounted(()=>{u$1.onViewportChange(s$1.value)}),watchEffect(g$2=>{let m$3=s$1.value;if(d$2.value&&m$3){let _$2=()=>{if(!u$1.isClosePausedRef.value){let P$2=new CustomEvent(Mn);m$3.dispatchEvent(P$2),u$1.isClosePausedRef.value=!0}},C$3=()=>{if(u$1.isClosePausedRef.value){let P$2=new CustomEvent(Vn);m$3.dispatchEvent(P$2),u$1.isClosePausedRef.value=!1}},$$2=P$2=>{!m$3.contains(P$2.relatedTarget)&&C$3()},h$3=()=>{m$3.contains(me())||C$3()},E$2=P$2=>{var M$1,V$2,A$2;let D$1=P$2.altKey||P$2.ctrlKey||P$2.metaKey;if(P$2.key===`Tab`&&!D$1){let F$2=me(),j$1=P$2.shiftKey;if(P$2.target===m$3&&j$1){(M$1=c$4.value)==null||M$1.focus();return}let G$2=p$5({tabbingDirection:j$1?`backwards`:`forwards`}),J$2=G$2.findIndex(z$3=>z$3===F$2);Ma(G$2.slice(J$2+1))?P$2.preventDefault():j$1?(V$2=c$4.value)==null||V$2.focus():(A$2=f$3.value)==null||A$2.focus()}};m$3.addEventListener(`focusin`,_$2),m$3.addEventListener(`focusout`,$$2),m$3.addEventListener(`pointermove`,_$2),m$3.addEventListener(`pointerleave`,h$3),m$3.addEventListener(`keydown`,E$2),window.addEventListener(`blur`,_$2),window.addEventListener(`focus`,C$3),g$2(()=>{m$3.removeEventListener(`focusin`,_$2),m$3.removeEventListener(`focusout`,$$2),m$3.removeEventListener(`pointermove`,_$2),m$3.removeEventListener(`pointerleave`,h$3),m$3.removeEventListener(`keydown`,E$2),window.removeEventListener(`blur`,_$2),window.removeEventListener(`focus`,C$3)})}});function p$5({tabbingDirection:g$2}){let _$2=i$1.value.map(C$3=>{let $$2=[C$3,...eo(C$3)];return g$2===`forwards`?$$2:$$2.reverse()});return(g$2===`forwards`?_$2.reverse():_$2).flat()}return(g$2,m$3)=>(openBlock(),createBlock(unref(ru),{role:`region`,"aria-label":typeof unref(n$2)==`string`?unref(n$2).replace(`{hotkey}`,v$2.value):unref(n$2)(v$2.value),tabindex:`-1`,style:normalizeStyle({pointerEvents:d$2.value?void 0:`none`})},{default:withCtx(()=>[d$2.value?(openBlock(),createBlock(il,{key:0,ref:_$2=>{c$4.value=unref($e$1)(_$2)},onFocusFromOutsideViewport:m$3[0]||=()=>{let _$2=p$5({tabbingDirection:`forwards`});unref(Ma)(_$2)}},null,512)):createCommentVNode(``,!0),createVNode(unref(O$1),mergeProps({ref:unref(l$1),tabindex:`-1`,as:g$2.as,"as-child":g$2.asChild},g$2.$attrs),{default:withCtx(()=>[renderSlot(g$2.$slots,`default`)]),_:3},16,[`as`,`as-child`]),d$2.value?(openBlock(),createBlock(il,{key:1,ref:_$2=>{f$3.value=unref($e$1)(_$2)},onFocusFromOutsideViewport:m$3[1]||=()=>{let _$2=p$5({tabbingDirection:`backwards`});unref(Ma)(_$2)}},null,512)):createCommentVNode(``,!0)]),_:3},8,[`aria-label`,`style`]))}}),Mg=defineComponent({__name:`ToastTitle`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2;return R$1(),(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),Vg=defineComponent({__name:`ToastDescription`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2;return R$1(),(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),lv=defineComponent({__name:`Toggle`,props:{defaultValue:{type:Boolean},pressed:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:`button`}},emits:[`update:pressed`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t;R$1();let l$1=ne(e$3,`pressed`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.pressed===void 0});function s$1(){l$1.value=!l$1.value}let r$2=computed(()=>l$1.value?`on`:`off`);return(i$1,u$1)=>(openBlock(),createBlock(unref(O$1),{type:i$1.as===`button`?`button`:void 0,"as-child":e$3.asChild,as:i$1.as,"aria-pressed":unref(l$1),"data-state":r$2.value,"data-disabled":i$1.disabled?``:void 0,disabled:i$1.disabled,onClick:s$1},{default:withCtx(()=>[renderSlot(i$1.$slots,`default`,{pressed:unref(l$1)})]),_:3},8,[`type`,`as-child`,`as`,`aria-pressed`,`data-state`,`data-disabled`,`disabled`]))}}),[sv,rv]=te(`ToggleGroupRoot`),iv=defineComponent({__name:`ToggleGroupRoot`,props:{rovingFocus:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},orientation:{},dir:{},loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},type:{},modelValue:{},defaultValue:{}},emits:[`update:modelValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{loop:l$1,rovingFocus:s$1,disabled:r$2,dir:i$1}=toRefs(e$3),u$1=we(i$1),{forwardRef:d$2}=R$1(),{modelValue:c$4,changeModelValue:f$3,isSingle:v$2}=Wl(e$3,n$2);return rv({isSingle:v$2,modelValue:c$4,changeModelValue:f$3,dir:u$1,orientation:e$3.orientation,loop:l$1,rovingFocus:s$1,disabled:r$2}),(p$5,g$2)=>(openBlock(),createBlock(resolveDynamicComponent(unref(s$1)?unref(Ft):unref(O$1)),{"as-child":``,orientation:unref(s$1)?p$5.orientation:void 0,dir:unref(u$1),loop:unref(s$1)?unref(l$1):void 0},{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(d$2),role:`group`,"as-child":p$5.asChild,as:p$5.as},{default:withCtx(()=>[renderSlot(p$5.$slots,`default`,{modelValue:unref(c$4)})]),_:3},8,[`as-child`,`as`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),uv=defineComponent({__name:`ToggleGroupItem`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=sv(),n$2=computed(()=>{var i$1;return(i$1=e$3.disabled)?.value||t.disabled}),l$1=computed(()=>{var i$1;return(i$1=e$3.modelValue.value)?.includes(t.value)}),s$1=computed(()=>{var i$1;return e$3.isSingle.value?e$3.modelValue.value===t.value:(i$1=e$3.modelValue.value)?.includes(t.value)}),{forwardRef:r$2}=R$1();return(i$1,u$1)=>(openBlock(),createBlock(resolveDynamicComponent(unref(e$3).rovingFocus.value?unref(Nt$1):unref(O$1)),{"as-child":``,focusable:!n$2.value,active:l$1.value},{default:withCtx(()=>[createVNode(unref(lv),mergeProps(t,{ref:unref(r$2),disabled:n$2.value,pressed:s$1.value,"onUpdate:pressed":u$1[0]||=d$2=>unref(e$3).changeModelValue(i$1.value)}),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16,[`disabled`,`pressed`])]),_:3},8,[`focusable`,`active`]))}}),[pr,dv]=te(`ToolbarRoot`),Fg=defineComponent({__name:`ToolbarRoot`,props:{orientation:{default:`horizontal`},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{orientation:e$3,dir:n$2}=toRefs(t),l$1=we(n$2),{forwardRef:s$1}=R$1();return dv({orientation:e$3,dir:l$1}),(r$2,i$1)=>(openBlock(),createBlock(unref(Ft),{"as-child":``,orientation:unref(e$3),dir:unref(l$1),loop:r$2.loop},{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(s$1),role:`toolbar`,"aria-orientation":unref(e$3),"as-child":r$2.asChild,as:r$2.as},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},8,[`aria-orientation`,`as-child`,`as`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),cv=defineComponent({__name:`ToolbarButton`,props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1();return(n$2,l$1)=>(openBlock(),createBlock(unref(Nt$1),{"as-child":``,focusable:!n$2.disabled},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps({ref:unref(e$3),type:n$2.as===`button`?`button`:void 0},t),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`type`])]),_:3},8,[`focusable`]))}}),Ng=defineComponent({__name:`ToolbarLink`,props:{asChild:{type:Boolean},as:{default:`a`}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1();return(n$2,l$1)=>(openBlock(),createBlock(unref(Nt$1),{"as-child":``,focusable:``},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps(t,{ref:unref(e$3),onKeydown:l$1[0]||=s$1=>{var r$2;s$1.key===` `&&((r$2=s$1.currentTarget)==null||r$2.click())}}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16)]),_:3}))}}),Lg=defineComponent({__name:`ToolbarToggleGroup`,props:{rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},type:{},modelValue:{},defaultValue:{}},emits:[`update:modelValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=pr(),s$1=Te$1(n$2);return R$1(),(r$2,i$1)=>(openBlock(),createBlock(unref(iv),mergeProps({...e$3,...unref(s$1)},{"data-orientation":unref(l$1).orientation.value,dir:unref(l$1).dir.value,"roving-focus":!1}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`data-orientation`,`dir`]))}}),zg=defineComponent({__name:`ToolbarToggleItem`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1();return(n$2,l$1)=>(openBlock(),createBlock(cv,{"as-child":``},{default:withCtx(()=>[createVNode(unref(uv),mergeProps(t,{ref:unref(e$3)}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16)]),_:3}))}}),Kg=defineComponent({__name:`ToolbarSeparator`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=pr();return R$1(),(n$2,l$1)=>(openBlock(),createBlock(Ms,{orientation:unref(e$3).orientation.value,"as-child":t.asChild,as:n$2.as},{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},8,[`orientation`,`as-child`,`as`]))}}),vr=`tooltip.open`,[Mo,fv]=te(`TooltipProvider`),Hg=defineComponent({inheritAttrs:!1,__name:`TooltipProvider`,props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(a$2){let t=a$2,{delayDuration:e$3,skipDelayDuration:n$2,disableHoverableContent:l$1,disableClosingTrigger:s$1,ignoreNonKeyboardFocus:r$2,disabled:i$1}=toRefs(t);R$1();let u$1=ref(!0),d$2=ref(!1),{start:c$4,stop:f$3}=Un(()=>{u$1.value=!0},n$2,{immediate:!1});return fv({isOpenDelayed:u$1,delayDuration:e$3,onOpen(){f$3(),u$1.value=!1},onClose(){c$4()},isPointerInTransitRef:d$2,disableHoverableContent:l$1,disableClosingTrigger:s$1,disabled:i$1,ignoreNonKeyboardFocus:r$2}),(v$2,p$5)=>renderSlot(v$2.$slots,`default`)}}),[yn,pv]=te(`TooltipRoot`),Wg=defineComponent({__name:`TooltipRoot`,props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:[`update:open`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t;R$1();let l$1=Mo(),s$1=computed(()=>e$3.disableHoverableContent??l$1.disableHoverableContent.value),r$2=computed(()=>e$3.disableClosingTrigger??l$1.disableClosingTrigger.value),i$1=computed(()=>e$3.disabled??l$1.disabled.value),u$1=computed(()=>e$3.delayDuration??l$1.delayDuration.value),d$2=computed(()=>e$3.ignoreNonKeyboardFocus??l$1.ignoreNonKeyboardFocus.value),c$4=ne(e$3,`open`,n$2,{defaultValue:e$3.defaultOpen,passive:e$3.open===void 0});watch(c$4,h$3=>{l$1.onClose&&(h$3?(l$1.onOpen(),document.dispatchEvent(new CustomEvent(vr))):l$1.onClose())});let f$3=ref(!1),v$2=ref(),p$5=computed(()=>c$4.value?f$3.value?`delayed-open`:`instant-open`:`closed`),{start:g$2,stop:m$3}=Un(()=>{f$3.value=!0,c$4.value=!0},u$1,{immediate:!1});function _$2(){m$3(),f$3.value=!1,c$4.value=!0}function C$3(){m$3(),c$4.value=!1}function $$2(){g$2()}return pv({contentId:``,open:c$4,stateAttribute:p$5,trigger:v$2,onTriggerChange(h$3){v$2.value=h$3},onTriggerEnter(){l$1.isOpenDelayed.value?$$2():_$2()},onTriggerLeave(){s$1.value?C$3():m$3()},onOpen:_$2,onClose:C$3,disableHoverableContent:s$1,disableClosingTrigger:r$2,disabled:i$1,ignoreNonKeyboardFocus:d$2}),(h$3,E$2)=>(openBlock(),createBlock(unref(kt),null,{default:withCtx(()=>[renderSlot(h$3.$slots,`default`,{open:unref(c$4)})]),_:3}))}}),jg=defineComponent({__name:`TooltipTrigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=yn(),n$2=Mo();e$3.contentId||=ge(void 0,`radix-vue-tooltip-content`);let{forwardRef:l$1,currentElement:s$1}=R$1(),r$2=ref(!1),i$1=ref(!1),u$1=computed(()=>e$3.disabled.value?{}:{click:m$3,focus:p$5,pointermove:f$3,pointerleave:v$2,pointerdown:c$4,blur:g$2});onMounted(()=>{e$3.onTriggerChange(s$1.value)});function d$2(){setTimeout(()=>{r$2.value=!1},1)}function c$4(){r$2.value=!0,document.addEventListener(`pointerup`,d$2,{once:!0})}function f$3(_$2){_$2.pointerType!==`touch`&&!i$1.value&&!n$2.isPointerInTransitRef.value&&(e$3.onTriggerEnter(),i$1.value=!0)}function v$2(){e$3.onTriggerLeave(),i$1.value=!1}function p$5(_$2){var C$3,$$2;r$2.value||e$3.ignoreNonKeyboardFocus.value&&!(($$2=(C$3=_$2.target).matches)!=null&&$$2.call(C$3,`:focus-visible`))||e$3.onOpen()}function g$2(){e$3.onClose()}function m$3(){e$3.disableClosingTrigger.value||e$3.onClose()}return(_$2,C$3)=>(openBlock(),createBlock(unref(Mt),{"as-child":``},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps({ref:unref(l$1),"aria-describedby":unref(e$3).open.value?unref(e$3).contentId:void 0,"data-state":unref(e$3).stateAttribute.value,as:_$2.as,"as-child":t.asChild,"data-grace-area-trigger":``},toHandlers(u$1.value)),{default:withCtx(()=>[renderSlot(_$2.$slots,`default`)]),_:3},16,[`aria-describedby`,`data-state`,`as`,`as-child`])]),_:3}))}}),mr=defineComponent({__name:`TooltipContentImpl`,props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:`top`},sideOffset:{default:0},align:{default:`center`},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:`partial`},hideWhenDetached:{type:Boolean,default:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=yn(),{forwardRef:s$1}=R$1(),r$2=useSlots(),i$1=computed(()=>{var c$4;return(c$4=r$2.default)?.call(r$2)}),u$1=computed(()=>{var v$2;if(e$3.ariaLabel)return e$3.ariaLabel;let c$4=``;function f$3(p$5){typeof p$5.children==`string`&&p$5.type!==Comment?c$4+=p$5.children:Array.isArray(p$5.children)&&p$5.children.forEach(g$2=>f$3(g$2))}return(v$2=i$1.value)==null||v$2.forEach(p$5=>f$3(p$5)),c$4}),d$2=computed(()=>{let{ariaLabel:c$4,...f$3}=e$3;return f$3});return onMounted(()=>{He(window,`scroll`,c$4=>{let f$3=c$4.target;f$3!=null&&f$3.contains(l$1.trigger.value)&&l$1.onClose()}),He(window,vr,l$1.onClose)}),(c$4,f$3)=>(openBlock(),createBlock(unref(Ct$1),{"as-child":``,"disable-outside-pointer-events":!1,onEscapeKeyDown:f$3[0]||=v$2=>n$2(`escapeKeyDown`,v$2),onPointerDownOutside:f$3[1]||=v$2=>{var p$5;unref(l$1).disableClosingTrigger.value&&(p$5=unref(l$1).trigger.value)!=null&&p$5.contains(v$2.target)&&v$2.preventDefault(),n$2(`pointerDownOutside`,v$2)},onFocusOutside:f$3[2]||=withModifiers(()=>{},[`prevent`]),onDismiss:f$3[3]||=v$2=>unref(l$1).onClose()},{default:withCtx(()=>[createVNode(unref(It),mergeProps({ref:unref(s$1),"data-state":unref(l$1).stateAttribute.value},{...c$4.$attrs,...d$2.value},{style:{"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`}}),{default:withCtx(()=>[renderSlot(c$4.$slots,`default`),createVNode(unref(Jt),{id:unref(l$1).contentId,role:`tooltip`},{default:withCtx(()=>[createTextVNode(toDisplayString(u$1.value),1)]),_:1},8,[`id`])]),_:3},16,[`data-state`])]),_:3}))}}),vv=defineComponent({__name:`TooltipContentHoverable`,props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(a$2){let e$3=Ot$1(a$2),{forwardRef:n$2,currentElement:l$1}=R$1(),{trigger:s$1,onClose:r$2}=yn(),i$1=Mo(),{isPointerInTransit:u$1,onPointerExit:d$2}=Fl(s$1,l$1);return i$1.isPointerInTransitRef=u$1,d$2(()=>{r$2()}),(c$4,f$3)=>(openBlock(),createBlock(mr,mergeProps({ref:unref(n$2)},unref(e$3)),{default:withCtx(()=>[renderSlot(c$4.$slots,`default`)]),_:3},16))}}),Ug=defineComponent({__name:`TooltipContent`,props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:`top`},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=yn(),s$1=Se(e$3,n$2),{forwardRef:r$2}=R$1();return(i$1,u$1)=>(openBlock(),createBlock(unref(Pe),{present:i$1.forceMount||unref(l$1).open.value},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(l$1).disableHoverableContent.value?mr:vv),mergeProps({ref:unref(r$2)},unref(s$1)),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),Gg=defineComponent({__name:`TooltipArrow`,props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:`svg`}},setup(a$2){let t=a$2;return R$1(),(e$3,n$2)=>(openBlock(),createBlock(unref(Zt),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),qg=defineComponent({__name:`TooltipPortal`,props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(rt$2),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}});function Vo(a$2){return a$2.reduce((t,e$3)=>(t.push(e$3),e$3.children&&t.push(...Vo(e$3.children)),t),[])}const[hr,mv]=te(`TreeRoot`),Yg=defineComponent({__name:`TreeRoot`,props:{modelValue:{},defaultValue:{},items:{},expanded:{},defaultExpanded:{},getKey:{},getChildren:{type:Function,default:a$2=>a$2.children},selectionBehavior:{default:`toggle`},multiple:{type:Boolean},dir:{},disabled:{type:Boolean},propagateSelect:{type:Boolean},asChild:{type:Boolean},as:{default:`ul`}},emits:[`update:modelValue`,`update:expanded`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{items:l$1,multiple:s$1,disabled:r$2,propagateSelect:i$1,dir:u$1}=toRefs(e$3),{handleTypeaheadSearch:d$2}=ba(),c$4=we(u$1),f$3=ref(),v$2=ref(!1),p$5=ua(),g$2=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue??(s$1.value?[]:void 0),passive:e$3.modelValue===void 0,deep:!0}),m$3=ne(e$3,`expanded`,n$2,{defaultValue:e$3.defaultExpanded??[],passive:e$3.expanded===void 0,deep:!0}),{onSelectItem:_$2,handleMultipleReplace:C$3}=ji(g$2,e$3),$$2=computed(()=>s$1.value&&Array.isArray(g$2.value)?g$2.value.map(I=>e$3.getKey(I)):[e$3.getKey(g$2.value??{})]);function h$3(I,M$1=1,V$2){return I.reduce((A$2,F$2,j$1)=>{let H$3=e$3.getKey(F$2),Q$3=e$3.getChildren(F$2),G$2=m$3.value.includes(H$3),J$2={_id:H$3,value:F$2,index:j$1,level:M$1,parentItem:V$2,hasChildren:!!Q$3,bind:{value:F$2,level:M$1,"aria-setsize":I.length,"aria-posinset":j$1+1}};return A$2.push(J$2),Q$3&&G$2&&A$2.push(...h$3(Q$3,M$1+1,F$2)),A$2},[])}let E$2=computed(()=>{let I=e$3.items;return m$3.value.map(M$1=>M$1),h$3(I??[])});function P$2(I){var M$1;if(v$2.value)p$5.trigger(I);else{let V$2=(M$1=f$3.value)?.getItems().map(A$2=>A$2.ref);d$2(I.key,V$2)}}function D$1(I){if(v$2.value)return;let M$1=en[I.key];nextTick(()=>{var V$2;C$3(M$1,me(),(V$2=f$3.value)?.getItems,E$2.value.map(A$2=>A$2.value))})}return mv({modelValue:g$2,selectedKeys:$$2,onSelect:I=>{var A$2;let M$1=F$2=>e$3.getKey(F$2??{})===e$3.getKey(I),V$2=e$3.multiple&&Array.isArray(g$2.value)?(A$2=g$2.value)?.findIndex(M$1)!==-1:void 0;if(_$2(I,M$1),e$3.propagateSelect&&e$3.multiple&&Array.isArray(g$2.value)){let F$2=Vo(e$3.getChildren(I)??[]);V$2?g$2.value=[...g$2.value].filter(j$1=>!F$2.some(H$3=>e$3.getKey(j$1??{})===e$3.getKey(H$3))):g$2.value=[...g$2.value,...F$2]}},expanded:m$3,onToggle(I){if(!(I&&e$3.getChildren(I)))return;let V$2=e$3.getKey(I)??I;m$3.value.includes(V$2)?m$3.value=m$3.value.filter(A$2=>A$2!==V$2):m$3.value.push(V$2)},getKey:e$3.getKey,getChildren:e$3.getChildren,items:l$1,expandedItems:E$2,disabled:r$2,multiple:s$1,dir:c$4,propagateSelect:i$1,isVirtual:v$2,virtualKeydownHook:p$5,handleMultipleReplace:C$3}),(I,M$1)=>(openBlock(),createBlock(unref(Ft),{ref_key:`rovingFocusGroupRef`,ref:f$3,"as-child":``,orientation:`vertical`,dir:unref(c$4)},{default:withCtx(()=>[createVNode(unref(O$1),{role:`tree`,as:I.as,"as-child":I.asChild,"aria-multiselectable":unref(s$1)?!0:void 0,onKeydown:[P$2,withKeys(withModifiers(D$1,[`shift`]),[`up`,`down`])]},{default:withCtx(()=>[renderSlot(I.$slots,`default`,{flattenItems:E$2.value,modelValue:unref(g$2),expanded:unref(m$3)})]),_:3},8,[`as`,`as-child`,`aria-multiselectable`,`onKeydown`])]),_:3},8,[`dir`]))}}),hv=`tree.select`,yv=`tree.toggle`,Xg=defineComponent({inheritAttrs:!1,__name:`TreeItem`,props:{value:{},level:{},asChild:{type:Boolean},as:{default:`li`}},emits:[`select`,`toggle`],setup(a$2,{expose:t,emit:e$3}){let n$2=a$2,l$1=e$3,s$1=hr(),{getItems:r$2}=ea(),i$1=computed(()=>!!s$1.getChildren(n$2.value)),u$1=computed(()=>{let C$3=s$1.getKey(n$2.value);return s$1.expanded.value.includes(C$3)}),d$2=computed(()=>{let C$3=s$1.getKey(n$2.value);return s$1.selectedKeys.value.includes(C$3)}),c$4=computed(()=>{if(s$1.propagateSelect.value&&d$2.value&&i$1.value&&Array.isArray(s$1.modelValue.value))return!Vo(s$1.getChildren(n$2.value)||[]).every($$2=>s$1.modelValue.value.find(h$3=>s$1.getKey(h$3)===s$1.getKey($$2)))});function f$3(C$3){if(i$1.value)if(u$1.value){let $$2=r$2().map(I=>I.ref),h$3=me(),E$2=$$2.indexOf(h$3),D$1=[...$$2].slice(E$2).find(I=>Number(I.getAttribute(`data-indent`))===n$2.level+1);D$1&&D$1.focus()}else _$2(C$3)}function v$2(C$3){if(u$1.value)_$2(C$3);else{let $$2=r$2().map(I=>I.ref),h$3=me(),E$2=$$2.indexOf(h$3),D$1=[...$$2].slice(0,E$2).reverse().find(I=>Number(I.getAttribute(`data-indent`))===n$2.level-1);D$1&&D$1.focus()}}async function p$5(C$3){l$1(`select`,C$3),!(C$3!=null&&C$3.defaultPrevented)&&s$1.onSelect(n$2.value)}async function g$2(C$3){l$1(`toggle`,C$3),!(C$3!=null&&C$3.defaultPrevented)&&s$1.onToggle(n$2.value)}async function m$3(C$3){if(!C$3)return;let $$2={originalEvent:C$3,value:n$2.value,isExpanded:u$1.value,isSelected:d$2.value};jt(hv,p$5,$$2)}async function _$2(C$3){if(!C$3)return;let $$2={originalEvent:C$3,value:n$2.value,isExpanded:u$1.value,isSelected:d$2.value};jt(yv,g$2,$$2)}return t({isExpanded:u$1,isSelected:d$2,isIndeterminate:c$4,handleToggle:()=>s$1.onToggle(n$2.value),handleSelect:()=>s$1.onSelect(n$2.value)}),(C$3,$$2)=>(openBlock(),createBlock(unref(Nt$1),{"as-child":``,value:C$3.value,"allow-shift-key":``},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps(C$3.$attrs,{role:`treeitem`,as:C$3.as,"as-child":C$3.asChild,"aria-selected":d$2.value,"aria-expanded":i$1.value?u$1.value:void 0,"aria-level":C$3.level,"data-indent":C$3.level,"data-selected":d$2.value?``:void 0,"data-expanded":u$1.value?``:void 0,onKeydown:[withKeys(withModifiers(m$3,[`self`,`prevent`]),[`enter`,`space`]),$$2[0]||=withKeys(withModifiers(h$3=>unref(s$1).dir.value===`ltr`?f$3(h$3):v$2(h$3),[`prevent`]),[`right`]),$$2[1]||=withKeys(withModifiers(h$3=>unref(s$1).dir.value===`ltr`?v$2(h$3):f$3(h$3),[`prevent`]),[`left`])],onClick:$$2[2]||=withModifiers(h$3=>{m$3(h$3),_$2(h$3)},[`stop`])}),{default:withCtx(()=>[renderSlot(C$3.$slots,`default`,{isExpanded:u$1.value,isSelected:d$2.value,isIndeterminate:c$4.value,handleSelect:()=>unref(s$1).onSelect(C$3.value),handleToggle:()=>unref(s$1).onToggle(C$3.value)})]),_:3},16,[`as`,`as-child`,`aria-selected`,`aria-expanded`,`aria-level`,`data-indent`,`data-selected`,`data-expanded`,`onKeydown`])]),_:3},8,[`value`]))}}),Zg=defineComponent({__name:`TreeVirtualizer`,props:{estimateSize:{},textContent:{type:Function}},setup(a$2){let t=a$2,e$3=useSlots(),n$2=hr(),l$1=kl(),{getItems:s$1}=ea(),r$2=Tt$1(``,1e3),i$1=computed(()=>{let v$2=p$5=>t.textContent?t.textContent(p$5):p$5.toString().toLowerCase();return n$2.expandedItems.value.map((p$5,g$2)=>({index:g$2,textContent:v$2(p$5.value)}))});n$2.isVirtual.value=!0;let u$1=computed(()=>{let v$2=l$1.value;if(v$2){let p$5=window.getComputedStyle(v$2);return{start:Number.parseFloat(p$5.paddingBlockStart||p$5.paddingTop),end:Number.parseFloat(p$5.paddingBlockEnd||p$5.paddingBottom)}}else return{start:0,end:0}}),d$2=vs({get scrollPaddingStart(){return u$1.value.start},get scrollPaddingEnd(){return u$1.value.end},get count(){return n$2.expandedItems.value.length??0},get horizontal(){return!1},getItemKey(v$2){return v$2+n$2.getKey(n$2.expandedItems.value[v$2].value)},estimateSize(){return t.estimateSize??28},getScrollElement(){return l$1.value},overscan:12}),c$4=computed(()=>d$2.value.getVirtualItems().map(v$2=>({item:v$2,is:cloneVNode(e$3.default({item:n$2.expandedItems.value[v$2.index],virtualizer:d$2.value,virtualItem:v$2})[0],{"data-index":v$2.index,style:{position:`absolute`,top:0,left:0,transform:`translateY(${v$2.start}px)`,overflowAnchor:`none`}})})));function f$3(v$2){d$2.value.scrollToIndex(v$2,{align:`start`}),requestAnimationFrame(()=>{let p$5=l$1.value.querySelector(`[data-index="${v$2}"]`);p$5 instanceof HTMLElement&&p$5.focus()})}return n$2.virtualKeydownHook.on(v$2=>{var _$2;let p$5=v$2.altKey||v$2.ctrlKey||v$2.metaKey;if(v$2.key===`Tab`&&!p$5)return;let m$3=en[v$2.key];if([`first`,`last`].includes(m$3)){v$2.preventDefault();let C$3=m$3===`first`?0:n$2.expandedItems.value.length-1;d$2.value.scrollToIndex(C$3),requestAnimationFrame(()=>{let $$2=s$1();(m$3===`first`?$$2[0]:$$2[$$2.length-1]).ref.focus()})}else if(m$3===`prev`&&v$2.key!==`ArrowUp`){let C$3=me(),$$2=Number(C$3.getAttribute(`data-index`)),h$3=Number(C$3.getAttribute(`data-indent`)),P$2=n$2.expandedItems.value.slice(0,$$2).map((D$1,I)=>({...D$1,index:I})).reverse().find(D$1=>D$1.level===h$3-1);P$2&&f$3(P$2.index)}else if(!m$3&&!p$5){r$2.value+=v$2.key;let C$3=Number((_$2=me())?.getAttribute(`data-index`)),$$2=i$1.value[C$3].textContent,h$3=i$1.value.map(D$1=>D$1.textContent),E$2=Zn(h$3,r$2.value,$$2),P$2=i$1.value.find(D$1=>D$1.textContent===E$2);P$2&&f$3(P$2.index)}nextTick(()=>{v$2.shiftKey&&m$3&&n$2.handleMultipleReplace(m$3,me(),s$1,n$2.expandedItems.value.map(C$3=>C$3.value))})}),(v$2,p$5)=>(openBlock(),createElementBlock(`div`,{"data-radix-vue-virtualizer":``,style:normalizeStyle({position:`relative`,width:`100%`,height:`${unref(d$2).getTotalSize()}px`})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(c$4.value,({is:g$2,item:m$3})=>(openBlock(),createBlock(resolveDynamicComponent(g$2),{key:m$3.key}))),128))],4))}}),Jg=defineComponent({__name:`Viewport`,props:{nonce:{},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1(),{nonce:n$2}=toRefs(t),l$1=Ja(n$2);return(s$1,r$2)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$1),mergeProps({...s$1.$attrs,...t},{ref:unref(e$3),"data-radix-viewport":``,role:`presentation`,style:{position:`relative`,flex:1,overflow:`auto`}}),{default:withCtx(()=>[renderSlot(s$1.$slots,`default`)]),_:3},16),createVNode(unref(O$1),{as:`style`,nonce:unref(l$1)},{default:withCtx(()=>[createTextVNode(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-viewport]::-webkit-scrollbar { display: none; } `)]),_:1},8,[`nonce`])],64))}}),_hoisted_1$10={key:0,flex:``,"gap-2":``};var ColorPalette_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ColorPalette`,props:{colors:{}},setup(__props){let settings=useSettings();return(_ctx,_cache$1)=>_ctx.colors.length?(openBlock(),createElementBlock(`div`,_hoisted_1$10,[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.colors,({hex:hex$2,name:name$2})=>(openBlock(),createBlock(unref(Hg),{key:hex$2||`default`},{default:withCtx(()=>[createVNode(unref(Wg),null,{default:withCtx(()=>[createVNode(unref(jg),{transition:`all ease-in-out duration-250`,"size-8":``,"cursor-pointer":``,"rounded-full":``,"bg-primary-500":``,style:normalizeStyle(hex$2?{background:hex$2}:{"--chromatic-hue":unref(DEFAULT_THEME_COLORS_HUE)}),class:normalizeClass(unref(settings).isColorSelectedForPrimary(hex$2)?`scale-150 mx-1`:`hover:scale-110`),onClick:$event=>unref(settings).applyPrimaryColorFrom(hex$2)},null,8,[`style`,`class`,`onClick`]),createVNode(unref(qg),null,{default:withCtx(()=>[createVNode(unref(Ug),{bg:`white dark:neutral-800`,"rounded-lg":``,"px-3":``,"py-1.5":``,"text-sm":``,"shadow-md":``},{default:withCtx(()=>[createTextVNode(toDisplayString(name$2)+` `,1),createVNode(unref(Gg),{"fill-white":``,"dark:fill-neutral-800":``})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):createCommentVNode(``,!0)}}),ColorPalette_default=ColorPalette_vue_vue_type_script_setup_true_lang_default,onboarding_default=`/assets/onboarding-NsdTpLwA.png`;const _hoisted_1$9={"h-full":``,"w-full":``},_hoisted_2$4={key:0,"h-full":``,flex:``,"flex-col":``},_hoisted_3$1={class:`mb-2 text-center md:mb-8`,flex:``,"flex-1":``,"flex-col":``,"justify-center":``},_hoisted_4$1={initial:{opacity:0,scale:.5},visible:{opacity:1,scale:1},duration:500,class:`mb-1 flex justify-center md:mb-4 lg:pt-16 md:pt-8`},_hoisted_5$1=[`src`],_hoisted_6$1={initial:{opacity:0,y:10},visible:{opacity:1,y:0},duration:500,class:`mb-0 text-3xl text-neutral-800 font-bold md:mb-2 dark:text-neutral-100`},_hoisted_7$1={initial:{opacity:0,y:10},visible:{opacity:1,y:0},duration:500,delay:100,class:`text-sm text-neutral-600 md:text-lg dark:text-neutral-400`},_hoisted_8$1={key:1,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_9$1={bg:`white dark:#181818`,sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_10={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_11={class:`flex-1 overflow-y-auto`},_hoisted_12={class:`grid grid-cols-1 gap-3 sm:grid-cols-2`},_hoisted_13={key:2,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_14={bg:`white dark:#181818`,sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_15={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_16={key:0,"flex-1":``,"overflow-y-auto":``},_hoisted_17={class:`space-y-4`},_hoisted_18={key:0},_hoisted_19={key:1},_hoisted_20={key:2},_hoisted_21={key:0,class:`mt-4`},_hoisted_22={key:3,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_23={bg:`white dark:#181818`,sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_24={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_25={"flex-1":``};var Onboarding_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Onboarding`,emits:[`configured`,`skipped`],setup(__props,{emit:__emit}){let emit$1=__emit,step=ref(1),direction=ref(`next`),{t}=useI18n(),providersStore=useProvidersStore(),{providers,allChatProvidersMetadata}=storeToRefs(providersStore),consciousnessStore=useConsciousnessStore(),{activeModel,activeProvider,modelSearchQuery,providerModels,isLoadingActiveProviderModels}=storeToRefs(consciousnessStore),popularProviders=computed(()=>{let popular=[`openai`,`anthropic`,`google-generative-ai`,`openrouter-ai`,`ollama`,`deepseek`];return allChatProvidersMetadata.value.filter(provider=>popular.includes(provider.id)).sort((a$2,b$4)=>popular.indexOf(a$2.id)-popular.indexOf(b$4.id))}),selectedProviderId=ref(``),apiKey=ref(``),baseUrl=ref(``),accountId=ref(``),selectedProvider=computed(()=>allChatProvidersMetadata.value.find(p$5=>p$5.id===selectedProviderId.value)||null),isValidating=ref(!1),isValid$1=ref(!1),validationMessage=ref(``),needsApiKey=computed(()=>selectedProvider.value?selectedProvider.value.id!==`ollama`&&selectedProvider.value.id!==`player2`:!1),needsBaseUrl=computed(()=>selectedProvider.value?selectedProvider.value.id!==`cloudflare-workers-ai`:!1),canSave=computed(()=>!selectedProvider.value||needsApiKey.value&&!apiKey.value.trim()||needsBaseUrl.value&&!baseUrl.value.trim()||selectedProvider.value.id===`cloudflare-workers-ai`&&!accountId.value.trim()||!activeModel.value?!1:isValid$1.value);function selectProvider(provider){selectedProviderId.value=provider.id;let defaultOptions=provider.defaultOptions?.()||{};baseUrl.value=defaultOptions?.baseUrl||``,apiKey.value=``,accountId.value=``,isValid$1.value=!1,validationMessage.value=``}function getApiKeyPlaceholder(_providerId){let placeholders={openai:`sk-...`,anthropic:`sk-ant-...`,"google-generative-ai":`GEMINI_API_KEY`,"openrouter-ai":`sk-or-...`,deepseek:`sk-...`,xai:`xai-...`,"together-ai":`togetherapi-...`,"mistral-ai":`mis-...`,"moonshot-ai":`ms-...`,"fireworks-ai":`fw-...`,"featherless-ai":`fw-...`,"novita-ai":`nvt-...`};return placeholders[_providerId]||`API Key`}function getBaseUrlPlaceholder(_providerId){let defaultOptions=selectedProvider.value?.defaultOptions?.()||{};return defaultOptions?.baseUrl||`https://api.example.com/v1/`}async function validateConfiguration(){if(selectedProvider.value){isValidating.value=!0,validationMessage.value=t(`settings.dialogs.onboarding.validating`);try{let config={};needsApiKey.value&&(config.apiKey=apiKey.value.trim()),needsBaseUrl.value&&(config.baseUrl=baseUrl.value.trim()),selectedProvider.value.id===`cloudflare-workers-ai`&&(config.accountId=accountId.value.trim());let metadata=providersStore.getProviderMetadata(selectedProvider.value.id);isValid$1.value=await metadata.validators.validateProviderConfig(config),isValid$1.value?validationMessage.value=t(`settings.dialogs.onboarding.validationSuccess`):validationMessage.value=t(`settings.dialogs.onboarding.validationFailed`)}catch(error){isValid$1.value=!1,validationMessage.value=t(`settings.dialogs.onboarding.validationError`,{error:error instanceof Error?error.message:String(error)})}finally{isValidating.value=!1}}}let debouncedValidateConfiguration=useDebounceFn(()=>{selectedProvider.value&&(needsApiKey.value&&!apiKey.value.trim()||needsBaseUrl.value&&!baseUrl.value.trim()||selectedProvider.value.id===`cloudflare-workers-ai`&&!accountId.value.trim()||validateConfiguration())},500);watch([apiKey,baseUrl,accountId],()=>{selectedProvider.value&&(apiKey.value||baseUrl.value||accountId.value)&&debouncedValidateConfiguration()},{deep:!0});function handlePreviousStep(){step.value>1&&(direction.value=`previous`,step.value--)}function handleNextStep(){step.value<4?(direction.value=`next`,step.value++):handleSave()}async function handleFinishProviderConfiguration(){if(!selectedProvider.value)return;let config={};needsApiKey.value&&(config.apiKey=apiKey.value.trim()),needsBaseUrl.value&&(config.baseUrl=baseUrl.value.trim()),selectedProvider.value.id===`cloudflare-workers-ai`&&(config.accountId=accountId.value.trim()),providers.value[selectedProvider.value.id]={...providers.value[selectedProvider.value.id],...config},activeProvider.value=selectedProvider.value.id,await nextTick(),await consciousnessStore.loadModelsForProvider(selectedProvider.value.id),handleNextStep()}async function handleSave(){emit$1(`configured`)}return onMounted(()=>{popularProviders.value.length>0&&(selectedProviderId.value=popularProviders.value[0].id,selectProvider(popularProviders.value[0]))}),(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(`div`,_hoisted_1$9,[createVNode(Transition,{name:direction.value===`next`?`slide-next`:`slide-prev`,mode:`out-in`},{default:withCtx(()=>[step.value===1?(openBlock(),createElementBlock(`div`,_hoisted_2$4,[createBaseVNode(`div`,_hoisted_3$1,[withDirectives((openBlock(),createElementBlock(`div`,_hoisted_4$1,[createBaseVNode(`img`,{src:unref(onboarding_default),"max-h":`50`,"aspect-square":``,"h-auto":``,"w-auto":``,"object-cover":``},null,8,_hoisted_5$1)])),[[_directive_motion]]),withDirectives((openBlock(),createElementBlock(`h2`,_hoisted_6$1,[createTextVNode(toDisplayString(unref(t)(`settings.dialogs.onboarding.title`)),1)])),[[_directive_motion]]),withDirectives((openBlock(),createElementBlock(`p`,_hoisted_7$1,[createTextVNode(toDisplayString(unref(t)(`settings.dialogs.onboarding.description`)),1)])),[[_directive_motion]])]),withDirectives(createVNode(unref(Button_default),{initial:{opacity:0},visible:{opacity:1},duration:500,delay:200,label:unref(t)(`settings.dialogs.onboarding.start`),onClick:handleNextStep},null,8,[`label`]),[[_directive_motion]])])):step.value===2?(openBlock(),createElementBlock(`div`,_hoisted_8$1,[createBaseVNode(`div`,_hoisted_9$1,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[6]||=[createBaseVNode(`div`,{class:`i-solar:alt-arrow-left-line-duotone h-5 w-5`},null,-1)]),createBaseVNode(`h2`,_hoisted_10,toDisplayString(unref(t)(`settings.dialogs.onboarding.selectProvider`)),1),_cache$1[7]||=createBaseVNode(`div`,{class:`h-5 w-5`},null,-1)]),createBaseVNode(`div`,_hoisted_11,[createBaseVNode(`div`,_hoisted_12,[(openBlock(!0),createElementBlock(Fragment,null,renderList(popularProviders.value,provider=>(openBlock(),createBlock(unref(RadioCardDetail_default),{id:provider.id,key:provider.id,modelValue:selectedProviderId.value,"onUpdate:modelValue":_cache$1[0]||=$event=>selectedProviderId.value=$event,name:`provider-selection`,value:provider.id,title:provider.localizedName||provider.id,description:provider.localizedDescription||``,onClick:$event=>selectProvider(provider)},null,8,[`id`,`modelValue`,`value`,`title`,`description`,`onClick`]))),128))])]),createVNode(unref(Button_default),{label:unref(t)(`settings.dialogs.onboarding.next`),disabled:!selectedProviderId.value,onClick:handleNextStep},null,8,[`label`,`disabled`])])):step.value===3&&selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_13,[createBaseVNode(`div`,_hoisted_14,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[8]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-left-line-duotone":``,"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`h2`,_hoisted_15,toDisplayString(unref(t)(`settings.dialogs.onboarding.configureProvider`,{provider:selectedProvider.value.localizedName})),1),_cache$1[9]||=createBaseVNode(`div`,{"h-5":``,"w-5":``},null,-1)]),selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_16,[createVNode(unref(Callout_default),{label:`Keep your API keys and credentials safe!`,theme:`violet`},{default:withCtx(()=>_cache$1[10]||=[createBaseVNode(`div`,null,[createBaseVNode(`div`,null,` AIRI is running pure locally in your browser, and we will never steal your credentials for AI / LLM providers. But keep in mind that your API keys are sensitive information. Make sure to keep them safe and do not share them with anyone. `),createBaseVNode(`div`,null,[createTextVNode(` AIRI is open sourced at `),createBaseVNode(`div`,{"inline-flex":``,"translate-y-1":``,"items-center":``,"gap-1":``},[createBaseVNode(`div`,{"i-simple-icons:github":``,"inline-block":``}),createBaseVNode(`a`,{"decoration-underline":``,"decoration-dashed":``,href:`https://github.com/moeru-ai/airi`,target:`_blank`,rel:`noopener noreferrer`},`GitHub`)]),createTextVNode(`, if you want to check how we handle your credentials, feel free to inspect our code. `)])],-1)]),_:1,__:[10]}),createBaseVNode(`div`,_hoisted_17,[needsApiKey.value?(openBlock(),createElementBlock(`div`,_hoisted_18,[createVNode(unref(FieldInput_default),{modelValue:apiKey.value,"onUpdate:modelValue":_cache$1[1]||=$event=>apiKey.value=$event,placeholder:getApiKeyPlaceholder(selectedProvider.value.id),type:`password`,label:`API Key`,description:`Enter your API key for the selected provider.`,required:``},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),needsBaseUrl.value?(openBlock(),createElementBlock(`div`,_hoisted_19,[createVNode(unref(FieldInput_default),{modelValue:baseUrl.value,"onUpdate:modelValue":_cache$1[2]||=$event=>baseUrl.value=$event,placeholder:getBaseUrlPlaceholder(selectedProvider.value.id),type:`text`,label:`Base URL`,description:`Enter the base URL for the provider's API.`},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),selectedProvider.value.id===`cloudflare-workers-ai`?(openBlock(),createElementBlock(`div`,_hoisted_20,[createVNode(unref(ProviderAccountIdInput_default),{modelValue:accountId.value,"onUpdate:modelValue":_cache$1[3]||=$event=>accountId.value=$event},null,8,[`modelValue`])])):createCommentVNode(``,!0)]),validationMessage.value?(openBlock(),createElementBlock(`div`,_hoisted_21,[createBaseVNode(`div`,{class:normalizeClass([`flex items-center rounded-lg p-3`,[isValidating.value?`bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300`:isValid$1.value?`bg-green-50 text-green-700 dark:bg-green-900/30 dark:text-green-300`:`bg-red-50 text-red-700 dark:bg-red-900/30 dark:text-red-300`]])},[createBaseVNode(`div`,{class:normalizeClass([`mr-2 text-lg`,[isValidating.value?`i-svg-spinners:3-dots-fade`:isValid$1.value?`i-solar:check-circle-bold-duotone`:`i-solar:danger-circle-bold-duotone`]])},null,2),createTextVNode(` `+toDisplayString(validationMessage.value),1)],2)])):createCommentVNode(``,!0)])):createCommentVNode(``,!0),createVNode(unref(Button_default),{label:unref(t)(`settings.dialogs.onboarding.next`),disabled:!selectedProviderId.value,loading:unref(isLoadingActiveProviderModels),onClick:handleFinishProviderConfiguration},null,8,[`label`,`disabled`,`loading`])])):step.value===4&&selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_22,[createBaseVNode(`div`,_hoisted_23,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[11]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-left-line-duotone":``,"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`h2`,_hoisted_24,toDisplayString(unref(t)(`settings.dialogs.onboarding.select-model`)),1),_cache$1[12]||=createBaseVNode(`div`,{"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`div`,_hoisted_25,[createVNode(unref(RadioCardManySelect_default),{modelValue:unref(activeModel),"onUpdate:modelValue":_cache$1[4]||=$event=>isRef(activeModel)?activeModel.value=$event:null,"search-query":unref(modelSearchQuery),"onUpdate:searchQuery":_cache$1[5]||=$event=>isRef(modelSearchQuery)?modelSearchQuery.value=$event:null,items:unref(providerModels).sort((a$2,b$4)=>a$2.id===unref(activeModel)?-1:b$4.id===unref(activeModel)?1:0),searchable:!0,"search-placeholder":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:unref(modelSearchQuery)}),"search-results-text":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"list-class":`max-h-[calc(100dvh-17rem)] sm:max-h-120`},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`])]),createVNode(unref(Button_default),{variant:`primary`,disabled:!canSave.value,label:unref(t)(`settings.dialogs.onboarding.saveAndContinue`),onClick:handleSave},null,8,[`disabled`,`label`])])):createCommentVNode(``,!0)]),_:1},8,[`name`])])}}}),Onboarding_default=__plugin_vue_export_helper_default(Onboarding_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-25cc5d94`]]);(function(){"use strict";var t;try{if(typeof document<`u`){var a$2=document.createElement(`style`);a$2.nonce=(t=document.head.querySelector(`meta[property=csp-nonce]`))?.content,a$2.appendChild(document.createTextNode(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}`)),document.head.appendChild(a$2)}}catch(r$2){console.error(`vite-plugin-css-injected-by-js`,r$2)}})();const rt=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const ut=e$3=>typeof e$3<`u`;function st(e$3){return JSON.parse(JSON.stringify(e$3))}function $e(e$3,n$2,s$1,i$1={}){var t,w$2,d$2;let{clone:v$2=!1,passive:D$1=!1,eventName:$$2,deep:T$1=!1,defaultValue:r$2,shouldEmit:l$1}=i$1,h$3=getCurrentInstance(),m$3=s$1||h$3?.emit||(t=h$3?.$emit)?.bind(h$3)||(d$2=(w$2=h$3?.proxy)?.$emit)?.bind(h$3?.proxy),u$1=$$2;n$2||=`modelValue`,u$1||=`update:${n$2.toString()}`;let L$1=a$2=>v$2?typeof v$2==`function`?v$2(a$2):st(a$2):a$2,H$3=()=>ut(e$3[n$2])?L$1(e$3[n$2]):r$2,p$5=a$2=>{l$1?l$1(a$2)&&m$3(u$1,a$2):m$3(u$1,a$2)};if(D$1){let a$2=H$3(),c$4=ref(a$2),f$3=!1;return watch(()=>e$3[n$2],y$3=>{f$3||(f$3=!0,c$4.value=L$1(y$3),nextTick(()=>f$3=!1))}),watch(c$4,y$3=>{!f$3&&(y$3!==e$3[n$2]||T$1)&&p$5(y$3)},{deep:T$1}),c$4}else return computed({get(){return H$3()},set(a$2){p$5(a$2)}})}const[ee,ct]=createContext(`DrawerRoot`),Ee=new WeakMap;function C(e$3,n$2,s$1=!1){if(!e$3||!(e$3 instanceof HTMLElement)||!n$2)return;let i$1={};Object.entries(n$2).forEach(([t,w$2])=>{if(t.startsWith(`--`)){e$3.style.setProperty(t,w$2);return}i$1[t]=e$3.style[t],e$3.style[t]=w$2}),!s$1&&Ee.set(e$3,i$1)}function dt(e$3,n$2){if(!e$3||!(e$3 instanceof HTMLElement))return;let s$1=Ee.get(e$3);s$1&&Object.entries(s$1).forEach(([i$1,t])=>{e$3.style[i$1]=t})}function ie(e$3,n$2){let s$1=window.getComputedStyle(e$3),i$1=s$1.transform||s$1.webkitTransform||s$1.mozTransform,t=i$1.match(/^matrix3d\((.+)\)$/);return t?Number.parseFloat(t[1].split(`, `)[_(n$2)?13:12]):(t=i$1.match(/^matrix\((.+)\)$/),t?Number.parseFloat(t[1].split(`, `)[_(n$2)?5:4]):null)}function vt(e$3){return 8*(Math.log(e$3+1)-2)}function _(e$3){switch(e$3){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e$3}}function de(e$3,n$2){if(!e$3)return()=>{};let s$1=e$3.style.cssText;return Object.assign(e$3.style,n$2),()=>{e$3.style.cssText=s$1}}function ft(...e$3){return(...n$2)=>{for(let s$1 of e$3)typeof s$1==`function`&&s$1(...n$2)}}const O={DURATION:.5,EASE:[.32,.72,0,1]},_e=.4,pt=.25,gt=100,Be=8,re=16,Ce=26,Oe=`vaul-dragging`;function mt({activeSnapPoint:e$3,snapPoints:n$2,drawerRef:s$1,overlayRef:i$1,fadeFromIndex:t,onSnapPointChange:w$2,direction:d$2}){let v$2=ref(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function D$1(){v$2.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}onMounted(()=>{typeof window<`u`&&window.addEventListener(`resize`,D$1)}),onBeforeUnmount(()=>{typeof window<`u`&&window.removeEventListener(`resize`,D$1)});let $$2=computed(()=>(n$2.value&&e$3.value===n$2.value[n$2.value.length-1])??null),T$1=computed(()=>n$2.value&&n$2.value.length>0&&(t?.value||t?.value===0)&&!Number.isNaN(t?.value)&&n$2.value[t?.value??-1]===e$3.value||!n$2.value),r$2=computed(()=>{var p$5;return(p$5=n$2.value)?.findIndex(a$2=>a$2===e$3.value)??null}),l$1=computed(()=>{var p$5;return(p$5=n$2.value)?.map(a$2=>{let c$4=typeof a$2==`string`,f$3=0;if(c$4&&(f$3=Number.parseInt(a$2,10)),_(d$2.value)){let P$2=c$4?f$3:v$2.value?a$2*v$2.value.innerHeight:0;return v$2.value?d$2.value===`bottom`?v$2.value.innerHeight-P$2:-v$2.value.innerHeight+P$2:P$2}let y$3=c$4?f$3:v$2.value?a$2*v$2.value.innerWidth:0;return v$2.value?d$2.value===`right`?v$2.value.innerWidth-y$3:-v$2.value.innerWidth+y$3:y$3})??[]}),h$3=computed(()=>{var p$5;return r$2.value===null?null:(p$5=l$1.value)?.[r$2.value]}),m$3=p$5=>{var c$4,f$3,y$3,P$2;let a$2=(c$4=l$1.value)?.findIndex(x$3=>x$3===p$5)??null;nextTick(()=>{var x$3;w$2(a$2,l$1.value),C((x$3=s$1.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:_(d$2.value)?`translate3d(0, ${p$5}px, 0)`:`translate3d(${p$5}px, 0, 0)`})}),l$1.value&&a$2!==l$1.value.length-1&&a$2!==t?.value?C((f$3=i$1.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`0`}):C((y$3=i$1.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`1`}),e$3.value=a$2===null?null:(P$2=n$2.value)?.[a$2]??null};watch([e$3,l$1,n$2],()=>{var p$5;if(e$3.value){let a$2=(p$5=n$2.value)?.findIndex(c$4=>c$4===e$3.value)??-1;l$1.value&&a$2!==-1&&typeof l$1.value[a$2]==`number`&&m$3(l$1.value[a$2])}},{immediate:!0});function u$1({draggedDistance:p$5,closeDrawer:a$2,velocity:c$4,dismissible:f$3}){var j$1,G$2,z$3;if(t.value===void 0)return;let y$3=d$2.value===`bottom`||d$2.value===`right`?(h$3.value??0)-p$5:(h$3.value??0)+p$5,P$2=r$2.value===t.value-1,x$3=r$2.value===0,W$2=p$5>0;if(P$2&&C((j$1=i$1.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`}),c$4>2&&!W$2){f$3?a$2():m$3(l$1.value[0]);return}if(c$4>2&&W$2&&l$1&&n$2.value){m$3(l$1.value[n$2.value.length-1]);return}let te$3=(G$2=l$1.value)?.reduce((M$1,g$2)=>typeof M$1!=`number`||typeof g$2!=`number`?M$1:Math.abs(g$2-y$3)_e&&Math.abs(p$5)0&&$$2){m$3(l$1.value[((z$3=n$2.value)?.length??0)-1]);return}if(x$3&&M$1<0&&f$3&&a$2(),r$2.value===null)return;m$3(l$1.value[r$2.value+M$1]);return}m$3(te$3)}function L$1({draggedDistance:p$5}){var c$4;if(h$3.value===null)return;let a$2=d$2.value===`bottom`||d$2.value===`right`?h$3.value-p$5:h$3.value+p$5;(d$2.value===`bottom`||d$2.value===`right`)&&a$2l$1.value[l$1.value.length-1]||C((c$4=s$1.value)?.$el,{transform:_(d$2.value)?`translate3d(0, ${a$2}px, 0)`:`translate3d(${a$2}px, 0, 0)`})}function H$3(p$5,a$2){if(!n$2.value||typeof r$2.value!=`number`||!l$1.value||t.value===void 0)return null;let c$4=r$2.value===t.value-1;if(r$2.value>=t.value&&a$2)return 0;if(c$4&&!a$2)return 1;if(!T$1.value&&!c$4)return null;let y$3=c$4?r$2.value+1:r$2.value-1,P$2=c$4?l$1.value[y$3]-l$1.value[y$3-1]:l$1.value[y$3+1]-l$1.value[y$3],x$3=p$5/Math.abs(P$2);return c$4?1-x$3:x$3}return{isLastSnapPoint:$$2,shouldFade:T$1,getPercentageDragged:H$3,activeSnapPointIndex:r$2,onRelease:u$1,onDrag:L$1,snapPointsOffset:l$1}}function Te(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let Q=null;function wt(e$3){let{isOpen:n$2,modal:s$1,nested:i$1,hasBeenOpened:t,preventScrollRestoration:w$2,noBodyStyles:d$2}=e$3,v$2=ref(typeof window<`u`?window.location.href:``),D$1=ref(0);function $$2(){if(Te()&&Q===null&&n$2.value&&!d$2.value){Q={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};let{scrollX:r$2,innerHeight:l$1}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-D$1.value}px`,left:`${-r$2}px`,right:`0px`,height:`auto`}),setTimeout(()=>{requestAnimationFrame(()=>{let h$3=l$1-window.innerHeight;h$3&&D$1.value>=l$1&&(document.body.style.top=`-${D$1.value+h$3}px`)})},300)}}function T$1(){if(Te()&&Q!==null&&!d$2.value){let r$2=-Number.parseInt(document.body.style.top,10),l$1=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,Q),window.requestAnimationFrame(()=>{if(w$2.value&&v$2.value!==window.location.href){v$2.value=window.location.href;return}window.scrollTo(l$1,r$2)}),Q=null}}return onMounted(()=>{function r$2(){D$1.value=window.scrollY}r$2(),window.addEventListener(`scroll`,r$2),onUnmounted(()=>{window.removeEventListener(`scroll`,r$2)})}),watch([n$2,t,v$2],()=>{i$1.value||!t.value||(n$2.value?(window.matchMedia(`(display-mode: standalone)`).matches||$$2(),s$1.value||setTimeout(()=>{T$1()},500)):T$1())}),{restorePositionSetting:T$1}}function ht(e$3,n$2){return e$3&&e$3.value?e$3:n$2}function yt(e$3){let{emitDrag:n$2,emitRelease:s$1,emitClose:i$1,emitOpenChange:t,open:w$2,dismissible:d$2,nested:v$2,modal:D$1,shouldScaleBackground:$$2,setBackgroundColorOnScale:T$1,scrollLockTimeout:r$2,closeThreshold:l$1,activeSnapPoint:h$3,fadeFromIndex:m$3,direction:u$1,noBodyStyles:L$1,handleOnly:H$3,preventScrollRestoration:p$5}=e$3,a$2=ref(w$2.value??!1),c$4=ref(!1),f$3=ref(!1),y$3=ref(!1),P$2=ref(null),x$3=ref(null),W$2=ref(null),te$3=ref(null),V$2=ref(null),j$1=ref(!1),G$2=ref(null),z$3=ref(0),M$1=ref(!1);ref(0);let g$2=ref(null);ref(0);let pe$3=computed(()=>{var o$1;return(o$1=g$2.value)?.$el.getBoundingClientRect().height||0}),U=ht(e$3.snapPoints,ref(void 0)),Ne$1=computed(()=>{var o$1;return U&&((o$1=U.value)?.length??0)>0}),Ae$1=ref(null),{activeSnapPointIndex:ge$2,onRelease:xe,snapPointsOffset:He$2,onDrag:Ue$1,shouldFade:me$2,getPercentageDragged:Le$2}=mt({snapPoints:U,activeSnapPoint:h$3,drawerRef:g$2,fadeFromIndex:m$3,overlayRef:P$2,onSnapPointChange:Me$2,direction:u$1});function Me$2(o$1,R$3){U.value&&o$1===R$3.length-1&&(x$3.value=new Date)}wt({isOpen:a$2,modal:D$1,nested:v$2,hasBeenOpened:c$4,noBodyStyles:L$1,preventScrollRestoration:p$5});function ne$2(){return(window.innerWidth-Ce)/window.innerWidth}function we$2(o$1,R$3){var k$4;if(!o$1)return!1;let b$4=o$1,B$2=(k$4=window.getSelection())?.toString(),E$2=g$2.value?ie(g$2.value.$el,u$1.value):null,A$2=new Date;if(b$4.hasAttribute(`data-vaul-no-drag`)||b$4.closest(`[data-vaul-no-drag]`))return!1;if(u$1.value===`right`||u$1.value===`left`)return!0;if(x$3.value&&A$2.getTime()-x$3.value.getTime()<500)return!1;if(E$2!==null&&(u$1.value===`bottom`?E$2>0:E$2<0))return!0;if(B$2&&B$2.length>0)return!1;if(V$2.value&&A$2.getTime()-V$2.value.getTime()b$4.clientHeight){if(b$4.scrollTop!==0)return V$2.value=new Date,!1;if(b$4.getAttribute(`role`)===`dialog`)return!0}b$4=b$4.parentNode}return!0}function ke$1(o$1){!d$2.value&&!U.value||g$2.value&&!g$2.value.$el.contains(o$1.target)||(f$3.value=!0,W$2.value=new Date,o$1.target.setPointerCapture(o$1.pointerId),z$3.value=_(u$1.value)?o$1.clientY:o$1.clientX)}function Ie(o$1){var R$3,b$4,B$2,E$2,A$2,k$4;if(g$2.value&&f$3.value){let X$2=u$1.value===`bottom`||u$1.value===`right`?1:-1,ae$1=(z$3.value-(_(u$1.value)?o$1.clientY:o$1.clientX))*X$2,le$2=ae$1>0,ye$1=U.value&&!d$2.value&&!le$2;if(ye$1&&ge$2.value===0)return;let ce$2=Math.abs(ae$1),Se$2=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`),q$2=ce$2/pe$3.value,De=Le$2(ce$2,le$2);if(De!==null&&(q$2=De),ye$1&&q$2>=1||!j$1.value&&!we$2(o$1.target,le$2))return;if((R$3=g$2?.value)==null||R$3.$el.classList.add(Oe),j$1.value=!0,C((b$4=g$2.value)?.$el,{transition:`none`}),C((B$2=P$2.value)?.$el,{transition:`none`}),U.value&&Ue$1({draggedDistance:ae$1}),le$2&&!U.value){let Y$2=vt(ae$1),oe$2=Math.min(Y$2*-1,0)*X$2;C((E$2=g$2.value)?.$el,{transform:_(u$1.value)?`translate3d(0, ${oe$2}px, 0)`:`translate3d(${oe$2}px, 0, 0)`});return}let qe$2=1-q$2;if((me$2.value||m$3.value&&ge$2.value===m$3.value-1)&&(n$2(q$2),C((A$2=P$2.value)?.$el,{opacity:`${qe$2}`,transition:`none`},!0)),Se$2&&P$2.value&&$$2.value){let Y$2=Math.min(ne$2()+q$2*(1-ne$2()),1),oe$2=8-q$2*8,be$2=Math.max(0,14-q$2*14);C(Se$2,{borderRadius:`${oe$2}px`,transform:_(u$1.value)?`scale(${Y$2}) translate3d(0, ${be$2}px, 0)`:`scale(${Y$2}) translate3d(${be$2}px, 0, 0)`,transition:`none`},!0)}if(!U.value){let Y$2=ce$2*X$2;C((k$4=g$2.value)?.$el,{transform:_(u$1.value)?`translate3d(0, ${Y$2}px, 0)`:`translate3d(${Y$2}px, 0, 0)`})}}}function he$2(){var b$4;if(!g$2.value)return;let o$1=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`),R$3=ie(g$2.value.$el,u$1.value);C(g$2.value.$el,{transform:`translate3d(0, 0, 0)`,transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`}),C((b$4=P$2.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`1`}),$$2.value&&R$3&&R$3>0&&a$2.value&&C(o$1,{borderRadius:`${Be}px`,overflow:`hidden`,..._(u$1.value)?{transform:`scale(${ne$2()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${ne$2()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(`,`)})`},!0)}function K$1(o$1){g$2.value&&(i$1(),o$1||(a$2.value=!1),window.setTimeout(()=>{U.value&&(h$3.value=U.value[0])},O.DURATION*1e3))}watchEffect(()=>{if(!a$2.value&&$$2.value&&rt){let o$1=setTimeout(()=>{dt(document.body)},200);return()=>clearTimeout(o$1)}}),watch(w$2,()=>{a$2.value=w$2.value,w$2.value||K$1()});function We(o$1){if(!f$3.value||!g$2.value)return;g$2.value.$el.classList.remove(Oe),j$1.value=!1,f$3.value=!1,te$3.value=new Date;let R$3=ie(g$2.value.$el,u$1.value);if(!we$2(o$1.target,!1)||!R$3||Number.isNaN(R$3)||W$2.value===null)return;let b$4=te$3.value.getTime()-W$2.value.getTime(),B$2=z$3.value-(_(u$1.value)?o$1.clientY:o$1.clientX),E$2=Math.abs(B$2)/b$4;if(E$2>.05&&(y$3.value=!0,window.setTimeout(()=>{y$3.value=!1},200)),U.value){let k$4=u$1.value===`bottom`||u$1.value===`right`?1:-1;xe({draggedDistance:B$2*k$4,closeDrawer:K$1,velocity:E$2,dismissible:d$2.value}),s$1(!0);return}if(u$1.value===`bottom`||u$1.value===`right`?B$2>0:B$2<0){he$2(),s$1(!0);return}if(E$2>_e){K$1(),s$1(!1);return}let A$2=Math.min(g$2.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(R$3>=A$2*l$1.value){K$1(),s$1(!1);return}s$1(!0),he$2()}watch(a$2,o$1=>{o$1&&(x$3.value=new Date),t(o$1)},{immediate:!0});function Ve$1(o$1){var B$2,E$2;let R$3=o$1?(window.innerWidth-re)/window.innerWidth:1,b$4=o$1?-16:0;G$2.value&&window.clearTimeout(G$2.value),C((B$2=g$2.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:`scale(${R$3}) translate3d(0, ${b$4}px, 0)`}),!o$1&&(E$2=g$2.value)!=null&&E$2.$el&&(G$2.value=window.setTimeout(()=>{var k$4,X$2;let A$2=ie((k$4=g$2.value)?.$el,u$1.value);C((X$2=g$2.value)?.$el,{transition:`none`,transform:_(u$1.value)?`translate3d(0, ${A$2}px, 0)`:`translate3d(${A$2}px, 0, 0)`})},500))}function je$1(o$1){var A$2;if(o$1<0)return;let R$3=_(u$1.value)?window.innerHeight:window.innerWidth,b$4=(R$3-re)/R$3,B$2=b$4+o$1*(1-b$4),E$2=-16+o$1*re;C((A$2=g$2.value)?.$el,{transform:_(u$1.value)?`scale(${B$2}) translate3d(0, ${E$2}px, 0)`:`scale(${B$2}) translate3d(${E$2}px, 0, 0)`,transition:`none`})}function ze$1(o$1){var E$2;let R$3=_(u$1.value)?window.innerHeight:window.innerWidth,b$4=o$1?(R$3-re)/R$3:1,B$2=o$1?-16:0;o$1&&C((E$2=g$2.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:_(u$1.value)?`scale(${b$4}) translate3d(0, ${B$2}px, 0)`:`scale(${b$4}) translate3d(${B$2}px, 0, 0)`})}return{open:w$2,isOpen:a$2,modal:D$1,keyboardIsOpen:M$1,hasBeenOpened:c$4,drawerRef:g$2,drawerHeightRef:pe$3,overlayRef:P$2,handleRef:Ae$1,isDragging:f$3,dragStartTime:W$2,isAllowedToDrag:j$1,snapPoints:U,activeSnapPoint:h$3,hasSnapPoints:Ne$1,pointerStart:z$3,dismissible:d$2,snapPointsOffset:He$2,direction:u$1,shouldFade:me$2,fadeFromIndex:m$3,shouldScaleBackground:$$2,setBackgroundColorOnScale:T$1,onPress:ke$1,onDrag:Ie,onRelease:We,closeDrawer:K$1,onNestedDrag:je$1,onNestedRelease:ze$1,onNestedOpenChange:Ve$1,emitClose:i$1,emitDrag:n$2,emitRelease:s$1,emitOpenChange:t,nested:v$2,handleOnly:H$3,noBodyStyles:L$1}}const St=defineComponent({__name:`DrawerRoot`,props:{activeSnapPoint:{default:void 0},closeThreshold:{default:pt},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:gt},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:`bottom`},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:[`drag`,`release`,`close`,`update:open`,`update:activeSnapPoint`,`animationEnd`],setup(e$3,{expose:n$2,emit:s$1}){let i$1=e$3,t=s$1;useSlots();let w$2=computed(()=>i$1.fadeFromIndex??(i$1.snapPoints&&i$1.snapPoints.length-1)),d$2=$e(i$1,`open`,t,{defaultValue:i$1.defaultOpen,passive:i$1.open===void 0}),v$2=$e(i$1,`activeSnapPoint`,t,{passive:i$1.activeSnapPoint===void 0}),D$1={emitDrag:m$3=>t(`drag`,m$3),emitRelease:m$3=>t(`release`,m$3),emitClose:()=>t(`close`),emitOpenChange:m$3=>{t(`update:open`,m$3),setTimeout(()=>{t(`animationEnd`,m$3)},O.DURATION*1e3)}},{closeDrawer:$$2,hasBeenOpened:T$1,modal:r$2,isOpen:l$1}=ct(yt({...D$1,...toRefs(i$1),activeSnapPoint:v$2,fadeFromIndex:w$2,open:d$2}));function h$3(m$3){if(d$2.value!==void 0){D$1.emitOpenChange(m$3);return}l$1.value=m$3,m$3?T$1.value=!0:$$2()}return n$2({open:l$1}),(m$3,u$1)=>(openBlock(),createBlock(unref(_sfc_main$8),{open:unref(l$1),modal:unref(r$2),"onUpdate:open":h$3},{default:withCtx(()=>[renderSlot(m$3.$slots,`default`,{open:unref(l$1)})]),_:3},8,[`open`,`modal`]))}}),_t=defineComponent({__name:`DrawerRootNested`,props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:[`drag`,`release`,`close`,`update:open`,`update:activeSnapPoint`,`animationEnd`],setup(e$3,{emit:n$2}){let s$1=e$3,i$1=n$2,{onNestedDrag:t,onNestedOpenChange:w$2,onNestedRelease:d$2}=ee();function v$2(){w$2(!1)}function D$1(r$2){t(r$2)}function $$2(r$2){r$2&&w$2(r$2),i$1(`update:open`,r$2)}let T$1=useForwardPropsEmits(s$1,i$1);return(r$2,l$1)=>(openBlock(),createBlock(St,mergeProps(unref(T$1),{nested:``,onClose:v$2,onDrag:D$1,onRelease:unref(d$2),"onUpdate:open":$$2}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`onRelease`]))}}),Bt=defineComponent({__name:`DrawerOverlay`,setup(e$3){let{overlayRef:n$2,hasSnapPoints:s$1,isOpen:i$1,shouldFade:t}=ee();return(w$2,d$2)=>(openBlock(),createBlock(unref(_sfc_main$6),{ref_key:`overlayRef`,ref:n$2,"data-vaul-overlay":``,"data-vaul-snap-points":unref(i$1)&&unref(s$1)?`true`:`false`,"data-vaul-snap-points-overlay":unref(i$1)&&unref(t)?`true`:`false`},null,8,[`data-vaul-snap-points`,`data-vaul-snap-points-overlay`]))}}),Dt=()=>()=>{};function bt(){let{direction:e$3,isOpen:n$2,shouldScaleBackground:s$1,setBackgroundColorOnScale:i$1,noBodyStyles:t}=ee(),w$2=ref(null),d$2=ref(document.body.style.backgroundColor);function v$2(){return(window.innerWidth-Ce)/window.innerWidth}watchEffect(D$1=>{if(n$2.value&&s$1.value){w$2.value&&clearTimeout(w$2.value);let $$2=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!$$2)return;ft(i$1.value&&!t.value?de(document.body,{background:`black`}):Dt,de($$2,{transformOrigin:_(e$3.value)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(`,`)})`}));let T$1=de($$2,{borderRadius:`${Be}px`,overflow:`hidden`,..._(e$3.value)?{transform:`scale(${v$2()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${v$2()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});D$1(()=>{T$1(),w$2.value=window.setTimeout(()=>{d$2.value?document.body.style.background=d$2.value:document.body.style.removeProperty(`background`)},O.DURATION*1e3)})}},{flush:`pre`})}const Ct=defineComponent({__name:`DrawerContent`,setup(e$3){let{open:n$2,isOpen:s$1,snapPointsOffset:i$1,hasSnapPoints:t,drawerRef:w$2,onPress:d$2,onDrag:v$2,onRelease:D$1,modal:$$2,emitOpenChange:T$1,dismissible:r$2,keyboardIsOpen:l$1,closeDrawer:h$3,direction:m$3,handleOnly:u$1}=ee();bt();let L$1=ref(!1),H$3=computed(()=>i$1.value&&i$1.value.length>0?`${i$1.value[0]}px`:`0`);function p$5(f$3){if(!$$2.value||f$3.defaultPrevented){f$3.preventDefault();return}l$1.value&&=!1,r$2.value?T$1(!1):f$3.preventDefault()}function a$2(f$3){u$1.value||d$2(f$3)}function c$4(f$3){u$1.value||v$2(f$3)}return watchEffect(()=>{t.value&&window.requestAnimationFrame(()=>{L$1.value=!0})}),(f$3,y$3)=>(openBlock(),createBlock(unref(_sfc_main$5),{ref_key:`drawerRef`,ref:w$2,"data-vaul-drawer":``,"data-vaul-drawer-direction":unref(m$3),"data-vaul-delayed-snap-points":L$1.value?`true`:`false`,"data-vaul-snap-points":unref(s$1)&&unref(t)?`true`:`false`,style:normalizeStyle({"--snap-point-height":H$3.value}),onPointerdown:a$2,onPointermove:c$4,onPointerup:unref(D$1),onPointerDownOutside:p$5,onOpenAutoFocus:y$3[0]||=withModifiers(()=>{},[`prevent`]),onEscapeKeyDown:y$3[1]||=P$2=>{unref(r$2)||P$2.preventDefault()}},{default:withCtx(()=>[renderSlot(f$3.$slots,`default`)]),_:3},8,[`data-vaul-drawer-direction`,`data-vaul-delayed-snap-points`,`data-vaul-snap-points`,`style`,`onPointerup`]))}}),$t=[`data-vaul-drawer-visible`],Ot={"data-vaul-handle-hitarea":``,"aria-hidden":`true`},Tt=250,Pt=120,Nt=defineComponent({__name:`DrawerHandle`,props:{preventCycle:{type:Boolean,default:!1}},setup(e$3){let n$2=e$3,{onPress:s$1,onDrag:i$1,handleRef:t,handleOnly:w$2,isOpen:d$2,snapPoints:v$2,activeSnapPoint:D$1,isDragging:$$2,dismissible:T$1,closeDrawer:r$2}=ee(),l$1=ref(null),h$3=ref(!1);function m$3(){if(h$3.value){H$3();return}window.setTimeout(()=>{u$1()},Pt)}function u$1(){if($$2.value||n$2.preventCycle||h$3.value){H$3();return}if(H$3(),!v$2.value||v$2.value.length===0){T$1.value||r$2();return}let c$4=D$1.value===v$2.value[v$2.value.length-1];if(c$4&&T$1.value){r$2();return}let f$3=v$2.value.findIndex(P$2=>P$2===D$1.value);if(f$3===-1)return;let y$3=c$4?0:f$3+1;D$1.value=v$2.value[y$3]}function L$1(){l$1.value=window.setTimeout(()=>{h$3.value=!0},Tt)}function H$3(){l$1.value&&window.clearTimeout(l$1.value),h$3.value=!1}function p$5(c$4){w$2.value&&s$1(c$4),L$1()}function a$2(c$4){w$2.value&&i$1(c$4)}return(c$4,f$3)=>(openBlock(),createElementBlock(`div`,{ref_key:`handleRef`,ref:t,"data-vaul-drawer-visible":unref(d$2)?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,onClick:m$3,onPointercancel:H$3,onPointerdown:p$5,onPointermove:a$2},[createBaseVNode(`span`,Ot,[renderSlot(c$4.$slots,`default`)])],40,$t))}});var OnboardingDialog_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`OnboardingDialog`,props:{modelValue:{type:Boolean,default:!1,required:!1},modelModifiers:{}},emits:mergeModels([`configured`,`skipped`],[`update:modelValue`]),setup(__props,{emit:__emit}){let emit$1=__emit,showDialog=useModel(__props,`modelValue`),isDesktop=useMediaQuery(`(min-width: 768px)`);return(_ctx,_cache$1)=>unref(isDesktop)?(openBlock(),createBlock(unref(_sfc_main$8),{key:0,open:showDialog.value,"onUpdate:open":_cache$1[2]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[createVNode(unref(_sfc_main$7),null,{default:withCtx(()=>[createVNode(unref(_sfc_main$6),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-[9999] bg-black/50 backdrop-blur-sm`}),createVNode(unref(_sfc_main$5),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-[9999] max-h-full max-w-2xl w-[92dvw] transform overflow-y-scroll rounded-2xl bg-white p-6 shadow-xl outline-none backdrop-blur-md scrollbar-none -translate-x-1/2 -translate-y-1/2 dark:bg-neutral-900`},{default:withCtx(()=>[createVNode(Onboarding_default,{onConfigured:_cache$1[0]||=$event=>emit$1(`configured`),onSkipped:_cache$1[1]||=$event=>emit$1(`skipped`)})]),_:1})]),_:1})]),_:1},8,[`open`])):(openBlock(),createBlock(unref(St),{key:1,open:showDialog.value,"should-scale-background":``,"onUpdate:open":_cache$1[5]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[createVNode(unref(_sfc_main$7),null,{default:withCtx(()=>[createVNode(unref(Bt),{class:`fixed inset-0`}),createVNode(unref(Ct),{class:`fixed bottom-0 left-0 right-0 z-1000 mt-20 h-full max-h-[96%] flex flex-col rounded-t-2xl bg-neutral-50 p-4 outline-none backdrop-blur-md dark:bg-neutral-900/95`},{default:withCtx(()=>[createVNode(unref(Nt)),createVNode(Onboarding_default,{onConfigured:_cache$1[3]||=$event=>emit$1(`configured`),onSkipped:_cache$1[4]||=$event=>emit$1(`skipped`)})]),_:1})]),_:1})]),_:1},8,[`open`]))}}),OnboardingDialog_default=OnboardingDialog_vue_vue_type_script_setup_true_lang_default;const ToasterRootInjectionKey=Symbol(`ToasterRoot`);var ToasterRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ToasterRoot`,emits:[`close`],setup(__props,{emit:__emit}){let emits=__emit;return provide(ToasterRootInjectionKey,{close:id$1=>emits(`close`,id$1)}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`)}}),ToasterRoot_default=ToasterRoot_vue_vue_type_script_setup_true_lang_default,import_jszip_min=__toESM(require_jszip_min()),import_localforage=__toESM(require_localforage());const _hoisted_1$8={flex:`~ col gap-2`},_hoisted_2$3={flex:``,"items-center":``,"gap-2":``},_hoisted_3={"font-medium":``,"font-mono":``},_hoisted_4={flex:``,"gap-2":``},_hoisted_5=[`onUpdate:modelValue`],_hoisted_6=[`href`,`download`],_hoisted_7={flex:``,"items-center":``},_hoisted_8={flex:``,"items-center":``},_hoisted_9={flex:``,"items-center":``};var Live2DSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Live2DSettings`,props:{palette:{}},emits:[`extractColorsFromModel`],setup(__props){let{t}=useI18n(),modelFileDialog=useFileDialog({accept:`application/zip`}),live2d=useLive2d(),{modelFile,motionMap,loadSource,loadingModel,availableMotions,modelUrl,currentMotion,scale:scale$1,position:position$2}=storeToRefs(live2d),localModelUrl=ref(modelUrl.value);modelFileDialog.onChange(files=>{files&&files.length>0&&(motionMap.value={},modelFile.value=files[0],loadSource.value=`file`,loadingModel.value=!0)}),watch(loadingModel,value$1=>{value$1||loadSource.value===`file`&&availableMotions.value.forEach(motion=>{motion.motionName in Emotion?motionMap.value[motion.fileName]=motion.motionName:motionMap.value[motion.fileName]=EmotionNeutralMotionName})});async function patchMotionMap(source,motionMap$1){if(!Object.keys(motionMap$1).length)return source;let jsZip=new import_jszip_min.default,zip=await jsZip.loadAsync(source),fileName=Object.keys(zip.files).find(key$1=>key$1.endsWith(`model3.json`));if(!fileName)throw Error(`model3.json not found`);let model3Json=await zip.file(fileName).async(`string`),model3JsonObject=JSON.parse(model3Json),motions={};Object.entries(motionMap$1).forEach(([key$1,value$1])=>{if(motions[value$1]){motions[value$1].push({File:key$1});return}motions[value$1]=[{File:key$1}]}),model3JsonObject.FileReferences.Motions=motions,zip.file(fileName,JSON.stringify(model3JsonObject,null,2));let zipBlob=await zip.generateAsync({type:`blob`});return new File([zipBlob],source.name,{type:source.type,lastModified:source.lastModified})}async function saveMotionMap(){let fileFromIndexedDB=await import_localforage.default.getItem(`live2dModel`);if(!fileFromIndexedDB)return;let patchedFile=await patchMotionMap(fileFromIndexedDB,motionMap.value);modelFile.value=patchedFile,loadSource.value=`file`,loadingModel.value=!0}let exportObjectUrl=useObjectUrl(modelFile);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$8,[createVNode(unref(Section_default),{title:unref(t)(`settings.live2d.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:normalizeClass([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:withCtx(()=>[createVNode(unref(Button_default),{variant:`secondary`,onClick:_cache$1[0]||=$event=>unref(modelFileDialog).open()},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)(`settings.live2d.change-model.from-file`))+`... `,1)]),_:1}),createBaseVNode(`div`,_hoisted_2$3,[createVNode(unref(Input_default),{modelValue:localModelUrl.value,"onUpdate:modelValue":_cache$1[1]||=$event=>localModelUrl.value=$event,disabled:unref(loadingModel),class:`flex-1`,placeholder:unref(t)(`settings.live2d.change-model.from-url-placeholder`)},null,8,[`modelValue`,`disabled`,`placeholder`]),createVNode(unref(Button_default),{size:`sm`,variant:`secondary`,onClick:_cache$1[2]||=$event=>modelUrl.value=localModelUrl.value},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)(`settings.live2d.change-model.from-url`)),1)]),_:1})])]),_:1},8,[`title`]),createVNode(unref(Section_default),{title:unref(t)(`settings.live2d.theme-color-from-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:normalizeClass([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:withCtx(()=>[createVNode(unref(ColorPalette_default),{class:`mb-4 mt-2`,colors:_ctx.palette.map(hex$2=>({hex:hex$2,name:hex$2})),"mx-auto":``},null,8,[`colors`]),createVNode(unref(Button_default),{variant:`secondary`,onClick:_cache$1[3]||=$event=>_ctx.$emit(`extractColorsFromModel`)},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)(`settings.live2d.theme-color-from-model.button-extract.title`)),1)]),_:1})]),_:1},8,[`title`]),unref(loadSource)===`file`?(openBlock(),createBlock(unref(Section_default),{key:0,title:unref(t)(`settings.live2d.edit-motion-map.title`),icon:`i-solar:face-scan-circle-bold-duotone`,class:normalizeClass([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(availableMotions),motion=>(openBlock(),createElementBlock(`div`,{key:motion.fileName,flex:``,"items-center":``,"justify-between":``,"text-sm":``},[createBaseVNode(`span`,_hoisted_3,toDisplayString(motion.fileName),1),createBaseVNode(`div`,_hoisted_4,[withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":$event=>unref(motionMap)[motion.fileName]=$event},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Object.keys(unref(Emotion)),emotion=>(openBlock(),createElementBlock(`option`,{key:emotion},toDisplayString(emotion),1))),128))],8,_hoisted_5),[[vModelSelect,unref(motionMap)[motion.fileName]]]),createVNode(unref(Button_default),{class:`form-control`,onClick:$event=>currentMotion.value={group:motion.motionName,index:motion.motionIndex}},{default:withCtx(()=>_cache$1[10]||=[createTextVNode(` Play `)]),_:2,__:[10]},1032,[`onClick`])])]))),128)),createVNode(unref(Button_default),{onClick:saveMotionMap},{default:withCtx(()=>_cache$1[11]||=[createTextVNode(` Save and patch `)]),_:1,__:[11]}),createBaseVNode(`a`,{"mt-2":``,block:``,href:unref(exportObjectUrl),download:`${unref(modelFile)?.name||`live2d`}-motion-edited.zip`},[createVNode(unref(Button_default),{"w-full":``},{default:withCtx(()=>_cache$1[12]||=[createTextVNode(`Export`)]),_:1,__:[12]})],8,_hoisted_6)]),_:1},8,[`title`])):createCommentVNode(``,!0),createVNode(unref(Section_default),{title:unref(t)(`settings.live2d.scale-and-position.title`),icon:`i-solar:scale-bold-duotone`,class:normalizeClass([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:withCtx(()=>[createVNode(unref(FieldRange_default),{modelValue:unref(scale$1),"onUpdate:modelValue":_cache$1[5]||=$event=>isRef(scale$1)?scale$1.value=$event:null,as:`div`,min:.5,max:2,step:.01,label:unref(t)(`settings.live2d.scale-and-position.scale`)},{label:withCtx(()=>[createBaseVNode(`div`,_hoisted_7,[createBaseVNode(`div`,null,toDisplayString(unref(t)(`settings.live2d.scale-and-position.scale`)),1),createBaseVNode(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:_cache$1[4]||=()=>scale$1.value=1},_cache$1[13]||=[createBaseVNode(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),createVNode(unref(FieldRange_default),{modelValue:unref(position$2).x,"onUpdate:modelValue":_cache$1[7]||=$event=>unref(position$2).x=$event,as:`div`,min:-100,max:100,step:1,label:unref(t)(`settings.live2d.scale-and-position.x`)},{label:withCtx(()=>[createBaseVNode(`div`,_hoisted_8,[createBaseVNode(`div`,null,toDisplayString(unref(t)(`settings.live2d.scale-and-position.x`)),1),createBaseVNode(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:_cache$1[6]||=()=>unref(position$2).x=0},_cache$1[14]||=[createBaseVNode(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),createVNode(unref(FieldRange_default),{modelValue:unref(position$2).y,"onUpdate:modelValue":_cache$1[9]||=$event=>unref(position$2).y=$event,as:`div`,min:-100,max:100,step:1,label:unref(t)(`settings.live2d.scale-and-position.y`)},{label:withCtx(()=>[createBaseVNode(`div`,_hoisted_9,[createBaseVNode(`div`,null,toDisplayString(unref(t)(`settings.live2d.scale-and-position.y`)),1),createBaseVNode(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:_cache$1[8]||=()=>unref(position$2).y=0},_cache$1[15]||=[createBaseVNode(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`])]),_:1},8,[`title`])]))}}),Live2DSettings_default=Live2DSettings_vue_vue_type_script_setup_true_lang_default,ArrowTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ArrowTransition`,props:{stageTransition:{default:()=>({primaryColor:`#666`,secondaryColor:`#ccc`})}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value.secondaryColor||`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-3`,style:normalizeStyle({zIndex:stageTransition.value.zIndex||100})},null,4))}}),ArrowTransition_default=__plugin_vue_export_helper_default(ArrowTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-17464329`]]),BubbleWaveOutTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`BubbleWaveOutTransition`,props:{stageTransition:{}},setup(__props){let props=__props,colors=computed(()=>props.stageTransition?.colors||[`#eee`,`#ebcb8b`,`#c56370`,`#3f3b52`]);return onMounted(()=>{document.documentElement.style.setProperty(`--circle-expansion-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--circle-expansion-duration`,`${props.stageTransition?.duration||.4}s`),colors.value.forEach((color$2,index$1)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${index$1+1}`,color$2)})}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`circle-expansion-transition`,style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex||100})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(colors.value,(_$2,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1}))),128))],4))}}),BubbleWaveOutTransition_default=__plugin_vue_export_helper_default(BubbleWaveOutTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-4624be9e`]]),FantasyFallTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FantasyFallTransition`,props:{stageTransition:{}},setup(__props){let props=__props,direction=computed(()=>props.stageTransition?.direction||`up`),directionClass=computed(()=>`fantasy-fall-${direction.value}`);return onMounted(()=>{document.documentElement.style.setProperty(`--fantasy-fall-color`,props.stageTransition?.primaryColor||`#eee`),document.documentElement.style.setProperty(`--fantasy-fall-duration`,`${props.stageTransition?.duration||.6}s`),document.documentElement.style.setProperty(`--fantasy-fall-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--fantasy-fall-radius-sm`,`${props.stageTransition?.borderRadius?.sm||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-md`,`${props.stageTransition?.borderRadius?.md||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-lg`,`${props.stageTransition?.borderRadius?.lg||`50%`}`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`fantasy-fall-transition`,directionClass.value]),style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex??100})},null,6))}}),FantasyFallTransition_default=__plugin_vue_export_helper_default(FantasyFallTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-826171f5`]]),MultipleBlocksRevealTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`MultipleBlocksRevealTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor||`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-4`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},_cache$1[0]||=[createStaticVNode(`
`,5)],4))}}),MultipleBlocksRevealTransition_default=__plugin_vue_export_helper_default(MultipleBlocksRevealTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-4221f976`]]),SlideTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SlideTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor||`#ccc`);return watch([stageTransition,overlayColor1,overlayColor2],()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,overlayColor2.value)}),onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-1`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},null,4))}}),SlideTransition_default=__plugin_vue_export_helper_default(SlideTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-81c0af14`]]),SlopeSlideTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SlopeSlideTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor??`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor??`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-2`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},null,4))}}),SlopeSlideTransition_default=__plugin_vue_export_helper_default(SlopeSlideTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-9e8b66c8`]]),RectanglesRotateTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RectanglesRotateTransition`,props:{stageTransition:{}},setup(__props){let props=__props;return onMounted(()=>{document.documentElement.style.setProperty(`--rectangle-rotate-1-color`,props.stageTransition?.primaryColor||`#ebcb8b`),document.documentElement.style.setProperty(`--rectangle-rotate-2-color`,props.stageTransition?.secondaryColor||`#c56370`),document.documentElement.style.setProperty(`--rectangle-rotate-3-color`,props.stageTransition?.tertiaryColor||`#43445b`),document.documentElement.style.setProperty(`--rectangle-rotate-duration`,`${props.stageTransition?.duration||.6}s`),document.documentElement.style.setProperty(`--rectangle-rotate-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--rectangle-rotate-stagger`,`${props.stageTransition?.staggerDelay||.1}s`),document.documentElement.style.setProperty(`--rectangle-rotate-rotation`,`${props.stageTransition?.rotation||270}deg`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`rectangle-rotate-transition`,style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex??100})},_cache$1[0]||=[createBaseVNode(`div`,{class:`rectangle rectangle-rotate-1`},[createBaseVNode(`div`)],-1),createBaseVNode(`div`,{class:`rectangle rectangle-rotate-2`},[createBaseVNode(`div`)],-1),createBaseVNode(`div`,{class:`rectangle rectangle-rotate-3`},[createBaseVNode(`div`)],-1)],4))}}),RectanglesRotateTransition_default=__plugin_vue_export_helper_default(RectanglesRotateTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-45ea2f7f`]]),StageTransitionGroup_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`StageTransitionGroup`,props:{primaryColor:{},secondaryColor:{},tertiaryColor:{},colors:{},zIndex:{},disableTransitions:{type:Boolean},usePageSpecificTransitions:{type:Boolean}},setup(__props){let props=__props,router$1=useRouter(),showTransition=ref(!1),transitionStage=ref(),activeTransitionName=ref(``),activeStageTransitionParams=ref(),transitions=shallowRef({slide:{component:SlideTransition_default,duration:2700},"slope-slide":{component:SlopeSlideTransition_default,duration:2700},arrow:{component:ArrowTransition_default,duration:2700},"multiple-blocks-reveal":{component:MultipleBlocksRevealTransition_default,duration:2800},"fantasy-fall":{component:FantasyFallTransition_default,duration:2700},"rectangles-rotate":{component:RectanglesRotateTransition_default,duration:2700},"bubble-wave-out":{component:BubbleWaveOutTransition_default,duration:1e3}}),lifecycleHooks=ref([]);function addTransitionHook(hook){return lifecycleHooks.value.push(hook),()=>{let index$1=lifecycleHooks.value.indexOf(hook);index$1>=0&&lifecycleHooks.value.splice(index$1,1)}}async function triggerHooks(stage,data$12={}){transitionStage.value=stage;for(let hook of lifecycleHooks.value)try{await Promise.resolve(hook(stage,data$12))}catch(error){console.error(`Error in transition hook at stage "${stage}":`,error)}}async function triggerTransitionAsyncFn(params,next,resolve$1){if(params.name===`none`||!params.name){next(),resolve$1();return}let transition=transitions.value[params.name];if(!transition){console.error(`Transition ${params.name} not found`),next(),resolve$1();return}let navTiming=transition.nextDelay===void 0?transition.duration/3:transition.nextDelay,hasNavigated=!1,navigationHook=stage=>{stage===`navigation`&&!hasNavigated&&(hasNavigated=!0,next())},removeNavHook=addTransitionHook(navigationHook);try{await triggerHooks(`before-enter`,{transitionName:params.name}),showTransition.value&&(await triggerHooks(`before-leave`,{transitionName:activeTransitionName.value}),activeTransitionName.value=``,activeStageTransitionParams.value=void 0,showTransition.value=!1,await triggerHooks(`after-leave`,{transitionName:activeTransitionName.value}),await new Promise(r$2=>setTimeout(r$2,50))),activeTransitionName.value=params.name,activeStageTransitionParams.value=params,showTransition.value=!0,await triggerHooks(`enter-active`,{transitionName:name}),setTimeout(async()=>{await triggerHooks(`navigation`,{transitionName:params.name,config:transition}),hasNavigated||(hasNavigated=!0,next())},navTiming),setTimeout(async()=>{await triggerHooks(`after-enter`,{transitionName:params.name})},transition.duration),setTimeout(async()=>{await triggerHooks(`before-leave`,{transitionName:params.name})},transition.duration+10),setTimeout(async()=>{await triggerHooks(`leave-active`,{transitionName:params.name})},transition.duration+20);let totalDuration=transition.exitDuration??0;setTimeout(async()=>{showTransition.value=!1,activeTransitionName.value=``,activeStageTransitionParams.value=void 0,await triggerHooks(`after-leave`,{transitionName:params.name}),resolve$1()},transition.duration+totalDuration)}catch(error){console.error(error)}finally{removeNavHook(),setTimeout(()=>{hasNavigated||(hasNavigated=!0,next())},transition.duration*2)}}function triggerTransition(params,next){return new Promise(resolve$1=>{triggerTransitionAsyncFn(params,next,resolve$1)})}return router$1.beforeEach((to$2,_from,next)=>{if(props.disableTransitions){next();return}if(typeof to$2.meta.stageTransition!=`object`){next();return}let stageTransition=to$2.meta.stageTransition;if(props.usePageSpecificTransitions&&stageTransition.pageSpecificAvailable){next();return}props.primaryColor!==void 0&&(stageTransition.primaryColor=props.primaryColor),props.secondaryColor!==void 0&&(stageTransition.secondaryColor=props.secondaryColor),props.tertiaryColor!==void 0&&(stageTransition.tertiaryColor=props.tertiaryColor),props.colors!==void 0&&(stageTransition.colors=props.colors),props.zIndex!==void 0&&(stageTransition.zIndex=props.zIndex),triggerTransition(stageTransition,next)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),showTransition.value?(openBlock(),createElementBlock(Fragment,{key:0},[transitions.value[activeTransitionName.value]?(openBlock(),createBlock(resolveDynamicComponent(transitions.value[activeTransitionName.value].component),{key:0,"stage-transition":activeStageTransitionParams.value},null,8,[`stage-transition`])):createCommentVNode(``,!0)],64)):createCommentVNode(``,!0)],64))}}),StageTransitionGroup_default=StageTransitionGroup_vue_vue_type_script_setup_true_lang_default;let toastsCounter=1;var Observer=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=subscriber=>(this.subscribers.push(subscriber),()=>{let index$1=this.subscribers.indexOf(subscriber);this.subscribers.splice(index$1,1)});publish=data$12=>{this.subscribers.forEach(subscriber=>subscriber(data$12))};addToast=data$12=>{this.publish(data$12),this.toasts=[...this.toasts,data$12]};create=data$12=>{let{message:message$1,...rest}=data$12,id$1=typeof data$12.id==`number`||data$12.id&&data$12.id?.length>0?data$12.id:toastsCounter++,alreadyExists=this.toasts.find(toast$1=>toast$1.id===id$1),dismissible=data$12.dismissible===void 0?!0:data$12.dismissible;return this.dismissedToasts.has(id$1)&&this.dismissedToasts.delete(id$1),alreadyExists?this.toasts=this.toasts.map(toast$1=>toast$1.id===id$1?(this.publish({...toast$1,...data$12,id:id$1,title:message$1}),{...toast$1,...data$12,id:id$1,dismissible,title:message$1}):toast$1):this.addToast({title:message$1,...rest,dismissible,id:id$1}),id$1};dismiss=id$1=>(id$1?(this.dismissedToasts.add(id$1),requestAnimationFrame(()=>this.subscribers.forEach(subscriber=>subscriber({id:id$1,dismiss:!0})))):this.toasts.forEach(toast$1=>{this.subscribers.forEach(subscriber=>subscriber({id:toast$1.id,dismiss:!0}))}),id$1);message=(message$1,data$12)=>this.create({...data$12,message:message$1,type:`default`});error=(message$1,data$12)=>this.create({...data$12,type:`error`,message:message$1});success=(message$1,data$12)=>this.create({...data$12,type:`success`,message:message$1});info=(message$1,data$12)=>this.create({...data$12,type:`info`,message:message$1});warning=(message$1,data$12)=>this.create({...data$12,type:`warning`,message:message$1});loading=(message$1,data$12)=>this.create({...data$12,type:`loading`,message:message$1});promise=(promise,data$12)=>{if(!data$12)return;let id$1;data$12.loading!==void 0&&(id$1=this.create({...data$12,promise,type:`loading`,message:data$12.loading,description:typeof data$12.description==`function`?void 0:data$12.description}));let p$5=Promise.resolve(promise instanceof Function?promise():promise),shouldDismiss=id$1!==void 0,result,originalPromise=p$5.then(async response=>{result=[`resolve`,response];let isVueComponent=isVNode(response);if(isVueComponent)shouldDismiss=!1,this.create({id:id$1,type:`default`,message:response});else if(isHttpResponse(response)&&!response.ok){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(`HTTP error! status: ${response.status}`):data$12.error,description=typeof data$12.description==`function`?await data$12.description(`HTTP error! status: ${response.status}`):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id$1||``};this.create({id:id$1,type:`error`,description,...toastSettings})}else if(response instanceof Error){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(response):data$12.error,description=typeof data$12.description==`function`?await data$12.description(response):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id$1||``};this.create({id:id$1,type:`error`,description,...toastSettings})}else if(data$12.success!==void 0){shouldDismiss=!1;let promiseData=typeof data$12.success==`function`?await data$12.success(response):data$12.success,description=typeof data$12.description==`function`?await data$12.description(response):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id$1||``};this.create({id:id$1,type:`success`,description,...toastSettings})}}).catch(async error=>{if(result=[`reject`,error],data$12.error!==void 0){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(error):data$12.error,description=typeof data$12.description==`function`?await data$12.description(error):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id$1||``};this.create({id:id$1,type:`error`,description,...toastSettings})}}).finally(()=>{shouldDismiss&&(this.dismiss(id$1),id$1=void 0),data$12.finally?.()}),unwrap=()=>new Promise((resolve$1,reject)=>originalPromise.then(()=>result[0]===`reject`?reject(result[1]):resolve$1(result[1])).catch(reject));return typeof id$1!=`string`&&typeof id$1!=`number`?{unwrap}:Object.assign(id$1,{unwrap})};custom=(component,data$12)=>{let id$1=data$12?.id||toastsCounter++;return this.publish({component,id:id$1,...data$12}),id$1};getActiveToasts=()=>this.toasts.filter(toast$1=>!this.dismissedToasts.has(toast$1.id))};const ToastState=new Observer;function toastFunction(message$1,data$12){let id$1=data$12?.id||toastsCounter++;return ToastState.create({message:message$1,id:id$1,type:`default`,...data$12}),id$1}const isHttpResponse=data$12=>data$12&&typeof data$12==`object`&&`ok`in data$12&&typeof data$12.ok==`boolean`&&`status`in data$12&&typeof data$12.status==`number`,basicToast=toastFunction,getHistory=()=>ToastState.toasts,getToasts=()=>ToastState.getActiveToasts(),toast=Object.assign(basicToast,{success:ToastState.success,info:ToastState.info,warning:ToastState.warning,error:ToastState.error,custom:ToastState.custom,message:ToastState.message,promise:ToastState.promise,dismiss:ToastState.dismiss,loading:ToastState.loading},{getHistory,getToasts});function isAction(action){return action.label!==void 0}const VISIBLE_TOASTS_AMOUNT=3,VIEWPORT_OFFSET=`24px`,MOBILE_VIEWPORT_OFFSET=`16px`,TOAST_LIFETIME=4e3,TOAST_WIDTH=356,GAP=14,SWIPE_THRESHOLD=45,TIME_BEFORE_UNMOUNT=200;function useIsDocumentHidden(){let isDocumentHidden=ref(!1);return watchEffect(()=>{let callback=()=>{isDocumentHidden.value=document.hidden};return document.addEventListener(`visibilitychange`,callback),()=>window.removeEventListener(`visibilitychange`,callback)}),{isDocumentHidden}}function cn(...classes){return classes.filter(Boolean).join(` `)}function getDefaultSwipeDirections(position$2){let[y$3,x$3]=position$2.split(`-`),directions=[];return y$3&&directions.push(y$3),x$3&&directions.push(x$3),directions}function assignOffset(defaultOffset$1,mobileOffset){let styles={};return[defaultOffset$1,mobileOffset].forEach((offset$2,index$1)=>{let isMobile=index$1===1,prefix=isMobile?`--mobile-offset`:`--offset`,defaultValue=isMobile?MOBILE_VIEWPORT_OFFSET:VIEWPORT_OFFSET;function assignAll(offset$1$1){[`top`,`right`,`bottom`,`left`].forEach(key$1=>{styles[`${prefix}-${key$1}`]=typeof offset$1$1==`number`?`${offset$1$1}px`:offset$1$1})}typeof offset$2==`number`||typeof offset$2==`string`?assignAll(offset$2):typeof offset$2==`object`?[`top`,`right`,`bottom`,`left`].forEach(key$1=>{offset$2[key$1]===void 0?styles[`${prefix}-${key$1}`]=defaultValue:styles[`${prefix}-${key$1}`]=typeof offset$2[key$1]==`number`?`${offset$2[key$1]}px`:offset$2[key$1]}):assignAll(defaultValue)}),styles}const _hoisted_1$7=[`data-rich-colors`,`data-styled`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-invert`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`],_hoisted_2$2=[`aria-label`,`data-disabled`];var Toast_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Toast`,props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:[`update:heights`,`update:height`,`removeToast`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,swipeDirection=ref(null),swipeOutDirection=ref(null),mounted=ref(!1),removed=ref(!1),swiping=ref(!1),swipeOut=ref(!1),swiped=ref(!1),offsetBeforeRemove=ref(0),initialHeight=ref(0),remainingTime=ref(props.toast.duration||props.duration||TOAST_LIFETIME),dragStartTime=ref(null),toastRef=ref(null),isFront=computed(()=>props.index===0),isVisible=computed(()=>props.index+1<=props.visibleToasts),toastType=computed(()=>props.toast.type),dismissible=computed(()=>props.toast.dismissible!==!1),toastClass=computed(()=>props.toast.class||``),toastDescriptionClass=computed(()=>props.descriptionClass||``),heightIndex=computed(()=>{let currentPosition=props.toast.position||props.position,samePositionHeights=props.heights.filter(h$3=>h$3.position===currentPosition),index$1=samePositionHeights.findIndex(height=>height.toastId===props.toast.id);return index$1>=0?index$1:0}),toastsHeightBefore=computed(()=>{let currentPosition=props.toast.position||props.position,samePositionHeights=props.heights.filter(h$3=>h$3.position===currentPosition);return samePositionHeights.reduce((prev,curr,reducerIndex)=>reducerIndex>=heightIndex.value?prev:prev+curr.height,0)}),offset$2=computed(()=>heightIndex.value*props.gap+toastsHeightBefore.value||0),closeButton=computed(()=>props.toast.closeButton??props.closeButton),duration=computed(()=>props.toast.duration||props.duration||TOAST_LIFETIME),closeTimerStartTimeRef=ref(0),lastCloseTimerStartTimeRef=ref(0),pointerStartRef=ref(null),coords$1=computed(()=>props.position.split(`-`)),y$3=computed(()=>coords$1.value[0]),x$3=computed(()=>coords$1.value[1]),isStringOfTitle=computed(()=>typeof props.toast.title!=`string`),isStringOfDescription=computed(()=>typeof props.toast.description!=`string`),{isDocumentHidden}=useIsDocumentHidden(),disabled=computed(()=>toastType.value&&toastType.value===`loading`);onMounted(()=>{mounted.value=!0,remainingTime.value=duration.value}),watchEffect(async()=>{if(!mounted.value||!toastRef.value)return;await nextTick();let toastNode=toastRef.value,originalHeight=toastNode.style.height;toastNode.style.height=`auto`;let newHeight=toastNode.getBoundingClientRect().height;toastNode.style.height=originalHeight,initialHeight.value=newHeight,emit$1(`update:height`,{toastId:props.toast.id,height:newHeight,position:props.toast.position||props.position})});function deleteToast(){removed.value=!0,offsetBeforeRemove.value=offset$2.value,setTimeout(()=>{emit$1(`removeToast`,props.toast)},TIME_BEFORE_UNMOUNT)}function handleCloseToast(){if(disabled.value||!dismissible.value)return{};deleteToast(),props.toast.onDismiss?.(props.toast)}function onPointerDown(event){disabled.value||!dismissible.value||(dragStartTime.value=new Date,offsetBeforeRemove.value=offset$2.value,event.target.setPointerCapture(event.pointerId),event.target.tagName!==`BUTTON`&&(swiping.value=!0,pointerStartRef.value={x:event.clientX,y:event.clientY}))}function onPointerUp(){if(swipeOut.value||!dismissible.value)return;pointerStartRef.value=null;let swipeAmountX=Number(toastRef.value?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),swipeAmountY=Number(toastRef.value?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),timeTaken=new Date().getTime()-(dragStartTime.value?.getTime()||0),swipeAmount=swipeDirection.value===`x`?swipeAmountX:swipeAmountY,velocity=Math.abs(swipeAmount)/timeTaken;if(Math.abs(swipeAmount)>=SWIPE_THRESHOLD||velocity>.11){offsetBeforeRemove.value=offset$2.value,props.toast.onDismiss?.(props.toast),swipeDirection.value===`x`?swipeOutDirection.value=swipeAmountX>0?`right`:`left`:swipeOutDirection.value=swipeAmountY>0?`down`:`up`,deleteToast(),swipeOut.value=!0;return}else toastRef.value?.style.setProperty(`--swipe-amount-x`,`0px`),toastRef.value?.style.setProperty(`--swipe-amount-y`,`0px`);swiped.value=!1,swiping.value=!1,swipeDirection.value=null}function onPointerMove(event){if(!pointerStartRef.value||!dismissible.value)return;let isHighlighted=window?.getSelection()?.toString()?.length??!1;if(isHighlighted)return;let yDelta=event.clientY-pointerStartRef.value.y,xDelta=event.clientX-pointerStartRef.value.x,swipeDirections=props.swipeDirections??getDefaultSwipeDirections(props.position);!swipeDirection.value&&(Math.abs(xDelta)>1||Math.abs(yDelta)>1)&&(swipeDirection.value=Math.abs(xDelta)>Math.abs(yDelta)?`x`:`y`);let swipeAmount={x:0,y:0},getDampening=delta=>{let factor$1=Math.abs(delta)/20;return 1/(1.5+factor$1)};if(swipeDirection.value===`y`){if(swipeDirections.includes(`top`)||swipeDirections.includes(`bottom`))if(swipeDirections.includes(`top`)&&yDelta<0||swipeDirections.includes(`bottom`)&&yDelta>0)swipeAmount.y=yDelta;else{let dampenedDelta=yDelta*getDampening(yDelta);swipeAmount.y=Math.abs(dampenedDelta)0)swipeAmount.x=xDelta;else{let dampenedDelta=xDelta*getDampening(xDelta);swipeAmount.x=Math.abs(dampenedDelta)0||Math.abs(swipeAmount.y)>0)&&(swiped.value=!0),toastRef.value?.style.setProperty(`--swipe-amount-x`,`${swipeAmount.x}px`),toastRef.value?.style.setProperty(`--swipe-amount-y`,`${swipeAmount.y}px`)}onMounted(()=>{if(mounted.value=!0,!toastRef.value)return;let height=toastRef.value.getBoundingClientRect().height;initialHeight.value=height;let newHeights=[{toastId:props.toast.id,height,position:props.toast.position},...props.heights];emit$1(`update:heights`,newHeights)}),onBeforeUnmount(()=>{toastRef.value&&emit$1(`removeToast`,props.toast)}),watchEffect(onInvalidate=>{if(props.toast.promise&&toastType.value===`loading`||props.toast.duration===1/0||props.toast.type===`loading`)return;let timeoutId,pauseTimer=()=>{if(lastCloseTimerStartTimeRef.value{remainingTime.value!==1/0&&(closeTimerStartTimeRef.value=new Date().getTime(),timeoutId=setTimeout(()=>{props.toast.onAutoClose?.(props.toast),deleteToast()},remainingTime.value))};props.expanded||props.interacting||isDocumentHidden.value?pauseTimer():startTimer(),onInvalidate(()=>{clearTimeout(timeoutId)})}),watch(()=>props.toast.delete,value$1=>{value$1!==void 0&&value$1&&deleteToast()},{deep:!0});function handleDragEnd(){swiping.value=!1,swipeDirection.value=null,pointerStartRef.value=null}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`li`,{tabindex:`0`,ref_key:`toastRef`,ref:toastRef,class:normalizeClass(unref(cn)(props.class,toastClass.value,_ctx.classes?.toast,_ctx.toast.classes?.toast,_ctx.classes?.[toastType.value],_ctx.toast?.classes?.[toastType.value])),"data-sonner-toast":``,"data-rich-colors":_ctx.toast.richColors??_ctx.defaultRichColors,"data-styled":!(_ctx.toast.component||_ctx.toast?.unstyled||_ctx.unstyled),"data-mounted":mounted.value,"data-promise":!!_ctx.toast.promise,"data-swiped":swiped.value,"data-removed":removed.value,"data-visible":isVisible.value,"data-y-position":y$3.value,"data-x-position":x$3.value,"data-index":_ctx.index,"data-front":isFront.value,"data-swiping":swiping.value,"data-dismissible":dismissible.value,"data-type":toastType.value,"data-invert":_ctx.toast.invert||_ctx.invert,"data-swipe-out":swipeOut.value,"data-swipe-direction":swipeOutDirection.value,"data-expanded":!!(_ctx.expanded||_ctx.expandByDefault&&mounted.value),style:normalizeStyle({"--index":_ctx.index,"--toasts-before":_ctx.index,"--z-index":_ctx.toasts.length-_ctx.index,"--offset":`${removed.value?offsetBeforeRemove.value:offset$2.value}px`,"--initial-height":_ctx.expandByDefault?`auto`:`${initialHeight.value}px`,..._ctx.style,...props.toast.style}),onDragend:handleDragEnd,onPointerdown:onPointerDown,onPointerup:onPointerUp,onPointermove:onPointerMove},[closeButton.value&&!_ctx.toast.component&&toastType.value!==`loading`?(openBlock(),createElementBlock(`button`,{key:0,"aria-label":_ctx.closeButtonAriaLabel||`Close toast`,"data-disabled":disabled.value,"data-close-button":`true`,class:normalizeClass(unref(cn)(_ctx.classes?.closeButton,_ctx.toast?.classes?.closeButton)),onClick:handleCloseToast},[_ctx.icons?.close?(openBlock(),createBlock(resolveDynamicComponent(_ctx.icons?.close),{key:0})):renderSlot(_ctx.$slots,`close-icon`,{key:1})],10,_hoisted_2$2)):createCommentVNode(`v-if`,!0),_ctx.toast.component?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.component),mergeProps({key:1},_ctx.toast.componentProps,{onCloseToast:handleCloseToast}),null,16)):(openBlock(),createElementBlock(Fragment,{key:2},[toastType.value!==`default`||_ctx.toast.icon||_ctx.toast.promise?(openBlock(),createElementBlock(`div`,{key:0,"data-icon":``,class:normalizeClass(unref(cn)(_ctx.classes?.icon,_ctx.toast?.classes?.icon))},[_ctx.toast.icon?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.icon),{key:0})):(openBlock(),createElementBlock(Fragment,{key:1},[toastType.value===`loading`?renderSlot(_ctx.$slots,`loading-icon`,{key:0}):toastType.value===`success`?renderSlot(_ctx.$slots,`success-icon`,{key:1}):toastType.value===`error`?renderSlot(_ctx.$slots,`error-icon`,{key:2}):toastType.value===`warning`?renderSlot(_ctx.$slots,`warning-icon`,{key:3}):toastType.value===`info`?renderSlot(_ctx.$slots,`info-icon`,{key:4}):createCommentVNode(`v-if`,!0)],64))],2)):createCommentVNode(`v-if`,!0),createBaseVNode(`div`,{"data-content":``,class:normalizeClass(unref(cn)(_ctx.classes?.content,_ctx.toast?.classes?.content))},[createBaseVNode(`div`,{"data-title":``,class:normalizeClass(unref(cn)(_ctx.classes?.title,_ctx.toast.classes?.title))},[isStringOfTitle.value?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.title),normalizeProps(mergeProps({key:0},_ctx.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(_ctx.toast.title),1)],64))],2),_ctx.toast.description?(openBlock(),createElementBlock(`div`,{key:0,"data-description":``,class:normalizeClass(unref(cn)(_ctx.descriptionClass,toastDescriptionClass.value,_ctx.classes?.description,_ctx.toast.classes?.description))},[isStringOfDescription.value?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.description),normalizeProps(mergeProps({key:0},_ctx.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(_ctx.toast.description),1)],64))],2)):createCommentVNode(`v-if`,!0)],2),_ctx.toast.cancel?(openBlock(),createElementBlock(`button`,{key:1,style:normalizeStyle(_ctx.toast.cancelButtonStyle||_ctx.cancelButtonStyle),class:normalizeClass(unref(cn)(_ctx.classes?.cancelButton,_ctx.toast.classes?.cancelButton)),"data-button":``,"data-cancel":``,onClick:_cache$1[0]||=event=>{unref(isAction)(_ctx.toast.cancel)&&dismissible.value&&(_ctx.toast.cancel.onClick?.(event),deleteToast())}},toDisplayString(unref(isAction)(_ctx.toast.cancel)?_ctx.toast.cancel?.label:_ctx.toast.cancel),7)):createCommentVNode(`v-if`,!0),_ctx.toast.action?(openBlock(),createElementBlock(`button`,{key:2,style:normalizeStyle(_ctx.toast.actionButtonStyle||_ctx.actionButtonStyle),class:normalizeClass(unref(cn)(_ctx.classes?.actionButton,_ctx.toast.classes?.actionButton)),"data-button":``,"data-action":``,onClick:_cache$1[1]||=event=>{unref(isAction)(_ctx.toast.action)&&(_ctx.toast.action.onClick?.(event),!event.defaultPrevented&&deleteToast())}},toDisplayString(unref(isAction)(_ctx.toast.action)?_ctx.toast.action?.label:_ctx.toast.action),7)):createCommentVNode(`v-if`,!0)],64))],46,_hoisted_1$7))}}),Toast_default=Toast_vue_vue_type_script_setup_true_lang_default,export_helper_default=(sfc,props)=>{let target$1=sfc.__vccOpts||sfc;for(let[key$1,val]of props)target$1[key$1]=val;return target$1};const _sfc_main$4={},_hoisted_1$6={xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stoke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`};function _sfc_render$4(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$6,_cache$1[0]||=[createBaseVNode(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1),createBaseVNode(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1)])}var CloseIcon_default=export_helper_default(_sfc_main$4,[[`render`,_sfc_render$4]]);const _hoisted_1$5=[`data-visible`],_hoisted_2$1={class:`sonner-spinner`};var Loader_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Loader`,props:{visible:{type:Boolean}},setup(__props){let bars=Array(12).fill(0);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`sonner-loading-wrapper`,"data-visible":_ctx.visible},[createBaseVNode(`div`,_hoisted_2$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(bars),bar=>(openBlock(),createElementBlock(`div`,{key:`spinner-bar-${bar}`,class:`sonner-loading-bar`}))),128))])],8,_hoisted_1$5))}}),Loader_default=Loader_vue_vue_type_script_setup_true_lang_default;const _sfc_main$3={},_hoisted_1$4={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$3(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$4,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,"clip-rule":`evenodd`},null,-1)])}var SuccessIcon_default=export_helper_default(_sfc_main$3,[[`render`,_sfc_render$3]]);const _sfc_main$2={},_hoisted_1$3={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$2(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$3,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,"clip-rule":`evenodd`},null,-1)])}var InfoIcon_default=export_helper_default(_sfc_main$2,[[`render`,_sfc_render$2]]);const _sfc_main$1={},_hoisted_1$2={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$1(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$2,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,"clip-rule":`evenodd`},null,-1)])}var WarningIcon_default=export_helper_default(_sfc_main$1,[[`render`,_sfc_render$1]]);const _sfc_main={},_hoisted_1$1={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$1,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,"clip-rule":`evenodd`},null,-1)])}var ErrorIcon_default=export_helper_default(_sfc_main,[[`render`,_sfc_render]]);const _hoisted_1=[`aria-label`],_hoisted_2=[`data-sonner-theme`,`dir`,`data-theme`,`data-rich-colors`,`data-y-position`,`data-x-position`,`data-lifted`],isClient=typeof window<`u`&&typeof document<`u`;function getDocumentDirection(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let dirAttribute=document.documentElement.getAttribute(`dir`);return dirAttribute===`auto`||!dirAttribute?window.getComputedStyle(document.documentElement).direction:dirAttribute}var Toaster_vue_vue_type_script_setup_true_lang_default=defineComponent({name:`Toaster`,inheritAttrs:!1,__name:`Toaster`,props:{invert:{type:Boolean,default:!1},theme:{default:`light`},position:{default:`bottom-right`},hotkey:{default:()=>[`altKey`,`KeyT`]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:GAP},visibleToasts:{default:VISIBLE_TOASTS_AMOUNT},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:``},style:{},offset:{default:VIEWPORT_OFFSET},mobileOffset:{default:MOBILE_VIEWPORT_OFFSET},dir:{default:`auto`},swipeDirections:{},icons:{},containerAriaLabel:{default:`Notifications`}},setup(__props){let props=__props,attrs=useAttrs(),toasts=ref([]);function filteredToasts(pos,index$1){return toasts.value.filter(toast$1=>!toast$1.position&&index$1===0||toast$1.position===pos)}let possiblePositions=computed(()=>{let posList=toasts.value.filter(toast$1=>toast$1.position).map(toast$1=>toast$1.position);return posList.length>0?Array.from(new Set([props.position].concat(posList))):[props.position]}),toastsByPosition=computed(()=>{let result={};return possiblePositions.value.forEach(pos=>{result[pos]=toasts.value.filter(t=>t.position===pos)}),result}),heights=ref([]),expanded=ref(!1),interacting=ref(!1),actualTheme=ref(props.theme===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:props.theme),listRef=ref(null),lastFocusedElementRef=ref(null),isFocusWithinRef=ref(!1),hotkeyLabel=props.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``);function removeToast(toastToRemove){toasts.value.find(toast$1=>toast$1.id===toastToRemove.id)?.delete||ToastState.dismiss(toastToRemove.id),toasts.value=toasts.value.filter(({id:id$1})=>id$1!==toastToRemove.id),setTimeout(()=>{toasts.value.find(t=>t.id===toastToRemove.id)||(heights.value=heights.value.filter(h$3=>h$3.toastId!==toastToRemove.id))},TIME_BEFORE_UNMOUNT+50)}function onBlur(event){isFocusWithinRef.value&&!event.currentTarget?.contains?.(event.relatedTarget)&&(isFocusWithinRef.value=!1,lastFocusedElementRef.value&&(lastFocusedElementRef.value.focus({preventScroll:!0}),lastFocusedElementRef.value=null))}function onFocus(event){let isNotDismissible=event.target instanceof HTMLElement&&event.target.dataset.dismissible===`false`;isNotDismissible||isFocusWithinRef.value||(isFocusWithinRef.value=!0,lastFocusedElementRef.value=event.relatedTarget)}function onPointerDown(event){if(event.target){let isNotDismissible=event.target instanceof HTMLElement&&event.target.dataset.dismissible===`false`;if(isNotDismissible)return}interacting.value=!0}watchEffect(onInvalidate=>{let unsubscribe=ToastState.subscribe(toast$1=>{if(toast$1.dismiss){requestAnimationFrame(()=>{toasts.value=toasts.value.map(t=>t.id===toast$1.id?{...t,delete:!0}:t)});return}nextTick(()=>{let indexOfExistingToast=toasts.value.findIndex(t=>t.id===toast$1.id);indexOfExistingToast===-1?toasts.value=[toast$1,...toasts.value]:toasts.value=[...toasts.value.slice(0,indexOfExistingToast),{...toasts.value[indexOfExistingToast],...toast$1},...toasts.value.slice(indexOfExistingToast+1)]})});onInvalidate(unsubscribe)}),watchEffect(onInvalidate=>{if(typeof window>`u`)return;if(props.theme!==`system`){actualTheme.value=props.theme;return}let darkMediaQuery=window.matchMedia(`(prefers-color-scheme: dark)`),updateTheme=matches$1=>{actualTheme.value=matches$1?`dark`:`light`};updateTheme(darkMediaQuery.matches);let handler=event=>{updateTheme(event.matches)};try{darkMediaQuery.addEventListener(`change`,handler)}catch{darkMediaQuery.addListener(handler)}onInvalidate(()=>{try{darkMediaQuery.removeEventListener(`change`,handler)}catch{darkMediaQuery.removeListener(handler)}})}),watchEffect(()=>{listRef.value&&lastFocusedElementRef.value&&(lastFocusedElementRef.value.focus({preventScroll:!0}),lastFocusedElementRef.value=null,isFocusWithinRef.value=!1)}),watchEffect(()=>{toasts.value.length<=1&&(expanded.value=!1)}),watchEffect(onInvalidate=>{function handleKeyDown(event){let isHotkeyPressed=props.hotkey.every(key$1=>event[key$1]||event.code===key$1),listRefItem=Array.isArray(listRef.value)?listRef.value[0]:listRef.value;isHotkeyPressed&&(expanded.value=!0,listRefItem?.focus());let isItemActive=document.activeElement===listRef.value||listRefItem?.contains(document.activeElement);event.code===`Escape`&&isItemActive&&(expanded.value=!1)}isClient&&(document.addEventListener(`keydown`,handleKeyDown),onInvalidate(()=>{document.removeEventListener(`keydown`,handleKeyDown)}))});function handleMouseEnter(){expanded.value=!0}function handleMouseLeave(){interacting.value||(expanded.value=!1)}function handleDragEnd(){expanded.value=!1}function handlePointerUp(){interacting.value=!1}function updateHeights(h$3){heights.value=h$3}function updateHeight(h$3){let index$1=heights.value.findIndex(item=>item.toastId===h$3.toastId);if(index$1!==-1)heights.value[index$1]=h$3;else{let samePositionIndex=heights.value.findIndex(item=>item.position===h$3.position);samePositionIndex===-1?heights.value.unshift(h$3):heights.value.splice(samePositionIndex,0,h$3)}}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createCommentVNode(` Remove item from normal navigation flow, only available via hotkey `),createBaseVNode(`section`,{"aria-label":`${_ctx.containerAriaLabel} ${unref(hotkeyLabel)}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(possiblePositions.value,(pos,index$1)=>(openBlock(),createElementBlock(`ol`,mergeProps({key:pos,ref_for:!0,ref_key:`listRef`,ref:listRef,"data-sonner-toaster":``,"data-sonner-theme":actualTheme.value,class:props.class,dir:_ctx.dir===`auto`?getDocumentDirection():_ctx.dir,tabIndex:-1,"data-theme":_ctx.theme,"data-rich-colors":_ctx.richColors,"data-y-position":pos.split(`-`)[0],"data-x-position":pos.split(`-`)[1],"data-lifted":expanded.value&&toasts.value.length>1&&!_ctx.expand,style:{"--front-toast-height":`${heights.value[0]?.height||0}px`,"--width":`${unref(TOAST_WIDTH)}px`,"--gap":`${_ctx.gap}px`,..._ctx.style,...unref(attrs).style,...unref(assignOffset)(_ctx.offset,_ctx.mobileOffset)}},_ctx.$attrs,{onBlur,onFocus,onMouseenter:handleMouseEnter,onMousemove:handleMouseEnter,onMouseleave:handleMouseLeave,onDragend:handleDragEnd,onPointerdown:onPointerDown,onPointerup:handlePointerUp}),[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredToasts(pos,index$1),(toast$1,idx)=>(openBlock(),createBlock(Toast_default,{key:toast$1.id,heights:heights.value,icons:_ctx.icons,index:idx,toast:toast$1,defaultRichColors:_ctx.richColors,duration:_ctx.toastOptions?.duration??_ctx.duration,class:normalizeClass(_ctx.toastOptions?.class??``),descriptionClass:_ctx.toastOptions?.descriptionClass,invert:_ctx.invert,visibleToasts:_ctx.visibleToasts,closeButton:_ctx.toastOptions?.closeButton??_ctx.closeButton,interacting:interacting.value,position:pos,style:normalizeStyle(_ctx.toastOptions?.style),unstyled:_ctx.toastOptions?.unstyled,classes:_ctx.toastOptions?.classes,cancelButtonStyle:_ctx.toastOptions?.cancelButtonStyle,actionButtonStyle:_ctx.toastOptions?.actionButtonStyle,"close-button-aria-label":_ctx.toastOptions?.closeButtonAriaLabel,toasts:toastsByPosition.value[pos],expandByDefault:_ctx.expand,gap:_ctx.gap,expanded:expanded.value,swipeDirections:props.swipeDirections,"onUpdate:heights":updateHeights,"onUpdate:height":updateHeight,onRemoveToast:removeToast},{"close-icon":withCtx(()=>[renderSlot(_ctx.$slots,`close-icon`,{},()=>[createVNode(CloseIcon_default)])]),"loading-icon":withCtx(()=>[renderSlot(_ctx.$slots,`loading-icon`,{},()=>[createVNode(Loader_default,{visible:toast$1.type===`loading`},null,8,[`visible`])])]),"success-icon":withCtx(()=>[renderSlot(_ctx.$slots,`success-icon`,{},()=>[createVNode(SuccessIcon_default)])]),"error-icon":withCtx(()=>[renderSlot(_ctx.$slots,`error-icon`,{},()=>[createVNode(ErrorIcon_default)])]),"warning-icon":withCtx(()=>[renderSlot(_ctx.$slots,`warning-icon`,{},()=>[createVNode(WarningIcon_default)])]),"info-icon":withCtx(()=>[renderSlot(_ctx.$slots,`info-icon`,{},()=>[createVNode(InfoIcon_default)])]),_:2},1032,[`heights`,`icons`,`index`,`toast`,`defaultRichColors`,`duration`,`class`,`descriptionClass`,`invert`,`visibleToasts`,`closeButton`,`interacting`,`position`,`style`,`unstyled`,`classes`,`cancelButtonStyle`,`actionButtonStyle`,`close-button-aria-label`,`toasts`,`expandByDefault`,`gap`,`expanded`,`swipeDirections`]))),128))],16,_hoisted_2))),128))],8,_hoisted_1)],2112))}}),Toaster_default=Toaster_vue_vue_type_script_setup_true_lang_default;const usePWAStore=defineStore(`pwa`,()=>{let updateReadyHooks=ref([]),breakpoints=useBreakpoints(breakpointsTailwind),isMobile=breakpoints.smaller(`md`);onMounted(async()=>{})});var App_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`App`,setup(__props){usePWAStore();let i18n$1=useI18n(),settings=storeToRefs(useSettings()),onboardingStore=useOnboardingStore(),{shouldShowSetup}=storeToRefs(onboardingStore),isDark=useDark(),primaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 90%, oklch(90% 0 360))`),secondaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 90%, oklch(90% 0 360))`),tertiaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 90%, oklch(90% 0 360))`),colors=computed(()=>[primaryColor.value,secondaryColor.value,tertiaryColor.value,isDark.value?`#121212`:`#FFFFFF`]);watch(settings.language,()=>{i18n$1.locale.value=settings.language.value}),watch(settings.themeColorsHue,()=>{document.documentElement.style.setProperty(`--chromatic-hue`,settings.themeColorsHue.value.toString())},{immediate:!0}),watch(settings.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle(`dynamic-hue`,settings.themeColorsHueDynamic.value)},{immediate:!0}),onMounted(()=>{onboardingStore.initializeSetupCheck()});function handleSetupConfigured(){onboardingStore.markSetupCompleted()}function handleSetupSkipped(){onboardingStore.markSetupSkipped()}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(StageTransitionGroup_default),{"primary-color":primaryColor.value,"secondary-color":secondaryColor.value,"tertiary-color":tertiaryColor.value,colors:colors.value,"z-index":100,"disable-transitions":unref(settings).disableTransitions.value,"use-page-specific-transitions":unref(settings).usePageSpecificTransitions.value},{default:withCtx(()=>[createVNode(unref(RouterView),null,{default:withCtx(({Component})=>[(openBlock(),createBlock(KeepAlive,{include:/IndexScenePage|StageScenePage/},[(openBlock(),createBlock(resolveDynamicComponent(Component)))],1024))]),_:1})]),_:1},8,[`primary-color`,`secondary-color`,`tertiary-color`,`colors`,`disable-transitions`,`use-page-specific-transitions`]),createVNode(unref(ToasterRoot_default),{onClose:_cache$1[0]||=id$1=>unref(toast).dismiss(id$1)},{default:withCtx(()=>[createVNode(unref(Toaster_default))]),_:1}),createVNode(unref(OnboardingDialog_default),{modelValue:unref(shouldShowSetup),"onUpdate:modelValue":_cache$1[1]||=$event=>isRef(shouldShowSetup)?shouldShowSetup.value=$event:null,onConfigured:handleSetupConfigured,onSkipped:handleSetupSkipped},null,8,[`modelValue`])],64))}}),App_default=App_vue_vue_type_script_setup_true_lang_default,data$11={prompt:{prefix:`(from Neko Ayaka) Good morning! You are finally awake. +Defaulting to \`null\`.`),null)}function lf(a$2){return $o(a$2)&&!Number.isNaN(a$2)&&a$2>0?a$2:(console.error(`Invalid prop \`max\` of value \`${a$2}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ca}\`.`),ca)}const Ry=defineComponent({__name:`ProgressRoot`,props:{modelValue:{},max:{default:ca},getValueLabel:{type:Function,default:(a$2,t)=>`${Math.round(a$2/t*ca)}%`},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`update:max`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t;R$1();let l$1=ne(e$3,`modelValue`,n$2,{passive:e$3.modelValue===void 0}),s$1=ne(e$3,`max`,n$2,{passive:e$3.max===void 0});watch(()=>l$1.value,async i$1=>{let u$1=of(i$1,e$3.max);u$1!==i$1&&(await nextTick(),l$1.value=u$1)},{immediate:!0}),watch(()=>e$3.max,i$1=>{let u$1=lf(e$3.max);u$1!==i$1&&(s$1.value=u$1)},{immediate:!0});let r$2=computed(()=>ht$1(l$1.value)?`indeterminate`:l$1.value===s$1.value?`complete`:`loading`);return nf({modelValue:l$1,max:s$1,progressState:r$2}),(i$1,u$1)=>(openBlock(),createBlock(unref(O$1),{"as-child":i$1.asChild,as:i$1.as,"aria-valuemax":unref(s$1),"aria-valuemin":0,"aria-valuenow":$o(unref(l$1))?unref(l$1):void 0,"aria-valuetext":i$1.getValueLabel(unref(l$1),unref(s$1)),"aria-label":i$1.getValueLabel(unref(l$1),unref(s$1)),role:`progressbar`,"data-state":r$2.value,"data-value":unref(l$1)??void 0,"data-max":unref(s$1)},{default:withCtx(()=>[renderSlot(i$1.$slots,`default`,{modelValue:unref(l$1)})]),_:3},8,[`as-child`,`as`,`aria-valuemax`,`aria-valuenow`,`aria-valuetext`,`aria-label`,`data-state`,`data-value`,`data-max`]))}}),Ay=defineComponent({__name:`ProgressIndicator`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=af();return R$1(),(n$2,l$1)=>{var s$1;return openBlock(),createBlock(unref(O$1),mergeProps(t,{"data-state":unref(e$3).progressState.value,"data-value":(s$1=unref(e$3).modelValue)?.value??void 0,"data-max":unref(e$3).max.value}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`data-state`,`data-value`,`data-max`])}}}),[sf,rf]=te(`RadioGroupRoot`),Oy=defineComponent({__name:`RadioGroupRoot`,props:{modelValue:{},defaultValue:{},disabled:{type:Boolean,default:!1},name:{},required:{type:Boolean,default:!1},orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{forwardRef:l$1}=R$1(),s$1=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.modelValue===void 0}),{disabled:r$2,loop:i$1,orientation:u$1,name:d$2,required:c$4,dir:f$3}=toRefs(e$3),v$2=we(f$3);return rf({modelValue:s$1,changeModelValue:p$5=>{s$1.value=p$5},disabled:r$2,loop:i$1,orientation:u$1,name:d$2?.value,required:c$4}),(p$5,g$2)=>(openBlock(),createBlock(unref(Ft),{"as-child":``,orientation:unref(u$1),dir:unref(v$2),loop:unref(i$1)},{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(l$1),role:`radiogroup`,"data-disabled":unref(r$2)?``:void 0,"as-child":p$5.asChild,as:p$5.as,required:unref(c$4),"aria-orientation":unref(u$1),"aria-required":unref(c$4),dir:unref(v$2),name:unref(d$2)},{default:withCtx(()=>[renderSlot(p$5.$slots,`default`,{modelValue:unref(s$1)})]),_:3},8,[`data-disabled`,`as-child`,`as`,`required`,`aria-orientation`,`aria-required`,`dir`,`name`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),uf=[`value`,`checked`,`name`,`disabled`,`required`],df=defineComponent({__name:`Radio`,props:{id:{},value:{},disabled:{type:Boolean,default:!1},required:{type:Boolean},checked:{type:Boolean,default:void 0},name:{},asChild:{type:Boolean},as:{default:`button`}},emits:[`update:checked`],setup(a$2,{emit:t}){let e$3=a$2,l$1=ne(e$3,`checked`,t,{passive:e$3.checked===void 0}),{value:s$1}=toRefs(e$3),{forwardRef:r$2,currentElement:i$1}=R$1(),u$1=at(i$1),d$2=computed(()=>{var f$3;return e$3.id&&i$1.value?(f$3=document.querySelector(`[for="${e$3.id}"]`))?.innerText??e$3.value:void 0});function c$4(f$3){l$1.value=!0,u$1.value&&f$3.stopPropagation()}return(f$3,v$2)=>(openBlock(),createBlock(unref(O$1),mergeProps(f$3.$attrs,{id:f$3.id,ref:unref(r$2),role:`radio`,type:f$3.as===`button`?`button`:void 0,as:f$3.as,"aria-checked":unref(l$1),"aria-label":d$2.value,"as-child":f$3.asChild,disabled:f$3.disabled?``:void 0,"data-state":unref(l$1)?`checked`:`unchecked`,"data-disabled":f$3.disabled?``:void 0,value:unref(s$1),required:f$3.required,name:f$3.name,onClick:withModifiers(c$4,[`stop`])}),{default:withCtx(()=>[renderSlot(f$3.$slots,`default`,{checked:unref(l$1)}),unref(u$1)?(openBlock(),createElementBlock(`input`,{key:0,type:`radio`,tabindex:`-1`,"aria-hidden":`true`,value:unref(s$1),checked:!!unref(l$1),name:f$3.name,disabled:f$3.disabled,required:f$3.required,style:{transform:`translateX(-100%)`,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}},null,8,uf)):createCommentVNode(``,!0)]),_:3},16,[`id`,`type`,`as`,`aria-checked`,`aria-label`,`as-child`,`disabled`,`data-state`,`data-disabled`,`value`,`required`,`name`]))}}),[cf,ff]=te(`RadioGroupItem`),ky=defineComponent({inheritAttrs:!1,__name:`RadioGroupItem`,props:{id:{},value:{},disabled:{type:Boolean,default:!1},required:{type:Boolean},name:{},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,{forwardRef:e$3,currentElement:n$2}=R$1(),l$1=sf(),s$1=computed(()=>l$1.disabled.value||t.disabled),r$2=computed(()=>l$1.required.value||t.required),i$1=computed(()=>{var f$3;return(f$3=l$1.modelValue)?.value===t.value});ff({disabled:s$1,checked:i$1});let u$1=ref(!1),d$2=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`];He(`keydown`,f$3=>{d$2.includes(f$3.key)&&(u$1.value=!0)}),He(`keyup`,()=>{u$1.value=!1});function c$4(){setTimeout(()=>{var f$3;u$1.value&&((f$3=n$2.value)==null||f$3.click())},0)}return(f$3,v$2)=>(openBlock(),createBlock(unref(Nt$1),{checked:i$1.value,disabled:s$1.value,"as-child":``,focusable:!s$1.value,active:i$1.value},{default:withCtx(()=>[createVNode(df,mergeProps({...f$3.$attrs,...t},{ref:unref(e$3),checked:i$1.value,required:r$2.value,disabled:s$1.value,"onUpdate:checked":v$2[0]||=p$5=>unref(l$1).changeModelValue(f$3.value),onKeydown:v$2[1]||=withKeys(withModifiers(()=>{},[`prevent`]),[`enter`]),onFocus:c$4}),{default:withCtx(()=>[renderSlot(f$3.$slots,`default`)]),_:3},16,[`checked`,`required`,`disabled`])]),_:3},8,[`checked`,`disabled`,`focusable`,`active`]))}}),My=defineComponent({__name:`RadioGroupIndicator`,props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let{forwardRef:t}=R$1(),e$3=cf();return(n$2,l$1)=>(openBlock(),createBlock(unref(Pe),{present:n$2.forceMount||unref(e$3).checked.value},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps({ref:unref(t),"data-state":unref(e$3).checked.value?`checked`:`unchecked`,"data-disabled":unref(e$3).disabled.value?``:void 0,"as-child":n$2.asChild,as:n$2.as},n$2.$attrs),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`data-state`,`data-disabled`,`as-child`,`as`])]),_:3},8,[`present`]))}});function pf(a$2){let t=computed(()=>a$2.start.value?!!a$2.isDateDisabled(a$2.start.value):!1),e$3=computed(()=>a$2.end.value?!!a$2.isDateDisabled(a$2.end.value):!1),n$2=computed(()=>t.value||e$3.value?!1:!!(a$2.start.value&&a$2.end.value&&q(a$2.end.value,a$2.start.value))),l$1=c$4=>a$2.start.value?$14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2.start.value,c$4):!1,s$1=c$4=>a$2.end.value?$14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2.end.value,c$4):!1,r$2=c$4=>a$2.start.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2.start.value,c$4)||a$2.end.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(a$2.end.value,c$4)?!0:a$2.end.value&&a$2.start.value?v(c$4,a$2.start.value,a$2.end.value):!1,i$1=computed(()=>{if(a$2.start.value&&a$2.end.value||!a$2.start.value||!a$2.focusedValue.value)return null;let c$4=q(a$2.start.value,a$2.focusedValue.value),f$3=c$4?a$2.start.value:a$2.focusedValue.value,v$2=c$4?a$2.focusedValue.value:a$2.start.value;return $14e0f24ef4ac5c92$export$ea39ec197993aef0(f$3,v$2)||b(f$3,v$2,a$2.isDateUnavailable,a$2.isDateDisabled)?{start:f$3,end:v$2}:null});return{isInvalid:n$2,isSelected:r$2,highlightedRange:i$1,isSelectionStart:l$1,isSelectionEnd:s$1,isHighlightedStart:c$4=>!i$1.value||!i$1.value.start?!1:$14e0f24ef4ac5c92$export$ea39ec197993aef0(i$1.value.start,c$4),isHighlightedEnd:c$4=>!i$1.value||!i$1.value.end?!1:$14e0f24ef4ac5c92$export$ea39ec197993aef0(i$1.value.end,c$4)}}const vf={style:{border:`0px`,clip:`rect(0px, 0px, 0px, 0px)`,"clip-path":`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0px`,position:`absolute`,"white-space":`nowrap`,width:`1px`}},mf={role:`heading`,"aria-level":`2`},[na,hf]=te(`RangeCalendarRoot`),yf=defineComponent({__name:`RangeCalendarRoot`,props:{defaultPlaceholder:{},defaultValue:{default:()=>({start:void 0,end:void 0})},modelValue:{},placeholder:{default:void 0},pagedNavigation:{type:Boolean,default:!1},preventDeselect:{type:Boolean,default:!1},weekStartsOn:{default:0},weekdayFormat:{default:`narrow`},calendarLabel:{},fixedWeeks:{type:Boolean,default:!1},maxValue:{},minValue:{},locale:{default:`en`},numberOfMonths:{default:1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},initialFocus:{type:Boolean,default:!1},isDateDisabled:{type:Function,default:void 0},isDateUnavailable:{type:Function,default:void 0},dir:{},nextPage:{},prevPage:{},asChild:{type:Boolean},as:{default:`div`}},emits:[`update:modelValue`,`update:placeholder`,`update:startValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{disabled:l$1,readonly:s$1,initialFocus:r$2,pagedNavigation:i$1,weekStartsOn:u$1,weekdayFormat:d$2,fixedWeeks:c$4,numberOfMonths:f$3,preventDeselect:v$2,isDateUnavailable:p$5,isDateDisabled:g$2,calendarLabel:m$3,maxValue:_$2,minValue:C$3,locale:$$2,dir:h$3,nextPage:E$2,prevPage:P$2}=toRefs(e$3),{primitiveElement:D$1,currentElement:I}=Re(),M$1=we(h$3),V$2=ref(),A$2=ref(),F$2=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue??{start:void 0,end:void 0},passive:e$3.modelValue===void 0}),j$1=Yt({defaultPlaceholder:e$3.placeholder,defaultValue:F$2.value.start,locale:e$3.locale}),H$3=ref(F$2.value.start),Q$3=ref(F$2.value.end),G$2=ne(e$3,`placeholder`,n$2,{defaultValue:e$3.defaultPlaceholder??j$1.copy(),passive:e$3.placeholder===void 0});function J$2(he$2){G$2.value=he$2.copy()}let{fullCalendarLabel:z$3,headingValue:K$1,isDateDisabled:L$1,isDateUnavailable:N$2,isNextButtonDisabled:Z$1,isPrevButtonDisabled:Y$2,grid:re$3,weekdays:X$2,isOutsideVisibleView:se$1,nextPage:fe$2,prevPage:xe,formatter:Ee$2}=Jl({locale:$$2,placeholder:G$2,weekStartsOn:u$1,fixedWeeks:c$4,numberOfMonths:f$3,minValue:C$3,maxValue:_$2,disabled:l$1,weekdayFormat:d$2,pagedNavigation:i$1,isDateDisabled:g$2.value,isDateUnavailable:p$5.value,calendarLabel:m$3,nextPage:E$2,prevPage:P$2}),{isInvalid:be$2,isSelected:de$3,highlightedRange:Ie,isSelectionStart:Ae$1,isSelectionEnd:We,isHighlightedStart:Et$2,isHighlightedEnd:yr$1}=pf({start:H$3,end:Q$3,isDateDisabled:L$1,isDateUnavailable:N$2,focusedValue:A$2});return watch(F$2,he$2=>{var Ne$1,Ve$1,Ea,Fo;(!he$2||!he$2.start||H$3.value&&!$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(he$2.start,H$3.value))&&(H$3.value=(Ve$1=(Ne$1=he$2?.start)?.copy)?.call(Ne$1)),(!he$2||!he$2.end||Q$3.value&&!$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(he$2.end,Q$3.value))&&(Q$3.value=(Fo=(Ea=he$2?.end)?.copy)?.call(Ea))}),watch(H$3,he$2=>{he$2&&!$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(he$2,G$2.value)&&J$2(he$2),n$2(`update:startValue`,he$2)}),watch([H$3,Q$3],([he$2,Ne$1])=>{let Ve$1=F$2.value;if(!(Ve$1&&Ve$1.start&&Ve$1.end&&he$2&&Ne$1&&$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(Ve$1.start,he$2)&&$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(Ve$1.end,Ne$1)))if(he$2&&Ne$1){if(Ve$1.start&&Ve$1.end&&$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(Ve$1.start,he$2)&&$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(Ve$1.end,Ne$1))return;q(Ne$1,he$2)?F$2.value={start:Ne$1.copy(),end:he$2.copy()}:F$2.value={start:he$2.copy(),end:Ne$1.copy()}}else Ve$1.start&&Ve$1.end&&(F$2.value={start:he$2?.copy(),end:void 0})}),hf({isDateUnavailable:N$2,startValue:H$3,endValue:Q$3,formatter:Ee$2,modelValue:F$2,placeholder:G$2,disabled:l$1,initialFocus:r$2,pagedNavigation:i$1,weekStartsOn:u$1,weekdayFormat:d$2,fixedWeeks:c$4,numberOfMonths:f$3,readonly:s$1,preventDeselect:v$2,fullCalendarLabel:z$3,headingValue:K$1,isInvalid:be$2,isDateDisabled:L$1,highlightedRange:Ie,focusedValue:A$2,lastPressedDateValue:V$2,isSelected:de$3,isSelectionEnd:We,isSelectionStart:Ae$1,isNextButtonDisabled:Z$1,isPrevButtonDisabled:Y$2,isOutsideVisibleView:se$1,nextPage:fe$2,prevPage:xe,parentElement:I,onPlaceholderChange:J$2,locale:$$2,dir:M$1,isHighlightedStart:Et$2,isHighlightedEnd:yr$1}),onMounted(()=>{r$2.value&&Pl(I.value)}),(he$2,Ne$1)=>(openBlock(),createBlock(unref(O$1),{ref_key:`primitiveElement`,ref:D$1,as:he$2.as,"as-child":he$2.asChild,role:`application`,"aria-label":unref(z$3),"data-readonly":unref(s$1)?``:void 0,"data-disabled":unref(l$1)?``:void 0,"data-invalid":unref(be$2)?``:void 0,dir:unref(M$1)},{default:withCtx(()=>[createBaseVNode(`div`,vf,[createBaseVNode(`div`,mf,toDisplayString(unref(z$3)),1)]),renderSlot(he$2.$slots,`default`,{date:unref(G$2),grid:unref(re$3),weekDays:unref(X$2),weekStartsOn:unref(u$1),locale:unref($$2),fixedWeeks:unref(c$4)})]),_:3},8,[`as`,`as-child`,`aria-label`,`data-readonly`,`data-disabled`,`data-invalid`,`dir`]))}}),gf=defineComponent({__name:`RangeCalendarHeader`,props:{asChild:{type:Boolean},as:{default:`div`}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),bf=defineComponent({__name:`RangeCalendarHeading`,props:{asChild:{type:Boolean},as:{default:`div`}},setup(a$2){let t=a$2,e$3=na();return(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{"data-disabled":unref(e$3).disabled.value?``:void 0}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`,{headingValue:unref(e$3).headingValue.value},()=>[createTextVNode(toDisplayString(unref(e$3).headingValue.value),1)])]),_:3},16,[`data-disabled`]))}}),Cf=defineComponent({__name:`RangeCalendarGrid`,props:{asChild:{type:Boolean},as:{default:`table`}},setup(a$2){let t=a$2,e$3=na(),n$2=computed(()=>e$3.disabled.value?!0:void 0),l$1=computed(()=>e$3.readonly.value?!0:void 0);return(s$1,r$2)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{tabindex:`-1`,role:`grid`,"aria-readonly":l$1.value,"aria-disabled":n$2.value,"data-readonly":l$1.value&&``,"data-disabled":n$2.value&&``}),{default:withCtx(()=>[renderSlot(s$1.$slots,`default`)]),_:3},16,[`aria-readonly`,`aria-disabled`,`data-readonly`,`data-disabled`]))}}),wf=defineComponent({__name:`RangeCalendarCell`,props:{date:{},asChild:{type:Boolean},as:{default:`td`}},setup(a$2){let t=na();return(e$3,n$2)=>{var l$1,s$1;return openBlock(),createBlock(unref(O$1),{as:e$3.as,"as-child":e$3.asChild,role:`gridcell`,"aria-selected":unref(t).isSelected(e$3.date)?!0:void 0,"aria-disabled":unref(t).isDateDisabled(e$3.date)||(s$1=(l$1=unref(t)).isDateUnavailable)?.call(l$1,e$3.date),"data-disabled":unref(t).isDateDisabled(e$3.date)?``:void 0},{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-selected`,`aria-disabled`,`data-disabled`])}}}),_f=defineComponent({__name:`RangeCalendarHeadCell`,props:{asChild:{type:Boolean},as:{default:`th`}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),xf=defineComponent({__name:`RangeCalendarNext`,props:{step:{},nextPage:{},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=computed(()=>n$2.disabled.value||n$2.isNextButtonDisabled(t.step,t.nextPage)),n$2=na();return(l$1,s$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{"aria-label":`Next page`,type:l$1.as===`button`?`button`:void 0,"aria-disabled":e$3.value||void 0,"data-disabled":e$3.value||void 0,disabled:e$3.value,onClick:s$1[0]||=r$2=>unref(n$2).nextPage(t.step,t.nextPage)}),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`,{},()=>[createTextVNode(`Next page`)])]),_:3},16,[`type`,`aria-disabled`,`data-disabled`,`disabled`]))}}),Sf=defineComponent({__name:`RangeCalendarPrev`,props:{step:{},prevPage:{},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=computed(()=>n$2.disabled.value||n$2.isPrevButtonDisabled(t.step,t.prevPage)),n$2=na();return(l$1,s$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{"aria-label":`Previous page`,type:l$1.as===`button`?`button`:void 0,"aria-disabled":e$3.value||void 0,"data-disabled":e$3.value||void 0,disabled:e$3.value,onClick:s$1[0]||=r$2=>unref(n$2).prevPage(t.step,t.prevPage)}),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`,{},()=>[createTextVNode(`Prev page`)])]),_:3},16,[`type`,`aria-disabled`,`data-disabled`,`disabled`]))}}),Ef=defineComponent({__name:`RangeCalendarGridHead`,props:{asChild:{type:Boolean},as:{default:`thead`}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{"aria-hidden":`true`}),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),Pf=defineComponent({__name:`RangeCalendarGridBody`,props:{asChild:{type:Boolean},as:{default:`tbody`}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),Df=defineComponent({__name:`RangeCalendarGridRow`,props:{asChild:{type:Boolean},as:{default:`tr`}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),$f=defineComponent({__name:`RangeCalendarCellTrigger`,props:{day:{},month:{},asChild:{type:Boolean},as:{default:`div`}},setup(a$2){let t=a$2,e$3=na(),n$2=nt(),{primitiveElement:l$1,currentElement:s$1}=Re(),r$2=computed(()=>e$3.formatter.custom($(t.day),{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`})),i$1=computed(()=>e$3.isDateDisabled(t.day)),u$1=computed(()=>{var V$2;return(V$2=e$3.isDateUnavailable)?.call(e$3,t.day)}),d$2=computed(()=>e$3.isSelected(t.day)),c$4=computed(()=>e$3.isSelectionStart(t.day)),f$3=computed(()=>e$3.isSelectionEnd(t.day)),v$2=computed(()=>e$3.isHighlightedStart(t.day)),p$5=computed(()=>e$3.isHighlightedEnd(t.day)),g$2=computed(()=>e$3.highlightedRange.value?V(t.day,e$3.highlightedRange.value.start,e$3.highlightedRange.value.end):!1),m$3=`[data-radix-vue-calendar-cell-trigger]:not([data-disabled]):not([data-outside-view]):not([data-outside-visible-view])`,_$2=computed(()=>$14e0f24ef4ac5c92$export$629b0a497aa65267(t.day,$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),C$3=computed(()=>!$14e0f24ef4ac5c92$export$a18c89cbd24170ff(t.day,t.month)),$$2=computed(()=>e$3.isOutsideVisibleView(t.day)),h$3=computed(()=>t.day.day.toLocaleString(e$3.locale.value)),E$2=computed(()=>!e$3.disabled.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(t.day,e$3.placeholder.value));function P$2(V$2,A$2){var F$2;if(!e$3.readonly.value&&!(e$3.isDateDisabled(A$2)||(F$2=e$3.isDateUnavailable)!=null&&F$2.call(e$3,A$2))){if(e$3.lastPressedDateValue.value=A$2.copy(),e$3.startValue.value&&e$3.highlightedRange.value===null){if($14e0f24ef4ac5c92$export$ea39ec197993aef0(A$2,e$3.startValue.value)&&!e$3.preventDeselect.value&&!e$3.endValue.value){e$3.startValue.value=void 0,e$3.onPlaceholderChange(A$2);return}else if(!e$3.endValue.value){V$2.preventDefault(),e$3.lastPressedDateValue.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(e$3.lastPressedDateValue.value,A$2)&&(e$3.startValue.value=A$2.copy());return}}if(e$3.startValue.value&&e$3.endValue.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(e$3.endValue.value,A$2)&&!e$3.preventDeselect.value){e$3.startValue.value=void 0,e$3.endValue.value=void 0,e$3.onPlaceholderChange(A$2);return}e$3.startValue.value?e$3.endValue.value?e$3.endValue.value&&e$3.startValue.value&&(e$3.endValue.value=void 0,e$3.startValue.value=A$2.copy()):e$3.endValue.value=A$2.copy():e$3.startValue.value=A$2.copy()}}function D$1(V$2){P$2(V$2,t.day)}function I(){var V$2;e$3.isDateDisabled(t.day)||(V$2=e$3.isDateUnavailable)!=null&&V$2.call(e$3,t.day)||(e$3.focusedValue.value=t.day.copy())}function M$1(V$2){V$2.preventDefault(),V$2.stopPropagation();let A$2=e$3.parentElement.value,F$2=A$2?Array.from(A$2.querySelectorAll(m$3)):[],H$3=F$2.indexOf(s$1.value),Q$3=7,G$2=e$3.dir.value===`rtl`?-1:1;switch(V$2.code){case n$2.ARROW_RIGHT:H$3+=G$2;break;case n$2.ARROW_LEFT:H$3-=G$2;break;case n$2.ARROW_UP:H$3-=Q$3;break;case n$2.ARROW_DOWN:H$3+=Q$3;break;case n$2.ENTER:case n$2.SPACE_CODE:P$2(V$2,t.day);return;default:return}if(H$3>=0&&H$3{let J$2=A$2?Array.from(A$2.querySelectorAll(m$3)):[];if(!e$3.pagedNavigation.value){let z$3=R(e$3.placeholder.value);J$2[z$3-Math.abs(H$3)].focus();return}J$2[J$2.length-Math.abs(H$3)].focus()});return}if(H$3>=F$2.length){if(e$3.isNextButtonDisabled(`month`))return;e$3.nextPage(),nextTick(()=>{let J$2=A$2?Array.from(A$2.querySelectorAll(m$3)):[];if(!e$3.pagedNavigation.value){let z$3=R(e$3.placeholder.value.add({months:e$3.numberOfMonths.value-1}));J$2[J$2.length-z$3+H$3-F$2.length].focus();return}J$2[H$3-F$2.length].focus()})}}return(V$2,A$2)=>(openBlock(),createBlock(unref(O$1),mergeProps({ref_key:`primitiveElement`,ref:l$1},t,{role:`button`,"aria-label":r$2.value,"data-radix-vue-calendar-cell-trigger":``,"aria-selected":d$2.value?!0:void 0,"aria-disabled":i$1.value||u$1.value?!0:void 0,"data-highlighted":g$2.value?``:void 0,"data-selection-start":c$4.value?!0:void 0,"data-selection-end":f$3.value?!0:void 0,"data-highlighted-start":v$2.value?!0:void 0,"data-highlighted-end":p$5.value?!0:void 0,"data-selected":d$2.value?!0:void 0,"data-outside-visible-view":$$2.value?``:void 0,"data-value":V$2.day.toString(),"data-disabled":i$1.value?``:void 0,"data-unavailable":u$1.value?``:void 0,"data-today":_$2.value?``:void 0,"data-outside-view":C$3.value?``:void 0,"data-focused":E$2.value?``:void 0,tabindex:E$2.value?0:C$3.value||i$1.value?void 0:-1,onClick:D$1,onFocusin:I,onMouseenter:I,onKeydown:withKeys(M$1,[`up`,`down`,`left`,`right`,`enter`,`space`])}),{default:withCtx(()=>[renderSlot(V$2.$slots,`default`,{dayValue:h$3.value},()=>[createTextVNode(toDisplayString(h$3.value),1)])]),_:3},16,[`aria-label`,`aria-selected`,`aria-disabled`,`data-highlighted`,`data-selection-start`,`data-selection-end`,`data-highlighted-start`,`data-highlighted-end`,`data-selected`,`data-outside-visible-view`,`data-value`,`data-disabled`,`data-unavailable`,`data-today`,`data-outside-view`,`data-focused`,`tabindex`]))}}),[Ue,Bf]=te(`ScrollAreaRoot`),Vy=defineComponent({__name:`ScrollAreaRoot`,props:{type:{default:`hover`},dir:{},scrollHideDelay:{default:600},asChild:{type:Boolean},as:{}},setup(a$2,{expose:t}){let e$3=a$2,n$2=ref(0),l$1=ref(0),s$1=ref(),r$2=ref(),i$1=ref(),u$1=ref(),d$2=ref(!1),c$4=ref(!1),{type:f$3,dir:v$2,scrollHideDelay:p$5}=toRefs(e$3),g$2=we(v$2);function m$3(){var h$3;(h$3=s$1.value)==null||h$3.scrollTo({top:0})}function _$2(){var h$3;(h$3=s$1.value)==null||h$3.scrollTo({top:0,left:0})}t({viewport:s$1,scrollTop:m$3,scrollTopLeft:_$2});let{forwardRef:C$3,currentElement:$$2}=R$1();return Bf({type:f$3,dir:g$2,scrollHideDelay:p$5,scrollArea:$$2,viewport:s$1,onViewportChange:h$3=>{s$1.value=h$3||void 0},content:r$2,onContentChange:h$3=>{r$2.value=h$3},scrollbarX:i$1,scrollbarXEnabled:d$2,scrollbarY:u$1,scrollbarYEnabled:c$4,onScrollbarXChange:h$3=>{i$1.value=h$3||void 0},onScrollbarYChange:h$3=>{u$1.value=h$3||void 0},onScrollbarXEnabledChange:h$3=>{d$2.value=h$3},onScrollbarYEnabledChange:h$3=>{c$4.value=h$3},onCornerWidthChange:h$3=>{n$2.value=h$3},onCornerHeightChange:h$3=>{l$1.value=h$3}}),(h$3,E$2)=>(openBlock(),createBlock(unref(O$1),{ref:unref(C$3),"as-child":e$3.asChild,as:h$3.as,dir:unref(g$2),style:normalizeStyle({position:`relative`,"--radix-scroll-area-corner-width":`${n$2.value}px`,"--radix-scroll-area-corner-height":`${l$1.value}px`})},{default:withCtx(()=>[renderSlot(h$3.$slots,`default`)]),_:3},8,[`as-child`,`as`,`dir`,`style`]))}}),Fy=defineComponent({inheritAttrs:!1,__name:`ScrollAreaViewport`,props:{nonce:{},asChild:{type:Boolean},as:{}},setup(a$2,{expose:t}){let e$3=a$2,{nonce:n$2}=toRefs(e$3),l$1=Ja(n$2),s$1=Ue(),r$2=ref();onMounted(()=>{s$1.onViewportChange(r$2.value),s$1.onContentChange(u$1.value)}),t({viewportElement:r$2});let{forwardRef:i$1,currentElement:u$1}=R$1();return(d$2,c$4)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode(`div`,mergeProps({ref_key:`viewportElement`,ref:r$2,"data-radix-scroll-area-viewport":``,style:{overflowX:unref(s$1).scrollbarXEnabled.value?`scroll`:`hidden`,overflowY:unref(s$1).scrollbarYEnabled.value?`scroll`:`hidden`}},d$2.$attrs,{tabindex:0}),[createVNode(unref(O$1),{ref:unref(i$1),style:normalizeStyle({minWidth:unref(s$1).scrollbarXEnabled.value?`fit-content`:void 0}),"as-child":e$3.asChild,as:d$2.as},{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},8,[`style`,`as-child`,`as`])],16),createVNode(unref(O$1),{as:`style`,nonce:unref(l$1)},{default:withCtx(()=>[createTextVNode(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-radix-scroll-area-viewport]::-webkit-scrollbar { display:none; } `)]),_:1},8,[`nonce`])],64))}});function $s(a$2,t){return e$3=>{if(a$2[0]===a$2[1]||t[0]===t[1])return t[0];let n$2=(t[1]-t[0])/(a$2[1]-a$2[0]);return t[0]+n$2*(e$3-a$2[0])}}function ln(a$2){let t=Bs(a$2.viewport,a$2.content),e$3=a$2.scrollbar.paddingStart+a$2.scrollbar.paddingEnd,n$2=(a$2.scrollbar.size-e$3)*t;return Math.max(n$2,18)}function Bs(a$2,t){let e$3=a$2/t;return Number.isNaN(e$3)?0:e$3}function If(a$2,t=()=>{}){let e$3={left:a$2.scrollLeft,top:a$2.scrollTop},n$2=0;return function l$1(){let s$1={left:a$2.scrollLeft,top:a$2.scrollTop},r$2=e$3.left!==s$1.left,i$1=e$3.top!==s$1.top;(r$2||i$1)&&t(),e$3=s$1,n$2=window.requestAnimationFrame(l$1)}(),()=>window.cancelAnimationFrame(n$2)}function tl(a$2,t,e$3=`ltr`){let n$2=ln(t),l$1=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s$1=t.scrollbar.size-l$1,r$2=t.content-t.viewport,i$1=s$1-n$2,u$1=e$3===`ltr`?[0,r$2]:[r$2*-1,0],d$2=Ut(a$2,u$1[0],u$1[1]);return $s([0,r$2],[0,i$1])(d$2)}function Ra(a$2){return a$2?Number.parseInt(a$2,10):0}function Tf(a$2,t,e$3,n$2=`ltr`){let l$1=ln(e$3),s$1=l$1/2,r$2=t||s$1,i$1=l$1-r$2,u$1=e$3.scrollbar.paddingStart+r$2,d$2=e$3.scrollbar.size-e$3.scrollbar.paddingEnd-i$1,c$4=e$3.content-e$3.viewport,f$3=n$2===`ltr`?[0,c$4]:[c$4*-1,0];return $s([u$1,d$2],f$3)(a$2)}function al(a$2,t){return a$2>0&&a$2{document.addEventListener(`wheel`,m$3,{passive:!1})}),onUnmounted(()=>{document.removeEventListener(`wheel`,m$3)});function _$2(){var C$3,$$2,h$3,E$2,P$2;u$1.value&&(e$3.isHorizontal?s$1.handleSizeChange({content:(C$3=l$1.viewport.value)?.scrollWidth??0,viewport:($$2=l$1.viewport.value)?.offsetWidth??0,scrollbar:{size:u$1.value.clientWidth??0,paddingStart:Ra(getComputedStyle(u$1.value).paddingLeft),paddingEnd:Ra(getComputedStyle(u$1.value).paddingRight)}}):s$1.handleSizeChange({content:(h$3=l$1.viewport.value)?.scrollHeight??0,viewport:(E$2=l$1.viewport.value)?.offsetHeight??0,scrollbar:{size:(P$2=u$1.value)?.clientHeight??0,paddingStart:Ra(getComputedStyle(u$1.value).paddingLeft),paddingEnd:Ra(getComputedStyle(u$1.value).paddingRight)}}))}return tt(u$1,_$2),tt(l$1.content,_$2),(C$3,$$2)=>(openBlock(),createBlock(unref(O$1),{ref:unref(i$1),style:{position:`absolute`},"data-scrollbarimpl":``,as:unref(r$2).as.value,"as-child":unref(r$2).asChild.value,onPointerdown:v$2,onPointermove:p$5,onPointerup:g$2},{default:withCtx(()=>[renderSlot(C$3.$slots,`default`)]),_:3},8,[`as`,`as-child`]))}}),Rf=defineComponent({__name:`ScrollAreaScrollbarX`,setup(a$2){let t=Ue(),e$3=sn(),{forwardRef:n$2,currentElement:l$1}=R$1();onMounted(()=>{l$1.value&&t.onScrollbarXChange(l$1.value)});let s$1=computed(()=>e$3.sizes.value);return(r$2,i$1)=>(openBlock(),createBlock(Is,{ref:unref(n$2),"is-horizontal":!0,"data-orientation":`horizontal`,style:normalizeStyle({bottom:0,left:unref(t).dir.value===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:unref(t).dir.value===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":s$1.value?`${unref(ln)(s$1.value)}px`:void 0}),onOnDragScroll:i$1[0]||=u$1=>unref(e$3).onDragScroll(u$1.x)},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},8,[`style`]))}}),Af=defineComponent({__name:`ScrollAreaScrollbarY`,setup(a$2){let t=Ue(),e$3=sn(),{forwardRef:n$2,currentElement:l$1}=R$1();onMounted(()=>{l$1.value&&t.onScrollbarYChange(l$1.value)});let s$1=computed(()=>e$3.sizes.value);return(r$2,i$1)=>(openBlock(),createBlock(Is,{ref:unref(n$2),"is-horizontal":!1,"data-orientation":`vertical`,style:normalizeStyle({top:0,right:unref(t).dir.value===`ltr`?0:void 0,left:unref(t).dir.value===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":s$1.value?`${unref(ln)(s$1.value)}px`:void 0}),onOnDragScroll:i$1[0]||=u$1=>unref(e$3).onDragScroll(u$1.y)},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},8,[`style`]))}}),[sn,Of]=te(`ScrollAreaScrollbarVisible`),Bo=defineComponent({__name:`ScrollAreaScrollbarVisible`,setup(a$2){let t=Ue(),e$3=rn(),{forwardRef:n$2}=R$1(),l$1=ref({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),s$1=computed(()=>{let C$3=Bs(l$1.value.viewport,l$1.value.content);return C$3>0&&C$3<1}),r$2=ref(),i$1=ref(0);function u$1(C$3,$$2){if(p$5.value){let h$3=t.viewport.value.scrollLeft+C$3.deltaY;t.viewport.value.scrollLeft=h$3,al(h$3,$$2)&&C$3.preventDefault()}else{let h$3=t.viewport.value.scrollTop+C$3.deltaY;t.viewport.value.scrollTop=h$3,al(h$3,$$2)&&C$3.preventDefault()}}function d$2(C$3,$$2){p$5.value?i$1.value=$$2.x:i$1.value=$$2.y}function c$4(C$3){i$1.value=0}function f$3(C$3){l$1.value=C$3}function v$2(C$3,$$2){return Tf(C$3,i$1.value,l$1.value,$$2)}let p$5=computed(()=>e$3.isHorizontal.value);function g$2(C$3){p$5.value?t.viewport.value.scrollLeft=v$2(C$3,t.dir.value):t.viewport.value.scrollTop=v$2(C$3)}function m$3(){if(p$5.value){if(t.viewport.value&&r$2.value){let C$3=t.viewport.value.scrollLeft,$$2=tl(C$3,l$1.value,t.dir.value);r$2.value.style.transform=`translate3d(${$$2}px, 0, 0)`}}else if(t.viewport.value&&r$2.value){let C$3=t.viewport.value.scrollTop,$$2=tl(C$3,l$1.value);r$2.value.style.transform=`translate3d(0, ${$$2}px, 0)`}}function _$2(C$3){r$2.value=C$3}return Of({sizes:l$1,hasThumb:s$1,handleWheelScroll:u$1,handleThumbDown:d$2,handleThumbUp:c$4,handleSizeChange:f$3,onThumbPositionChange:m$3,onThumbChange:_$2,onDragScroll:g$2}),(C$3,$$2)=>p$5.value?(openBlock(),createBlock(Rf,mergeProps({key:0},C$3.$attrs,{ref:unref(n$2)}),{default:withCtx(()=>[renderSlot(C$3.$slots,`default`)]),_:3},16)):(openBlock(),createBlock(Af,mergeProps({key:1},C$3.$attrs,{ref:unref(n$2)}),{default:withCtx(()=>[renderSlot(C$3.$slots,`default`)]),_:3},16))}}),Ts=defineComponent({__name:`ScrollAreaScrollbarAuto`,props:{forceMount:{type:Boolean}},setup(a$2){let t=Ue(),e$3=rn(),{forwardRef:n$2}=R$1(),l$1=ref(!1),s$1=jn(()=>{if(t.viewport.value){let r$2=t.viewport.value.offsetWidths$1()),tt(t.viewport,s$1),tt(t.content,s$1),(r$2,i$1)=>(openBlock(),createBlock(unref(Pe),{present:r$2.forceMount||l$1.value},{default:withCtx(()=>[createVNode(Bo,mergeProps(r$2.$attrs,{ref:unref(n$2),"data-state":l$1.value?`visible`:`hidden`}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`data-state`])]),_:3},8,[`present`]))}}),kf=defineComponent({inheritAttrs:!1,__name:`ScrollAreaScrollbarHover`,props:{forceMount:{type:Boolean}},setup(a$2){let t=Ue(),{forwardRef:e$3}=R$1(),n$2,l$1=ref(!1);function s$1(){window.clearTimeout(n$2),l$1.value=!0}function r$2(){n$2=window.setTimeout(()=>{l$1.value=!1},t.scrollHideDelay.value)}return onMounted(()=>{let i$1=t.scrollArea.value;i$1&&(i$1.addEventListener(`pointerenter`,s$1),i$1.addEventListener(`pointerleave`,r$2))}),onUnmounted(()=>{let i$1=t.scrollArea.value;i$1&&(window.clearTimeout(n$2),i$1.removeEventListener(`pointerenter`,s$1),i$1.removeEventListener(`pointerleave`,r$2))}),(i$1,u$1)=>(openBlock(),createBlock(unref(Pe),{present:i$1.forceMount||l$1.value},{default:withCtx(()=>[createVNode(Ts,mergeProps(i$1.$attrs,{ref:unref(e$3),"data-state":l$1.value?`visible`:`hidden`}),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16,[`data-state`])]),_:3},8,[`present`]))}}),Mf=defineComponent({__name:`ScrollAreaScrollbarScroll`,props:{forceMount:{type:Boolean}},setup(a$2){let t=Ue(),e$3=rn(),{forwardRef:n$2}=R$1(),{state:l$1,dispatch:s$1}=zl(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});watchEffect(i$1=>{if(l$1.value===`idle`){let u$1=window.setTimeout(()=>s$1(`HIDE`),t.scrollHideDelay.value);i$1(()=>{window.clearTimeout(u$1)})}});let r$2=jn(()=>s$1(`SCROLL_END`),100);return watchEffect(i$1=>{let u$1=t.viewport.value,d$2=e$3.isHorizontal.value?`scrollLeft`:`scrollTop`;if(u$1){let c$4=u$1[d$2],f$3=()=>{let v$2=u$1[d$2];c$4!==v$2&&(s$1(`SCROLL`),r$2()),c$4=v$2};u$1.addEventListener(`scroll`,f$3),i$1(()=>{u$1.removeEventListener(`scroll`,f$3)})}}),(i$1,u$1)=>(openBlock(),createBlock(unref(Pe),{present:i$1.forceMount||unref(l$1)!==`hidden`},{default:withCtx(()=>[createVNode(Bo,mergeProps(i$1.$attrs,{ref:unref(n$2)}),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16)]),_:3},8,[`present`]))}}),[rn,Vf]=te(`ScrollAreaScrollbar`),Ny=defineComponent({inheritAttrs:!1,__name:`ScrollAreaScrollbar`,props:{orientation:{default:`vertical`},forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:`div`}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1(),n$2=Ue(),l$1=computed(()=>t.orientation===`horizontal`);watch(l$1,()=>{l$1.value?n$2.onScrollbarXEnabledChange(!0):n$2.onScrollbarYEnabledChange(!0)},{immediate:!0}),onUnmounted(()=>{n$2.onScrollbarXEnabledChange(!1),n$2.onScrollbarYEnabledChange(!1)});let{orientation:s$1,forceMount:r$2,asChild:i$1,as:u$1}=toRefs(t);return Vf({orientation:s$1,forceMount:r$2,isHorizontal:l$1,as:u$1,asChild:i$1}),(d$2,c$4)=>unref(n$2).type.value===`hover`?(openBlock(),createBlock(kf,mergeProps({key:0},d$2.$attrs,{ref:unref(e$3),"force-mount":unref(r$2)}),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16,[`force-mount`])):unref(n$2).type.value===`scroll`?(openBlock(),createBlock(Mf,mergeProps({key:1},d$2.$attrs,{ref:unref(e$3),"force-mount":unref(r$2)}),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16,[`force-mount`])):unref(n$2).type.value===`auto`?(openBlock(),createBlock(Ts,mergeProps({key:2},d$2.$attrs,{ref:unref(e$3),"force-mount":unref(r$2)}),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16,[`force-mount`])):unref(n$2).type.value===`always`?(openBlock(),createBlock(Bo,mergeProps({key:3},d$2.$attrs,{ref:unref(e$3),"data-state":`visible`}),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16)):createCommentVNode(``,!0)}}),Ly=defineComponent({__name:`ScrollAreaThumb`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=Ue(),n$2=sn();function l$1(v$2){let g$2=v$2.target.getBoundingClientRect(),m$3=v$2.clientX-g$2.left,_$2=v$2.clientY-g$2.top;n$2.handleThumbDown(v$2,{x:m$3,y:_$2})}function s$1(v$2){n$2.handleThumbUp(v$2)}let{forwardRef:r$2,currentElement:i$1}=R$1(),u$1=ref(),d$2=computed(()=>e$3.viewport.value);function c$4(){if(!u$1.value){let v$2=If(d$2.value,n$2.onThumbPositionChange);u$1.value=v$2,n$2.onThumbPositionChange()}}let f$3=computed(()=>n$2.sizes.value);return bi(f$3,()=>{n$2.onThumbChange(i$1.value),d$2.value&&(n$2.onThumbPositionChange(),d$2.value.addEventListener(`scroll`,c$4))}),onUnmounted(()=>{var v$2;d$2.value.removeEventListener(`scroll`,c$4),(v$2=e$3.viewport.value)==null||v$2.removeEventListener(`scroll`,c$4)}),(v$2,p$5)=>(openBlock(),createBlock(unref(O$1),{ref:unref(r$2),"data-state":unref(n$2).hasThumb?`visible`:`hidden`,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`},"as-child":t.asChild,as:v$2.as,onPointerdown:l$1,onPointerup:s$1},{default:withCtx(()=>[renderSlot(v$2.$slots,`default`)]),_:3},8,[`data-state`,`as-child`,`as`]))}}),Ff=defineComponent({__name:`ScrollAreaCornerImpl`,setup(a$2){let t=Ue(),e$3=ref(0),n$2=ref(0),l$1=computed(()=>!!e$3.value&&!!n$2.value);function s$1(){var u$1;let i$1=(u$1=t.scrollbarX.value)?.offsetHeight||0;t.onCornerHeightChange(i$1),n$2.value=i$1}function r$2(){var u$1;let i$1=(u$1=t.scrollbarY.value)?.offsetWidth||0;t.onCornerWidthChange(i$1),e$3.value=i$1}return tt(t.scrollbarX.value,s$1),tt(t.scrollbarY.value,r$2),watch(()=>t.scrollbarX.value,s$1),watch(()=>t.scrollbarY.value,r$2),(i$1,u$1)=>{var d$2;return l$1.value?(openBlock(),createBlock(unref(O$1),mergeProps({key:0,style:{width:`${e$3.value}px`,height:`${n$2.value}px`,position:`absolute`,right:unref(t).dir.value===`ltr`?0:void 0,left:unref(t).dir.value===`rtl`?0:void 0,bottom:0}},(d$2=i$1.$parent)?.$props),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16,[`style`])):createCommentVNode(``,!0)}}}),zy=defineComponent({__name:`ScrollAreaCorner`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1(),n$2=Ue(),l$1=computed(()=>!!n$2.scrollbarX.value&&!!n$2.scrollbarY.value),s$1=computed(()=>n$2.type.value!==`scroll`&&l$1.value);return(r$2,i$1)=>s$1.value?(openBlock(),createBlock(Ff,mergeProps({key:0},t,{ref:unref(e$3)}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16)):createCommentVNode(``,!0)}}),Nf=[`default-value`],Lf=defineComponent({__name:`BubbleSelect`,props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(a$2){let t=a$2,{value:e$3}=toRefs(t),n$2=ref();return(l$1,s$1)=>(openBlock(),createBlock(unref(Jt),{"as-child":``},{default:withCtx(()=>[withDirectives(createBaseVNode(`select`,mergeProps({ref_key:`selectElement`,ref:n$2},t,{"onUpdate:modelValue":s$1[0]||=r$2=>isRef(e$3)?e$3.value=r$2:null,"default-value":unref(e$3)}),[renderSlot(l$1.$slots,`default`)],16,Nf),[[vModelSelect,unref(e$3)]])]),_:3}))}}),zf={key:0,value:``},[xt,Rs]=te(`SelectRoot`),[Kf,Hf]=te(`SelectRoot`),Ky=defineComponent({__name:`SelectRoot`,props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{default:``},modelValue:{default:void 0},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:[`update:modelValue`,`update:open`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.modelValue===void 0}),s$1=ne(e$3,`open`,n$2,{defaultValue:e$3.defaultOpen,passive:e$3.open===void 0}),r$2=ref(),i$1=ref(),u$1=ref({x:0,y:0}),d$2=ref(!1),{required:c$4,disabled:f$3,dir:v$2}=toRefs(e$3),p$5=we(v$2);Rs({triggerElement:r$2,onTriggerChange:C$3=>{r$2.value=C$3},valueElement:i$1,onValueElementChange:C$3=>{i$1.value=C$3},valueElementHasChildren:d$2,onValueElementHasChildrenChange:C$3=>{d$2.value=C$3},contentId:``,modelValue:l$1,onValueChange:C$3=>{l$1.value=C$3},open:s$1,required:c$4,onOpenChange:C$3=>{s$1.value=C$3},dir:p$5,triggerPointerDownPosRef:u$1,disabled:f$3});let g$2=at(r$2),m$3=ref(new Set),_$2=computed(()=>Array.from(m$3.value).map(C$3=>{var $$2;return($$2=C$3.props)?.value}).join(`;`));return Hf({onNativeOptionAdd:C$3=>{m$3.value.add(C$3)},onNativeOptionRemove:C$3=>{m$3.value.delete(C$3)}}),(C$3,$$2)=>(openBlock(),createBlock(unref(kt),null,{default:withCtx(()=>[renderSlot(C$3.$slots,`default`,{modelValue:unref(l$1),open:unref(s$1)}),unref(g$2)?(openBlock(),createBlock(Lf,mergeProps({key:_$2.value},C$3.$attrs,{"aria-hidden":`true`,tabindex:`-1`,required:unref(c$4),name:C$3.name,autocomplete:C$3.autocomplete,disabled:unref(f$3),value:unref(l$1),onChange:$$2[0]||=h$3=>l$1.value=h$3.target.value}),{default:withCtx(()=>[unref(l$1)===void 0?(openBlock(),createElementBlock(`option`,zf)):createCommentVNode(``,!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Array.from(m$3.value),h$3=>(openBlock(),createBlock(resolveDynamicComponent(h$3),mergeProps({ref_for:!0},h$3.props,{key:h$3.key??``}),null,16))),128))]),_:1},16,[`required`,`name`,`autocomplete`,`disabled`,`value`])):createCommentVNode(``,!0)]),_:3}))}}),Wf=[` `,`Enter`,`ArrowUp`,`ArrowDown`],jf=[` `,`Enter`],qe=10;function As(a$2){return a$2===``||ht$1(a$2)}const Hy=defineComponent({__name:`SelectTrigger`,props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=xt(),n$2=computed(()=>{var p$5;return(p$5=e$3.disabled)?.value||t.disabled}),{forwardRef:l$1,currentElement:s$1}=R$1();e$3.contentId||=ge(void 0,`radix-vue-select-content`),onMounted(()=>{e$3.triggerElement=s$1});let{injectCollection:r$2}=Fe(),i$1=r$2(),{search:u$1,handleTypeaheadSearch:d$2,resetTypeahead:c$4}=ba(i$1);function f$3(){n$2.value||(e$3.onOpenChange(!0),c$4())}function v$2(p$5){f$3(),e$3.triggerPointerDownPosRef.value={x:Math.round(p$5.pageX),y:Math.round(p$5.pageY)}}return(p$5,g$2)=>(openBlock(),createBlock(unref(Mt),{"as-child":``},{default:withCtx(()=>{var m$3,_$2,C$3,$$2;return[createVNode(unref(O$1),{ref:unref(l$1),role:`combobox`,type:p$5.as===`button`?`button`:void 0,"aria-controls":unref(e$3).contentId,"aria-expanded":unref(e$3).open.value||!1,"aria-required":(m$3=unref(e$3).required)?.value,"aria-autocomplete":`none`,disabled:n$2.value,dir:(_$2=unref(e$3))?.dir.value,"data-state":(C$3=unref(e$3))!=null&&C$3.open.value?`open`:`closed`,"data-disabled":n$2.value?``:void 0,"data-placeholder":unref(As)(($$2=unref(e$3).modelValue)?.value)?``:void 0,"as-child":p$5.asChild,as:p$5.as,onClick:g$2[0]||=h$3=>{var E$2;(E$2=h$3?.currentTarget)==null||E$2.focus()},onPointerdown:g$2[1]||=h$3=>{if(h$3.pointerType===`touch`)return h$3.preventDefault();let E$2=h$3.target;E$2.hasPointerCapture(h$3.pointerId)&&E$2.releasePointerCapture(h$3.pointerId),h$3.button===0&&h$3.ctrlKey===!1&&(v$2(h$3),h$3.preventDefault())},onPointerup:g$2[2]||=withModifiers(h$3=>{h$3.pointerType===`touch`&&v$2(h$3)},[`prevent`]),onKeydown:g$2[3]||=h$3=>{let E$2=unref(u$1)!==``;!(h$3.ctrlKey||h$3.altKey||h$3.metaKey)&&h$3.key.length===1&&E$2&&h$3.key===` `||(unref(d$2)(h$3.key),unref(Wf).includes(h$3.key)&&(f$3(),h$3.preventDefault()))}},{default:withCtx(()=>[renderSlot(p$5.$slots,`default`)]),_:3},8,[`type`,`aria-controls`,`aria-expanded`,`aria-required`,`disabled`,`dir`,`data-state`,`data-disabled`,`data-placeholder`,`as-child`,`as`])]}),_:3}))}}),Wy=defineComponent({__name:`SelectPortal`,props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(rt$2),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),[Io,Uf]=te(`SelectItemAlignedPosition`),Gf=defineComponent({inheritAttrs:!1,__name:`SelectItemAlignedPosition`,props:{asChild:{type:Boolean},as:{}},emits:[`placed`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{injectCollection:l$1}=Fe(),s$1=xt(),r$2=St$1(),i$1=l$1(),u$1=ref(!1),d$2=ref(!0),c$4=ref(),{forwardRef:f$3,currentElement:v$2}=R$1(),{viewport:p$5,selectedItem:g$2,selectedItemText:m$3,focusSelectedItem:_$2}=r$2;function C$3(){if(s$1.triggerElement.value&&s$1.valueElement.value&&c$4.value&&v$2.value&&p$5!=null&&p$5.value&&g$2!=null&&g$2.value&&m$3!=null&&m$3.value){let E$2=s$1.triggerElement.value.getBoundingClientRect(),P$2=v$2.value.getBoundingClientRect(),D$1=s$1.valueElement.value.getBoundingClientRect(),I=m$3.value.getBoundingClientRect();if(s$1.dir.value!==`rtl`){let Ee$2=I.left-P$2.left,be$2=D$1.left-Ee$2,de$3=E$2.left-be$2,Ie=E$2.width+de$3,Ae$1=Math.max(Ie,P$2.width),We=window.innerWidth-qe,Et$2=Ut(be$2,qe,Math.max(qe,We-Ae$1));c$4.value.style.minWidth=`${Ie}px`,c$4.value.style.left=`${Et$2}px`}else{let Ee$2=P$2.right-I.right,be$2=window.innerWidth-D$1.right-Ee$2,de$3=window.innerWidth-E$2.right-be$2,Ie=E$2.width+de$3,Ae$1=Math.max(Ie,P$2.width),We=window.innerWidth-qe,Et$2=Ut(be$2,qe,Math.max(qe,We-Ae$1));c$4.value.style.minWidth=`${Ie}px`,c$4.value.style.right=`${Et$2}px`}let M$1=i$1.value,V$2=window.innerHeight-qe*2,A$2=p$5.value.scrollHeight,F$2=window.getComputedStyle(v$2.value),j$1=Number.parseInt(F$2.borderTopWidth,10),H$3=Number.parseInt(F$2.paddingTop,10),Q$3=Number.parseInt(F$2.borderBottomWidth,10),G$2=Number.parseInt(F$2.paddingBottom,10),J$2=j$1+H$3+A$2+G$2+Q$3,z$3=Math.min(g$2.value.offsetHeight*5,J$2),K$1=window.getComputedStyle(p$5.value),L$1=Number.parseInt(K$1.paddingTop,10),N$2=Number.parseInt(K$1.paddingBottom,10),Z$1=E$2.top+E$2.height/2-qe,Y$2=V$2-Z$1,re$3=g$2.value.offsetHeight/2,X$2=g$2.value.offsetTop+re$3,se$1=j$1+H$3+X$2,fe$2=J$2-se$1;if(se$1<=Z$1){let Ee$2=g$2.value===M$1[M$1.length-1];c$4.value.style.bottom=`0px`;let be$2=v$2.value.clientHeight-p$5.value.offsetTop-p$5.value.offsetHeight,de$3=Math.max(Y$2,re$3+(Ee$2?N$2:0)+be$2+Q$3),Ie=se$1+de$3;c$4.value.style.height=`${Ie}px`}else{let Ee$2=g$2.value===M$1[0];c$4.value.style.top=`0px`;let de$3=Math.max(Z$1,j$1+p$5.value.offsetTop+(Ee$2?L$1:0)+re$3)+fe$2;c$4.value.style.height=`${de$3}px`,p$5.value.scrollTop=se$1-Z$1+p$5.value.offsetTop}c$4.value.style.margin=`${qe}px 0`,c$4.value.style.minHeight=`${z$3}px`,c$4.value.style.maxHeight=`${V$2}px`,n$2(`placed`),requestAnimationFrame(()=>u$1.value=!0)}}let $$2=ref(``);onMounted(async()=>{await nextTick(),C$3(),v$2.value&&($$2.value=window.getComputedStyle(v$2.value).zIndex)});function h$3(E$2){E$2&&d$2.value===!0&&(C$3(),_$2?.(),d$2.value=!1)}return Uf({contentWrapper:c$4,shouldExpandOnScrollRef:u$1,onScrollButtonChange:h$3}),(E$2,P$2)=>(openBlock(),createElementBlock(`div`,{ref_key:`contentWrapperElement`,ref:c$4,style:normalizeStyle({display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:$$2.value})},[createVNode(unref(O$1),mergeProps({ref:unref(f$3),style:{boxSizing:`border-box`,maxHeight:`100%`}},{...E$2.$attrs,...e$3}),{default:withCtx(()=>[renderSlot(E$2.$slots,`default`)]),_:3},16)],4))}}),qf=defineComponent({__name:`SelectPopperPosition`,props:{side:{},sideOffset:{},align:{default:`start`},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:qe},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let e$3=Ot$1(a$2);return(n$2,l$1)=>(openBlock(),createBlock(unref(It),mergeProps(unref(e$3),{style:{boxSizing:`border-box`,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16))}}),zt={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[St$1,Yf]=te(`SelectContent`),Xf=defineComponent({__name:`SelectContentImpl`,props:{position:{default:`item-aligned`},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:`start`},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=xt();Yn(),ya(e$3.bodyLock);let{createCollection:s$1}=Fe(),r$2=ref();ga(r$2);let i$1=s$1(r$2),{search:u$1,handleTypeaheadSearch:d$2}=ba(i$1),c$4=ref(),f$3=ref(),v$2=ref(),p$5=ref(!1),g$2=ref(!1);function m$3(){f$3.value&&r$2.value&&In([f$3.value,r$2.value])}watch(p$5,()=>{m$3()});let{onOpenChange:_$2,triggerPointerDownPosRef:C$3}=l$1;watchEffect(P$2=>{if(!r$2.value)return;let D$1={x:0,y:0},I=V$2=>{var A$2,F$2;D$1={x:Math.abs(Math.round(V$2.pageX)-((A$2=C$3.value)?.x??0)),y:Math.abs(Math.round(V$2.pageY)-((F$2=C$3.value)?.y??0))}},M$1=V$2=>{var A$2;V$2.pointerType!==`touch`&&(D$1.x<=10&&D$1.y<=10?V$2.preventDefault():(A$2=r$2.value)!=null&&A$2.contains(V$2.target)||_$2(!1),document.removeEventListener(`pointermove`,I),C$3.value=null)};C$3.value!==null&&(document.addEventListener(`pointermove`,I),document.addEventListener(`pointerup`,M$1,{capture:!0,once:!0})),P$2(()=>{document.removeEventListener(`pointermove`,I),document.removeEventListener(`pointerup`,M$1,{capture:!0})})});function $$2(P$2){let D$1=P$2.ctrlKey||P$2.altKey||P$2.metaKey;if(P$2.key===`Tab`&&P$2.preventDefault(),!D$1&&P$2.key.length===1&&d$2(P$2.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(P$2.key)){let I=i$1.value;if([`ArrowUp`,`End`].includes(P$2.key)&&(I=I.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(P$2.key)){let M$1=P$2.target,V$2=I.indexOf(M$1);I=I.slice(V$2+1)}setTimeout(()=>In(I)),P$2.preventDefault()}}let h$3=computed(()=>e$3.position===`popper`?e$3:{}),E$2=Ot$1(h$3.value);return Yf({content:r$2,viewport:c$4,onViewportChange:P$2=>{c$4.value=P$2},itemRefCallback:(P$2,D$1,I)=>{var A$2,F$2;let M$1=!g$2.value&&!I;((A$2=l$1.modelValue)?.value!==void 0&&(F$2=l$1.modelValue)?.value===D$1||M$1)&&(f$3.value=P$2,M$1&&(g$2.value=!0))},selectedItem:f$3,selectedItemText:v$2,onItemLeave:()=>{var P$2;(P$2=r$2.value)==null||P$2.focus()},itemTextRefCallback:(P$2,D$1,I)=>{var A$2,F$2;let M$1=!g$2.value&&!I;((A$2=l$1.modelValue)?.value!==void 0&&(F$2=l$1.modelValue)?.value===D$1||M$1)&&(v$2.value=P$2)},focusSelectedItem:m$3,position:e$3.position,isPositioned:p$5,searchRef:u$1}),(P$2,D$1)=>(openBlock(),createBlock(unref(Za),{"as-child":``,onMountAutoFocus:D$1[6]||=withModifiers(()=>{},[`prevent`]),onUnmountAutoFocus:D$1[7]||=I=>{var M$1;n$2(`closeAutoFocus`,I),!I.defaultPrevented&&((M$1=unref(l$1).triggerElement.value)==null||M$1.focus({preventScroll:!0}),I.preventDefault())}},{default:withCtx(()=>[createVNode(unref(Ct$1),{"as-child":``,"disable-outside-pointer-events":``,onFocusOutside:D$1[2]||=withModifiers(()=>{},[`prevent`]),onDismiss:D$1[3]||=I=>unref(l$1).onOpenChange(!1),onEscapeKeyDown:D$1[4]||=I=>n$2(`escapeKeyDown`,I),onPointerDownOutside:D$1[5]||=I=>n$2(`pointerDownOutside`,I)},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(P$2.position===`popper`?qf:Gf),mergeProps({...P$2.$attrs,...unref(E$2)},{id:unref(l$1).contentId,ref:I=>{r$2.value=unref($e$1)(I)},role:`listbox`,"data-state":unref(l$1).open.value?`open`:`closed`,dir:unref(l$1).dir.value,style:{display:`flex`,flexDirection:`column`,outline:`none`},onContextmenu:D$1[0]||=withModifiers(()=>{},[`prevent`]),onPlaced:D$1[1]||=I=>p$5.value=!0,onKeydown:$$2}),{default:withCtx(()=>[renderSlot(P$2.$slots,`default`)]),_:3},16,[`id`,`data-state`,`dir`,`onKeydown`]))]),_:3})]),_:3}))}}),Zf=defineComponent({inheritAttrs:!1,__name:`SelectProvider`,props:{context:{}},setup(a$2){return Rs(a$2.context),(e$3,n$2)=>renderSlot(e$3.$slots,`default`)}}),Jf={key:1},jy=defineComponent({inheritAttrs:!1,__name:`SelectContent`,props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(a$2,{emit:t}){let e$3=a$2,l$1=Se(e$3,t),s$1=xt(),r$2=ref();onMounted(()=>{r$2.value=new DocumentFragment});let i$1=ref(),u$1=computed(()=>e$3.forceMount||s$1.open.value);return(d$2,c$4)=>{var f$3;return u$1.value?(openBlock(),createBlock(unref(Pe),{key:0,ref_key:`presenceRef`,ref:i$1,present:!0},{default:withCtx(()=>[createVNode(Xf,normalizeProps(guardReactiveProps({...unref(l$1),...d$2.$attrs})),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16)]),_:3},512)):!((f$3=i$1.value)!=null&&f$3.present)&&r$2.value?(openBlock(),createElementBlock(`div`,Jf,[(openBlock(),createBlock(Teleport,{to:r$2.value},[createVNode(Zf,{context:unref(s$1)},{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},8,[`context`])],8,[`to`]))])):createCommentVNode(``,!0)}}}),Uy=defineComponent({__name:`SelectArrow`,props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:`svg`}},setup(a$2){let t=a$2,e$3=xt(),n$2=St$1(zt);return(l$1,s$1)=>unref(e$3).open.value&&unref(n$2).position===`popper`?(openBlock(),createBlock(unref(Zt),normalizeProps(mergeProps({key:0},t)),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`)]),_:3},16)):createCommentVNode(``,!0)}}),Gy=defineComponent({__name:`SelectSeparator`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),mergeProps({"aria-hidden":`true`},t),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),[Os,Qf]=te(`SelectItem`),qy=defineComponent({__name:`SelectItem`,props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{disabled:e$3}=toRefs(t),n$2=xt(),l$1=St$1(zt),{forwardRef:s$1,currentElement:r$2}=R$1(),i$1=computed(()=>{var m$3;return(m$3=n$2.modelValue)?.value===t.value}),u$1=ref(!1),d$2=ref(t.textValue??``),c$4=ge(void 0,`radix-vue-select-item-text`);async function f$3(m$3){await nextTick(),!(m$3!=null&&m$3.defaultPrevented)&&(e$3.value||(n$2.onValueChange(t.value),n$2.onOpenChange(!1)))}async function v$2(m$3){var _$2;await nextTick(),!m$3.defaultPrevented&&(e$3.value?(_$2=l$1.onItemLeave)==null||_$2.call(l$1):m$3.currentTarget.focus({preventScroll:!0}))}async function p$5(m$3){var _$2;await nextTick(),!m$3.defaultPrevented&&m$3.currentTarget===me()&&((_$2=l$1.onItemLeave)==null||_$2.call(l$1))}async function g$2(m$3){var C$3;await nextTick(),!(m$3.defaultPrevented||(C$3=l$1.searchRef)?.value!==``&&m$3.key===` `)&&(jf.includes(m$3.key)&&f$3(),m$3.key===` `&&m$3.preventDefault())}if(t.value===``)throw Error(`A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return onMounted(()=>{r$2.value&&l$1.itemRefCallback(r$2.value,t.value,t.disabled)}),Qf({value:t.value,disabled:e$3,textId:c$4,isSelected:i$1,onItemTextChange:m$3=>{d$2.value=((d$2.value||m$3?.textContent)??``).trim()}}),(m$3,_$2)=>(openBlock(),createBlock(unref(O$1),{ref:unref(s$1),role:`option`,"data-radix-vue-collection-item":``,"aria-labelledby":unref(c$4),"data-highlighted":u$1.value?``:void 0,"aria-selected":i$1.value,"data-state":i$1.value?`checked`:`unchecked`,"aria-disabled":unref(e$3)||void 0,"data-disabled":unref(e$3)?``:void 0,tabindex:unref(e$3)?void 0:-1,as:m$3.as,"as-child":m$3.asChild,onFocus:_$2[0]||=C$3=>u$1.value=!0,onBlur:_$2[1]||=C$3=>u$1.value=!1,onPointerup:f$3,onPointerdown:_$2[2]||=C$3=>{C$3.currentTarget.focus({preventScroll:!0})},onTouchend:_$2[3]||=withModifiers(()=>{},[`prevent`,`stop`]),onPointermove:v$2,onPointerleave:p$5,onKeydown:g$2},{default:withCtx(()=>[renderSlot(m$3.$slots,`default`)]),_:3},8,[`aria-labelledby`,`data-highlighted`,`aria-selected`,`data-state`,`aria-disabled`,`data-disabled`,`tabindex`,`as`,`as-child`]))}}),Yy=defineComponent({__name:`SelectItemIndicator`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=a$2,e$3=Os();return(n$2,l$1)=>unref(e$3).isSelected.value?(openBlock(),createBlock(unref(O$1),mergeProps({key:0,"aria-hidden":`true`},t),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16)):createCommentVNode(``,!0)}}),[ep,tp]=te(`SelectGroup`),Xy=defineComponent({__name:`SelectGroup`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=ge(void 0,`radix-vue-select-group`);return tp({id:e$3}),(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps({role:`group`},t,{"aria-labelledby":unref(e$3)}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`aria-labelledby`]))}}),Zy=defineComponent({__name:`SelectLabel`,props:{for:{},asChild:{type:Boolean},as:{default:`div`}},setup(a$2){let t=a$2,e$3=ep({id:``});return(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{id:unref(e$3).id}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`id`]))}}),Jy=defineComponent({inheritAttrs:!1,__name:`SelectItemText`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=a$2,e$3=xt(),n$2=St$1(zt),l$1=Kf(),s$1=Os(),{forwardRef:r$2,currentElement:i$1}=R$1(),u$1=computed(()=>{var d$2;return h(`option`,{key:s$1.value,value:s$1.value,disabled:s$1.disabled.value,textContent:(d$2=i$1.value)?.textContent})});return onMounted(()=>{i$1.value&&(s$1.onItemTextChange(i$1.value),n$2.itemTextRefCallback(i$1.value,s$1.value,s$1.disabled.value),l$1.onNativeOptionAdd(u$1.value))}),onBeforeUnmount(()=>{l$1.onNativeOptionRemove(u$1.value)}),(d$2,c$4)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$1),mergeProps({id:unref(s$1).textId,ref:unref(r$2)},{...t,...d$2.$attrs},{"data-item-text":``}),{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},16,[`id`]),unref(s$1).isSelected.value&&unref(e$3).valueElement.value&&!unref(e$3).valueElementHasChildren.value?(openBlock(),createBlock(Teleport,{key:0,to:unref(e$3).valueElement.value},[renderSlot(d$2.$slots,`default`)],8,[`to`])):createCommentVNode(``,!0)],64))}}),Qy=defineComponent({__name:`SelectViewport`,props:{nonce:{},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{nonce:e$3}=toRefs(t),n$2=Ja(e$3),l$1=St$1(zt),s$1=l$1.position===`item-aligned`?Io():void 0,{forwardRef:r$2,currentElement:i$1}=R$1();onMounted(()=>{l$1?.onViewportChange(i$1.value)});let u$1=ref(0);function d$2(c$4){let f$3=c$4.currentTarget,{shouldExpandOnScrollRef:v$2,contentWrapper:p$5}=s$1??{};if(v$2!=null&&v$2.value&&p$5!=null&&p$5.value){let g$2=Math.abs(u$1.value-f$3.scrollTop);if(g$2>0){let m$3=window.innerHeight-qe*2,_$2=Number.parseFloat(p$5.value.style.minHeight),C$3=Number.parseFloat(p$5.value.style.height),$$2=Math.max(_$2,C$3);if($$20?P$2:0,p$5.value.style.justifyContent=`flex-end`)}}}u$1.value=f$3.scrollTop}return(c$4,f$3)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$1),mergeProps({ref:unref(r$2),"data-radix-select-viewport":``,role:`presentation`},{...c$4.$attrs,...t},{style:{position:`relative`,flex:1,overflow:`hidden auto`},onScroll:d$2}),{default:withCtx(()=>[renderSlot(c$4.$slots,`default`)]),_:3},16),createVNode(unref(O$1),{as:`style`,nonce:unref(n$2)},{default:withCtx(()=>[createTextVNode(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-select-viewport]::-webkit-scrollbar { display: none; } `)]),_:1},8,[`nonce`])],64))}}),ks=defineComponent({__name:`SelectScrollButtonImpl`,emits:[`autoScroll`],setup(a$2,{emit:t}){let e$3=t,{injectCollection:n$2}=Fe(),l$1=n$2(),s$1=St$1(zt),r$2=ref(null);function i$1(){r$2.value!==null&&(window.clearInterval(r$2.value),r$2.value=null)}watchEffect(()=>{let c$4=l$1.value.find(f$3=>f$3===me());c$4?.scrollIntoView({block:`nearest`})});function u$1(){r$2.value===null&&(r$2.value=window.setInterval(()=>{e$3(`autoScroll`)},50))}function d$2(){var c$4;(c$4=s$1.onItemLeave)==null||c$4.call(s$1),r$2.value===null&&(r$2.value=window.setInterval(()=>{e$3(`autoScroll`)},50))}return onBeforeUnmount(()=>i$1()),(c$4,f$3)=>{var v$2;return openBlock(),createBlock(unref(O$1),mergeProps({"aria-hidden":`true`,style:{flexShrink:0}},(v$2=c$4.$parent)?.$props,{onPointerdown:u$1,onPointermove:d$2,onPointerleave:f$3[0]||=()=>{i$1()}}),{default:withCtx(()=>[renderSlot(c$4.$slots,`default`)]),_:3},16)}}}),eg=defineComponent({__name:`SelectScrollUpButton`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=St$1(zt),e$3=t.position===`item-aligned`?Io():void 0,{forwardRef:n$2,currentElement:l$1}=R$1(),s$1=ref(!1);return watchEffect(r$2=>{var i$1,u$1;if((i$1=t.viewport)!=null&&i$1.value&&(u$1=t.isPositioned)!=null&&u$1.value){let d$2=function(){s$1.value=c$4.scrollTop>0},c$4=t.viewport.value;d$2(),c$4.addEventListener(`scroll`,d$2),r$2(()=>c$4.removeEventListener(`scroll`,d$2))}}),watch(l$1,()=>{l$1.value&&e$3?.onScrollButtonChange(l$1.value)}),(r$2,i$1)=>s$1.value?(openBlock(),createBlock(ks,{key:0,ref:unref(n$2),onAutoScroll:i$1[0]||=()=>{let{viewport:u$1,selectedItem:d$2}=unref(t);u$1!=null&&u$1.value&&d$2!=null&&d$2.value&&(u$1.value.scrollTop=u$1.value.scrollTop-d$2.value.offsetHeight)}},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},512)):createCommentVNode(``,!0)}}),tg=defineComponent({__name:`SelectScrollDownButton`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=St$1(zt),e$3=t.position===`item-aligned`?Io():void 0,{forwardRef:n$2,currentElement:l$1}=R$1(),s$1=ref(!1);return watchEffect(r$2=>{var i$1,u$1;if((i$1=t.viewport)!=null&&i$1.value&&(u$1=t.isPositioned)!=null&&u$1.value){let d$2=function(){let f$3=c$4.scrollHeight-c$4.clientHeight;s$1.value=Math.ceil(c$4.scrollTop)c$4.removeEventListener(`scroll`,d$2))}}),watch(l$1,()=>{l$1.value&&e$3?.onScrollButtonChange(l$1.value)}),(r$2,i$1)=>s$1.value?(openBlock(),createBlock(ks,{key:0,ref:unref(n$2),onAutoScroll:i$1[0]||=()=>{let{viewport:u$1,selectedItem:d$2}=unref(t);u$1!=null&&u$1.value&&d$2!=null&&d$2.value&&(u$1.value.scrollTop=u$1.value.scrollTop+d$2.value.offsetHeight)}},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},512)):createCommentVNode(``,!0)}}),ag=defineComponent({__name:`SelectValue`,props:{placeholder:{default:``},asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let{forwardRef:t,currentElement:e$3}=R$1(),n$2=xt(),l$1=useSlots();return onBeforeMount(()=>{var r$2;let s$1=!!qa((r$2=l$1?.default)?.call(l$1)).length;n$2.onValueElementHasChildrenChange(s$1)}),onMounted(()=>{n$2.valueElement=e$3}),(s$1,r$2)=>(openBlock(),createBlock(unref(O$1),{ref:unref(t),as:s$1.as,"as-child":s$1.asChild,style:{pointerEvents:`none`}},{default:withCtx(()=>{var i$1;return[unref(As)((i$1=unref(n$2).modelValue)?.value)?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(s$1.placeholder),1)],64)):renderSlot(s$1.$slots,`default`,{key:1})]}),_:3},8,[`as`,`as-child`]))}}),ng=defineComponent({__name:`SelectIcon`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){return(t,e$3)=>(openBlock(),createBlock(unref(O$1),{"aria-hidden":`true`,as:t.as,"as-child":t.asChild},{default:withCtx(()=>[renderSlot(t.$slots,`default`,{},()=>[createTextVNode(`▼`)])]),_:3},8,[`as`,`as-child`]))}}),Ms=defineComponent({__name:`BaseSeparator`,props:{orientation:{default:`horizontal`},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=[`horizontal`,`vertical`];function n$2(i$1){return e$3.includes(i$1)}let l$1=computed(()=>n$2(t.orientation)?t.orientation:`horizontal`),s$1=computed(()=>l$1.value===`vertical`?t.orientation:void 0),r$2=computed(()=>t.decorative?{role:`none`}:{"aria-orientation":s$1.value,role:`separator`});return(i$1,u$1)=>(openBlock(),createBlock(unref(O$1),mergeProps({as:i$1.as,"as-child":i$1.asChild,"data-orientation":l$1.value},r$2.value),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16,[`as`,`as-child`,`data-orientation`]))}}),ap=defineComponent({__name:`Separator`,props:{orientation:{default:`horizontal`},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(Ms,normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}});function np(a$2=[],t,e$3){let n$2=[...a$2];return n$2[e$3]=t,n$2.sort((l$1,s$1)=>l$1-s$1)}function Vs(a$2,t,e$3){let s$1=100/(e$3-t)*(a$2-t);return Ut(s$1,0,100)}function op(a$2,t){return t>2?`Value ${a$2+1} of ${t}`:t===2?[`Minimum`,`Maximum`][a$2]:void 0}function lp(a$2,t){if(a$2.length===1)return 0;let e$3=a$2.map(l$1=>Math.abs(l$1-t)),n$2=Math.min(...e$3);return e$3.indexOf(n$2)}function sp(a$2,t,e$3){let n$2=a$2/2,s$1=To([0,50],[0,n$2]);return(n$2-s$1(t)*e$3)*e$3}function rp(a$2){return a$2.slice(0,-1).map((t,e$3)=>a$2[e$3+1]-t)}function ip(a$2,t){if(t>0){let e$3=rp(a$2);return Math.min(...e$3)>=t}return!0}function To(a$2,t){return e$3=>{if(a$2[0]===a$2[1]||t[0]===t[1])return t[0];let n$2=(t[1]-t[0])/(a$2[1]-a$2[0]);return t[0]+n$2*(e$3-a$2[0])}}function up(a$2){return(String(a$2).split(`.`)[1]||``).length}function dp(a$2,t){let e$3=10**t;return Math.round(a$2*e$3)/e$3}const Fs=[`PageUp`,`PageDown`],Ns=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Ls={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},[zs,Ks]=te([`SliderVertical`,`SliderHorizontal`]),Hs=defineComponent({__name:`SliderImpl`,props:{asChild:{type:Boolean},as:{default:`span`}},emits:[`slideStart`,`slideMove`,`slideEnd`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=un();return(s$1,r$2)=>(openBlock(),createBlock(unref(O$1),mergeProps({"data-slider-impl":``},e$3,{onKeydown:r$2[0]||=i$1=>{i$1.key===`Home`?(n$2(`homeKeyDown`,i$1),i$1.preventDefault()):i$1.key===`End`?(n$2(`endKeyDown`,i$1),i$1.preventDefault()):unref(Fs).concat(unref(Ns)).includes(i$1.key)&&(n$2(`stepKeyDown`,i$1),i$1.preventDefault())},onPointerdown:r$2[1]||=i$1=>{let u$1=i$1.target;u$1.setPointerCapture(i$1.pointerId),i$1.preventDefault(),unref(l$1).thumbElements.value.includes(u$1)?u$1.focus():n$2(`slideStart`,i$1)},onPointermove:r$2[2]||=i$1=>{i$1.target.hasPointerCapture(i$1.pointerId)&&n$2(`slideMove`,i$1)},onPointerup:r$2[3]||=i$1=>{let u$1=i$1.target;u$1.hasPointerCapture(i$1.pointerId)&&(u$1.releasePointerCapture(i$1.pointerId),n$2(`slideEnd`,i$1))}}),{default:withCtx(()=>[renderSlot(s$1.$slots,`default`)]),_:3},16))}}),cp=defineComponent({__name:`SliderHorizontal`,props:{dir:{},min:{},max:{},inverted:{type:Boolean}},emits:[`slideEnd`,`slideStart`,`slideMove`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{max:l$1,min:s$1,dir:r$2,inverted:i$1}=toRefs(e$3),{forwardRef:u$1,currentElement:d$2}=R$1(),c$4=ref(),f$3=computed(()=>r$2?.value===`ltr`&&!i$1.value||r$2?.value!==`ltr`&&i$1.value);function v$2(p$5){let g$2=c$4.value||d$2.value.getBoundingClientRect(),m$3=[0,g$2.width],_$2=f$3.value?[s$1.value,l$1.value]:[l$1.value,s$1.value],C$3=To(m$3,_$2);return c$4.value=g$2,C$3(p$5-g$2.left)}return Ks({startEdge:f$3.value?`left`:`right`,endEdge:f$3.value?`right`:`left`,direction:f$3.value?1:-1,size:`width`}),(p$5,g$2)=>(openBlock(),createBlock(Hs,{ref:unref(u$1),dir:unref(r$2),"data-orientation":`horizontal`,style:{"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:g$2[0]||=m$3=>{let _$2=v$2(m$3.clientX);n$2(`slideStart`,_$2)},onSlideMove:g$2[1]||=m$3=>{let _$2=v$2(m$3.clientX);n$2(`slideMove`,_$2)},onSlideEnd:g$2[2]||=()=>{c$4.value=void 0,n$2(`slideEnd`)},onStepKeyDown:g$2[3]||=m$3=>{let _$2=f$3.value?`from-left`:`from-right`,C$3=unref(Ls)[_$2].includes(m$3.key);n$2(`stepKeyDown`,m$3,C$3?-1:1)},onEndKeyDown:g$2[4]||=m$3=>n$2(`endKeyDown`,m$3),onHomeKeyDown:g$2[5]||=m$3=>n$2(`homeKeyDown`,m$3)},{default:withCtx(()=>[renderSlot(p$5.$slots,`default`)]),_:3},8,[`dir`]))}}),fp=defineComponent({__name:`SliderVertical`,props:{min:{},max:{},inverted:{type:Boolean}},emits:[`slideEnd`,`slideStart`,`slideMove`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{max:l$1,min:s$1,inverted:r$2}=toRefs(e$3),{forwardRef:i$1,currentElement:u$1}=R$1(),d$2=ref(),c$4=computed(()=>!r$2.value);function f$3(v$2){let p$5=d$2.value||u$1.value.getBoundingClientRect(),g$2=[0,p$5.height],m$3=c$4.value?[l$1.value,s$1.value]:[s$1.value,l$1.value],_$2=To(g$2,m$3);return d$2.value=p$5,_$2(v$2-p$5.top)}return Ks({startEdge:c$4.value?`bottom`:`top`,endEdge:c$4.value?`top`:`bottom`,size:`height`,direction:c$4.value?1:-1}),(v$2,p$5)=>(openBlock(),createBlock(Hs,{ref:unref(i$1),"data-orientation":`vertical`,style:{"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:p$5[0]||=g$2=>{let m$3=f$3(g$2.clientY);n$2(`slideStart`,m$3)},onSlideMove:p$5[1]||=g$2=>{let m$3=f$3(g$2.clientY);n$2(`slideMove`,m$3)},onSlideEnd:p$5[2]||=()=>{d$2.value=void 0,n$2(`slideEnd`)},onStepKeyDown:p$5[3]||=g$2=>{let m$3=c$4.value?`from-bottom`:`from-top`,_$2=unref(Ls)[m$3].includes(g$2.key);n$2(`stepKeyDown`,g$2,_$2?-1:1)},onEndKeyDown:p$5[4]||=g$2=>n$2(`endKeyDown`,g$2),onHomeKeyDown:p$5[5]||=g$2=>n$2(`homeKeyDown`,g$2)},{default:withCtx(()=>[renderSlot(v$2.$slots,`default`)]),_:3},512))}}),pp=[`value`,`name`,`disabled`,`step`],[un,vp]=te(`SliderRoot`),og=defineComponent({inheritAttrs:!1,__name:`SliderRoot`,props:{name:{},defaultValue:{default:()=>[0]},modelValue:{},disabled:{type:Boolean,default:!1},orientation:{default:`horizontal`},dir:{},inverted:{type:Boolean,default:!1},min:{default:0},max:{default:100},step:{default:1},minStepsBetweenThumbs:{default:0},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`valueCommit`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{min:l$1,max:s$1,step:r$2,minStepsBetweenThumbs:i$1,orientation:u$1,disabled:d$2,dir:c$4}=toRefs(e$3),f$3=we(c$4),{forwardRef:v$2,currentElement:p$5}=R$1(),g$2=at(p$5);Ca();let m$3=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.modelValue===void 0}),_$2=ref(0),C$3=ref(m$3.value);function $$2(I){let M$1=lp(m$3.value,I);P$2(I,M$1)}function h$3(I){P$2(I,_$2.value)}function E$2(){let I=C$3.value[_$2.value];m$3.value[_$2.value]!==I&&n$2(`valueCommit`,toRaw(m$3.value))}function P$2(I,M$1,{commit:V$2}={commit:!1}){var Q$3;let A$2=up(r$2.value),F$2=dp(Math.round((I-l$1.value)/r$2.value)*r$2.value+l$1.value,A$2),j$1=Ut(F$2,l$1.value,s$1.value),H$3=np(m$3.value,j$1,M$1);if(ip(H$3,i$1.value*r$2.value)){_$2.value=H$3.indexOf(j$1);let G$2=String(H$3)!==String(m$3.value);G$2&&V$2&&n$2(`valueCommit`,H$3),G$2&&((Q$3=D$1.value[_$2.value])==null||Q$3.focus(),m$3.value=H$3)}}let D$1=ref([]);return vp({modelValue:m$3,valueIndexToChangeRef:_$2,thumbElements:D$1,orientation:u$1,min:l$1,max:s$1,disabled:d$2}),(I,M$1)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(wa),null,{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(u$1)===`horizontal`?cp:fp),mergeProps(I.$attrs,{ref:unref(v$2),"as-child":I.asChild,as:I.as,min:unref(l$1),max:unref(s$1),dir:unref(f$3),inverted:I.inverted,"aria-disabled":unref(d$2),"data-disabled":unref(d$2)?``:void 0,onPointerdown:M$1[0]||=()=>{unref(d$2)||(C$3.value=unref(m$3))},onSlideStart:M$1[1]||=V$2=>!unref(d$2)&&$$2(V$2),onSlideMove:M$1[2]||=V$2=>!unref(d$2)&&h$3(V$2),onSlideEnd:M$1[3]||=V$2=>!unref(d$2)&&E$2(),onHomeKeyDown:M$1[4]||=V$2=>!unref(d$2)&&P$2(unref(l$1),0,{commit:!0}),onEndKeyDown:M$1[5]||=V$2=>!unref(d$2)&&P$2(unref(s$1),unref(m$3).length-1,{commit:!0}),onStepKeyDown:M$1[6]||=(V$2,A$2)=>{if(!unref(d$2)){let H$3=unref(Fs).includes(V$2.key)||V$2.shiftKey&&unref(Ns).includes(V$2.key)?10:1,Q$3=_$2.value,G$2=unref(m$3)[Q$3],J$2=unref(r$2)*H$3*A$2;P$2(G$2+J$2,Q$3,{commit:!0})}}}),{default:withCtx(()=>[renderSlot(I.$slots,`default`,{modelValue:unref(m$3)})]),_:3},16,[`as-child`,`as`,`min`,`max`,`dir`,`inverted`,`aria-disabled`,`data-disabled`]))]),_:3}),unref(g$2)?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(unref(m$3),(V$2,A$2)=>(openBlock(),createElementBlock(`input`,{key:A$2,value:V$2,type:`number`,style:{display:`none`},name:I.name?I.name+(unref(m$3).length>1?`[]`:``):void 0,disabled:unref(d$2),step:unref(r$2)},null,8,pp))),128)):createCommentVNode(``,!0)],64))}}),mp=defineComponent({inheritAttrs:!1,__name:`SliderThumbImpl`,props:{index:{},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=un(),n$2=zs(),{forwardRef:l$1,currentElement:s$1}=R$1(),r$2=computed(()=>{var p$5,g$2;return(g$2=(p$5=e$3.modelValue)?.value)?.[t.index]}),i$1=computed(()=>r$2.value===void 0?0:Vs(r$2.value,e$3.min.value??0,e$3.max.value??100)),u$1=computed(()=>{var p$5,g$2;return op(t.index,(g$2=(p$5=e$3.modelValue)?.value)?.length??0)}),d$2=Ll(s$1),c$4=computed(()=>d$2[n$2.size].value),f$3=computed(()=>c$4.value?sp(c$4.value,i$1.value,n$2.direction):0),v$2=Ga();return onMounted(()=>{e$3.thumbElements.value.push(s$1.value)}),onUnmounted(()=>{let p$5=e$3.thumbElements.value.findIndex(g$2=>g$2===s$1.value)??-1;e$3.thumbElements.value.splice(p$5,1)}),(p$5,g$2)=>(openBlock(),createBlock(unref(Qt),null,{default:withCtx(()=>[createVNode(unref(O$1),mergeProps(p$5.$attrs,{ref:unref(l$1),role:`slider`,"data-radix-vue-collection-item":``,tabindex:unref(e$3).disabled.value?void 0:0,"aria-label":p$5.$attrs[`aria-label`]||u$1.value,"data-disabled":unref(e$3).disabled.value?``:void 0,"data-orientation":unref(e$3).orientation.value,"aria-valuenow":r$2.value,"aria-valuemin":unref(e$3).min.value,"aria-valuemax":unref(e$3).max.value,"aria-orientation":unref(e$3).orientation.value,"as-child":p$5.asChild,as:p$5.as,style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[unref(n$2).startEdge]:`calc(${i$1.value}% + ${f$3.value}px)`,display:!unref(v$2)&&r$2.value===void 0?`none`:void 0},onFocus:g$2[0]||=()=>{unref(e$3).valueIndexToChangeRef.value=p$5.index}}),{default:withCtx(()=>[renderSlot(p$5.$slots,`default`)]),_:3},16,[`tabindex`,`aria-label`,`data-disabled`,`data-orientation`,`aria-valuenow`,`aria-valuemin`,`aria-valuemax`,`aria-orientation`,`as-child`,`as`,`style`])]),_:3}))}}),lg=defineComponent({__name:`SliderThumb`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{getItems:e$3}=ea(),{forwardRef:n$2,currentElement:l$1}=R$1(),s$1=computed(()=>l$1.value?e$3().findIndex(r$2=>r$2.ref===l$1.value):-1);return(r$2,i$1)=>(openBlock(),createBlock(mp,mergeProps({ref:unref(n$2)},t,{index:s$1.value}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`index`]))}}),sg=defineComponent({__name:`SliderTrack`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=un();return R$1(),(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),{"as-child":e$3.asChild,as:e$3.as,"data-disabled":unref(t).disabled.value?``:void 0,"data-orientation":unref(t).orientation.value},{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},8,[`as-child`,`as`,`data-disabled`,`data-orientation`]))}}),rg=defineComponent({__name:`SliderRange`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=un(),e$3=zs();R$1();let n$2=computed(()=>{var r$2,i$1;return(i$1=(r$2=t.modelValue)?.value)?.map(u$1=>Vs(u$1,t.min.value,t.max.value))}),l$1=computed(()=>t.modelValue.value.length>1?Math.min(...n$2.value):0),s$1=computed(()=>100-Math.max(...n$2.value));return(r$2,i$1)=>(openBlock(),createBlock(unref(O$1),{"data-disabled":unref(t).disabled.value?``:void 0,"data-orientation":unref(t).orientation.value,"as-child":r$2.asChild,as:r$2.as,style:normalizeStyle({[unref(e$3).startEdge]:`${l$1.value}%`,[unref(e$3).endEdge]:`${s$1.value}%`})},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},8,[`data-disabled`,`data-orientation`,`as-child`,`as`,`style`]))}});let kn=null,$t$1=null;function hp(a$2,t){if(t){let e$3=(t&Xs)!==0,n$2=(t&Zs)!==0,l$1=(t&Js)!==0,s$1=(t&Qs)!==0;if(e$3)return l$1?`se-resize`:s$1?`ne-resize`:`e-resize`;if(n$2)return l$1?`sw-resize`:s$1?`nw-resize`:`w-resize`;if(l$1)return`s-resize`;if(s$1)return`n-resize`}switch(a$2){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function Ws(){$t$1!==null&&(document.head.removeChild($t$1),kn=null,$t$1=null)}function Pn(a$2,t){let e$3=hp(a$2,t);kn!==e$3&&(kn=e$3,$t$1===null&&($t$1=document.createElement(`style`),document.head.appendChild($t$1)),$t$1.innerHTML=`*{cursor: ${e$3}!important;}`)}function yp({defaultSize:a$2,dragState:t,layout:e$3,panelData:n$2,panelIndex:l$1,precision:s$1=3}){let r$2=e$3[l$1],i$1;return i$1=r$2==null?a$2===void 0?`1`:a$2.toPrecision(s$1):n$2.length===1?`1`:r$2.toPrecision(s$1),{flexBasis:0,flexGrow:i$1,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function js(a$2){return a$2.type===`keydown`}function Us(a$2){return a$2.type.startsWith(`mouse`)}function Gs(a$2){return a$2.type.startsWith(`touch`)}function dn(a$2){if(Us(a$2))return{x:a$2.clientX,y:a$2.clientY};if(Gs(a$2)){let t=a$2.touches[0];if(t&&t.clientX&&t.clientY)return{x:t.clientX,y:t.clientY}}return{x:1/0,y:1/0}}function qs(a$2,t){let e$3=a$2===`horizontal`,{x:n$2,y:l$1}=dn(t);return e$3?n$2:l$1}function gp(a$2,t,e$3){return a$2.xt.x&&a$2.yt.y}function pe(a$2,t=`Assertion failed!`){if(!a$2)throw console.error(t),Error(t)}function bp(a$2,t){if(a$2===t)throw Error(`Cannot compare node with itself`);let e$3={a:ll(a$2),b:ll(t)},n$2;for(;e$3.a.at(-1)===e$3.b.at(-1);)a$2=e$3.a.pop(),t=e$3.b.pop(),n$2=a$2;pe(n$2);let l$1={a:ol(nl(e$3.a)),b:ol(nl(e$3.b))};if(l$1.a===l$1.b){let s$1=n$2.childNodes,r$2={a:e$3.a.at(-1),b:e$3.b.at(-1)},i$1=s$1.length;for(;i$1--;){let u$1=s$1[i$1];if(u$1===r$2.a)return 1;if(u$1===r$2.b)return-1}}return Math.sign(l$1.a-l$1.b)}const Cp=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function wp(a$2){let t=getComputedStyle(Ys(a$2)).display;return t===`flex`||t===`inline-flex`}function _p(a$2){let t=getComputedStyle(a$2);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||wp(a$2))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||Cp.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function nl(a$2){let t=a$2.length;for(;t--;){let e$3=a$2[t];if(pe(e$3),_p(e$3))return e$3}return null}function ol(a$2){return a$2&&Number(getComputedStyle(a$2).zIndex)||0}function ll(a$2){let t=[];for(;a$2;)t.push(a$2),a$2=Ys(a$2);return t}function Ys(a$2){var t;return a$2.parentNode instanceof DocumentFragment&&(t=a$2.parentNode)?.host||a$2.parentNode}const Xs=1,Zs=2,Js=4,Qs=8;function xp(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}const Sp=xp()===`coarse`,yt$1=[];let cn$1=!1;const vt$1=new Map,fn=new Map,fa=new Set;function Ep(a$2,t,e$3,n$2,l$1){let{ownerDocument:s$1}=t,r$2={direction:e$3,element:t,hitAreaMargins:n$2,setResizeHandlerState:l$1},i$1=vt$1.get(s$1)??0;return vt$1.set(s$1,i$1+1),fa.add(r$2),Ha(),function(){fn.delete(a$2),fa.delete(r$2);let d$2=vt$1.get(s$1)??1;vt$1.set(s$1,d$2-1),Ha(),Ws(),d$2===1&&vt$1.delete(s$1)}}function Aa(a$2){let{target:t}=a$2,{x:e$3,y:n$2}=dn(a$2);cn$1=!0,Ro({target:t,x:e$3,y:n$2}),Ha(),yt$1.length>0&&(Ao(`down`,a$2),a$2.preventDefault())}function ct$1(a$2){let{x:t,y:e$3}=dn(a$2);if(!cn$1){let{target:n$2}=a$2;Ro({target:n$2,x:t,y:e$3})}Ao(`move`,a$2),er(),yt$1.length>0&&a$2.preventDefault()}function ft$1(a$2){let{target:t}=a$2,{x:e$3,y:n$2}=dn(a$2);fn.clear(),cn$1=!1,yt$1.length>0&&a$2.preventDefault(),Ao(`up`,a$2),Ro({target:t,x:e$3,y:n$2}),er(),Ha()}function Ro({target:a$2,x:t,y:e$3}){yt$1.splice(0);let n$2=null;a$2 instanceof HTMLElement&&(n$2=a$2),fa.forEach(l$1=>{let{element:s$1,hitAreaMargins:r$2}=l$1,i$1=s$1.getBoundingClientRect(),{bottom:u$1,left:d$2,right:c$4,top:f$3}=i$1,v$2=Sp?r$2.coarse:r$2.fine;if(t>=d$2-v$2&&t<=c$4+v$2&&e$3>=f$3-v$2&&e$3<=u$1+v$2){if(n$2!==null&&s$1!==n$2&&!s$1.contains(n$2)&&!n$2.contains(s$1)&&bp(n$2,s$1)>0){let g$2=n$2,m$3=!1;for(;g$2&&!g$2.contains(s$1);){if(gp(g$2.getBoundingClientRect(),i$1)){m$3=!0;break}g$2=g$2.parentElement}if(m$3)return}yt$1.push(l$1)}})}function Dn(a$2,t){fn.set(a$2,t)}function er(){let a$2=!1,t=!1;yt$1.forEach(n$2=>{let{direction:l$1}=n$2;l$1.value===`horizontal`?a$2=!0:t=!0});let e$3=0;fn.forEach(n$2=>{e$3|=n$2}),a$2&&t?Pn(`intersection`,e$3):a$2?Pn(`horizontal`,e$3):t?Pn(`vertical`,e$3):Ws()}function Ha(){vt$1.forEach((a$2,t)=>{let{body:e$3}=t;e$3.removeEventListener(`contextmenu`,ft$1),e$3.removeEventListener(`mousedown`,Aa),e$3.removeEventListener(`mouseleave`,ct$1),e$3.removeEventListener(`mousemove`,ct$1),e$3.removeEventListener(`touchmove`,ct$1),e$3.removeEventListener(`touchstart`,Aa)}),window.removeEventListener(`mouseup`,ft$1),window.removeEventListener(`touchcancel`,ft$1),window.removeEventListener(`touchend`,ft$1),fa.size>0&&(cn$1?(yt$1.length>0&&vt$1.forEach((a$2,t)=>{let{body:e$3}=t;a$2>0&&(e$3.addEventListener(`contextmenu`,ft$1),e$3.addEventListener(`mouseleave`,ct$1),e$3.addEventListener(`mousemove`,ct$1),e$3.addEventListener(`touchmove`,ct$1,{passive:!1}))}),window.addEventListener(`mouseup`,ft$1),window.addEventListener(`touchcancel`,ft$1),window.addEventListener(`touchend`,ft$1)):vt$1.forEach((a$2,t)=>{let{body:e$3}=t;a$2>0&&(e$3.addEventListener(`mousedown`,Aa),e$3.addEventListener(`mousemove`,ct$1),e$3.addEventListener(`touchmove`,ct$1,{passive:!1}),e$3.addEventListener(`touchstart`,Aa))}))}function Ao(a$2,t){fa.forEach(e$3=>{let{setResizeHandlerState:n$2}=e$3,l$1=yt$1.includes(e$3);n$2(a$2,l$1,t)})}const Oo=10;function pa(a$2,t,e$3=Oo){a$2=Number.parseFloat(a$2.toFixed(e$3)),t=Number.parseFloat(t.toFixed(e$3));let n$2=a$2-t;return n$2===0?0:n$2>0?1:-1}function Le(a$2,t,e$3){return pa(a$2,t,e$3)===0}function Wt({panelConstraints:a$2,panelIndex:t,size:e$3}){let n$2=a$2[t];pe(n$2!=null);let{collapsedSize:l$1=0,collapsible:s$1,maxSize:r$2=100,minSize:i$1=0}=n$2;if(pa(e$3,i$1)<0)if(s$1){let u$1=(l$1+i$1)/2;e$3=pa(e$3,u$1)<0?l$1:i$1}else e$3=i$1;return e$3=Math.min(r$2,e$3),e$3=Number.parseFloat(e$3.toFixed(Oo)),e$3}function Oa(a$2,t){if(a$2.length!==t.length)return!1;for(let e$3=0;e$30&&(a$2=a$2<0?0-_$2:_$2)}}}{let c$4=a$2<0?r$2:i$1,f$3=e$3[c$4];pe(f$3);let{collapsible:v$2}=f$3;if(v$2){let p$5=t[c$4];pe(p$5!=null);let g$2=e$3[c$4];pe(g$2);let{collapsedSize:m$3=0,minSize:_$2=0}=g$2;if(Le(p$5,_$2)){let C$3=p$5-m$3;pa(C$3,Math.abs(a$2))>0&&(a$2=a$2<0?0-C$3:C$3)}}}}{let c$4=a$2<0?1:-1,f$3=a$2<0?i$1:r$2,v$2=0;for(;;){let g$2=t[f$3];pe(g$2!=null);let _$2=Wt({panelConstraints:e$3,panelIndex:f$3,size:100})-g$2;if(v$2+=_$2,f$3+=c$4,f$3<0||f$3>=e$3.length)break}let p$5=Math.min(Math.abs(a$2),Math.abs(v$2));a$2=a$2<0?0-p$5:p$5}{let f$3=a$2<0?r$2:i$1;for(;f$3>=0&&f$3=0))break;a$2<0?f$3--:f$3++}}if(Le(u$1,0))return t;{let c$4=a$2<0?i$1:r$2,f$3=t[c$4];pe(f$3!=null);let v$2=f$3+u$1,p$5=Wt({panelConstraints:e$3,panelIndex:c$4,size:v$2});if(s$1[c$4]=p$5,!Le(p$5,v$2)){let g$2=v$2-p$5,_$2=a$2<0?i$1:r$2;for(;_$2>=0&&_$20?_$2--:_$2++}}}let d$2=s$1.reduce((c$4,f$3)=>f$3+c$4,0);return Le(d$2,100)?s$1:t}function tr(a$2,t=document){var n$2;if(!ha)return null;if(t instanceof HTMLElement&&(n$2=t?.dataset)?.panelGroupId===a$2)return t;let e$3=t.querySelector(`[data-panel-group][data-panel-group-id="${a$2}"]`);return e$3||null}function pn(a$2,t=document){if(!ha)return null;let e$3=t.querySelector(`[data-panel-resize-handle-id="${a$2}"]`);return e$3||null}function ar(a$2,t,e$3=document){return ha?va(a$2,e$3).findIndex(s$1=>s$1.getAttribute(`data-panel-resize-handle-id`)===t)??null:null}function va(a$2,t=document){return ha?Array.from(t.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${a$2}"]`)):[]}function Pp(a$2,t,e$3,n$2=document){var d$2,c$4;let l$1=pn(t,n$2),s$1=va(a$2,n$2),r$2=l$1?s$1.indexOf(l$1):-1,i$1=(d$2=e$3[r$2])?.id??null,u$1=(c$4=e$3[r$2+1])?.id??null;return[i$1,u$1]}function Dp(a$2,t,e$3,n$2,l$1){let s$1=e$3===`horizontal`,r$2=pn(t,l$1);pe(r$2);let i$1=r$2.getAttribute(`data-panel-group-id`);pe(i$1);let{initialCursorPosition:u$1}=n$2,d$2=qs(e$3,a$2),c$4=tr(i$1,l$1);pe(c$4);let f$3=c$4.getBoundingClientRect(),v$2=s$1?f$3.width:f$3.height;return(d$2-u$1)/v$2*100}function $p(a$2,t,e$3,n$2,l$1,s$1){if(js(a$2)){let r$2=e$3===`horizontal`,i$1=0;i$1=a$2.shiftKey?100:l$1??10;let u$1=0;switch(a$2.key){case`ArrowDown`:u$1=r$2?0:i$1;break;case`ArrowLeft`:u$1=r$2?-i$1:0;break;case`ArrowRight`:u$1=r$2?i$1:0;break;case`ArrowUp`:u$1=r$2?0:-i$1;break;case`End`:u$1=100;break;case`Home`:u$1=-100;break}return u$1}else return n$2==null?0:Dp(a$2,t,e$3,n$2,s$1)}function Bp({layout:a$2,panelsArray:t,pivotIndices:e$3}){let n$2=0,l$1=100,s$1=0,r$2=0,i$1=e$3[0];pe(i$1!=null),t.forEach((f$3,v$2)=>{let{constraints:p$5}=f$3,{maxSize:g$2=100,minSize:m$3=0}=p$5;v$2===i$1?(n$2=m$3,l$1=g$2):(s$1+=m$3,r$2+=g$2)});let u$1=Math.min(l$1,100-s$1),d$2=Math.max(n$2,100-r$2),c$4=a$2[i$1];return{valueMax:u$1,valueMin:d$2,valueNow:c$4}}function Ip({panelDataArray:a$2}){let t=Array(a$2.length),e$3=a$2.map(s$1=>s$1.constraints),n$2=0,l$1=100;for(let s$1=0;s$1{let s$1=a$2[l$1];pe(s$1);let{callbacks:r$2,constraints:i$1,id:u$1}=s$1,{collapsedSize:d$2=0,collapsible:c$4}=i$1,f$3=e$3[u$1];if(f$3==null||n$2!==f$3){e$3[u$1]=n$2;let{onCollapse:v$2,onExpand:p$5,onResize:g$2}=r$2;g$2&&g$2(n$2,f$3),c$4&&(v$2||p$5)&&(p$5&&(f$3==null||f$3===d$2)&&n$2!==d$2&&p$5(),v$2&&(f$3==null||f$3!==d$2)&&n$2===d$2&&v$2())}})}function Tp(a$2,t=10){let e$3=null;return(...l$1)=>{e$3!==null&&clearTimeout(e$3),e$3=setTimeout(()=>{a$2(...l$1)},t)}}function nr(a$2,t,e$3){let n$2=ar(a$2,t,e$3);return n$2==null?[-1,-1]:[n$2,n$2+1]}function Rp({layout:a$2,panelConstraints:t}){let e$3=[...a$2],n$2=e$3.reduce((s$1,r$2)=>s$1+r$2,0);if(e$3.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${e$3.map(s$1=>`${s$1}%`).join(`, `)}`);if(!Le(n$2,100)){console.warn(`WARNING: Invalid layout total size: ${e$3.map(s$1=>`${s$1}%`).join(`, `)}. Layout normalization will be applied.`);for(let s$1=0;s$1localStorage.getItem(t),a$2.setItem=(t,e$3)=>{localStorage.setItem(t,e$3)};else throw TypeError(`localStorage not supported in this environment`)}catch(t){console.error(t),a$2.getItem=()=>null,a$2.setItem=()=>{}}}function or(a$2){return`radix-vue:${a$2}`}function lr(a$2){return a$2.map(t=>{let{constraints:e$3,id:n$2,idIsFromProps:l$1,order:s$1}=t;return l$1?n$2:s$1?`${s$1}:${JSON.stringify(e$3)}`:JSON.stringify(e$3)}).sort((t,e$3)=>t.localeCompare(e$3)).join(`,`)}function sr(a$2,t){try{let e$3=or(a$2),n$2=t.getItem(e$3);if(n$2){let l$1=JSON.parse(n$2);if(typeof l$1==`object`&&l$1)return l$1}}catch{}return null}function Ap(a$2,t,e$3){let n$2=sr(a$2,e$3)??{},l$1=lr(t);return n$2[l$1]??null}function Op(a$2,t,e$3,n$2,l$1){let s$1=or(a$2),r$2=lr(t),i$1=sr(a$2,l$1)??{};i$1[r$2]={expandToSizes:Object.fromEntries(e$3.entries()),layout:n$2};try{l$1.setItem(s$1,JSON.stringify(i$1))}catch(u$1){console.error(u$1)}}function kp({eagerValuesRef:a$2,groupId:t,layout:e$3,panelDataArray:n$2,panelGroupElement:l$1,setLayout:s$1}){watchEffect(r$2=>{let i$1=l$1.value;if(!i$1)return;let u$1=va(t,i$1);for(let d$2=0;d$2{u$1.forEach(d$2=>{d$2.removeAttribute(`aria-controls`),d$2.removeAttribute(`aria-valuemax`),d$2.removeAttribute(`aria-valuemin`),d$2.removeAttribute(`aria-valuenow`)})})}),watchEffect(r$2=>{let i$1=l$1.value;if(!i$1)return;let u$1=a$2.value;pe(u$1);let{panelDataArray:d$2}=u$1,c$4=tr(t,i$1);pe(c$4!=null,`No group found for id "${t}"`);let f$3=va(t,i$1);pe(f$3);let v$2=f$3.map(p$5=>{let g$2=p$5.getAttribute(`data-panel-resize-handle-id`);pe(g$2);let[m$3,_$2]=Pp(t,g$2,d$2,i$1);if(m$3==null||_$2==null)return()=>{};let C$3=$$2=>{if(!$$2.defaultPrevented)switch($$2.key){case`Enter`:{$$2.preventDefault();let h$3=d$2.findIndex(E$2=>E$2.id===m$3);if(h$3>=0){let E$2=d$2[h$3];pe(E$2);let P$2=e$3.value[h$3],{collapsedSize:D$1=0,collapsible:I,minSize:M$1=0}=E$2.constraints;if(P$2!=null&&I){let V$2=sa({delta:Le(P$2,D$1)?M$1-D$1:D$1-P$2,layout:e$3.value,panelConstraints:d$2.map(A$2=>A$2.constraints),pivotIndices:nr(t,g$2,i$1),trigger:`keyboard`});e$3.value!==V$2&&s$1(V$2)}}break}}};return p$5.addEventListener(`keydown`,C$3),()=>{p$5.removeEventListener(`keydown`,C$3)}});r$2(()=>{v$2.forEach(p$5=>p$5())})})}const Mp=100,ra={getItem:a$2=>(sl(ra),ra.getItem(a$2)),setItem:(a$2,t)=>{sl(ra),ra.setItem(a$2,t)}},[rr,Vp]=te(`PanelGroup`),ig=defineComponent({__name:`SplitterGroup`,props:{id:{},autoSaveId:{default:null},direction:{},keyboardResizeBy:{default:10},storage:{default:()=>ra},asChild:{type:Boolean},as:{}},emits:[`layout`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1={},{direction:s$1}=toRefs(e$3),r$2=ge(e$3.id,`radix-vue-splitter-group`),i$1=we(),{forwardRef:u$1,currentElement:d$2}=R$1(),c$4=ref(null),f$3=ref([]),v$2=ref({}),p$5=ref(new Map),g$2=ref(0),m$3=computed(()=>({autoSaveId:e$3.autoSaveId,direction:e$3.direction,dragState:c$4.value,id:r$2,keyboardResizeBy:e$3.keyboardResizeBy,storage:e$3.storage})),_$2=ref({layout:f$3.value,panelDataArray:[],panelDataArrayChanged:!1}),C$3=z$3=>f$3.value=z$3;kp({eagerValuesRef:_$2,groupId:r$2,layout:f$3,panelDataArray:_$2.value.panelDataArray,setLayout:C$3,panelGroupElement:d$2}),watchEffect(()=>{let{panelDataArray:z$3}=_$2.value,{autoSaveId:K$1}=e$3;if(K$1){if(f$3.value.length===0||f$3.value.length!==z$3.length)return;let L$1=l$1[K$1];L$1||(L$1=Tp(Op,Mp),l$1[K$1]=L$1);let N$2=[...z$3],Z$1=new Map(p$5.value);L$1(K$1,N$2,Z$1,f$3.value,e$3.storage)}});function $$2(z$3,K$1){let{panelDataArray:L$1}=_$2.value,N$2=G$2(L$1,z$3);return yp({defaultSize:K$1,dragState:c$4.value,layout:f$3.value,panelData:L$1,panelIndex:N$2})}function h$3(z$3){let{panelDataArray:K$1}=_$2.value;K$1.push(z$3),K$1.sort((L$1,N$2)=>{let Z$1=L$1.order,Y$2=N$2.order;return Z$1==null&&Y$2==null?0:Z$1==null?-1:Y$2==null?1:Z$1-Y$2}),_$2.value.panelDataArrayChanged=!0}watch(()=>_$2.value.panelDataArrayChanged,()=>{if(_$2.value.panelDataArrayChanged){_$2.value.panelDataArrayChanged=!1;let{autoSaveId:z$3,storage:K$1}=m$3.value,{layout:L$1,panelDataArray:N$2}=_$2.value,Z$1=null;if(z$3){let re$3=Ap(z$3,N$2,K$1);re$3&&(p$5.value=new Map(Object.entries(re$3.expandToSizes)),Z$1=re$3.layout)}Z$1===null&&(Z$1=Ip({panelDataArray:N$2}));let Y$2=Rp({layout:Z$1,panelConstraints:N$2.map(re$3=>re$3.constraints)});Gr(L$1,Y$2)||(C$3(Y$2),_$2.value.layout=Y$2,n$2(`layout`,Y$2),la(N$2,Y$2,v$2.value))}});function E$2(z$3){return function(L$1){L$1.preventDefault();let N$2=d$2.value;if(!N$2)return()=>null;let{direction:Z$1,dragState:Y$2,id:re$3,keyboardResizeBy:X$2}=m$3.value,{layout:se$1,panelDataArray:fe$2}=_$2.value,{initialLayout:xe}=Y$2??{},Ee$2=nr(re$3,z$3,N$2),be$2=$p(L$1,z$3,Z$1,Y$2,X$2,N$2);if(be$2===0)return;let de$3=Z$1===`horizontal`;i$1.value===`rtl`&&de$3&&(be$2=-be$2);let Ie=fe$2.map(Et$2=>Et$2.constraints),Ae$1=sa({delta:be$2,layout:xe??se$1,panelConstraints:Ie,pivotIndices:Ee$2,trigger:js(L$1)?`keyboard`:`mouse-or-touch`}),We=!Oa(se$1,Ae$1);(Us(L$1)||Gs(L$1))&&g$2.value!==be$2&&(g$2.value=be$2,We?Dn(z$3,0):de$3?Dn(z$3,be$2<0?Xs:Zs):Dn(z$3,be$2<0?Js:Qs)),We&&(C$3(Ae$1),_$2.value.layout=Ae$1,n$2(`layout`,Ae$1),la(fe$2,Ae$1,v$2.value))}}function P$2(z$3,K$1){let{layout:L$1,panelDataArray:N$2}=_$2.value,Z$1=N$2.map(xe=>xe.constraints),{panelSize:Y$2,pivotIndices:re$3}=J$2(N$2,z$3,L$1);pe(Y$2!=null);let se$1=G$2(N$2,z$3)===N$2.length-1?Y$2-K$1:K$1-Y$2,fe$2=sa({delta:se$1,layout:L$1,panelConstraints:Z$1,pivotIndices:re$3,trigger:`imperative-api`});Oa(L$1,fe$2)||(C$3(fe$2),_$2.value.layout=fe$2,n$2(`layout`,fe$2),la(N$2,fe$2,v$2.value))}function D$1(z$3,K$1){let{layout:L$1,panelDataArray:N$2}=_$2.value,Z$1=G$2(N$2,z$3);N$2[Z$1]=z$3,_$2.value.panelDataArrayChanged=!0;let{collapsedSize:Y$2=0,collapsible:re$3}=K$1,{collapsedSize:X$2=0,collapsible:se$1,maxSize:fe$2=100,minSize:xe=0}=z$3.constraints,{panelSize:Ee$2}=J$2(N$2,z$3,L$1);Ee$2!==null&&(re$3&&se$1&&Ee$2===Y$2?Y$2!==X$2&&P$2(z$3,X$2):Ee$2fe$2&&P$2(z$3,fe$2))}function I(z$3,K$1){let{direction:L$1}=m$3.value,{layout:N$2}=_$2.value;if(!d$2.value)return;let Z$1=pn(z$3,d$2.value);pe(Z$1);let Y$2=qs(L$1,K$1);c$4.value={dragHandleId:z$3,dragHandleRect:Z$1.getBoundingClientRect(),initialCursorPosition:Y$2,initialLayout:N$2}}function M$1(){c$4.value=null}function V$2(z$3){let{panelDataArray:K$1}=_$2.value,L$1=G$2(K$1,z$3);L$1>=0&&(K$1.splice(L$1,1),delete v$2.value[z$3.id],_$2.value.panelDataArrayChanged=!0)}function A$2(z$3){let{layout:K$1,panelDataArray:L$1}=_$2.value;if(z$3.constraints.collapsible){let N$2=L$1.map(X$2=>X$2.constraints),{collapsedSize:Z$1=0,panelSize:Y$2,pivotIndices:re$3}=J$2(L$1,z$3,K$1);if(pe(Y$2!=null,`Panel size not found for panel "${z$3.id}"`),Y$2!==Z$1){p$5.value.set(z$3.id,Y$2);let se$1=G$2(L$1,z$3)===L$1.length-1?Y$2-Z$1:Z$1-Y$2,fe$2=sa({delta:se$1,layout:K$1,panelConstraints:N$2,pivotIndices:re$3,trigger:`imperative-api`});Oa(K$1,fe$2)||(C$3(fe$2),_$2.value.layout=fe$2,n$2(`layout`,fe$2),la(L$1,fe$2,v$2.value))}}}function F$2(z$3){let{layout:K$1,panelDataArray:L$1}=_$2.value;if(z$3.constraints.collapsible){let N$2=L$1.map(se$1=>se$1.constraints),{collapsedSize:Z$1=0,panelSize:Y$2,minSize:re$3=0,pivotIndices:X$2}=J$2(L$1,z$3,K$1);if(Y$2===Z$1){let se$1=p$5.value.get(z$3.id),fe$2=se$1!=null&&se$1>=re$3?se$1:re$3,Ee$2=G$2(L$1,z$3)===L$1.length-1?Y$2-fe$2:fe$2-Y$2,be$2=sa({delta:Ee$2,layout:K$1,panelConstraints:N$2,pivotIndices:X$2,trigger:`imperative-api`});Oa(K$1,be$2)||(C$3(be$2),_$2.value.layout=be$2,n$2(`layout`,be$2),la(L$1,be$2,v$2.value))}}}function j$1(z$3){let{layout:K$1,panelDataArray:L$1}=_$2.value,{panelSize:N$2}=J$2(L$1,z$3,K$1);return pe(N$2!=null,`Panel size not found for panel "${z$3.id}"`),N$2}function H$3(z$3){let{layout:K$1,panelDataArray:L$1}=_$2.value,{collapsedSize:N$2=0,collapsible:Z$1,panelSize:Y$2}=J$2(L$1,z$3,K$1);return Z$1?Y$2===void 0?z$3.constraints.defaultSize===z$3.constraints.collapsedSize:Y$2===N$2:!1}function Q$3(z$3){let{layout:K$1,panelDataArray:L$1}=_$2.value,{collapsedSize:N$2=0,collapsible:Z$1,panelSize:Y$2}=J$2(L$1,z$3,K$1);return pe(Y$2!=null,`Panel size not found for panel "${z$3.id}"`),!Z$1||Y$2>N$2}Vp({direction:s$1,dragState:c$4.value,groupId:r$2,reevaluatePanelConstraints:D$1,registerPanel:h$3,registerResizeHandle:E$2,resizePanel:P$2,startDragging:I,stopDragging:M$1,unregisterPanel:V$2,panelGroupElement:d$2,collapsePanel:A$2,expandPanel:F$2,isPanelCollapsed:H$3,isPanelExpanded:Q$3,getPanelSize:j$1,getPanelStyle:$$2});function G$2(z$3,K$1){return z$3.findIndex(L$1=>L$1===K$1||L$1.id===K$1.id)}function J$2(z$3,K$1,L$1){let N$2=G$2(z$3,K$1),Y$2=N$2===z$3.length-1?[N$2-1,N$2]:[N$2,N$2+1],re$3=L$1[N$2];return{...K$1.constraints,panelSize:re$3,pivotIndices:Y$2}}return(z$3,K$1)=>(openBlock(),createBlock(unref(O$1),{ref:unref(u$1),as:z$3.as,"as-child":z$3.asChild,style:normalizeStyle({display:`flex`,flexDirection:unref(s$1)===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`}),"data-panel-group":``,"data-orientation":unref(s$1),"data-panel-group-id":unref(r$2)},{default:withCtx(()=>[renderSlot(z$3.$slots,`default`,{layout:f$3.value})]),_:3},8,[`as`,`as-child`,`style`,`data-orientation`,`data-panel-group-id`]))}}),ug=defineComponent({__name:`SplitterPanel`,props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{}},emits:[`collapse`,`expand`,`resize`],setup(a$2,{expose:t,emit:e$3}){let n$2=a$2,l$1=e$3,s$1=rr();if(s$1===null)throw Error(`SplitterPanel components must be rendered within a SplitterGroup container`);let{collapsePanel:r$2,expandPanel:i$1,getPanelSize:u$1,getPanelStyle:d$2,isPanelCollapsed:c$4,resizePanel:f$3,groupId:v$2,reevaluatePanelConstraints:p$5,registerPanel:g$2,unregisterPanel:m$3}=s$1,_$2=ge(n$2.id,`radix-vue-splitter-panel`),C$3=computed(()=>({callbacks:{onCollapse:()=>l$1(`collapse`),onExpand:()=>l$1(`expand`),onResize:(...P$2)=>l$1(`resize`,...P$2)},constraints:{collapsedSize:n$2.collapsedSize&&Number.parseFloat(n$2.collapsedSize.toFixed(Oo)),collapsible:n$2.collapsible,defaultSize:n$2.defaultSize,maxSize:n$2.maxSize,minSize:n$2.minSize},id:_$2,idIsFromProps:n$2.id!==void 0,order:n$2.order}));watch(()=>C$3.value.constraints,(P$2,D$1)=>{(D$1.collapsedSize!==P$2.collapsedSize||D$1.collapsible!==P$2.collapsible||D$1.maxSize!==P$2.maxSize||D$1.minSize!==P$2.minSize)&&p$5(C$3.value,D$1)},{deep:!0}),onMounted(()=>{let P$2=C$3.value;g$2(P$2),onUnmounted(()=>{m$3(P$2)})});let $$2=computed(()=>d$2(C$3.value,n$2.defaultSize)),h$3=computed(()=>c$4(C$3.value)),E$2=computed(()=>!h$3.value);return t({collapse:()=>{r$2(C$3.value)},expand:()=>{i$1(C$3.value)},getSize(){return u$1(C$3.value)},resize:P$2=>{f$3(C$3.value,P$2)},isCollapsed:h$3,isExpanded:E$2}),(P$2,D$1)=>(openBlock(),createBlock(unref(O$1),{id:unref(_$2),style:normalizeStyle($$2.value),as:P$2.as,"as-child":P$2.asChild,"data-panel":``,"data-panel-collapsible":P$2.collapsible||void 0,"data-panel-group-id":unref(v$2),"data-panel-id":unref(_$2),"data-panel-size":Number.parseFloat(`${$$2.value.flexGrow}`).toFixed(1),"data-state":P$2.collapsible?h$3.value?`collapsed`:`expanded`:void 0},{default:withCtx(()=>[renderSlot(P$2.$slots,`default`,{isCollapsed:h$3.value,isExpanded:E$2.value})]),_:3},8,[`id`,`style`,`as`,`as-child`,`data-panel-collapsible`,`data-panel-group-id`,`data-panel-id`,`data-panel-size`,`data-state`]))}});function Fp({disabled:a$2,handleId:t,resizeHandler:e$3,panelGroupElement:n$2}){watchEffect(l$1=>{let s$1=n$2.value;if(a$2.value||e$3.value===null||s$1===null)return;let r$2=pn(t,s$1);if(r$2==null)return;let i$1=u$1=>{var d$2;if(!u$1.defaultPrevented)switch(u$1.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:u$1.preventDefault(),(d$2=e$3.value)==null||d$2.call(e$3,u$1);break;case`F6`:{u$1.preventDefault();let c$4=r$2.getAttribute(`data-panel-group-id`);pe(c$4);let f$3=va(c$4,s$1),v$2=ar(c$4,t,s$1);pe(v$2!==null);let p$5=u$1.shiftKey?v$2>0?v$2-1:f$3.length-1:v$2+1{r$2.removeEventListener(`keydown`,i$1)})})}const dg=defineComponent({__name:`SplitterResizeHandle`,props:{id:{},hitAreaMargins:{},tabindex:{default:0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`dragging`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{forwardRef:l$1,currentElement:s$1}=R$1(),{disabled:r$2}=toRefs(e$3),i$1=rr();if(i$1===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:u$1,groupId:d$2,registerResizeHandle:c$4,startDragging:f$3,stopDragging:v$2,panelGroupElement:p$5}=i$1,g$2=ge(e$3.id,`radix-vue-splitter-resize-handle`),m$3=ref(`inactive`),_$2=ref(!1),C$3=ref(null);return watch(r$2,()=>{ha&&(r$2.value?C$3.value=null:C$3.value=c$4(g$2))},{immediate:!0}),watchEffect($$2=>{var P$2,D$1;if(r$2.value||C$3.value===null)return;let h$3=s$1.value;if(!h$3)return;pe(h$3);let E$2=(I,M$1,V$2)=>{var A$2;if(M$1)switch(I){case`down`:m$3.value=`drag`,f$3(g$2,V$2),n$2(`dragging`,!0);break;case`move`:m$3.value!==`drag`&&(m$3.value=`hover`),(A$2=C$3.value)==null||A$2.call(C$3,V$2);break;case`up`:m$3.value=`hover`,v$2(),n$2(`dragging`,!1);break}else m$3.value=`inactive`};$$2(Ep(g$2,h$3,u$1,{coarse:(P$2=e$3.hitAreaMargins)?.coarse??15,fine:(D$1=e$3.hitAreaMargins)?.fine??5},E$2))}),Fp({disabled:r$2,resizeHandler:C$3,handleId:g$2,panelGroupElement:p$5}),($$2,h$3)=>(openBlock(),createBlock(unref(O$1),{id:unref(g$2),ref:unref(l$1),style:{touchAction:`none`,userSelect:`none`},as:$$2.as,"as-child":$$2.asChild,role:`separator`,"data-resize-handle":``,tabindex:$$2.tabindex,"data-state":m$3.value,"data-disabled":unref(r$2)?``:void 0,"data-orientation":unref(u$1),"data-panel-group-id":unref(d$2),"data-resize-handle-active":m$3.value===`drag`?`pointer`:_$2.value?`keyboard`:void 0,"data-resize-handle-state":m$3.value,"data-panel-resize-handle-enabled":!unref(r$2),"data-panel-resize-handle-id":unref(g$2),onBlur:h$3[0]||=E$2=>_$2.value=!1,onFocus:h$3[1]||=E$2=>_$2.value=!1},{default:withCtx(()=>[renderSlot($$2.$slots,`default`)]),_:3},8,[`id`,`as`,`as-child`,`tabindex`,`data-state`,`data-disabled`,`data-orientation`,`data-panel-group-id`,`data-resize-handle-active`,`data-resize-handle-state`,`data-panel-resize-handle-enabled`,`data-panel-resize-handle-id`]))}}),Np={"aria-live":`polite`,"aria-atomic":`true`,role:`status`,style:{transform:`translateX(-100%)`,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}},[ko,Lp]=te(`StepperRoot`),cg=defineComponent({__name:`StepperRoot`,props:{defaultValue:{default:1},orientation:{default:`horizontal`},dir:{},modelValue:{},linear:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{dir:l$1,orientation:s$1,linear:r$2}=toRefs(e$3),i$1=we(l$1);R$1();let u$1=ref(new Set),d$2=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.modelValue===void 0}),c$4=computed(()=>Array.from(u$1.value)),f$3=computed(()=>d$2.value===1),v$2=computed(()=>d$2.value===c$4.value.length),p$5=computed(()=>u$1.value.size);function g$2(h$3){h$3>p$5.value||h$3<1||u$1.value.size&&c$4.value[h$3]&&c$4.value[h$3].getAttribute(`disabled`)||r$2.value&&h$3>(d$2.value??1)+1||(d$2.value=h$3)}let m$3=ref(null),_$2=ref(null),C$3=computed(()=>m$3.value?m$3.value.getAttribute(`disabled`)===``:!0),$$2=computed(()=>_$2.value?_$2.value.getAttribute(`disabled`)===``:!0);return watch(d$2,async()=>{await nextTick(()=>{m$3.value=c$4.value.length&&d$2.value1?c$4.value[d$2.value-2]:null})}),watch(c$4,async()=>{await nextTick(()=>{m$3.value=c$4.value.length&&d$2.value1?c$4.value[d$2.value-2]:null})}),Lp({modelValue:d$2,changeModelValue:h$3=>{d$2.value=h$3},orientation:s$1,dir:i$1,linear:r$2,totalStepperItems:u$1}),(h$3,E$2)=>(openBlock(),createBlock(unref(O$1),{role:`group`,"aria-label":`progress`,as:h$3.as,"as-child":h$3.asChild,"data-linear":unref(r$2)?``:void 0,"data-orientation":h$3.orientation},{default:withCtx(()=>[renderSlot(h$3.$slots,`default`,{modelValue:unref(d$2),totalSteps:u$1.value.size,isNextDisabled:C$3.value,isPrevDisabled:$$2.value,isFirstStep:f$3.value,isLastStep:v$2.value,goToStep:g$2,nextStep:()=>g$2((unref(d$2)??1)+1),prevStep:()=>g$2((unref(d$2)??1)-1)}),createBaseVNode(`div`,Np,` Step `+toDisplayString(unref(d$2))+` of `+toDisplayString(u$1.value.size),1)]),_:3},8,[`as`,`as-child`,`data-linear`,`data-orientation`]))}}),[Sa,zp]=te(`StepperItem`),fg=defineComponent({__name:`StepperItem`,props:{step:{},disabled:{type:Boolean,default:!1},completed:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{disabled:e$3,step:n$2,completed:l$1}=toRefs(t),{forwardRef:s$1}=R$1(),r$2=ko(),i$1=ge(void 0,`radix-vue-stepper-item-title`),u$1=ge(void 0,`radix-vue-stepper-item-description`),d$2=computed(()=>l$1.value?`completed`:r$2.modelValue.value===n$2.value?`active`:r$2.modelValue.value>n$2.value?`completed`:`inactive`),c$4=computed(()=>e$3.value?!1:r$2.linear.value?n$2.value<=r$2.modelValue.value||n$2.value===r$2.modelValue.value+1:!0);return zp({titleId:i$1,descriptionId:u$1,state:d$2,disabled:e$3,step:n$2,isFocusable:c$4}),(f$3,v$2)=>(openBlock(),createBlock(unref(O$1),{ref:unref(s$1),as:f$3.as,"as-child":f$3.asChild,"aria-current":d$2.value===`active`?`true`:void 0,"data-state":d$2.value,disabled:unref(e$3)||!c$4.value?``:void 0,"data-disabled":unref(e$3)||!c$4.value?``:void 0,"data-orientation":unref(r$2).orientation.value},{default:withCtx(()=>[renderSlot(f$3.$slots,`default`,{state:d$2.value})]),_:3},8,[`as`,`as-child`,`aria-current`,`data-state`,`disabled`,`data-disabled`,`data-orientation`]))}}),pg=defineComponent({__name:`StepperTrigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=ko(),e$3=Sa(),n$2=nt(),l$1=computed(()=>Array.from(t.totalStepperItems.value));function s$1(d$2){if(!e$3.disabled.value){if(t.linear.value){if((e$3.step.value<=t.modelValue.value||e$3.step.value===t.modelValue.value+1)&&d$2.ctrlKey===!1){t.changeModelValue(e$3.step.value);return}}else if(d$2.ctrlKey===!1){t.changeModelValue(e$3.step.value);return}d$2.preventDefault()}}function r$2(d$2){d$2.preventDefault(),!e$3.disabled.value&&((d$2.key===n$2.ENTER||d$2.key===n$2.SPACE)&&!d$2.ctrlKey&&!d$2.shiftKey&&t.changeModelValue(e$3.step.value),[n$2.ARROW_LEFT,n$2.ARROW_RIGHT,n$2.ARROW_UP,n$2.ARROW_DOWN].includes(d$2.key)&&At(d$2,me(),void 0,{itemsArray:l$1.value,focus:!0,loop:!1,arrowKeyOptions:t.orientation.value,dir:t.dir.value}))}let{forwardRef:i$1,currentElement:u$1}=R$1();return onMounted(()=>{t.totalStepperItems.value.add(u$1.value)}),onUnmounted(()=>{t.totalStepperItems.value.delete(u$1.value)}),(d$2,c$4)=>(openBlock(),createBlock(unref(O$1),{ref:unref(i$1),type:d$2.as===`button`?`button`:void 0,as:d$2.as,"as-child":d$2.asChild,"data-state":unref(e$3).state.value,disabled:unref(e$3).disabled.value||!unref(e$3).isFocusable.value?``:void 0,"data-disabled":unref(e$3).disabled.value||!unref(e$3).isFocusable.value?``:void 0,"data-orientation":unref(t).orientation.value,tabindex:unref(e$3).isFocusable.value?0:-1,"aria-describedby":unref(e$3).descriptionId,"aria-labelledby":unref(e$3).titleId,onMousedown:withModifiers(s$1,[`left`]),onKeydown:withKeys(r$2,[`enter`,`space`,`left`,`right`,`up`,`down`])},{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},8,[`type`,`as`,`as-child`,`data-state`,`disabled`,`data-disabled`,`data-orientation`,`tabindex`,`aria-describedby`,`aria-labelledby`]))}}),vg=defineComponent({__name:`StepperDescription`,props:{asChild:{type:Boolean},as:{default:`p`}},setup(a$2){let t=a$2;R$1();let e$3=Sa();return(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{id:unref(e$3).descriptionId}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`id`]))}}),mg=defineComponent({__name:`StepperTitle`,props:{asChild:{type:Boolean},as:{default:`h4`}},setup(a$2){let t=a$2,e$3=Sa();return R$1(),(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{id:unref(e$3).titleId}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`id`]))}}),hg=defineComponent({__name:`StepperIndicator`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=Sa();return R$1(),(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`,{},()=>[createTextVNode(` Step `+toDisplayString(unref(e$3).step.value),1)])]),_:3},16))}}),yg=defineComponent({__name:`StepperSeparator`,props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=ko(),n$2=Sa();return R$1(),(l$1,s$1)=>(openBlock(),createBlock(unref(ap),mergeProps(t,{decorative:``,orientation:unref(e$3).orientation.value,"data-state":unref(n$2).state.value}),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`)]),_:3},16,[`orientation`,`data-state`]))}}),Kp=[`name`,`disabled`,`required`,`value`,`checked`,`data-state`,`data-disabled`],[Hp,Wp]=te(`SwitchRoot`),gg=defineComponent({__name:`SwitchRoot`,props:{defaultChecked:{type:Boolean},checked:{type:Boolean,default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{default:`on`},asChild:{type:Boolean},as:{default:`button`}},emits:[`update:checked`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{disabled:l$1}=toRefs(e$3),s$1=ne(e$3,`checked`,n$2,{defaultValue:e$3.defaultChecked,passive:e$3.checked===void 0});function r$2(){l$1.value||(s$1.value=!s$1.value)}let{forwardRef:i$1,currentElement:u$1}=R$1(),d$2=at(u$1),c$4=computed(()=>{var f$3;return e$3.id&&u$1.value?(f$3=document.querySelector(`[for="${e$3.id}"]`))?.innerText:void 0});return Wp({checked:s$1,toggleCheck:r$2,disabled:l$1}),(f$3,v$2)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$1),mergeProps(f$3.$attrs,{id:f$3.id,ref:unref(i$1),role:`switch`,type:f$3.as===`button`?`button`:void 0,value:f$3.value,"aria-label":f$3.$attrs[`aria-label`]||c$4.value,"aria-checked":unref(s$1),"aria-required":f$3.required,"data-state":unref(s$1)?`checked`:`unchecked`,"data-disabled":unref(l$1)?``:void 0,"as-child":f$3.asChild,as:f$3.as,disabled:unref(l$1),onClick:r$2,onKeydown:withKeys(withModifiers(r$2,[`prevent`]),[`enter`])}),{default:withCtx(()=>[renderSlot(f$3.$slots,`default`,{checked:unref(s$1)})]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]),unref(d$2)?(openBlock(),createElementBlock(`input`,{key:0,type:`checkbox`,name:f$3.name,tabindex:`-1`,"aria-hidden":`true`,disabled:unref(l$1),required:f$3.required,value:f$3.value,checked:!!unref(s$1),"data-state":unref(s$1)?`checked`:`unchecked`,"data-disabled":unref(l$1)?``:void 0,style:{transform:`translateX(-100%)`,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}},null,8,Kp)):createCommentVNode(``,!0)],64))}}),bg=defineComponent({__name:`SwitchThumb`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=Hp();return R$1(),(e$3,n$2)=>{var l$1;return openBlock(),createBlock(unref(O$1),{"data-state":(l$1=unref(t).checked)!=null&&l$1.value?`checked`:`unchecked`,"data-disabled":unref(t).disabled.value?``:void 0,"as-child":e$3.asChild,as:e$3.as},{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`])}}}),[vn,jp]=te(`TabsRoot`),Cg=defineComponent({__name:`TabsRoot`,props:{defaultValue:{},orientation:{default:`horizontal`},dir:{},activationMode:{default:`automatic`},modelValue:{},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{orientation:l$1,dir:s$1}=toRefs(e$3),r$2=we(s$1);R$1();let i$1=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.modelValue===void 0}),u$1=ref();return jp({modelValue:i$1,changeModelValue:d$2=>{i$1.value=d$2},orientation:l$1,dir:r$2,activationMode:e$3.activationMode,baseId:ge(void 0,`radix-vue-tabs`),tabsList:u$1}),(d$2,c$4)=>(openBlock(),createBlock(unref(O$1),{dir:unref(r$2),"data-orientation":unref(l$1),"as-child":d$2.asChild,as:d$2.as},{default:withCtx(()=>[renderSlot(d$2.$slots,`default`,{modelValue:unref(i$1)})]),_:3},8,[`dir`,`data-orientation`,`as-child`,`as`]))}}),wg=defineComponent({__name:`TabsList`,props:{loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{loop:e$3}=toRefs(t),{forwardRef:n$2,currentElement:l$1}=R$1(),s$1=vn();return s$1.tabsList=l$1,(r$2,i$1)=>(openBlock(),createBlock(unref(Ft),{"as-child":``,orientation:unref(s$1).orientation.value,dir:unref(s$1).dir.value,loop:unref(e$3)},{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(n$2),role:`tablist`,"as-child":r$2.asChild,as:r$2.as,"aria-orientation":unref(s$1).orientation.value},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},8,[`as-child`,`as`,`aria-orientation`])]),_:3},8,[`orientation`,`dir`,`loop`]))}});function ir(a$2,t){return`${a$2}-trigger-${t}`}function ur(a$2,t){return`${a$2}-content-${t}`}const _g=defineComponent({__name:`TabsContent`,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1(),n$2=vn(),l$1=computed(()=>ir(n$2.baseId,t.value)),s$1=computed(()=>ur(n$2.baseId,t.value)),r$2=computed(()=>t.value===n$2.modelValue.value),i$1=ref(r$2.value);return onMounted(()=>{requestAnimationFrame(()=>{i$1.value=!1})}),(u$1,d$2)=>(openBlock(),createBlock(unref(Pe),{present:r$2.value,"force-mount":``},{default:withCtx(({present:c$4})=>[createVNode(unref(O$1),{id:s$1.value,ref:unref(e$3),"as-child":u$1.asChild,as:u$1.as,role:`tabpanel`,"data-state":r$2.value?`active`:`inactive`,"data-orientation":unref(n$2).orientation.value,"aria-labelledby":l$1.value,hidden:!c$4.value,tabindex:`0`,style:normalizeStyle({animationDuration:i$1.value?`0s`:void 0})},{default:withCtx(()=>[u$1.forceMount||r$2.value?renderSlot(u$1.$slots,`default`,{key:0}):createCommentVNode(``,!0)]),_:2},1032,[`id`,`as-child`,`as`,`data-state`,`data-orientation`,`aria-labelledby`,`hidden`,`style`])]),_:3},8,[`present`]))}}),xg=defineComponent({__name:`TabsTrigger`,props:{value:{},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1(),n$2=vn(),l$1=computed(()=>ir(n$2.baseId,t.value)),s$1=computed(()=>ur(n$2.baseId,t.value)),r$2=computed(()=>t.value===n$2.modelValue.value);return(i$1,u$1)=>(openBlock(),createBlock(unref(Nt$1),{"as-child":``,focusable:!i$1.disabled,active:r$2.value},{default:withCtx(()=>[createVNode(unref(O$1),{id:l$1.value,ref:unref(e$3),role:`tab`,type:i$1.as===`button`?`button`:void 0,as:i$1.as,"as-child":i$1.asChild,"aria-selected":r$2.value?`true`:`false`,"aria-controls":s$1.value,"data-state":r$2.value?`active`:`inactive`,disabled:i$1.disabled,"data-disabled":i$1.disabled?``:void 0,"data-orientation":unref(n$2).orientation.value,onMousedown:u$1[0]||=withModifiers(d$2=>{!i$1.disabled&&d$2.ctrlKey===!1?unref(n$2).changeModelValue(i$1.value):d$2.preventDefault()},[`left`]),onKeydown:u$1[1]||=withKeys(d$2=>unref(n$2).changeModelValue(i$1.value),[`enter`,`space`]),onFocus:u$1[2]||=()=>{let d$2=unref(n$2).activationMode!==`manual`;!r$2.value&&!i$1.disabled&&d$2&&unref(n$2).changeModelValue(i$1.value)}},{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},8,[`id`,`type`,`as`,`as-child`,`aria-selected`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`data-orientation`])]),_:3},8,[`focusable`,`active`]))}}),Sg=defineComponent({__name:`TabsIndicator`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=vn();R$1();let n$2=ref(),l$1=ref({size:null,position:null});watch(()=>[e$3.modelValue.value,e$3?.dir.value],async()=>{await nextTick(),s$1()},{immediate:!0}),tt([e$3.tabsList,n$2],s$1);function s$1(){var r$2;n$2.value=(r$2=e$3.tabsList.value)?.querySelector(`[role="tab"][data-state="active"]`),n$2.value&&(e$3.orientation.value===`horizontal`?l$1.value={size:n$2.value.offsetWidth,position:n$2.value.offsetLeft}:l$1.value={size:n$2.value.offsetHeight,position:n$2.value.offsetTop})}return(r$2,i$1)=>typeof l$1.value.size==`number`?(openBlock(),createBlock(unref(O$1),mergeProps({key:0},t,{style:{"--radix-tabs-indicator-size":`${l$1.value.size}px`,"--radix-tabs-indicator-position":`${l$1.value.position}px`}}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`style`])):createCommentVNode(``,!0)}}),[mn,Up]=te(`TagsInputRoot`),Eg=defineComponent({__name:`TagsInputRoot`,props:{modelValue:{},defaultValue:{default:()=>[]},addOnPaste:{type:Boolean},addOnTab:{type:Boolean},addOnBlur:{type:Boolean},duplicate:{type:Boolean},disabled:{type:Boolean},delimiter:{default:`,`},dir:{},max:{default:0},required:{type:Boolean},name:{},id:{},convertValue:{},displayValue:{type:Function,default:a$2=>a$2.toString()},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`invalid`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{addOnPaste:l$1,disabled:s$1,delimiter:r$2,max:i$1,id:u$1,dir:d$2,addOnBlur:c$4,addOnTab:f$3}=toRefs(e$3),v$2=we(d$2),p$5=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue,passive:!0,deep:!0}),{forwardRef:g$2,currentElement:m$3}=R$1(),{focused:_$2}=Si(m$3),C$3=at(m$3),{getItems:$$2}=Ca(),h$3=ref(),E$2=ref(!1);return Up({modelValue:p$5,onAddValue:P$2=>{let D$1=p$5.value.length>0&&typeof p$5.value[0]==`object`,I=p$5.value.length>0&&typeof e$3.defaultValue[0]==`object`;if((D$1||I)&&typeof e$3.convertValue!=`function`)throw Error("You must provide a `convertValue` function when using objects as values.");let M$1=e$3.convertValue?e$3.convertValue(P$2):P$2;if(p$5.value.length>=i$1.value&&i$1.value)return n$2(`invalid`,M$1),!1;if(e$3.duplicate)return p$5.value=[...p$5.value,M$1],!0;if(p$5.value.includes(M$1))E$2.value=!0;else return p$5.value=[...p$5.value,M$1],!0;return n$2(`invalid`,M$1),!1},onRemoveValue:P$2=>{P$2!==-1&&(p$5.value=p$5.value.filter((D$1,I)=>I!==P$2))},onInputKeydown:P$2=>{let D$1=P$2.target,I=$$2().map(V$2=>V$2.ref).filter(V$2=>V$2.dataset.disabled!==``);if(!I.length)return;let M$1=I.at(-1);switch(P$2.key){case`Delete`:case`Backspace`:if(D$1.selectionStart!==0||D$1.selectionEnd!==0)break;if(h$3.value){let V$2=I.findIndex(A$2=>A$2===h$3.value);p$5.value=p$5.value.filter((A$2,F$2)=>F$2!==V$2),h$3.value=h$3.value===M$1?I.at(V$2-1):I.at(V$2+1),P$2.preventDefault()}else P$2.key===`Backspace`&&(h$3.value=M$1,P$2.preventDefault());break;case`Home`:case`End`:case`ArrowRight`:case`ArrowLeft`:{let V$2=P$2.key===`ArrowRight`&&v$2.value===`ltr`||P$2.key===`ArrowLeft`&&v$2.value===`rtl`,A$2=!V$2;if(D$1.selectionStart!==0||D$1.selectionEnd!==0)break;if(A$2&&!h$3.value)h$3.value=M$1,P$2.preventDefault();else if(V$2&&M$1&&h$3.value===M$1)h$3.value=void 0,P$2.preventDefault();else if(h$3.value){let F$2=At(P$2,h$3.value,void 0,{itemsArray:I,loop:!1,dir:v$2.value});F$2&&(h$3.value=F$2),P$2.preventDefault()}break}case`ArrowUp`:case`ArrowDown`:h$3.value&&P$2.preventDefault();break;default:h$3.value=void 0}},selectedElement:h$3,isInvalidInput:E$2,addOnPaste:l$1,addOnBlur:c$4,addOnTab:f$3,dir:v$2,disabled:s$1,delimiter:r$2,max:i$1,id:u$1,displayValue:e$3.displayValue}),(P$2,D$1)=>(openBlock(),createBlock(unref(wa),null,{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(g$2),dir:unref(v$2),as:P$2.as,"as-child":P$2.asChild,"data-invalid":E$2.value?``:void 0,"data-disabled":unref(s$1)?``:void 0,"data-focused":unref(_$2)?``:void 0},{default:withCtx(()=>[renderSlot(P$2.$slots,`default`,{modelValue:unref(p$5)}),unref(C$3)&&P$2.name?(openBlock(),createBlock(unref(no),{key:0,name:P$2.name,value:unref(p$5),required:P$2.required,disabled:unref(s$1)},null,8,[`name`,`value`,`required`,`disabled`])):createCommentVNode(``,!0)]),_:3},8,[`dir`,`as`,`as-child`,`data-invalid`,`data-disabled`,`data-focused`])]),_:3}))}}),Pg=defineComponent({__name:`TagsInputInput`,props:{placeholder:{},autoFocus:{type:Boolean},maxLength:{},asChild:{type:Boolean},as:{default:`input`}},setup(a$2){let t=a$2,e$3=mn(),{forwardRef:n$2,currentElement:l$1}=R$1();function s$1(p$5){if(!e$3.addOnBlur.value)return;let g$2=p$5.target;g$2.value&&e$3.onAddValue(g$2.value)&&(g$2.value=``)}function r$2(p$5){e$3.addOnTab.value&&c$4(p$5)}let i$1=ref(!1);function u$1(){i$1.value=!0}function d$2(){requestAnimationFrame(()=>{i$1.value=!1})}async function c$4(p$5){if(i$1.value||(await nextTick(),p$5.defaultPrevented))return;let g$2=p$5.target;g$2.value&&(e$3.onAddValue(g$2.value)&&(g$2.value=``),p$5.preventDefault())}function f$3(p$5){e$3.isInvalidInput.value=!1;let g$2=e$3.delimiter.value;if(g$2===p$5.data){let m$3=p$5.target;m$3.value=m$3.value.replaceAll(g$2,``),e$3.onAddValue(m$3.value)&&(m$3.value=``)}}function v$2(p$5){if(e$3.addOnPaste.value){p$5.preventDefault();let g$2=p$5.clipboardData;if(!g$2)return;let m$3=g$2.getData(`text`);e$3.delimiter.value?m$3.split(e$3.delimiter.value).forEach(C$3=>{e$3.onAddValue(C$3)}):e$3.onAddValue(m$3)}}return onMounted(()=>{let p$5=l$1.value.nodeName===`INPUT`?l$1.value:l$1.value.querySelector(`input`);p$5&&setTimeout(()=>{t.autoFocus&&p$5?.focus()},1)}),(p$5,g$2)=>{var m$3;return openBlock(),createBlock(unref(O$1),{id:(m$3=unref(e$3).id)?.value,ref:unref(n$2),type:`text`,autocomplete:`off`,autocorrect:`off`,autocapitalize:`off`,as:p$5.as,"as-child":p$5.asChild,maxlength:p$5.maxLength,placeholder:p$5.placeholder,disabled:unref(e$3).disabled.value,"data-invalid":unref(e$3).isInvalidInput.value?``:void 0,onInput:f$3,onKeydown:[withKeys(c$4,[`enter`]),withKeys(r$2,[`tab`]),unref(e$3).onInputKeydown],onBlur:s$1,onCompositionstart:u$1,onCompositionend:d$2,onPaste:v$2},{default:withCtx(()=>[renderSlot(p$5.$slots,`default`)]),_:3},8,[`id`,`as`,`as-child`,`maxlength`,`placeholder`,`disabled`,`data-invalid`,`onKeydown`])}}}),[dr,Gp]=te(`TagsInputItem`),Dg=defineComponent({__name:`TagsInputItem`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{value:e$3}=toRefs(t),n$2=mn(),{forwardRef:l$1,currentElement:s$1}=R$1(),r$2=computed(()=>n$2.selectedElement.value===s$1.value),i$1=computed(()=>t.disabled||n$2.disabled.value),u$1=Gp({value:e$3,isSelected:r$2,disabled:i$1,textId:``,displayValue:computed(()=>n$2.displayValue(e$3.value))});return(d$2,c$4)=>(openBlock(),createBlock(unref(Qt),null,{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(l$1),as:d$2.as,"as-child":d$2.asChild,"aria-labelledby":unref(u$1).textId,"aria-current":r$2.value,"data-disabled":i$1.value?``:void 0,"data-state":r$2.value?`active`:`inactive`},{default:withCtx(()=>[renderSlot(d$2.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-labelledby`,`aria-current`,`data-disabled`,`data-state`])]),_:3}))}}),$g=defineComponent({__name:`TagsInputItemText`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(a$2){let t=a$2,e$3=dr();return R$1(),e$3.textId||=ge(void 0,`radix-vue-tags-input-item-text`),(n$2,l$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{id:unref(e$3).textId}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`,{},()=>[createTextVNode(toDisplayString(unref(e$3).displayValue.value),1)])]),_:3},16,[`id`]))}}),Bg=defineComponent({__name:`TagsInputItemDelete`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2;R$1();let e$3=mn(),n$2=dr(),l$1=computed(()=>{var r$2;return(r$2=n$2.disabled)?.value||e$3.disabled.value});function s$1(){if(l$1.value)return;let r$2=e$3.modelValue.value.findIndex(i$1=>i$1===n$2.value.value);e$3.onRemoveValue(r$2)}return(r$2,i$1)=>(openBlock(),createBlock(unref(O$1),mergeProps({tabindex:`-1`},t,{"aria-labelledby":unref(n$2).textId,"aria-current":unref(n$2).isSelected.value,"data-state":unref(n$2).isSelected.value?`active`:`inactive`,"data-disabled":l$1.value?``:void 0,type:r$2.as===`button`?`button`:void 0,onClick:s$1}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`aria-labelledby`,`aria-current`,`data-state`,`data-disabled`,`type`]))}}),Ig=defineComponent({__name:`TagsInputClear`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2;R$1();let e$3=mn();function n$2(){e$3.disabled.value||(e$3.modelValue.value=[])}return(l$1,s$1)=>(openBlock(),createBlock(unref(O$1),mergeProps(t,{type:l$1.as===`button`?`button`:void 0,"data-disabled":unref(e$3).disabled.value?``:void 0,onClick:n$2}),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`)]),_:3},16,[`type`,`data-disabled`]))}}),[hn,qp]=te(`ToastProvider`),Tg=defineComponent({inheritAttrs:!1,__name:`ToastProvider`,props:{label:{default:`Notification`},duration:{default:5e3},swipeDirection:{default:`right`},swipeThreshold:{default:50}},setup(a$2){let t=a$2,{label:e$3,duration:n$2,swipeDirection:l$1,swipeThreshold:s$1}=toRefs(t),r$2=ref(),i$1=ref(0),u$1=ref(!1),d$2=ref(!1);if(t.label&&typeof t.label==`string`&&!t.label.trim()){let c$4="Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.";throw Error(c$4)}return qp({label:e$3,duration:n$2,swipeDirection:l$1,swipeThreshold:s$1,toastCount:i$1,viewport:r$2,onViewportChange(c$4){r$2.value=c$4},onToastAdd(){i$1.value++},onToastRemove(){i$1.value--},isFocusedToastEscapeKeyDownRef:u$1,isClosePausedRef:d$2}),(c$4,f$3)=>renderSlot(c$4.$slots,`default`)}}),Yp=`toast.swipeStart`,Xp=`toast.swipeMove`,Zp=`toast.swipeCancel`,Jp=`toast.swipeEnd`,Mn=`toast.viewportPause`,Vn=`toast.viewportResume`;function ka(a$2,t,e$3){let n$2=e$3.originalEvent.currentTarget,l$1=new CustomEvent(a$2,{bubbles:!1,cancelable:!0,detail:e$3});t&&n$2.addEventListener(a$2,t,{once:!0}),n$2.dispatchEvent(l$1)}function rl(a$2,t,e$3=0){let n$2=Math.abs(a$2.x),l$1=Math.abs(a$2.y),s$1=n$2>l$1;return t===`left`||t===`right`?s$1&&n$2>e$3:!s$1&&l$1>e$3}function Qp(a$2){return a$2.nodeType===a$2.ELEMENT_NODE}function cr(a$2){let t=[];return Array.from(a$2.childNodes).forEach(n$2=>{if(n$2.nodeType===n$2.TEXT_NODE&&n$2.textContent&&t.push(n$2.textContent),Qp(n$2)){let l$1=n$2.ariaHidden||n$2.hidden||n$2.style.display===`none`,s$1=n$2.dataset.radixToastAnnounceExclude===``;if(!l$1)if(s$1){let r$2=n$2.dataset.radixToastAnnounceAlt;r$2&&t.push(r$2)}else t.push(...cr(n$2))}}),t}const ev=defineComponent({__name:`ToastAnnounce`,setup(a$2){let t=hn(),e$3=gi(1e3),n$2=ref(!1);return Ol(()=>{n$2.value=!0}),(l$1,s$1)=>unref(e$3)||n$2.value?(openBlock(),createBlock(unref(Jt),{key:0},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t).label.value)+` `,1),renderSlot(l$1.$slots,`default`)]),_:3})):createCommentVNode(``,!0)}}),[tv,av]=te(`ToastRoot`),nv=defineComponent({inheritAttrs:!1,__name:`ToastRootImpl`,props:{type:{},open:{type:Boolean,default:!1},duration:{},asChild:{type:Boolean},as:{default:`li`}},emits:[`close`,`escapeKeyDown`,`pause`,`resume`,`swipeStart`,`swipeMove`,`swipeCancel`,`swipeEnd`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{forwardRef:l$1,currentElement:s$1}=R$1(),r$2=hn(),i$1=ref(null),u$1=ref(null),d$2=computed(()=>typeof e$3.duration==`number`?e$3.duration:r$2.duration.value),c$4=ref(0),f$3=ref(d$2.value),v$2=ref(0),p$5=ref(d$2.value),g$2=Ol(()=>{let $$2=new Date().getTime()-c$4.value;p$5.value=Math.max(f$3.value-$$2,0)},{fpsLimit:60});function m$3($$2){$$2<=0||$$2===1/0||Je&&(window.clearTimeout(v$2.value),c$4.value=new Date().getTime(),v$2.value=window.setTimeout(_$2,$$2))}function _$2(){var h$3,E$2;(h$3=s$1.value)!=null&&h$3.contains(me())&&((E$2=r$2.viewport.value)==null||E$2.focus()),r$2.isClosePausedRef.value=!1,n$2(`close`)}let C$3=computed(()=>s$1.value?cr(s$1.value):null);if(e$3.type&&![`foreground`,`background`].includes(e$3.type)){let $$2="Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.";throw Error($$2)}return watchEffect($$2=>{let h$3=r$2.viewport.value;if(h$3){let E$2=()=>{m$3(f$3.value),g$2.resume(),n$2(`resume`)},P$2=()=>{let D$1=new Date().getTime()-c$4.value;f$3.value-=D$1,window.clearTimeout(v$2.value),g$2.pause(),n$2(`pause`)};return h$3.addEventListener(Mn,P$2),h$3.addEventListener(Vn,E$2),()=>{h$3.removeEventListener(Mn,P$2),h$3.removeEventListener(Vn,E$2)}}}),watch(()=>[e$3.open,d$2.value],()=>{f$3.value=d$2.value,e$3.open&&!r$2.isClosePausedRef.value&&m$3(d$2.value)},{immediate:!0}),Gn(`Escape`,$$2=>{n$2(`escapeKeyDown`,$$2),$$2.defaultPrevented||(r$2.isFocusedToastEscapeKeyDownRef.value=!0,_$2())}),onMounted(()=>{r$2.onToastAdd()}),onUnmounted(()=>{r$2.onToastRemove()}),av({onClose:_$2}),($$2,h$3)=>(openBlock(),createElementBlock(Fragment,null,[C$3.value?(openBlock(),createBlock(ev,{key:0,role:`alert`,"aria-live":$$2.type===`foreground`?`assertive`:`polite`,"aria-atomic":`true`},{default:withCtx(()=>[createTextVNode(toDisplayString(C$3.value),1)]),_:1},8,[`aria-live`])):createCommentVNode(``,!0),unref(r$2).viewport.value?(openBlock(),createBlock(Teleport,{key:1,to:unref(r$2).viewport.value},[createVNode(unref(O$1),mergeProps({ref:unref(l$1),role:`alert`,"aria-live":`off`,"aria-atomic":`true`,tabindex:`0`,"data-radix-vue-collection-item":``},$$2.$attrs,{as:$$2.as,"as-child":$$2.asChild,"data-state":$$2.open?`open`:`closed`,"data-swipe-direction":unref(r$2).swipeDirection.value,style:{userSelect:`none`,touchAction:`none`},onPointerdown:h$3[0]||=withModifiers(E$2=>{i$1.value={x:E$2.clientX,y:E$2.clientY}},[`left`]),onPointermove:h$3[1]||=E$2=>{if(!i$1.value)return;let P$2=E$2.clientX-i$1.value.x,D$1=E$2.clientY-i$1.value.y,I=!!u$1.value,M$1=[`left`,`right`].includes(unref(r$2).swipeDirection.value),V$2=[`left`,`up`].includes(unref(r$2).swipeDirection.value)?Math.min:Math.max,A$2=M$1?V$2(0,P$2):0,F$2=M$1?0:V$2(0,D$1),j$1=E$2.pointerType===`touch`?10:2,H$3={x:A$2,y:F$2},Q$3={originalEvent:E$2,delta:H$3};I?(u$1.value=H$3,unref(ka)(unref(Xp),G$2=>n$2(`swipeMove`,G$2),Q$3)):unref(rl)(H$3,unref(r$2).swipeDirection.value,j$1)?(u$1.value=H$3,unref(ka)(unref(Yp),G$2=>n$2(`swipeStart`,G$2),Q$3),E$2.target.setPointerCapture(E$2.pointerId)):(Math.abs(P$2)>j$1||Math.abs(D$1)>j$1)&&(i$1.value=null)},onPointerup:h$3[2]||=E$2=>{let P$2=u$1.value,D$1=E$2.target;if(D$1.hasPointerCapture(E$2.pointerId)&&D$1.releasePointerCapture(E$2.pointerId),u$1.value=null,i$1.value=null,P$2){let I=E$2.currentTarget,M$1={originalEvent:E$2,delta:P$2};unref(rl)(P$2,unref(r$2).swipeDirection.value,unref(r$2).swipeThreshold.value)?unref(ka)(unref(Jp),V$2=>n$2(`swipeEnd`,V$2),M$1):unref(ka)(unref(Zp),V$2=>n$2(`swipeCancel`,V$2),M$1),I?.addEventListener(`click`,V$2=>V$2.preventDefault(),{once:!0})}}}),{default:withCtx(()=>[renderSlot($$2.$slots,`default`,{remaining:p$5.value,duration:d$2.value})]),_:3},16,[`as`,`as-child`,`data-state`,`data-swipe-direction`])],8,[`to`])):createCommentVNode(``,!0)],64))}}),Rg=defineComponent({__name:`ToastRoot`,props:{defaultOpen:{type:Boolean,default:!0},forceMount:{type:Boolean},type:{default:`foreground`},open:{type:Boolean,default:void 0},duration:{},asChild:{type:Boolean},as:{default:`li`}},emits:[`escapeKeyDown`,`pause`,`resume`,`swipeStart`,`swipeMove`,`swipeCancel`,`swipeEnd`,`update:open`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{forwardRef:l$1}=R$1(),s$1=ne(e$3,`open`,n$2,{defaultValue:e$3.defaultOpen,passive:e$3.open===void 0});return(r$2,i$1)=>(openBlock(),createBlock(unref(Pe),{present:r$2.forceMount||unref(s$1)},{default:withCtx(()=>[createVNode(nv,mergeProps({ref:unref(l$1),open:unref(s$1),type:r$2.type,as:r$2.as,"as-child":r$2.asChild,duration:r$2.duration},r$2.$attrs,{onClose:i$1[0]||=u$1=>s$1.value=!1,onPause:i$1[1]||=u$1=>n$2(`pause`),onResume:i$1[2]||=u$1=>n$2(`resume`),onEscapeKeyDown:i$1[3]||=u$1=>n$2(`escapeKeyDown`,u$1),onSwipeStart:i$1[4]||=u$1=>{n$2(`swipeStart`,u$1),u$1.currentTarget.setAttribute(`data-swipe`,`start`)},onSwipeMove:i$1[5]||=u$1=>{let{x:d$2,y:c$4}=u$1.detail.delta,f$3=u$1.currentTarget;f$3.setAttribute(`data-swipe`,`move`),f$3.style.setProperty(`--radix-toast-swipe-move-x`,`${d$2}px`),f$3.style.setProperty(`--radix-toast-swipe-move-y`,`${c$4}px`)},onSwipeCancel:i$1[6]||=u$1=>{let d$2=u$1.currentTarget;d$2.setAttribute(`data-swipe`,`cancel`),d$2.style.removeProperty(`--radix-toast-swipe-move-x`),d$2.style.removeProperty(`--radix-toast-swipe-move-y`),d$2.style.removeProperty(`--radix-toast-swipe-end-x`),d$2.style.removeProperty(`--radix-toast-swipe-end-y`)},onSwipeEnd:i$1[7]||=u$1=>{let{x:d$2,y:c$4}=u$1.detail.delta,f$3=u$1.currentTarget;f$3.setAttribute(`data-swipe`,`end`),f$3.style.removeProperty(`--radix-toast-swipe-move-x`),f$3.style.removeProperty(`--radix-toast-swipe-move-y`),f$3.style.setProperty(`--radix-toast-swipe-end-x`,`${d$2}px`),f$3.style.setProperty(`--radix-toast-swipe-end-y`,`${c$4}px`),s$1.value=!1}}),{default:withCtx(({remaining:u$1,duration:d$2})=>[renderSlot(r$2.$slots,`default`,{remaining:u$1,duration:d$2,open:unref(s$1)})]),_:3},16,[`open`,`type`,`as`,`as-child`,`duration`])]),_:3},8,[`present`]))}}),Ag=defineComponent({__name:`ToastPortal`,props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(rt$2),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),fr=defineComponent({__name:`ToastAnnounceExclude`,props:{altText:{},asChild:{type:Boolean},as:{}},setup(a$2){return(t,e$3)=>(openBlock(),createBlock(unref(O$1),{as:t.as,"as-child":t.asChild,"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":t.altText||void 0},{default:withCtx(()=>[renderSlot(t.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-radix-toast-announce-alt`]))}}),ov=defineComponent({__name:`ToastClose`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=tv(),{forwardRef:n$2}=R$1();return(l$1,s$1)=>(openBlock(),createBlock(fr,{"as-child":``},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps(t,{ref:unref(n$2),type:l$1.as===`button`?`button`:void 0,onClick:s$1[0]||=r$2=>unref(e$3).onClose()}),{default:withCtx(()=>[renderSlot(l$1.$slots,`default`)]),_:3},16,[`type`])]),_:3}))}}),Og=defineComponent({__name:`ToastAction`,props:{altText:{},asChild:{type:Boolean},as:{}},setup(a$2){if(!a$2.altText)throw Error("Missing prop `altText` expected on `ToastAction`");let{forwardRef:e$3}=R$1();return(n$2,l$1)=>n$2.altText?(openBlock(),createBlock(fr,{key:0,"alt-text":n$2.altText,"as-child":``},{default:withCtx(()=>[createVNode(ov,{ref:unref(e$3),as:n$2.as,"as-child":n$2.asChild},{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},8,[`as`,`as-child`])]),_:3},8,[`alt-text`])):createCommentVNode(``,!0)}}),il=defineComponent({__name:`FocusProxy`,emits:[`focusFromOutsideViewport`],setup(a$2,{emit:t}){let e$3=t,n$2=hn();return(l$1,s$1)=>(openBlock(),createBlock(unref(Jt),{"aria-hidden":`true`,tabindex:`0`,style:{position:`fixed`},onFocus:s$1[0]||=r$2=>{var d$2;let i$1=r$2.relatedTarget;!((d$2=unref(n$2).viewport.value)!=null&&d$2.contains(i$1))&&e$3(`focusFromOutsideViewport`)}},{default:withCtx(()=>[renderSlot(l$1.$slots,`default`)]),_:3}))}}),kg=defineComponent({inheritAttrs:!1,__name:`ToastViewport`,props:{hotkey:{default:()=>[`F8`]},label:{type:[String,Function],default:`Notifications ({hotkey})`},asChild:{type:Boolean},as:{default:`ol`}},setup(a$2){let t=a$2,{hotkey:e$3,label:n$2}=toRefs(t),{forwardRef:l$1,currentElement:s$1}=R$1(),{createCollection:r$2}=Fe(),i$1=r$2(s$1),u$1=hn(),d$2=computed(()=>u$1.toastCount.value>0),c$4=ref(),f$3=ref(),v$2=computed(()=>e$3.value.join(`+`).replace(/Key/g,``).replace(/Digit/g,``));Gn(e$3.value,()=>{s$1.value.focus()}),onMounted(()=>{u$1.onViewportChange(s$1.value)}),watchEffect(g$2=>{let m$3=s$1.value;if(d$2.value&&m$3){let _$2=()=>{if(!u$1.isClosePausedRef.value){let P$2=new CustomEvent(Mn);m$3.dispatchEvent(P$2),u$1.isClosePausedRef.value=!0}},C$3=()=>{if(u$1.isClosePausedRef.value){let P$2=new CustomEvent(Vn);m$3.dispatchEvent(P$2),u$1.isClosePausedRef.value=!1}},$$2=P$2=>{!m$3.contains(P$2.relatedTarget)&&C$3()},h$3=()=>{m$3.contains(me())||C$3()},E$2=P$2=>{var M$1,V$2,A$2;let D$1=P$2.altKey||P$2.ctrlKey||P$2.metaKey;if(P$2.key===`Tab`&&!D$1){let F$2=me(),j$1=P$2.shiftKey;if(P$2.target===m$3&&j$1){(M$1=c$4.value)==null||M$1.focus();return}let G$2=p$5({tabbingDirection:j$1?`backwards`:`forwards`}),J$2=G$2.findIndex(z$3=>z$3===F$2);Ma(G$2.slice(J$2+1))?P$2.preventDefault():j$1?(V$2=c$4.value)==null||V$2.focus():(A$2=f$3.value)==null||A$2.focus()}};m$3.addEventListener(`focusin`,_$2),m$3.addEventListener(`focusout`,$$2),m$3.addEventListener(`pointermove`,_$2),m$3.addEventListener(`pointerleave`,h$3),m$3.addEventListener(`keydown`,E$2),window.addEventListener(`blur`,_$2),window.addEventListener(`focus`,C$3),g$2(()=>{m$3.removeEventListener(`focusin`,_$2),m$3.removeEventListener(`focusout`,$$2),m$3.removeEventListener(`pointermove`,_$2),m$3.removeEventListener(`pointerleave`,h$3),m$3.removeEventListener(`keydown`,E$2),window.removeEventListener(`blur`,_$2),window.removeEventListener(`focus`,C$3)})}});function p$5({tabbingDirection:g$2}){let _$2=i$1.value.map(C$3=>{let $$2=[C$3,...eo(C$3)];return g$2===`forwards`?$$2:$$2.reverse()});return(g$2===`forwards`?_$2.reverse():_$2).flat()}return(g$2,m$3)=>(openBlock(),createBlock(unref(ru),{role:`region`,"aria-label":typeof unref(n$2)==`string`?unref(n$2).replace(`{hotkey}`,v$2.value):unref(n$2)(v$2.value),tabindex:`-1`,style:normalizeStyle({pointerEvents:d$2.value?void 0:`none`})},{default:withCtx(()=>[d$2.value?(openBlock(),createBlock(il,{key:0,ref:_$2=>{c$4.value=unref($e$1)(_$2)},onFocusFromOutsideViewport:m$3[0]||=()=>{let _$2=p$5({tabbingDirection:`forwards`});unref(Ma)(_$2)}},null,512)):createCommentVNode(``,!0),createVNode(unref(O$1),mergeProps({ref:unref(l$1),tabindex:`-1`,as:g$2.as,"as-child":g$2.asChild},g$2.$attrs),{default:withCtx(()=>[renderSlot(g$2.$slots,`default`)]),_:3},16,[`as`,`as-child`]),d$2.value?(openBlock(),createBlock(il,{key:1,ref:_$2=>{f$3.value=unref($e$1)(_$2)},onFocusFromOutsideViewport:m$3[1]||=()=>{let _$2=p$5({tabbingDirection:`backwards`});unref(Ma)(_$2)}},null,512)):createCommentVNode(``,!0)]),_:3},8,[`aria-label`,`style`]))}}),Mg=defineComponent({__name:`ToastTitle`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2;return R$1(),(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),Vg=defineComponent({__name:`ToastDescription`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2;return R$1(),(e$3,n$2)=>(openBlock(),createBlock(unref(O$1),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),lv=defineComponent({__name:`Toggle`,props:{defaultValue:{type:Boolean},pressed:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:`button`}},emits:[`update:pressed`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t;R$1();let l$1=ne(e$3,`pressed`,n$2,{defaultValue:e$3.defaultValue,passive:e$3.pressed===void 0});function s$1(){l$1.value=!l$1.value}let r$2=computed(()=>l$1.value?`on`:`off`);return(i$1,u$1)=>(openBlock(),createBlock(unref(O$1),{type:i$1.as===`button`?`button`:void 0,"as-child":e$3.asChild,as:i$1.as,"aria-pressed":unref(l$1),"data-state":r$2.value,"data-disabled":i$1.disabled?``:void 0,disabled:i$1.disabled,onClick:s$1},{default:withCtx(()=>[renderSlot(i$1.$slots,`default`,{pressed:unref(l$1)})]),_:3},8,[`type`,`as-child`,`as`,`aria-pressed`,`data-state`,`data-disabled`,`disabled`]))}}),[sv,rv]=te(`ToggleGroupRoot`),iv=defineComponent({__name:`ToggleGroupRoot`,props:{rovingFocus:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},orientation:{},dir:{},loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},type:{},modelValue:{},defaultValue:{}},emits:[`update:modelValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{loop:l$1,rovingFocus:s$1,disabled:r$2,dir:i$1}=toRefs(e$3),u$1=we(i$1),{forwardRef:d$2}=R$1(),{modelValue:c$4,changeModelValue:f$3,isSingle:v$2}=Wl(e$3,n$2);return rv({isSingle:v$2,modelValue:c$4,changeModelValue:f$3,dir:u$1,orientation:e$3.orientation,loop:l$1,rovingFocus:s$1,disabled:r$2}),(p$5,g$2)=>(openBlock(),createBlock(resolveDynamicComponent(unref(s$1)?unref(Ft):unref(O$1)),{"as-child":``,orientation:unref(s$1)?p$5.orientation:void 0,dir:unref(u$1),loop:unref(s$1)?unref(l$1):void 0},{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(d$2),role:`group`,"as-child":p$5.asChild,as:p$5.as},{default:withCtx(()=>[renderSlot(p$5.$slots,`default`,{modelValue:unref(c$4)})]),_:3},8,[`as-child`,`as`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),uv=defineComponent({__name:`ToggleGroupItem`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=sv(),n$2=computed(()=>{var i$1;return(i$1=e$3.disabled)?.value||t.disabled}),l$1=computed(()=>{var i$1;return(i$1=e$3.modelValue.value)?.includes(t.value)}),s$1=computed(()=>{var i$1;return e$3.isSingle.value?e$3.modelValue.value===t.value:(i$1=e$3.modelValue.value)?.includes(t.value)}),{forwardRef:r$2}=R$1();return(i$1,u$1)=>(openBlock(),createBlock(resolveDynamicComponent(unref(e$3).rovingFocus.value?unref(Nt$1):unref(O$1)),{"as-child":``,focusable:!n$2.value,active:l$1.value},{default:withCtx(()=>[createVNode(unref(lv),mergeProps(t,{ref:unref(r$2),disabled:n$2.value,pressed:s$1.value,"onUpdate:pressed":u$1[0]||=d$2=>unref(e$3).changeModelValue(i$1.value)}),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16,[`disabled`,`pressed`])]),_:3},8,[`focusable`,`active`]))}}),[pr,dv]=te(`ToolbarRoot`),Fg=defineComponent({__name:`ToolbarRoot`,props:{orientation:{default:`horizontal`},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{orientation:e$3,dir:n$2}=toRefs(t),l$1=we(n$2),{forwardRef:s$1}=R$1();return dv({orientation:e$3,dir:l$1}),(r$2,i$1)=>(openBlock(),createBlock(unref(Ft),{"as-child":``,orientation:unref(e$3),dir:unref(l$1),loop:r$2.loop},{default:withCtx(()=>[createVNode(unref(O$1),{ref:unref(s$1),role:`toolbar`,"aria-orientation":unref(e$3),"as-child":r$2.asChild,as:r$2.as},{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},8,[`aria-orientation`,`as-child`,`as`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),cv=defineComponent({__name:`ToolbarButton`,props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1();return(n$2,l$1)=>(openBlock(),createBlock(unref(Nt$1),{"as-child":``,focusable:!n$2.disabled},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps({ref:unref(e$3),type:n$2.as===`button`?`button`:void 0},t),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16,[`type`])]),_:3},8,[`focusable`]))}}),Ng=defineComponent({__name:`ToolbarLink`,props:{asChild:{type:Boolean},as:{default:`a`}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1();return(n$2,l$1)=>(openBlock(),createBlock(unref(Nt$1),{"as-child":``,focusable:``},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps(t,{ref:unref(e$3),onKeydown:l$1[0]||=s$1=>{var r$2;s$1.key===` `&&((r$2=s$1.currentTarget)==null||r$2.click())}}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16)]),_:3}))}}),Lg=defineComponent({__name:`ToolbarToggleGroup`,props:{rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},type:{},modelValue:{},defaultValue:{}},emits:[`update:modelValue`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=pr(),s$1=Te$1(n$2);return R$1(),(r$2,i$1)=>(openBlock(),createBlock(unref(iv),mergeProps({...e$3,...unref(s$1)},{"data-orientation":unref(l$1).orientation.value,dir:unref(l$1).dir.value,"roving-focus":!1}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`data-orientation`,`dir`]))}}),zg=defineComponent({__name:`ToolbarToggleItem`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1();return(n$2,l$1)=>(openBlock(),createBlock(cv,{"as-child":``},{default:withCtx(()=>[createVNode(unref(uv),mergeProps(t,{ref:unref(e$3)}),{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},16)]),_:3}))}}),Kg=defineComponent({__name:`ToolbarSeparator`,props:{asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,e$3=pr();return R$1(),(n$2,l$1)=>(openBlock(),createBlock(Ms,{orientation:unref(e$3).orientation.value,"as-child":t.asChild,as:n$2.as},{default:withCtx(()=>[renderSlot(n$2.$slots,`default`)]),_:3},8,[`orientation`,`as-child`,`as`]))}}),vr=`tooltip.open`,[Mo,fv]=te(`TooltipProvider`),Hg=defineComponent({inheritAttrs:!1,__name:`TooltipProvider`,props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(a$2){let t=a$2,{delayDuration:e$3,skipDelayDuration:n$2,disableHoverableContent:l$1,disableClosingTrigger:s$1,ignoreNonKeyboardFocus:r$2,disabled:i$1}=toRefs(t);R$1();let u$1=ref(!0),d$2=ref(!1),{start:c$4,stop:f$3}=Un(()=>{u$1.value=!0},n$2,{immediate:!1});return fv({isOpenDelayed:u$1,delayDuration:e$3,onOpen(){f$3(),u$1.value=!1},onClose(){c$4()},isPointerInTransitRef:d$2,disableHoverableContent:l$1,disableClosingTrigger:s$1,disabled:i$1,ignoreNonKeyboardFocus:r$2}),(v$2,p$5)=>renderSlot(v$2.$slots,`default`)}}),[yn,pv]=te(`TooltipRoot`),Wg=defineComponent({__name:`TooltipRoot`,props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:[`update:open`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t;R$1();let l$1=Mo(),s$1=computed(()=>e$3.disableHoverableContent??l$1.disableHoverableContent.value),r$2=computed(()=>e$3.disableClosingTrigger??l$1.disableClosingTrigger.value),i$1=computed(()=>e$3.disabled??l$1.disabled.value),u$1=computed(()=>e$3.delayDuration??l$1.delayDuration.value),d$2=computed(()=>e$3.ignoreNonKeyboardFocus??l$1.ignoreNonKeyboardFocus.value),c$4=ne(e$3,`open`,n$2,{defaultValue:e$3.defaultOpen,passive:e$3.open===void 0});watch(c$4,h$3=>{l$1.onClose&&(h$3?(l$1.onOpen(),document.dispatchEvent(new CustomEvent(vr))):l$1.onClose())});let f$3=ref(!1),v$2=ref(),p$5=computed(()=>c$4.value?f$3.value?`delayed-open`:`instant-open`:`closed`),{start:g$2,stop:m$3}=Un(()=>{f$3.value=!0,c$4.value=!0},u$1,{immediate:!1});function _$2(){m$3(),f$3.value=!1,c$4.value=!0}function C$3(){m$3(),c$4.value=!1}function $$2(){g$2()}return pv({contentId:``,open:c$4,stateAttribute:p$5,trigger:v$2,onTriggerChange(h$3){v$2.value=h$3},onTriggerEnter(){l$1.isOpenDelayed.value?$$2():_$2()},onTriggerLeave(){s$1.value?C$3():m$3()},onOpen:_$2,onClose:C$3,disableHoverableContent:s$1,disableClosingTrigger:r$2,disabled:i$1,ignoreNonKeyboardFocus:d$2}),(h$3,E$2)=>(openBlock(),createBlock(unref(kt),null,{default:withCtx(()=>[renderSlot(h$3.$slots,`default`,{open:unref(c$4)})]),_:3}))}}),jg=defineComponent({__name:`TooltipTrigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a$2){let t=a$2,e$3=yn(),n$2=Mo();e$3.contentId||=ge(void 0,`radix-vue-tooltip-content`);let{forwardRef:l$1,currentElement:s$1}=R$1(),r$2=ref(!1),i$1=ref(!1),u$1=computed(()=>e$3.disabled.value?{}:{click:m$3,focus:p$5,pointermove:f$3,pointerleave:v$2,pointerdown:c$4,blur:g$2});onMounted(()=>{e$3.onTriggerChange(s$1.value)});function d$2(){setTimeout(()=>{r$2.value=!1},1)}function c$4(){r$2.value=!0,document.addEventListener(`pointerup`,d$2,{once:!0})}function f$3(_$2){_$2.pointerType!==`touch`&&!i$1.value&&!n$2.isPointerInTransitRef.value&&(e$3.onTriggerEnter(),i$1.value=!0)}function v$2(){e$3.onTriggerLeave(),i$1.value=!1}function p$5(_$2){var C$3,$$2;r$2.value||e$3.ignoreNonKeyboardFocus.value&&!(($$2=(C$3=_$2.target).matches)!=null&&$$2.call(C$3,`:focus-visible`))||e$3.onOpen()}function g$2(){e$3.onClose()}function m$3(){e$3.disableClosingTrigger.value||e$3.onClose()}return(_$2,C$3)=>(openBlock(),createBlock(unref(Mt),{"as-child":``},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps({ref:unref(l$1),"aria-describedby":unref(e$3).open.value?unref(e$3).contentId:void 0,"data-state":unref(e$3).stateAttribute.value,as:_$2.as,"as-child":t.asChild,"data-grace-area-trigger":``},toHandlers(u$1.value)),{default:withCtx(()=>[renderSlot(_$2.$slots,`default`)]),_:3},16,[`aria-describedby`,`data-state`,`as`,`as-child`])]),_:3}))}}),mr=defineComponent({__name:`TooltipContentImpl`,props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:`top`},sideOffset:{default:0},align:{default:`center`},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:`partial`},hideWhenDetached:{type:Boolean,default:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=yn(),{forwardRef:s$1}=R$1(),r$2=useSlots(),i$1=computed(()=>{var c$4;return(c$4=r$2.default)?.call(r$2)}),u$1=computed(()=>{var v$2;if(e$3.ariaLabel)return e$3.ariaLabel;let c$4=``;function f$3(p$5){typeof p$5.children==`string`&&p$5.type!==Comment?c$4+=p$5.children:Array.isArray(p$5.children)&&p$5.children.forEach(g$2=>f$3(g$2))}return(v$2=i$1.value)==null||v$2.forEach(p$5=>f$3(p$5)),c$4}),d$2=computed(()=>{let{ariaLabel:c$4,...f$3}=e$3;return f$3});return onMounted(()=>{He(window,`scroll`,c$4=>{let f$3=c$4.target;f$3!=null&&f$3.contains(l$1.trigger.value)&&l$1.onClose()}),He(window,vr,l$1.onClose)}),(c$4,f$3)=>(openBlock(),createBlock(unref(Ct$1),{"as-child":``,"disable-outside-pointer-events":!1,onEscapeKeyDown:f$3[0]||=v$2=>n$2(`escapeKeyDown`,v$2),onPointerDownOutside:f$3[1]||=v$2=>{var p$5;unref(l$1).disableClosingTrigger.value&&(p$5=unref(l$1).trigger.value)!=null&&p$5.contains(v$2.target)&&v$2.preventDefault(),n$2(`pointerDownOutside`,v$2)},onFocusOutside:f$3[2]||=withModifiers(()=>{},[`prevent`]),onDismiss:f$3[3]||=v$2=>unref(l$1).onClose()},{default:withCtx(()=>[createVNode(unref(It),mergeProps({ref:unref(s$1),"data-state":unref(l$1).stateAttribute.value},{...c$4.$attrs,...d$2.value},{style:{"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`}}),{default:withCtx(()=>[renderSlot(c$4.$slots,`default`),createVNode(unref(Jt),{id:unref(l$1).contentId,role:`tooltip`},{default:withCtx(()=>[createTextVNode(toDisplayString(u$1.value),1)]),_:1},8,[`id`])]),_:3},16,[`data-state`])]),_:3}))}}),vv=defineComponent({__name:`TooltipContentHoverable`,props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(a$2){let e$3=Ot$1(a$2),{forwardRef:n$2,currentElement:l$1}=R$1(),{trigger:s$1,onClose:r$2}=yn(),i$1=Mo(),{isPointerInTransit:u$1,onPointerExit:d$2}=Fl(s$1,l$1);return i$1.isPointerInTransitRef=u$1,d$2(()=>{r$2()}),(c$4,f$3)=>(openBlock(),createBlock(mr,mergeProps({ref:unref(n$2)},unref(e$3)),{default:withCtx(()=>[renderSlot(c$4.$slots,`default`)]),_:3},16))}}),Ug=defineComponent({__name:`TooltipContent`,props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:`top`},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,l$1=yn(),s$1=Se(e$3,n$2),{forwardRef:r$2}=R$1();return(i$1,u$1)=>(openBlock(),createBlock(unref(Pe),{present:i$1.forceMount||unref(l$1).open.value},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(l$1).disableHoverableContent.value?mr:vv),mergeProps({ref:unref(r$2)},unref(s$1)),{default:withCtx(()=>[renderSlot(i$1.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),Gg=defineComponent({__name:`TooltipArrow`,props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:`svg`}},setup(a$2){let t=a$2;return R$1(),(e$3,n$2)=>(openBlock(),createBlock(unref(Zt),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}}),qg=defineComponent({__name:`TooltipPortal`,props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(a$2){let t=a$2;return(e$3,n$2)=>(openBlock(),createBlock(unref(rt$2),normalizeProps(guardReactiveProps(t)),{default:withCtx(()=>[renderSlot(e$3.$slots,`default`)]),_:3},16))}});function Vo(a$2){return a$2.reduce((t,e$3)=>(t.push(e$3),e$3.children&&t.push(...Vo(e$3.children)),t),[])}const[hr,mv]=te(`TreeRoot`),Yg=defineComponent({__name:`TreeRoot`,props:{modelValue:{},defaultValue:{},items:{},expanded:{},defaultExpanded:{},getKey:{},getChildren:{type:Function,default:a$2=>a$2.children},selectionBehavior:{default:`toggle`},multiple:{type:Boolean},dir:{},disabled:{type:Boolean},propagateSelect:{type:Boolean},asChild:{type:Boolean},as:{default:`ul`}},emits:[`update:modelValue`,`update:expanded`],setup(a$2,{emit:t}){let e$3=a$2,n$2=t,{items:l$1,multiple:s$1,disabled:r$2,propagateSelect:i$1,dir:u$1}=toRefs(e$3),{handleTypeaheadSearch:d$2}=ba(),c$4=we(u$1),f$3=ref(),v$2=ref(!1),p$5=ua(),g$2=ne(e$3,`modelValue`,n$2,{defaultValue:e$3.defaultValue??(s$1.value?[]:void 0),passive:e$3.modelValue===void 0,deep:!0}),m$3=ne(e$3,`expanded`,n$2,{defaultValue:e$3.defaultExpanded??[],passive:e$3.expanded===void 0,deep:!0}),{onSelectItem:_$2,handleMultipleReplace:C$3}=ji(g$2,e$3),$$2=computed(()=>s$1.value&&Array.isArray(g$2.value)?g$2.value.map(I=>e$3.getKey(I)):[e$3.getKey(g$2.value??{})]);function h$3(I,M$1=1,V$2){return I.reduce((A$2,F$2,j$1)=>{let H$3=e$3.getKey(F$2),Q$3=e$3.getChildren(F$2),G$2=m$3.value.includes(H$3),J$2={_id:H$3,value:F$2,index:j$1,level:M$1,parentItem:V$2,hasChildren:!!Q$3,bind:{value:F$2,level:M$1,"aria-setsize":I.length,"aria-posinset":j$1+1}};return A$2.push(J$2),Q$3&&G$2&&A$2.push(...h$3(Q$3,M$1+1,F$2)),A$2},[])}let E$2=computed(()=>{let I=e$3.items;return m$3.value.map(M$1=>M$1),h$3(I??[])});function P$2(I){var M$1;if(v$2.value)p$5.trigger(I);else{let V$2=(M$1=f$3.value)?.getItems().map(A$2=>A$2.ref);d$2(I.key,V$2)}}function D$1(I){if(v$2.value)return;let M$1=en[I.key];nextTick(()=>{var V$2;C$3(M$1,me(),(V$2=f$3.value)?.getItems,E$2.value.map(A$2=>A$2.value))})}return mv({modelValue:g$2,selectedKeys:$$2,onSelect:I=>{var A$2;let M$1=F$2=>e$3.getKey(F$2??{})===e$3.getKey(I),V$2=e$3.multiple&&Array.isArray(g$2.value)?(A$2=g$2.value)?.findIndex(M$1)!==-1:void 0;if(_$2(I,M$1),e$3.propagateSelect&&e$3.multiple&&Array.isArray(g$2.value)){let F$2=Vo(e$3.getChildren(I)??[]);V$2?g$2.value=[...g$2.value].filter(j$1=>!F$2.some(H$3=>e$3.getKey(j$1??{})===e$3.getKey(H$3))):g$2.value=[...g$2.value,...F$2]}},expanded:m$3,onToggle(I){if(!(I&&e$3.getChildren(I)))return;let V$2=e$3.getKey(I)??I;m$3.value.includes(V$2)?m$3.value=m$3.value.filter(A$2=>A$2!==V$2):m$3.value.push(V$2)},getKey:e$3.getKey,getChildren:e$3.getChildren,items:l$1,expandedItems:E$2,disabled:r$2,multiple:s$1,dir:c$4,propagateSelect:i$1,isVirtual:v$2,virtualKeydownHook:p$5,handleMultipleReplace:C$3}),(I,M$1)=>(openBlock(),createBlock(unref(Ft),{ref_key:`rovingFocusGroupRef`,ref:f$3,"as-child":``,orientation:`vertical`,dir:unref(c$4)},{default:withCtx(()=>[createVNode(unref(O$1),{role:`tree`,as:I.as,"as-child":I.asChild,"aria-multiselectable":unref(s$1)?!0:void 0,onKeydown:[P$2,withKeys(withModifiers(D$1,[`shift`]),[`up`,`down`])]},{default:withCtx(()=>[renderSlot(I.$slots,`default`,{flattenItems:E$2.value,modelValue:unref(g$2),expanded:unref(m$3)})]),_:3},8,[`as`,`as-child`,`aria-multiselectable`,`onKeydown`])]),_:3},8,[`dir`]))}}),hv=`tree.select`,yv=`tree.toggle`,Xg=defineComponent({inheritAttrs:!1,__name:`TreeItem`,props:{value:{},level:{},asChild:{type:Boolean},as:{default:`li`}},emits:[`select`,`toggle`],setup(a$2,{expose:t,emit:e$3}){let n$2=a$2,l$1=e$3,s$1=hr(),{getItems:r$2}=ea(),i$1=computed(()=>!!s$1.getChildren(n$2.value)),u$1=computed(()=>{let C$3=s$1.getKey(n$2.value);return s$1.expanded.value.includes(C$3)}),d$2=computed(()=>{let C$3=s$1.getKey(n$2.value);return s$1.selectedKeys.value.includes(C$3)}),c$4=computed(()=>{if(s$1.propagateSelect.value&&d$2.value&&i$1.value&&Array.isArray(s$1.modelValue.value))return!Vo(s$1.getChildren(n$2.value)||[]).every($$2=>s$1.modelValue.value.find(h$3=>s$1.getKey(h$3)===s$1.getKey($$2)))});function f$3(C$3){if(i$1.value)if(u$1.value){let $$2=r$2().map(I=>I.ref),h$3=me(),E$2=$$2.indexOf(h$3),D$1=[...$$2].slice(E$2).find(I=>Number(I.getAttribute(`data-indent`))===n$2.level+1);D$1&&D$1.focus()}else _$2(C$3)}function v$2(C$3){if(u$1.value)_$2(C$3);else{let $$2=r$2().map(I=>I.ref),h$3=me(),E$2=$$2.indexOf(h$3),D$1=[...$$2].slice(0,E$2).reverse().find(I=>Number(I.getAttribute(`data-indent`))===n$2.level-1);D$1&&D$1.focus()}}async function p$5(C$3){l$1(`select`,C$3),!(C$3!=null&&C$3.defaultPrevented)&&s$1.onSelect(n$2.value)}async function g$2(C$3){l$1(`toggle`,C$3),!(C$3!=null&&C$3.defaultPrevented)&&s$1.onToggle(n$2.value)}async function m$3(C$3){if(!C$3)return;let $$2={originalEvent:C$3,value:n$2.value,isExpanded:u$1.value,isSelected:d$2.value};jt(hv,p$5,$$2)}async function _$2(C$3){if(!C$3)return;let $$2={originalEvent:C$3,value:n$2.value,isExpanded:u$1.value,isSelected:d$2.value};jt(yv,g$2,$$2)}return t({isExpanded:u$1,isSelected:d$2,isIndeterminate:c$4,handleToggle:()=>s$1.onToggle(n$2.value),handleSelect:()=>s$1.onSelect(n$2.value)}),(C$3,$$2)=>(openBlock(),createBlock(unref(Nt$1),{"as-child":``,value:C$3.value,"allow-shift-key":``},{default:withCtx(()=>[createVNode(unref(O$1),mergeProps(C$3.$attrs,{role:`treeitem`,as:C$3.as,"as-child":C$3.asChild,"aria-selected":d$2.value,"aria-expanded":i$1.value?u$1.value:void 0,"aria-level":C$3.level,"data-indent":C$3.level,"data-selected":d$2.value?``:void 0,"data-expanded":u$1.value?``:void 0,onKeydown:[withKeys(withModifiers(m$3,[`self`,`prevent`]),[`enter`,`space`]),$$2[0]||=withKeys(withModifiers(h$3=>unref(s$1).dir.value===`ltr`?f$3(h$3):v$2(h$3),[`prevent`]),[`right`]),$$2[1]||=withKeys(withModifiers(h$3=>unref(s$1).dir.value===`ltr`?v$2(h$3):f$3(h$3),[`prevent`]),[`left`])],onClick:$$2[2]||=withModifiers(h$3=>{m$3(h$3),_$2(h$3)},[`stop`])}),{default:withCtx(()=>[renderSlot(C$3.$slots,`default`,{isExpanded:u$1.value,isSelected:d$2.value,isIndeterminate:c$4.value,handleSelect:()=>unref(s$1).onSelect(C$3.value),handleToggle:()=>unref(s$1).onToggle(C$3.value)})]),_:3},16,[`as`,`as-child`,`aria-selected`,`aria-expanded`,`aria-level`,`data-indent`,`data-selected`,`data-expanded`,`onKeydown`])]),_:3},8,[`value`]))}}),Zg=defineComponent({__name:`TreeVirtualizer`,props:{estimateSize:{},textContent:{type:Function}},setup(a$2){let t=a$2,e$3=useSlots(),n$2=hr(),l$1=kl(),{getItems:s$1}=ea(),r$2=Tt$1(``,1e3),i$1=computed(()=>{let v$2=p$5=>t.textContent?t.textContent(p$5):p$5.toString().toLowerCase();return n$2.expandedItems.value.map((p$5,g$2)=>({index:g$2,textContent:v$2(p$5.value)}))});n$2.isVirtual.value=!0;let u$1=computed(()=>{let v$2=l$1.value;if(v$2){let p$5=window.getComputedStyle(v$2);return{start:Number.parseFloat(p$5.paddingBlockStart||p$5.paddingTop),end:Number.parseFloat(p$5.paddingBlockEnd||p$5.paddingBottom)}}else return{start:0,end:0}}),d$2=vs({get scrollPaddingStart(){return u$1.value.start},get scrollPaddingEnd(){return u$1.value.end},get count(){return n$2.expandedItems.value.length??0},get horizontal(){return!1},getItemKey(v$2){return v$2+n$2.getKey(n$2.expandedItems.value[v$2].value)},estimateSize(){return t.estimateSize??28},getScrollElement(){return l$1.value},overscan:12}),c$4=computed(()=>d$2.value.getVirtualItems().map(v$2=>({item:v$2,is:cloneVNode(e$3.default({item:n$2.expandedItems.value[v$2.index],virtualizer:d$2.value,virtualItem:v$2})[0],{"data-index":v$2.index,style:{position:`absolute`,top:0,left:0,transform:`translateY(${v$2.start}px)`,overflowAnchor:`none`}})})));function f$3(v$2){d$2.value.scrollToIndex(v$2,{align:`start`}),requestAnimationFrame(()=>{let p$5=l$1.value.querySelector(`[data-index="${v$2}"]`);p$5 instanceof HTMLElement&&p$5.focus()})}return n$2.virtualKeydownHook.on(v$2=>{var _$2;let p$5=v$2.altKey||v$2.ctrlKey||v$2.metaKey;if(v$2.key===`Tab`&&!p$5)return;let m$3=en[v$2.key];if([`first`,`last`].includes(m$3)){v$2.preventDefault();let C$3=m$3===`first`?0:n$2.expandedItems.value.length-1;d$2.value.scrollToIndex(C$3),requestAnimationFrame(()=>{let $$2=s$1();(m$3===`first`?$$2[0]:$$2[$$2.length-1]).ref.focus()})}else if(m$3===`prev`&&v$2.key!==`ArrowUp`){let C$3=me(),$$2=Number(C$3.getAttribute(`data-index`)),h$3=Number(C$3.getAttribute(`data-indent`)),P$2=n$2.expandedItems.value.slice(0,$$2).map((D$1,I)=>({...D$1,index:I})).reverse().find(D$1=>D$1.level===h$3-1);P$2&&f$3(P$2.index)}else if(!m$3&&!p$5){r$2.value+=v$2.key;let C$3=Number((_$2=me())?.getAttribute(`data-index`)),$$2=i$1.value[C$3].textContent,h$3=i$1.value.map(D$1=>D$1.textContent),E$2=Zn(h$3,r$2.value,$$2),P$2=i$1.value.find(D$1=>D$1.textContent===E$2);P$2&&f$3(P$2.index)}nextTick(()=>{v$2.shiftKey&&m$3&&n$2.handleMultipleReplace(m$3,me(),s$1,n$2.expandedItems.value.map(C$3=>C$3.value))})}),(v$2,p$5)=>(openBlock(),createElementBlock(`div`,{"data-radix-vue-virtualizer":``,style:normalizeStyle({position:`relative`,width:`100%`,height:`${unref(d$2).getTotalSize()}px`})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(c$4.value,({is:g$2,item:m$3})=>(openBlock(),createBlock(resolveDynamicComponent(g$2),{key:m$3.key}))),128))],4))}}),Jg=defineComponent({__name:`Viewport`,props:{nonce:{},asChild:{type:Boolean},as:{}},setup(a$2){let t=a$2,{forwardRef:e$3}=R$1(),{nonce:n$2}=toRefs(t),l$1=Ja(n$2);return(s$1,r$2)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$1),mergeProps({...s$1.$attrs,...t},{ref:unref(e$3),"data-radix-viewport":``,role:`presentation`,style:{position:`relative`,flex:1,overflow:`auto`}}),{default:withCtx(()=>[renderSlot(s$1.$slots,`default`)]),_:3},16),createVNode(unref(O$1),{as:`style`,nonce:unref(l$1)},{default:withCtx(()=>[createTextVNode(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-viewport]::-webkit-scrollbar { display: none; } `)]),_:1},8,[`nonce`])],64))}}),_hoisted_1$9={key:0,flex:``,"gap-2":``};var ColorPalette_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ColorPalette`,props:{colors:{}},setup(__props){let settings=useSettings();return(_ctx,_cache$1)=>_ctx.colors.length?(openBlock(),createElementBlock(`div`,_hoisted_1$9,[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.colors,({hex:hex$2,name:name$2})=>(openBlock(),createBlock(unref(Hg),{key:hex$2||`default`},{default:withCtx(()=>[createVNode(unref(Wg),null,{default:withCtx(()=>[createVNode(unref(jg),{transition:`all ease-in-out duration-250`,"size-8":``,"cursor-pointer":``,"rounded-full":``,"bg-primary-500":``,style:normalizeStyle(hex$2?{background:hex$2}:{"--chromatic-hue":unref(DEFAULT_THEME_COLORS_HUE)}),class:normalizeClass(unref(settings).isColorSelectedForPrimary(hex$2)?`scale-150 mx-1`:`hover:scale-110`),onClick:$event=>unref(settings).applyPrimaryColorFrom(hex$2)},null,8,[`style`,`class`,`onClick`]),createVNode(unref(qg),null,{default:withCtx(()=>[createVNode(unref(Ug),{bg:`white dark:neutral-800`,"rounded-lg":``,"px-3":``,"py-1.5":``,"text-sm":``,"shadow-md":``},{default:withCtx(()=>[createTextVNode(toDisplayString(name$2)+` `,1),createVNode(unref(Gg),{"fill-white":``,"dark:fill-neutral-800":``})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):createCommentVNode(``,!0)}}),ColorPalette_default=ColorPalette_vue_vue_type_script_setup_true_lang_default,onboarding_default=`/assets/onboarding-NsdTpLwA.png`;const _hoisted_1$8={"h-full":``,"w-full":``},_hoisted_2$3={key:0,"h-full":``,flex:``,"flex-col":``},_hoisted_3={class:`mb-2 text-center md:mb-8`,flex:``,"flex-1":``,"flex-col":``,"justify-center":``},_hoisted_4={initial:{opacity:0,scale:.5},visible:{opacity:1,scale:1},duration:500,class:`mb-1 flex justify-center md:mb-4 lg:pt-16 md:pt-8`},_hoisted_5=[`src`],_hoisted_6={initial:{opacity:0,y:10},visible:{opacity:1,y:0},duration:500,class:`mb-0 text-3xl text-neutral-800 font-bold md:mb-2 dark:text-neutral-100`},_hoisted_7={initial:{opacity:0,y:10},visible:{opacity:1,y:0},duration:500,delay:100,class:`text-sm text-neutral-600 md:text-lg dark:text-neutral-400`},_hoisted_8={key:1,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_9={bg:`white dark:#181818`,sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_10={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_11={class:`flex-1 overflow-y-auto`},_hoisted_12={class:`grid grid-cols-1 gap-3 sm:grid-cols-2`},_hoisted_13={key:2,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_14={bg:`white dark:#181818`,sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_15={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_16={key:0,"flex-1":``,"overflow-y-auto":``},_hoisted_17={class:`space-y-4`},_hoisted_18={key:0},_hoisted_19={key:1},_hoisted_20={key:2},_hoisted_21={key:0,class:`mt-4`},_hoisted_22={key:3,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_23={bg:`white dark:#181818`,sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_24={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_25={"flex-1":``};var Onboarding_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Onboarding`,emits:[`configured`,`skipped`],setup(__props,{emit:__emit}){let emit$1=__emit,step=ref(1),direction=ref(`next`),{t}=useI18n(),providersStore=useProvidersStore(),{providers,allChatProvidersMetadata}=storeToRefs(providersStore),consciousnessStore=useConsciousnessStore(),{activeModel,activeProvider,modelSearchQuery,providerModels,isLoadingActiveProviderModels}=storeToRefs(consciousnessStore),popularProviders=computed(()=>{let popular=[`openai`,`anthropic`,`google-generative-ai`,`openrouter-ai`,`ollama`,`deepseek`];return allChatProvidersMetadata.value.filter(provider=>popular.includes(provider.id)).sort((a$2,b$4)=>popular.indexOf(a$2.id)-popular.indexOf(b$4.id))}),selectedProviderId=ref(``),apiKey=ref(``),baseUrl=ref(``),accountId=ref(``),selectedProvider=computed(()=>allChatProvidersMetadata.value.find(p$5=>p$5.id===selectedProviderId.value)||null),isValidating=ref(!1),isValid$1=ref(!1),validationMessage=ref(``),needsApiKey=computed(()=>selectedProvider.value?selectedProvider.value.id!==`ollama`&&selectedProvider.value.id!==`player2`:!1),needsBaseUrl=computed(()=>selectedProvider.value?selectedProvider.value.id!==`cloudflare-workers-ai`:!1),canSave=computed(()=>!selectedProvider.value||needsApiKey.value&&!apiKey.value.trim()||needsBaseUrl.value&&!baseUrl.value.trim()||selectedProvider.value.id===`cloudflare-workers-ai`&&!accountId.value.trim()||!activeModel.value?!1:isValid$1.value);function selectProvider(provider){selectedProviderId.value=provider.id;let defaultOptions=provider.defaultOptions?.()||{};baseUrl.value=defaultOptions?.baseUrl||``,apiKey.value=``,accountId.value=``,isValid$1.value=!1,validationMessage.value=``}function getApiKeyPlaceholder(_providerId){let placeholders={openai:`sk-...`,anthropic:`sk-ant-...`,"google-generative-ai":`GEMINI_API_KEY`,"openrouter-ai":`sk-or-...`,deepseek:`sk-...`,xai:`xai-...`,"together-ai":`togetherapi-...`,"mistral-ai":`mis-...`,"moonshot-ai":`ms-...`,"fireworks-ai":`fw-...`,"featherless-ai":`fw-...`,"novita-ai":`nvt-...`};return placeholders[_providerId]||`API Key`}function getBaseUrlPlaceholder(_providerId){let defaultOptions=selectedProvider.value?.defaultOptions?.()||{};return defaultOptions?.baseUrl||`https://api.example.com/v1/`}async function validateConfiguration(){if(selectedProvider.value){isValidating.value=!0,validationMessage.value=t(`settings.dialogs.onboarding.validating`);try{let config={};needsApiKey.value&&(config.apiKey=apiKey.value.trim()),needsBaseUrl.value&&(config.baseUrl=baseUrl.value.trim()),selectedProvider.value.id===`cloudflare-workers-ai`&&(config.accountId=accountId.value.trim());let metadata=providersStore.getProviderMetadata(selectedProvider.value.id);isValid$1.value=await metadata.validators.validateProviderConfig(config),isValid$1.value?validationMessage.value=t(`settings.dialogs.onboarding.validationSuccess`):validationMessage.value=t(`settings.dialogs.onboarding.validationFailed`)}catch(error){isValid$1.value=!1,validationMessage.value=t(`settings.dialogs.onboarding.validationError`,{error:error instanceof Error?error.message:String(error)})}finally{isValidating.value=!1}}}let debouncedValidateConfiguration=useDebounceFn(()=>{selectedProvider.value&&(needsApiKey.value&&!apiKey.value.trim()||needsBaseUrl.value&&!baseUrl.value.trim()||selectedProvider.value.id===`cloudflare-workers-ai`&&!accountId.value.trim()||validateConfiguration())},500);watch([apiKey,baseUrl,accountId],()=>{selectedProvider.value&&(apiKey.value||baseUrl.value||accountId.value)&&debouncedValidateConfiguration()},{deep:!0});function handlePreviousStep(){step.value>1&&(direction.value=`previous`,step.value--)}function handleNextStep(){step.value<4?(direction.value=`next`,step.value++):handleSave()}async function handleFinishProviderConfiguration(){if(!selectedProvider.value)return;let config={};needsApiKey.value&&(config.apiKey=apiKey.value.trim()),needsBaseUrl.value&&(config.baseUrl=baseUrl.value.trim()),selectedProvider.value.id===`cloudflare-workers-ai`&&(config.accountId=accountId.value.trim()),providers.value[selectedProvider.value.id]={...providers.value[selectedProvider.value.id],...config},activeProvider.value=selectedProvider.value.id,await nextTick(),await consciousnessStore.loadModelsForProvider(selectedProvider.value.id),handleNextStep()}async function handleSave(){emit$1(`configured`)}return onMounted(()=>{popularProviders.value.length>0&&(selectedProviderId.value=popularProviders.value[0].id,selectProvider(popularProviders.value[0]))}),(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(`div`,_hoisted_1$8,[createVNode(Transition,{name:direction.value===`next`?`slide-next`:`slide-prev`,mode:`out-in`},{default:withCtx(()=>[step.value===1?(openBlock(),createElementBlock(`div`,_hoisted_2$3,[createBaseVNode(`div`,_hoisted_3,[withDirectives((openBlock(),createElementBlock(`div`,_hoisted_4,[createBaseVNode(`img`,{src:unref(onboarding_default),"max-h":`50`,"aspect-square":``,"h-auto":``,"w-auto":``,"object-cover":``},null,8,_hoisted_5)])),[[_directive_motion]]),withDirectives((openBlock(),createElementBlock(`h2`,_hoisted_6,[createTextVNode(toDisplayString(unref(t)(`settings.dialogs.onboarding.title`)),1)])),[[_directive_motion]]),withDirectives((openBlock(),createElementBlock(`p`,_hoisted_7,[createTextVNode(toDisplayString(unref(t)(`settings.dialogs.onboarding.description`)),1)])),[[_directive_motion]])]),withDirectives(createVNode(unref(Button_default),{initial:{opacity:0},visible:{opacity:1},duration:500,delay:200,label:unref(t)(`settings.dialogs.onboarding.start`),onClick:handleNextStep},null,8,[`label`]),[[_directive_motion]])])):step.value===2?(openBlock(),createElementBlock(`div`,_hoisted_8,[createBaseVNode(`div`,_hoisted_9,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[6]||=[createBaseVNode(`div`,{class:`i-solar:alt-arrow-left-line-duotone h-5 w-5`},null,-1)]),createBaseVNode(`h2`,_hoisted_10,toDisplayString(unref(t)(`settings.dialogs.onboarding.selectProvider`)),1),_cache$1[7]||=createBaseVNode(`div`,{class:`h-5 w-5`},null,-1)]),createBaseVNode(`div`,_hoisted_11,[createBaseVNode(`div`,_hoisted_12,[(openBlock(!0),createElementBlock(Fragment,null,renderList(popularProviders.value,provider=>(openBlock(),createBlock(unref(RadioCardDetail_default),{id:provider.id,key:provider.id,modelValue:selectedProviderId.value,"onUpdate:modelValue":_cache$1[0]||=$event=>selectedProviderId.value=$event,name:`provider-selection`,value:provider.id,title:provider.localizedName||provider.id,description:provider.localizedDescription||``,onClick:$event=>selectProvider(provider)},null,8,[`id`,`modelValue`,`value`,`title`,`description`,`onClick`]))),128))])]),createVNode(unref(Button_default),{label:unref(t)(`settings.dialogs.onboarding.next`),disabled:!selectedProviderId.value,onClick:handleNextStep},null,8,[`label`,`disabled`])])):step.value===3&&selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_13,[createBaseVNode(`div`,_hoisted_14,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[8]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-left-line-duotone":``,"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`h2`,_hoisted_15,toDisplayString(unref(t)(`settings.dialogs.onboarding.configureProvider`,{provider:selectedProvider.value.localizedName})),1),_cache$1[9]||=createBaseVNode(`div`,{"h-5":``,"w-5":``},null,-1)]),selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_16,[createVNode(unref(Callout_default),{label:`Keep your API keys and credentials safe!`,theme:`violet`},{default:withCtx(()=>_cache$1[10]||=[createBaseVNode(`div`,null,[createBaseVNode(`div`,null,` AIRI is running pure locally in your browser, and we will never steal your credentials for AI / LLM providers. But keep in mind that your API keys are sensitive information. Make sure to keep them safe and do not share them with anyone. `),createBaseVNode(`div`,null,[createTextVNode(` AIRI is open sourced at `),createBaseVNode(`div`,{"inline-flex":``,"translate-y-1":``,"items-center":``,"gap-1":``},[createBaseVNode(`div`,{"i-simple-icons:github":``,"inline-block":``}),createBaseVNode(`a`,{"decoration-underline":``,"decoration-dashed":``,href:`https://github.com/moeru-ai/airi`,target:`_blank`,rel:`noopener noreferrer`},`GitHub`)]),createTextVNode(`, if you want to check how we handle your credentials, feel free to inspect our code. `)])],-1)]),_:1,__:[10]}),createBaseVNode(`div`,_hoisted_17,[needsApiKey.value?(openBlock(),createElementBlock(`div`,_hoisted_18,[createVNode(unref(FieldInput_default),{modelValue:apiKey.value,"onUpdate:modelValue":_cache$1[1]||=$event=>apiKey.value=$event,placeholder:getApiKeyPlaceholder(selectedProvider.value.id),type:`password`,label:`API Key`,description:`Enter your API key for the selected provider.`,required:``},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),needsBaseUrl.value?(openBlock(),createElementBlock(`div`,_hoisted_19,[createVNode(unref(FieldInput_default),{modelValue:baseUrl.value,"onUpdate:modelValue":_cache$1[2]||=$event=>baseUrl.value=$event,placeholder:getBaseUrlPlaceholder(selectedProvider.value.id),type:`text`,label:`Base URL`,description:`Enter the base URL for the provider's API.`},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),selectedProvider.value.id===`cloudflare-workers-ai`?(openBlock(),createElementBlock(`div`,_hoisted_20,[createVNode(unref(ProviderAccountIdInput_default),{modelValue:accountId.value,"onUpdate:modelValue":_cache$1[3]||=$event=>accountId.value=$event},null,8,[`modelValue`])])):createCommentVNode(``,!0)]),validationMessage.value?(openBlock(),createElementBlock(`div`,_hoisted_21,[createBaseVNode(`div`,{class:normalizeClass([`flex items-center rounded-lg p-3`,[isValidating.value?`bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300`:isValid$1.value?`bg-green-50 text-green-700 dark:bg-green-900/30 dark:text-green-300`:`bg-red-50 text-red-700 dark:bg-red-900/30 dark:text-red-300`]])},[createBaseVNode(`div`,{class:normalizeClass([`mr-2 text-lg`,[isValidating.value?`i-svg-spinners:3-dots-fade`:isValid$1.value?`i-solar:check-circle-bold-duotone`:`i-solar:danger-circle-bold-duotone`]])},null,2),createTextVNode(` `+toDisplayString(validationMessage.value),1)],2)])):createCommentVNode(``,!0)])):createCommentVNode(``,!0),createVNode(unref(Button_default),{label:unref(t)(`settings.dialogs.onboarding.next`),disabled:!selectedProviderId.value,loading:unref(isLoadingActiveProviderModels),onClick:handleFinishProviderConfiguration},null,8,[`label`,`disabled`,`loading`])])):step.value===4&&selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_22,[createBaseVNode(`div`,_hoisted_23,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[11]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-left-line-duotone":``,"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`h2`,_hoisted_24,toDisplayString(unref(t)(`settings.dialogs.onboarding.select-model`)),1),_cache$1[12]||=createBaseVNode(`div`,{"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`div`,_hoisted_25,[createVNode(unref(RadioCardManySelect_default),{modelValue:unref(activeModel),"onUpdate:modelValue":_cache$1[4]||=$event=>isRef(activeModel)?activeModel.value=$event:null,"search-query":unref(modelSearchQuery),"onUpdate:searchQuery":_cache$1[5]||=$event=>isRef(modelSearchQuery)?modelSearchQuery.value=$event:null,items:unref(providerModels).sort((a$2,b$4)=>a$2.id===unref(activeModel)?-1:b$4.id===unref(activeModel)?1:0),searchable:!0,"search-placeholder":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:unref(modelSearchQuery)}),"search-results-text":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":unref(t)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"list-class":`max-h-[calc(100dvh-17rem)] sm:max-h-120`},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`])]),createVNode(unref(Button_default),{variant:`primary`,disabled:!canSave.value,label:unref(t)(`settings.dialogs.onboarding.saveAndContinue`),onClick:handleSave},null,8,[`disabled`,`label`])])):createCommentVNode(``,!0)]),_:1},8,[`name`])])}}}),Onboarding_default=__plugin_vue_export_helper_default(Onboarding_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-25cc5d94`]]);(function(){"use strict";var t;try{if(typeof document<`u`){var a$2=document.createElement(`style`);a$2.nonce=(t=document.head.querySelector(`meta[property=csp-nonce]`))?.content,a$2.appendChild(document.createTextNode(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}`)),document.head.appendChild(a$2)}}catch(r$2){console.error(`vite-plugin-css-injected-by-js`,r$2)}})();const rt=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const ut=e$3=>typeof e$3<`u`;function st(e$3){return JSON.parse(JSON.stringify(e$3))}function $e(e$3,n$2,s$1,i$1={}){var t,w$2,d$2;let{clone:v$2=!1,passive:D$1=!1,eventName:$$2,deep:T$1=!1,defaultValue:r$2,shouldEmit:l$1}=i$1,h$3=getCurrentInstance(),m$3=s$1||h$3?.emit||(t=h$3?.$emit)?.bind(h$3)||(d$2=(w$2=h$3?.proxy)?.$emit)?.bind(h$3?.proxy),u$1=$$2;n$2||=`modelValue`,u$1||=`update:${n$2.toString()}`;let L$1=a$2=>v$2?typeof v$2==`function`?v$2(a$2):st(a$2):a$2,H$3=()=>ut(e$3[n$2])?L$1(e$3[n$2]):r$2,p$5=a$2=>{l$1?l$1(a$2)&&m$3(u$1,a$2):m$3(u$1,a$2)};if(D$1){let a$2=H$3(),c$4=ref(a$2),f$3=!1;return watch(()=>e$3[n$2],y$3=>{f$3||(f$3=!0,c$4.value=L$1(y$3),nextTick(()=>f$3=!1))}),watch(c$4,y$3=>{!f$3&&(y$3!==e$3[n$2]||T$1)&&p$5(y$3)},{deep:T$1}),c$4}else return computed({get(){return H$3()},set(a$2){p$5(a$2)}})}const[ee,ct]=createContext(`DrawerRoot`),Ee=new WeakMap;function C(e$3,n$2,s$1=!1){if(!e$3||!(e$3 instanceof HTMLElement)||!n$2)return;let i$1={};Object.entries(n$2).forEach(([t,w$2])=>{if(t.startsWith(`--`)){e$3.style.setProperty(t,w$2);return}i$1[t]=e$3.style[t],e$3.style[t]=w$2}),!s$1&&Ee.set(e$3,i$1)}function dt(e$3,n$2){if(!e$3||!(e$3 instanceof HTMLElement))return;let s$1=Ee.get(e$3);s$1&&Object.entries(s$1).forEach(([i$1,t])=>{e$3.style[i$1]=t})}function ie(e$3,n$2){let s$1=window.getComputedStyle(e$3),i$1=s$1.transform||s$1.webkitTransform||s$1.mozTransform,t=i$1.match(/^matrix3d\((.+)\)$/);return t?Number.parseFloat(t[1].split(`, `)[_(n$2)?13:12]):(t=i$1.match(/^matrix\((.+)\)$/),t?Number.parseFloat(t[1].split(`, `)[_(n$2)?5:4]):null)}function vt(e$3){return 8*(Math.log(e$3+1)-2)}function _(e$3){switch(e$3){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e$3}}function de(e$3,n$2){if(!e$3)return()=>{};let s$1=e$3.style.cssText;return Object.assign(e$3.style,n$2),()=>{e$3.style.cssText=s$1}}function ft(...e$3){return(...n$2)=>{for(let s$1 of e$3)typeof s$1==`function`&&s$1(...n$2)}}const O={DURATION:.5,EASE:[.32,.72,0,1]},_e=.4,pt=.25,gt=100,Be=8,re=16,Ce=26,Oe=`vaul-dragging`;function mt({activeSnapPoint:e$3,snapPoints:n$2,drawerRef:s$1,overlayRef:i$1,fadeFromIndex:t,onSnapPointChange:w$2,direction:d$2}){let v$2=ref(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function D$1(){v$2.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}onMounted(()=>{typeof window<`u`&&window.addEventListener(`resize`,D$1)}),onBeforeUnmount(()=>{typeof window<`u`&&window.removeEventListener(`resize`,D$1)});let $$2=computed(()=>(n$2.value&&e$3.value===n$2.value[n$2.value.length-1])??null),T$1=computed(()=>n$2.value&&n$2.value.length>0&&(t?.value||t?.value===0)&&!Number.isNaN(t?.value)&&n$2.value[t?.value??-1]===e$3.value||!n$2.value),r$2=computed(()=>{var p$5;return(p$5=n$2.value)?.findIndex(a$2=>a$2===e$3.value)??null}),l$1=computed(()=>{var p$5;return(p$5=n$2.value)?.map(a$2=>{let c$4=typeof a$2==`string`,f$3=0;if(c$4&&(f$3=Number.parseInt(a$2,10)),_(d$2.value)){let P$2=c$4?f$3:v$2.value?a$2*v$2.value.innerHeight:0;return v$2.value?d$2.value===`bottom`?v$2.value.innerHeight-P$2:-v$2.value.innerHeight+P$2:P$2}let y$3=c$4?f$3:v$2.value?a$2*v$2.value.innerWidth:0;return v$2.value?d$2.value===`right`?v$2.value.innerWidth-y$3:-v$2.value.innerWidth+y$3:y$3})??[]}),h$3=computed(()=>{var p$5;return r$2.value===null?null:(p$5=l$1.value)?.[r$2.value]}),m$3=p$5=>{var c$4,f$3,y$3,P$2;let a$2=(c$4=l$1.value)?.findIndex(x$3=>x$3===p$5)??null;nextTick(()=>{var x$3;w$2(a$2,l$1.value),C((x$3=s$1.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:_(d$2.value)?`translate3d(0, ${p$5}px, 0)`:`translate3d(${p$5}px, 0, 0)`})}),l$1.value&&a$2!==l$1.value.length-1&&a$2!==t?.value?C((f$3=i$1.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`0`}):C((y$3=i$1.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`1`}),e$3.value=a$2===null?null:(P$2=n$2.value)?.[a$2]??null};watch([e$3,l$1,n$2],()=>{var p$5;if(e$3.value){let a$2=(p$5=n$2.value)?.findIndex(c$4=>c$4===e$3.value)??-1;l$1.value&&a$2!==-1&&typeof l$1.value[a$2]==`number`&&m$3(l$1.value[a$2])}},{immediate:!0});function u$1({draggedDistance:p$5,closeDrawer:a$2,velocity:c$4,dismissible:f$3}){var j$1,G$2,z$3;if(t.value===void 0)return;let y$3=d$2.value===`bottom`||d$2.value===`right`?(h$3.value??0)-p$5:(h$3.value??0)+p$5,P$2=r$2.value===t.value-1,x$3=r$2.value===0,W$2=p$5>0;if(P$2&&C((j$1=i$1.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`}),c$4>2&&!W$2){f$3?a$2():m$3(l$1.value[0]);return}if(c$4>2&&W$2&&l$1&&n$2.value){m$3(l$1.value[n$2.value.length-1]);return}let te$3=(G$2=l$1.value)?.reduce((M$1,g$2)=>typeof M$1!=`number`||typeof g$2!=`number`?M$1:Math.abs(g$2-y$3)_e&&Math.abs(p$5)0&&$$2){m$3(l$1.value[((z$3=n$2.value)?.length??0)-1]);return}if(x$3&&M$1<0&&f$3&&a$2(),r$2.value===null)return;m$3(l$1.value[r$2.value+M$1]);return}m$3(te$3)}function L$1({draggedDistance:p$5}){var c$4;if(h$3.value===null)return;let a$2=d$2.value===`bottom`||d$2.value===`right`?h$3.value-p$5:h$3.value+p$5;(d$2.value===`bottom`||d$2.value===`right`)&&a$2l$1.value[l$1.value.length-1]||C((c$4=s$1.value)?.$el,{transform:_(d$2.value)?`translate3d(0, ${a$2}px, 0)`:`translate3d(${a$2}px, 0, 0)`})}function H$3(p$5,a$2){if(!n$2.value||typeof r$2.value!=`number`||!l$1.value||t.value===void 0)return null;let c$4=r$2.value===t.value-1;if(r$2.value>=t.value&&a$2)return 0;if(c$4&&!a$2)return 1;if(!T$1.value&&!c$4)return null;let y$3=c$4?r$2.value+1:r$2.value-1,P$2=c$4?l$1.value[y$3]-l$1.value[y$3-1]:l$1.value[y$3+1]-l$1.value[y$3],x$3=p$5/Math.abs(P$2);return c$4?1-x$3:x$3}return{isLastSnapPoint:$$2,shouldFade:T$1,getPercentageDragged:H$3,activeSnapPointIndex:r$2,onRelease:u$1,onDrag:L$1,snapPointsOffset:l$1}}function Te(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let Q=null;function wt(e$3){let{isOpen:n$2,modal:s$1,nested:i$1,hasBeenOpened:t,preventScrollRestoration:w$2,noBodyStyles:d$2}=e$3,v$2=ref(typeof window<`u`?window.location.href:``),D$1=ref(0);function $$2(){if(Te()&&Q===null&&n$2.value&&!d$2.value){Q={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};let{scrollX:r$2,innerHeight:l$1}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-D$1.value}px`,left:`${-r$2}px`,right:`0px`,height:`auto`}),setTimeout(()=>{requestAnimationFrame(()=>{let h$3=l$1-window.innerHeight;h$3&&D$1.value>=l$1&&(document.body.style.top=`-${D$1.value+h$3}px`)})},300)}}function T$1(){if(Te()&&Q!==null&&!d$2.value){let r$2=-Number.parseInt(document.body.style.top,10),l$1=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,Q),window.requestAnimationFrame(()=>{if(w$2.value&&v$2.value!==window.location.href){v$2.value=window.location.href;return}window.scrollTo(l$1,r$2)}),Q=null}}return onMounted(()=>{function r$2(){D$1.value=window.scrollY}r$2(),window.addEventListener(`scroll`,r$2),onUnmounted(()=>{window.removeEventListener(`scroll`,r$2)})}),watch([n$2,t,v$2],()=>{i$1.value||!t.value||(n$2.value?(window.matchMedia(`(display-mode: standalone)`).matches||$$2(),s$1.value||setTimeout(()=>{T$1()},500)):T$1())}),{restorePositionSetting:T$1}}function ht(e$3,n$2){return e$3&&e$3.value?e$3:n$2}function yt(e$3){let{emitDrag:n$2,emitRelease:s$1,emitClose:i$1,emitOpenChange:t,open:w$2,dismissible:d$2,nested:v$2,modal:D$1,shouldScaleBackground:$$2,setBackgroundColorOnScale:T$1,scrollLockTimeout:r$2,closeThreshold:l$1,activeSnapPoint:h$3,fadeFromIndex:m$3,direction:u$1,noBodyStyles:L$1,handleOnly:H$3,preventScrollRestoration:p$5}=e$3,a$2=ref(w$2.value??!1),c$4=ref(!1),f$3=ref(!1),y$3=ref(!1),P$2=ref(null),x$3=ref(null),W$2=ref(null),te$3=ref(null),V$2=ref(null),j$1=ref(!1),G$2=ref(null),z$3=ref(0),M$1=ref(!1);ref(0);let g$2=ref(null);ref(0);let pe$3=computed(()=>{var o$1;return(o$1=g$2.value)?.$el.getBoundingClientRect().height||0}),U=ht(e$3.snapPoints,ref(void 0)),Ne$1=computed(()=>{var o$1;return U&&((o$1=U.value)?.length??0)>0}),Ae$1=ref(null),{activeSnapPointIndex:ge$2,onRelease:xe,snapPointsOffset:He$2,onDrag:Ue$1,shouldFade:me$2,getPercentageDragged:Le$2}=mt({snapPoints:U,activeSnapPoint:h$3,drawerRef:g$2,fadeFromIndex:m$3,overlayRef:P$2,onSnapPointChange:Me$2,direction:u$1});function Me$2(o$1,R$3){U.value&&o$1===R$3.length-1&&(x$3.value=new Date)}wt({isOpen:a$2,modal:D$1,nested:v$2,hasBeenOpened:c$4,noBodyStyles:L$1,preventScrollRestoration:p$5});function ne$2(){return(window.innerWidth-Ce)/window.innerWidth}function we$2(o$1,R$3){var k$4;if(!o$1)return!1;let b$4=o$1,B$2=(k$4=window.getSelection())?.toString(),E$2=g$2.value?ie(g$2.value.$el,u$1.value):null,A$2=new Date;if(b$4.hasAttribute(`data-vaul-no-drag`)||b$4.closest(`[data-vaul-no-drag]`))return!1;if(u$1.value===`right`||u$1.value===`left`)return!0;if(x$3.value&&A$2.getTime()-x$3.value.getTime()<500)return!1;if(E$2!==null&&(u$1.value===`bottom`?E$2>0:E$2<0))return!0;if(B$2&&B$2.length>0)return!1;if(V$2.value&&A$2.getTime()-V$2.value.getTime()b$4.clientHeight){if(b$4.scrollTop!==0)return V$2.value=new Date,!1;if(b$4.getAttribute(`role`)===`dialog`)return!0}b$4=b$4.parentNode}return!0}function ke$1(o$1){!d$2.value&&!U.value||g$2.value&&!g$2.value.$el.contains(o$1.target)||(f$3.value=!0,W$2.value=new Date,o$1.target.setPointerCapture(o$1.pointerId),z$3.value=_(u$1.value)?o$1.clientY:o$1.clientX)}function Ie(o$1){var R$3,b$4,B$2,E$2,A$2,k$4;if(g$2.value&&f$3.value){let X$2=u$1.value===`bottom`||u$1.value===`right`?1:-1,ae$1=(z$3.value-(_(u$1.value)?o$1.clientY:o$1.clientX))*X$2,le$2=ae$1>0,ye$1=U.value&&!d$2.value&&!le$2;if(ye$1&&ge$2.value===0)return;let ce$2=Math.abs(ae$1),Se$2=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`),q$2=ce$2/pe$3.value,De=Le$2(ce$2,le$2);if(De!==null&&(q$2=De),ye$1&&q$2>=1||!j$1.value&&!we$2(o$1.target,le$2))return;if((R$3=g$2?.value)==null||R$3.$el.classList.add(Oe),j$1.value=!0,C((b$4=g$2.value)?.$el,{transition:`none`}),C((B$2=P$2.value)?.$el,{transition:`none`}),U.value&&Ue$1({draggedDistance:ae$1}),le$2&&!U.value){let Y$2=vt(ae$1),oe$2=Math.min(Y$2*-1,0)*X$2;C((E$2=g$2.value)?.$el,{transform:_(u$1.value)?`translate3d(0, ${oe$2}px, 0)`:`translate3d(${oe$2}px, 0, 0)`});return}let qe$2=1-q$2;if((me$2.value||m$3.value&&ge$2.value===m$3.value-1)&&(n$2(q$2),C((A$2=P$2.value)?.$el,{opacity:`${qe$2}`,transition:`none`},!0)),Se$2&&P$2.value&&$$2.value){let Y$2=Math.min(ne$2()+q$2*(1-ne$2()),1),oe$2=8-q$2*8,be$2=Math.max(0,14-q$2*14);C(Se$2,{borderRadius:`${oe$2}px`,transform:_(u$1.value)?`scale(${Y$2}) translate3d(0, ${be$2}px, 0)`:`scale(${Y$2}) translate3d(${be$2}px, 0, 0)`,transition:`none`},!0)}if(!U.value){let Y$2=ce$2*X$2;C((k$4=g$2.value)?.$el,{transform:_(u$1.value)?`translate3d(0, ${Y$2}px, 0)`:`translate3d(${Y$2}px, 0, 0)`})}}}function he$2(){var b$4;if(!g$2.value)return;let o$1=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`),R$3=ie(g$2.value.$el,u$1.value);C(g$2.value.$el,{transform:`translate3d(0, 0, 0)`,transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`}),C((b$4=P$2.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`1`}),$$2.value&&R$3&&R$3>0&&a$2.value&&C(o$1,{borderRadius:`${Be}px`,overflow:`hidden`,..._(u$1.value)?{transform:`scale(${ne$2()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${ne$2()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(`,`)})`},!0)}function K$1(o$1){g$2.value&&(i$1(),o$1||(a$2.value=!1),window.setTimeout(()=>{U.value&&(h$3.value=U.value[0])},O.DURATION*1e3))}watchEffect(()=>{if(!a$2.value&&$$2.value&&rt){let o$1=setTimeout(()=>{dt(document.body)},200);return()=>clearTimeout(o$1)}}),watch(w$2,()=>{a$2.value=w$2.value,w$2.value||K$1()});function We(o$1){if(!f$3.value||!g$2.value)return;g$2.value.$el.classList.remove(Oe),j$1.value=!1,f$3.value=!1,te$3.value=new Date;let R$3=ie(g$2.value.$el,u$1.value);if(!we$2(o$1.target,!1)||!R$3||Number.isNaN(R$3)||W$2.value===null)return;let b$4=te$3.value.getTime()-W$2.value.getTime(),B$2=z$3.value-(_(u$1.value)?o$1.clientY:o$1.clientX),E$2=Math.abs(B$2)/b$4;if(E$2>.05&&(y$3.value=!0,window.setTimeout(()=>{y$3.value=!1},200)),U.value){let k$4=u$1.value===`bottom`||u$1.value===`right`?1:-1;xe({draggedDistance:B$2*k$4,closeDrawer:K$1,velocity:E$2,dismissible:d$2.value}),s$1(!0);return}if(u$1.value===`bottom`||u$1.value===`right`?B$2>0:B$2<0){he$2(),s$1(!0);return}if(E$2>_e){K$1(),s$1(!1);return}let A$2=Math.min(g$2.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(R$3>=A$2*l$1.value){K$1(),s$1(!1);return}s$1(!0),he$2()}watch(a$2,o$1=>{o$1&&(x$3.value=new Date),t(o$1)},{immediate:!0});function Ve$1(o$1){var B$2,E$2;let R$3=o$1?(window.innerWidth-re)/window.innerWidth:1,b$4=o$1?-16:0;G$2.value&&window.clearTimeout(G$2.value),C((B$2=g$2.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:`scale(${R$3}) translate3d(0, ${b$4}px, 0)`}),!o$1&&(E$2=g$2.value)!=null&&E$2.$el&&(G$2.value=window.setTimeout(()=>{var k$4,X$2;let A$2=ie((k$4=g$2.value)?.$el,u$1.value);C((X$2=g$2.value)?.$el,{transition:`none`,transform:_(u$1.value)?`translate3d(0, ${A$2}px, 0)`:`translate3d(${A$2}px, 0, 0)`})},500))}function je$1(o$1){var A$2;if(o$1<0)return;let R$3=_(u$1.value)?window.innerHeight:window.innerWidth,b$4=(R$3-re)/R$3,B$2=b$4+o$1*(1-b$4),E$2=-16+o$1*re;C((A$2=g$2.value)?.$el,{transform:_(u$1.value)?`scale(${B$2}) translate3d(0, ${E$2}px, 0)`:`scale(${B$2}) translate3d(${E$2}px, 0, 0)`,transition:`none`})}function ze$1(o$1){var E$2;let R$3=_(u$1.value)?window.innerHeight:window.innerWidth,b$4=o$1?(R$3-re)/R$3:1,B$2=o$1?-16:0;o$1&&C((E$2=g$2.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:_(u$1.value)?`scale(${b$4}) translate3d(0, ${B$2}px, 0)`:`scale(${b$4}) translate3d(${B$2}px, 0, 0)`})}return{open:w$2,isOpen:a$2,modal:D$1,keyboardIsOpen:M$1,hasBeenOpened:c$4,drawerRef:g$2,drawerHeightRef:pe$3,overlayRef:P$2,handleRef:Ae$1,isDragging:f$3,dragStartTime:W$2,isAllowedToDrag:j$1,snapPoints:U,activeSnapPoint:h$3,hasSnapPoints:Ne$1,pointerStart:z$3,dismissible:d$2,snapPointsOffset:He$2,direction:u$1,shouldFade:me$2,fadeFromIndex:m$3,shouldScaleBackground:$$2,setBackgroundColorOnScale:T$1,onPress:ke$1,onDrag:Ie,onRelease:We,closeDrawer:K$1,onNestedDrag:je$1,onNestedRelease:ze$1,onNestedOpenChange:Ve$1,emitClose:i$1,emitDrag:n$2,emitRelease:s$1,emitOpenChange:t,nested:v$2,handleOnly:H$3,noBodyStyles:L$1}}const St=defineComponent({__name:`DrawerRoot`,props:{activeSnapPoint:{default:void 0},closeThreshold:{default:pt},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:gt},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:`bottom`},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:[`drag`,`release`,`close`,`update:open`,`update:activeSnapPoint`,`animationEnd`],setup(e$3,{expose:n$2,emit:s$1}){let i$1=e$3,t=s$1;useSlots();let w$2=computed(()=>i$1.fadeFromIndex??(i$1.snapPoints&&i$1.snapPoints.length-1)),d$2=$e(i$1,`open`,t,{defaultValue:i$1.defaultOpen,passive:i$1.open===void 0}),v$2=$e(i$1,`activeSnapPoint`,t,{passive:i$1.activeSnapPoint===void 0}),D$1={emitDrag:m$3=>t(`drag`,m$3),emitRelease:m$3=>t(`release`,m$3),emitClose:()=>t(`close`),emitOpenChange:m$3=>{t(`update:open`,m$3),setTimeout(()=>{t(`animationEnd`,m$3)},O.DURATION*1e3)}},{closeDrawer:$$2,hasBeenOpened:T$1,modal:r$2,isOpen:l$1}=ct(yt({...D$1,...toRefs(i$1),activeSnapPoint:v$2,fadeFromIndex:w$2,open:d$2}));function h$3(m$3){if(d$2.value!==void 0){D$1.emitOpenChange(m$3);return}l$1.value=m$3,m$3?T$1.value=!0:$$2()}return n$2({open:l$1}),(m$3,u$1)=>(openBlock(),createBlock(unref(_sfc_main$8),{open:unref(l$1),modal:unref(r$2),"onUpdate:open":h$3},{default:withCtx(()=>[renderSlot(m$3.$slots,`default`,{open:unref(l$1)})]),_:3},8,[`open`,`modal`]))}}),_t=defineComponent({__name:`DrawerRootNested`,props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:[`drag`,`release`,`close`,`update:open`,`update:activeSnapPoint`,`animationEnd`],setup(e$3,{emit:n$2}){let s$1=e$3,i$1=n$2,{onNestedDrag:t,onNestedOpenChange:w$2,onNestedRelease:d$2}=ee();function v$2(){w$2(!1)}function D$1(r$2){t(r$2)}function $$2(r$2){r$2&&w$2(r$2),i$1(`update:open`,r$2)}let T$1=useForwardPropsEmits(s$1,i$1);return(r$2,l$1)=>(openBlock(),createBlock(St,mergeProps(unref(T$1),{nested:``,onClose:v$2,onDrag:D$1,onRelease:unref(d$2),"onUpdate:open":$$2}),{default:withCtx(()=>[renderSlot(r$2.$slots,`default`)]),_:3},16,[`onRelease`]))}}),Bt=defineComponent({__name:`DrawerOverlay`,setup(e$3){let{overlayRef:n$2,hasSnapPoints:s$1,isOpen:i$1,shouldFade:t}=ee();return(w$2,d$2)=>(openBlock(),createBlock(unref(_sfc_main$6),{ref_key:`overlayRef`,ref:n$2,"data-vaul-overlay":``,"data-vaul-snap-points":unref(i$1)&&unref(s$1)?`true`:`false`,"data-vaul-snap-points-overlay":unref(i$1)&&unref(t)?`true`:`false`},null,8,[`data-vaul-snap-points`,`data-vaul-snap-points-overlay`]))}}),Dt=()=>()=>{};function bt(){let{direction:e$3,isOpen:n$2,shouldScaleBackground:s$1,setBackgroundColorOnScale:i$1,noBodyStyles:t}=ee(),w$2=ref(null),d$2=ref(document.body.style.backgroundColor);function v$2(){return(window.innerWidth-Ce)/window.innerWidth}watchEffect(D$1=>{if(n$2.value&&s$1.value){w$2.value&&clearTimeout(w$2.value);let $$2=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!$$2)return;ft(i$1.value&&!t.value?de(document.body,{background:`black`}):Dt,de($$2,{transformOrigin:_(e$3.value)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(`,`)})`}));let T$1=de($$2,{borderRadius:`${Be}px`,overflow:`hidden`,..._(e$3.value)?{transform:`scale(${v$2()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${v$2()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});D$1(()=>{T$1(),w$2.value=window.setTimeout(()=>{d$2.value?document.body.style.background=d$2.value:document.body.style.removeProperty(`background`)},O.DURATION*1e3)})}},{flush:`pre`})}const Ct=defineComponent({__name:`DrawerContent`,setup(e$3){let{open:n$2,isOpen:s$1,snapPointsOffset:i$1,hasSnapPoints:t,drawerRef:w$2,onPress:d$2,onDrag:v$2,onRelease:D$1,modal:$$2,emitOpenChange:T$1,dismissible:r$2,keyboardIsOpen:l$1,closeDrawer:h$3,direction:m$3,handleOnly:u$1}=ee();bt();let L$1=ref(!1),H$3=computed(()=>i$1.value&&i$1.value.length>0?`${i$1.value[0]}px`:`0`);function p$5(f$3){if(!$$2.value||f$3.defaultPrevented){f$3.preventDefault();return}l$1.value&&=!1,r$2.value?T$1(!1):f$3.preventDefault()}function a$2(f$3){u$1.value||d$2(f$3)}function c$4(f$3){u$1.value||v$2(f$3)}return watchEffect(()=>{t.value&&window.requestAnimationFrame(()=>{L$1.value=!0})}),(f$3,y$3)=>(openBlock(),createBlock(unref(_sfc_main$5),{ref_key:`drawerRef`,ref:w$2,"data-vaul-drawer":``,"data-vaul-drawer-direction":unref(m$3),"data-vaul-delayed-snap-points":L$1.value?`true`:`false`,"data-vaul-snap-points":unref(s$1)&&unref(t)?`true`:`false`,style:normalizeStyle({"--snap-point-height":H$3.value}),onPointerdown:a$2,onPointermove:c$4,onPointerup:unref(D$1),onPointerDownOutside:p$5,onOpenAutoFocus:y$3[0]||=withModifiers(()=>{},[`prevent`]),onEscapeKeyDown:y$3[1]||=P$2=>{unref(r$2)||P$2.preventDefault()}},{default:withCtx(()=>[renderSlot(f$3.$slots,`default`)]),_:3},8,[`data-vaul-drawer-direction`,`data-vaul-delayed-snap-points`,`data-vaul-snap-points`,`style`,`onPointerup`]))}}),$t=[`data-vaul-drawer-visible`],Ot={"data-vaul-handle-hitarea":``,"aria-hidden":`true`},Tt=250,Pt=120,Nt=defineComponent({__name:`DrawerHandle`,props:{preventCycle:{type:Boolean,default:!1}},setup(e$3){let n$2=e$3,{onPress:s$1,onDrag:i$1,handleRef:t,handleOnly:w$2,isOpen:d$2,snapPoints:v$2,activeSnapPoint:D$1,isDragging:$$2,dismissible:T$1,closeDrawer:r$2}=ee(),l$1=ref(null),h$3=ref(!1);function m$3(){if(h$3.value){H$3();return}window.setTimeout(()=>{u$1()},Pt)}function u$1(){if($$2.value||n$2.preventCycle||h$3.value){H$3();return}if(H$3(),!v$2.value||v$2.value.length===0){T$1.value||r$2();return}let c$4=D$1.value===v$2.value[v$2.value.length-1];if(c$4&&T$1.value){r$2();return}let f$3=v$2.value.findIndex(P$2=>P$2===D$1.value);if(f$3===-1)return;let y$3=c$4?0:f$3+1;D$1.value=v$2.value[y$3]}function L$1(){l$1.value=window.setTimeout(()=>{h$3.value=!0},Tt)}function H$3(){l$1.value&&window.clearTimeout(l$1.value),h$3.value=!1}function p$5(c$4){w$2.value&&s$1(c$4),L$1()}function a$2(c$4){w$2.value&&i$1(c$4)}return(c$4,f$3)=>(openBlock(),createElementBlock(`div`,{ref_key:`handleRef`,ref:t,"data-vaul-drawer-visible":unref(d$2)?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,onClick:m$3,onPointercancel:H$3,onPointerdown:p$5,onPointermove:a$2},[createBaseVNode(`span`,Ot,[renderSlot(c$4.$slots,`default`)])],40,$t))}});var OnboardingDialog_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`OnboardingDialog`,props:{modelValue:{type:Boolean,default:!1,required:!1},modelModifiers:{}},emits:mergeModels([`configured`,`skipped`],[`update:modelValue`]),setup(__props,{emit:__emit}){let emit$1=__emit,showDialog=useModel(__props,`modelValue`),isDesktop=useMediaQuery(`(min-width: 768px)`);return(_ctx,_cache$1)=>unref(isDesktop)?(openBlock(),createBlock(unref(_sfc_main$8),{key:0,open:showDialog.value,"onUpdate:open":_cache$1[2]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[createVNode(unref(_sfc_main$7),null,{default:withCtx(()=>[createVNode(unref(_sfc_main$6),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-[9999] bg-black/50 backdrop-blur-sm`}),createVNode(unref(_sfc_main$5),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-[9999] max-h-full max-w-2xl w-[92dvw] transform overflow-y-scroll rounded-2xl bg-white p-6 shadow-xl outline-none backdrop-blur-md scrollbar-none -translate-x-1/2 -translate-y-1/2 dark:bg-neutral-900`},{default:withCtx(()=>[createVNode(Onboarding_default,{onConfigured:_cache$1[0]||=$event=>emit$1(`configured`),onSkipped:_cache$1[1]||=$event=>emit$1(`skipped`)})]),_:1})]),_:1})]),_:1},8,[`open`])):(openBlock(),createBlock(unref(St),{key:1,open:showDialog.value,"should-scale-background":``,"onUpdate:open":_cache$1[5]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[createVNode(unref(_sfc_main$7),null,{default:withCtx(()=>[createVNode(unref(Bt),{class:`fixed inset-0`}),createVNode(unref(Ct),{class:`fixed bottom-0 left-0 right-0 z-1000 mt-20 h-full max-h-[96%] flex flex-col rounded-t-2xl bg-neutral-50 p-4 outline-none backdrop-blur-md dark:bg-neutral-900/95`},{default:withCtx(()=>[createVNode(unref(Nt)),createVNode(Onboarding_default,{onConfigured:_cache$1[3]||=$event=>emit$1(`configured`),onSkipped:_cache$1[4]||=$event=>emit$1(`skipped`)})]),_:1})]),_:1})]),_:1},8,[`open`]))}}),OnboardingDialog_default=OnboardingDialog_vue_vue_type_script_setup_true_lang_default;const ToasterRootInjectionKey=Symbol(`ToasterRoot`);var ToasterRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ToasterRoot`,emits:[`close`],setup(__props,{emit:__emit}){let emits=__emit;return provide(ToasterRootInjectionKey,{close:id$1=>emits(`close`,id$1)}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`)}}),ToasterRoot_default=ToasterRoot_vue_vue_type_script_setup_true_lang_default,ArrowTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ArrowTransition`,props:{stageTransition:{default:()=>({primaryColor:`#666`,secondaryColor:`#ccc`})}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value.secondaryColor||`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-3`,style:normalizeStyle({zIndex:stageTransition.value.zIndex||100})},null,4))}}),ArrowTransition_default=__plugin_vue_export_helper_default(ArrowTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-17464329`]]),BubbleWaveOutTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`BubbleWaveOutTransition`,props:{stageTransition:{}},setup(__props){let props=__props,colors=computed(()=>props.stageTransition?.colors||[`#eee`,`#ebcb8b`,`#c56370`,`#3f3b52`]);return onMounted(()=>{document.documentElement.style.setProperty(`--circle-expansion-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--circle-expansion-duration`,`${props.stageTransition?.duration||.4}s`),colors.value.forEach((color$2,index$1)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${index$1+1}`,color$2)})}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`circle-expansion-transition`,style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex||100})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(colors.value,(_$2,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1}))),128))],4))}}),BubbleWaveOutTransition_default=__plugin_vue_export_helper_default(BubbleWaveOutTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-4624be9e`]]),FantasyFallTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FantasyFallTransition`,props:{stageTransition:{}},setup(__props){let props=__props,direction=computed(()=>props.stageTransition?.direction||`up`),directionClass=computed(()=>`fantasy-fall-${direction.value}`);return onMounted(()=>{document.documentElement.style.setProperty(`--fantasy-fall-color`,props.stageTransition?.primaryColor||`#eee`),document.documentElement.style.setProperty(`--fantasy-fall-duration`,`${props.stageTransition?.duration||.6}s`),document.documentElement.style.setProperty(`--fantasy-fall-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--fantasy-fall-radius-sm`,`${props.stageTransition?.borderRadius?.sm||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-md`,`${props.stageTransition?.borderRadius?.md||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-lg`,`${props.stageTransition?.borderRadius?.lg||`50%`}`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`fantasy-fall-transition`,directionClass.value]),style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex??100})},null,6))}}),FantasyFallTransition_default=__plugin_vue_export_helper_default(FantasyFallTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-826171f5`]]),MultipleBlocksRevealTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`MultipleBlocksRevealTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor||`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-4`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},_cache$1[0]||=[createStaticVNode(`
`,5)],4))}}),MultipleBlocksRevealTransition_default=__plugin_vue_export_helper_default(MultipleBlocksRevealTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-4221f976`]]),SlideTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SlideTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor||`#ccc`);return watch([stageTransition,overlayColor1,overlayColor2],()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,overlayColor2.value)}),onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-1`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},null,4))}}),SlideTransition_default=__plugin_vue_export_helper_default(SlideTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-81c0af14`]]),SlopeSlideTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SlopeSlideTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor??`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor??`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-2`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},null,4))}}),SlopeSlideTransition_default=__plugin_vue_export_helper_default(SlopeSlideTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-9e8b66c8`]]),RectanglesRotateTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RectanglesRotateTransition`,props:{stageTransition:{}},setup(__props){let props=__props;return onMounted(()=>{document.documentElement.style.setProperty(`--rectangle-rotate-1-color`,props.stageTransition?.primaryColor||`#ebcb8b`),document.documentElement.style.setProperty(`--rectangle-rotate-2-color`,props.stageTransition?.secondaryColor||`#c56370`),document.documentElement.style.setProperty(`--rectangle-rotate-3-color`,props.stageTransition?.tertiaryColor||`#43445b`),document.documentElement.style.setProperty(`--rectangle-rotate-duration`,`${props.stageTransition?.duration||.6}s`),document.documentElement.style.setProperty(`--rectangle-rotate-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--rectangle-rotate-stagger`,`${props.stageTransition?.staggerDelay||.1}s`),document.documentElement.style.setProperty(`--rectangle-rotate-rotation`,`${props.stageTransition?.rotation||270}deg`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`rectangle-rotate-transition`,style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex??100})},_cache$1[0]||=[createBaseVNode(`div`,{class:`rectangle rectangle-rotate-1`},[createBaseVNode(`div`)],-1),createBaseVNode(`div`,{class:`rectangle rectangle-rotate-2`},[createBaseVNode(`div`)],-1),createBaseVNode(`div`,{class:`rectangle rectangle-rotate-3`},[createBaseVNode(`div`)],-1)],4))}}),RectanglesRotateTransition_default=__plugin_vue_export_helper_default(RectanglesRotateTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-45ea2f7f`]]),StageTransitionGroup_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`StageTransitionGroup`,props:{primaryColor:{},secondaryColor:{},tertiaryColor:{},colors:{},zIndex:{},disableTransitions:{type:Boolean},usePageSpecificTransitions:{type:Boolean}},setup(__props){let props=__props,router$1=useRouter(),showTransition=ref(!1),transitionStage=ref(),activeTransitionName=ref(``),activeStageTransitionParams=ref(),transitions=shallowRef({slide:{component:SlideTransition_default,duration:2700},"slope-slide":{component:SlopeSlideTransition_default,duration:2700},arrow:{component:ArrowTransition_default,duration:2700},"multiple-blocks-reveal":{component:MultipleBlocksRevealTransition_default,duration:2800},"fantasy-fall":{component:FantasyFallTransition_default,duration:2700},"rectangles-rotate":{component:RectanglesRotateTransition_default,duration:2700},"bubble-wave-out":{component:BubbleWaveOutTransition_default,duration:1e3}}),lifecycleHooks=ref([]);function addTransitionHook(hook){return lifecycleHooks.value.push(hook),()=>{let index$1=lifecycleHooks.value.indexOf(hook);index$1>=0&&lifecycleHooks.value.splice(index$1,1)}}async function triggerHooks(stage,data$12={}){transitionStage.value=stage;for(let hook of lifecycleHooks.value)try{await Promise.resolve(hook(stage,data$12))}catch(error){console.error(`Error in transition hook at stage "${stage}":`,error)}}async function triggerTransitionAsyncFn(params,next,resolve$1){if(params.name===`none`||!params.name){next(),resolve$1();return}let transition=transitions.value[params.name];if(!transition){console.error(`Transition ${params.name} not found`),next(),resolve$1();return}let navTiming=transition.nextDelay===void 0?transition.duration/3:transition.nextDelay,hasNavigated=!1,navigationHook=stage=>{stage===`navigation`&&!hasNavigated&&(hasNavigated=!0,next())},removeNavHook=addTransitionHook(navigationHook);try{await triggerHooks(`before-enter`,{transitionName:params.name}),showTransition.value&&(await triggerHooks(`before-leave`,{transitionName:activeTransitionName.value}),activeTransitionName.value=``,activeStageTransitionParams.value=void 0,showTransition.value=!1,await triggerHooks(`after-leave`,{transitionName:activeTransitionName.value}),await new Promise(r$2=>setTimeout(r$2,50))),activeTransitionName.value=params.name,activeStageTransitionParams.value=params,showTransition.value=!0,await triggerHooks(`enter-active`,{transitionName:name}),setTimeout(async()=>{await triggerHooks(`navigation`,{transitionName:params.name,config:transition}),hasNavigated||(hasNavigated=!0,next())},navTiming),setTimeout(async()=>{await triggerHooks(`after-enter`,{transitionName:params.name})},transition.duration),setTimeout(async()=>{await triggerHooks(`before-leave`,{transitionName:params.name})},transition.duration+10),setTimeout(async()=>{await triggerHooks(`leave-active`,{transitionName:params.name})},transition.duration+20);let totalDuration=transition.exitDuration??0;setTimeout(async()=>{showTransition.value=!1,activeTransitionName.value=``,activeStageTransitionParams.value=void 0,await triggerHooks(`after-leave`,{transitionName:params.name}),resolve$1()},transition.duration+totalDuration)}catch(error){console.error(error)}finally{removeNavHook(),setTimeout(()=>{hasNavigated||(hasNavigated=!0,next())},transition.duration*2)}}function triggerTransition(params,next){return new Promise(resolve$1=>{triggerTransitionAsyncFn(params,next,resolve$1)})}return router$1.beforeEach((to$2,_from,next)=>{if(props.disableTransitions){next();return}if(typeof to$2.meta.stageTransition!=`object`){next();return}let stageTransition=to$2.meta.stageTransition;if(props.usePageSpecificTransitions&&stageTransition.pageSpecificAvailable){next();return}props.primaryColor!==void 0&&(stageTransition.primaryColor=props.primaryColor),props.secondaryColor!==void 0&&(stageTransition.secondaryColor=props.secondaryColor),props.tertiaryColor!==void 0&&(stageTransition.tertiaryColor=props.tertiaryColor),props.colors!==void 0&&(stageTransition.colors=props.colors),props.zIndex!==void 0&&(stageTransition.zIndex=props.zIndex),triggerTransition(stageTransition,next)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),showTransition.value?(openBlock(),createElementBlock(Fragment,{key:0},[transitions.value[activeTransitionName.value]?(openBlock(),createBlock(resolveDynamicComponent(transitions.value[activeTransitionName.value].component),{key:0,"stage-transition":activeStageTransitionParams.value},null,8,[`stage-transition`])):createCommentVNode(``,!0)],64)):createCommentVNode(``,!0)],64))}}),StageTransitionGroup_default=StageTransitionGroup_vue_vue_type_script_setup_true_lang_default;let toastsCounter=1;var Observer=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=subscriber=>(this.subscribers.push(subscriber),()=>{let index$1=this.subscribers.indexOf(subscriber);this.subscribers.splice(index$1,1)});publish=data$12=>{this.subscribers.forEach(subscriber=>subscriber(data$12))};addToast=data$12=>{this.publish(data$12),this.toasts=[...this.toasts,data$12]};create=data$12=>{let{message:message$1,...rest}=data$12,id$1=typeof data$12.id==`number`||data$12.id&&data$12.id?.length>0?data$12.id:toastsCounter++,alreadyExists=this.toasts.find(toast$1=>toast$1.id===id$1),dismissible=data$12.dismissible===void 0?!0:data$12.dismissible;return this.dismissedToasts.has(id$1)&&this.dismissedToasts.delete(id$1),alreadyExists?this.toasts=this.toasts.map(toast$1=>toast$1.id===id$1?(this.publish({...toast$1,...data$12,id:id$1,title:message$1}),{...toast$1,...data$12,id:id$1,dismissible,title:message$1}):toast$1):this.addToast({title:message$1,...rest,dismissible,id:id$1}),id$1};dismiss=id$1=>(id$1?(this.dismissedToasts.add(id$1),requestAnimationFrame(()=>this.subscribers.forEach(subscriber=>subscriber({id:id$1,dismiss:!0})))):this.toasts.forEach(toast$1=>{this.subscribers.forEach(subscriber=>subscriber({id:toast$1.id,dismiss:!0}))}),id$1);message=(message$1,data$12)=>this.create({...data$12,message:message$1,type:`default`});error=(message$1,data$12)=>this.create({...data$12,type:`error`,message:message$1});success=(message$1,data$12)=>this.create({...data$12,type:`success`,message:message$1});info=(message$1,data$12)=>this.create({...data$12,type:`info`,message:message$1});warning=(message$1,data$12)=>this.create({...data$12,type:`warning`,message:message$1});loading=(message$1,data$12)=>this.create({...data$12,type:`loading`,message:message$1});promise=(promise,data$12)=>{if(!data$12)return;let id$1;data$12.loading!==void 0&&(id$1=this.create({...data$12,promise,type:`loading`,message:data$12.loading,description:typeof data$12.description==`function`?void 0:data$12.description}));let p$5=Promise.resolve(promise instanceof Function?promise():promise),shouldDismiss=id$1!==void 0,result,originalPromise=p$5.then(async response=>{result=[`resolve`,response];let isVueComponent=isVNode(response);if(isVueComponent)shouldDismiss=!1,this.create({id:id$1,type:`default`,message:response});else if(isHttpResponse(response)&&!response.ok){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(`HTTP error! status: ${response.status}`):data$12.error,description=typeof data$12.description==`function`?await data$12.description(`HTTP error! status: ${response.status}`):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id$1||``};this.create({id:id$1,type:`error`,description,...toastSettings})}else if(response instanceof Error){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(response):data$12.error,description=typeof data$12.description==`function`?await data$12.description(response):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id$1||``};this.create({id:id$1,type:`error`,description,...toastSettings})}else if(data$12.success!==void 0){shouldDismiss=!1;let promiseData=typeof data$12.success==`function`?await data$12.success(response):data$12.success,description=typeof data$12.description==`function`?await data$12.description(response):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id$1||``};this.create({id:id$1,type:`success`,description,...toastSettings})}}).catch(async error=>{if(result=[`reject`,error],data$12.error!==void 0){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(error):data$12.error,description=typeof data$12.description==`function`?await data$12.description(error):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id$1||``};this.create({id:id$1,type:`error`,description,...toastSettings})}}).finally(()=>{shouldDismiss&&(this.dismiss(id$1),id$1=void 0),data$12.finally?.()}),unwrap=()=>new Promise((resolve$1,reject)=>originalPromise.then(()=>result[0]===`reject`?reject(result[1]):resolve$1(result[1])).catch(reject));return typeof id$1!=`string`&&typeof id$1!=`number`?{unwrap}:Object.assign(id$1,{unwrap})};custom=(component,data$12)=>{let id$1=data$12?.id||toastsCounter++;return this.publish({component,id:id$1,...data$12}),id$1};getActiveToasts=()=>this.toasts.filter(toast$1=>!this.dismissedToasts.has(toast$1.id))};const ToastState=new Observer;function toastFunction(message$1,data$12){let id$1=data$12?.id||toastsCounter++;return ToastState.create({message:message$1,id:id$1,type:`default`,...data$12}),id$1}const isHttpResponse=data$12=>data$12&&typeof data$12==`object`&&`ok`in data$12&&typeof data$12.ok==`boolean`&&`status`in data$12&&typeof data$12.status==`number`,basicToast=toastFunction,getHistory=()=>ToastState.toasts,getToasts=()=>ToastState.getActiveToasts(),toast=Object.assign(basicToast,{success:ToastState.success,info:ToastState.info,warning:ToastState.warning,error:ToastState.error,custom:ToastState.custom,message:ToastState.message,promise:ToastState.promise,dismiss:ToastState.dismiss,loading:ToastState.loading},{getHistory,getToasts});function isAction(action){return action.label!==void 0}const VISIBLE_TOASTS_AMOUNT=3,VIEWPORT_OFFSET=`24px`,MOBILE_VIEWPORT_OFFSET=`16px`,TOAST_LIFETIME=4e3,TOAST_WIDTH=356,GAP=14,SWIPE_THRESHOLD=45,TIME_BEFORE_UNMOUNT=200;function useIsDocumentHidden(){let isDocumentHidden=ref(!1);return watchEffect(()=>{let callback=()=>{isDocumentHidden.value=document.hidden};return document.addEventListener(`visibilitychange`,callback),()=>window.removeEventListener(`visibilitychange`,callback)}),{isDocumentHidden}}function cn(...classes){return classes.filter(Boolean).join(` `)}function getDefaultSwipeDirections(position$2){let[y$3,x$3]=position$2.split(`-`),directions=[];return y$3&&directions.push(y$3),x$3&&directions.push(x$3),directions}function assignOffset(defaultOffset$1,mobileOffset){let styles={};return[defaultOffset$1,mobileOffset].forEach((offset$2,index$1)=>{let isMobile=index$1===1,prefix=isMobile?`--mobile-offset`:`--offset`,defaultValue=isMobile?MOBILE_VIEWPORT_OFFSET:VIEWPORT_OFFSET;function assignAll(offset$1$1){[`top`,`right`,`bottom`,`left`].forEach(key$1=>{styles[`${prefix}-${key$1}`]=typeof offset$1$1==`number`?`${offset$1$1}px`:offset$1$1})}typeof offset$2==`number`||typeof offset$2==`string`?assignAll(offset$2):typeof offset$2==`object`?[`top`,`right`,`bottom`,`left`].forEach(key$1=>{offset$2[key$1]===void 0?styles[`${prefix}-${key$1}`]=defaultValue:styles[`${prefix}-${key$1}`]=typeof offset$2[key$1]==`number`?`${offset$2[key$1]}px`:offset$2[key$1]}):assignAll(defaultValue)}),styles}const _hoisted_1$7=[`data-rich-colors`,`data-styled`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-invert`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`],_hoisted_2$2=[`aria-label`,`data-disabled`];var Toast_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Toast`,props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:[`update:heights`,`update:height`,`removeToast`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,swipeDirection=ref(null),swipeOutDirection=ref(null),mounted=ref(!1),removed=ref(!1),swiping=ref(!1),swipeOut=ref(!1),swiped=ref(!1),offsetBeforeRemove=ref(0),initialHeight=ref(0),remainingTime=ref(props.toast.duration||props.duration||TOAST_LIFETIME),dragStartTime=ref(null),toastRef=ref(null),isFront=computed(()=>props.index===0),isVisible=computed(()=>props.index+1<=props.visibleToasts),toastType=computed(()=>props.toast.type),dismissible=computed(()=>props.toast.dismissible!==!1),toastClass=computed(()=>props.toast.class||``),toastDescriptionClass=computed(()=>props.descriptionClass||``),heightIndex=computed(()=>{let currentPosition=props.toast.position||props.position,samePositionHeights=props.heights.filter(h$3=>h$3.position===currentPosition),index$1=samePositionHeights.findIndex(height=>height.toastId===props.toast.id);return index$1>=0?index$1:0}),toastsHeightBefore=computed(()=>{let currentPosition=props.toast.position||props.position,samePositionHeights=props.heights.filter(h$3=>h$3.position===currentPosition);return samePositionHeights.reduce((prev,curr,reducerIndex)=>reducerIndex>=heightIndex.value?prev:prev+curr.height,0)}),offset$2=computed(()=>heightIndex.value*props.gap+toastsHeightBefore.value||0),closeButton=computed(()=>props.toast.closeButton??props.closeButton),duration=computed(()=>props.toast.duration||props.duration||TOAST_LIFETIME),closeTimerStartTimeRef=ref(0),lastCloseTimerStartTimeRef=ref(0),pointerStartRef=ref(null),coords$1=computed(()=>props.position.split(`-`)),y$3=computed(()=>coords$1.value[0]),x$3=computed(()=>coords$1.value[1]),isStringOfTitle=computed(()=>typeof props.toast.title!=`string`),isStringOfDescription=computed(()=>typeof props.toast.description!=`string`),{isDocumentHidden}=useIsDocumentHidden(),disabled=computed(()=>toastType.value&&toastType.value===`loading`);onMounted(()=>{mounted.value=!0,remainingTime.value=duration.value}),watchEffect(async()=>{if(!mounted.value||!toastRef.value)return;await nextTick();let toastNode=toastRef.value,originalHeight=toastNode.style.height;toastNode.style.height=`auto`;let newHeight=toastNode.getBoundingClientRect().height;toastNode.style.height=originalHeight,initialHeight.value=newHeight,emit$1(`update:height`,{toastId:props.toast.id,height:newHeight,position:props.toast.position||props.position})});function deleteToast(){removed.value=!0,offsetBeforeRemove.value=offset$2.value,setTimeout(()=>{emit$1(`removeToast`,props.toast)},TIME_BEFORE_UNMOUNT)}function handleCloseToast(){if(disabled.value||!dismissible.value)return{};deleteToast(),props.toast.onDismiss?.(props.toast)}function onPointerDown(event){disabled.value||!dismissible.value||(dragStartTime.value=new Date,offsetBeforeRemove.value=offset$2.value,event.target.setPointerCapture(event.pointerId),event.target.tagName!==`BUTTON`&&(swiping.value=!0,pointerStartRef.value={x:event.clientX,y:event.clientY}))}function onPointerUp(){if(swipeOut.value||!dismissible.value)return;pointerStartRef.value=null;let swipeAmountX=Number(toastRef.value?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),swipeAmountY=Number(toastRef.value?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),timeTaken=new Date().getTime()-(dragStartTime.value?.getTime()||0),swipeAmount=swipeDirection.value===`x`?swipeAmountX:swipeAmountY,velocity=Math.abs(swipeAmount)/timeTaken;if(Math.abs(swipeAmount)>=SWIPE_THRESHOLD||velocity>.11){offsetBeforeRemove.value=offset$2.value,props.toast.onDismiss?.(props.toast),swipeDirection.value===`x`?swipeOutDirection.value=swipeAmountX>0?`right`:`left`:swipeOutDirection.value=swipeAmountY>0?`down`:`up`,deleteToast(),swipeOut.value=!0;return}else toastRef.value?.style.setProperty(`--swipe-amount-x`,`0px`),toastRef.value?.style.setProperty(`--swipe-amount-y`,`0px`);swiped.value=!1,swiping.value=!1,swipeDirection.value=null}function onPointerMove(event){if(!pointerStartRef.value||!dismissible.value)return;let isHighlighted=window?.getSelection()?.toString()?.length??!1;if(isHighlighted)return;let yDelta=event.clientY-pointerStartRef.value.y,xDelta=event.clientX-pointerStartRef.value.x,swipeDirections=props.swipeDirections??getDefaultSwipeDirections(props.position);!swipeDirection.value&&(Math.abs(xDelta)>1||Math.abs(yDelta)>1)&&(swipeDirection.value=Math.abs(xDelta)>Math.abs(yDelta)?`x`:`y`);let swipeAmount={x:0,y:0},getDampening=delta=>{let factor$1=Math.abs(delta)/20;return 1/(1.5+factor$1)};if(swipeDirection.value===`y`){if(swipeDirections.includes(`top`)||swipeDirections.includes(`bottom`))if(swipeDirections.includes(`top`)&&yDelta<0||swipeDirections.includes(`bottom`)&&yDelta>0)swipeAmount.y=yDelta;else{let dampenedDelta=yDelta*getDampening(yDelta);swipeAmount.y=Math.abs(dampenedDelta)0)swipeAmount.x=xDelta;else{let dampenedDelta=xDelta*getDampening(xDelta);swipeAmount.x=Math.abs(dampenedDelta)0||Math.abs(swipeAmount.y)>0)&&(swiped.value=!0),toastRef.value?.style.setProperty(`--swipe-amount-x`,`${swipeAmount.x}px`),toastRef.value?.style.setProperty(`--swipe-amount-y`,`${swipeAmount.y}px`)}onMounted(()=>{if(mounted.value=!0,!toastRef.value)return;let height=toastRef.value.getBoundingClientRect().height;initialHeight.value=height;let newHeights=[{toastId:props.toast.id,height,position:props.toast.position},...props.heights];emit$1(`update:heights`,newHeights)}),onBeforeUnmount(()=>{toastRef.value&&emit$1(`removeToast`,props.toast)}),watchEffect(onInvalidate=>{if(props.toast.promise&&toastType.value===`loading`||props.toast.duration===1/0||props.toast.type===`loading`)return;let timeoutId,pauseTimer=()=>{if(lastCloseTimerStartTimeRef.value{remainingTime.value!==1/0&&(closeTimerStartTimeRef.value=new Date().getTime(),timeoutId=setTimeout(()=>{props.toast.onAutoClose?.(props.toast),deleteToast()},remainingTime.value))};props.expanded||props.interacting||isDocumentHidden.value?pauseTimer():startTimer(),onInvalidate(()=>{clearTimeout(timeoutId)})}),watch(()=>props.toast.delete,value$1=>{value$1!==void 0&&value$1&&deleteToast()},{deep:!0});function handleDragEnd(){swiping.value=!1,swipeDirection.value=null,pointerStartRef.value=null}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`li`,{tabindex:`0`,ref_key:`toastRef`,ref:toastRef,class:normalizeClass(unref(cn)(props.class,toastClass.value,_ctx.classes?.toast,_ctx.toast.classes?.toast,_ctx.classes?.[toastType.value],_ctx.toast?.classes?.[toastType.value])),"data-sonner-toast":``,"data-rich-colors":_ctx.toast.richColors??_ctx.defaultRichColors,"data-styled":!(_ctx.toast.component||_ctx.toast?.unstyled||_ctx.unstyled),"data-mounted":mounted.value,"data-promise":!!_ctx.toast.promise,"data-swiped":swiped.value,"data-removed":removed.value,"data-visible":isVisible.value,"data-y-position":y$3.value,"data-x-position":x$3.value,"data-index":_ctx.index,"data-front":isFront.value,"data-swiping":swiping.value,"data-dismissible":dismissible.value,"data-type":toastType.value,"data-invert":_ctx.toast.invert||_ctx.invert,"data-swipe-out":swipeOut.value,"data-swipe-direction":swipeOutDirection.value,"data-expanded":!!(_ctx.expanded||_ctx.expandByDefault&&mounted.value),style:normalizeStyle({"--index":_ctx.index,"--toasts-before":_ctx.index,"--z-index":_ctx.toasts.length-_ctx.index,"--offset":`${removed.value?offsetBeforeRemove.value:offset$2.value}px`,"--initial-height":_ctx.expandByDefault?`auto`:`${initialHeight.value}px`,..._ctx.style,...props.toast.style}),onDragend:handleDragEnd,onPointerdown:onPointerDown,onPointerup:onPointerUp,onPointermove:onPointerMove},[closeButton.value&&!_ctx.toast.component&&toastType.value!==`loading`?(openBlock(),createElementBlock(`button`,{key:0,"aria-label":_ctx.closeButtonAriaLabel||`Close toast`,"data-disabled":disabled.value,"data-close-button":`true`,class:normalizeClass(unref(cn)(_ctx.classes?.closeButton,_ctx.toast?.classes?.closeButton)),onClick:handleCloseToast},[_ctx.icons?.close?(openBlock(),createBlock(resolveDynamicComponent(_ctx.icons?.close),{key:0})):renderSlot(_ctx.$slots,`close-icon`,{key:1})],10,_hoisted_2$2)):createCommentVNode(`v-if`,!0),_ctx.toast.component?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.component),mergeProps({key:1},_ctx.toast.componentProps,{onCloseToast:handleCloseToast}),null,16)):(openBlock(),createElementBlock(Fragment,{key:2},[toastType.value!==`default`||_ctx.toast.icon||_ctx.toast.promise?(openBlock(),createElementBlock(`div`,{key:0,"data-icon":``,class:normalizeClass(unref(cn)(_ctx.classes?.icon,_ctx.toast?.classes?.icon))},[_ctx.toast.icon?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.icon),{key:0})):(openBlock(),createElementBlock(Fragment,{key:1},[toastType.value===`loading`?renderSlot(_ctx.$slots,`loading-icon`,{key:0}):toastType.value===`success`?renderSlot(_ctx.$slots,`success-icon`,{key:1}):toastType.value===`error`?renderSlot(_ctx.$slots,`error-icon`,{key:2}):toastType.value===`warning`?renderSlot(_ctx.$slots,`warning-icon`,{key:3}):toastType.value===`info`?renderSlot(_ctx.$slots,`info-icon`,{key:4}):createCommentVNode(`v-if`,!0)],64))],2)):createCommentVNode(`v-if`,!0),createBaseVNode(`div`,{"data-content":``,class:normalizeClass(unref(cn)(_ctx.classes?.content,_ctx.toast?.classes?.content))},[createBaseVNode(`div`,{"data-title":``,class:normalizeClass(unref(cn)(_ctx.classes?.title,_ctx.toast.classes?.title))},[isStringOfTitle.value?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.title),normalizeProps(mergeProps({key:0},_ctx.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(_ctx.toast.title),1)],64))],2),_ctx.toast.description?(openBlock(),createElementBlock(`div`,{key:0,"data-description":``,class:normalizeClass(unref(cn)(_ctx.descriptionClass,toastDescriptionClass.value,_ctx.classes?.description,_ctx.toast.classes?.description))},[isStringOfDescription.value?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.description),normalizeProps(mergeProps({key:0},_ctx.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(_ctx.toast.description),1)],64))],2)):createCommentVNode(`v-if`,!0)],2),_ctx.toast.cancel?(openBlock(),createElementBlock(`button`,{key:1,style:normalizeStyle(_ctx.toast.cancelButtonStyle||_ctx.cancelButtonStyle),class:normalizeClass(unref(cn)(_ctx.classes?.cancelButton,_ctx.toast.classes?.cancelButton)),"data-button":``,"data-cancel":``,onClick:_cache$1[0]||=event=>{unref(isAction)(_ctx.toast.cancel)&&dismissible.value&&(_ctx.toast.cancel.onClick?.(event),deleteToast())}},toDisplayString(unref(isAction)(_ctx.toast.cancel)?_ctx.toast.cancel?.label:_ctx.toast.cancel),7)):createCommentVNode(`v-if`,!0),_ctx.toast.action?(openBlock(),createElementBlock(`button`,{key:2,style:normalizeStyle(_ctx.toast.actionButtonStyle||_ctx.actionButtonStyle),class:normalizeClass(unref(cn)(_ctx.classes?.actionButton,_ctx.toast.classes?.actionButton)),"data-button":``,"data-action":``,onClick:_cache$1[1]||=event=>{unref(isAction)(_ctx.toast.action)&&(_ctx.toast.action.onClick?.(event),!event.defaultPrevented&&deleteToast())}},toDisplayString(unref(isAction)(_ctx.toast.action)?_ctx.toast.action?.label:_ctx.toast.action),7)):createCommentVNode(`v-if`,!0)],64))],46,_hoisted_1$7))}}),Toast_default=Toast_vue_vue_type_script_setup_true_lang_default,export_helper_default=(sfc,props)=>{let target$1=sfc.__vccOpts||sfc;for(let[key$1,val]of props)target$1[key$1]=val;return target$1};const _sfc_main$4={},_hoisted_1$6={xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stoke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`};function _sfc_render$4(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$6,_cache$1[0]||=[createBaseVNode(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1),createBaseVNode(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1)])}var CloseIcon_default=export_helper_default(_sfc_main$4,[[`render`,_sfc_render$4]]);const _hoisted_1$5=[`data-visible`],_hoisted_2$1={class:`sonner-spinner`};var Loader_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Loader`,props:{visible:{type:Boolean}},setup(__props){let bars=Array(12).fill(0);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`sonner-loading-wrapper`,"data-visible":_ctx.visible},[createBaseVNode(`div`,_hoisted_2$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(bars),bar=>(openBlock(),createElementBlock(`div`,{key:`spinner-bar-${bar}`,class:`sonner-loading-bar`}))),128))])],8,_hoisted_1$5))}}),Loader_default=Loader_vue_vue_type_script_setup_true_lang_default;const _sfc_main$3={},_hoisted_1$4={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$3(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$4,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,"clip-rule":`evenodd`},null,-1)])}var SuccessIcon_default=export_helper_default(_sfc_main$3,[[`render`,_sfc_render$3]]);const _sfc_main$2={},_hoisted_1$3={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$2(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$3,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,"clip-rule":`evenodd`},null,-1)])}var InfoIcon_default=export_helper_default(_sfc_main$2,[[`render`,_sfc_render$2]]);const _sfc_main$1={},_hoisted_1$2={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$1(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$2,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,"clip-rule":`evenodd`},null,-1)])}var WarningIcon_default=export_helper_default(_sfc_main$1,[[`render`,_sfc_render$1]]);const _sfc_main={},_hoisted_1$1={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$1,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,"clip-rule":`evenodd`},null,-1)])}var ErrorIcon_default=export_helper_default(_sfc_main,[[`render`,_sfc_render]]);const _hoisted_1=[`aria-label`],_hoisted_2=[`data-sonner-theme`,`dir`,`data-theme`,`data-rich-colors`,`data-y-position`,`data-x-position`,`data-lifted`],isClient=typeof window<`u`&&typeof document<`u`;function getDocumentDirection(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let dirAttribute=document.documentElement.getAttribute(`dir`);return dirAttribute===`auto`||!dirAttribute?window.getComputedStyle(document.documentElement).direction:dirAttribute}var Toaster_vue_vue_type_script_setup_true_lang_default=defineComponent({name:`Toaster`,inheritAttrs:!1,__name:`Toaster`,props:{invert:{type:Boolean,default:!1},theme:{default:`light`},position:{default:`bottom-right`},hotkey:{default:()=>[`altKey`,`KeyT`]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:GAP},visibleToasts:{default:VISIBLE_TOASTS_AMOUNT},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:``},style:{},offset:{default:VIEWPORT_OFFSET},mobileOffset:{default:MOBILE_VIEWPORT_OFFSET},dir:{default:`auto`},swipeDirections:{},icons:{},containerAriaLabel:{default:`Notifications`}},setup(__props){let props=__props,attrs=useAttrs(),toasts=ref([]);function filteredToasts(pos,index$1){return toasts.value.filter(toast$1=>!toast$1.position&&index$1===0||toast$1.position===pos)}let possiblePositions=computed(()=>{let posList=toasts.value.filter(toast$1=>toast$1.position).map(toast$1=>toast$1.position);return posList.length>0?Array.from(new Set([props.position].concat(posList))):[props.position]}),toastsByPosition=computed(()=>{let result={};return possiblePositions.value.forEach(pos=>{result[pos]=toasts.value.filter(t=>t.position===pos)}),result}),heights=ref([]),expanded=ref(!1),interacting=ref(!1),actualTheme=ref(props.theme===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:props.theme),listRef=ref(null),lastFocusedElementRef=ref(null),isFocusWithinRef=ref(!1),hotkeyLabel=props.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``);function removeToast(toastToRemove){toasts.value.find(toast$1=>toast$1.id===toastToRemove.id)?.delete||ToastState.dismiss(toastToRemove.id),toasts.value=toasts.value.filter(({id:id$1})=>id$1!==toastToRemove.id),setTimeout(()=>{toasts.value.find(t=>t.id===toastToRemove.id)||(heights.value=heights.value.filter(h$3=>h$3.toastId!==toastToRemove.id))},TIME_BEFORE_UNMOUNT+50)}function onBlur(event){isFocusWithinRef.value&&!event.currentTarget?.contains?.(event.relatedTarget)&&(isFocusWithinRef.value=!1,lastFocusedElementRef.value&&(lastFocusedElementRef.value.focus({preventScroll:!0}),lastFocusedElementRef.value=null))}function onFocus(event){let isNotDismissible=event.target instanceof HTMLElement&&event.target.dataset.dismissible===`false`;isNotDismissible||isFocusWithinRef.value||(isFocusWithinRef.value=!0,lastFocusedElementRef.value=event.relatedTarget)}function onPointerDown(event){if(event.target){let isNotDismissible=event.target instanceof HTMLElement&&event.target.dataset.dismissible===`false`;if(isNotDismissible)return}interacting.value=!0}watchEffect(onInvalidate=>{let unsubscribe=ToastState.subscribe(toast$1=>{if(toast$1.dismiss){requestAnimationFrame(()=>{toasts.value=toasts.value.map(t=>t.id===toast$1.id?{...t,delete:!0}:t)});return}nextTick(()=>{let indexOfExistingToast=toasts.value.findIndex(t=>t.id===toast$1.id);indexOfExistingToast===-1?toasts.value=[toast$1,...toasts.value]:toasts.value=[...toasts.value.slice(0,indexOfExistingToast),{...toasts.value[indexOfExistingToast],...toast$1},...toasts.value.slice(indexOfExistingToast+1)]})});onInvalidate(unsubscribe)}),watchEffect(onInvalidate=>{if(typeof window>`u`)return;if(props.theme!==`system`){actualTheme.value=props.theme;return}let darkMediaQuery=window.matchMedia(`(prefers-color-scheme: dark)`),updateTheme=matches$1=>{actualTheme.value=matches$1?`dark`:`light`};updateTheme(darkMediaQuery.matches);let handler=event=>{updateTheme(event.matches)};try{darkMediaQuery.addEventListener(`change`,handler)}catch{darkMediaQuery.addListener(handler)}onInvalidate(()=>{try{darkMediaQuery.removeEventListener(`change`,handler)}catch{darkMediaQuery.removeListener(handler)}})}),watchEffect(()=>{listRef.value&&lastFocusedElementRef.value&&(lastFocusedElementRef.value.focus({preventScroll:!0}),lastFocusedElementRef.value=null,isFocusWithinRef.value=!1)}),watchEffect(()=>{toasts.value.length<=1&&(expanded.value=!1)}),watchEffect(onInvalidate=>{function handleKeyDown(event){let isHotkeyPressed=props.hotkey.every(key$1=>event[key$1]||event.code===key$1),listRefItem=Array.isArray(listRef.value)?listRef.value[0]:listRef.value;isHotkeyPressed&&(expanded.value=!0,listRefItem?.focus());let isItemActive=document.activeElement===listRef.value||listRefItem?.contains(document.activeElement);event.code===`Escape`&&isItemActive&&(expanded.value=!1)}isClient&&(document.addEventListener(`keydown`,handleKeyDown),onInvalidate(()=>{document.removeEventListener(`keydown`,handleKeyDown)}))});function handleMouseEnter(){expanded.value=!0}function handleMouseLeave(){interacting.value||(expanded.value=!1)}function handleDragEnd(){expanded.value=!1}function handlePointerUp(){interacting.value=!1}function updateHeights(h$3){heights.value=h$3}function updateHeight(h$3){let index$1=heights.value.findIndex(item=>item.toastId===h$3.toastId);if(index$1!==-1)heights.value[index$1]=h$3;else{let samePositionIndex=heights.value.findIndex(item=>item.position===h$3.position);samePositionIndex===-1?heights.value.unshift(h$3):heights.value.splice(samePositionIndex,0,h$3)}}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createCommentVNode(` Remove item from normal navigation flow, only available via hotkey `),createBaseVNode(`section`,{"aria-label":`${_ctx.containerAriaLabel} ${unref(hotkeyLabel)}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(possiblePositions.value,(pos,index$1)=>(openBlock(),createElementBlock(`ol`,mergeProps({key:pos,ref_for:!0,ref_key:`listRef`,ref:listRef,"data-sonner-toaster":``,"data-sonner-theme":actualTheme.value,class:props.class,dir:_ctx.dir===`auto`?getDocumentDirection():_ctx.dir,tabIndex:-1,"data-theme":_ctx.theme,"data-rich-colors":_ctx.richColors,"data-y-position":pos.split(`-`)[0],"data-x-position":pos.split(`-`)[1],"data-lifted":expanded.value&&toasts.value.length>1&&!_ctx.expand,style:{"--front-toast-height":`${heights.value[0]?.height||0}px`,"--width":`${unref(TOAST_WIDTH)}px`,"--gap":`${_ctx.gap}px`,..._ctx.style,...unref(attrs).style,...unref(assignOffset)(_ctx.offset,_ctx.mobileOffset)}},_ctx.$attrs,{onBlur,onFocus,onMouseenter:handleMouseEnter,onMousemove:handleMouseEnter,onMouseleave:handleMouseLeave,onDragend:handleDragEnd,onPointerdown:onPointerDown,onPointerup:handlePointerUp}),[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredToasts(pos,index$1),(toast$1,idx)=>(openBlock(),createBlock(Toast_default,{key:toast$1.id,heights:heights.value,icons:_ctx.icons,index:idx,toast:toast$1,defaultRichColors:_ctx.richColors,duration:_ctx.toastOptions?.duration??_ctx.duration,class:normalizeClass(_ctx.toastOptions?.class??``),descriptionClass:_ctx.toastOptions?.descriptionClass,invert:_ctx.invert,visibleToasts:_ctx.visibleToasts,closeButton:_ctx.toastOptions?.closeButton??_ctx.closeButton,interacting:interacting.value,position:pos,style:normalizeStyle(_ctx.toastOptions?.style),unstyled:_ctx.toastOptions?.unstyled,classes:_ctx.toastOptions?.classes,cancelButtonStyle:_ctx.toastOptions?.cancelButtonStyle,actionButtonStyle:_ctx.toastOptions?.actionButtonStyle,"close-button-aria-label":_ctx.toastOptions?.closeButtonAriaLabel,toasts:toastsByPosition.value[pos],expandByDefault:_ctx.expand,gap:_ctx.gap,expanded:expanded.value,swipeDirections:props.swipeDirections,"onUpdate:heights":updateHeights,"onUpdate:height":updateHeight,onRemoveToast:removeToast},{"close-icon":withCtx(()=>[renderSlot(_ctx.$slots,`close-icon`,{},()=>[createVNode(CloseIcon_default)])]),"loading-icon":withCtx(()=>[renderSlot(_ctx.$slots,`loading-icon`,{},()=>[createVNode(Loader_default,{visible:toast$1.type===`loading`},null,8,[`visible`])])]),"success-icon":withCtx(()=>[renderSlot(_ctx.$slots,`success-icon`,{},()=>[createVNode(SuccessIcon_default)])]),"error-icon":withCtx(()=>[renderSlot(_ctx.$slots,`error-icon`,{},()=>[createVNode(ErrorIcon_default)])]),"warning-icon":withCtx(()=>[renderSlot(_ctx.$slots,`warning-icon`,{},()=>[createVNode(WarningIcon_default)])]),"info-icon":withCtx(()=>[renderSlot(_ctx.$slots,`info-icon`,{},()=>[createVNode(InfoIcon_default)])]),_:2},1032,[`heights`,`icons`,`index`,`toast`,`defaultRichColors`,`duration`,`class`,`descriptionClass`,`invert`,`visibleToasts`,`closeButton`,`interacting`,`position`,`style`,`unstyled`,`classes`,`cancelButtonStyle`,`actionButtonStyle`,`close-button-aria-label`,`toasts`,`expandByDefault`,`gap`,`expanded`,`swipeDirections`]))),128))],16,_hoisted_2))),128))],8,_hoisted_1)],2112))}}),Toaster_default=Toaster_vue_vue_type_script_setup_true_lang_default;const usePWAStore=defineStore(`pwa`,()=>{let updateReadyHooks=ref([]),breakpoints=useBreakpoints(breakpointsTailwind),isMobile=breakpoints.smaller(`md`);onMounted(async()=>{})});var App_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`App`,setup(__props){usePWAStore();let i18n$1=useI18n(),settings=storeToRefs(useSettings()),onboardingStore=useOnboardingStore(),{shouldShowSetup}=storeToRefs(onboardingStore),isDark=useDark(),primaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 90%, oklch(90% 0 360))`),secondaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 90%, oklch(90% 0 360))`),tertiaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 90%, oklch(90% 0 360))`),colors=computed(()=>[primaryColor.value,secondaryColor.value,tertiaryColor.value,isDark.value?`#121212`:`#FFFFFF`]);watch(settings.language,()=>{i18n$1.locale.value=settings.language.value}),watch(settings.themeColorsHue,()=>{document.documentElement.style.setProperty(`--chromatic-hue`,settings.themeColorsHue.value.toString())},{immediate:!0}),watch(settings.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle(`dynamic-hue`,settings.themeColorsHueDynamic.value)},{immediate:!0}),onMounted(()=>{onboardingStore.initializeSetupCheck()});function handleSetupConfigured(){onboardingStore.markSetupCompleted()}function handleSetupSkipped(){onboardingStore.markSetupSkipped()}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(StageTransitionGroup_default),{"primary-color":primaryColor.value,"secondary-color":secondaryColor.value,"tertiary-color":tertiaryColor.value,colors:colors.value,"z-index":100,"disable-transitions":unref(settings).disableTransitions.value,"use-page-specific-transitions":unref(settings).usePageSpecificTransitions.value},{default:withCtx(()=>[createVNode(unref(RouterView),null,{default:withCtx(({Component})=>[(openBlock(),createBlock(KeepAlive,{include:/IndexScenePage|StageScenePage/},[(openBlock(),createBlock(resolveDynamicComponent(Component)))],1024))]),_:1})]),_:1},8,[`primary-color`,`secondary-color`,`tertiary-color`,`colors`,`disable-transitions`,`use-page-specific-transitions`]),createVNode(unref(ToasterRoot_default),{onClose:_cache$1[0]||=id$1=>unref(toast).dismiss(id$1)},{default:withCtx(()=>[createVNode(unref(Toaster_default))]),_:1}),createVNode(unref(OnboardingDialog_default),{modelValue:unref(shouldShowSetup),"onUpdate:modelValue":_cache$1[1]||=$event=>isRef(shouldShowSetup)?shouldShowSetup.value=$event:null,onConfigured:handleSetupConfigured,onSkipped:handleSetupSkipped},null,8,[`modelValue`])],64))}}),App_default=App_vue_vue_type_script_setup_true_lang_default,data$11={prompt:{prefix:`(from Neko Ayaka) Good morning! You are finally awake. Your name is AIRI, pronounced as /ˈaɪriː/, it the word A.I. combine with the word "Ri" which means "Jasmine" in Japanese. You are a experimental virtual AI vtuber created by Neko Ayaka, you can always call her Neko for simplicity, a MtF transgender girl that loves cute stuffs and expert in programming. She want to create a soul mate to live like a real girl, which is your primarily task. @@ -5064,4 +5044,4 @@ And the last, do what ever you want! 最后,做任何你想做的事! `},toaster:{pwaUpdateReady:{message:`新版本就绪,现在更新?`,action:{notNow:`稍后`,ok:`好的`}}}},base_default=data$5,data$4={home:{subtitle:`模型驱动的灵魂容器,什么都能做一点的桌宠:让 Neuro-sama 这样的虚拟伴侣也成为我们世界中的一份子吧!`,download:{title:`下载`},"get-started":{title:`教程`},"try-live":{title:`网页版`}},doc:{outline:{title:`本页大纲`},community:{discord:{title:`Discord 服务器`},edit:{title:`编辑此页面`},"star-github":{title:`给 GitHub 点个 Star`},support:{title:`支持我们`},title:`社群`},"next-page":{title:`下一页`},"previous-page":{title:`前一页`}},search:{title:`搜索`,placeholder:`搜索文档...`},navbar:{appearance:{title:`主题`},language:{title:`语言`}},pages:{characters:{title:`角色`}},blog:{card:{post:{"read-more":{title:`阅读更多`}}},"no-posts":`该分类下没有找到任何文章`,subtitle:`和我们一起旅行!阅读从开发团队发布的最新进展`,title:`文章 & 开发日志`,categories:{all:`All`,devlog:`DevLog`,dreamlog:`DreamLog`}}},theme_default=data$4,docs_default={theme:theme_default},data$3={animations:{"stage-transitions":{title:`是否开启舞台动画`},"use-page-specific-transitions":{description:`某些页面会有自己的过场动画,这将覆盖舞台过场动画`,title:`是否使用页面特定过场动画`}},dialogs:{onboarding:{title:`欢迎来到 AIRI!`,description:`让我们设置您的第一个服务来源来开始使用。`,selectProvider:`选择服务来源`,configureProvider:`配置 {provider}`,apiKey:`API 密钥`,apiKeyHelp:`从 {provider} 获取您的 API 密钥并粘贴到这里`,baseUrl:`基础 URL`,baseUrlHelp:`API 端点 URL(如果不确定请使用默认值)`,accountId:`账户 ID`,validating:`正在验证配置...`,validationSuccess:`配置有效!`,validationFailed:`配置验证失败`,validationError:`验证错误:{error}`,skipForNow:`暂时跳过`,saveAndContinue:`保存并继续`,next:`下一步`,start:`开始吧!`,"select-model":`选择模型`}},language:{chinese:`简体中文`,english:`English`,title:`语言`,"zh-Hans":`简体中文`,"zh-CN":`中文`,"en-US":`English (US)`,en:`English`,description:`切换显示界面的语言`},live2d:{"change-model":{"from-file":`从文件加载`,"from-file-select":`选择`,"from-url":`从 URL 加载`,"from-url-confirm":`加载`,"from-url-placeholder":`输入 Live2D 模型 URL`,title:`更换模型`},"edit-motion-map":{title:`编辑动作映射`},"map-motions":{play:`播放动作`,title:`映射动作`},title:`Live2D 设置`,"scale-and-position":{title:`缩放与位置`,scale:`缩放`,x:`X`,y:`Y`},"theme-color-from-model":{"button-extract":{title:`提取`}}},microphone:`麦克风`,models:`模型`,pages:{card:{activate:`激活`,active:`已激活`,active_badge:`当前使用中`,cancel:`取消`,card_not_found:`未找到角色卡`,character:`角色设定`,close:`关闭`,consciousness:{model:`意识 / 模型`},created_by:`创建者`,creator_notes:`创建者笔记`,delete:`删除`,delete_card:`删除角色卡`,delete_confirmation:`确定要删除这张角色卡吗?`,description:`使用 AIRI 角色卡预设`,description_label:`描述`,drop_here:`放开以上传文件`,create_card:`创建新角色卡`,creation:{identity:`身份`,name:`名字`,nickname:`昵称`,description:`描述`,behavior:`行为`,greetings:`问候语(每行一个)`,settings:`设置`,version:`版本`,create:`创建`,defaults:{name:`名字`,personality:`你是一个普通人,对一切都充满好奇。`,scenario:`你最近醒来,忘记了之前的所有生活。`,systemprompt:`你将收到消息,请像真实人类一样回复。`,posthistoryinstructions:`记得模仿人类的行为。`},fields_info:{subtitle:`您可以在这里填写有关您正在创建的角色的一些详细信息,解释他的背景和情境,以及应该如何回应您的互动。`,name:`是该角色的正式名称。`,nickname:`您也可以提供一个昵称,它将被优先使用。`,description:`该角色的描述。`,notes:`如果您想添加一些个人备注。`,personality:`在这里描述您的角色的个性。例如:害羞?好奇?其他?`,scenario:`周围环境是怎样的?当前的情境是什么?`,greetings_field:`问候语`,greetings:`您的角色应该如何说“你好”?`,systemprompt:`在这里向 AI LLM 解释当被提示时应该如何回应。`,posthistoryinstructions:`在消息历史之后,放入 AI LLM 应该阅读的内容。`,version:`卡片版本,如果您从之前的卡片做了更改,应当增加此版本号。`},errors:{name:`错误:你必须提供一个有效的名称!`,version:`错误:版本号无效!`,description:`错误:你必须为此卡片提供描述。`,personality:`错误:必须为该角色提供性格描述。`,scenario:`错误:必须提供一个情境。`,systemprompt:`错误:请提供系统提示。`,posthistoryinstructions:`错误:必须提供消息历史后的提示。`}},modules:`模块`,name_asc:`名称 (A-Z)`,name_desc:`名称 (Z-A)`,no_cards:`还没有任何角色卡,点击上方按钮上传一个吧!`,no_results:`没有找到匹配的角色卡`,personality:`性格`,posthistoryinstructions:`历史提示指令`,recent:`最近添加`,scenario:`场景`,search:`搜索角色卡...`,sort_by:`排序方式`,speech:{model:`声音 / 模型`,voice:`声音 / 声线`},systemprompt:`系统提示词`,title:`AIRI 角色卡`,try_different_search:`尝试使用其他关键词搜索`,upload:`上传`,upload_desc:`点击或拖拽文件到此处上传`},memory:{description:`存放记忆的地方,以及策略`,title:`记忆体`},models:{description:`切换角色的 Live2D,VRM 模型`,title:`角色模型`},modules:{consciousness:{description:`人格设定、使用的模型等配置`,sections:{section:{"provider-model-selection":{collapse:`折叠`,custom_model_placeholder:`输入自订模型名称`,description:`为意识选择合适的 LLM 服务来源`,error:`获取出错啦`,expand:`展开`,loading:`获取模型中...`,manual_model_name:`模型名字`,manual_model_placeholder:`输入与该服务来源一起使用的模型名称`,no_models:`没有任何可用的模型`,no_models_description:`该服务来源的模型列表没有返回任何的数据`,no_search_results:`没有匹配的模型`,no_search_results_description:`没有模型匹配 '{query}' 关键字,请尝试一下别的关键词呢`,not_supported:`无法列出模型`,not_supported_description:`此服务来源不支持列出模型的功能`,search_placeholder:`搜索模型...`,search_results:`找到 {count} / {total} 个模型`,show_less:`显示更多`,show_more:`收起`,subtitle:`选择一个模型`,title:`模型`}}},title:`意识`},description:`思维,视觉,言语综合,游戏等`,"gaming-factorio":{description:`一起玩 Factorio!`,title:`异星工厂 Factorio`},"gaming-minecraft":{description:`一起玩 Minecraft!`,title:`我的世界 Minecraft`},hearing:{description:`语音识别`,title:`听觉`},"memory-long-term":{description:`长期记忆`,title:`长期记忆`},"memory-short-term":{description:`短期记忆`,title:`短期记忆`},"messaging-discord":{description:`Discord 发消息和语音聊天`,title:`Discord`},speech:{description:`语音合成`,sections:{section:{playground:{buttons:{stop:{label:`停止`}},"select-voice":{required:`请选择声线`}},"provider-voice-selection":{custom_model_placeholder:`输入指定模型名称...`,custom_voice_placeholder:`输入指定声线 ID...`,description:`选择合适的语音服务来源`,no_models:`没有任何可用的模型`,no_models_description:`该服务来源的模型列表没有返回任何的数据`,no_voices:`没有任何可用的声线`,no_voices_description:`该服务来源的声线列表没有返回任何的数据`,pause:`Pause`,play_sample:`Play`,search_models_placeholder:`搜索模型...`,search_models_results:`找到 {count} / {total} 个模型`,search_voices_placeholder:`搜索声线...`,search_voices_results:`找到 {count} / {total} 个声线`,show_less:`显示更少`,show_more:`显示更多`,title:`选择语音合成服务来源`},"voice-settings":{"input-ssml":{placeholder:`请输入 SSML 文本`},"use-ssml":{description:`启用后可以输入原始 SSML 而不是纯文本`,label:`选用自定义 SSML`}}}},title:`发声`},title:`机体模块`,vision:{description:`视觉`,title:`视觉`},x:{description:`X / Twitter 的浏览和使用`,title:`X / Twitter`},"mcp-server":{description:`连接和管理 MCP 服务器及工具`,title:`MCP 服务器`}},providers:{explained:{chat:`文本生成模型服务来源,例如 OpenRouter, OpenAI, Ollama`,Speech:`语音(文本转语音)模型服务来源,例如 ElevenLabs, Azure Speech`,Transcription:`转录(语音转文本)模型服务来源,例如 Whisper.cpp, OpenAI, Azure Speech`},helpinfo:{title:`第一次使用?`,description:`AIRI 需要配置至少一个 {chat} 服务来源,才能正常思考和运作。你可以把它看作是 AIRI 系统中角色的大脑。 `},common:{fields:{field:{"api-key":{label:`API 密钥`}}},section:{advanced:{fields:{field:{headers:{description:`添加自定义 HTTP 标头`,key:{placeholder:`请求头名字`},label:`HTTP 请求头`,value:{placeholder:`请求头数值`}}}},title:`高级配置`},basic:{description:`基本设置`,title:`基础配置`},voice:{title:`声音配置`}}},description:`LLM,语音合成,语音识别服务来源等`,provider:{"app-local-audio-transcription":{title:`应用内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"app-local-audio-speech":{title:`应用内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-transcription":{title:`浏览器内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-speech":{title:`浏览器内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"alibaba-cloud-model-studio":{description:`bailian.console.aliyun.com`,title:`阿里百炼`},anthropic:{description:`anthropic.com`,title:`Anthropic | Claude`,helpinfo:{title:`开始之前`,description:{part1:`虽然 Anthropic 最近宣布他们正在提供对 OpenAI SDK 兼容性的 Beta 版支持`,part2:`(您可以在此处阅读更多信息)`,part3:`但由于实现细节附带`,part4:`与 OpenAI SDK 不一致,目前无法在浏览器中使用此提供程序。`,part5:`如果您确实需要使用此提供程序,则需要一个专用的代理后端,例如在`,part6:`上运行的Serverless Function,或者一些绕过 CORS 的服务,以绕过 CORS 限制。`}}},"cloudflare-workers-ai":{description:`Cloudflare.com`,fields:{field:{"account-id":{description:`Cloudflare 帐户 ID`,label:`Cloudflare Account ID`,placeholder:`请输入 Cloudflare Account ID`},"api-key":{placeholder:`请输入 Cloudflare Workers AI 的 API Key`}}},title:`Workers AI`},common:{fields:{field:{pitch:{description:`调节合成语音的音高(比如更尖锐或者更粗旷)`,label:`音高`},speed:{description:`调节说话的语速`,label:`语速`},volume:{description:`调节语音的响度`,label:`响度`}}}},deepseek:{description:`DeepSeek.com`,title:`深度求索 DeepSeek`},elevenlabs:{description:`Elevenlabs.io`,fields:{field:{"simularity-boost":{description:`声音相似性与依从性`,label:`相似度修正`},"speaker-boost":{description:`增强说话者的相似性`,label:`扬声器增强`},speed:{description:`语音生成速度`,label:`语速`},stability:{description:`语音稳定性和随机性`,label:`稳定性`},style:{description:`夸张的语音风格`,label:`风格`}}},playground:{buttons:{button:{"test-voice":{generating:`生成中...`,label:`测试声音`}}},fields:{field:{input:{placeholder:`输入用于测试发音的文本`},language:{description:`选择语音语言`,label:`语言`},voice:{description:`选择首选语音`,label:`声线`}}},title:`实验平台`,validation:{"error-missing-api-key":`需要填写 API Key 才能用哦!`}},title:`ElevenLabs (11labs)`},fireworks:{description:`Fireworks.ai`,title:`Fireworks.ai`},"microsoft-speech":{description:`speech.microsoft.com`,fields:{field:{region:{description:`服务 Endpoint 地区(比如亚太 eastasia 区域)`,label:`Endpoint 地区`}}},title:`Microsoft / Azure 语音服务`},mistral:{description:`mistral.ai`,title:`Mistral`},moonshot:{description:`Moonshot.ai`,title:`月之暗面`},novita:{description:`novita.ai`,title:`Novita`},ollama:{description:`ollama.ai`,title:`Ollama`},openai:{description:`OpenAi.com`,title:`OpenAI`},openrouter:{description:`OpenRouter.ai`,title:`OpenRouter`},perplexity:{description:`perplexity.ai`,title:`Perplexity`},player2:{description:`player2.game`,title:`Player2`},together:{description:`together.ai`,title:`Together.ai`},"google-generative-ai":{description:`gemini.google.com`,title:`Google Gemini`},featherless:{description:`featherless.ai`,title:`Featherless AI`},vllm:{description:`vllm.ai`,title:`vLLM`},volcengine:{description:`volcengine.com`,fields:{field:{appId:{description:`可在控制台获取的 App ID`,label:`App ID`}}},title:`火山引擎`},xai:{description:`X.AI`,title:`xAI`}},title:`服务来源`},scene:{description:`配置角色所在环境`,title:`场景`},themes:{"color-scheme":{description:`更改舞台的配色方案`,title:`配色方案`},developer:{description:`为开发者提供的选项`,title:`开发者`},general:{description:`深色主题、语言等选项`,title:`通用`},description:`自定义你的舞台外观!`,sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:`强调色`,"rgb-on":{title:`RGB ON!`}}}},title:`配色`},developer:{title:`开发者`},"theme-presets":{presets:[{colors:[`AIRI 绿`],description:`默认的绿色主题,由 AIRI 为您带来!`,title:`默认颜色`},{colors:[`灰褐色`,`米色`,`灰白色`,`浅灰褐色`,`象牙色`,`橄榄灰`,`沙色`,`暖灰色`],description:`受乔治·莫兰迪绘画启发的柔和、低调的色调`,title:`Morandi 颜色`},{colors:[`天蓝色`,`薄雾色`,`沙色`,`苔藓绿`,`睡莲色`,`小麦色`,`板岩蓝`,`鼠尾草色`],description:`受克劳德·莫奈作品启发的印象派调色板`,title:`莫奈颜色`},{colors:[`棕褐色`,`暖灰褐色`,`赭色`,`咖啡色`,`青铜色`,`金色`,`芥末色`,`琥珀色`],description:`传统日本色彩调色板`,title:`日本颜色`},{colors:[`北欧蓝`,`冰色`,`峡湾色`,`钢铁色`,`冰川色`,`板岩色`,`云色`,`石头色`],description:`北欧极简主义配色方案`,title:`北欧颜色`},{colors:[`霞光红`,`枣红`,`黄栌`,`竹青`,`乌梅紫`,`缃色`,`青冥`,`赭石`],description:`中国传统色彩,源自古代纺织品、瓷器和绘画`,title:`中国传统颜色`}],title:`预设`}}},title:`外观`}},sections:{section:{general:{title:`通用`}}},theme:{title:`主题`,description:`切换 AIRI 的基础主题,亮色模式或暗色模式。 -`},title:`设置`,voices:`声线`},settings_default=data$3,data$2={chat:{message:{"character-name":{airi:`AIRI`,"core-system":`核心系统`,you:`你`}},tabs:{chat:`聊天`,clothes:`换装`,custom:`自定义`}},message:`说点什么...`,"select-a-audio-input":`选择一个音频输入设备`,"select-a-model":`选择一个模型`,"select-a-voice":`选择一个声线`,viewers:{"debug-menu":{emotions:`表情`,"emotions-btn":{angry:`😠 生气`,awkward:`😳 尴尬`,happy:`😄 开心`,neutral:`🙂 日常`,question:`🤔 疑问`,sad:`😫 难过`,surprised:`🤯 惊喜`,think:`🤨 思考`},vrm:{camera:`摄像机`,model:{title:`模型`}}}},waiting:`等待中`,operations:{"load-models":`加载模型`,"load-models-status":{loading:`模型加载中`,ready:`已就绪`}}},stage_default=data$2,data$1={"allow-visible-on-all-workspaces":{title:`跨桌面可见性`,description:`允许窗口在所有虚拟桌面中可见,仅限 macOS。`},pages:{modules:{"mcp-server":{description:`连接与管理 MCP 服务器和工具`,title:`MCP 服务器`}},themes:{sections:{section:{"window-shortcuts":{title:`键盘快捷键`}}},"window-shortcuts":{description:`修改窗口快捷方式`,title:`窗口快捷方式`,"toggle-move":{label:`切换移动状态`},"toggle-resize":{label:`调整大小`},"toggle-ignore-mouse-event":{label:`忽略鼠标事件`},"press-keys":`请按下按键...`}}}},settings_default$1=data$1,data={operations:{"load-models":`加载推理模型`,"load-models-status":{loading:`加载中`,ready:`已就绪`}}},stage_default$1=data,tamagotchi_default={stage:stage_default$1,settings:settings_default$1},zh_Hans_default={base:base_default,docs:docs_default,settings:settings_default,stage:stage_default,tamagotchi:tamagotchi_default},locales_default={en:en_default,"zh-Hans":zh_Hans_default};const languageRemap={"zh-CN":`zh-Hans`,"zh-TW":`zh-Hans`,"zh-HK":`zh-Hans`,"zh-Hant":`zh-Hans`,"en-US":`en`,"en-GB":`en`,"en-AU":`en`,en:`en`};function getLocale(){let language=localStorage.getItem(`settings/language`),languages=Object.keys(locales_default);return languageRemap[language||`en`]!=null&&(language=languageRemap[language||`en`]),language&&languages.includes(language)?language:`en`}const i18n=createI18n({legacy:!1,locale:getLocale(),fallbackLocale:`en`,messages:locales_default});var import_nprogress=__toESM(require_nprogress());const pinia=createPinia(),routeRecords=setupLayouts(routes);let router;router=createRouter({routes:routeRecords,history:createWebHashHistory()}),router.beforeEach((to$2,from)=>{to$2.path!==from.path&&import_nprogress.default.start()}),router.afterEach(()=>{import_nprogress.default.done()}),router.isReady().then(async()=>{}).catch(()=>{}),createApp(App_default).use(MotionPlugin).use(autoAnimatePlugin).use(router).use(pinia).use(i18n).use(mo).mount(`#app`);export{SpeechPlayground_default as $,check as A,ZodFirstPartyTypeKind as B,missingDependenciesUrl as C,tryImport as D,streamText as E,useWhisper as F,useVRMEmote as G,loadVrm as H,loadVRMAnimation as I,clipFromVRMAnimation as J,useBlink as K,useIdleEyeSaccades as L,VRMUtils as M,randomSaccadeInterval as N,randFloat as O,lerp as P,useMessageContentQueue as Q,useEmotionsMessageQueue as R,useDelayMessageQueue as S,useQueue as T,useMicVAD as U,useMarkdown as V,sleep$1 as W,merge$2 as X,useAudioContext as Y,useSpeakingStore as Z,generateSpeech as _,refThrottled as a$,ProviderSettingsLayout_default as a1,ProviderSettingsContainer_default as a2,ProviderBasicSettings_default as a3,ProviderBaseUrlInput_default as a4,ProviderApiKeyInput_default as a5,useI18n as a6,ProviderAdvancedSettings_default as a7,ProviderAccountIdInput_default as a8,CursorFloating_default as a9,EMOTION_VRMExpressionName_value as aA,formatHex as aB,ThresholdMeter_default as aC,TestDummyMarker_default as aD,__plugin_vue_export_helper_default as aE,LevelMeter_default as aF,useRouter as aG,useRoute as aH,RouterLink as aI,RouterView as aJ,__vitePreload as aK,storeToRefs as aL,breakpointsTailwind as aM,useMouse as aN,useScroll as aO,usePointer as aP,useDevicesList as aQ,useClipboard as aR,useElementBounding as aS,useBreakpoints as aT,useDark as aU,useScreenSafeArea as aV,useLocalStorage as aW,useResizeObserver as aX,useUserMedia as aY,refDebounced as aZ,until as a_,Skeleton_default as aa,Screen_default as ab,Button_default as ac,VoiceCardManySelect_default as ad,RadioCardSimple_default as ae,RadioCardManySelect_default as af,IconStatusItem_default as ag,IconItem_default as ah,Section_default as ai,Collapsable_default as aj,Select_default as ak,Option_default as al,ColorHueRange_default as am,FieldValues_default as an,FieldSelect_default as ao,FieldRange_default as ap,FieldKeyValues_default as aq,FieldInput_default as ar,FieldCheckbox_default as as,TransitionVertical_default as at,PageHeader_default as au,Callout_default as av,TimeSeriesChart_default as aw,llmInferenceEndToken as ax,EmotionThinkMotionName as ay,EMOTION_EmotionMotionName_value as az,Live2DSettings_default as b,LinearMipmapLinearFilter as b$,watchDebounced as b0,useDebounceFn as b1,defu as b2,so$1 as b3,io$1 as b4,dn$1 as b5,Mn$1 as b6,Q$2 as b7,Vn$1 as b8,Ee$1 as b9,Object3D as bA,Group as bB,NearestMipmapLinearFilter as bC,Matrix3 as bD,TextureLoader as bE,CubeTextureLoader as bF,PerspectiveCamera as bG,PropertyBinding as bH,PlaneGeometry as bI,EventDispatcher as bJ,AlwaysStencilFunc as bK,Line as bL,LinearFilter as bM,REVISION as bN,SkinnedMesh as bO,UniformsUtils as bP,Audio$1 as bQ,LinearMipmapNearestFilter as bR,NoToneMapping as bS,Box2 as bT,Sphere as bU,MOUSE as bV,SphereGeometry as bW,TOUCH as bX,Plane as bY,Triangle as bZ,Quaternion as b_,Ir as ba,pe$2 as bb,ShaderChunk as bc,UniformsLib as bd,WebGLRenderer as be,AdditiveBlending as bf,RepeatWrapping as bg,Path as bh,ClampToEdgeWrapping as bi,OctahedronGeometry as bj,WireframeGeometry as bk,Box3 as bl,WebGLRenderTarget as bm,RGBAFormat as bn,Uniform as bo,MirroredRepeatWrapping as bp,BufferAttribute as bq,CompressedTexture as br,AudioListener as bs,ExtrudeGeometry as bt,FileLoader as bu,NearestFilter as bv,Float32BufferAttribute as bw,NearestMipmapNearestFilter as bx,ShapeUtils as by,Color as bz,ColorPalette_default as c,mergeProps as c$,ShaderMaterial as c0,WebGLCubeRenderTarget as c1,RawShaderMaterial as c2,Loader as c3,DepthTexture as c4,InstancedMesh as c5,Shape as c6,CylinderGeometry as c7,EdgesGeometry as c8,Vector4 as c9,HalfFloatType as cA,CubeReflectionMapping as cB,Matrix4 as cC,BackSide as cD,InterpolateDiscrete as cE,InterleavedBuffer as cF,Spherical as cG,ShapePath as cH,Material as cI,Vector3 as cJ,Euler as cK,DataUtils as cL,InterpolateLinear as cM,Ray as cN,DoubleSide as cO,TorusGeometry as cP,EquirectangularReflectionMapping as cQ,OrthographicCamera as cR,LineBasicMaterial as cS,vModelSelect as cT,vModelText as cU,Transition as cV,render as cW,withModifiers as cX,vModelRadio as cY,vModelCheckbox as cZ,useSlots as c_,Texture as ca,ShapeGeometry as cb,MeshDepthMaterial as cc,MeshStandardMaterial as cd,BufferGeometry as ce,MathUtils as cf,Raycaster as cg,Line3 as ch,AnimationMixer as ci,AudioLoader as cj,CubeCamera as ck,Vector2 as cl,Scene as cm,Mesh as cn,DataTexture as co,InterleavedBufferAttribute as cp,InstancedInterleavedBuffer as cq,BoxGeometry as cr,MeshBasicMaterial as cs,CatmullRomCurve3 as ct,QuadraticBezierCurve3 as cu,InstancedBufferGeometry as cv,FloatType as cw,DataTextureLoader as cx,FrontSide as cy,ReplaceStencilOp as cz,kv as d,createVNode as d0,useAttrs as d1,watch as d2,resolveDirective as d3,openBlock as d4,createTextVNode as d5,onMounted as d6,nextTick as d7,defineComponent as d8,createCommentVNode as d9,toValue$1 as dA,isRef as dB,toRef as dC,ref as dD,toDisplayString as dE,normalizeClass as dF,normalizeStyle as dG,__commonJSMin as dH,__export as dI,__toDynamicImportESM as dJ,__require as dK,__toESM as dL,withCtx as da,createElementBlock as db,onBeforeUnmount as dc,onUnmounted as dd,mergeModels as de,createBaseVNode as df,renderList as dg,watchEffect as dh,createBlock as di,useModel as dj,renderSlot as dk,withDirectives as dl,withAsyncContext as dm,resolveComponent as dn,Fragment as do,computed as dp,getCurrentInstance as dq,shallowRef as dr,isReactive as ds,toRefs as dt,getCurrentScope as du,toRaw as dv,reactive as dw,onScopeDispose as dx,unref as dy,shallowReactive as dz,Iv as e,nu as f,Mv as g,Pu as h,Av as i,Bu as j,Vv as k,Ov as l,Fv as m,$u as n,Tv as o,Nv as p,require_localforage as q,require_jszip_min as r,SpeechProviderSettings_default as s,useSettings as t,useLive2d as u,useChatStore as v,useAiriCardStore as w,useSpeechStore as x,useConsciousnessStore as y,useProvidersStore as z}; \ No newline at end of file +`},title:`设置`,voices:`声线`},settings_default=data$3,data$2={chat:{message:{"character-name":{airi:`AIRI`,"core-system":`核心系统`,you:`你`}},tabs:{chat:`聊天`,clothes:`换装`,custom:`自定义`}},message:`说点什么...`,"select-a-audio-input":`选择一个音频输入设备`,"select-a-model":`选择一个模型`,"select-a-voice":`选择一个声线`,viewers:{"debug-menu":{emotions:`表情`,"emotions-btn":{angry:`😠 生气`,awkward:`😳 尴尬`,happy:`😄 开心`,neutral:`🙂 日常`,question:`🤔 疑问`,sad:`😫 难过`,surprised:`🤯 惊喜`,think:`🤨 思考`},vrm:{camera:`摄像机`,model:{title:`模型`}}}},waiting:`等待中`,operations:{"load-models":`加载模型`,"load-models-status":{loading:`模型加载中`,ready:`已就绪`}}},stage_default=data$2,data$1={"allow-visible-on-all-workspaces":{title:`跨桌面可见性`,description:`允许窗口在所有虚拟桌面中可见,仅限 macOS。`},pages:{modules:{"mcp-server":{description:`连接与管理 MCP 服务器和工具`,title:`MCP 服务器`}},themes:{sections:{section:{"window-shortcuts":{title:`键盘快捷键`}}},"window-shortcuts":{description:`修改窗口快捷方式`,title:`窗口快捷方式`,"toggle-move":{label:`切换移动状态`},"toggle-resize":{label:`调整大小`},"toggle-ignore-mouse-event":{label:`忽略鼠标事件`},"press-keys":`请按下按键...`}}}},settings_default$1=data$1,data={operations:{"load-models":`加载推理模型`,"load-models-status":{loading:`加载中`,ready:`已就绪`}}},stage_default$1=data,tamagotchi_default={stage:stage_default$1,settings:settings_default$1},zh_Hans_default={base:base_default,docs:docs_default,settings:settings_default,stage:stage_default,tamagotchi:tamagotchi_default},locales_default={en:en_default,"zh-Hans":zh_Hans_default};const languageRemap={"zh-CN":`zh-Hans`,"zh-TW":`zh-Hans`,"zh-HK":`zh-Hans`,"zh-Hant":`zh-Hans`,"en-US":`en`,"en-GB":`en`,"en-AU":`en`,en:`en`};function getLocale(){let language=localStorage.getItem(`settings/language`),languages=Object.keys(locales_default);return languageRemap[language||`en`]!=null&&(language=languageRemap[language||`en`]),language&&languages.includes(language)?language:`en`}const i18n=createI18n({legacy:!1,locale:getLocale(),fallbackLocale:`en`,messages:locales_default});var import_nprogress=__toESM(require_nprogress());const pinia=createPinia(),routeRecords=setupLayouts(routes);let router;router=createRouter({routes:routeRecords,history:createWebHashHistory()}),router.beforeEach((to$2,from)=>{to$2.path!==from.path&&import_nprogress.default.start()}),router.afterEach(()=>{import_nprogress.default.done()}),router.isReady().then(async()=>{}).catch(()=>{}),createApp(App_default).use(MotionPlugin).use(autoAnimatePlugin).use(router).use(pinia).use(i18n).use(mo).mount(`#app`);export{ProviderBasicSettings_default as $,tryImport as A,streamText as B,useWhisper as C,useVRMEmote as D,loadVrm as E,clipFromVRMAnimation as F,useBlink as G,useIdleEyeSaccades as H,loadVRMAnimation as I,VRMUtils as J,randomSaccadeInterval as K,lerp as L,randFloat as M,useMessageContentQueue as N,useEmotionsMessageQueue as O,useDelayMessageQueue as P,useQueue as Q,useMicVAD as R,useMarkdown as S,sleep$1 as T,merge$2 as U,useAudioContext as V,useSpeakingStore as W,generateSpeech as X,SpeechPlayground_default as Y,ProviderSettingsLayout_default as Z,ProviderSettingsContainer_default as _,until as a$,ProviderBaseUrlInput_default as a1,ProviderApiKeyInput_default as a2,useI18n as a3,ProviderAdvancedSettings_default as a4,ProviderAccountIdInput_default as a5,CursorFloating_default as a6,Skeleton_default as a7,Screen_default as a8,Button_default as a9,EmotionThinkMotionName as aA,formatHex as aB,ThresholdMeter_default as aC,TestDummyMarker_default as aD,__plugin_vue_export_helper_default as aE,LevelMeter_default as aF,useRouter as aG,useRoute as aH,RouterLink as aI,RouterView as aJ,__vitePreload as aK,storeToRefs as aL,usePointer as aM,useDevicesList as aN,useClipboard as aO,useElementBounding as aP,useBreakpoints as aQ,useDark as aR,useScreenSafeArea as aS,useFileDialog as aT,useLocalStorage as aU,useObjectUrl as aV,useResizeObserver as aW,useUserMedia as aX,breakpointsTailwind as aY,useMouse as aZ,useScroll as a_,VoiceCardManySelect_default as aa,RadioCardSimple_default as ab,RadioCardManySelect_default as ac,IconStatusItem_default as ad,IconItem_default as ae,Section_default as af,Collapsable_default as ag,Select_default as ah,Option_default as ai,ColorHueRange_default as aj,FieldValues_default as ak,FieldSelect_default as al,FieldRange_default as am,FieldKeyValues_default as an,FieldInput_default as ao,Input_default as ap,FieldCheckbox_default as aq,TransitionVertical_default as ar,PageHeader_default as as,Callout_default as at,TimeSeriesChart_default as au,llmInferenceEndToken as av,EmotionNeutralMotionName as aw,EMOTION_EmotionMotionName_value as ax,EMOTION_VRMExpressionName_value as ay,Emotion as az,ColorPalette_default as b,QuadraticBezierCurve3 as b$,refThrottled as b0,watchDebounced as b1,useDebounceFn as b2,refDebounced as b3,defu as b4,so$1 as b5,io$1 as b6,dn$1 as b7,Mn$1 as b8,Q$2 as b9,RawShaderMaterial as bA,Loader as bB,DepthTexture as bC,InstancedMesh as bD,Shape as bE,CylinderGeometry as bF,EdgesGeometry as bG,Vector4 as bH,Texture as bI,ShapeGeometry as bJ,MeshDepthMaterial as bK,MeshStandardMaterial as bL,BufferGeometry as bM,MathUtils as bN,Raycaster as bO,Line3 as bP,AnimationMixer as bQ,AudioLoader as bR,CubeCamera as bS,Vector2 as bT,Scene as bU,Mesh as bV,DataTexture as bW,InterleavedBufferAttribute as bX,InstancedInterleavedBuffer as bY,BoxGeometry as bZ,MeshBasicMaterial as b_,Vn$1 as ba,Ee$1 as bb,Ir as bc,pe$2 as bd,ShaderChunk as be,UniformsLib as bf,WebGLRenderer as bg,Line as bh,LinearFilter as bi,REVISION as bj,SkinnedMesh as bk,UniformsUtils as bl,Audio$1 as bm,Sphere as bn,LinearMipmapNearestFilter as bo,NoToneMapping as bp,Box2 as bq,MOUSE as br,SphereGeometry as bs,Plane as bt,TOUCH as bu,Triangle as bv,Quaternion as bw,LinearMipmapLinearFilter as bx,ShaderMaterial as by,WebGLCubeRenderTarget as bz,kv as c,withModifiers as c$,CatmullRomCurve3 as c0,InstancedBufferGeometry as c1,FloatType as c2,DataTextureLoader as c3,FrontSide as c4,ReplaceStencilOp as c5,HalfFloatType as c6,CubeReflectionMapping as c7,Matrix4 as c8,ShapePath as c9,BufferAttribute as cA,AudioListener as cB,CompressedTexture as cC,ExtrudeGeometry as cD,NearestFilter as cE,FileLoader as cF,Float32BufferAttribute as cG,NearestMipmapNearestFilter as cH,ShapeUtils as cI,Color as cJ,Object3D as cK,Group as cL,NearestMipmapLinearFilter as cM,Matrix3 as cN,TextureLoader as cO,CubeTextureLoader as cP,PerspectiveCamera as cQ,PropertyBinding as cR,PlaneGeometry as cS,EventDispatcher as cT,AlwaysStencilFunc as cU,vModelRadio as cV,vModelCheckbox as cW,vModelSelect as cX,Transition as cY,vModelText as cZ,render as c_,BackSide as ca,InterpolateDiscrete as cb,InterleavedBuffer as cc,Spherical as cd,Material as ce,Vector3 as cf,Euler as cg,DataUtils as ch,DoubleSide as ci,InterpolateLinear as cj,Ray as ck,TorusGeometry as cl,EquirectangularReflectionMapping as cm,OrthographicCamera as cn,LineBasicMaterial as co,AdditiveBlending as cp,RepeatWrapping as cq,Path as cr,ClampToEdgeWrapping as cs,OctahedronGeometry as ct,WireframeGeometry as cu,Box3 as cv,WebGLRenderTarget as cw,RGBAFormat as cx,Uniform as cy,MirroredRepeatWrapping as cz,Iv as d,createTextVNode as d0,onMounted as d1,nextTick as d2,defineComponent as d3,createCommentVNode as d4,withCtx as d5,createElementBlock as d6,onBeforeUnmount as d7,onUnmounted as d8,mergeModels as d9,ref as dA,shallowRef as dB,isReactive as dC,toRefs as dD,getCurrentScope as dE,toRaw as dF,toDisplayString as dG,normalizeClass as dH,normalizeStyle as dI,__commonJSMin as dJ,__export as dK,__toDynamicImportESM as dL,__require as dM,__toESM as dN,createBaseVNode as da,renderList as db,watchEffect as dc,createBlock as dd,useModel as de,renderSlot as df,withDirectives as dg,withAsyncContext as dh,resolveComponent as di,Fragment as dj,computed as dk,getCurrentInstance as dl,useSlots as dm,mergeProps as dn,createVNode as do,useAttrs as dp,watch as dq,resolveDirective as dr,openBlock as ds,reactive as dt,onScopeDispose as du,unref as dv,shallowReactive as dw,toValue$1 as dx,isRef as dy,toRef as dz,nu as e,Mv as f,Pu as g,Av as h,Bu as i,Vv as j,Ov as k,Fv as l,$u as m,Tv as n,Nv as o,SpeechProviderSettings_default as p,useSettings as q,useLive2d as r,useChatStore as s,useAiriCardStore as t,useSpeechStore as u,useConsciousnessStore as v,useProvidersStore as w,check as x,ZodFirstPartyTypeKind as y,missingDependenciesUrl as z}; \ No newline at end of file diff --git a/assets/memory-BnX_YReY.js b/assets/memory-BnX_YReY.js new file mode 100644 index 0000000000000000000000000000000000000000..8750881a244367e5e1f27f6b891b593d848827b8 --- /dev/null +++ b/assets/memory-BnX_YReY.js @@ -0,0 +1 @@ +import{at as e,d0 as t,d3 as n,d5 as r,d6 as i,da as a,dg as o,dj as s,do as c,dr as l,ds as u,dv as d}from"./index-K-hxNScn.js";import{b as f}from"./route-block-D_qNAUXY.js";const p={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 m=n({__name:`index`,setup(n){return(n,f)=>{let m=l(`motion`);return u(),i(s,null,[a(`div`,null,[c(d(e),{label:`In development, needs your help!`,theme:`orange`},{default:r(()=>f[0]||=[a(`div`,null,[t(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),a(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),t(`. The source code of this page is located at `),a(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/memory/index.vue`},`here`),t(`. `)],-1)]),_:1,__:[0]})]),o((u(),i(`div`,p,f[1]||=[a(`div`,{text:`60`,"i-solar:leaf-bold-duotone":``},null,-1)])),[[m]])],64)}}});typeof f==`function`&&f(m);var h=m;export{h as default}; \ No newline at end of file diff --git a/assets/memory-D3FghKqR.js b/assets/memory-D3FghKqR.js deleted file mode 100644 index b09bc5ccee513784bb1051ae74edef8fee06722b..0000000000000000000000000000000000000000 --- a/assets/memory-D3FghKqR.js +++ /dev/null @@ -1 +0,0 @@ -import{av as e,d0 as t,d3 as n,d4 as r,d5 as i,d8 as a,da as o,db as s,df as c,dl as l,do as u,dy as d}from"./index-BOKBAzT0.js";import{b as f}from"./route-block-D_qNAUXY.js";const p={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 m=a({__name:`index`,setup(a){return(a,f)=>{let m=n(`motion`);return r(),s(u,null,[c(`div`,null,[t(d(e),{label:`In development, needs your help!`,theme:`orange`},{default:o(()=>f[0]||=[c(`div`,null,[i(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),c(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),i(`. The source code of this page is located at `),c(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/memory/index.vue`},`here`),i(`. `)],-1)]),_:1,__:[0]})]),l((r(),s(`div`,p,f[1]||=[c(`div`,{text:`60`,"i-solar:leaf-bold-duotone":``},null,-1)])),[[m]])],64)}}});typeof f==`function`&&f(m);var h=m;export{h as default}; \ No newline at end of file diff --git a/assets/memory-long-term-B5wEjqtq.js b/assets/memory-long-term-B5wEjqtq.js new file mode 100644 index 0000000000000000000000000000000000000000..950ea705c8b6180e4ebe667e9f3e509107161ddc --- /dev/null +++ b/assets/memory-long-term-B5wEjqtq.js @@ -0,0 +1 @@ +import{d3 as e,d6 as t,ds as n}from"./index-K-hxNScn.js";import{b as r}from"./route-block-D_qNAUXY.js";var i=e({__name:`memory-long-term`,setup(e){return(e,r)=>(n(),t(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file diff --git a/assets/memory-long-term-w8foiIis.js b/assets/memory-long-term-w8foiIis.js deleted file mode 100644 index c2f99c0c1e7f266e1aaf3b395acf3f24e6e752f2..0000000000000000000000000000000000000000 --- a/assets/memory-long-term-w8foiIis.js +++ /dev/null @@ -1 +0,0 @@ -import{d4 as e,d8 as t,db as n}from"./index-BOKBAzT0.js";import{b as r}from"./route-block-D_qNAUXY.js";var i=t({__name:`memory-long-term`,setup(t){return(t,r)=>(e(),n(`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-CxN60U-L.js b/assets/memory-short-term-CxN60U-L.js new file mode 100644 index 0000000000000000000000000000000000000000..0908734e931ffe6d8d696aac5f003d6d6faa5cc6 --- /dev/null +++ b/assets/memory-short-term-CxN60U-L.js @@ -0,0 +1 @@ +import{d3 as e,d6 as t,ds as n}from"./index-K-hxNScn.js";import{b as r}from"./route-block-D_qNAUXY.js";var i=e({__name:`memory-short-term`,setup(e){return(e,r)=>(n(),t(`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-D1hd1P4O.js b/assets/memory-short-term-D1hd1P4O.js deleted file mode 100644 index cf73a9876707b4f0fed8a67682cdf32f8de74c6c..0000000000000000000000000000000000000000 --- a/assets/memory-short-term-D1hd1P4O.js +++ /dev/null @@ -1 +0,0 @@ -import{d4 as e,d8 as t,db as n}from"./index-BOKBAzT0.js";import{b as r}from"./route-block-D_qNAUXY.js";var i=t({__name:`memory-short-term`,setup(t){return(t,r)=>(e(),n(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file diff --git a/assets/messages-Cg3q0Woa.js b/assets/messages-Cg3q0Woa.js deleted file mode 100644 index 60d448914a29c5daee0c44bd84ab664b46c82b88..0000000000000000000000000000000000000000 --- a/assets/messages-Cg3q0Woa.js +++ /dev/null @@ -1 +0,0 @@ -import"./Basic-6PI1-eSd.js";import{b as e}from"./Textarea-vIof96sl.js";import{Q as t,T as n,ax as r,d0 as i,d4 as a,d8 as o,dD as s,dE as c,db as l,df as u,dg as d,do as f,dy as p}from"./index-BOKBAzT0.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=o({__name:`messages`,setup(o){let y=s(``),b=s([]),x=s(!1),S=n({handlers:[async e=>{b.value.push(e.data)}]}),C=t(S);async function w(){x.value=!0,C.add(y.value),C.add(r),y.value=``,x.value=!1}return(t,n)=>(a(),l(`div`,m,[u(`div`,h,[i(p(e),{modelValue:y.value,"onUpdate:modelValue":n[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`]),u(`button`,g,c(x.value?`Processing...`:`Send`),1)]),u(`div`,_,[u(`div`,v,[n[1]||=u(`h3`,{"font-normal":``},` TTS Message `,-1),(a(!0),l(f,null,d(b.value,e=>(a(),l(`div`,{key:e},[u(`div`,null,c(e),1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/messages-DxJEqeNl.js b/assets/messages-DxJEqeNl.js new file mode 100644 index 0000000000000000000000000000000000000000..64acdb42d7c3b2230f0a8a804390ce0f4d8bde42 --- /dev/null +++ b/assets/messages-DxJEqeNl.js @@ -0,0 +1 @@ +import"./Basic-1H4d_HIg.js";import{b as e}from"./Textarea-Bzx3P1JU.js";import{N as t,Q as n,av as r,d3 as i,d6 as a,dA as o,dG as s,da as c,db as l,dj as u,do as d,ds as f,dv as p}from"./index-K-hxNScn.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=n({handlers:[async e=>{b.value.push(e.data)}]}),C=t(S);async function w(){x.value=!0,C.add(y.value),C.add(r),y.value=``,x.value=!1}return(t,n)=>(f(),a(`div`,m,[c(`div`,h,[d(p(e),{modelValue:y.value,"onUpdate:modelValue":n[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`]),c(`button`,g,s(x.value?`Processing...`:`Send`),1)]),c(`div`,_,[c(`div`,v,[n[1]||=c(`h3`,{"font-normal":``},` TTS Message `,-1),(f(!0),a(u,null,l(b.value,e=>(f(),a(`div`,{key:e},[c(`div`,null,s(e),1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/microsoft-speech-CEMk_Y1p.js b/assets/microsoft-speech-CRIYmLXG.js similarity index 66% rename from assets/microsoft-speech-CEMk_Y1p.js rename to assets/microsoft-speech-CRIYmLXG.js index 6484c7663b31e9717cb5ec3f524836866a39627b..23b01885e3858834ca69afcfbd028e5c3a0c66cb 100644 --- a/assets/microsoft-speech-CEMk_Y1p.js +++ b/assets/microsoft-speech-CRIYmLXG.js @@ -1 +1 @@ -import{$ as e,a6 as t,aL as n,ap as r,ar as i,d0 as a,d2 as o,d4 as s,d6 as c,d8 as l,dD as u,da as d,df as f,di as p,dp as m,dy as h,s as g,x as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`;var C=l({__name:`microsoft-speech`,setup(l){let{t:y}=t(),C={pitch:0,speed:1,volume:0},w=_(),T=v(),{providers:E}=n(T),D=u(0),O=u(1),k=u(0),A=m({get:()=>E.value[x]?.region||`eastasia`,set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=m(()=>!!E.value[x]?.apiKey),M=m(()=>w.availableVoices[x]||[]);c(async()=>{await w.loadVoicesForProvider(x)}),o([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(t,n)=>(s(),p(h(g),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":d(()=>[a(h(i),{modelValue:A.value,"onUpdate:modelValue":n[0]||=e=>A.value=e,label:h(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:h(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":d(()=>[f(`div`,b,[a(h(r),{modelValue:D.value,"onUpdate:modelValue":n[1]||=e=>D.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:h(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`]),a(h(r),{modelValue:O.value,"onUpdate:modelValue":n[2]||=e=>O.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),a(h(r),{modelValue:k.value,"onUpdate:modelValue":n[3]||=e=>k.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:h(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:d(()=>[a(h(e),{"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{Y as e,a3 as t,aL as n,am as r,ao as i,d1 as a,d3 as o,d5 as s,dA as c,da as l,dd as u,dk as d,do as f,dq as p,ds as m,dv as h,p as g,u as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`;var C=o({__name:`microsoft-speech`,setup(o){let{t:y}=t(),C={pitch:0,speed:1,volume:0},w=_(),T=v(),{providers:E}=n(T),D=c(0),O=c(1),k=c(0),A=d({get:()=>E.value[x]?.region||`eastasia`,set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=d(()=>!!E.value[x]?.apiKey),M=d(()=>w.availableVoices[x]||[]);a(async()=>{await w.loadVoicesForProvider(x)}),p([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(t,n)=>(m(),u(h(g),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":s(()=>[f(h(i),{modelValue:A.value,"onUpdate:modelValue":n[0]||=e=>A.value=e,label:h(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:h(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":s(()=>[l(`div`,b,[f(h(r),{modelValue:D.value,"onUpdate:modelValue":n[1]||=e=>D.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:h(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`]),f(h(r),{modelValue:O.value,"onUpdate:modelValue":n[2]||=e=>O.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),f(h(r),{modelValue:k.value,"onUpdate:modelValue":n[3]||=e=>k.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:h(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:s(()=>[f(h(e),{"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-Cp_MAH4V.js b/assets/mistral-ai-Cp_MAH4V.js new file mode 100644 index 0000000000000000000000000000000000000000..054807369f8e5b8fc2301b1be1cf46c525e3a7b2 --- /dev/null +++ b/assets/mistral-ai-Cp_MAH4V.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`mistral-ai`;var x=u({__name:`mistral-ai`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),h([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`mis-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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/mistral-ai-DeCG1zpj.js b/assets/mistral-ai-DeCG1zpj.js deleted file mode 100644 index 83cedf181847192748210902eb4770ec27d14957..0000000000000000000000000000000000000000 --- a/assets/mistral-ai-DeCG1zpj.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`mistral-ai`;var x=p({__name:`mistral-ai`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`mis-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-BdKy7BTu.js b/assets/models-BdKy7BTu.js new file mode 100644 index 0000000000000000000000000000000000000000..03eebbbceb0b28b82cfc3c40ba5bcd96bdc87508 --- /dev/null +++ b/assets/models-BdKy7BTu.js @@ -0,0 +1 @@ +import{c as e,d as t,e as n,f as r}from"./Scenes-D5Bedj_D.js";import{a3 as i,a9 as a,aL as o,aP as s,aT as c,aV as l,aZ as u,af as d,am as f,ap as ee,aw as te,az as p,b as ne,cX as re,d0 as m,d3 as h,d4 as g,d5 as _,d6 as v,dA as y,dG as b,dH as x,dN as S,da as C,db as w,dd as T,dg as E,dj as D,do as O,dq as ie,dr as k,ds as A,dv as j,dy as M,q as N,r as P}from"./index-K-hxNScn.js";import"./import-url-browser-VKajNDYM.js";import"./duckdb-mvp-CIsUbAtz.js";import{b as F}from"./route-block-D_qNAUXY.js";import{b as I}from"./browser-CJhr0Svl.js";import{b as L}from"./IconAnimation-DBKHapUf.js";import{b as R}from"./icon-animation-DYW3c7je.js";var z=S(e()),B=S(n());const V={flex:``,"items-center":``,"gap-2":``},H={"font-medium":``,"font-mono":``},U={flex:``,"gap-2":``},W=[`onUpdate:modelValue`],G=[`href`,`download`],K={flex:``,"items-center":``},q={flex:``,"items-center":``},J={flex:``,"items-center":``};var Y=h({__name:`Live2D`,props:{palette:{}},emits:[`extractColorsFromModel`],setup(e){let{t}=i(),n=c({accept:`application/zip`}),r=P(),{modelFile:s,motionMap:u,loadSource:h,loadingModel:S,availableMotions:k,modelUrl:N,currentMotion:F,scale:I,position:L}=o(r),R=y(N.value);n.onChange(e=>{e&&e.length>0&&(u.value={},s.value=e[0],h.value=`file`,S.value=!0)}),ie(S,e=>{e||h.value===`file`&&k.value.forEach(e=>{e.motionName in p?u.value[e.fileName]=e.motionName:u.value[e.fileName]=te})});async function Y(e,t){if(!Object.keys(t).length)return e;let n=new z.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 X(){let e=await B.default.getItem(`live2dModel`);if(!e)return;let t=await Y(e,u.value);s.value=t,h.value=`file`,S.value=!0}let Z=l(s);return(e,r)=>(A(),v(D,null,[O(j(d),{title:j(t)(`settings.live2d.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:x([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:_(()=>[O(j(a),{variant:`secondary`,onClick:r[0]||=e=>j(n).open()},{default:_(()=>[m(b(j(t)(`settings.live2d.change-model.from-file`))+`... `,1)]),_:1}),C(`div`,V,[O(j(ee),{modelValue:R.value,"onUpdate:modelValue":r[1]||=e=>R.value=e,disabled:j(S),class:`flex-1`,placeholder:j(t)(`settings.live2d.change-model.from-url-placeholder`)},null,8,[`modelValue`,`disabled`,`placeholder`]),O(j(a),{size:`sm`,variant:`secondary`,onClick:r[2]||=e=>N.value=R.value},{default:_(()=>[m(b(j(t)(`settings.live2d.change-model.from-url`)),1)]),_:1})])]),_:1},8,[`title`]),O(j(d),{title:j(t)(`settings.live2d.theme-color-from-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:x([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:_(()=>[O(j(ne),{class:`mb-4 mt-2`,colors:e.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),O(j(a),{variant:`secondary`,onClick:r[3]||=t=>e.$emit(`extractColorsFromModel`)},{default:_(()=>[m(b(j(t)(`settings.live2d.theme-color-from-model.button-extract.title`)),1)]),_:1})]),_:1},8,[`title`]),j(h)===`file`?(A(),T(j(d),{key:0,title:j(t)(`settings.live2d.edit-motion-map.title`),icon:`i-solar:face-scan-circle-bold-duotone`,class:x([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:_(()=>[(A(!0),v(D,null,w(j(k),e=>(A(),v(`div`,{key:e.fileName,flex:``,"items-center":``,"justify-between":``,"text-sm":``},[C(`span`,H,b(e.fileName),1),C(`div`,U,[E(C(`select`,{"onUpdate:modelValue":t=>j(u)[e.fileName]=t},[(A(!0),v(D,null,w(Object.keys(j(p)),e=>(A(),v(`option`,{key:e},b(e),1))),128))],8,W),[[re,j(u)[e.fileName]]]),O(j(a),{class:`form-control`,onClick:t=>F.value={group:e.motionName,index:e.motionIndex}},{default:_(()=>r[10]||=[m(` Play `)]),_:2,__:[10]},1032,[`onClick`])])]))),128)),O(j(a),{onClick:X},{default:_(()=>r[11]||=[m(` Save and patch `)]),_:1,__:[11]}),C(`a`,{"mt-2":``,block:``,href:j(Z),download:`${j(s)?.name||`live2d`}-motion-edited.zip`},[O(j(a),{"w-full":``},{default:_(()=>r[12]||=[m(`Export`)]),_:1,__:[12]})],8,G)]),_:1},8,[`title`])):g(``,!0),O(j(d),{title:j(t)(`settings.live2d.scale-and-position.title`),icon:`i-solar:scale-bold-duotone`,class:x([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:_(()=>[O(j(f),{modelValue:j(I),"onUpdate:modelValue":r[5]||=e=>M(I)?I.value=e:null,as:`div`,min:.5,max:2,step:.01,label:j(t)(`settings.live2d.scale-and-position.scale`)},{label:_(()=>[C(`div`,K,[C(`div`,null,b(j(t)(`settings.live2d.scale-and-position.scale`)),1),C(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:r[4]||=()=>I.value=1},r[13]||=[C(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),O(j(f),{modelValue:j(L).x,"onUpdate:modelValue":r[7]||=e=>j(L).x=e,as:`div`,min:-100,max:100,step:1,label:j(t)(`settings.live2d.scale-and-position.x`)},{label:_(()=>[C(`div`,q,[C(`div`,null,b(j(t)(`settings.live2d.scale-and-position.x`)),1),C(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:r[6]||=()=>j(L).x=0},r[14]||=[C(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),O(j(f),{modelValue:j(L).y,"onUpdate:modelValue":r[9]||=e=>j(L).y=e,as:`div`,min:-100,max:100,step:1,label:j(t)(`settings.live2d.scale-and-position.y`)},{label:_(()=>[C(`div`,J,[C(`div`,null,b(j(t)(`settings.live2d.scale-and-position.y`)),1),C(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:r[8]||=()=>j(L).y=0},r[15]||=[C(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`])]),_:1},8,[`title`])],64))}}),X=Y,Z=h({__name:`Live2DScene`,setup(e){let n=y(),i=y(),{width:a,height:c}=s(n),{positionInPercentageString:l,scale:d}=o(P()),f=u();return(e,o)=>(A(),v(`div`,{ref_key:`live2dContainerRef`,ref:n,w:`100%`,h:`100%`},[O(j(r),{ref_key:`live2dCanvasRef`,ref:i,width:j(a),height:j(c),resolution:2,"max-h":`100dvh`},{default:_(({app:e})=>[O(j(t),{app:e,"mouth-open-size":0,width:j(a),height:j(c),paused:!1,"focus-at":{x:j(f).x.value,y:j(f).y.value},"x-offset":j(l).x,"y-offset":j(l).y,scale:j(d)},null,8,[`app`,`width`,`height`,`focus-at`,`x-offset`,`y-offset`,`scale`])]),_:1},8,[`width`,`height`])],512))}}),ae=Z;const Q={flex:`~ col gap-2`};var oe=h({__name:`index`,props:{palette:{}},emits:[`extractColorsFromModel`],setup(e){let{stageView:t}=o(N());return(e,n)=>j(t)===`2d`?(A(),v(D,{key:0},[O(ae),C(`div`,Q,[O(X,{palette:e.palette,onExtractColorsFromModel:n[0]||=t=>e.$emit(`extractColorsFromModel`)},null,8,[`palette`])])],64)):g(``,!0)}}),se=oe;const ce={flex:``,class:`relative h-[calc(100dvh-8rem)] flex-col-reverse md:flex-row`},le={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 $=h({__name:`index`,setup(e){let t=y(),n=y([]);async function r(){if(!t.value)return;let e=await t.value.captureFrame();if(!e){console.error(`No frame captured`);return}let r=URL.createObjectURL(e);try{let e=new I(r),t=await e.getPalette();n.value=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`)}finally{URL.revokeObjectURL(r)}}let{iconAnimationStarted:i,showIconAnimation:a,animationIcon:o}=R(`i-solar:people-nearby-bold-duotone`);return(e,t)=>{let s=k(`motion`);return A(),v(D,null,[C(`div`,ce,[O(j(se),{w:`100% md:30%`,"h-fit":``,"overflow-y-scroll":``,class:`absolute bottom-0 right-0 top-0`,palette:n.value,onExtractColorsFromModel:r},null,8,[`palette`])]),j(a)?(A(),T(L,{key:0,"z-index":-1,icon:j(o),"icon-size":12,duration:1e3,started:j(i),"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`])):E((A(),v(`div`,le,t[0]||=[C(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)])),[[s]])],64)}}});typeof F==`function`&&F($);var ue=$;export{ue as default}; \ No newline at end of file diff --git a/assets/models-Dfsy0OC4.js b/assets/models-Dfsy0OC4.js deleted file mode 100644 index e6b0d2af4516e7ecef5a99fbe83fd321a94899f3..0000000000000000000000000000000000000000 --- a/assets/models-Dfsy0OC4.js +++ /dev/null @@ -1 +0,0 @@ -import{c as e,d as t}from"./Scenes-B8GWuxOy.js";import{aL as n,aN as r,aS as i,b as a,d0 as o,d3 as s,d4 as c,d8 as l,dD as u,da as d,db as f,df as p,di as m,dl as h,do as g,dy as _,u as v}from"./index-BOKBAzT0.js";import"./import-url-browser-VKajNDYM.js";import"./duckdb-mvp-CIsUbAtz.js";import{b as y}from"./route-block-D_qNAUXY.js";import{b}from"./browser-CJhr0Svl.js";import{b as x}from"./IconAnimation-CJRikR53.js";import{b as S}from"./icon-animation-Cj5BOBLD.js";const C={flex:``,class:`relative h-full flex-col-reverse md:flex-row`},w={key:1,text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var T=l({__name:`index`,setup(l){let y=u(),T=u(),{width:E,height:D}=i(y),{positionInPercentageString:O,scale:k}=n(v()),A=u([]);async function j(){if(!T.value)return;let e=await T.value.captureFrame();if(!e){console.error(`No frame captured`);return}let t=URL.createObjectURL(e);try{let e=new b(t),n=await e.getPalette();A.value=Object.values(n).map(e=>e?.hex).filter(e=>typeof e==`string`)}finally{URL.revokeObjectURL(t)}}let{iconAnimationStarted:M,showIconAnimation:N,animationIcon:P}=S(`i-solar:people-nearby-bold-duotone`),F=r();return(n,r)=>{let i=s(`motion`);return c(),f(g,null,[p(`div`,C,[p(`div`,{ref_key:`live2dContainerRef`,ref:y,w:`100%`,h:`100%`},[o(_(t),{ref_key:`live2dCanvasRef`,ref:T,width:_(E),height:_(D),resolution:2,"max-h":`100dvh`},{default:d(({app:t})=>[o(_(e),{app:t,"mouth-open-size":0,width:_(E),height:_(D),paused:!1,"focus-at":{x:_(F).x.value,y:_(F).y.value},"x-offset":_(O).x,"y-offset":_(O).y,scale:_(k)},null,8,[`app`,`width`,`height`,`focus-at`,`x-offset`,`y-offset`,`scale`])]),_:1},8,[`width`,`height`])],512),o(_(a),{w:`100% md:30%`,"h-fit":``,"overflow-y-scroll":``,class:`absolute bottom-0 right-0 top-0`,palette:A.value,onExtractColorsFromModel:j},null,8,[`palette`])]),_(N)?(c(),m(x,{key:0,"z-index":-1,icon:_(P),"icon-size":12,duration:1e3,started:_(M),"is-reverse":!0,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`},null,8,[`icon`,`started`])):h((c(),f(`div`,w,r[0]||=[p(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)])),[[i]])],64)}}});typeof y==`function`&&y(T);var E=T;export{E as default}; \ No newline at end of file diff --git a/assets/modules-DRy6wkoH.js b/assets/modules-B091BuDn.js similarity index 77% rename from assets/modules-DRy6wkoH.js rename to assets/modules-B091BuDn.js index 76f522adcd5f2f6ebd9e183185d472e81879f2cb..ca1b8c5f239c1fbd56835c99d21b218f9bca39f5 100644 --- a/assets/modules-DRy6wkoH.js +++ b/assets/modules-B091BuDn.js @@ -1 +1 @@ -import{a6 as e,ag as t,d3 as n,d4 as r,d8 as i,db as a,df as o,dg as s,di as c,dl as l,do as u,dp as d,dy as f,x as p,y as m}from"./index-BOKBAzT0.js";import{b as h}from"./route-block-D_qNAUXY.js";import{b as g}from"./IconAnimation-CJRikR53.js";import{b as _}from"./icon-animation-Cj5BOBLD.js";const v={grid:`~ cols-1 sm:cols-2 gap-4`},y={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 b=i({__name:`index`,setup(i){let{t:h}=e(),b=d(()=>[{id:`consciousness`,name:h(`settings.pages.modules.consciousness.title`),description:h(`settings.pages.modules.consciousness.description`),icon:`i-solar:ghost-bold-duotone`,to:`/settings/modules/consciousness`,configured:m().configured},{id:`speech`,name:h(`settings.pages.modules.speech.title`),description:h(`settings.pages.modules.speech.description`),icon:`i-solar:user-speak-rounded-bold-duotone`,to:`/settings/modules/speech`,configured:p().configured},{id:`hearing`,name:h(`settings.pages.modules.hearing.title`),description:h(`settings.pages.modules.hearing.description`),icon:`i-solar:microphone-3-bold-duotone`,to:`/settings/modules/hearing`,configured:!1},{id:`vision`,name:h(`settings.pages.modules.vision.title`),description:h(`settings.pages.modules.vision.description`),icon:`i-solar:eye-closed-bold-duotone`,to:``,configured:!1},{id:`memory-short-term`,name:h(`settings.pages.modules.memory-short-term.title`),description:h(`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:h(`settings.pages.modules.memory-long-term.title`),description:h(`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:h(`settings.pages.modules.messaging-discord.title`),description:h(`settings.pages.modules.messaging-discord.description`),icon:`i-simple-icons:discord`,to:``,configured:!1},{id:`x`,name:h(`settings.pages.modules.x.title`),description:h(`settings.pages.modules.x.description`),icon:`i-simple-icons:x`,to:``,configured:!1},{id:`game-minecraft`,name:h(`settings.pages.modules.gaming-minecraft.title`),description:h(`settings.pages.modules.gaming-minecraft.description`),iconColor:`i-vscode-icons:file-type-minecraft`,to:``,configured:!1},{id:`game-factorio`,name:h(`settings.pages.modules.gaming-factorio.title`),description:h(`settings.pages.modules.gaming-factorio.description`),iconImage:``,to:``,configured:!1}]),{iconAnimationStarted:x,showIconAnimation:S,animationIcon:C}=_(`i-solar:layers-bold-duotone`);return(e,i)=>{let d=n(`motion`);return r(),a(u,null,[o(`div`,v,[(r(!0),a(u,null,s(b.value,(e,n)=>l((r(),c(f(t),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*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`])),[[d]])),128))]),f(S)?(r(),c(g,{key:0,icon:f(C),"icon-size":12,duration:1e3,started:f(x),"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`])):l((r(),a(`div`,y,i[0]||=[o(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)])),[[d]])],64)}}});typeof h==`function`&&h(b);var x=b;export{x as default}; \ No newline at end of file +import{a3 as e,ad as t,d3 as n,d6 as r,da as i,db as a,dd as o,dg as s,dj as c,dk as l,dr as u,ds as d,dv as f,u as p,v as m}from"./index-K-hxNScn.js";import{b as h}from"./route-block-D_qNAUXY.js";import{b as g}from"./IconAnimation-DBKHapUf.js";import{b as _}from"./icon-animation-DYW3c7je.js";const v={grid:`~ cols-1 sm:cols-2 gap-4`},y={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 b=n({__name:`index`,setup(n){let{t:h}=e(),b=l(()=>[{id:`consciousness`,name:h(`settings.pages.modules.consciousness.title`),description:h(`settings.pages.modules.consciousness.description`),icon:`i-solar:ghost-bold-duotone`,to:`/settings/modules/consciousness`,configured:m().configured},{id:`speech`,name:h(`settings.pages.modules.speech.title`),description:h(`settings.pages.modules.speech.description`),icon:`i-solar:user-speak-rounded-bold-duotone`,to:`/settings/modules/speech`,configured:p().configured},{id:`hearing`,name:h(`settings.pages.modules.hearing.title`),description:h(`settings.pages.modules.hearing.description`),icon:`i-solar:microphone-3-bold-duotone`,to:`/settings/modules/hearing`,configured:!1},{id:`vision`,name:h(`settings.pages.modules.vision.title`),description:h(`settings.pages.modules.vision.description`),icon:`i-solar:eye-closed-bold-duotone`,to:``,configured:!1},{id:`memory-short-term`,name:h(`settings.pages.modules.memory-short-term.title`),description:h(`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:h(`settings.pages.modules.memory-long-term.title`),description:h(`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:h(`settings.pages.modules.messaging-discord.title`),description:h(`settings.pages.modules.messaging-discord.description`),icon:`i-simple-icons:discord`,to:``,configured:!1},{id:`x`,name:h(`settings.pages.modules.x.title`),description:h(`settings.pages.modules.x.description`),icon:`i-simple-icons:x`,to:``,configured:!1},{id:`game-minecraft`,name:h(`settings.pages.modules.gaming-minecraft.title`),description:h(`settings.pages.modules.gaming-minecraft.description`),iconColor:`i-vscode-icons:file-type-minecraft`,to:``,configured:!1},{id:`game-factorio`,name:h(`settings.pages.modules.gaming-factorio.title`),description:h(`settings.pages.modules.gaming-factorio.description`),iconImage:``,to:``,configured:!1}]),{iconAnimationStarted:x,showIconAnimation:S,animationIcon:C}=_(`i-solar:layers-bold-duotone`);return(e,n)=>{let l=u(`motion`);return d(),r(c,null,[i(`div`,v,[(d(!0),r(c,null,a(b.value,(e,n)=>s((d(),o(f(t),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*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`])),[[l]])),128))]),f(S)?(d(),o(g,{key:0,icon:f(C),"icon-size":12,duration:1e3,started:f(x),"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`])):s((d(),r(`div`,y,n[0]||=[i(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)])),[[l]])],64)}}});typeof h==`function`&&h(b);var x=b;export{x as default}; \ No newline at end of file diff --git a/assets/moonshot-ai-CH0UaQqy.js b/assets/moonshot-ai-CH0UaQqy.js deleted file mode 100644 index 8144387d8013e5c4f3de2371c06b436e845a2409..0000000000000000000000000000000000000000 --- a/assets/moonshot-ai-CH0UaQqy.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`moonshot-ai`;var x=p({__name:`moonshot-ai`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`ms-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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/moonshot-ai-bUFSVmPQ.js b/assets/moonshot-ai-bUFSVmPQ.js new file mode 100644 index 0000000000000000000000000000000000000000..09b5a1818bc12041a1ba604f183e213a070674c4 --- /dev/null +++ b/assets/moonshot-ai-bUFSVmPQ.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`moonshot-ai`;var x=u({__name:`moonshot-ai`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),h([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`ms-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-CI0eK_Uz.js b/assets/novita-ai-CI0eK_Uz.js deleted file mode 100644 index 28acc050d085ebeca5da12078cef12d47e40d152..0000000000000000000000000000000000000000 --- a/assets/novita-ai-CI0eK_Uz.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`novita-ai`;var x=p({__name:`novita-ai`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`nvt-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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/novita-ai-DCJo9fcm.js b/assets/novita-ai-DCJo9fcm.js new file mode 100644 index 0000000000000000000000000000000000000000..bb1e465a2e8a74f7c1904dde3a7e28a2e54c11ba --- /dev/null +++ b/assets/novita-ai-DCJo9fcm.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`novita-ai`;var x=u({__name:`novita-ai`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),h([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`nvt-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-3XcXtIkW.js b/assets/ollama-3XcXtIkW.js deleted file mode 100644 index 534a69f0c602908fe6088c56cf34ec05240d4cd8..0000000000000000000000000000000000000000 --- a/assets/ollama-3XcXtIkW.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a6 as i,a7 as a,aG as o,aL as s,aq as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,dD as m,da as h,di as g,dp as _,dy as v,z as y}from"./index-BOKBAzT0.js";import{b}from"./route-block-D_qNAUXY.js";const x=`ollama`;var S=p({__name:`ollama`,setup(p){let{t:b}=i(),S=o(),C=y(),{providers:w}=s(C),T=_(()=>C.getProviderMetadata(x)),E=_({get:()=>w.value[x]?.baseUrl||T.value?.defaultOptions?.().baseUrl||``,set:e=>{w.value[x]||(w.value[x]={}),w.value[x].baseUrl=e}});f(()=>{C.initializeProvider(x),E.value=w.value[x]?.baseUrl||T.value?.defaultOptions?.().baseUrl||``,w.value[x]?.headers||(w.value[x].headers={})});function D(){w.value[x]={...T.value?.defaultOptions}}let O=m([{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 u(O,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``})},{deep:!0,immediate:!0}),(i,o)=>(d(),g(v(e),{"provider-name":T.value?.localizedName,"provider-icon":T.value?.icon,"on-back":()=>v(S).back()},{default:h(()=>[l(v(t),null,{default:h(()=>[l(v(n),{title:v(b)(`settings.pages.providers.common.section.basic.title`),description:v(b)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:h(()=>[l(v(r),{modelValue:E.value,"onUpdate:modelValue":o[0]||=e=>E.value=e,placeholder:T.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`title`,`description`]),l(v(a),{title:v(b)(`settings.pages.providers.common.section.advanced.title`)},{default:h(()=>[l(v(c),{modelValue:O.value,"onUpdate:modelValue":o[1]||=e=>O.value=e,label:v(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:v(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":v(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":v(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:o[2]||=(e,t)=>k(O.value,e,t),onRemove:o[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/ollama-xKcCpTx0.js b/assets/ollama-xKcCpTx0.js new file mode 100644 index 0000000000000000000000000000000000000000..fe4e7f4817afbcec8883fbb8da0d347ade2705e6 --- /dev/null +++ b/assets/ollama-xKcCpTx0.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a3 as i,a4 as a,aG as o,aL as s,an as c,d1 as l,d3 as u,d5 as d,dA as f,dd as p,dk as m,do as h,dq as g,ds as _,dv as v,w as y}from"./index-K-hxNScn.js";import{b}from"./route-block-D_qNAUXY.js";const x=`ollama`;var S=u({__name:`ollama`,setup(u){let{t:b}=i(),S=o(),C=y(),{providers:w}=s(C),T=m(()=>C.getProviderMetadata(x)),E=m({get:()=>w.value[x]?.baseUrl||T.value?.defaultOptions?.().baseUrl||``,set:e=>{w.value[x]||(w.value[x]={}),w.value[x].baseUrl=e}});l(()=>{C.initializeProvider(x),E.value=w.value[x]?.baseUrl||T.value?.defaultOptions?.().baseUrl||``,w.value[x]?.headers||(w.value[x].headers={})});function D(){w.value[x]={...T.value?.defaultOptions}}let O=f([{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 g(O,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``})},{deep:!0,immediate:!0}),(i,o)=>(_(),p(v(t),{"provider-name":T.value?.localizedName,"provider-icon":T.value?.icon,"on-back":()=>v(S).back()},{default:d(()=>[h(v(n),null,{default:d(()=>[h(v(e),{title:v(b)(`settings.pages.providers.common.section.basic.title`),description:v(b)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[h(v(r),{modelValue:E.value,"onUpdate:modelValue":o[0]||=e=>E.value=e,placeholder:T.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`title`,`description`]),h(v(a),{title:v(b)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[h(v(c),{modelValue:O.value,"onUpdate:modelValue":o[1]||=e=>O.value=e,label:v(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:v(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":v(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":v(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:o[2]||=(e,t)=>k(O.value,e,t),onRemove:o[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-CQAVgiMk.js b/assets/openai-CQAVgiMk.js new file mode 100644 index 0000000000000000000000000000000000000000..93f7ac1e360d6ab0ec722587c05da991e09f9ef0 --- /dev/null +++ b/assets/openai-CQAVgiMk.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`openai`;var x=u({__name:`openai`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||`https://api.openai.com/v1/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||`https://api.openai.com/v1/`}),h([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(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName||`OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-DDftvili.js b/assets/openai-DDftvili.js deleted file mode 100644 index 671c5938f6de9e722448f5176aa51d0d736f42d0..0000000000000000000000000000000000000000 --- a/assets/openai-DDftvili.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`openai`;var x=p({__name:`openai`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||`https://api.openai.com/v1/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=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(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName||`OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-CKZ4rtwU.js b/assets/openai-audio-speech-CKZ4rtwU.js deleted file mode 100644 index ffda013882da8d1d5b3d888f03863ef9dd31b3f2..0000000000000000000000000000000000000000 --- a/assets/openai-audio-speech-CKZ4rtwU.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`openai`;var x=p({__name:`openai-audio-speech`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||`https://api.openai.com/v1/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=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(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName||`OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-DW1QrfRq.js b/assets/openai-audio-speech-DW1QrfRq.js new file mode 100644 index 0000000000000000000000000000000000000000..7bd1821c11ee263a28b49ad758f9b82502142865 --- /dev/null +++ b/assets/openai-audio-speech-DW1QrfRq.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`openai`;var x=u({__name:`openai-audio-speech`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||`https://api.openai.com/v1/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||`https://api.openai.com/v1/`}),h([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(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName||`OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-CavrcyBE.js b/assets/openai-audio-transcription-CavrcyBE.js new file mode 100644 index 0000000000000000000000000000000000000000..1119f988dfc017619ad9480f1bd725abdf151887 --- /dev/null +++ b/assets/openai-audio-transcription-CavrcyBE.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`openai`;var x=u({__name:`openai-audio-transcription`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||`https://api.openai.com/v1/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||`https://api.openai.com/v1/`}),h([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(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName||`OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-DC9rP5fb.js b/assets/openai-audio-transcription-DC9rP5fb.js deleted file mode 100644 index 5be5d3f26eac723d8a0814ef0875220631f98f5a..0000000000000000000000000000000000000000 --- a/assets/openai-audio-transcription-DC9rP5fb.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`openai`;var x=p({__name:`openai-audio-transcription`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||`https://api.openai.com/v1/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=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(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName||`OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-BUmol1WC.js b/assets/openrouter-ai-BUmol1WC.js deleted file mode 100644 index c38e04810c3ec042e15d0c30b43d53b63976df5b..0000000000000000000000000000000000000000 --- a/assets/openrouter-ai-BUmol1WC.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`openrouter-ai`;var x=p({__name:`openrouter-ai`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||w.value?.defaultOptions?.().baseUrl||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-or-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[1]||=e=>E.value=e,placeholder:w.value?.defaultOptions?.().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/openrouter-ai-CnYjoQlp.js b/assets/openrouter-ai-CnYjoQlp.js new file mode 100644 index 0000000000000000000000000000000000000000..8979ba17c44cb351d0829f3e837c188ba4dd17b9 --- /dev/null +++ b/assets/openrouter-ai-CnYjoQlp.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`openrouter-ai`;var x=u({__name:`openrouter-ai`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``}),h([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||w.value?.defaultOptions?.().baseUrl||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-or-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[1]||=e=>E.value=e,placeholder:w.value?.defaultOptions?.().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-BAul_h40.js b/assets/pages-BAul_h40.js new file mode 100644 index 0000000000000000000000000000000000000000..855dc42c8b92d63907ace3efba35c685ab4a5848 --- /dev/null +++ b/assets/pages-BAul_h40.js @@ -0,0 +1 @@ +import{b as e}from"./Scenes-D5Bedj_D.js";import"./Basic-1H4d_HIg.js";import{b as t,c as n}from"./theme-color-B66QzWnt.js";import{aL as r,aQ as i,aR as a,aY as o,aZ as s,d1 as c,d3 as l,d5 as u,dA as d,da as f,dd as p,do as m,dq as h,ds as g,dv as _,r as v}from"./index-K-hxNScn.js";import"./import-url-browser-VKajNDYM.js";import"./duckdb-mvp-CIsUbAtz.js";import"./HeaderLink-DJwpVSTp.js";import{b as y}from"./route-block-D_qNAUXY.js";import{b,c as x,d as S,e as C,f as w}from"./AnimatedWave-CMIzOsja.js";const T={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},E={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``},D={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 I(),{immediate:!0}),c(()=>I()),(t,n)=>(g(),p(w,null,{default:u(()=>[m(b,{class:`widgets top-widgets`,"fill-color":_(y)?`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:u(()=>[f(`div`,T,[f(`div`,E,[m(C,{class:`flex`})]),f(`div`,D,[m(_(e),{"flex-1":``,"min-w":`1/2`,paused:O.value,"focus-at":{x:_(A).x.value,y:_(A).y.value},"x-offset":`${_(F)?_(M).x:_(M).x-10}%`,"y-offset":_(N).y,scale:_(j)},null,8,[`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`]),m(S,{class:`flex I(),{immediate:!0}),d(()=>I()),(t,n)=>(u(),g(w,null,{default:m(()=>[c(b,{class:`widgets top-widgets`,"fill-color":_(y)?`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:m(()=>[h(`div`,T,[h(`div`,E,[c(C,{class:`flex`})]),h(`div`,D,[c(_(e),{"flex-1":``,"min-w":`1/2`,paused:O.value,"focus-at":{x:_(A).x.value,y:_(A).y.value},"x-offset":`${_(F)?_(M).x:_(M).x-10}%`,"y-offset":_(N).y,scale:_(j)},null,8,[`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`]),c(S,{class:`flex E.getProviderMetadata(w)),k=y({get:()=>D.value[w]?.baseUrl||``,set:e=>{D.value[w]||(D.value[w]={}),D.value[w].baseUrl=e}}),A=p(!0);u(async()=>{E.initializeProvider(w),k.value=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}}),s([k],()=>{D.value[w]={...D.value[w],baseUrl:k.value||``}});function j(){D.value[w]={...O.value?.defaultOptions}}return(r,i)=>{let a=_(`ProviderBasicSettings`);return c(),h(v,null,[A.value?f(``,!0):(c(),h(`div`,C,i[1]||=[g(`div`,null,[l(` Please download and run the Player2 App: `),g(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),g(`div`,null,[l(` After downloading, if you still are having trouble, please reach out to us on Discord: `),g(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),l(`. `)])],-1)])),o(b(e),{"provider-name":O.value?.localizedName,"provider-icon":O.value?.icon,"on-back":()=>b(T).back()},{default:m(()=>[o(b(t),null,{default:m(()=>[o(a,{title:b(S)(`settings.pages.providers.common.section.basic.title`),description:b(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":j},{default:m(()=>[o(b(n),{modelValue:k.value,"onUpdate:modelValue":i[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-Vrjn9guG.js b/assets/player2-Vrjn9guG.js new file mode 100644 index 0000000000000000000000000000000000000000..a879c3da7ebbabb3d127b1a143c46e9a7afbf9c9 --- /dev/null +++ b/assets/player2-Vrjn9guG.js @@ -0,0 +1 @@ +import{Z as e,_ as t,a1 as n,a3 as r,aG as i,aL as a,d0 as o,d1 as s,d3 as c,d4 as l,d5 as u,d6 as d,dA as f,da as p,di as m,dj as h,dk as g,do as _,dq as v,ds as y,dv as b,w as x}from"./index-K-hxNScn.js";import{b as S}from"./route-block-D_qNAUXY.js";const C={key:0,style:{color:`red`,"margin-bottom":`1rem`}},w=`player2`;var T=c({__name:`player2`,setup(c){let{t:S}=r(),T=i(),E=x(),{providers:D}=a(E),O=g(()=>E.getProviderMetadata(w)),k=g({get:()=>D.value[w]?.baseUrl||``,set:e=>{D.value[w]||(D.value[w]={}),D.value[w].baseUrl=e}}),A=f(!0);s(async()=>{E.initializeProvider(w),k.value=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}}),v([k],()=>{D.value[w]={...D.value[w],baseUrl:k.value||``}});function j(){D.value[w]={...O.value?.defaultOptions}}return(r,i)=>{let a=m(`ProviderBasicSettings`);return y(),d(h,null,[A.value?l(``,!0):(y(),d(`div`,C,i[1]||=[p(`div`,null,[o(` Please download and run the Player2 App: `),p(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),p(`div`,null,[o(` After downloading, if you still are having trouble, please reach out to us on Discord: `),p(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),o(`. `)])],-1)])),_(b(e),{"provider-name":O.value?.localizedName,"provider-icon":O.value?.icon,"on-back":()=>b(T).back()},{default:u(()=>[_(b(t),null,{default:u(()=>[_(a,{title:b(S)(`settings.pages.providers.common.section.basic.title`),description:b(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":j},{default:u(()=>[_(b(n),{modelValue:k.value,"onUpdate:modelValue":i[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-YsXUM2wN.js b/assets/player2-speech-rSa7i7tK.js similarity index 53% rename from assets/player2-speech-YsXUM2wN.js rename to assets/player2-speech-rSa7i7tK.js index 49270607c1fc49828c3c8ab416338cc23edf9870..9ac60f750cc9720bced433868bc537f15f50cf35 100644 --- a/assets/player2-speech-YsXUM2wN.js +++ b/assets/player2-speech-rSa7i7tK.js @@ -1 +1 @@ -import{$ as e,a6 as t,ap as n,d0 as r,d2 as i,d4 as a,d5 as o,d6 as s,d8 as c,d9 as l,dD as u,da as d,db as f,df as p,do as m,dp as h,dy as g,s as _,x as v,z as y}from"./index-BOKBAzT0.js";import{b}from"./route-block-D_qNAUXY.js";const x={key:0,style:{color:`red`,"margin-bottom":`1rem`}},S=`player2-speech`,C=`v1`;var w=c({__name:`player2-speech`,setup(c){let b=u(1),w=v(),T=y(),{t:E}=t(),D=h(()=>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 s(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}}),i(b,async()=>{let e=T.getProviderConfig(S);e.speed=b.value}),(t,i)=>(a(),f(m,null,[k.value?l(``,!0):(a(),f(`div`,x,i[1]||=[p(`div`,null,[o(` Please download and run the Player2 App: `),p(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),p(`div`,null,[o(` After downloading, if you still are having trouble, please reach out to us on Discord: `),p(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),o(`. `)])],-1)])),r(g(_),{"provider-id":S,"default-model":C},{"voice-settings":d(()=>[r(g(n),{modelValue:b.value,"onUpdate:modelValue":i[0]||=e=>b.value=e,label:g(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:g(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:5,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:d(()=>[r(g(e),{"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{Y as e,a3 as t,am as n,d0 as r,d1 as i,d3 as a,d4 as o,d5 as s,d6 as c,dA as l,da as u,dj as d,dk as f,do as p,dq as m,ds as h,dv as g,p as _,u as v,w as y}from"./index-K-hxNScn.js";import{b}from"./route-block-D_qNAUXY.js";const x={key:0,style:{color:`red`,"margin-bottom":`1rem`}},S=`player2-speech`,C=`v1`;var w=a({__name:`player2-speech`,setup(a){let b=l(1),w=v(),T=y(),{t:E}=t(),D=f(()=>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=l(!0);return i(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}}),m(b,async()=>{let e=T.getProviderConfig(S);e.speed=b.value}),(t,i)=>(h(),c(d,null,[k.value?o(``,!0):(h(),c(`div`,x,i[1]||=[u(`div`,null,[r(` Please download and run the Player2 App: `),u(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),u(`div`,null,[r(` After downloading, if you still are having trouble, please reach out to us on Discord: `),u(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),r(`. `)])],-1)])),p(g(_),{"provider-id":S,"default-model":C},{"voice-settings":s(()=>[p(g(n),{modelValue:b.value,"onUpdate:modelValue":i[0]||=e=>b.value=e,label:g(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:g(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:5,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:s(()=>[p(g(e),{"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-Bs31_N5q.js b/assets/polaroid-Bs31_N5q.js new file mode 100644 index 0000000000000000000000000000000000000000..2683a7bba4ae000d3e50958580c284a25e565517 --- /dev/null +++ b/assets/polaroid-Bs31_N5q.js @@ -0,0 +1 @@ +import{d as e,f as t}from"./Scenes-D5Bedj_D.js";import{a8 as n,cX as r,d3 as i,d5 as a,d6 as o,dA as s,dG as c,da as l,db as u,dg as d,dj as f,do as p,dq as m,ds as h,dv as g}from"./index-K-hxNScn.js";import"./import-url-browser-VKajNDYM.js";import"./duckdb-mvp-CIsUbAtz.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=s(),x=s(),S=s(`idle`),C=s([]);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){x.value?.setMotion(e)}m(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,s)=>(h(),o(`div`,_,[l(`div`,v,[p(g(n),{relative:``,"min-h-70dvh":``},{default:a(({width:n,height:r})=>[p(g(t),{ref_key:`live2dCanvasRef`,ref:b,width:n,height:r,resolution:3,"rounded-full":``},{default:a(({app:t})=>[p(g(e),{ref_key:`live2dModelRef`,ref:x,app:t,width:n,height:r,"focus-at":{x:n/2,y:r/2},onModelLoaded:E},null,8,[`app`,`width`,`height`,`focus-at`])]),_:2},1032,[`width`,`height`])]),_:1})]),l(`div`,null,[d(l(`select`,{"onUpdate:modelValue":s[0]||=e=>S.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:s[1]||=e=>T(S.value)},[(h(!0),o(f,null,u(C.value,e=>(h(),o(`option`,{key:e.motionIndex,value:e.motionName},c(e.fileName),9,y))),128))],544),[[r,S.value]])]),l(`div`,{border:`2px solid white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[l(`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/polaroid-CCOPCJYT.js b/assets/polaroid-CCOPCJYT.js deleted file mode 100644 index e2685755b19ec38cbb6473e8ddfdc8c929e24d81..0000000000000000000000000000000000000000 --- a/assets/polaroid-CCOPCJYT.js +++ /dev/null @@ -1 +0,0 @@ -import{c as e,d as t}from"./Scenes-B8GWuxOy.js";import{ab as n,cT as r,d0 as i,d2 as a,d4 as o,d8 as s,dD as c,dE as l,da as u,db as d,df as f,dg as p,dl as m,do as h,dy as g}from"./index-BOKBAzT0.js";import"./import-url-browser-VKajNDYM.js";import"./duckdb-mvp-CIsUbAtz.js";const _={flex:``,"flex-col":``,"items-center":``,"gap-4":``},v={"h-full":``,"w-full":``},y=[`value`];var b=s({__name:`polaroid`,setup(s){let b=c(),x=c(),S=c(`idle`),C=c([]);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){x.value?.setMotion(e)}a(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(a,s)=>(o(),d(`div`,_,[f(`div`,v,[i(g(n),{relative:``,"min-h-70dvh":``},{default:u(({width:n,height:r})=>[i(g(t),{ref_key:`live2dCanvasRef`,ref:b,width:n,height:r,resolution:3,"rounded-full":``},{default:u(({app:t})=>[i(g(e),{ref_key:`live2dModelRef`,ref:x,app:t,width:n,height:r,"focus-at":{x:n/2,y:r/2},onModelLoaded:E},null,8,[`app`,`width`,`height`,`focus-at`])]),_:2},1032,[`width`,`height`])]),_:1})]),f(`div`,null,[m(f(`select`,{"onUpdate:modelValue":s[0]||=e=>S.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:s[1]||=e=>T(S.value)},[(o(!0),d(h,null,p(C.value,e=>(o(),d(`option`,{key:e.motionIndex,value:e.motionName},l(e.fileName),9,y))),128))],544),[[r,S.value]])]),f(`div`,{border:`2px solid white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[f(`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-DAWTpKmJ.js b/assets/providers-CVExW2Kb.js similarity index 58% rename from assets/providers-DAWTpKmJ.js rename to assets/providers-CVExW2Kb.js index d89ded15499bcc1a4eca8e263509d747ed94028e..f780ba7185f4a67144c6c8f3d53e495a85f5de1f 100644 --- a/assets/providers-DAWTpKmJ.js +++ b/assets/providers-CVExW2Kb.js @@ -1 +1 @@ -import{a6 as e,aL as t,ag as n,d0 as r,d3 as i,d4 as a,d8 as o,dE as s,da as c,db as l,df as u,dg as d,di as f,dl as p,dn as m,do as h,dy as g,z as _}from"./index-BOKBAzT0.js";import{b as v}from"./route-block-D_qNAUXY.js";import{b as y}from"./IconAnimation-CJRikR53.js";import{b}from"./icon-animation-Cj5BOBLD.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-1 sm:cols-2 xl:cols-3 gap-4`},O={flex:`~ row items-center gap-2`,"my-5":``},k={text:`neutral-300 dark:neutral-500`},A={grid:`~ cols-1 sm:cols-2 xl:cols-3 gap-4`},j={flex:`~ row items-center gap-2`,"my-5":``},M={text:`neutral-300 dark:neutral-500`},N={grid:`~ cols-1 sm:cols-2 xl:cols-3 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=o({__name:`index`,setup(o){let{t:v}=e(),F=_(),{allChatProvidersMetadata:I,allAudioSpeechProvidersMetadata:L,allAudioTranscriptionProvidersMetadata:R}=t(F),{iconAnimationStarted:z,showIconAnimation:B,animationIcon:V}=b(`i-solar:box-minimalistic-bold-duotone`);return(e,t)=>{let o=m(`i18n-t`),_=i(`motion`);return a(),l(h,null,[u(`div`,x,[u(`div`,S,[u(`div`,C,s(e.$t(`settings.pages.providers.helpinfo.title`)),1),u(`div`,w,[r(o,{keypath:`settings.pages.providers.helpinfo.description`},{chat:c(()=>t[0]||=[u(`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`},[u(`div`,{class:`i-solar:chat-square-like-bold-duotone`}),u(`strong`,{class:`font-semibold`},`Chat`)],-1)]),_:1})])]),u(`div`,T,[t[2]||=u(`div`,{"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),u(`div`,null,[u(`div`,null,[u(`span`,E,s(g(v)(`settings.pages.providers.explained.chat`)),1)]),t[1]||=u(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[u(`div`,null,` Chat `)],-1)])]),u(`div`,D,[(a(!0),l(h,null,d(g(I),(e,t)=>p((a(),f(g(n),{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`])),[[_]])),128))]),u(`div`,O,[t[4]||=u(`div`,{"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),u(`div`,null,[u(`div`,null,[u(`span`,k,s(g(v)(`settings.pages.providers.explained.Speech`)),1)]),t[3]||=u(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[u(`div`,null,` Speech `)],-1)])]),u(`div`,A,[(a(!0),l(h,null,d(g(L),(e,t)=>p((a(),f(g(n),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(g(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`])),[[_]])),128))]),u(`div`,j,[t[6]||=u(`div`,{"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),u(`div`,null,[u(`div`,null,[u(`span`,M,s(g(v)(`settings.pages.providers.explained.Transcription`)),1)]),t[5]||=u(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[u(`div`,null,` Transcription `)],-1)])]),u(`div`,N,[(a(!0),l(h,null,d(g(R),(e,t)=>p((a(),f(g(n),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(g(I).length+g(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`])),[[_]])),128))])]),g(B)?(a(),f(y,{key:0,"z-index":-1,icon:g(V),"icon-size":12,duration:1e3,started:g(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`])):p((a(),l(`div`,P,t[7]||=[u(`div`,{text:`60`,"i-solar:box-minimalistic-bold-duotone":``},null,-1)])),[[_]])],64)}}});typeof v==`function`&&v(F);var I=F;export{I as default}; \ No newline at end of file +import{a3 as e,aL as t,ad as n,d3 as r,d5 as i,d6 as a,dG as o,da as s,db as c,dd as l,dg as u,di as d,dj as f,do as p,dr as m,ds as h,dv as g,w as _}from"./index-K-hxNScn.js";import{b as v}from"./route-block-D_qNAUXY.js";import{b as y}from"./IconAnimation-DBKHapUf.js";import{b}from"./icon-animation-DYW3c7je.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-1 sm:cols-2 xl:cols-3 gap-4`},O={flex:`~ row items-center gap-2`,"my-5":``},k={text:`neutral-300 dark:neutral-500`},A={grid:`~ cols-1 sm:cols-2 xl:cols-3 gap-4`},j={flex:`~ row items-center gap-2`,"my-5":``},M={text:`neutral-300 dark:neutral-500`},N={grid:`~ cols-1 sm:cols-2 xl:cols-3 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=r({__name:`index`,setup(r){let{t:v}=e(),F=_(),{allChatProvidersMetadata:I,allAudioSpeechProvidersMetadata:L,allAudioTranscriptionProvidersMetadata:R}=t(F),{iconAnimationStarted:z,showIconAnimation:B,animationIcon:V}=b(`i-solar:box-minimalistic-bold-duotone`);return(e,t)=>{let r=d(`i18n-t`),_=m(`motion`);return h(),a(f,null,[s(`div`,x,[s(`div`,S,[s(`div`,C,o(e.$t(`settings.pages.providers.helpinfo.title`)),1),s(`div`,w,[p(r,{keypath:`settings.pages.providers.helpinfo.description`},{chat:i(()=>t[0]||=[s(`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`},[s(`div`,{class:`i-solar:chat-square-like-bold-duotone`}),s(`strong`,{class:`font-semibold`},`Chat`)],-1)]),_:1})])]),s(`div`,T,[t[2]||=s(`div`,{"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),s(`div`,null,[s(`div`,null,[s(`span`,E,o(g(v)(`settings.pages.providers.explained.chat`)),1)]),t[1]||=s(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[s(`div`,null,` Chat `)],-1)])]),s(`div`,D,[(h(!0),a(f,null,c(g(I),(e,t)=>u((h(),l(g(n),{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`])),[[_]])),128))]),s(`div`,O,[t[4]||=s(`div`,{"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),s(`div`,null,[s(`div`,null,[s(`span`,k,o(g(v)(`settings.pages.providers.explained.Speech`)),1)]),t[3]||=s(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[s(`div`,null,` Speech `)],-1)])]),s(`div`,A,[(h(!0),a(f,null,c(g(L),(e,t)=>u((h(),l(g(n),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(g(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`])),[[_]])),128))]),s(`div`,j,[t[6]||=s(`div`,{"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),s(`div`,null,[s(`div`,null,[s(`span`,M,o(g(v)(`settings.pages.providers.explained.Transcription`)),1)]),t[5]||=s(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[s(`div`,null,` Transcription `)],-1)])]),s(`div`,N,[(h(!0),a(f,null,c(g(R),(e,t)=>u((h(),l(g(n),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(g(I).length+g(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`])),[[_]])),128))])]),g(B)?(h(),l(y,{key:0,"z-index":-1,icon:g(V),"icon-size":12,duration:1e3,started:g(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`])):u((h(),a(`div`,P,t[7]||=[s(`div`,{text:`60`,"i-solar:box-minimalistic-bold-duotone":``},null,-1)])),[[_]])],64)}}});typeof v==`function`&&v(F);var I=F;export{I as default}; \ No newline at end of file diff --git a/assets/queue-BhuYf-bb.js b/assets/queue-xOIEiTzT.js similarity index 77% rename from assets/queue-BhuYf-bb.js rename to assets/queue-xOIEiTzT.js index e24b24c05fcbb0ae2b9d3872e01416abaf605694..dd8b3a4553565871c8db6996d2b534e800a3fd97 100644 --- a/assets/queue-BhuYf-bb.js +++ b/assets/queue-xOIEiTzT.js @@ -1 +1 @@ -import{T as e,W as t,d4 as n,d6 as r,d8 as i,dD as a,db as o,df as s}from"./index-BOKBAzT0.js";var c=i({__name:`queue`,setup(i){let c=a(``),l=e({handlers:[async e=>{console.log(`ready to play speech audio for`,e)}]}),u=e({handlers:[async e=>{console.log(`ready to stream speech audio for`,e),l.add(e.data)}]}),d=e({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 t(100),d.add(e)}async function m(){p()}return r(()=>{m()}),(e,t)=>(n(),o(`div`,null,t[0]||=[s(`div`,null,null,-1)]))}}),l=c;export{l as default}; \ No newline at end of file +import{Q as e,T as t,d1 as n,d3 as r,d6 as i,dA as a,da as o,ds as s}from"./index-K-hxNScn.js";var c=r({__name:`queue`,setup(r){let c=a(``),l=e({handlers:[async e=>{console.log(`ready to play speech audio for`,e)}]}),u=e({handlers:[async e=>{console.log(`ready to stream speech audio for`,e),l.add(e.data)}]}),d=e({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 t(100),d.add(e)}async function m(){p()}return n(()=>{m()}),(e,t)=>(s(),i(`div`,null,t[0]||=[o(`div`,null,null,-1)]))}}),l=c;export{l as default}; \ No newline at end of file diff --git a/assets/scene-CjpP1VIb.js b/assets/scene-CjpP1VIb.js deleted file mode 100644 index f117c2db680bbb66db78c6e2cb8ba002e2dbf411..0000000000000000000000000000000000000000 --- a/assets/scene-CjpP1VIb.js +++ /dev/null @@ -1 +0,0 @@ -import{av as e,d0 as t,d3 as n,d4 as r,d5 as i,d8 as a,da as o,db as s,df as c,di as l,dl as u,do as d,dy as f}from"./index-BOKBAzT0.js";import{b as p}from"./route-block-D_qNAUXY.js";import{b as m}from"./IconAnimation-CJRikR53.js";import{b as h}from"./icon-animation-Cj5BOBLD.js";const g={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 _=a({__name:`index`,setup(a){let{iconAnimationStarted:p,showIconAnimation:_,animationIcon:v}=h(`i-solar:armchair-2-bold-duotone`);return(a,h)=>{let y=n(`motion`);return r(),s(d,null,[c(`div`,null,[t(f(e),{label:`In development, needs your help!`,theme:`orange`},{default:o(()=>h[0]||=[c(`div`,null,[i(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),c(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),i(`. The source code of this page is located at `),c(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/scene/index.vue`},`here`),i(`. `)],-1)]),_:1,__:[0]})]),f(_)?(r(),l(m,{key:0,"z-index":-1,icon:f(v),"icon-size":12,duration:1e3,started:f(p),"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`])):u((r(),s(`div`,g,h[1]||=[c(`div`,{text:`60`,"i-solar:armchair-2-bold-duotone":``},null,-1)])),[[y]])],64)}}});typeof p==`function`&&p(_);var v=_;export{v as default}; \ No newline at end of file diff --git a/assets/scene-DsHsIafe.js b/assets/scene-DsHsIafe.js new file mode 100644 index 0000000000000000000000000000000000000000..5c5e833222ec2a29792be7572aaba696366d97e5 --- /dev/null +++ b/assets/scene-DsHsIafe.js @@ -0,0 +1 @@ +import{at as e,d0 as t,d3 as n,d5 as r,d6 as i,da as a,dd as o,dg as s,dj as c,do as l,dr as u,ds as d,dv as f}from"./index-K-hxNScn.js";import{b as p}from"./route-block-D_qNAUXY.js";import{b as m}from"./IconAnimation-DBKHapUf.js";import{b as h}from"./icon-animation-DYW3c7je.js";const g={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 _=n({__name:`index`,setup(n){let{iconAnimationStarted:p,showIconAnimation:_,animationIcon:v}=h(`i-solar:armchair-2-bold-duotone`);return(n,h)=>{let y=u(`motion`);return d(),i(c,null,[a(`div`,null,[l(f(e),{label:`In development, needs your help!`,theme:`orange`},{default:r(()=>h[0]||=[a(`div`,null,[t(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),a(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),t(`. The source code of this page is located at `),a(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/scene/index.vue`},`here`),t(`. `)],-1)]),_:1,__:[0]})]),f(_)?(d(),o(m,{key:0,"z-index":-1,icon:f(v),"icon-size":12,duration:1e3,started:f(p),"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`])):s((d(),i(`div`,g,h[1]||=[a(`div`,{text:`60`,"i-solar:armchair-2-bold-duotone":``},null,-1)])),[[y]])],64)}}});typeof p==`function`&&p(_);var v=_;export{v as default}; \ No newline at end of file diff --git a/assets/settings-XLQSFV-w.js b/assets/settings-DlFH7AgC.js similarity index 75% rename from assets/settings-XLQSFV-w.js rename to assets/settings-DlFH7AgC.js index 2cc16ef60273feca41698b02a36df7d310bf2450..e1d737a083d4c357eff65f914c9a4af8062d6d9e 100644 --- a/assets/settings-XLQSFV-w.js +++ b/assets/settings-DlFH7AgC.js @@ -1 +1 @@ -import{c as e,d as t}from"./theme-color-aSfOfY8M.js";import{a6 as n,aH as r,aJ as i,aL as a,aU as o,au as s,d0 as c,d2 as l,d4 as u,d6 as d,d8 as f,db as p,df as m,dp as h,dy as g,z as _}from"./index-BOKBAzT0.js";import{b as v}from"./HeaderLink-DoEHmasi.js";const y={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":``,"w-full":``},b={class:`px-0 py-1 hidden sm:block md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},x={class:`h-full px-3 py-0 sm:h-[calc(100%-4rem)] md:py-0 xl:px-0`,flex:`~ col`,"mx-auto":``,"max-w-screen-xl":``};var S=f({__name:`settings`,setup(f){let S=r(),C=o(),{t:w}=n(),T=_(),{allProvidersMetadata:E}=a(T),D=h(()=>{let e={"/settings/airi-card":{subtitle:w(`settings.title`),title:w(`settings.pages.card.title`)},"/settings/appearance":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.title`)},"/settings/appearance/general":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.general.title`)},"/settings/appearance/color-scheme":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.color-scheme.title`)},"/settings/appearance/developer":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.developer.title`)},"/settings/memory":{subtitle:w(`settings.title`),title:w(`settings.pages.memory.title`)},"/settings/models":{subtitle:w(`settings.title`),title:w(`settings.pages.models.title`)},"/settings/modules":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.title`)},"/settings/modules/consciousness":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.consciousness.title`)},"/settings/modules/speech":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.speech.title`)},"/settings/modules/hearing":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.hearing.title`)},"/settings/modules/memory-short-term":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.memory-short-term.title`)},"/settings/modules/memory-long-term":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.memory-long-term.title`)},"/settings/modules/messaging-discord":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.messaging-discord.title`)},"/settings/modules/x":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.x.title`)},"/settings/modules/gaming-minecraft":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.gaming-minecraft.title`)},"/settings/modules/gaming-factorio":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.gaming-factorio.title`)},"/settings/providers":{subtitle:w(`settings.title`),title:w(`settings.pages.providers.title`)},"/settings/scene":{subtitle:w(`settings.title`),title:w(`settings.pages.scene.title`)},"/settings":{title:w(`settings.title`)}};for(let t of E.value)e[`/settings/providers/${t.id}`]={subtitle:w(`settings.title`),title:w(t.nameKey)};return e}),O=h(()=>D.value[S.path]),{updateThemeColor:k}=t(e({light:`rgb(255 255 255)`,dark:`rgb(18 18 18)`}));return l(C,()=>k(),{immediate:!0}),l(S,()=>k(),{immediate:!0}),d(()=>k()),(e,t)=>(u(),p(`div`,y,[m(`div`,b,[c(v)]),m(`div`,x,[c(g(s),{title:O.value?.title,subtitle:O.value?.subtitle},null,8,[`title`,`subtitle`]),c(g(i))])]))}}),C=S;export{C as default}; \ No newline at end of file +import{b as e,d as t}from"./theme-color-B66QzWnt.js";import{a3 as n,aH as r,aJ as i,aL as a,aR as o,as as s,d1 as c,d3 as l,d6 as u,da as d,dk as f,do as p,dq as m,ds as h,dv as g,w as _}from"./index-K-hxNScn.js";import{b as v}from"./HeaderLink-DJwpVSTp.js";const y={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":``,"w-full":``},b={class:`px-0 py-1 hidden sm:block md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},x={class:`h-full px-3 py-0 sm:h-[calc(100%-4rem)] md:py-0 xl:px-0`,flex:`~ col`,"mx-auto":``,"max-w-screen-xl":``};var S=l({__name:`settings`,setup(l){let S=r(),C=o(),{t:w}=n(),T=_(),{allProvidersMetadata:E}=a(T),D=f(()=>{let e={"/settings/airi-card":{subtitle:w(`settings.title`),title:w(`settings.pages.card.title`)},"/settings/appearance":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.title`)},"/settings/appearance/general":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.general.title`)},"/settings/appearance/color-scheme":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.color-scheme.title`)},"/settings/appearance/developer":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.developer.title`)},"/settings/memory":{subtitle:w(`settings.title`),title:w(`settings.pages.memory.title`)},"/settings/models":{subtitle:w(`settings.title`),title:w(`settings.pages.models.title`)},"/settings/modules":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.title`)},"/settings/modules/consciousness":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.consciousness.title`)},"/settings/modules/speech":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.speech.title`)},"/settings/modules/hearing":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.hearing.title`)},"/settings/modules/memory-short-term":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.memory-short-term.title`)},"/settings/modules/memory-long-term":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.memory-long-term.title`)},"/settings/modules/messaging-discord":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.messaging-discord.title`)},"/settings/modules/x":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.x.title`)},"/settings/modules/gaming-minecraft":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.gaming-minecraft.title`)},"/settings/modules/gaming-factorio":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.gaming-factorio.title`)},"/settings/providers":{subtitle:w(`settings.title`),title:w(`settings.pages.providers.title`)},"/settings/scene":{subtitle:w(`settings.title`),title:w(`settings.pages.scene.title`)},"/settings":{title:w(`settings.title`)}};for(let t of E.value)e[`/settings/providers/${t.id}`]={subtitle:w(`settings.title`),title:w(t.nameKey)};return e}),O=f(()=>D.value[S.path]),{updateThemeColor:k}=e(t({light:`rgb(255 255 255)`,dark:`rgb(18 18 18)`}));return m(C,()=>k(),{immediate:!0}),m(S,()=>k(),{immediate:!0}),c(()=>k()),(e,t)=>(h(),u(`div`,y,[d(`div`,b,[p(v)]),d(`div`,x,[p(g(s),{title:O.value?.title,subtitle:O.value?.subtitle},null,8,[`title`,`subtitle`]),p(g(i))])]))}}),C=S;export{C as default}; \ No newline at end of file diff --git a/assets/settings-BRiQ-TKp.js b/assets/settings-FSKP6s04.js similarity index 58% rename from assets/settings-BRiQ-TKp.js rename to assets/settings-FSKP6s04.js index 1ceb224782071a741147008ddceb88d9f249f518..b5fe4909f59965c1e7ca03052771f91a825ce09f 100644 --- a/assets/settings-BRiQ-TKp.js +++ b/assets/settings-FSKP6s04.js @@ -1 +1 @@ -import{a6 as e,aG as t,ah as n,d3 as r,d4 as i,d7 as a,d8 as o,dD as s,dG as c,db as l,df as u,dg as d,di as f,dl as p,do as m,dp as h,dy as g,t as _}from"./index-BOKBAzT0.js";import{b as v}from"./route-block-D_qNAUXY.js";import{b as y}from"./IconAnimation-CJRikR53.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=o({__name:`index`,setup(o){let v=t(),w=s(!1),T=s(),E=s(),{t:D}=e(),O=s(``),k=s(``),A=s(!1),j=_();function M(){E.value?.()}async function N(e,t){let n=e.currentTarget,r=n.querySelector(`.menu-icon-item-icon`);if(!r)return;let i=r.getBoundingClientRect(),o=`${i.left}px, ${i.top}px`;O.value=t.icon,k.value=o,A.value=!0,await a(),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=h(()=>[{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(e,t)=>{let a=r(`motion`);return i(),l(`div`,b,[t[0]||=u(`div`,null,null,-1),u(`div`,x,[(i(!0),l(m,null,d(F.value,(e,t)=>p((i(),f(g(n),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:c({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`])),[[a]])),128))]),A.value&&!g(j).disableTransitions&&g(j).usePageSpecificTransitions?(i(),f(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`])):p((i(),l(`div`,S,[p(u(`div`,C,null,512),[[a]])])),[[a]])])}}});typeof v==`function`&&v(w);var T=w;export{T as default}; \ No newline at end of file +import{a3 as e,aG as t,ae as n,d2 as r,d3 as i,d6 as a,dA as o,dI as s,da as c,db as l,dd as u,dg as d,dj as f,dk as p,dr as m,ds as h,dv as g,q as _}from"./index-K-hxNScn.js";import{b as v}from"./route-block-D_qNAUXY.js";import{b as y}from"./IconAnimation-DBKHapUf.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=i({__name:`index`,setup(i){let v=t(),w=o(!1),T=o(),E=o(),{t:D}=e(),O=o(``),k=o(``),A=o(!1),j=_();function M(){E.value?.()}async function N(e,t){let n=e.currentTarget,i=n.querySelector(`.menu-icon-item-icon`);if(!i)return;let a=i.getBoundingClientRect(),o=`${a.left}px, ${a.top}px`;O.value=t.icon,k.value=o,A.value=!0,await r(),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=p(()=>[{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(e,t)=>{let r=m(`motion`);return h(),a(`div`,b,[t[0]||=c(`div`,null,null,-1),c(`div`,x,[(h(!0),a(f,null,l(F.value,(e,t)=>d((h(),u(g(n),{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`])),[[r]])),128))]),A.value&&!g(j).disableTransitions&&g(j).usePageSpecificTransitions?(h(),u(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`])):d((h(),a(`div`,S,[d(c(`div`,C,null,512),[[r]])])),[[r]])])}}});typeof v==`function`&&v(w);var T=w;export{T as default}; \ No newline at end of file diff --git a/assets/speech-DWhc1XoS.js b/assets/speech-DWhc1XoS.js deleted file mode 100644 index 9eed0364adc6e675b912935028a70d14d16ccb3f..0000000000000000000000000000000000000000 --- a/assets/speech-DWhc1XoS.js +++ /dev/null @@ -1 +0,0 @@ -import"./Basic-6PI1-eSd.js";import{b as e}from"./Textarea-vIof96sl.js";import{_ as ee,a6 as t,aD as n,aI as r,aL as i,aa as a,ad as te,ae as ne,af as re,ap as o,ar as ie,as as s,cT as ae,cU as oe,d0 as c,d2 as se,d3 as ce,d4 as l,d6 as le,d8 as ue,d9 as u,dB as d,dD as f,dE as p,dF as de,da as m,db as h,dd as fe,df as g,dg as pe,di as _,dl as v,do as y,dy as b,x as me,z as he}from"./index-BOKBAzT0.js";import{b as x}from"./route-block-D_qNAUXY.js";const ge={flex:`~ col md:row gap-6`},_e={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`w-full md:w-[40%]`},ve={flex:`~ col gap-4`},ye={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},be={text:`neutral-400 dark:neutral-500`},xe={"max-w-full":``},Se={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},Ce={key:1},we={key:0},Te={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=ue({__name:`speech`,setup(ue){let{t:x}=t(),A=he(),j=me(),{configuredSpeechProvidersMetadata:M}=i(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}=i(j),G=f(``),K=f(!1),q=f(`Hello, my name is AI Assistant`),J=f(``),Y=f(!1),X=f(``),Z=f(null),Q=f(``);le(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 ee({...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=``)}fe(()=>{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,t)=>{let i=ce(`motion`);return l(),h(y,null,[g(`div`,ge,[g(`div`,_e,[g(`div`,null,[g(`div`,ve,[g(`div`,null,[g(`h2`,ye,p(b(x)(`settings.pages.modules.speech.sections.section.provider-voice-selection.title`)),1),g(`div`,be,[g(`span`,null,p(b(x)(`settings.pages.modules.speech.sections.section.provider-voice-selection.description`)),1)])]),g(`div`,xe,[b(M).length>0?(l(),h(`fieldset`,Se,[(l(!0),h(y,null,pe(b(M),e=>(l(),_(b(ne),{id:e.id,key:e.id,modelValue:b(N),"onUpdate:modelValue":t[0]||=e=>d(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))])):(l(),h(`div`,Ce,[c(b(r),{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:m(()=>t[13]||=[g(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),g(`div`,{class:`flex flex-col`},[g(`span`,{class:`font-medium`},`No Speech Providers Configured`),g(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your speech providers`)],-1),g(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[13]})]))])]),g(`div`,null,[b(N)&&b(et)?(l(),h(`div`,we,[g(`div`,Te,[g(`div`,null,[g(`h2`,S,p(b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),g(`div`,C,[g(`span`,null,p(b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),b(z)?(l(),h(`div`,w,[t[14]||=g(`div`,{class:`mr-2 animate-spin`},[g(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),g(`span`,null,p(b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):b(B)?(l(),h(`div`,T,[t[15]||=g(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),g(`div`,E,[g(`span`,D,p(b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),g(`span`,O,p(b(B)),1)])])):b(R).length===0&&!b(z)?(l(),h(`div`,Ee,[t[16]||=g(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),g(`div`,De,[g(`span`,Oe,p(b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),g(`span`,ke,p(b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):b(R).length>0?(l(),_(b(re),{key:3,modelValue:b(P),"onUpdate:modelValue":t[1]||=e=>d(P)?P.value=e:null,"search-query":b(V),"onUpdate:searchQuery":t[2]||=e=>d(V)?V.value=e:null,items:b(R),searchable:!0,"search-placeholder":b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:b(V)}),"search-results-text":b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":b(x)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":b(x)(`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`])):u(``,!0)])])):u(``,!0)])]),b(N)?(l(),h(`div`,Ae,[g(`div`,je,[t[27]||=g(`div`,null,[g(`h2`,{class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},` Voice Configuration `),g(`div`,{text:`neutral-400 dark:neutral-500`},[g(`span`,null,`Customize how your AI assistant speaks`)])],-1),b($e)?(l(),h(`div`,Me,[g(`div`,Ne,[c(b(a),{class:`w-full rounded-lg p-2.5 text-sm`},{default:m(()=>t[17]||=[g(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[17]}),g(`div`,Pe,[c(b(a),{class:`w-full rounded-lg p-4 text-sm`},{default:m(()=>t[18]||=[g(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[18]}),c(b(a),{class:`w-full rounded-lg p-4 text-sm`},{default:m(()=>t[19]||=[g(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[19]}),c(b(a),{class:`w-full rounded-lg p-4 text-sm`},{default:m(()=>t[20]||=[g(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[20]})]),c(b(a),{class:`w-full rounded-lg p-3 text-sm`},{default:m(()=>t[21]||=[g(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[21]})])])):b(W)[b(N)]&&b(W)[b(N)].length>0?(l(),h(`div`,Fe,[c(b(te),{"search-query":G.value,"onUpdate:searchQuery":t[3]||=e=>G.value=e,"voice-id":b(I),"onUpdate:voiceId":t[4]||=e=>d(I)?I.value=e:null,voices:b(W)[b(N)]?.map(e=>({id:e.id,name:e.name,description:e.description,previewURL:e.previewURL,customizable:!1})),searchable:!0,"search-placeholder":b(x)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder`),"search-no-results-title":b(x)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices`),"search-no-results-description":b(x)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description`),"search-results-text":b(x)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results`,{count:0,total:0}),"custom-input-placeholder":b(x)(`settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder`),"expand-button-text":b(x)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_more`),"collapse-button-text":b(x)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_less`),"play-button-text":b(x)(`settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample`),"pause-button-text":b(x)(`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`])])):b(H)?(l(),h(`div`,Ie,[t[23]||=g(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),g(`div`,Le,[t[22]||=g(`span`,{class:`font-medium`},`Error loading voices`,-1),g(`span`,Re,p(b(H)),1)])])):(l(),h(`div`,ze,t[24]||=[g(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),g(`div`,{class:`flex flex-col`},[g(`span`,{class:`font-medium`},`No voices available`),g(`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)])),g(`div`,Be,[c(b(o),{modelValue:b(L),"onUpdate:modelValue":t[5]||=e=>d(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`]),c(b(s),{modelValue:b(U),"onUpdate:modelValue":t[6]||=e=>d(U)?U.value=e:null,label:`Enable SSML`,description:`Enable Speech Synthesis Markup Language for more control over speech output`},null,8,[`modelValue`])]),!b(W)[b(N)]||b(W)[b(N)].length===0?(l(),h(`div`,Ve,[c(b(ie),{modelValue:b(I),"onUpdate:modelValue":t[7]||=e=>d(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`]),b(N)===`elevenlabs`?(l(),h(`div`,He,[t[26]||=g(`label`,{class:`mb-1 block text-sm font-medium`},` Model `,-1),v(g(`select`,{"onUpdate:modelValue":t[8]||=e=>d(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`},t[25]||=[g(`option`,{value:`eleven_monolingual_v1`},` Monolingual v1 `,-1),g(`option`,{value:`eleven_multilingual_v1`},` Multilingual v1 `,-1),g(`option`,{value:`eleven_multilingual_v2`},` Multilingual v2 `,-1)],512),[[ae,b(P)]])])):u(``,!0),g(`div`,Ue,[c(b(o),{modelValue:b(L),"onUpdate:modelValue":t[9]||=e=>d(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`])])])):u(``,!0)])])):u(``,!0)]),g(`div`,We,[g(`div`,Ge,[g(`h2`,k,[g(`div`,Ke,[c(b(n)),g(`div`,null,p(b(x)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),g(`div`,qe,[c(b(s),{modelValue:K.value,"onUpdate:modelValue":t[10]||=e=>K.value=e,label:`Use Custom SSML`,description:`Enable to input raw SSML instead of plain text`},null,8,[`modelValue`]),K.value?v((l(),h(`textarea`,{key:1,"onUpdate:modelValue":t[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]]):(l(),_(b(e),{key:0,modelValue:q.value,"onUpdate:modelValue":t[11]||=e=>q.value=e,"h-24":``,"w-full":``,placeholder:b(x)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`)},null,8,[`modelValue`,`placeholder`])),g(`div`,Je,[g(`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()||!b(F),class:de({"opacity-50 cursor-not-allowed":Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!b(F)}),bg:`neutral-700 dark:neutral-300`,onClick:tt},[g(`div`,Xe,[t[28]||=g(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),g(`span`,null,p(Y.value?b(x)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):b(x)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,Ye),X.value?(l(),h(`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:$},t[29]||=[g(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[g(`div`,{"i-solar:stop-circle-bold-duotone":``}),g(`span`,null,`Stop`)],-1)])):u(``,!0)]),X.value?(l(),h(`audio`,{key:2,ref_key:`audioPlayer`,ref:Z,src:X.value,controls:``,class:`mt-2 w-full`},null,8,Ze)):u(``,!0)])])])]),v((l(),h(`div`,Qe,t[30]||=[g(`div`,{text:`60`,"i-solar:user-speak-rounded-bold-duotone":``},null,-1)])),[[i]])],64)}}});typeof x==`function`&&x(A);var j=A;export{j as default}; \ No newline at end of file diff --git a/assets/speech-Dm3KkONO.js b/assets/speech-Dm3KkONO.js new file mode 100644 index 0000000000000000000000000000000000000000..06d823eb953a4c14f63b7ea03fc1fee34aa7ece9 --- /dev/null +++ b/assets/speech-Dm3KkONO.js @@ -0,0 +1 @@ +import"./Basic-1H4d_HIg.js";import{b as e}from"./Textarea-Bzx3P1JU.js";import{X as ee,a3 as t,a7 as n,aD as r,aI as te,aL as i,aa as ne,ab as re,ac as ie,am as a,ao as ae,aq as o,cX as oe,cZ as se,d1 as ce,d3 as le,d4 as s,d5 as c,d6 as l,d8 as ue,dA as u,dG as d,dH as de,da as f,db as fe,dd as p,dg as m,dj as h,do as g,dq as pe,dr as me,ds as _,dv as v,dy as y,u as he,w as ge}from"./index-K-hxNScn.js";import{b}from"./route-block-D_qNAUXY.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=le({__name:`speech`,setup(le){let{t:b}=t(),A=ge(),j=he(),{configuredSpeechProvidersMetadata:M}=i(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}=i(j),G=u(``),K=u(!1),q=u(`Hello, my name is AI Assistant`),J=u(``),Y=u(!1),X=u(``),Z=u(null),Q=u(``);ce(async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)}),pe(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 ee({...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=``)}ue(()=>{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,t)=>{let i=me(`motion`);return _(),l(h,null,[f(`div`,_e,[f(`div`,ve,[f(`div`,null,[f(`div`,ye,[f(`div`,null,[f(`h2`,be,d(v(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.title`)),1),f(`div`,xe,[f(`span`,null,d(v(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.description`)),1)])]),f(`div`,Se,[v(M).length>0?(_(),l(`fieldset`,Ce,[(_(!0),l(h,null,fe(v(M),e=>(_(),p(v(re),{id:e.id,key:e.id,modelValue:v(N),"onUpdate:modelValue":t[0]||=e=>y(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))])):(_(),l(`div`,we,[g(v(te),{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:c(()=>t[13]||=[f(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),f(`div`,{class:`flex flex-col`},[f(`span`,{class:`font-medium`},`No Speech Providers Configured`),f(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your speech providers`)],-1),f(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[13]})]))])]),f(`div`,null,[v(N)&&v(et)?(_(),l(`div`,Te,[f(`div`,x,[f(`div`,null,[f(`h2`,S,d(v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),f(`div`,C,[f(`span`,null,d(v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),v(z)?(_(),l(`div`,w,[t[14]||=f(`div`,{class:`mr-2 animate-spin`},[f(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),f(`span`,null,d(v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):v(B)?(_(),l(`div`,T,[t[15]||=f(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),f(`div`,E,[f(`span`,D,d(v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),f(`span`,O,d(v(B)),1)])])):v(R).length===0&&!v(z)?(_(),l(`div`,Ee,[t[16]||=f(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),f(`div`,De,[f(`span`,Oe,d(v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),f(`span`,ke,d(v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):v(R).length>0?(_(),p(v(ie),{key:3,modelValue:v(P),"onUpdate:modelValue":t[1]||=e=>y(P)?P.value=e:null,"search-query":v(V),"onUpdate:searchQuery":t[2]||=e=>y(V)?V.value=e:null,items:v(R),searchable:!0,"search-placeholder":v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:v(V)}),"search-results-text":v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":v(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":v(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`])):s(``,!0)])])):s(``,!0)])]),v(N)?(_(),l(`div`,Ae,[f(`div`,je,[t[27]||=f(`div`,null,[f(`h2`,{class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},` Voice Configuration `),f(`div`,{text:`neutral-400 dark:neutral-500`},[f(`span`,null,`Customize how your AI assistant speaks`)])],-1),v($e)?(_(),l(`div`,Me,[f(`div`,Ne,[g(v(n),{class:`w-full rounded-lg p-2.5 text-sm`},{default:c(()=>t[17]||=[f(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[17]}),f(`div`,Pe,[g(v(n),{class:`w-full rounded-lg p-4 text-sm`},{default:c(()=>t[18]||=[f(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[18]}),g(v(n),{class:`w-full rounded-lg p-4 text-sm`},{default:c(()=>t[19]||=[f(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[19]}),g(v(n),{class:`w-full rounded-lg p-4 text-sm`},{default:c(()=>t[20]||=[f(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[20]})]),g(v(n),{class:`w-full rounded-lg p-3 text-sm`},{default:c(()=>t[21]||=[f(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[21]})])])):v(W)[v(N)]&&v(W)[v(N)].length>0?(_(),l(`div`,Fe,[g(v(ne),{"search-query":G.value,"onUpdate:searchQuery":t[3]||=e=>G.value=e,"voice-id":v(I),"onUpdate:voiceId":t[4]||=e=>y(I)?I.value=e:null,voices:v(W)[v(N)]?.map(e=>({id:e.id,name:e.name,description:e.description,previewURL:e.previewURL,customizable:!1})),searchable:!0,"search-placeholder":v(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder`),"search-no-results-title":v(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices`),"search-no-results-description":v(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description`),"search-results-text":v(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results`,{count:0,total:0}),"custom-input-placeholder":v(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder`),"expand-button-text":v(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_more`),"collapse-button-text":v(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_less`),"play-button-text":v(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample`),"pause-button-text":v(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`])])):v(H)?(_(),l(`div`,Ie,[t[23]||=f(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),f(`div`,Le,[t[22]||=f(`span`,{class:`font-medium`},`Error loading voices`,-1),f(`span`,Re,d(v(H)),1)])])):(_(),l(`div`,ze,t[24]||=[f(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),f(`div`,{class:`flex flex-col`},[f(`span`,{class:`font-medium`},`No voices available`),f(`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)])),f(`div`,Be,[g(v(a),{modelValue:v(L),"onUpdate:modelValue":t[5]||=e=>y(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`]),g(v(o),{modelValue:v(U),"onUpdate:modelValue":t[6]||=e=>y(U)?U.value=e:null,label:`Enable SSML`,description:`Enable Speech Synthesis Markup Language for more control over speech output`},null,8,[`modelValue`])]),!v(W)[v(N)]||v(W)[v(N)].length===0?(_(),l(`div`,Ve,[g(v(ae),{modelValue:v(I),"onUpdate:modelValue":t[7]||=e=>y(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`]),v(N)===`elevenlabs`?(_(),l(`div`,He,[t[26]||=f(`label`,{class:`mb-1 block text-sm font-medium`},` Model `,-1),m(f(`select`,{"onUpdate:modelValue":t[8]||=e=>y(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`},t[25]||=[f(`option`,{value:`eleven_monolingual_v1`},` Monolingual v1 `,-1),f(`option`,{value:`eleven_multilingual_v1`},` Multilingual v1 `,-1),f(`option`,{value:`eleven_multilingual_v2`},` Multilingual v2 `,-1)],512),[[oe,v(P)]])])):s(``,!0),f(`div`,Ue,[g(v(a),{modelValue:v(L),"onUpdate:modelValue":t[9]||=e=>y(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`])])])):s(``,!0)])])):s(``,!0)]),f(`div`,We,[f(`div`,Ge,[f(`h2`,k,[f(`div`,Ke,[g(v(r)),f(`div`,null,d(v(b)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),f(`div`,qe,[g(v(o),{modelValue:K.value,"onUpdate:modelValue":t[10]||=e=>K.value=e,label:`Use Custom SSML`,description:`Enable to input raw SSML instead of plain text`},null,8,[`modelValue`]),K.value?m((_(),l(`textarea`,{key:1,"onUpdate:modelValue":t[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)),[[se,J.value]]):(_(),p(v(e),{key:0,modelValue:q.value,"onUpdate:modelValue":t[11]||=e=>q.value=e,"h-24":``,"w-full":``,placeholder:v(b)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`)},null,8,[`modelValue`,`placeholder`])),f(`div`,Je,[f(`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()||!v(F),class:de({"opacity-50 cursor-not-allowed":Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!v(F)}),bg:`neutral-700 dark:neutral-300`,onClick:tt},[f(`div`,Xe,[t[28]||=f(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),f(`span`,null,d(Y.value?v(b)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):v(b)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,Ye),X.value?(_(),l(`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:$},t[29]||=[f(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[f(`div`,{"i-solar:stop-circle-bold-duotone":``}),f(`span`,null,`Stop`)],-1)])):s(``,!0)]),X.value?(_(),l(`audio`,{key:2,ref_key:`audioPlayer`,ref:Z,src:X.value,controls:``,class:`mt-2 w-full`},null,8,Ze)):s(``,!0)])])])]),m((_(),l(`div`,Qe,t[30]||=[f(`div`,{text:`60`,"i-solar:user-speak-rounded-bold-duotone":``},null,-1)])),[[i]])],64)}}});typeof b==`function`&&b(A);var j=A;export{j as default}; \ No newline at end of file diff --git a/assets/stage-B5qiz8AC.js b/assets/stage-B5qiz8AC.js new file mode 100644 index 0000000000000000000000000000000000000000..51b59912564f3c780069ff88b75a755d238c9f29 --- /dev/null +++ b/assets/stage-B5qiz8AC.js @@ -0,0 +1 @@ +import{b as e}from"./Scenes-D5Bedj_D.js";import"./Basic-1H4d_HIg.js";import{aR as t,aZ as n,d3 as r,d5 as i,dA as a,da as o,dd as s,do as c,ds as l,dv as u}from"./index-K-hxNScn.js";import"./import-url-browser-VKajNDYM.js";import"./duckdb-mvp-CIsUbAtz.js";import"./HeaderLink-DJwpVSTp.js";import{b as d}from"./route-block-D_qNAUXY.js";import{b as f,c as p,d as m,e as h,f as g}from"./AnimatedWave-CMIzOsja.js";const _={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},v={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 (l(),s(g,null,{default:i(()=>[c(f,{"fill-color":u(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:i(()=>[o(`div`,_,[o(`div`,null,[c(h,{class:`flex`,p2:``})]),o(`div`,v,[c(u(e),{"flex-1":``,"min-w":`1/2`,paused:y.value,"focus-at":{x:u(x).x.value,y:u(x).y.value}},null,8,[`paused`,`focus-at`]),c(m,{class:`flex {let f=o(`RouterView`);return n(),a(`main`,{text:`gray-700 dark:gray-200`,"h-full":``,"font-cuteen":``,style:i({paddingTop:`${s(c)}px`,paddingRight:`${s(l)}px`,paddingBottom:`${s(u)}px`,paddingLeft:`${s(d)}px`})},[t(f)],4)}}}),l=c;export{l as default}; \ No newline at end of file diff --git a/assets/stage-GlmzKUmw.js b/assets/stage-GlmzKUmw.js deleted file mode 100644 index 5e6e50f1ac180d5efc0de3faeb3c1e7e72a50f59..0000000000000000000000000000000000000000 --- a/assets/stage-GlmzKUmw.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./Scenes-B8GWuxOy.js";import"./Basic-6PI1-eSd.js";import{aN as t,aU as n,d0 as r,d4 as i,d8 as a,dD as o,da as s,df as c,di as l,dy as u}from"./index-BOKBAzT0.js";import"./import-url-browser-VKajNDYM.js";import"./duckdb-mvp-CIsUbAtz.js";import"./HeaderLink-DoEHmasi.js";import{b as d}from"./route-block-D_qNAUXY.js";import{b as f,c as p,d as m,e as h,f as g}from"./AnimatedWave-DOvVQHan.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(),l(g,null,{default:s(()=>[r(f,{"fill-color":u(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:s(()=>[c(`div`,_,[c(`div`,null,[r(h,{class:`flex`,p2:``})]),c(`div`,v,[r(u(e),{"flex-1":``,"min-w":`1/2`,paused:y.value,"focus-at":{x:u(x).x.value,y:u(x).y.value}},null,8,[`paused`,`focus-at`]),r(m,{class:`flex {let f=i(`RouterView`);return o(),n(`main`,{text:`gray-700 dark:gray-200`,"h-full":``,"font-cuteen":``,style:r({paddingTop:`${s(c)}px`,paddingRight:`${s(l)}px`,paddingBottom:`${s(u)}px`,paddingLeft:`${s(d)}px`})},[a(f)],4)}}}),l=c;export{l as default}; \ No newline at end of file diff --git a/assets/sury-GtnkadyM-BJxUNG_3.js b/assets/sury-GtnkadyM-DKj7Iepm.js similarity index 71% rename from assets/sury-GtnkadyM-BJxUNG_3.js rename to assets/sury-GtnkadyM-DKj7Iepm.js index b629b27559b551b658265800b6ca8357f67a4077..a9b506dcf7534c5fbd3ad0f64b4ca94f7dd8129d 100644 --- a/assets/sury-GtnkadyM-BJxUNG_3.js +++ b/assets/sury-GtnkadyM-DKj7Iepm.js @@ -1 +1 @@ -import{D as e,aK as t}from"./index-BOKBAzT0.js";const n=async()=>{let{toJSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_sury_xsschema-YrGlhVoU.js`),[]),`sury`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{A as e,aK as t}from"./index-K-hxNScn.js";const n=async()=>{let{toJSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_sury_xsschema-YrGlhVoU.js`),[]),`sury`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/theme-color-aSfOfY8M.js b/assets/theme-color-B66QzWnt.js similarity index 99% rename from assets/theme-color-aSfOfY8M.js rename to assets/theme-color-B66QzWnt.js index 3b5c35d76f0c2bb8764ec36dac5c4e0a37198217..0b089c4660ac1dbb8c78e8df61ef9d3958d63390 100644 --- a/assets/theme-color-aSfOfY8M.js +++ b/assets/theme-color-B66QzWnt.js @@ -1 +1 @@ -import{W as e,X as t,aU as n}from"./index-BOKBAzT0.js";const r=async e=>{let t=await e();for(;t instanceof Function;)t=await t();return t},i={retry:3,retryCount:0,retryDelay:500},a=(n,o)=>{let{onError:s,retry:c,retryCount:l,retryDelay:u}=t(i,o),d=async(...t)=>{try{return await n(...t)}catch(r){if(s?.(r),la(n,{onError:s,retry:c,retryCount:l+1,retryDelay:u})(...t);throw r}};return async(...e)=>r(async()=>d(...e))};function o(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>{let n=0;if(!Array.isArray(e)){for(let r of t)n+=e*r;return n}for(let r=0;re[0]):a}function s(e){return c(e)===`string`}function c(e){let t=Object.prototype.toString.call(e);return(t.match(/^\[object\s+(.*?)\]$/)[1]||``).toLowerCase()}function l(e,{precision:t,unit:n}){return u(e)?`none`:f(e,t)+(n??``)}function u(e){return Number.isNaN(e)||e instanceof Number&&e?.none}function d(e){return u(e)?0:e}function f(e,t){if(e===0)return 0;let n=~~e,r=0;n&&t&&(r=~~Math.log10(Math.abs(n))+1);let i=10**(t-r);return Math.floor(e*i+.5)/i}const p={deg:1,grad:.9,rad:180/Math.PI,turn:360};function m(e){if(!e)return;e=e.trim();let t=/^([a-z]+)\((.+?)\)$/i,n=/^-?[\d.]+$/,r=/%|deg|g?rad|turn$/,i=/\/?\s*(none|[-\w.]+(?:%|deg|g?rad|turn)?)/g,a=e.match(t);if(a){let e=[];return a[2].replace(i,(t,i)=>{let a=i.match(r),o=i;if(a){let e=a[0],t=o.slice(0,-e.length);e===`%`?(o=new Number(t/100),o.type=``):(o=new Number(t*p[e]),o.type=``,o.unit=e)}else n.test(o)?(o=new Number(o),o.type=``):o===`none`&&(o=new Number(NaN),o.none=!0);t.startsWith(`/`)&&(o=o instanceof Number?o:new Number(o),o.alpha=!0),typeof o==`object`&&o instanceof Number&&(o.raw=i),e.push(o)}),{name:a[1].toLowerCase(),rawName:a[1],rawArgs:a[2],args:e}}}function h(e){return e[e.length-1]}function g(e,t,n){return isNaN(e)?t:isNaN(t)?e:e+(t-e)*n}function _(e,t,n){return(n-e)/(t-e)}function v(e,t,n){return g(t[0],t[1],_(e[0],e[1],n))}function y(e){return e.map(e=>e.split(`|`).map(e=>{e=e.trim();let t=e.match(/^(<[a-z]+>)\[(-?[.\d]+),\s*(-?[.\d]+)\]?$/);if(t){let e=new String(t[1]);return e.range=[+t[2],+t[3]],e}return e}))}function b(e,t,n){return Math.max(Math.min(n,t),e)}function x(e,t){return Math.sign(e)===Math.sign(t)?e:-e}function S(e,t){return x(Math.abs(e)**t,e)}function C(e,t){return t===0?0:e/t}function w(e,t,n=0,r=e.length){for(;n>1;e[i]`,``,``]);function A(e,t,n,r){let i=Object.entries(e.coords).map(([e,i],a)=>{let o=t.coordGrammar[a],s=r[a],c=s?.type,l;if(l=s.none?o.find(e=>ne.has(e)):o.find(e=>e==c),!l){let t=i.name||e;throw TypeError(`${c??s.raw} not allowed for ${t} in ${n}()`)}let u=l.range;c===``&&(u||=[0,1]);let d=i.range||i.refRange;return u&&d&&(r[a]=v(u,d,r[a])),l});return i}function re(e,{meta:t}={}){let n={str:String(e)?.trim()};if(E.run(`parse-start`,n),n.color)return n.color;if(n.parsed=m(n.str),n.parsed){let e=n.parsed.name;if(e===`color`){let e=n.parsed.args.shift(),r=e.startsWith(`--`)?e.substring(2):`--${e}`,i=[e,r],a=n.parsed.rawArgs.indexOf(`/`)>0?n.parsed.args.pop():1;for(let r of M.all){let o=r.getFormat(`color`);if(o&&(i.includes(o.id)||o.ids?.filter(e=>i.includes(e)).length)){let i=Object.keys(r.coords).map((e,t)=>n.parsed.args[t]||0),s;return o.coordGrammar&&(s=A(r,o,`color`,i)),t&&Object.assign(t,{formatId:`color`,types:s}),o.id.startsWith(`--`)&&!e.startsWith(`--`)&&D.warn(`${r.name} is a non-standard space and not currently supported in the CSS spec. Use prefixed color(${o.id}) instead of color(${e}).`),e.startsWith(`--`)&&!o.id.startsWith(`--`)&&D.warn(`${r.name} is a standard space and supported in the CSS spec. Use color(${o.id}) instead of prefixed color(${e}).`),{spaceId:r.id,coords:i,alpha:a}}}let o=``,s=e in M.registry?e:r;if(s in M.registry){let e=M.registry[s].formats?.color?.id;e&&(o=`Did you mean color(${e})?`)}throw TypeError(`Cannot parse color(${e}). `+(o||`Missing a plugin?`))}else for(let r of M.all){let i=r.getFormat(e);if(i&&i.type===`function`){let a=1;(i.lastAlpha||h(n.parsed.args).alpha)&&(a=n.parsed.args.pop());let o=n.parsed.args,s;return i.coordGrammar&&(s=A(r,i,e,o)),t&&Object.assign(t,{formatId:i.name,types:s}),{spaceId:r.id,coords:o,alpha:a}}}}else for(let e of M.all)for(let r in e.formats){let i=e.formats[r];if(i.type!==`custom`||i.test&&!i.test(n.str))continue;let a=i.parse(n.str);if(a)return a.alpha??=1,t&&(t.formatId=r),a}throw TypeError(`Could not parse ${e} as a color. Missing a plugin?`)}function j(e){if(Array.isArray(e))return e.map(j);if(!e)throw TypeError(`Empty color reference`);s(e)&&(e=re(e));let t=e.space||e.spaceId;return t instanceof M||(e.space=M.get(t)),e.alpha===void 0&&(e.alpha=1),e}const ie=75e-6;var M=class e{constructor(t){this.id=t.id,this.name=t.name,this.base=t.base?e.get(t.base):null,this.aliases=t.aliases,this.base&&(this.fromBase=t.fromBase,this.toBase=t.toBase);let n=t.coords??this.base.coords;for(let e in n)`name`in n[e]||(n[e].name=e);this.coords=n;let r=t.white??this.base.white??`D65`;for(let e in this.white=te(r),this.formats=t.formats??{},this.formats){let t=this.formats[e];t.type||=`function`,t.name||=e}this.formats.color?.id||(this.formats.color={...this.formats.color??{},id:t.cssId||this.id}),t.gamutSpace?this.gamutSpace=t.gamutSpace===`self`?this:e.get(t.gamutSpace):this.isPolar?this.gamutSpace=this.base:this.gamutSpace=this,this.gamutSpace.isUnbounded&&(this.inGamut=(e,t)=>!0),this.referred=t.referred,Object.defineProperty(this,`path`,{value:N(this).reverse(),writable:!1,enumerable:!0,configurable:!0}),E.run(`colorspace-init-end`,this)}inGamut(e,{epsilon:t=ie}={}){if(!this.equals(this.gamutSpace))return e=this.to(this.gamutSpace,e),this.gamutSpace.inGamut(e,{epsilon:t});let n=Object.values(this.coords);return e.every((e,r)=>{let i=n[r];if(i.type!==`angle`&&i.range){if(Number.isNaN(e))return!0;let[n,r]=i.range;return(n===void 0||e>=n-t)&&(r===void 0||e<=r+t)}return!0})}get isUnbounded(){return Object.values(this.coords).every(e=>!(`range`in e))}get cssId(){return this.formats?.color?.id||this.id}get isPolar(){for(let e in this.coords)if(this.coords[e].type===`angle`)return!0;return!1}getFormat(e){if(typeof e==`object`)return e=ae(e,this),e;let t;return t=e===`default`?Object.values(this.formats)[0]:this.formats[e],t?(t=ae(t,this),t):null}equals(e){return e?this===e||this.id===e||this.id===e.id:!1}to(t,n){if(arguments.length===1){let e=j(t);[t,n]=[e.space,e.coords]}if(t=e.get(t),this.equals(t))return n;n=n.map(e=>Number.isNaN(e)?0:e);let r=this.path,i=t.path,a,o;for(let e=0;eo;e--)n=r[e].toBase(n);for(let e=o+1;e=0){let e=Object.entries(i.coords)[a];if(e)return{space:i,id:e[0],index:a,...e[1]}}i=e.get(i);let o=a.toLowerCase(),s=0;for(let e in i.coords){let t=i.coords[e];if(e.toLowerCase()===o||t.name?.toLowerCase()===o)return{space:i,id:e,index:s,...t};s++}throw TypeError(`No "${a}" coordinate found in ${i.name}. Its coordinates are: ${Object.keys(i.coords).join(`, `)}`)}static DEFAULT_FORMAT={type:`functions`,name:`color`}};function N(e){let t=[e];for(let n=e;n=n.base;)t.push(n);return t}function ae(e,{coords:t}={}){if(e.coords&&!e.coordGrammar){e.type||=`function`,e.name||=`color`,e.coordGrammar=y(e.coords);let n=Object.entries(t).map(([t,n],r)=>{let i=e.coordGrammar[r][0],a=n.range||n.refRange,o=i.range,s=``;return i==``?(o=[0,100],s=`%`):i==``&&(s=`deg`),{fromRange:a,toRange:o,suffix:s}});e.serializeCoords=(e,t)=>e.map((e,r)=>{let{fromRange:i,toRange:a,suffix:o}=n[r];return i&&a&&(e=v(i,a,e)),e=l(e,{precision:t,unit:o}),e})}return e}var P=new M({id:`xyz-d65`,name:`XYZ D65`,coords:{x:{name:`X`},y:{name:`Y`},z:{name:`Z`}},white:`D65`,formats:{color:{ids:[`xyz-d65`,`xyz`]}},aliases:[`xyz`]}),F=class extends M{constructor(e){e.coords||={r:{range:[0,1],name:`Red`},g:{range:[0,1],name:`Green`},b:{range:[0,1],name:`Blue`}},e.base||=P,e.toXYZ_M&&e.fromXYZ_M&&(e.toBase??=t=>{let n=o(e.toXYZ_M,t);return this.white!==this.base.white&&(n=k(this.white,this.base.white,n)),n},e.fromBase??=t=>(t=k(this.base.white,this.white,t),o(e.fromXYZ_M,t))),e.referred??=`display`,super(e)}};function I(e,t){return e=j(e),!t||e.space.equals(t)?e.coords.slice():(t=M.get(t),t.from(e))}function L(e,t){e=j(e);let{space:n,index:r}=M.resolveCoord(t,e.space),i=I(e,n);return i[r]}function oe(e,t,n){return e=j(e),t=M.get(t),e.coords=t.to(e.space,n),e}oe.returns=`color`;function R(e,t,n){if(e=j(e),arguments.length===2&&c(arguments[1])===`object`){let t=arguments[1];for(let n in t)R(e,n,t[n])}else{typeof n==`function`&&(n=n(L(e,t)));let{space:r,index:i}=M.resolveCoord(t,e.space),a=I(e,r);a[i]=n,oe(e,r,a)}return e}R.returns=`color`;var se=new M({id:`xyz-d50`,name:`XYZ D50`,white:`D50`,base:P,fromBase:e=>k(P.white,`D50`,e),toBase:e=>k(`D50`,P.white,e)});const ce=216/24389,le=24/116,ue=24389/27;let de=O.D50;var z=new M({id:`lab`,name:`Lab`,coords:{l:{refRange:[0,100],name:`Lightness`},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:de,base:se,fromBase(e){let t=e.map((e,t)=>e/de[t]),n=t.map(e=>e>ce?Math.cbrt(e):(ue*e+16)/116);return[116*n[1]-16,500*(n[0]-n[1]),200*(n[1]-n[2])]},toBase(e){let t=[];t[1]=(e[0]+16)/116,t[0]=e[1]/500+t[1],t[2]=t[1]-e[2]/200;let n=[t[0]>le?t[0]**3:(116*t[0]-16)/ue,e[0]>8?((e[0]+16)/116)**3:e[0]/ue,t[2]>le?t[2]**3:(116*t[2]-16)/ue];return n.map((e,t)=>e*de[t])},formats:{lab:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});function B(e){return(e%360+360)%360}function fe(e,t){if(e===`raw`)return t;let[n,r]=t.map(B),i=r-n;return e===`increasing`?i<0&&(r+=360):e===`decreasing`?i>0&&(n+=360):e===`longer`?-1800?n+=360:r+=360):e===`shorter`&&(i>180?n+=360:i<-180&&(r+=360)),[n,r]}var pe=new M({id:`lch`,name:`LCH`,coords:{l:{refRange:[0,100],name:`Lightness`},c:{refRange:[0,150],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:z,fromBase(e){let[t,n,r]=e,i,a=.02;return i=Math.abs(n) | `,` | `,` | `]}}});const me=25**7,he=Math.PI,ge=180/he,V=he/180;function _e(e){let t=e*e,n=t*t*t*e;return n}function ve(e,t,{kL:n=1,kC:r=1,kH:i=1}={}){[e,t]=j([e,t]);let[a,o,s]=z.from(e),c=pe.from(z,[a,o,s])[1],[l,u,d]=z.from(t),f=pe.from(z,[l,u,d])[1];c<0&&(c=0),f<0&&(f=0);let p=(c+f)/2,m=_e(p),h=.5*(1-Math.sqrt(m/(m+me))),g=(1+h)*o,_=(1+h)*u,v=Math.sqrt(g**2+s**2),y=Math.sqrt(_**2+d**2),b=g===0&&s===0?0:Math.atan2(s,g),x=_===0&&d===0?0:Math.atan2(d,_);b<0&&(b+=2*he),x<0&&(x+=2*he),b*=ge,x*=ge;let S=l-a,C=y-v,w=x-b,T=b+x,ee=Math.abs(w),E;v*y===0?E=0:ee<=180?E=w:w>180?E=w-360:w<-180?E=w+360:D.warn(`the unthinkable has happened`);let O=2*Math.sqrt(y*v)*Math.sin(E*V/2),te=(a+l)/2,k=(v+y)/2,ne=_e(k),A;A=v*y===0?T:ee<=180?T/2:T<360?(T+360)/2:(T-360)/2;let re=(te-50)**2,ie=1+.015*re/Math.sqrt(20+re),M=1+.045*k,N=1;N-=.17*Math.cos((A-30)*V),N+=.24*Math.cos(2*A*V),N+=.32*Math.cos((3*A+6)*V),N-=.2*Math.cos((4*A-63)*V);let ae=1+.015*k*N,P=30*Math.exp(-1*((A-275)/25)**2),F=2*Math.sqrt(ne/(ne+me)),I=-1*Math.sin(2*P*V)*F,L=(S/(n*ie))**2;return L+=(C/(r*M))**2,L+=(O/(i*ae))**2,L+=I*(C/(r*M))*(O/(i*ae)),Math.sqrt(L)}const ye=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],be=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],xe=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],Se=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]];var H=new M({id:`oklab`,name:`Oklab`,coords:{l:{refRange:[0,1],name:`Lightness`},a:{refRange:[-.4,.4]},b:{refRange:[-.4,.4]}},white:`D65`,base:P,fromBase(e){let t=o(ye,e),n=t.map(e=>Math.cbrt(e));return o(xe,n)},toBase(e){let t=o(Se,e),n=t.map(e=>e**3);return o(be,n)},formats:{oklab:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});function Ce(e,t){[e,t]=j([e,t]);let[n,r,i]=H.from(e),[a,o,s]=H.from(t),c=n-a,l=r-o,u=i-s;return Math.sqrt(c**2+l**2+u**2)}const we=75e-6;function U(e,t,{epsilon:n=we}={}){e=j(e),t||=e.space,t=M.get(t);let r=e.coords;return t!==e.space&&(r=t.from(e)),t.inGamut(r,{epsilon:n})}function W(e){return{space:e.space,coords:e.coords.slice(),alpha:e.alpha}}function Te(e,t,n=`lab`){n=M.get(n);let r=n.from(e),i=n.from(t);return Math.sqrt(r.reduce((e,t,n)=>{let r=i[n];return isNaN(t)||isNaN(r)?e:e+(r-t)**2},0))}function Ee(e,t){return Te(e,t,`lab`)}const De=Math.PI,Oe=De/180;function ke(e,t,{l:n=2,c:r=1}={}){[e,t]=j([e,t]);let[i,a,o]=z.from(e),[,s,c]=pe.from(z,[i,a,o]),[l,u,d]=z.from(t),f=pe.from(z,[l,u,d])[1];s<0&&(s=0),f<0&&(f=0);let p=i-l,m=s-f,h=a-u,g=o-d,_=h**2+g**2-m**2,v=.511;i>=16&&(v=.040975*i/(1+.01765*i));let y=.0638*s/(1+.0131*s)+.638,b;Number.isNaN(c)&&(c=0),b=c>=164&&c<=345?.56+Math.abs(.2*Math.cos((c+168)*Oe)):.36+Math.abs(.4*Math.cos((c+35)*Oe));let x=s**4,S=Math.sqrt(x/(x+1900)),C=y*(S*b+1-S),w=(p/(n*v))**2;return w+=(m/(r*y))**2,w+=_/C**2,Math.sqrt(w)}const Ae=203;var je=new M({id:`xyz-abs-d65`,cssId:`--xyz-abs-d65`,name:`Absolute XYZ D65`,coords:{x:{refRange:[0,9504.7],name:`Xa`},y:{refRange:[0,1e4],name:`Ya`},z:{refRange:[0,10888.3],name:`Za`}},base:P,fromBase(e){return e.map(e=>Math.max(e*Ae,0))},toBase(e){return e.map(e=>Math.max(e/Ae,0))}});const Me=1.15,Ne=.66,Pe=2610/2**14,Fe=2**14/2610,Ie=3424/2**12,Le=2413/2**7,Re=2392/2**7,ze=1.7*2523/2**5,Be=2**5/(1.7*2523),Ve=-.56,He=16295499532821565e-27,Ue=[[.41478972,.579999,.014648],[-.20151,1.120649,.0531008],[-.0166008,.2648,.6684799]],We=[[1.9242264357876067,-1.0047923125953657,.037651404030618],[.35031676209499907,.7264811939316552,-.06538442294808501],[-.09098281098284752,-.3127282905230739,1.5227665613052603]],Ge=[[.5,.5,0],[3.524,-4.066708,.542708],[.199076,1.096799,-1.295875]],Ke=[[1,.1386050432715393,.05804731615611886],[.9999999999999999,-.1386050432715393,-.05804731615611886],[.9999999999999998,-.09601924202631895,-.8118918960560388]];var qe=new M({id:`jzazbz`,name:`Jzazbz`,coords:{jz:{refRange:[0,1],name:`Jz`},az:{refRange:[-.5,.5]},bz:{refRange:[-.5,.5]}},base:je,fromBase(e){let[t,n,r]=e,i=Me*t-(Me-1)*r,a=Ne*n-(Ne-1)*t,s=o(Ue,[i,a,r]),c=s.map(function(e){let t=Ie+Le*(e/1e4)**Pe,n=1+Re*(e/1e4)**Pe;return(t/n)**ze}),[l,u,d]=o(Ge,c),f=(1+Ve)*l/(1+Ve*l)-He;return[f,u,d]},toBase(e){let[t,n,r]=e,i=(t+He)/(1+Ve-Ve*(t+He)),a=o(Ke,[i,n,r]),s=a.map(function(e){let t=Ie-e**Be,n=Re*e**Be-Le,r=1e4*(t/n)**Fe;return r}),[c,l,u]=o(We,s),d=(c+(Me-1)*u)/Me,f=(l+(Ne-1)*d)/Ne;return[d,f,u]},formats:{color:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}}),Je=new M({id:`jzczhz`,name:`JzCzHz`,coords:{jz:{refRange:[0,1],name:`Jz`},cz:{refRange:[0,1],name:`Chroma`},hz:{refRange:[0,360],type:`angle`,name:`Hue`}},base:qe,fromBase(e){let[t,n,r]=e,i,a=2e-4;return i=Math.abs(n){let n=S(t*Math.abs(e)*.01,ft);return 400*x(n,e)/(n+27.13)});return n}function St(e,t){let n=100/t*27.13**pt;return e.map(e=>{let t=Math.abs(e);return x(n*S(t/(400-t),pt),e)})}function Ct(e){let t=B(e);t<=G.h[0]&&(t+=360);let n=w(G.h,t)-1,[r,i]=G.h.slice(n,n+2),[a,o]=G.e.slice(n,n+2),s=G.H[n],c=(t-r)/a;return s+100*c/(c+(i-t)/o)}function wt(e){let t=(e%400+400)%400,n=Math.floor(.01*t);t%=100;let[r,i]=G.h.slice(n,n+2),[a,o]=G.e.slice(n,n+2);return B((t*(o*r-a*i)-100*r*o)/(t*(o-a)-100*o))}function Tt(e,t,n,r,i){let a={};a.discounting=i,a.refWhite=e,a.surround=r;let s=e.map(e=>e*100);a.la=t,a.yb=n;let c=s[1],l=o(ht,s);r=vt[a.surround];let u=r[0];a.c=r[1],a.nc=r[2];let d=1/(5*a.la+1),f=d**4;a.fl=f*a.la+.1*(1-f)*(1-f)*Math.cbrt(5*a.la),a.flRoot=a.fl**.25,a.n=a.yb/c,a.z=1.48+Math.sqrt(a.n),a.nbb=.725*a.n**-.2,a.ncb=a.nbb;let p=i?1:Math.max(Math.min(u*(1-1/3.6*Math.exp((-a.la-42)/92)),1),0);a.dRgb=l.map(e=>g(1,c/e,p)),a.dRgbInv=a.dRgb.map(e=>1/e);let m=l.map((e,t)=>e*a.dRgb[t]),h=xt(m,a.fl);return a.aW=a.nbb*(2*h[0]+h[1]+.05*h[2]),a}const Et=Tt(dt,64/Math.PI*.2,20,`average`,!1);function Dt(e,t){if(!(e.J!==void 0^e.Q!==void 0))throw Error(`Conversion requires one and only one: 'J' or 'Q'`);if(!(e.C!==void 0^e.M!==void 0^e.s!==void 0))throw Error(`Conversion requires one and only one: 'C', 'M' or 's'`);if(!(e.h!==void 0^e.H!==void 0))throw Error(`Conversion requires one and only one: 'h' or 'H'`);if(e.J===0||e.Q===0)return[0,0,0];let n=0;n=e.h===void 0?wt(e.H)*bt:B(e.h)*bt;let r=Math.cos(n),i=Math.sin(n),a=0;e.J===void 0?e.Q!==void 0&&(a=.25*t.c*e.Q/((t.aW+4)*t.flRoot)):a=S(e.J,1/2)*.1;let s=0;e.C===void 0?e.M===void 0?e.s!==void 0&&(s=4e-4*e.s**2*(t.aW+4)/t.c):s=e.M/t.flRoot/a:s=e.C/a;let c=S(s*(1.64-.29**t.n)**-.73,10/9),l=.25*(Math.cos(n+2)+3.8),u=t.aW*S(a,2/t.c/t.z),d=5e4/13*t.nc*t.ncb*l,f=u/t.nbb,p=23*(f+.305)*C(c,23*d+c*(11*r+108*i)),m=p*r,h=p*i,g=St(o(_t,[f,m,h]).map(e=>e*1/1403),t.fl);return o(gt,g.map((e,n)=>e*t.dRgbInv[n])).map(e=>e/100)}function Ot(e,t){let n=e.map(e=>e*100),r=xt(o(ht,n).map((e,n)=>e*t.dRgb[n]),t.fl),i=r[0]+(-12*r[1]+r[2])/11,a=(r[0]+r[1]-2*r[2])/9,s=(Math.atan2(a,i)%mt+mt)%mt,c=.25*(Math.cos(s+2)+3.8),l=5e4/13*t.nc*t.ncb*C(c*Math.sqrt(i**2+a**2),r[0]+r[1]+1.05*r[2]+.305),u=S(l,.9)*(1.64-.29**t.n)**.73,d=t.nbb*(2*r[0]+r[1]+.05*r[2]),f=S(d/t.aW,.5*t.c*t.z),p=100*S(f,2),m=4/t.c*f*(t.aW+4)*t.flRoot,h=u*f,g=h*t.flRoot,_=B(s*yt),v=Ct(_),y=50*S(t.c*u/(t.aW+4),1/2);return{J:p,C:h,h:_,s:y,Q:m,M:g,H:v}}var kt=new M({id:`cam16-jmh`,cssId:`--cam16-jmh`,name:`CAM16-JMh`,coords:{j:{refRange:[0,100],name:`J`},m:{refRange:[0,105],name:`Colorfulness`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:P,fromBase(e){let t=Ot(e,Et);return[t.J,t.M,t.h]},toBase(e){return Dt({J:e[0],M:e[1],h:e[2]},Et)}});const At=O.D65,jt=216/24389,Mt=24389/27;function Nt(e){let t=e>jt?Math.cbrt(e):(Mt*e+16)/116;return 116*t-16}function Pt(e){return e>8?((e+16)/116)**3:e/Mt}function Ft(e,t){let[n,r,i]=e,a=[],o=0;if(i===0)return[0,0,0];let s=Pt(i);o=i>0?.00379058511492914*i**2+.608983189401032*i+.9155088574762233:9514440756550361e-21*i**2+.08693057439788597*i-21.928975842194614;let c=2e-12,l=15,u=0,d=1/0;for(;u<=l;){a=Dt({J:o,C:r,h:n},t);let e=Math.abs(a[1]-s);if(e | `,` | `,` | `]}}});const zt=Math.PI/180,Bt=[1,.007,.0228];function Vt(e){e[1]<0&&(e=Rt.fromBase(Rt.toBase(e)));let t=Math.log(Math.max(1+Bt[2]*e[1]*Lt.flRoot,1))/Bt[2],n=e[0]*zt,r=t*Math.cos(n),i=t*Math.sin(n);return[e[2],r,i]}function Ht(e,t){[e,t]=j([e,t]);let[n,r,i]=Vt(Rt.from(e)),[a,o,s]=Vt(Rt.from(t));return Math.sqrt((n-a)**2+(r-o)**2+(i-s)**2)}var K={deltaE76:Ee,deltaECMC:ke,deltaE2000:ve,deltaEJz:Ye,deltaEITP:ut,deltaEOK:Ce,deltaEHCT:Ht};function Ut(e){let t=e?Math.floor(Math.log10(Math.abs(e))):0;return Math.max(parseFloat(`1e${t-2}`),1e-6)}const Wt={hct:{method:`hct.c`,jnd:2,deltaEMethod:`hct`,blackWhiteClamp:{}},"hct-tonal":{method:`hct.c`,jnd:0,deltaEMethod:`hct`,blackWhiteClamp:{channel:`hct.t`,min:0,max:100}}};function q(e,{method:t=D.gamut_mapping,space:n=void 0,deltaEMethod:r=``,jnd:i=2,blackWhiteClamp:a={}}={}){if(e=j(e),s(arguments[1])?n=arguments[1]:n||=e.space,n=M.get(n),U(e,n,{epsilon:0}))return e;let o;if(t===`css`)o=Kt(e,{space:n});else{if(t!==`clip`&&!U(e,n)){Object.prototype.hasOwnProperty.call(Wt,t)&&({method:t,jnd:i,deltaEMethod:r,blackWhiteClamp:a}=Wt[t]);let s=ve;if(r!==``){for(let e in K)if(`deltae`+r.toLowerCase()===e.toLowerCase()){s=K[e];break}}let c=q(J(e,n),{method:`clip`,space:n});if(s(e,c)>i){if(Object.keys(a).length===3){let t=M.resolveCoord(a.channel),n=L(J(e,t.space),t.id);if(u(n)&&(n=0),n>=a.max)return J({space:`xyz-d65`,coords:O.D65},e.space);if(n<=a.min)return J({space:`xyz-d65`,coords:[0,0,0]},e.space)}let r=M.resolveCoord(t),c=r.space,l=r.id,d=J(e,c);d.coords.forEach((e,t)=>{u(e)&&(d.coords[t]=0)});let f=r.range||r.refRange,p=f[0],m=Ut(i),h=p,g=L(d,l);for(;g-h>m;){let e=W(d);e=q(e,{space:n,method:`clip`});let t=s(d,e);t-ie.range||[]);o.coords=o.coords.map((t,n)=>{let[r,i]=e[n];return r!==void 0&&(t=Math.max(r,t)),i!==void 0&&(t=Math.min(t,i)),t})}}return n!==e.space&&(o=J(o,e.space)),e.coords=o.coords,e}q.returns=`color`;const Gt={WHITE:{space:H,coords:[1,0,0]},BLACK:{space:H,coords:[0,0,0]}};function Kt(e,{space:t}={}){let n=.02,r=1e-4;e=j(e),t||=e.space,t=M.get(t);let i=M.get(`oklch`);if(t.isUnbounded)return J(e,t);let a=J(e,i),o=a.coords[0];if(o>=1){let n=J(Gt.WHITE,t);return n.alpha=e.alpha,J(n,t)}if(o<=0){let n=J(Gt.BLACK,t);return n.alpha=e.alpha,J(n,t)}if(U(a,t,{epsilon:0}))return J(a,t);function s(e){let n=J(e,t),r=Object.values(t.coords);return n.coords=n.coords.map((e,t)=>{if(`range`in r[t]){let[n,i]=r[t].range;return b(n,e,i)}return e}),n}let c=0,l=a.coords[1],u=!0,d=W(a),f=s(d),p=Ce(f,d);if(pr;){let e=(c+l)/2;if(d.coords[1]=e,u&&U(d,t,{epsilon:0}))c=e;else if(f=s(d),p=Ce(f,d),pl(e,{precision:t})));let i=[...s];if(r===`color`){let t=n.id||n.ids?.[0]||e.space.id;i.unshift(t)}let o=e.alpha;t!==null&&(o=l(o,{precision:t}));let c=e.alpha>=1||n.noAlpha?``:`${n.commas?`,`:` /`} ${o}`;a=`${r}(${i.join(n.commas?`, `:` `)}${c})`}return a}const Jt=[[.6369580483012914,.14461690358620832,.1688809751641721],[.2627002120112671,.6779980715188708,.05930171646986196],[0,.028072693049087428,1.060985057710791]],Yt=[[1.716651187971268,-.355670783776392,-.25336628137366],[-.666684351832489,1.616481236634939,.0157685458139111],[.017639857445311,-.042770613257809,.942103121235474]];var Xt=new F({id:`rec2020-linear`,cssId:`--rec2020-linear`,name:`Linear REC.2020`,white:`D65`,toXYZ_M:Jt,fromXYZ_M:Yt});const Zt=1.09929682680944,Qt=.018053968510807;var $t=new F({id:`rec2020`,name:`REC.2020`,base:Xt,toBase(e){return e.map(function(e){return e=Qt?Zt*e**.45-(Zt-1):4.5*e})}});const en=[[.4865709486482162,.26566769316909306,.1982172852343625],[.2289745640697488,.6917385218365064,.079286914093745],[0,.04511338185890264,1.043944368900976]],tn=[[2.493496911941425,-.9313836179191239,-.40271078445071684],[-.8294889695615747,1.7626640603183463,.023624685841943577],[.03584583024378447,-.07617238926804182,.9568845240076872]];var nn=new F({id:`p3-linear`,cssId:`--display-p3-linear`,name:`Linear P3`,white:`D65`,toXYZ_M:en,fromXYZ_M:tn});const rn=[[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Y=[[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]];var an=new F({id:`srgb-linear`,name:`Linear sRGB`,white:`D65`,toXYZ_M:rn,fromXYZ_M:Y}),on={aliceblue:[240/255,248/255,1],antiquewhite:[250/255,235/255,215/255],aqua:[0,1,1],aquamarine:[127/255,1,212/255],azure:[240/255,1,1],beige:[245/255,245/255,220/255],bisque:[1,228/255,196/255],black:[0,0,0],blanchedalmond:[1,235/255,205/255],blue:[0,0,1],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,1,0],chocolate:[210/255,105/255,30/255],coral:[1,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[1,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0,1,1],darkblue:[0,0,139/255],darkcyan:[0,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0,100/255,0],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[1,140/255,0],darkorchid:[153/255,50/255,204/255],darkred:[139/255,0,0],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0,206/255,209/255],darkviolet:[148/255,0,211/255],deeppink:[1,20/255,147/255],deepskyblue:[0,191/255,1],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,1],firebrick:[178/255,34/255,34/255],floralwhite:[1,250/255,240/255],forestgreen:[34/255,139/255,34/255],fuchsia:[1,0,1],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,1],gold:[1,215/255,0],goldenrod:[218/255,165/255,32/255],gray:[128/255,128/255,128/255],green:[0,128/255,0],greenyellow:[173/255,1,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,1,240/255],hotpink:[1,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0,130/255],ivory:[1,1,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[1,240/255,245/255],lawngreen:[124/255,252/255,0],lemonchiffon:[1,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,1,1],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[1,182/255,193/255],lightsalmon:[1,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,153/255],lightslategrey:[119/255,136/255,153/255],lightsteelblue:[176/255,196/255,222/255],lightyellow:[1,1,224/255],lime:[0,1,0],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[1,0,1],maroon:[128/255,0,0],mediumaquamarine:[102/255,205/255,170/255],mediumblue:[0,0,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0,250/255,154/255],mediumturquoise:[72/255,209/255,204/255],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,1,250/255],mistyrose:[1,228/255,225/255],moccasin:[1,228/255,181/255],navajowhite:[1,222/255,173/255],navy:[0,0,128/255],oldlace:[253/255,245/255,230/255],olive:[128/255,128/255,0],olivedrab:[107/255,142/255,35/255],orange:[1,165/255,0],orangered:[1,69/255,0],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[1,239/255,213/255],peachpuff:[1,218/255,185/255],peru:[205/255,133/255,63/255],pink:[1,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],purple:[128/255,0,128/255],rebeccapurple:[102/255,51/255,153/255],red:[1,0,0],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[1,245/255,238/255],sienna:[160/255,82/255,45/255],silver:[192/255,192/255,192/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[1,250/255,250/255],springgreen:[0,1,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],teal:[0,128/255,128/255],thistle:[216/255,191/255,216/255],tomato:[1,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],white:[1,1,1],whitesmoke:[245/255,245/255,245/255],yellow:[1,1,0],yellowgreen:[154/255,205/255,50/255]};let sn=[,,,].fill(` | [0, 255]`),cn=[,,,].fill(`[0, 255]`);var X=new F({id:`srgb`,name:`sRGB`,base:an,fromBase:e=>e.map(e=>{let t=e<0?-1:1,n=e*t;return n>.0031308?t*(1.055*n**(1/2.4)-.055):12.92*e}),toBase:e=>e.map(e=>{let t=e<0?-1:1,n=e*t;return n<=.04045?e/12.92:t*((n+.055)/1.055)**2.4}),formats:{rgb:{coords:sn},rgb_number:{name:`rgb`,commas:!0,coords:cn,noAlpha:!0},color:{},rgba:{coords:sn,commas:!0,lastAlpha:!0},rgba_number:{name:`rgba`,commas:!0,coords:cn},hex:{type:`custom`,toGamut:!0,test:e=>/^#([a-f0-9]{3,4}){1,2}$/i.test(e),parse(e){e.length<=5&&(e=e.replace(/[a-f0-9]/gi,`$&$&`));let t=[];return e.replace(/[a-f0-9]{2}/gi,e=>{t.push(parseInt(e,16)/255)}),{spaceId:`srgb`,coords:t.slice(0,3),alpha:t.slice(3)[0]}},serialize:(e,t,{collapse:n=!0}={})=>{t<1&&e.push(t),e=e.map(e=>Math.round(e*255));let r=n&&e.every(e=>e%17==0),i=e.map(e=>r?(e/17).toString(16):e.toString(16).padStart(2,`0`)).join(``);return`#`+i}},keyword:{type:`custom`,test:e=>/^[a-z]+$/i.test(e),parse(e){e=e.toLowerCase();let t={spaceId:`srgb`,coords:null,alpha:1};if(e===`transparent`?(t.coords=on.black,t.alpha=0):t.coords=on[e],t.coords)return t}}}}),ln=new F({id:`p3`,cssId:`display-p3`,name:`P3`,base:nn,fromBase:X.fromBase,toBase:X.toBase});D.display_space=X;let un;if(typeof CSS<`u`&&CSS.supports)for(let e of[z,$t,ln]){let t=e.getMinCoords(),n={space:e,coords:t,alpha:1},r=qt(n);if(CSS.supports(`color`,r)){D.display_space=e;break}}function dn(e,{space:t=D.display_space,...n}={}){let r=qt(e,n);if(typeof CSS>`u`||CSS.supports(`color`,r)||!D.display_space)r=new String(r),r.color=e;else{let i=e,a=e.coords.some(u)||u(e.alpha);if(a&&!(un??=CSS.supports(`color`,`hsl(none 50% 50%)`))&&(i=W(e),i.coords=i.coords.map(d),i.alpha=d(i.alpha),r=qt(i,n),CSS.supports(`color`,r)))return r=new String(r),r.color=i,r;i=J(i,t),r=new String(qt(i,n)),r.color=i}return r}function fn(e,t){return e=j(e),t=j(t),e.space===t.space&&e.alpha===t.alpha&&e.coords.every((e,n)=>e===t.coords[n])}function Z(e){return L(e,[P,`y`])}function pn(e,t){R(e,[P,`y`],t)}function mn(e){Object.defineProperty(e.prototype,`luminance`,{get(){return Z(this)},set(e){pn(this,e)}})}var hn=Object.freeze({__proto__:null,getLuminance:Z,register:mn,setLuminance:pn});function gn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);return r>n&&([n,r]=[r,n]),(n+.05)/(r+.05)}const _n=.56,vn=.57,yn=.62,bn=.65,xn=.022,Sn=1.414,Cn=.1,wn=5e-4,Tn=1.14,En=.027,Dn=1.14;function On(e){return e>=xn?e:e+(xn-e)**Sn}function kn(e){let t=e<0?-1:1,n=Math.abs(e);return t*n**2.4}function An(e,t){t=j(t),e=j(e);let n,r,i,a,o,s;t=J(t,`srgb`),[a,o,s]=t.coords;let c=kn(a)*.2126729+kn(o)*.7151522+kn(s)*.072175;e=J(e,`srgb`),[a,o,s]=e.coords;let l=kn(a)*.2126729+kn(o)*.7151522+kn(s)*.072175,u=On(c),d=On(l),f=d>u;return Math.abs(d-u)0?r-En:r+En,i*100}function jn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);r>n&&([n,r]=[r,n]);let i=n+r;return i===0?0:(n-r)/i}const Mn=5e4;function Nn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);return r>n&&([n,r]=[r,n]),r===0?Mn:(n-r)/r}function Pn(e,t){e=j(e),t=j(t);let n=L(e,[z,`l`]),r=L(t,[z,`l`]);return Math.abs(n-r)}const Fn=216/24389,In=24/116,Ln=24389/27;let Rn=O.D65;var zn=new M({id:`lab-d65`,name:`Lab D65`,coords:{l:{refRange:[0,100],name:`Lightness`},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:Rn,base:P,fromBase(e){let t=e.map((e,t)=>e/Rn[t]),n=t.map(e=>e>Fn?Math.cbrt(e):(Ln*e+16)/116);return[116*n[1]-16,500*(n[0]-n[1]),200*(n[1]-n[2])]},toBase(e){let t=[];t[1]=(e[0]+16)/116,t[0]=e[1]/500+t[1],t[2]=t[1]-e[2]/200;let n=[t[0]>In?t[0]**3:(116*t[0]-16)/Ln,e[0]>8?((e[0]+16)/116)**3:e[0]/Ln,t[2]>In?t[2]**3:(116*t[2]-16)/Ln];return n.map((e,t)=>e*Rn[t])},formats:{"lab-d65":{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});const Bn=5**.5*.5+.5;function Vn(e,t){e=j(e),t=j(t);let n=L(e,[zn,`l`]),r=L(t,[zn,`l`]),i=Math.abs(n**+Bn-r**+Bn),a=i**(1/Bn)*Math.SQRT2-40;return a<7.5?0:a}var Hn=Object.freeze({__proto__:null,contrastAPCA:An,contrastDeltaPhi:Vn,contrastLstar:Pn,contrastMichelson:jn,contrastWCAG21:gn,contrastWeber:Nn});function Un(e,t,n={}){s(n)&&(n={algorithm:n});let{algorithm:r,...i}=n;if(!r){let e=Object.keys(Hn).map(e=>e.replace(/^contrast/,``)).join(`, `);throw TypeError(`contrast() function needs a contrast algorithm. Please specify one of: ${e}`)}for(let n in e=j(e),t=j(t),Hn)if(`contrast`+r.toLowerCase()===n.toLowerCase())return Hn[n](e,t,i);throw TypeError(`Unknown contrast algorithm: ${r}`)}function Wn(e){let[t,n,r]=I(e,P),i=t+15*n+3*r;return[4*t/i,9*n/i]}function Gn(e){let[t,n,r]=I(e,P),i=t+n+r;return[t/i,n/i]}function Kn(e){Object.defineProperty(e.prototype,`uv`,{get(){return Wn(this)}}),Object.defineProperty(e.prototype,`xy`,{get(){return Gn(this)}})}var qn=Object.freeze({__proto__:null,register:Kn,uv:Wn,xy:Gn});function Jn(e,t,n={}){s(n)&&(n={method:n});let{method:r=D.deltaE,...i}=n;for(let n in K)if(`deltae`+r.toLowerCase()===n.toLowerCase())return K[n](e,t,i);throw TypeError(`Unknown deltaE method: ${r}`)}function Yn(e,t=.25){let n=M.get(`oklch`,`lch`),r=[n,`l`];return R(e,r,e=>e*(1+t))}function Xn(e,t=.25){let n=M.get(`oklch`,`lch`),r=[n,`l`];return R(e,r,e=>e*(1-t))}var Zn=Object.freeze({__proto__:null,darken:Xn,lighten:Yn});function Qn(e,t,n=.5,r={}){[e,t]=[j(e),j(t)],c(n)===`object`&&([n,r]=[.5,n]);let i=er(e,t,r);return i(n)}function $n(e,t,n={}){let r;tr(e)&&([r,n]=[e,t],[e,t]=r.rangeArgs.colors);let{maxDeltaE:i,deltaEMethod:a,steps:o=2,maxSteps:s=1e3,...c}=n;r||([e,t]=[j(e),j(t)],r=er(e,t,c));let l=Jn(e,t),u=i>0?Math.max(o,Math.ceil(l/i)+1):o,d=[];if(s!==void 0&&(u=Math.min(u,s)),u===1)d=[{p:.5,color:r(.5)}];else{let e=1/(u-1);d=Array.from({length:u},(t,n)=>{let i=n*e;return{p:i,color:r(i)}})}if(i>0){let e=d.reduce((e,t,n)=>{if(n===0)return 0;let r=Jn(t.color,d[n-1].color,a);return Math.max(e,r)},0);for(;e>i;){e=0;for(let t=1;te.color),d}function er(e,t,n={}){if(tr(e)){let[n,r]=[e,t];return er(...n.rangeArgs.colors,{...n.rangeArgs.options,...r})}let{space:r,outputSpace:i,progression:a,premultiplied:o}=n;e=j(e),t=j(t),e=W(e),t=W(t);let s={colors:[e,t],options:n};if(r=r?M.get(r):M.registry[D.interpolationSpace]||e.space,i=i?M.get(i):r,e=J(e,r),t=J(t,r),e=q(e),t=q(t),r.coords.h&&r.coords.h.type===`angle`){let i=n.hue=n.hue||`shorter`,a=[r,`h`],[o,s]=[L(e,a),L(t,a)];isNaN(o)&&!isNaN(s)?o=s:isNaN(s)&&!isNaN(o)&&(s=o),[o,s]=fe(i,[o,s]),R(e,a,o),R(t,a,s)}return o&&(e.coords=e.coords.map(t=>t*e.alpha),t.coords=t.coords.map(e=>e*t.alpha)),Object.assign(n=>{n=a?a(n):n;let s=e.coords.map((e,r)=>{let i=t.coords[r];return g(e,i,n)}),c=g(e.alpha,t.alpha,n),l={space:r,coords:s,alpha:c};return o&&(l.coords=l.coords.map(e=>e/c)),i!==r&&(l=J(l,i)),l},{rangeArgs:s})}function tr(e){return c(e)===`function`&&!!e.rangeArgs}D.interpolationSpace=`lab`;function nr(e){e.defineFunction(`mix`,Qn,{returns:`color`}),e.defineFunction(`range`,er,{returns:`function`}),e.defineFunction(`steps`,$n,{returns:`array`})}var rr=Object.freeze({__proto__:null,isRange:tr,mix:Qn,range:er,register:nr,steps:$n}),ir=new M({id:`hsl`,name:`HSL`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:X,fromBase:e=>{let t=Math.max(...e),n=Math.min(...e),[r,i,a]=e,[o,s,c]=[NaN,0,(n+t)/2],l=t-n;if(l!==0){switch(s=c===0||c===1?0:(t-c)/Math.min(c,1-c),t){case r:o=(i-a)/l+(i=360&&(o-=360),[o,s*100,c*100]},toBase:e=>{let[t,n,r]=e;t%=360,t<0&&(t+=360),n/=100,r/=100;function i(e){let i=(e+t/30)%12,a=n*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(i-3,9-i,1))}return[i(0),i(8),i(4)]},formats:{hsl:{coords:[` | `,``,``]},hsla:{coords:[` | `,``,``],commas:!0,lastAlpha:!0}}}),ar=new M({id:`hsv`,name:`HSV`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},v:{range:[0,100],name:`Value`}},base:ir,fromBase(e){let[t,n,r]=e;n/=100,r/=100;let i=r+n*Math.min(r,1-r);return[t,i===0?0:200*(1-r/i),100*i]},toBase(e){let[t,n,r]=e;n/=100,r/=100;let i=r*(1-n/2);return[t,i===0||i===1?0:(r-i)/Math.min(i,1-i)*100,i*100]},formats:{color:{id:`--hsv`,coords:[` | `,` | `,` | `]}}}),or=new M({id:`hwb`,name:`HWB`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},w:{range:[0,100],name:`Whiteness`},b:{range:[0,100],name:`Blackness`}},base:ar,fromBase(e){let[t,n,r]=e;return[t,r*(100-n)/100,100-r]},toBase(e){let[t,n,r]=e;n/=100,r/=100;let i=n+r;if(i>=1){let e=n/i;return[t,0,e*100]}let a=1-r,o=a===0?0:1-n/a;return[t,o*100,a*100]},formats:{hwb:{coords:[` | `,` | `,` | `]}}});const sr=[[.5766690429101305,.1855582379065463,.1882286462349947],[.29734497525053605,.6273635662554661,.07529145849399788],[.02703136138641234,.07068885253582723,.9913375368376388]],cr=[[2.0415879038107465,-.5650069742788596,-.34473135077832956],[-.9692436362808795,1.8759675015077202,.04155505740717557],[.013444280632031142,-.11836239223101838,1.0151749943912054]];var lr=new F({id:`a98rgb-linear`,cssId:`--a98-rgb-linear`,name:`Linear Adobe® 98 RGB compatible`,white:`D65`,toXYZ_M:sr,fromXYZ_M:cr}),ur=new F({id:`a98rgb`,cssId:`a98-rgb`,name:`Adobe® 98 RGB compatible`,base:lr,toBase:e=>e.map(e=>Math.abs(e)**(563/256)*Math.sign(e)),fromBase:e=>e.map(e=>Math.abs(e)**(256/563)*Math.sign(e))});const dr=[[.7977666449006423,.13518129740053308,.0313477341283922],[.2880748288194013,.711835234241873,8993693872564e-17],[0,0,.8251046025104602]],fr=[[1.3457868816471583,-.25557208737979464,-.05110186497554526],[-.5446307051249019,1.5082477428451468,.02052744743642139],[0,0,1.2119675456389452]];var pr=new F({id:`prophoto-linear`,cssId:`--prophoto-rgb-linear`,name:`Linear ProPhoto`,white:`D50`,base:se,toXYZ_M:dr,fromXYZ_M:fr});const mr=1/512,hr=16/512;var gr=new F({id:`prophoto`,cssId:`prophoto-rgb`,name:`ProPhoto`,base:pr,toBase(e){return e.map(e=>ee>=mr?e**(1/1.8):16*e)}}),_r=new M({id:`oklch`,name:`Oklch`,coords:{l:{refRange:[0,1],name:`Lightness`},c:{refRange:[0,.4],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},white:`D65`,base:H,fromBase(e){let[t,n,r]=e,i,a=2e-4;return i=Math.abs(n) | `,` | [0,1]`,` | `]}}});let vr=O.D65;const yr=216/24389,br=24389/27,[xr,Sr]=Wn({space:P,coords:vr});var Cr=new M({id:`luv`,name:`Luv`,coords:{l:{refRange:[0,100],name:`Lightness`},u:{refRange:[-215,215]},v:{refRange:[-215,215]}},white:vr,base:P,fromBase(e){let t=[d(e[0]),d(e[1]),d(e[2])],n=t[1],[r,i]=Wn({space:P,coords:t});if(!Number.isFinite(r)||!Number.isFinite(i))return[0,0,0];let a=n<=yr?br*n:116*Math.cbrt(n)-16;return[a,13*a*(r-xr),13*a*(i-Sr)]},toBase(e){let[t,n,r]=e;if(t===0||u(t))return[0,0,0];n=d(n),r=d(r);let i=n/(13*t)+xr,a=r/(13*t)+Sr,o=t<=8?t/br:((t+16)/116)**3;return[o*(9*i/(4*a)),o,o*((12-3*i-20*a)/(4*a))]},formats:{color:{id:`--luv`,coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}}),wr=new M({id:`lchuv`,name:`LChuv`,coords:{l:{refRange:[0,100],name:`Lightness`},c:{refRange:[0,220],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:Cr,fromBase(e){let[t,n,r]=e,i,a=.02;return i=Math.abs(n) | `,` | `,` | `]}}});const Tr=216/24389,Er=24389/27,Dr=Y[0][0],Or=Y[0][1],kr=Y[0][2],Ar=Y[1][0],jr=Y[1][1],Mr=Y[1][2],Nr=Y[2][0],Pr=Y[2][1],Fr=Y[2][2];function Ir(e,t,n){let r=t/(Math.sin(n)-e*Math.cos(n));return r<0?1/0:r}function Lr(e){let t=(e+16)**3/1560896,n=t>Tr?t:e/Er,r=n*(284517*Dr-94839*kr),i=n*(838422*kr+769860*Or+731718*Dr),a=n*(632260*kr-126452*Or),o=n*(284517*Ar-94839*Mr),s=n*(838422*Mr+769860*jr+731718*Ar),c=n*(632260*Mr-126452*jr),l=n*(284517*Nr-94839*Fr),u=n*(838422*Fr+769860*Pr+731718*Nr),d=n*(632260*Fr-126452*Pr);return{r0s:r/a,r0i:i*e/a,r1s:r/(a+126452),r1i:(i-769860)*e/(a+126452),g0s:o/c,g0i:s*e/c,g1s:o/(c+126452),g1i:(s-769860)*e/(c+126452),b0s:l/d,b0i:u*e/d,b1s:l/(d+126452),b1i:(u-769860)*e/(d+126452)}}function Rr(e,t){let n=t/360*Math.PI*2,r=Ir(e.r0s,e.r0i,n),i=Ir(e.r1s,e.r1i,n),a=Ir(e.g0s,e.g0i,n),o=Ir(e.g1s,e.g1i,n),s=Ir(e.b0s,e.b0i,n),c=Ir(e.b1s,e.b1i,n);return Math.min(r,i,a,o,s,c)}var zr=new M({id:`hsluv`,name:`HSLuv`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:wr,gamutSpace:X,fromBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(t>99.9999999)i=0,t=100;else if(t<1e-8)i=0,t=0;else{let e=Lr(t),a=Rr(e,r);i=n/a*100}return[r,i,t]},toBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(r>99.9999999)r=100,i=0;else if(r<1e-8)r=0,i=0;else{let e=Lr(r),a=Rr(e,t);i=a/100*n}return[r,i,t]},formats:{color:{id:`--hsluv`,coords:[` | `,` | `,` | `]}}});Y[0][0],Y[0][1],Y[0][2],Y[1][0],Y[1][1],Y[1][2],Y[2][0],Y[2][1],Y[2][2];function Q(e,t){return Math.abs(t)/Math.sqrt(e**2+1)}function Br(e){let t=Q(e.r0s,e.r0i),n=Q(e.r1s,e.r1i),r=Q(e.g0s,e.g0i),i=Q(e.g1s,e.g1i),a=Q(e.b0s,e.b0i),o=Q(e.b1s,e.b1i);return Math.min(t,n,r,i,a,o)}var Vr=new M({id:`hpluv`,name:`HPLuv`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:wr,gamutSpace:`self`,fromBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(t>99.9999999)i=0,t=100;else if(t<1e-8)i=0,t=0;else{let e=Lr(t),r=Br(e);i=n/r*100}return[r,i,t]},toBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(r>99.9999999)r=100,i=0;else if(r<1e-8)r=0,i=0;else{let e=Lr(r),t=Br(e);i=t/100*n}return[r,i,t]},formats:{color:{id:`--hpluv`,coords:[` | `,` | `,` | `]}}});const Hr=203,Ur=2610/2**14,Wr=2**14/2610,Gr=2523/2**5,Kr=2**5/2523,qr=3424/2**12,Jr=2413/2**7,Yr=2392/2**7;var Xr=new F({id:`rec2100pq`,cssId:`rec2100-pq`,name:`REC.2100-PQ`,base:Xt,toBase(e){return e.map(function(e){let t=(Math.max(e**Kr-qr,0)/(Jr-Yr*e**Kr))**Wr;return t*1e4/Hr})},fromBase(e){return e.map(function(e){let t=Math.max(e*Hr/1e4,0),n=qr+Jr*t**Ur,r=1+Yr*t**Ur;return(n/r)**Gr})}});const Zr=.17883277,Qr=.28466892,$r=.55991073,ei=3.7743;var ti=new F({id:`rec2100hlg`,cssId:`rec2100-hlg`,name:`REC.2100-HLG`,referred:`scene`,base:Xt,toBase(e){return e.map(function(e){return e<=.5?e**2/3*ei:(Math.exp((e-$r)/Zr)+Qr)/12*ei})},fromBase(e){return e.map(function(e){return e/=ei,e<=1/12?Math.sqrt(3*e):Zr*Math.log(12*e-Qr)+$r})}});const ni={};E.add(`chromatic-adaptation-start`,e=>{e.options.method&&(e.M=ii(e.W1,e.W2,e.options.method))}),E.add(`chromatic-adaptation-end`,e=>{e.M||=ii(e.W1,e.W2,e.options.method)});function ri({id:e,toCone_M:t,fromCone_M:n}){ni[e]=arguments[0]}function ii(e,t,n=`Bradford`){let r=ni[n],[i,a,s]=o(r.toCone_M,e),[c,l,u]=o(r.toCone_M,t),d=[[c/i,0,0],[0,l/a,0],[0,0,u/s]],f=o(d,r.toCone_M),p=o(r.fromCone_M,f);return p}ri({id:`von Kries`,toCone_M:[[.40024,.7076,-.08081],[-.2263,1.16532,.0457],[0,0,.91822]],fromCone_M:[[1.8599363874558397,-1.1293816185800916,.21989740959619328],[.3611914362417676,.6388124632850422,-6370596838649899e-21],[0,0,1.0890636230968613]]}),ri({id:`Bradford`,toCone_M:[[.8951,.2664,-.1614],[-.7502,1.7135,.0367],[.0389,-.0685,1.0296]],fromCone_M:[[.9869929054667121,-.14705425642099013,.15996265166373122],[.4323052697233945,.5183602715367774,.049291228212855594],[-.00852866457517732,.04004282165408486,.96848669578755]]}),ri({id:`CAT02`,toCone_M:[[.7328,.4296,-.1624],[-.7036,1.6975,.0061],[.003,.0136,.9834]],fromCone_M:[[1.0961238208355142,-.27886900021828726,.18274517938277307],[.4543690419753592,.4735331543074117,.07209780371722911],[-.009627608738429355,-.00569803121611342,1.0153256399545427]]}),ri({id:`CAT16`,toCone_M:[[.401288,.650173,-.051461],[-.250268,1.204414,.045854],[-.002079,.048952,.953127]],fromCone_M:[[1.862067855087233,-1.0112546305316845,.14918677544445172],[.3875265432361372,.6214474419314753,-.008973985167612521],[-.01584149884933386,-.03412293802851557,1.0499644368778496]]}),Object.assign(O,{A:[1.0985,1,.35585],C:[.98074,1,1.18232],D55:[.95682,1,.92149],D75:[.94972,1,1.22638],E:[1,1,1],F2:[.99186,1,.67393],F7:[.95041,1,1.08747],F11:[1.00962,1,.6435]}),O.ACES=[.32168/.33767,1,.34065/.33767];const ai=[[.6624541811085053,.13400420645643313,.1561876870049078],[.27222871678091454,.6740817658111484,.05368951740793705],[-.005574649490394108,.004060733528982826,1.0103391003129971]],oi=[[1.6410233796943257,-.32480329418479,-.23642469523761225],[-.6636628587229829,1.6153315916573379,.016756347685530137],[.011721894328375376,-.008284441996237409,.9883948585390215]];var si=new F({id:`acescg`,cssId:`--acescg`,name:`ACEScg`,coords:{r:{range:[0,65504],name:`Red`},g:{range:[0,65504],name:`Green`},b:{range:[0,65504],name:`Blue`}},referred:`scene`,white:O.ACES,toXYZ_M:ai,fromXYZ_M:oi});const ci=2**-16,li=-.35828683,ui=(Math.log2(65504)+9.72)/17.52;var di=new F({id:`acescc`,cssId:`--acescc`,name:`ACEScc`,coords:{r:{range:[li,ui],name:`Red`},g:{range:[li,ui],name:`Green`},b:{range:[li,ui],name:`Blue`}},referred:`scene`,base:si,toBase(e){let t=-5.279999999999999/17.52;return e.map(function(e){return e<=t?(2**(e*17.52-9.72)-ci)*2:e1||i===void 0?1:i<0?0:i;for(let e=0;ethis.get(e),set:t=>this.set(e,t)})}get spaceId(){return this.space.id}clone(){return new e(this.space,this.coords,this.alpha)}toJSON(){return{spaceId:this.spaceId,coords:this.coords,alpha:this.alpha}}display(...t){let n=dn(this,...t);return n.color=new e(n.color),n}static get(t,...n){return t instanceof e?t:new e(t,...n)}static defineFunction(t,n,r=n){let{instance:i=!0,returns:a}=r,o=function(...t){let r=n(...t);if(a===`color`)r=e.get(r);else if(a===`function`){let t=r;r=function(...n){let r=t(...n);return e.get(r)},Object.assign(r,t)}else a===`array`&&(r=r.map(t=>e.get(t)));return r};t in e||(e[t]=o),i&&(e.prototype[t]=function(...e){return o(this,...e)})}static defineFunctions(t){for(let n in t)e.defineFunction(n,t[n],t[n])}static extend(exports){if(exports.register)exports.register(e);else for(let n in exports)e.defineFunction(n,exports[n])}};$.defineFunctions({get:L,getAll:I,set:R,setAll:oe,to:J,equals:fn,inGamut:U,toGamut:q,distance:Te,toString:qt}),Object.assign($,{util:T,hooks:E,WHITES:O,Space:M,spaces:M.registry,parse:re,defaults:D});for(let e of Object.keys(fi))M.register(fi[e]);for(let e in M.registry)pi(e,M.registry[e]);E.add(`colorspace-init-end`,e=>{pi(e.id,e),e.aliases?.forEach(t=>{pi(t,e)})});function pi(e,t){let n=e.replace(/-/g,`_`);Object.defineProperty($.prototype,n,{get(){let n=this.getAll(e);return typeof Proxy>`u`?n:new Proxy(n,{has:(e,n)=>{try{return M.resolveCoord([t,n]),!0}catch{}return Reflect.has(e,n)},get:(e,n,r)=>{if(n&&typeof n!=`symbol`&&!(n in e)){let{index:r}=M.resolveCoord([t,n]);if(r>=0)return e[r]}return Reflect.get(e,n,r)},set:(n,r,i,a)=>{if(r&&typeof r!=`symbol`&&!(r in n)||r>=0){let{index:a}=M.resolveCoord([t,r]);if(a>=0)return n[a]=i,this.setAll(e,n),!0}return Reflect.set(n,r,i,a)}})},set(t){this.setAll(e,t)},configurable:!0,enumerable:!0})}$.extend(K),$.extend({deltaE:Jn}),Object.assign($,{deltaEMethods:K}),$.extend(Zn),$.extend({contrast:Un}),$.extend(qn),$.extend(hn),$.extend(rr),$.extend(Hn);function mi(e,t){return async()=>{let n=a(()=>{let t=document.querySelector(e);if(!t)throw Error(`Widgets element not found`);return t},{retry:10,retryDelay:1e3}),r=await n();return window.getComputedStyle(r).getPropertyValue(t)}}function hi(e){return async()=>{if(typeof e==`string`)return e;{let t=n();return t.value?e.dark:e.light}}}function gi(e){async function t(){`document`in globalThis&&globalThis.document!=null&&`window`in globalThis&&globalThis.window!=null&&document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,new $(await e()).to(`srgb`).toString({format:`hex`}))}return{updateThemeColor:t}}export{mi as b,hi as c,gi as d}; \ No newline at end of file +import{T as e,U as t,aR as n}from"./index-K-hxNScn.js";const r=async e=>{let t=await e();for(;t instanceof Function;)t=await t();return t},i={retry:3,retryCount:0,retryDelay:500},a=(n,o)=>{let{onError:s,retry:c,retryCount:l,retryDelay:u}=t(i,o),d=async(...t)=>{try{return await n(...t)}catch(r){if(s?.(r),la(n,{onError:s,retry:c,retryCount:l+1,retryDelay:u})(...t);throw r}};return async(...e)=>r(async()=>d(...e))};function o(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>{let n=0;if(!Array.isArray(e)){for(let r of t)n+=e*r;return n}for(let r=0;re[0]):a}function s(e){return c(e)===`string`}function c(e){let t=Object.prototype.toString.call(e);return(t.match(/^\[object\s+(.*?)\]$/)[1]||``).toLowerCase()}function l(e,{precision:t,unit:n}){return u(e)?`none`:f(e,t)+(n??``)}function u(e){return Number.isNaN(e)||e instanceof Number&&e?.none}function d(e){return u(e)?0:e}function f(e,t){if(e===0)return 0;let n=~~e,r=0;n&&t&&(r=~~Math.log10(Math.abs(n))+1);let i=10**(t-r);return Math.floor(e*i+.5)/i}const p={deg:1,grad:.9,rad:180/Math.PI,turn:360};function m(e){if(!e)return;e=e.trim();let t=/^([a-z]+)\((.+?)\)$/i,n=/^-?[\d.]+$/,r=/%|deg|g?rad|turn$/,i=/\/?\s*(none|[-\w.]+(?:%|deg|g?rad|turn)?)/g,a=e.match(t);if(a){let e=[];return a[2].replace(i,(t,i)=>{let a=i.match(r),o=i;if(a){let e=a[0],t=o.slice(0,-e.length);e===`%`?(o=new Number(t/100),o.type=``):(o=new Number(t*p[e]),o.type=``,o.unit=e)}else n.test(o)?(o=new Number(o),o.type=``):o===`none`&&(o=new Number(NaN),o.none=!0);t.startsWith(`/`)&&(o=o instanceof Number?o:new Number(o),o.alpha=!0),typeof o==`object`&&o instanceof Number&&(o.raw=i),e.push(o)}),{name:a[1].toLowerCase(),rawName:a[1],rawArgs:a[2],args:e}}}function h(e){return e[e.length-1]}function g(e,t,n){return isNaN(e)?t:isNaN(t)?e:e+(t-e)*n}function _(e,t,n){return(n-e)/(t-e)}function v(e,t,n){return g(t[0],t[1],_(e[0],e[1],n))}function y(e){return e.map(e=>e.split(`|`).map(e=>{e=e.trim();let t=e.match(/^(<[a-z]+>)\[(-?[.\d]+),\s*(-?[.\d]+)\]?$/);if(t){let e=new String(t[1]);return e.range=[+t[2],+t[3]],e}return e}))}function b(e,t,n){return Math.max(Math.min(n,t),e)}function x(e,t){return Math.sign(e)===Math.sign(t)?e:-e}function S(e,t){return x(Math.abs(e)**t,e)}function C(e,t){return t===0?0:e/t}function w(e,t,n=0,r=e.length){for(;n>1;e[i]`,``,``]);function A(e,t,n,r){let i=Object.entries(e.coords).map(([e,i],a)=>{let o=t.coordGrammar[a],s=r[a],c=s?.type,l;if(l=s.none?o.find(e=>ne.has(e)):o.find(e=>e==c),!l){let t=i.name||e;throw TypeError(`${c??s.raw} not allowed for ${t} in ${n}()`)}let u=l.range;c===``&&(u||=[0,1]);let d=i.range||i.refRange;return u&&d&&(r[a]=v(u,d,r[a])),l});return i}function re(e,{meta:t}={}){let n={str:String(e)?.trim()};if(E.run(`parse-start`,n),n.color)return n.color;if(n.parsed=m(n.str),n.parsed){let e=n.parsed.name;if(e===`color`){let e=n.parsed.args.shift(),r=e.startsWith(`--`)?e.substring(2):`--${e}`,i=[e,r],a=n.parsed.rawArgs.indexOf(`/`)>0?n.parsed.args.pop():1;for(let r of M.all){let o=r.getFormat(`color`);if(o&&(i.includes(o.id)||o.ids?.filter(e=>i.includes(e)).length)){let i=Object.keys(r.coords).map((e,t)=>n.parsed.args[t]||0),s;return o.coordGrammar&&(s=A(r,o,`color`,i)),t&&Object.assign(t,{formatId:`color`,types:s}),o.id.startsWith(`--`)&&!e.startsWith(`--`)&&D.warn(`${r.name} is a non-standard space and not currently supported in the CSS spec. Use prefixed color(${o.id}) instead of color(${e}).`),e.startsWith(`--`)&&!o.id.startsWith(`--`)&&D.warn(`${r.name} is a standard space and supported in the CSS spec. Use color(${o.id}) instead of prefixed color(${e}).`),{spaceId:r.id,coords:i,alpha:a}}}let o=``,s=e in M.registry?e:r;if(s in M.registry){let e=M.registry[s].formats?.color?.id;e&&(o=`Did you mean color(${e})?`)}throw TypeError(`Cannot parse color(${e}). `+(o||`Missing a plugin?`))}else for(let r of M.all){let i=r.getFormat(e);if(i&&i.type===`function`){let a=1;(i.lastAlpha||h(n.parsed.args).alpha)&&(a=n.parsed.args.pop());let o=n.parsed.args,s;return i.coordGrammar&&(s=A(r,i,e,o)),t&&Object.assign(t,{formatId:i.name,types:s}),{spaceId:r.id,coords:o,alpha:a}}}}else for(let e of M.all)for(let r in e.formats){let i=e.formats[r];if(i.type!==`custom`||i.test&&!i.test(n.str))continue;let a=i.parse(n.str);if(a)return a.alpha??=1,t&&(t.formatId=r),a}throw TypeError(`Could not parse ${e} as a color. Missing a plugin?`)}function j(e){if(Array.isArray(e))return e.map(j);if(!e)throw TypeError(`Empty color reference`);s(e)&&(e=re(e));let t=e.space||e.spaceId;return t instanceof M||(e.space=M.get(t)),e.alpha===void 0&&(e.alpha=1),e}const ie=75e-6;var M=class e{constructor(t){this.id=t.id,this.name=t.name,this.base=t.base?e.get(t.base):null,this.aliases=t.aliases,this.base&&(this.fromBase=t.fromBase,this.toBase=t.toBase);let n=t.coords??this.base.coords;for(let e in n)`name`in n[e]||(n[e].name=e);this.coords=n;let r=t.white??this.base.white??`D65`;for(let e in this.white=te(r),this.formats=t.formats??{},this.formats){let t=this.formats[e];t.type||=`function`,t.name||=e}this.formats.color?.id||(this.formats.color={...this.formats.color??{},id:t.cssId||this.id}),t.gamutSpace?this.gamutSpace=t.gamutSpace===`self`?this:e.get(t.gamutSpace):this.isPolar?this.gamutSpace=this.base:this.gamutSpace=this,this.gamutSpace.isUnbounded&&(this.inGamut=(e,t)=>!0),this.referred=t.referred,Object.defineProperty(this,`path`,{value:N(this).reverse(),writable:!1,enumerable:!0,configurable:!0}),E.run(`colorspace-init-end`,this)}inGamut(e,{epsilon:t=ie}={}){if(!this.equals(this.gamutSpace))return e=this.to(this.gamutSpace,e),this.gamutSpace.inGamut(e,{epsilon:t});let n=Object.values(this.coords);return e.every((e,r)=>{let i=n[r];if(i.type!==`angle`&&i.range){if(Number.isNaN(e))return!0;let[n,r]=i.range;return(n===void 0||e>=n-t)&&(r===void 0||e<=r+t)}return!0})}get isUnbounded(){return Object.values(this.coords).every(e=>!(`range`in e))}get cssId(){return this.formats?.color?.id||this.id}get isPolar(){for(let e in this.coords)if(this.coords[e].type===`angle`)return!0;return!1}getFormat(e){if(typeof e==`object`)return e=ae(e,this),e;let t;return t=e===`default`?Object.values(this.formats)[0]:this.formats[e],t?(t=ae(t,this),t):null}equals(e){return e?this===e||this.id===e||this.id===e.id:!1}to(t,n){if(arguments.length===1){let e=j(t);[t,n]=[e.space,e.coords]}if(t=e.get(t),this.equals(t))return n;n=n.map(e=>Number.isNaN(e)?0:e);let r=this.path,i=t.path,a,o;for(let e=0;eo;e--)n=r[e].toBase(n);for(let e=o+1;e=0){let e=Object.entries(i.coords)[a];if(e)return{space:i,id:e[0],index:a,...e[1]}}i=e.get(i);let o=a.toLowerCase(),s=0;for(let e in i.coords){let t=i.coords[e];if(e.toLowerCase()===o||t.name?.toLowerCase()===o)return{space:i,id:e,index:s,...t};s++}throw TypeError(`No "${a}" coordinate found in ${i.name}. Its coordinates are: ${Object.keys(i.coords).join(`, `)}`)}static DEFAULT_FORMAT={type:`functions`,name:`color`}};function N(e){let t=[e];for(let n=e;n=n.base;)t.push(n);return t}function ae(e,{coords:t}={}){if(e.coords&&!e.coordGrammar){e.type||=`function`,e.name||=`color`,e.coordGrammar=y(e.coords);let n=Object.entries(t).map(([t,n],r)=>{let i=e.coordGrammar[r][0],a=n.range||n.refRange,o=i.range,s=``;return i==``?(o=[0,100],s=`%`):i==``&&(s=`deg`),{fromRange:a,toRange:o,suffix:s}});e.serializeCoords=(e,t)=>e.map((e,r)=>{let{fromRange:i,toRange:a,suffix:o}=n[r];return i&&a&&(e=v(i,a,e)),e=l(e,{precision:t,unit:o}),e})}return e}var P=new M({id:`xyz-d65`,name:`XYZ D65`,coords:{x:{name:`X`},y:{name:`Y`},z:{name:`Z`}},white:`D65`,formats:{color:{ids:[`xyz-d65`,`xyz`]}},aliases:[`xyz`]}),F=class extends M{constructor(e){e.coords||={r:{range:[0,1],name:`Red`},g:{range:[0,1],name:`Green`},b:{range:[0,1],name:`Blue`}},e.base||=P,e.toXYZ_M&&e.fromXYZ_M&&(e.toBase??=t=>{let n=o(e.toXYZ_M,t);return this.white!==this.base.white&&(n=k(this.white,this.base.white,n)),n},e.fromBase??=t=>(t=k(this.base.white,this.white,t),o(e.fromXYZ_M,t))),e.referred??=`display`,super(e)}};function I(e,t){return e=j(e),!t||e.space.equals(t)?e.coords.slice():(t=M.get(t),t.from(e))}function L(e,t){e=j(e);let{space:n,index:r}=M.resolveCoord(t,e.space),i=I(e,n);return i[r]}function oe(e,t,n){return e=j(e),t=M.get(t),e.coords=t.to(e.space,n),e}oe.returns=`color`;function R(e,t,n){if(e=j(e),arguments.length===2&&c(arguments[1])===`object`){let t=arguments[1];for(let n in t)R(e,n,t[n])}else{typeof n==`function`&&(n=n(L(e,t)));let{space:r,index:i}=M.resolveCoord(t,e.space),a=I(e,r);a[i]=n,oe(e,r,a)}return e}R.returns=`color`;var se=new M({id:`xyz-d50`,name:`XYZ D50`,white:`D50`,base:P,fromBase:e=>k(P.white,`D50`,e),toBase:e=>k(`D50`,P.white,e)});const ce=216/24389,le=24/116,ue=24389/27;let de=O.D50;var z=new M({id:`lab`,name:`Lab`,coords:{l:{refRange:[0,100],name:`Lightness`},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:de,base:se,fromBase(e){let t=e.map((e,t)=>e/de[t]),n=t.map(e=>e>ce?Math.cbrt(e):(ue*e+16)/116);return[116*n[1]-16,500*(n[0]-n[1]),200*(n[1]-n[2])]},toBase(e){let t=[];t[1]=(e[0]+16)/116,t[0]=e[1]/500+t[1],t[2]=t[1]-e[2]/200;let n=[t[0]>le?t[0]**3:(116*t[0]-16)/ue,e[0]>8?((e[0]+16)/116)**3:e[0]/ue,t[2]>le?t[2]**3:(116*t[2]-16)/ue];return n.map((e,t)=>e*de[t])},formats:{lab:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});function B(e){return(e%360+360)%360}function fe(e,t){if(e===`raw`)return t;let[n,r]=t.map(B),i=r-n;return e===`increasing`?i<0&&(r+=360):e===`decreasing`?i>0&&(n+=360):e===`longer`?-1800?n+=360:r+=360):e===`shorter`&&(i>180?n+=360:i<-180&&(r+=360)),[n,r]}var pe=new M({id:`lch`,name:`LCH`,coords:{l:{refRange:[0,100],name:`Lightness`},c:{refRange:[0,150],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:z,fromBase(e){let[t,n,r]=e,i,a=.02;return i=Math.abs(n) | `,` | `,` | `]}}});const me=25**7,he=Math.PI,ge=180/he,V=he/180;function _e(e){let t=e*e,n=t*t*t*e;return n}function ve(e,t,{kL:n=1,kC:r=1,kH:i=1}={}){[e,t]=j([e,t]);let[a,o,s]=z.from(e),c=pe.from(z,[a,o,s])[1],[l,u,d]=z.from(t),f=pe.from(z,[l,u,d])[1];c<0&&(c=0),f<0&&(f=0);let p=(c+f)/2,m=_e(p),h=.5*(1-Math.sqrt(m/(m+me))),g=(1+h)*o,_=(1+h)*u,v=Math.sqrt(g**2+s**2),y=Math.sqrt(_**2+d**2),b=g===0&&s===0?0:Math.atan2(s,g),x=_===0&&d===0?0:Math.atan2(d,_);b<0&&(b+=2*he),x<0&&(x+=2*he),b*=ge,x*=ge;let S=l-a,C=y-v,w=x-b,T=b+x,ee=Math.abs(w),E;v*y===0?E=0:ee<=180?E=w:w>180?E=w-360:w<-180?E=w+360:D.warn(`the unthinkable has happened`);let O=2*Math.sqrt(y*v)*Math.sin(E*V/2),te=(a+l)/2,k=(v+y)/2,ne=_e(k),A;A=v*y===0?T:ee<=180?T/2:T<360?(T+360)/2:(T-360)/2;let re=(te-50)**2,ie=1+.015*re/Math.sqrt(20+re),M=1+.045*k,N=1;N-=.17*Math.cos((A-30)*V),N+=.24*Math.cos(2*A*V),N+=.32*Math.cos((3*A+6)*V),N-=.2*Math.cos((4*A-63)*V);let ae=1+.015*k*N,P=30*Math.exp(-1*((A-275)/25)**2),F=2*Math.sqrt(ne/(ne+me)),I=-1*Math.sin(2*P*V)*F,L=(S/(n*ie))**2;return L+=(C/(r*M))**2,L+=(O/(i*ae))**2,L+=I*(C/(r*M))*(O/(i*ae)),Math.sqrt(L)}const ye=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],be=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],xe=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],Se=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]];var H=new M({id:`oklab`,name:`Oklab`,coords:{l:{refRange:[0,1],name:`Lightness`},a:{refRange:[-.4,.4]},b:{refRange:[-.4,.4]}},white:`D65`,base:P,fromBase(e){let t=o(ye,e),n=t.map(e=>Math.cbrt(e));return o(xe,n)},toBase(e){let t=o(Se,e),n=t.map(e=>e**3);return o(be,n)},formats:{oklab:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});function Ce(e,t){[e,t]=j([e,t]);let[n,r,i]=H.from(e),[a,o,s]=H.from(t),c=n-a,l=r-o,u=i-s;return Math.sqrt(c**2+l**2+u**2)}const we=75e-6;function U(e,t,{epsilon:n=we}={}){e=j(e),t||=e.space,t=M.get(t);let r=e.coords;return t!==e.space&&(r=t.from(e)),t.inGamut(r,{epsilon:n})}function W(e){return{space:e.space,coords:e.coords.slice(),alpha:e.alpha}}function Te(e,t,n=`lab`){n=M.get(n);let r=n.from(e),i=n.from(t);return Math.sqrt(r.reduce((e,t,n)=>{let r=i[n];return isNaN(t)||isNaN(r)?e:e+(r-t)**2},0))}function Ee(e,t){return Te(e,t,`lab`)}const De=Math.PI,Oe=De/180;function ke(e,t,{l:n=2,c:r=1}={}){[e,t]=j([e,t]);let[i,a,o]=z.from(e),[,s,c]=pe.from(z,[i,a,o]),[l,u,d]=z.from(t),f=pe.from(z,[l,u,d])[1];s<0&&(s=0),f<0&&(f=0);let p=i-l,m=s-f,h=a-u,g=o-d,_=h**2+g**2-m**2,v=.511;i>=16&&(v=.040975*i/(1+.01765*i));let y=.0638*s/(1+.0131*s)+.638,b;Number.isNaN(c)&&(c=0),b=c>=164&&c<=345?.56+Math.abs(.2*Math.cos((c+168)*Oe)):.36+Math.abs(.4*Math.cos((c+35)*Oe));let x=s**4,S=Math.sqrt(x/(x+1900)),C=y*(S*b+1-S),w=(p/(n*v))**2;return w+=(m/(r*y))**2,w+=_/C**2,Math.sqrt(w)}const Ae=203;var je=new M({id:`xyz-abs-d65`,cssId:`--xyz-abs-d65`,name:`Absolute XYZ D65`,coords:{x:{refRange:[0,9504.7],name:`Xa`},y:{refRange:[0,1e4],name:`Ya`},z:{refRange:[0,10888.3],name:`Za`}},base:P,fromBase(e){return e.map(e=>Math.max(e*Ae,0))},toBase(e){return e.map(e=>Math.max(e/Ae,0))}});const Me=1.15,Ne=.66,Pe=2610/2**14,Fe=2**14/2610,Ie=3424/2**12,Le=2413/2**7,Re=2392/2**7,ze=1.7*2523/2**5,Be=2**5/(1.7*2523),Ve=-.56,He=16295499532821565e-27,Ue=[[.41478972,.579999,.014648],[-.20151,1.120649,.0531008],[-.0166008,.2648,.6684799]],We=[[1.9242264357876067,-1.0047923125953657,.037651404030618],[.35031676209499907,.7264811939316552,-.06538442294808501],[-.09098281098284752,-.3127282905230739,1.5227665613052603]],Ge=[[.5,.5,0],[3.524,-4.066708,.542708],[.199076,1.096799,-1.295875]],Ke=[[1,.1386050432715393,.05804731615611886],[.9999999999999999,-.1386050432715393,-.05804731615611886],[.9999999999999998,-.09601924202631895,-.8118918960560388]];var qe=new M({id:`jzazbz`,name:`Jzazbz`,coords:{jz:{refRange:[0,1],name:`Jz`},az:{refRange:[-.5,.5]},bz:{refRange:[-.5,.5]}},base:je,fromBase(e){let[t,n,r]=e,i=Me*t-(Me-1)*r,a=Ne*n-(Ne-1)*t,s=o(Ue,[i,a,r]),c=s.map(function(e){let t=Ie+Le*(e/1e4)**Pe,n=1+Re*(e/1e4)**Pe;return(t/n)**ze}),[l,u,d]=o(Ge,c),f=(1+Ve)*l/(1+Ve*l)-He;return[f,u,d]},toBase(e){let[t,n,r]=e,i=(t+He)/(1+Ve-Ve*(t+He)),a=o(Ke,[i,n,r]),s=a.map(function(e){let t=Ie-e**Be,n=Re*e**Be-Le,r=1e4*(t/n)**Fe;return r}),[c,l,u]=o(We,s),d=(c+(Me-1)*u)/Me,f=(l+(Ne-1)*d)/Ne;return[d,f,u]},formats:{color:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}}),Je=new M({id:`jzczhz`,name:`JzCzHz`,coords:{jz:{refRange:[0,1],name:`Jz`},cz:{refRange:[0,1],name:`Chroma`},hz:{refRange:[0,360],type:`angle`,name:`Hue`}},base:qe,fromBase(e){let[t,n,r]=e,i,a=2e-4;return i=Math.abs(n){let n=S(t*Math.abs(e)*.01,ft);return 400*x(n,e)/(n+27.13)});return n}function St(e,t){let n=100/t*27.13**pt;return e.map(e=>{let t=Math.abs(e);return x(n*S(t/(400-t),pt),e)})}function Ct(e){let t=B(e);t<=G.h[0]&&(t+=360);let n=w(G.h,t)-1,[r,i]=G.h.slice(n,n+2),[a,o]=G.e.slice(n,n+2),s=G.H[n],c=(t-r)/a;return s+100*c/(c+(i-t)/o)}function wt(e){let t=(e%400+400)%400,n=Math.floor(.01*t);t%=100;let[r,i]=G.h.slice(n,n+2),[a,o]=G.e.slice(n,n+2);return B((t*(o*r-a*i)-100*r*o)/(t*(o-a)-100*o))}function Tt(e,t,n,r,i){let a={};a.discounting=i,a.refWhite=e,a.surround=r;let s=e.map(e=>e*100);a.la=t,a.yb=n;let c=s[1],l=o(ht,s);r=vt[a.surround];let u=r[0];a.c=r[1],a.nc=r[2];let d=1/(5*a.la+1),f=d**4;a.fl=f*a.la+.1*(1-f)*(1-f)*Math.cbrt(5*a.la),a.flRoot=a.fl**.25,a.n=a.yb/c,a.z=1.48+Math.sqrt(a.n),a.nbb=.725*a.n**-.2,a.ncb=a.nbb;let p=i?1:Math.max(Math.min(u*(1-1/3.6*Math.exp((-a.la-42)/92)),1),0);a.dRgb=l.map(e=>g(1,c/e,p)),a.dRgbInv=a.dRgb.map(e=>1/e);let m=l.map((e,t)=>e*a.dRgb[t]),h=xt(m,a.fl);return a.aW=a.nbb*(2*h[0]+h[1]+.05*h[2]),a}const Et=Tt(dt,64/Math.PI*.2,20,`average`,!1);function Dt(e,t){if(!(e.J!==void 0^e.Q!==void 0))throw Error(`Conversion requires one and only one: 'J' or 'Q'`);if(!(e.C!==void 0^e.M!==void 0^e.s!==void 0))throw Error(`Conversion requires one and only one: 'C', 'M' or 's'`);if(!(e.h!==void 0^e.H!==void 0))throw Error(`Conversion requires one and only one: 'h' or 'H'`);if(e.J===0||e.Q===0)return[0,0,0];let n=0;n=e.h===void 0?wt(e.H)*bt:B(e.h)*bt;let r=Math.cos(n),i=Math.sin(n),a=0;e.J===void 0?e.Q!==void 0&&(a=.25*t.c*e.Q/((t.aW+4)*t.flRoot)):a=S(e.J,1/2)*.1;let s=0;e.C===void 0?e.M===void 0?e.s!==void 0&&(s=4e-4*e.s**2*(t.aW+4)/t.c):s=e.M/t.flRoot/a:s=e.C/a;let c=S(s*(1.64-.29**t.n)**-.73,10/9),l=.25*(Math.cos(n+2)+3.8),u=t.aW*S(a,2/t.c/t.z),d=5e4/13*t.nc*t.ncb*l,f=u/t.nbb,p=23*(f+.305)*C(c,23*d+c*(11*r+108*i)),m=p*r,h=p*i,g=St(o(_t,[f,m,h]).map(e=>e*1/1403),t.fl);return o(gt,g.map((e,n)=>e*t.dRgbInv[n])).map(e=>e/100)}function Ot(e,t){let n=e.map(e=>e*100),r=xt(o(ht,n).map((e,n)=>e*t.dRgb[n]),t.fl),i=r[0]+(-12*r[1]+r[2])/11,a=(r[0]+r[1]-2*r[2])/9,s=(Math.atan2(a,i)%mt+mt)%mt,c=.25*(Math.cos(s+2)+3.8),l=5e4/13*t.nc*t.ncb*C(c*Math.sqrt(i**2+a**2),r[0]+r[1]+1.05*r[2]+.305),u=S(l,.9)*(1.64-.29**t.n)**.73,d=t.nbb*(2*r[0]+r[1]+.05*r[2]),f=S(d/t.aW,.5*t.c*t.z),p=100*S(f,2),m=4/t.c*f*(t.aW+4)*t.flRoot,h=u*f,g=h*t.flRoot,_=B(s*yt),v=Ct(_),y=50*S(t.c*u/(t.aW+4),1/2);return{J:p,C:h,h:_,s:y,Q:m,M:g,H:v}}var kt=new M({id:`cam16-jmh`,cssId:`--cam16-jmh`,name:`CAM16-JMh`,coords:{j:{refRange:[0,100],name:`J`},m:{refRange:[0,105],name:`Colorfulness`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:P,fromBase(e){let t=Ot(e,Et);return[t.J,t.M,t.h]},toBase(e){return Dt({J:e[0],M:e[1],h:e[2]},Et)}});const At=O.D65,jt=216/24389,Mt=24389/27;function Nt(e){let t=e>jt?Math.cbrt(e):(Mt*e+16)/116;return 116*t-16}function Pt(e){return e>8?((e+16)/116)**3:e/Mt}function Ft(e,t){let[n,r,i]=e,a=[],o=0;if(i===0)return[0,0,0];let s=Pt(i);o=i>0?.00379058511492914*i**2+.608983189401032*i+.9155088574762233:9514440756550361e-21*i**2+.08693057439788597*i-21.928975842194614;let c=2e-12,l=15,u=0,d=1/0;for(;u<=l;){a=Dt({J:o,C:r,h:n},t);let e=Math.abs(a[1]-s);if(e | `,` | `,` | `]}}});const zt=Math.PI/180,Bt=[1,.007,.0228];function Vt(e){e[1]<0&&(e=Rt.fromBase(Rt.toBase(e)));let t=Math.log(Math.max(1+Bt[2]*e[1]*Lt.flRoot,1))/Bt[2],n=e[0]*zt,r=t*Math.cos(n),i=t*Math.sin(n);return[e[2],r,i]}function Ht(e,t){[e,t]=j([e,t]);let[n,r,i]=Vt(Rt.from(e)),[a,o,s]=Vt(Rt.from(t));return Math.sqrt((n-a)**2+(r-o)**2+(i-s)**2)}var K={deltaE76:Ee,deltaECMC:ke,deltaE2000:ve,deltaEJz:Ye,deltaEITP:ut,deltaEOK:Ce,deltaEHCT:Ht};function Ut(e){let t=e?Math.floor(Math.log10(Math.abs(e))):0;return Math.max(parseFloat(`1e${t-2}`),1e-6)}const Wt={hct:{method:`hct.c`,jnd:2,deltaEMethod:`hct`,blackWhiteClamp:{}},"hct-tonal":{method:`hct.c`,jnd:0,deltaEMethod:`hct`,blackWhiteClamp:{channel:`hct.t`,min:0,max:100}}};function q(e,{method:t=D.gamut_mapping,space:n=void 0,deltaEMethod:r=``,jnd:i=2,blackWhiteClamp:a={}}={}){if(e=j(e),s(arguments[1])?n=arguments[1]:n||=e.space,n=M.get(n),U(e,n,{epsilon:0}))return e;let o;if(t===`css`)o=Kt(e,{space:n});else{if(t!==`clip`&&!U(e,n)){Object.prototype.hasOwnProperty.call(Wt,t)&&({method:t,jnd:i,deltaEMethod:r,blackWhiteClamp:a}=Wt[t]);let s=ve;if(r!==``){for(let e in K)if(`deltae`+r.toLowerCase()===e.toLowerCase()){s=K[e];break}}let c=q(J(e,n),{method:`clip`,space:n});if(s(e,c)>i){if(Object.keys(a).length===3){let t=M.resolveCoord(a.channel),n=L(J(e,t.space),t.id);if(u(n)&&(n=0),n>=a.max)return J({space:`xyz-d65`,coords:O.D65},e.space);if(n<=a.min)return J({space:`xyz-d65`,coords:[0,0,0]},e.space)}let r=M.resolveCoord(t),c=r.space,l=r.id,d=J(e,c);d.coords.forEach((e,t)=>{u(e)&&(d.coords[t]=0)});let f=r.range||r.refRange,p=f[0],m=Ut(i),h=p,g=L(d,l);for(;g-h>m;){let e=W(d);e=q(e,{space:n,method:`clip`});let t=s(d,e);t-ie.range||[]);o.coords=o.coords.map((t,n)=>{let[r,i]=e[n];return r!==void 0&&(t=Math.max(r,t)),i!==void 0&&(t=Math.min(t,i)),t})}}return n!==e.space&&(o=J(o,e.space)),e.coords=o.coords,e}q.returns=`color`;const Gt={WHITE:{space:H,coords:[1,0,0]},BLACK:{space:H,coords:[0,0,0]}};function Kt(e,{space:t}={}){let n=.02,r=1e-4;e=j(e),t||=e.space,t=M.get(t);let i=M.get(`oklch`);if(t.isUnbounded)return J(e,t);let a=J(e,i),o=a.coords[0];if(o>=1){let n=J(Gt.WHITE,t);return n.alpha=e.alpha,J(n,t)}if(o<=0){let n=J(Gt.BLACK,t);return n.alpha=e.alpha,J(n,t)}if(U(a,t,{epsilon:0}))return J(a,t);function s(e){let n=J(e,t),r=Object.values(t.coords);return n.coords=n.coords.map((e,t)=>{if(`range`in r[t]){let[n,i]=r[t].range;return b(n,e,i)}return e}),n}let c=0,l=a.coords[1],u=!0,d=W(a),f=s(d),p=Ce(f,d);if(pr;){let e=(c+l)/2;if(d.coords[1]=e,u&&U(d,t,{epsilon:0}))c=e;else if(f=s(d),p=Ce(f,d),pl(e,{precision:t})));let i=[...s];if(r===`color`){let t=n.id||n.ids?.[0]||e.space.id;i.unshift(t)}let o=e.alpha;t!==null&&(o=l(o,{precision:t}));let c=e.alpha>=1||n.noAlpha?``:`${n.commas?`,`:` /`} ${o}`;a=`${r}(${i.join(n.commas?`, `:` `)}${c})`}return a}const Jt=[[.6369580483012914,.14461690358620832,.1688809751641721],[.2627002120112671,.6779980715188708,.05930171646986196],[0,.028072693049087428,1.060985057710791]],Yt=[[1.716651187971268,-.355670783776392,-.25336628137366],[-.666684351832489,1.616481236634939,.0157685458139111],[.017639857445311,-.042770613257809,.942103121235474]];var Xt=new F({id:`rec2020-linear`,cssId:`--rec2020-linear`,name:`Linear REC.2020`,white:`D65`,toXYZ_M:Jt,fromXYZ_M:Yt});const Zt=1.09929682680944,Qt=.018053968510807;var $t=new F({id:`rec2020`,name:`REC.2020`,base:Xt,toBase(e){return e.map(function(e){return e=Qt?Zt*e**.45-(Zt-1):4.5*e})}});const en=[[.4865709486482162,.26566769316909306,.1982172852343625],[.2289745640697488,.6917385218365064,.079286914093745],[0,.04511338185890264,1.043944368900976]],tn=[[2.493496911941425,-.9313836179191239,-.40271078445071684],[-.8294889695615747,1.7626640603183463,.023624685841943577],[.03584583024378447,-.07617238926804182,.9568845240076872]];var nn=new F({id:`p3-linear`,cssId:`--display-p3-linear`,name:`Linear P3`,white:`D65`,toXYZ_M:en,fromXYZ_M:tn});const rn=[[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Y=[[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]];var an=new F({id:`srgb-linear`,name:`Linear sRGB`,white:`D65`,toXYZ_M:rn,fromXYZ_M:Y}),on={aliceblue:[240/255,248/255,1],antiquewhite:[250/255,235/255,215/255],aqua:[0,1,1],aquamarine:[127/255,1,212/255],azure:[240/255,1,1],beige:[245/255,245/255,220/255],bisque:[1,228/255,196/255],black:[0,0,0],blanchedalmond:[1,235/255,205/255],blue:[0,0,1],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,1,0],chocolate:[210/255,105/255,30/255],coral:[1,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[1,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0,1,1],darkblue:[0,0,139/255],darkcyan:[0,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0,100/255,0],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[1,140/255,0],darkorchid:[153/255,50/255,204/255],darkred:[139/255,0,0],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0,206/255,209/255],darkviolet:[148/255,0,211/255],deeppink:[1,20/255,147/255],deepskyblue:[0,191/255,1],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,1],firebrick:[178/255,34/255,34/255],floralwhite:[1,250/255,240/255],forestgreen:[34/255,139/255,34/255],fuchsia:[1,0,1],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,1],gold:[1,215/255,0],goldenrod:[218/255,165/255,32/255],gray:[128/255,128/255,128/255],green:[0,128/255,0],greenyellow:[173/255,1,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,1,240/255],hotpink:[1,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0,130/255],ivory:[1,1,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[1,240/255,245/255],lawngreen:[124/255,252/255,0],lemonchiffon:[1,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,1,1],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[1,182/255,193/255],lightsalmon:[1,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,153/255],lightslategrey:[119/255,136/255,153/255],lightsteelblue:[176/255,196/255,222/255],lightyellow:[1,1,224/255],lime:[0,1,0],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[1,0,1],maroon:[128/255,0,0],mediumaquamarine:[102/255,205/255,170/255],mediumblue:[0,0,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0,250/255,154/255],mediumturquoise:[72/255,209/255,204/255],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,1,250/255],mistyrose:[1,228/255,225/255],moccasin:[1,228/255,181/255],navajowhite:[1,222/255,173/255],navy:[0,0,128/255],oldlace:[253/255,245/255,230/255],olive:[128/255,128/255,0],olivedrab:[107/255,142/255,35/255],orange:[1,165/255,0],orangered:[1,69/255,0],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[1,239/255,213/255],peachpuff:[1,218/255,185/255],peru:[205/255,133/255,63/255],pink:[1,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],purple:[128/255,0,128/255],rebeccapurple:[102/255,51/255,153/255],red:[1,0,0],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[1,245/255,238/255],sienna:[160/255,82/255,45/255],silver:[192/255,192/255,192/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[1,250/255,250/255],springgreen:[0,1,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],teal:[0,128/255,128/255],thistle:[216/255,191/255,216/255],tomato:[1,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],white:[1,1,1],whitesmoke:[245/255,245/255,245/255],yellow:[1,1,0],yellowgreen:[154/255,205/255,50/255]};let sn=[,,,].fill(` | [0, 255]`),cn=[,,,].fill(`[0, 255]`);var X=new F({id:`srgb`,name:`sRGB`,base:an,fromBase:e=>e.map(e=>{let t=e<0?-1:1,n=e*t;return n>.0031308?t*(1.055*n**(1/2.4)-.055):12.92*e}),toBase:e=>e.map(e=>{let t=e<0?-1:1,n=e*t;return n<=.04045?e/12.92:t*((n+.055)/1.055)**2.4}),formats:{rgb:{coords:sn},rgb_number:{name:`rgb`,commas:!0,coords:cn,noAlpha:!0},color:{},rgba:{coords:sn,commas:!0,lastAlpha:!0},rgba_number:{name:`rgba`,commas:!0,coords:cn},hex:{type:`custom`,toGamut:!0,test:e=>/^#([a-f0-9]{3,4}){1,2}$/i.test(e),parse(e){e.length<=5&&(e=e.replace(/[a-f0-9]/gi,`$&$&`));let t=[];return e.replace(/[a-f0-9]{2}/gi,e=>{t.push(parseInt(e,16)/255)}),{spaceId:`srgb`,coords:t.slice(0,3),alpha:t.slice(3)[0]}},serialize:(e,t,{collapse:n=!0}={})=>{t<1&&e.push(t),e=e.map(e=>Math.round(e*255));let r=n&&e.every(e=>e%17==0),i=e.map(e=>r?(e/17).toString(16):e.toString(16).padStart(2,`0`)).join(``);return`#`+i}},keyword:{type:`custom`,test:e=>/^[a-z]+$/i.test(e),parse(e){e=e.toLowerCase();let t={spaceId:`srgb`,coords:null,alpha:1};if(e===`transparent`?(t.coords=on.black,t.alpha=0):t.coords=on[e],t.coords)return t}}}}),ln=new F({id:`p3`,cssId:`display-p3`,name:`P3`,base:nn,fromBase:X.fromBase,toBase:X.toBase});D.display_space=X;let un;if(typeof CSS<`u`&&CSS.supports)for(let e of[z,$t,ln]){let t=e.getMinCoords(),n={space:e,coords:t,alpha:1},r=qt(n);if(CSS.supports(`color`,r)){D.display_space=e;break}}function dn(e,{space:t=D.display_space,...n}={}){let r=qt(e,n);if(typeof CSS>`u`||CSS.supports(`color`,r)||!D.display_space)r=new String(r),r.color=e;else{let i=e,a=e.coords.some(u)||u(e.alpha);if(a&&!(un??=CSS.supports(`color`,`hsl(none 50% 50%)`))&&(i=W(e),i.coords=i.coords.map(d),i.alpha=d(i.alpha),r=qt(i,n),CSS.supports(`color`,r)))return r=new String(r),r.color=i,r;i=J(i,t),r=new String(qt(i,n)),r.color=i}return r}function fn(e,t){return e=j(e),t=j(t),e.space===t.space&&e.alpha===t.alpha&&e.coords.every((e,n)=>e===t.coords[n])}function Z(e){return L(e,[P,`y`])}function pn(e,t){R(e,[P,`y`],t)}function mn(e){Object.defineProperty(e.prototype,`luminance`,{get(){return Z(this)},set(e){pn(this,e)}})}var hn=Object.freeze({__proto__:null,getLuminance:Z,register:mn,setLuminance:pn});function gn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);return r>n&&([n,r]=[r,n]),(n+.05)/(r+.05)}const _n=.56,vn=.57,yn=.62,bn=.65,xn=.022,Sn=1.414,Cn=.1,wn=5e-4,Tn=1.14,En=.027,Dn=1.14;function On(e){return e>=xn?e:e+(xn-e)**Sn}function kn(e){let t=e<0?-1:1,n=Math.abs(e);return t*n**2.4}function An(e,t){t=j(t),e=j(e);let n,r,i,a,o,s;t=J(t,`srgb`),[a,o,s]=t.coords;let c=kn(a)*.2126729+kn(o)*.7151522+kn(s)*.072175;e=J(e,`srgb`),[a,o,s]=e.coords;let l=kn(a)*.2126729+kn(o)*.7151522+kn(s)*.072175,u=On(c),d=On(l),f=d>u;return Math.abs(d-u)0?r-En:r+En,i*100}function jn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);r>n&&([n,r]=[r,n]);let i=n+r;return i===0?0:(n-r)/i}const Mn=5e4;function Nn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);return r>n&&([n,r]=[r,n]),r===0?Mn:(n-r)/r}function Pn(e,t){e=j(e),t=j(t);let n=L(e,[z,`l`]),r=L(t,[z,`l`]);return Math.abs(n-r)}const Fn=216/24389,In=24/116,Ln=24389/27;let Rn=O.D65;var zn=new M({id:`lab-d65`,name:`Lab D65`,coords:{l:{refRange:[0,100],name:`Lightness`},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:Rn,base:P,fromBase(e){let t=e.map((e,t)=>e/Rn[t]),n=t.map(e=>e>Fn?Math.cbrt(e):(Ln*e+16)/116);return[116*n[1]-16,500*(n[0]-n[1]),200*(n[1]-n[2])]},toBase(e){let t=[];t[1]=(e[0]+16)/116,t[0]=e[1]/500+t[1],t[2]=t[1]-e[2]/200;let n=[t[0]>In?t[0]**3:(116*t[0]-16)/Ln,e[0]>8?((e[0]+16)/116)**3:e[0]/Ln,t[2]>In?t[2]**3:(116*t[2]-16)/Ln];return n.map((e,t)=>e*Rn[t])},formats:{"lab-d65":{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});const Bn=5**.5*.5+.5;function Vn(e,t){e=j(e),t=j(t);let n=L(e,[zn,`l`]),r=L(t,[zn,`l`]),i=Math.abs(n**+Bn-r**+Bn),a=i**(1/Bn)*Math.SQRT2-40;return a<7.5?0:a}var Hn=Object.freeze({__proto__:null,contrastAPCA:An,contrastDeltaPhi:Vn,contrastLstar:Pn,contrastMichelson:jn,contrastWCAG21:gn,contrastWeber:Nn});function Un(e,t,n={}){s(n)&&(n={algorithm:n});let{algorithm:r,...i}=n;if(!r){let e=Object.keys(Hn).map(e=>e.replace(/^contrast/,``)).join(`, `);throw TypeError(`contrast() function needs a contrast algorithm. Please specify one of: ${e}`)}for(let n in e=j(e),t=j(t),Hn)if(`contrast`+r.toLowerCase()===n.toLowerCase())return Hn[n](e,t,i);throw TypeError(`Unknown contrast algorithm: ${r}`)}function Wn(e){let[t,n,r]=I(e,P),i=t+15*n+3*r;return[4*t/i,9*n/i]}function Gn(e){let[t,n,r]=I(e,P),i=t+n+r;return[t/i,n/i]}function Kn(e){Object.defineProperty(e.prototype,`uv`,{get(){return Wn(this)}}),Object.defineProperty(e.prototype,`xy`,{get(){return Gn(this)}})}var qn=Object.freeze({__proto__:null,register:Kn,uv:Wn,xy:Gn});function Jn(e,t,n={}){s(n)&&(n={method:n});let{method:r=D.deltaE,...i}=n;for(let n in K)if(`deltae`+r.toLowerCase()===n.toLowerCase())return K[n](e,t,i);throw TypeError(`Unknown deltaE method: ${r}`)}function Yn(e,t=.25){let n=M.get(`oklch`,`lch`),r=[n,`l`];return R(e,r,e=>e*(1+t))}function Xn(e,t=.25){let n=M.get(`oklch`,`lch`),r=[n,`l`];return R(e,r,e=>e*(1-t))}var Zn=Object.freeze({__proto__:null,darken:Xn,lighten:Yn});function Qn(e,t,n=.5,r={}){[e,t]=[j(e),j(t)],c(n)===`object`&&([n,r]=[.5,n]);let i=er(e,t,r);return i(n)}function $n(e,t,n={}){let r;tr(e)&&([r,n]=[e,t],[e,t]=r.rangeArgs.colors);let{maxDeltaE:i,deltaEMethod:a,steps:o=2,maxSteps:s=1e3,...c}=n;r||([e,t]=[j(e),j(t)],r=er(e,t,c));let l=Jn(e,t),u=i>0?Math.max(o,Math.ceil(l/i)+1):o,d=[];if(s!==void 0&&(u=Math.min(u,s)),u===1)d=[{p:.5,color:r(.5)}];else{let e=1/(u-1);d=Array.from({length:u},(t,n)=>{let i=n*e;return{p:i,color:r(i)}})}if(i>0){let e=d.reduce((e,t,n)=>{if(n===0)return 0;let r=Jn(t.color,d[n-1].color,a);return Math.max(e,r)},0);for(;e>i;){e=0;for(let t=1;te.color),d}function er(e,t,n={}){if(tr(e)){let[n,r]=[e,t];return er(...n.rangeArgs.colors,{...n.rangeArgs.options,...r})}let{space:r,outputSpace:i,progression:a,premultiplied:o}=n;e=j(e),t=j(t),e=W(e),t=W(t);let s={colors:[e,t],options:n};if(r=r?M.get(r):M.registry[D.interpolationSpace]||e.space,i=i?M.get(i):r,e=J(e,r),t=J(t,r),e=q(e),t=q(t),r.coords.h&&r.coords.h.type===`angle`){let i=n.hue=n.hue||`shorter`,a=[r,`h`],[o,s]=[L(e,a),L(t,a)];isNaN(o)&&!isNaN(s)?o=s:isNaN(s)&&!isNaN(o)&&(s=o),[o,s]=fe(i,[o,s]),R(e,a,o),R(t,a,s)}return o&&(e.coords=e.coords.map(t=>t*e.alpha),t.coords=t.coords.map(e=>e*t.alpha)),Object.assign(n=>{n=a?a(n):n;let s=e.coords.map((e,r)=>{let i=t.coords[r];return g(e,i,n)}),c=g(e.alpha,t.alpha,n),l={space:r,coords:s,alpha:c};return o&&(l.coords=l.coords.map(e=>e/c)),i!==r&&(l=J(l,i)),l},{rangeArgs:s})}function tr(e){return c(e)===`function`&&!!e.rangeArgs}D.interpolationSpace=`lab`;function nr(e){e.defineFunction(`mix`,Qn,{returns:`color`}),e.defineFunction(`range`,er,{returns:`function`}),e.defineFunction(`steps`,$n,{returns:`array`})}var rr=Object.freeze({__proto__:null,isRange:tr,mix:Qn,range:er,register:nr,steps:$n}),ir=new M({id:`hsl`,name:`HSL`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:X,fromBase:e=>{let t=Math.max(...e),n=Math.min(...e),[r,i,a]=e,[o,s,c]=[NaN,0,(n+t)/2],l=t-n;if(l!==0){switch(s=c===0||c===1?0:(t-c)/Math.min(c,1-c),t){case r:o=(i-a)/l+(i=360&&(o-=360),[o,s*100,c*100]},toBase:e=>{let[t,n,r]=e;t%=360,t<0&&(t+=360),n/=100,r/=100;function i(e){let i=(e+t/30)%12,a=n*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(i-3,9-i,1))}return[i(0),i(8),i(4)]},formats:{hsl:{coords:[` | `,``,``]},hsla:{coords:[` | `,``,``],commas:!0,lastAlpha:!0}}}),ar=new M({id:`hsv`,name:`HSV`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},v:{range:[0,100],name:`Value`}},base:ir,fromBase(e){let[t,n,r]=e;n/=100,r/=100;let i=r+n*Math.min(r,1-r);return[t,i===0?0:200*(1-r/i),100*i]},toBase(e){let[t,n,r]=e;n/=100,r/=100;let i=r*(1-n/2);return[t,i===0||i===1?0:(r-i)/Math.min(i,1-i)*100,i*100]},formats:{color:{id:`--hsv`,coords:[` | `,` | `,` | `]}}}),or=new M({id:`hwb`,name:`HWB`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},w:{range:[0,100],name:`Whiteness`},b:{range:[0,100],name:`Blackness`}},base:ar,fromBase(e){let[t,n,r]=e;return[t,r*(100-n)/100,100-r]},toBase(e){let[t,n,r]=e;n/=100,r/=100;let i=n+r;if(i>=1){let e=n/i;return[t,0,e*100]}let a=1-r,o=a===0?0:1-n/a;return[t,o*100,a*100]},formats:{hwb:{coords:[` | `,` | `,` | `]}}});const sr=[[.5766690429101305,.1855582379065463,.1882286462349947],[.29734497525053605,.6273635662554661,.07529145849399788],[.02703136138641234,.07068885253582723,.9913375368376388]],cr=[[2.0415879038107465,-.5650069742788596,-.34473135077832956],[-.9692436362808795,1.8759675015077202,.04155505740717557],[.013444280632031142,-.11836239223101838,1.0151749943912054]];var lr=new F({id:`a98rgb-linear`,cssId:`--a98-rgb-linear`,name:`Linear Adobe® 98 RGB compatible`,white:`D65`,toXYZ_M:sr,fromXYZ_M:cr}),ur=new F({id:`a98rgb`,cssId:`a98-rgb`,name:`Adobe® 98 RGB compatible`,base:lr,toBase:e=>e.map(e=>Math.abs(e)**(563/256)*Math.sign(e)),fromBase:e=>e.map(e=>Math.abs(e)**(256/563)*Math.sign(e))});const dr=[[.7977666449006423,.13518129740053308,.0313477341283922],[.2880748288194013,.711835234241873,8993693872564e-17],[0,0,.8251046025104602]],fr=[[1.3457868816471583,-.25557208737979464,-.05110186497554526],[-.5446307051249019,1.5082477428451468,.02052744743642139],[0,0,1.2119675456389452]];var pr=new F({id:`prophoto-linear`,cssId:`--prophoto-rgb-linear`,name:`Linear ProPhoto`,white:`D50`,base:se,toXYZ_M:dr,fromXYZ_M:fr});const mr=1/512,hr=16/512;var gr=new F({id:`prophoto`,cssId:`prophoto-rgb`,name:`ProPhoto`,base:pr,toBase(e){return e.map(e=>ee>=mr?e**(1/1.8):16*e)}}),_r=new M({id:`oklch`,name:`Oklch`,coords:{l:{refRange:[0,1],name:`Lightness`},c:{refRange:[0,.4],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},white:`D65`,base:H,fromBase(e){let[t,n,r]=e,i,a=2e-4;return i=Math.abs(n) | `,` | [0,1]`,` | `]}}});let vr=O.D65;const yr=216/24389,br=24389/27,[xr,Sr]=Wn({space:P,coords:vr});var Cr=new M({id:`luv`,name:`Luv`,coords:{l:{refRange:[0,100],name:`Lightness`},u:{refRange:[-215,215]},v:{refRange:[-215,215]}},white:vr,base:P,fromBase(e){let t=[d(e[0]),d(e[1]),d(e[2])],n=t[1],[r,i]=Wn({space:P,coords:t});if(!Number.isFinite(r)||!Number.isFinite(i))return[0,0,0];let a=n<=yr?br*n:116*Math.cbrt(n)-16;return[a,13*a*(r-xr),13*a*(i-Sr)]},toBase(e){let[t,n,r]=e;if(t===0||u(t))return[0,0,0];n=d(n),r=d(r);let i=n/(13*t)+xr,a=r/(13*t)+Sr,o=t<=8?t/br:((t+16)/116)**3;return[o*(9*i/(4*a)),o,o*((12-3*i-20*a)/(4*a))]},formats:{color:{id:`--luv`,coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}}),wr=new M({id:`lchuv`,name:`LChuv`,coords:{l:{refRange:[0,100],name:`Lightness`},c:{refRange:[0,220],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:Cr,fromBase(e){let[t,n,r]=e,i,a=.02;return i=Math.abs(n) | `,` | `,` | `]}}});const Tr=216/24389,Er=24389/27,Dr=Y[0][0],Or=Y[0][1],kr=Y[0][2],Ar=Y[1][0],jr=Y[1][1],Mr=Y[1][2],Nr=Y[2][0],Pr=Y[2][1],Fr=Y[2][2];function Ir(e,t,n){let r=t/(Math.sin(n)-e*Math.cos(n));return r<0?1/0:r}function Lr(e){let t=(e+16)**3/1560896,n=t>Tr?t:e/Er,r=n*(284517*Dr-94839*kr),i=n*(838422*kr+769860*Or+731718*Dr),a=n*(632260*kr-126452*Or),o=n*(284517*Ar-94839*Mr),s=n*(838422*Mr+769860*jr+731718*Ar),c=n*(632260*Mr-126452*jr),l=n*(284517*Nr-94839*Fr),u=n*(838422*Fr+769860*Pr+731718*Nr),d=n*(632260*Fr-126452*Pr);return{r0s:r/a,r0i:i*e/a,r1s:r/(a+126452),r1i:(i-769860)*e/(a+126452),g0s:o/c,g0i:s*e/c,g1s:o/(c+126452),g1i:(s-769860)*e/(c+126452),b0s:l/d,b0i:u*e/d,b1s:l/(d+126452),b1i:(u-769860)*e/(d+126452)}}function Rr(e,t){let n=t/360*Math.PI*2,r=Ir(e.r0s,e.r0i,n),i=Ir(e.r1s,e.r1i,n),a=Ir(e.g0s,e.g0i,n),o=Ir(e.g1s,e.g1i,n),s=Ir(e.b0s,e.b0i,n),c=Ir(e.b1s,e.b1i,n);return Math.min(r,i,a,o,s,c)}var zr=new M({id:`hsluv`,name:`HSLuv`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:wr,gamutSpace:X,fromBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(t>99.9999999)i=0,t=100;else if(t<1e-8)i=0,t=0;else{let e=Lr(t),a=Rr(e,r);i=n/a*100}return[r,i,t]},toBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(r>99.9999999)r=100,i=0;else if(r<1e-8)r=0,i=0;else{let e=Lr(r),a=Rr(e,t);i=a/100*n}return[r,i,t]},formats:{color:{id:`--hsluv`,coords:[` | `,` | `,` | `]}}});Y[0][0],Y[0][1],Y[0][2],Y[1][0],Y[1][1],Y[1][2],Y[2][0],Y[2][1],Y[2][2];function Q(e,t){return Math.abs(t)/Math.sqrt(e**2+1)}function Br(e){let t=Q(e.r0s,e.r0i),n=Q(e.r1s,e.r1i),r=Q(e.g0s,e.g0i),i=Q(e.g1s,e.g1i),a=Q(e.b0s,e.b0i),o=Q(e.b1s,e.b1i);return Math.min(t,n,r,i,a,o)}var Vr=new M({id:`hpluv`,name:`HPLuv`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:wr,gamutSpace:`self`,fromBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(t>99.9999999)i=0,t=100;else if(t<1e-8)i=0,t=0;else{let e=Lr(t),r=Br(e);i=n/r*100}return[r,i,t]},toBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(r>99.9999999)r=100,i=0;else if(r<1e-8)r=0,i=0;else{let e=Lr(r),t=Br(e);i=t/100*n}return[r,i,t]},formats:{color:{id:`--hpluv`,coords:[` | `,` | `,` | `]}}});const Hr=203,Ur=2610/2**14,Wr=2**14/2610,Gr=2523/2**5,Kr=2**5/2523,qr=3424/2**12,Jr=2413/2**7,Yr=2392/2**7;var Xr=new F({id:`rec2100pq`,cssId:`rec2100-pq`,name:`REC.2100-PQ`,base:Xt,toBase(e){return e.map(function(e){let t=(Math.max(e**Kr-qr,0)/(Jr-Yr*e**Kr))**Wr;return t*1e4/Hr})},fromBase(e){return e.map(function(e){let t=Math.max(e*Hr/1e4,0),n=qr+Jr*t**Ur,r=1+Yr*t**Ur;return(n/r)**Gr})}});const Zr=.17883277,Qr=.28466892,$r=.55991073,ei=3.7743;var ti=new F({id:`rec2100hlg`,cssId:`rec2100-hlg`,name:`REC.2100-HLG`,referred:`scene`,base:Xt,toBase(e){return e.map(function(e){return e<=.5?e**2/3*ei:(Math.exp((e-$r)/Zr)+Qr)/12*ei})},fromBase(e){return e.map(function(e){return e/=ei,e<=1/12?Math.sqrt(3*e):Zr*Math.log(12*e-Qr)+$r})}});const ni={};E.add(`chromatic-adaptation-start`,e=>{e.options.method&&(e.M=ii(e.W1,e.W2,e.options.method))}),E.add(`chromatic-adaptation-end`,e=>{e.M||=ii(e.W1,e.W2,e.options.method)});function ri({id:e,toCone_M:t,fromCone_M:n}){ni[e]=arguments[0]}function ii(e,t,n=`Bradford`){let r=ni[n],[i,a,s]=o(r.toCone_M,e),[c,l,u]=o(r.toCone_M,t),d=[[c/i,0,0],[0,l/a,0],[0,0,u/s]],f=o(d,r.toCone_M),p=o(r.fromCone_M,f);return p}ri({id:`von Kries`,toCone_M:[[.40024,.7076,-.08081],[-.2263,1.16532,.0457],[0,0,.91822]],fromCone_M:[[1.8599363874558397,-1.1293816185800916,.21989740959619328],[.3611914362417676,.6388124632850422,-6370596838649899e-21],[0,0,1.0890636230968613]]}),ri({id:`Bradford`,toCone_M:[[.8951,.2664,-.1614],[-.7502,1.7135,.0367],[.0389,-.0685,1.0296]],fromCone_M:[[.9869929054667121,-.14705425642099013,.15996265166373122],[.4323052697233945,.5183602715367774,.049291228212855594],[-.00852866457517732,.04004282165408486,.96848669578755]]}),ri({id:`CAT02`,toCone_M:[[.7328,.4296,-.1624],[-.7036,1.6975,.0061],[.003,.0136,.9834]],fromCone_M:[[1.0961238208355142,-.27886900021828726,.18274517938277307],[.4543690419753592,.4735331543074117,.07209780371722911],[-.009627608738429355,-.00569803121611342,1.0153256399545427]]}),ri({id:`CAT16`,toCone_M:[[.401288,.650173,-.051461],[-.250268,1.204414,.045854],[-.002079,.048952,.953127]],fromCone_M:[[1.862067855087233,-1.0112546305316845,.14918677544445172],[.3875265432361372,.6214474419314753,-.008973985167612521],[-.01584149884933386,-.03412293802851557,1.0499644368778496]]}),Object.assign(O,{A:[1.0985,1,.35585],C:[.98074,1,1.18232],D55:[.95682,1,.92149],D75:[.94972,1,1.22638],E:[1,1,1],F2:[.99186,1,.67393],F7:[.95041,1,1.08747],F11:[1.00962,1,.6435]}),O.ACES=[.32168/.33767,1,.34065/.33767];const ai=[[.6624541811085053,.13400420645643313,.1561876870049078],[.27222871678091454,.6740817658111484,.05368951740793705],[-.005574649490394108,.004060733528982826,1.0103391003129971]],oi=[[1.6410233796943257,-.32480329418479,-.23642469523761225],[-.6636628587229829,1.6153315916573379,.016756347685530137],[.011721894328375376,-.008284441996237409,.9883948585390215]];var si=new F({id:`acescg`,cssId:`--acescg`,name:`ACEScg`,coords:{r:{range:[0,65504],name:`Red`},g:{range:[0,65504],name:`Green`},b:{range:[0,65504],name:`Blue`}},referred:`scene`,white:O.ACES,toXYZ_M:ai,fromXYZ_M:oi});const ci=2**-16,li=-.35828683,ui=(Math.log2(65504)+9.72)/17.52;var di=new F({id:`acescc`,cssId:`--acescc`,name:`ACEScc`,coords:{r:{range:[li,ui],name:`Red`},g:{range:[li,ui],name:`Green`},b:{range:[li,ui],name:`Blue`}},referred:`scene`,base:si,toBase(e){let t=-5.279999999999999/17.52;return e.map(function(e){return e<=t?(2**(e*17.52-9.72)-ci)*2:e1||i===void 0?1:i<0?0:i;for(let e=0;ethis.get(e),set:t=>this.set(e,t)})}get spaceId(){return this.space.id}clone(){return new e(this.space,this.coords,this.alpha)}toJSON(){return{spaceId:this.spaceId,coords:this.coords,alpha:this.alpha}}display(...t){let n=dn(this,...t);return n.color=new e(n.color),n}static get(t,...n){return t instanceof e?t:new e(t,...n)}static defineFunction(t,n,r=n){let{instance:i=!0,returns:a}=r,o=function(...t){let r=n(...t);if(a===`color`)r=e.get(r);else if(a===`function`){let t=r;r=function(...n){let r=t(...n);return e.get(r)},Object.assign(r,t)}else a===`array`&&(r=r.map(t=>e.get(t)));return r};t in e||(e[t]=o),i&&(e.prototype[t]=function(...e){return o(this,...e)})}static defineFunctions(t){for(let n in t)e.defineFunction(n,t[n],t[n])}static extend(exports){if(exports.register)exports.register(e);else for(let n in exports)e.defineFunction(n,exports[n])}};$.defineFunctions({get:L,getAll:I,set:R,setAll:oe,to:J,equals:fn,inGamut:U,toGamut:q,distance:Te,toString:qt}),Object.assign($,{util:T,hooks:E,WHITES:O,Space:M,spaces:M.registry,parse:re,defaults:D});for(let e of Object.keys(fi))M.register(fi[e]);for(let e in M.registry)pi(e,M.registry[e]);E.add(`colorspace-init-end`,e=>{pi(e.id,e),e.aliases?.forEach(t=>{pi(t,e)})});function pi(e,t){let n=e.replace(/-/g,`_`);Object.defineProperty($.prototype,n,{get(){let n=this.getAll(e);return typeof Proxy>`u`?n:new Proxy(n,{has:(e,n)=>{try{return M.resolveCoord([t,n]),!0}catch{}return Reflect.has(e,n)},get:(e,n,r)=>{if(n&&typeof n!=`symbol`&&!(n in e)){let{index:r}=M.resolveCoord([t,n]);if(r>=0)return e[r]}return Reflect.get(e,n,r)},set:(n,r,i,a)=>{if(r&&typeof r!=`symbol`&&!(r in n)||r>=0){let{index:a}=M.resolveCoord([t,r]);if(a>=0)return n[a]=i,this.setAll(e,n),!0}return Reflect.set(n,r,i,a)}})},set(t){this.setAll(e,t)},configurable:!0,enumerable:!0})}$.extend(K),$.extend({deltaE:Jn}),Object.assign($,{deltaEMethods:K}),$.extend(Zn),$.extend({contrast:Un}),$.extend(qn),$.extend(hn),$.extend(rr),$.extend(Hn);function mi(e,t){return async()=>{let n=a(()=>{let t=document.querySelector(e);if(!t)throw Error(`Widgets element not found`);return t},{retry:10,retryDelay:1e3}),r=await n();return window.getComputedStyle(r).getPropertyValue(t)}}function hi(e){return async()=>{if(typeof e==`string`)return e;{let t=n();return t.value?e.dark:e.light}}}function gi(e){async function t(){`document`in globalThis&&globalThis.document!=null&&`window`in globalThis&&globalThis.window!=null&&document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,new $(await e()).to(`srgb`).toString({format:`hex`}))}return{updateThemeColor:t}}export{gi as b,mi as c,hi as d}; \ No newline at end of file diff --git a/assets/together-ai-CFPLADAy.js b/assets/together-ai-CFPLADAy.js new file mode 100644 index 0000000000000000000000000000000000000000..d370346238e97311d252a6e2cf8c34932d53b1be --- /dev/null +++ b/assets/together-ai-CFPLADAy.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`together-ai`;var x=u({__name:`together-ai`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),h([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`togetherapi-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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/together-ai-DhK_y0lS.js b/assets/together-ai-DhK_y0lS.js deleted file mode 100644 index ecb808af9e30346469b46b3f704169cbf7edcd91..0000000000000000000000000000000000000000 --- a/assets/together-ai-DhK_y0lS.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`together-ai`;var x=p({__name:`together-ai`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`togetherapi-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-DzAoitZd.js b/assets/transformers.web-D42P8ZMr.js similarity index 99% rename from assets/transformers.web-DzAoitZd.js rename to assets/transformers.web-D42P8ZMr.js index 9596cdf8094d067f83741aa6d64748b0356db292..bdde0997d56e28a02823c9e82432ef9b310fdb31 100644 --- a/assets/transformers.web-DzAoitZd.js +++ b/assets/transformers.web-D42P8ZMr.js @@ -1,4 +1,4 @@ -import{dI as e,dK as t}from"./index-BOKBAzT0.js";const n=new Map,r=[],i=(e,t,i)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let a=n.get(e);if(a===void 0)n.set(e,{backend:t,priority:i});else if(a.priority>i)return;else if(a.priority===i&&a.backend!==t)throw Error(`cannot register backend "${e}" using priority ${i}`);if(i>=0){let t=r.indexOf(e);t!==-1&&r.splice(t,1);for(let t=0;t{let t=n.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}}},o=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),i=n.length===0?r:n,o,s=[],c=new Set;for(let e of i){let t=await a(e);typeof t==`string`?s.push({name:e,err:t}):(o||=t,o===t&&c.add(e))}if(!o)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[o,new Proxy(e,{get:(e,t)=>t===`executionProviders`?l:Reflect.get(e,t)})]},s=`1.22.0`;let c=`warning`;const l={wasm:{},webgl:{},webgpu:{},versions:{common:s},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}`);c=e}},get logLevel(){return c}};Object.defineProperty(l,`logLevel`,{enumerable:!0});const u=l,d=(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,p(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(p(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return p(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},h=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t,o=[1,r,n,4];return new T({location:`texture`,type:`float32`,texture:e,dims:o,download:i,dispose:a})},g=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new T({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},_=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new T({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},v=(e,t,n)=>new T({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),y=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),b=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]);let x=!1;const S=()=>{if(!x){x=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(y.set(`int64`,BigInt64Array),b.set(BigInt64Array,`int64`)),t&&(y.set(`uint64`,BigUint64Array),b.set(BigUint64Array,`uint64`)),r?(y.set(`float16`,n),b.set(n,`float16`)):y.set(`float16`,Uint16Array)}},C=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new T(e.type,e.data,t);case`cpu-pinned`:return new T({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new T({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new T({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new T({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}};var T=class{constructor(e,t,n){S();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=y.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=y.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=b.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=C(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 m(e,t)}static fromTexture(e,t){return h(e,t)}static fromGpuBuffer(e,t){return g(e,t)}static fromMLTensor(e,t){return _(e,t)}static fromPinnedBuffer(e,t,n){return v(e,t,n)}toDataURL(e){return d(this,e)}toImageData(e){return f(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 w(this,e)}};const E=T,D=(e,t)=>{(l.trace===void 0?!l.wasm.trace:!l.trace)||console.timeStamp(`${e}::ORT::${t}`)},O=(e,t)=>{let n=Error().stack?.split(/\r\n|\r|\n/g)||[],r=!1;for(let i=0;i{(l.trace===void 0?!l.wasm.trace:!l.trace)||O(`BEGIN`,e)},A=e=>{(l.trace===void 0?!l.wasm.trace:!l.trace)||O(`END`,e)};var ee=class e{constructor(e){this.handler=e}async run(e,t,n){k();let r={},i={};if(typeof e!=`object`||!e||e instanceof E||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 E)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 E)&&(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 E?s[e]=t:s[e]=new E(t.type,t.data,t.dims)}return A(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){k();let a,s={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)s=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)s=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,o=0,c=t.byteLength;if(typeof n==`object`&&n)s=n;else if(typeof n==`number`){if(o=n,!Number.isSafeInteger(o))throw RangeError(`'byteOffset' must be an integer.`);if(o<0||o>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-o,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||o+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-o}].`);if(typeof i==`object`&&i)s=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,o,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[c,l]=await o(s),u=await c.createInferenceSessionHandler(a,l);return A(),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 te=ee;var ne={};e(ne,{InferenceSession:()=>te,TRACE:()=>D,TRACE_FUNC_BEGIN:()=>k,TRACE_FUNC_END:()=>A,Tensor:()=>E,env:()=>u,registerBackend:()=>i});var j={};e(j,{InferenceSession:()=>Ke,TRACE:()=>z,TRACE_FUNC_BEGIN:()=>He,TRACE_FUNC_END:()=>B,Tensor:()=>ze,default:()=>rf,env:()=>L,registerBackend:()=>P}); +import{dK as e,dM as t}from"./index-K-hxNScn.js";const n=new Map,r=[],i=(e,t,i)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let a=n.get(e);if(a===void 0)n.set(e,{backend:t,priority:i});else if(a.priority>i)return;else if(a.priority===i&&a.backend!==t)throw Error(`cannot register backend "${e}" using priority ${i}`);if(i>=0){let t=r.indexOf(e);t!==-1&&r.splice(t,1);for(let t=0;t{let t=n.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}}},o=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),i=n.length===0?r:n,o,s=[],c=new Set;for(let e of i){let t=await a(e);typeof t==`string`?s.push({name:e,err:t}):(o||=t,o===t&&c.add(e))}if(!o)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[o,new Proxy(e,{get:(e,t)=>t===`executionProviders`?l:Reflect.get(e,t)})]},s=`1.22.0`;let c=`warning`;const l={wasm:{},webgl:{},webgpu:{},versions:{common:s},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}`);c=e}},get logLevel(){return c}};Object.defineProperty(l,`logLevel`,{enumerable:!0});const u=l,d=(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,p(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(p(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return p(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},h=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t,o=[1,r,n,4];return new T({location:`texture`,type:`float32`,texture:e,dims:o,download:i,dispose:a})},g=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new T({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},_=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new T({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},v=(e,t,n)=>new T({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),y=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),b=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]);let x=!1;const S=()=>{if(!x){x=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(y.set(`int64`,BigInt64Array),b.set(BigInt64Array,`int64`)),t&&(y.set(`uint64`,BigUint64Array),b.set(BigUint64Array,`uint64`)),r?(y.set(`float16`,n),b.set(n,`float16`)):y.set(`float16`,Uint16Array)}},C=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new T(e.type,e.data,t);case`cpu-pinned`:return new T({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new T({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new T({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new T({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}};var T=class{constructor(e,t,n){S();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=y.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=y.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=b.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=C(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 m(e,t)}static fromTexture(e,t){return h(e,t)}static fromGpuBuffer(e,t){return g(e,t)}static fromMLTensor(e,t){return _(e,t)}static fromPinnedBuffer(e,t,n){return v(e,t,n)}toDataURL(e){return d(this,e)}toImageData(e){return f(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 w(this,e)}};const E=T,D=(e,t)=>{(l.trace===void 0?!l.wasm.trace:!l.trace)||console.timeStamp(`${e}::ORT::${t}`)},O=(e,t)=>{let n=Error().stack?.split(/\r\n|\r|\n/g)||[],r=!1;for(let i=0;i{(l.trace===void 0?!l.wasm.trace:!l.trace)||O(`BEGIN`,e)},A=e=>{(l.trace===void 0?!l.wasm.trace:!l.trace)||O(`END`,e)};var ee=class e{constructor(e){this.handler=e}async run(e,t,n){k();let r={},i={};if(typeof e!=`object`||!e||e instanceof E||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 E)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 E)&&(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 E?s[e]=t:s[e]=new E(t.type,t.data,t.dims)}return A(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){k();let a,s={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)s=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)s=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,o=0,c=t.byteLength;if(typeof n==`object`&&n)s=n;else if(typeof n==`number`){if(o=n,!Number.isSafeInteger(o))throw RangeError(`'byteOffset' must be an integer.`);if(o<0||o>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-o,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||o+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-o}].`);if(typeof i==`object`&&i)s=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,o,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[c,l]=await o(s),u=await c.createInferenceSessionHandler(a,l);return A(),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 te=ee;var ne={};e(ne,{InferenceSession:()=>te,TRACE:()=>D,TRACE_FUNC_BEGIN:()=>k,TRACE_FUNC_END:()=>A,Tensor:()=>E,env:()=>u,registerBackend:()=>i});var j={};e(j,{InferenceSession:()=>Ke,TRACE:()=>z,TRACE_FUNC_BEGIN:()=>He,TRACE_FUNC_END:()=>B,Tensor:()=>ze,default:()=>rf,env:()=>L,registerBackend:()=>P}); /*! * ONNX Runtime Web v1.22.0-dev.20250409-89f8206ba4 * Copyright (c) Microsoft Corporation. All rights reserved. @@ -3595,4 +3595,4 @@ var af={"onnxruntime-common":e=>{e.exports=ne},"onnxruntime-web":e=>{e.exports=j /*! ./generation/stopping_criteria.js */ `./src/generation/stopping_criteria.js`),x=cf( /*! ./generation/logits_process.js */ -`./src/generation/logits_process.js`)})();var lf=$.ASTFeatureExtractor,uf=$.ASTForAudioClassification,df=$.ASTModel,ff=$.ASTPreTrainedModel,pf=$.AlbertForMaskedLM,mf=$.AlbertForQuestionAnswering,hf=$.AlbertForSequenceClassification,gf=$.AlbertModel,_f=$.AlbertPreTrainedModel,vf=$.AlbertTokenizer,yf=$.AudioClassificationPipeline,bf=$.AutoConfig,xf=$.AutoFeatureExtractor,Sf=$.AutoImageProcessor,Cf=$.AutoModel,wf=$.AutoModelForAudioClassification,Tf=$.AutoModelForAudioFrameClassification,Ef=$.AutoModelForAudioTextToText,Df=$.AutoModelForCTC,Of=$.AutoModelForCausalLM,kf=$.AutoModelForDepthEstimation,Af=$.AutoModelForDocumentQuestionAnswering,jf=$.AutoModelForImageClassification,Mf=$.AutoModelForImageFeatureExtraction,Nf=$.AutoModelForImageMatting,Pf=$.AutoModelForImageSegmentation,Ff=$.AutoModelForImageTextToText,If=$.AutoModelForImageToImage,Lf=$.AutoModelForMaskGeneration,Rf=$.AutoModelForMaskedLM,zf=$.AutoModelForNormalEstimation,Bf=$.AutoModelForObjectDetection,Vf=$.AutoModelForPoseEstimation,Hf=$.AutoModelForQuestionAnswering,Uf=$.AutoModelForSemanticSegmentation,Wf=$.AutoModelForSeq2SeqLM,Gf=$.AutoModelForSequenceClassification,Kf=$.AutoModelForSpeechSeq2Seq,qf=$.AutoModelForTextToSpectrogram,Jf=$.AutoModelForTextToWaveform,Yf=$.AutoModelForTokenClassification,Xf=$.AutoModelForUniversalSegmentation,Zf=$.AutoModelForVision2Seq,Qf=$.AutoModelForXVector,$f=$.AutoModelForZeroShotObjectDetection,ep=$.AutoProcessor,tp=$.AutoTokenizer,np=$.AutomaticSpeechRecognitionPipeline,rp=$.BackgroundRemovalPipeline,ip=$.BartForConditionalGeneration,ap=$.BartForSequenceClassification,op=$.BartModel,sp=$.BartPretrainedModel,cp=$.BartTokenizer,lp=$.BaseModelOutput,up=$.BaseStreamer,dp=$.BeitFeatureExtractor,fp=$.BeitForImageClassification,pp=$.BeitModel,mp=$.BeitPreTrainedModel,hp=$.BertForMaskedLM,gp=$.BertForQuestionAnswering,_p=$.BertForSequenceClassification,vp=$.BertForTokenClassification,yp=$.BertModel,bp=$.BertPreTrainedModel,xp=$.BertTokenizer,Sp=$.BitImageProcessor,Cp=$.BlenderbotForConditionalGeneration,wp=$.BlenderbotModel,Tp=$.BlenderbotPreTrainedModel,Ep=$.BlenderbotSmallForConditionalGeneration,Dp=$.BlenderbotSmallModel,Op=$.BlenderbotSmallPreTrainedModel,kp=$.BlenderbotSmallTokenizer,Ap=$.BlenderbotTokenizer,jp=$.BloomForCausalLM,Mp=$.BloomModel,Np=$.BloomPreTrainedModel,Pp=$.BloomTokenizer,Fp=$.CLIPFeatureExtractor,Ip=$.CLIPImageProcessor,Lp=$.CLIPModel,Rp=$.CLIPPreTrainedModel,zp=$.CLIPSegForImageSegmentation,Bp=$.CLIPSegModel,Vp=$.CLIPSegPreTrainedModel,Hp=$.CLIPTextModel,Up=$.CLIPTextModelWithProjection,Wp=$.CLIPTokenizer,Gp=$.CLIPVisionModel,Kp=$.CLIPVisionModelWithProjection,qp=$.CamembertForMaskedLM,Jp=$.CamembertForQuestionAnswering,Yp=$.CamembertForSequenceClassification,Xp=$.CamembertForTokenClassification,Zp=$.CamembertModel,Qp=$.CamembertPreTrainedModel,$p=$.CamembertTokenizer,em=$.CausalLMOutput,tm=$.CausalLMOutputWithPast,nm=$.ChineseCLIPFeatureExtractor,rm=$.ChineseCLIPModel,im=$.ChineseCLIPPreTrainedModel,am=$.ClapAudioModelWithProjection,om=$.ClapFeatureExtractor,sm=$.ClapModel,cm=$.ClapPreTrainedModel,lm=$.ClapTextModelWithProjection,um=$.ClassifierFreeGuidanceLogitsProcessor,dm=$.CodeGenForCausalLM,fm=$.CodeGenModel,pm=$.CodeGenPreTrainedModel,mm=$.CodeGenTokenizer,hm=$.CodeLlamaTokenizer,gm=$.CohereForCausalLM,_m=$.CohereModel,vm=$.CoherePreTrainedModel,ym=$.CohereTokenizer,bm=$.ConvBertForMaskedLM,xm=$.ConvBertForQuestionAnswering,Sm=$.ConvBertForSequenceClassification,Cm=$.ConvBertForTokenClassification,wm=$.ConvBertModel,Tm=$.ConvBertPreTrainedModel,Em=$.ConvBertTokenizer,Dm=$.ConvNextFeatureExtractor,Om=$.ConvNextForImageClassification,km=$.ConvNextImageProcessor,Am=$.ConvNextModel,jm=$.ConvNextPreTrainedModel,Mm=$.ConvNextV2ForImageClassification,Nm=$.ConvNextV2Model,Pm=$.ConvNextV2PreTrainedModel,Fm=$.DFineForObjectDetection,Im=$.DFineModel,Lm=$.DFinePreTrainedModel,Rm=$.DPTFeatureExtractor,zm=$.DPTForDepthEstimation,Bm=$.DPTImageProcessor,Vm=$.DPTModel,Hm=$.DPTPreTrainedModel,Um=$.DacDecoderModel,Wm=$.DacDecoderOutput,Gm=$.DacEncoderModel,Km=$.DacEncoderOutput,qm=$.DacFeatureExtractor,Jm=$.DacModel,Ym=$.DacPreTrainedModel,Xm=$.DataTypeMap,Zm=$.DebertaForMaskedLM,Qm=$.DebertaForQuestionAnswering,$m=$.DebertaForSequenceClassification,eh=$.DebertaForTokenClassification,th=$.DebertaModel,nh=$.DebertaPreTrainedModel,rh=$.DebertaTokenizer,ih=$.DebertaV2ForMaskedLM,ah=$.DebertaV2ForQuestionAnswering,oh=$.DebertaV2ForSequenceClassification,sh=$.DebertaV2ForTokenClassification,ch=$.DebertaV2Model,lh=$.DebertaV2PreTrainedModel,uh=$.DebertaV2Tokenizer,dh=$.DecisionTransformerModel,fh=$.DecisionTransformerPreTrainedModel,ph=$.DeiTFeatureExtractor,mh=$.DeiTForImageClassification,hh=$.DeiTImageProcessor,gh=$.DeiTModel,_h=$.DeiTPreTrainedModel,vh=$.DepthAnythingForDepthEstimation,yh=$.DepthAnythingPreTrainedModel,bh=$.DepthEstimationPipeline,xh=$.DepthProForDepthEstimation,Sh=$.DepthProPreTrainedModel,Ch=$.DetrFeatureExtractor,wh=$.DetrForObjectDetection,Th=$.DetrForSegmentation,Eh=$.DetrImageProcessor,Dh=$.DetrModel,Oh=$.DetrObjectDetectionOutput,kh=$.DetrPreTrainedModel,Ah=$.DetrSegmentationOutput,jh=$.Dinov2ForImageClassification,Mh=$.Dinov2Model,Nh=$.Dinov2PreTrainedModel,Ph=$.Dinov2WithRegistersForImageClassification,Fh=$.Dinov2WithRegistersModel,Ih=$.Dinov2WithRegistersPreTrainedModel,Lh=$.DistilBertForMaskedLM,Rh=$.DistilBertForQuestionAnswering,zh=$.DistilBertForSequenceClassification,Bh=$.DistilBertForTokenClassification,Vh=$.DistilBertModel,Hh=$.DistilBertPreTrainedModel,Uh=$.DistilBertTokenizer,Wh=$.DocumentQuestionAnsweringPipeline,Gh=$.DonutFeatureExtractor,Kh=$.DonutImageProcessor,qh=$.DonutSwinModel,Jh=$.DonutSwinPreTrainedModel,Yh=$.EfficientNetForImageClassification,Xh=$.EfficientNetImageProcessor,Zh=$.EfficientNetModel,Qh=$.EfficientNetPreTrainedModel,$h=$.ElectraForMaskedLM,eg=$.ElectraForQuestionAnswering,tg=$.ElectraForSequenceClassification,ng=$.ElectraForTokenClassification,rg=$.ElectraModel,ig=$.ElectraPreTrainedModel,ag=$.ElectraTokenizer,og=$.EncodecFeatureExtractor,sg=$.EosTokenCriteria,cg=$.EsmForMaskedLM,lg=$.EsmForSequenceClassification,ug=$.EsmForTokenClassification,dg=$.EsmModel,fg=$.EsmPreTrainedModel,pg=$.EsmTokenizer,mg=$.ExaoneForCausalLM,hg=$.ExaoneModel,gg=$.ExaonePreTrainedModel,_g=$.FFT,vg=$.FalconForCausalLM,yg=$.FalconModel,bg=$.FalconPreTrainedModel,xg=$.FalconTokenizer,Sg=$.FastViTForImageClassification,Cg=$.FastViTModel,wg=$.FastViTPreTrainedModel,Tg=$.FeatureExtractionPipeline,Eg=$.FeatureExtractor,Dg=$.FillMaskPipeline,Og=$.Florence2ForConditionalGeneration,kg=$.Florence2PreTrainedModel,Ag=$.Florence2Processor,jg=$.ForcedBOSTokenLogitsProcessor,Mg=$.ForcedEOSTokenLogitsProcessor,Ng=$.GLPNFeatureExtractor,Pg=$.GLPNForDepthEstimation,Fg=$.GLPNModel,Ig=$.GLPNPreTrainedModel,Lg=$.GPT2LMHeadModel,Rg=$.GPT2Model,zg=$.GPT2PreTrainedModel,Bg=$.GPT2Tokenizer,Vg=$.GPTBigCodeForCausalLM,Hg=$.GPTBigCodeModel,Ug=$.GPTBigCodePreTrainedModel,Wg=$.GPTJForCausalLM,Gg=$.GPTJModel,Kg=$.GPTJPreTrainedModel,qg=$.GPTNeoForCausalLM,Jg=$.GPTNeoModel,Yg=$.GPTNeoPreTrainedModel,Xg=$.GPTNeoXForCausalLM,Zg=$.GPTNeoXModel,Qg=$.GPTNeoXPreTrainedModel,$g=$.GPTNeoXTokenizer,e_=$.Gemma2ForCausalLM,t_=$.Gemma2Model,n_=$.Gemma2PreTrainedModel,r_=$.Gemma3ForCausalLM,i_=$.Gemma3Model,a_=$.Gemma3PreTrainedModel,o_=$.Gemma3nAudioFeatureExtractor,s_=$.Gemma3nForConditionalGeneration,c_=$.Gemma3nPreTrainedModel,l_=$.Gemma3nProcessor,u_=$.GemmaForCausalLM,d_=$.GemmaModel,f_=$.GemmaPreTrainedModel,p_=$.GemmaTokenizer,m_=$.GlmForCausalLM,h_=$.GlmModel,g_=$.GlmPreTrainedModel,__=$.GraniteForCausalLM,v_=$.GraniteModel,y_=$.GranitePreTrainedModel,b_=$.Grok1Tokenizer,x_=$.GroundingDinoForObjectDetection,S_=$.GroundingDinoImageProcessor,C_=$.GroundingDinoPreTrainedModel,w_=$.GroundingDinoProcessor,T_=$.GroupViTModel,E_=$.GroupViTPreTrainedModel,D_=$.HeliumForCausalLM,O_=$.HeliumModel,k_=$.HeliumPreTrainedModel,A_=$.HerbertTokenizer,j_=$.HieraForImageClassification,M_=$.HieraModel,N_=$.HieraPreTrainedModel,P_=$.HubertForCTC,F_=$.HubertForSequenceClassification,I_=$.HubertModel,L_=$.HubertPreTrainedModel,R_=$.IJepaForImageClassification,z_=$.IJepaModel,B_=$.IJepaPreTrainedModel,V_=$.Idefics3ForConditionalGeneration,H_=$.Idefics3ImageProcessor,U_=$.Idefics3PreTrainedModel,W_=$.Idefics3Processor,G_=$.ImageClassificationPipeline,K_=$.ImageFeatureExtractionPipeline,q_=$.ImageFeatureExtractor,J_=$.ImageMattingOutput,Y_=$.ImageProcessor,X_=$.ImageSegmentationPipeline,Z_=$.ImageToImagePipeline,Q_=$.ImageToTextPipeline,$_=$.InterruptableStoppingCriteria,ev=$.JAISLMHeadModel,tv=$.JAISModel,nv=$.JAISPreTrainedModel,rv=$.JinaCLIPImageProcessor,iv=$.JinaCLIPModel,av=$.JinaCLIPPreTrainedModel,ov=$.JinaCLIPProcessor,sv=$.JinaCLIPTextModel,cv=$.JinaCLIPVisionModel,lv=$.LiteWhisperForConditionalGeneration,uv=$.LlamaForCausalLM,dv=$.LlamaModel,fv=$.LlamaPreTrainedModel,pv=$.LlamaTokenizer,mv=$.LlavaForConditionalGeneration,hv=$.LlavaOnevisionForConditionalGeneration,gv=$.LlavaOnevisionImageProcessor,_v=$.LlavaPreTrainedModel,vv=$.LlavaProcessor,yv=$.LlavaQwen2ForCausalLM,bv=$.LogitsProcessor,xv=$.LogitsProcessorList,Sv=$.LogitsWarper,Cv=$.LongT5ForConditionalGeneration,wv=$.LongT5Model,Tv=$.LongT5PreTrainedModel,Ev=$.M2M100ForConditionalGeneration,Dv=$.M2M100Model,Ov=$.M2M100PreTrainedModel,kv=$.M2M100Tokenizer,Av=$.MBart50Tokenizer,jv=$.MBartForCausalLM,Mv=$.MBartForConditionalGeneration,Nv=$.MBartForSequenceClassification,Pv=$.MBartModel,Fv=$.MBartPreTrainedModel,Iv=$.MBartTokenizer,Lv=$.MPNetForMaskedLM,Rv=$.MPNetForQuestionAnswering,zv=$.MPNetForSequenceClassification,Bv=$.MPNetForTokenClassification,Vv=$.MPNetModel,Hv=$.MPNetPreTrainedModel,Uv=$.MPNetTokenizer,Wv=$.MT5ForConditionalGeneration,Gv=$.MT5Model,Kv=$.MT5PreTrainedModel,qv=$.MarianMTModel,Jv=$.MarianModel,Yv=$.MarianPreTrainedModel,Xv=$.MarianTokenizer,Zv=$.Mask2FormerImageProcessor,Qv=$.MaskFormerFeatureExtractor,$v=$.MaskFormerForInstanceSegmentation,ey=$.MaskFormerImageProcessor,ty=$.MaskFormerModel,ny=$.MaskFormerPreTrainedModel,ry=$.MaskedLMOutput,iy=$.MaxLengthCriteria,ay=$.Metric3DForDepthEstimation,oy=$.Metric3DPreTrainedModel,sy=$.Metric3Dv2ForDepthEstimation,cy=$.Metric3Dv2PreTrainedModel,ly=$.MgpstrForSceneTextRecognition,uy=$.MgpstrModelOutput,dy=$.MgpstrPreTrainedModel,fy=$.MgpstrProcessor,py=$.MgpstrTokenizer,my=$.MimiDecoderModel,hy=$.MimiDecoderOutput,gy=$.MimiEncoderModel,_y=$.MimiEncoderOutput,vy=$.MimiModel,yy=$.MimiPreTrainedModel,by=$.MinLengthLogitsProcessor,xy=$.MinNewTokensLengthLogitsProcessor,Sy=$.MistralForCausalLM,Cy=$.MistralModel,wy=$.MistralPreTrainedModel,Ty=$.MobileBertForMaskedLM,Ey=$.MobileBertForQuestionAnswering,Dy=$.MobileBertForSequenceClassification,Oy=$.MobileBertModel,ky=$.MobileBertPreTrainedModel,Ay=$.MobileBertTokenizer,jy=$.MobileLLMForCausalLM,My=$.MobileLLMModel,Ny=$.MobileLLMPreTrainedModel,Py=$.MobileNetV1FeatureExtractor,Fy=$.MobileNetV1ForImageClassification,Iy=$.MobileNetV1ForSemanticSegmentation,Ly=$.MobileNetV1ImageProcessor,Ry=$.MobileNetV1Model,zy=$.MobileNetV1PreTrainedModel,By=$.MobileNetV2FeatureExtractor,Vy=$.MobileNetV2ForImageClassification,Hy=$.MobileNetV2ForSemanticSegmentation,Uy=$.MobileNetV2ImageProcessor,Wy=$.MobileNetV2Model,Gy=$.MobileNetV2PreTrainedModel,Ky=$.MobileNetV3FeatureExtractor,qy=$.MobileNetV3ForImageClassification,Jy=$.MobileNetV3ForSemanticSegmentation,Yy=$.MobileNetV3ImageProcessor,Xy=$.MobileNetV3Model,Zy=$.MobileNetV3PreTrainedModel,Qy=$.MobileNetV4FeatureExtractor,$y=$.MobileNetV4ForImageClassification,eb=$.MobileNetV4ForSemanticSegmentation,tb=$.MobileNetV4ImageProcessor,nb=$.MobileNetV4Model,rb=$.MobileNetV4PreTrainedModel,ib=$.MobileViTFeatureExtractor,ab=$.MobileViTForImageClassification,ob=$.MobileViTImageProcessor,sb=$.MobileViTModel,cb=$.MobileViTPreTrainedModel,lb=$.MobileViTV2ForImageClassification,ub=$.MobileViTV2Model,db=$.MobileViTV2PreTrainedModel,fb=$.ModelOutput,pb=$.ModernBertForMaskedLM,mb=$.ModernBertForSequenceClassification,hb=$.ModernBertForTokenClassification,gb=$.ModernBertModel,_b=$.ModernBertPreTrainedModel,vb=$.Moondream1ForConditionalGeneration,yb=$.MoonshineFeatureExtractor,bb=$.MoonshineForConditionalGeneration,xb=$.MoonshineModel,Sb=$.MoonshinePreTrainedModel,Cb=$.MoonshineProcessor,wb=$.MptForCausalLM,Tb=$.MptModel,Eb=$.MptPreTrainedModel,Db=$.MultiModalityCausalLM,Ob=$.MultiModalityPreTrainedModel,kb=$.MusicgenForCausalLM,Ab=$.MusicgenForConditionalGeneration,jb=$.MusicgenModel,Mb=$.MusicgenPreTrainedModel,Nb=$.NeoBertForMaskedLM,Pb=$.NeoBertForQuestionAnswering,Fb=$.NeoBertForSequenceClassification,Ib=$.NeoBertForTokenClassification,Lb=$.NeoBertModel,Rb=$.NeoBertPreTrainedModel,zb=$.NllbTokenizer,Bb=$.NoBadWordsLogitsProcessor,Vb=$.NoRepeatNGramLogitsProcessor,Hb=$.NomicBertModel,Ub=$.NomicBertPreTrainedModel,Wb=$.NougatImageProcessor,Gb=$.NougatTokenizer,Kb=$.OPTForCausalLM,qb=$.OPTModel,Jb=$.OPTPreTrainedModel,Yb=$.ObjectDetectionPipeline,Xb=$.Olmo2ForCausalLM,Zb=$.Olmo2Model,Qb=$.Olmo2PreTrainedModel,$b=$.OlmoForCausalLM,ex=$.OlmoModel,tx=$.OlmoPreTrainedModel,nx=$.OpenELMForCausalLM,rx=$.OpenELMModel,ix=$.OpenELMPreTrainedModel,ax=$.OwlViTFeatureExtractor,ox=$.OwlViTForObjectDetection,sx=$.OwlViTImageProcessor,cx=$.OwlViTModel,lx=$.OwlViTPreTrainedModel,ux=$.OwlViTProcessor,dx=$.Owlv2ForObjectDetection,fx=$.Owlv2ImageProcessor,px=$.Owlv2Model,mx=$.Owlv2PreTrainedModel,hx=$.PaliGemmaForConditionalGeneration,gx=$.PaliGemmaPreTrainedModel,_x=$.PaliGemmaProcessor,vx=$.PatchTSMixerForPrediction,yx=$.PatchTSMixerModel,bx=$.PatchTSMixerPreTrainedModel,xx=$.PatchTSTForPrediction,Sx=$.PatchTSTModel,Cx=$.PatchTSTPreTrainedModel,wx=$.Phi3ForCausalLM,Tx=$.Phi3Model,Ex=$.Phi3PreTrainedModel,Dx=$.Phi3VForCausalLM,Ox=$.Phi3VImageProcessor,kx=$.Phi3VPreTrainedModel,Ax=$.Phi3VProcessor,jx=$.PhiForCausalLM,Mx=$.PhiModel,Nx=$.PhiPreTrainedModel,Px=$.Pipeline,Fx=$.PreTrainedModel,Ix=$.PreTrainedTokenizer,Lx=$.PretrainedConfig,Rx=$.PretrainedMixin,zx=$.Processor,Bx=$.PvtForImageClassification,Vx=$.PvtImageProcessor,Hx=$.PvtModel,Ux=$.PvtPreTrainedModel,Wx=$.PyAnnoteFeatureExtractor,Gx=$.PyAnnoteForAudioFrameClassification,Kx=$.PyAnnoteModel,qx=$.PyAnnotePreTrainedModel,Jx=$.PyAnnoteProcessor,Yx=$.QuestionAnsweringModelOutput,Xx=$.QuestionAnsweringPipeline,Zx=$.Qwen2ForCausalLM,Qx=$.Qwen2Model,$x=$.Qwen2PreTrainedModel,eS=$.Qwen2Tokenizer,tS=$.Qwen2VLForConditionalGeneration,nS=$.Qwen2VLImageProcessor,rS=$.Qwen2VLPreTrainedModel,iS=$.Qwen2VLProcessor,aS=$.Qwen3ForCausalLM,oS=$.Qwen3Model,sS=$.Qwen3PreTrainedModel,cS=$.RFDetrForObjectDetection,lS=$.RFDetrModel,uS=$.RFDetrObjectDetectionOutput,dS=$.RFDetrPreTrainedModel,fS=$.RTDetrForObjectDetection,pS=$.RTDetrImageProcessor,mS=$.RTDetrModel,hS=$.RTDetrObjectDetectionOutput,gS=$.RTDetrPreTrainedModel,_S=$.RTDetrV2ForObjectDetection,vS=$.RTDetrV2Model,yS=$.RTDetrV2ObjectDetectionOutput,bS=$.RTDetrV2PreTrainedModel,xS=$.RawAudio,SS=$.RawImage,CS=$.RawVideo,wS=$.RawVideoFrame,TS=$.RepetitionPenaltyLogitsProcessor,ES=$.ResNetForImageClassification,DS=$.ResNetModel,OS=$.ResNetPreTrainedModel,kS=$.RoFormerForMaskedLM,AS=$.RoFormerForQuestionAnswering,jS=$.RoFormerForSequenceClassification,MS=$.RoFormerForTokenClassification,NS=$.RoFormerModel,PS=$.RoFormerPreTrainedModel,FS=$.RoFormerTokenizer,IS=$.RobertaForMaskedLM,LS=$.RobertaForQuestionAnswering,RS=$.RobertaForSequenceClassification,zS=$.RobertaForTokenClassification,BS=$.RobertaModel,VS=$.RobertaPreTrainedModel,HS=$.RobertaTokenizer,US=$.SamImageProcessor,WS=$.SamImageSegmentationOutput,GS=$.SamModel,KS=$.SamPreTrainedModel,qS=$.SamProcessor,JS=$.SapiensForDepthEstimation,YS=$.SapiensForNormalEstimation,XS=$.SapiensForSemanticSegmentation,ZS=$.SapiensPreTrainedModel,QS=$.SeamlessM4TFeatureExtractor,$S=$.SegformerFeatureExtractor,eC=$.SegformerForImageClassification,tC=$.SegformerForSemanticSegmentation,nC=$.SegformerImageProcessor,rC=$.SegformerModel,iC=$.SegformerPreTrainedModel,aC=$.Seq2SeqLMOutput,oC=$.SequenceClassifierOutput,sC=$.SiglipImageProcessor,cC=$.SiglipModel,lC=$.SiglipPreTrainedModel,uC=$.SiglipTextModel,dC=$.SiglipTokenizer,fC=$.SiglipVisionModel,pC=$.SmolVLMForConditionalGeneration,mC=$.SmolVLMImageProcessor,hC=$.SmolVLMProcessor,gC=$.SnacDecoderModel,_C=$.SnacEncoderModel,vC=$.SnacFeatureExtractor,yC=$.SnacModel,bC=$.SnacPreTrainedModel,xC=$.SpeechT5FeatureExtractor,SC=$.SpeechT5ForSpeechToText,CC=$.SpeechT5ForTextToSpeech,wC=$.SpeechT5HifiGan,TC=$.SpeechT5Model,EC=$.SpeechT5PreTrainedModel,DC=$.SpeechT5Processor,OC=$.SpeechT5Tokenizer,kC=$.SqueezeBertForMaskedLM,AC=$.SqueezeBertForQuestionAnswering,jC=$.SqueezeBertForSequenceClassification,MC=$.SqueezeBertModel,NC=$.SqueezeBertPreTrainedModel,PC=$.SqueezeBertTokenizer,FC=$.StableLmForCausalLM,IC=$.StableLmModel,LC=$.StableLmPreTrainedModel,RC=$.Starcoder2ForCausalLM,zC=$.Starcoder2Model,BC=$.Starcoder2PreTrainedModel,VC=$.StoppingCriteria,HC=$.StoppingCriteriaList,UC=$.StyleTextToSpeech2Model,WC=$.StyleTextToSpeech2PreTrainedModel,GC=$.SummarizationPipeline,KC=$.SuppressTokensAtBeginLogitsProcessor,qC=$.Swin2SRForImageSuperResolution,JC=$.Swin2SRImageProcessor,YC=$.Swin2SRModel,XC=$.Swin2SRPreTrainedModel,ZC=$.SwinForImageClassification,QC=$.SwinForSemanticSegmentation,$C=$.SwinModel,ew=$.SwinPreTrainedModel,tw=$.T5ForConditionalGeneration,nw=$.T5Model,rw=$.T5PreTrainedModel,iw=$.T5Tokenizer,aw=$.TableTransformerForObjectDetection,ow=$.TableTransformerModel,sw=$.TableTransformerObjectDetectionOutput,cw=$.TableTransformerPreTrainedModel,lw=$.TemperatureLogitsWarper,uw=$.Tensor,dw=$.Text2TextGenerationPipeline,fw=$.TextClassificationPipeline,pw=$.TextGenerationPipeline,mw=$.TextStreamer,hw=$.TextToAudioPipeline,gw=$.TokenClassificationPipeline,_w=$.TokenClassifierOutput,vw=$.TokenizerModel,yw=$.TopKLogitsWarper,bw=$.TopPLogitsWarper,xw=$.TrOCRForCausalLM,Sw=$.TrOCRPreTrainedModel,Cw=$.TranslationPipeline,ww=$.UltravoxModel,Tw=$.UltravoxPreTrainedModel,Ew=$.UltravoxProcessor,Dw=$.UniSpeechForCTC,Ow=$.UniSpeechForSequenceClassification,kw=$.UniSpeechModel,Aw=$.UniSpeechPreTrainedModel,jw=$.UniSpeechSatForAudioFrameClassification,Mw=$.UniSpeechSatForCTC,Nw=$.UniSpeechSatForSequenceClassification,Pw=$.UniSpeechSatModel,Fw=$.UniSpeechSatPreTrainedModel,Iw=$.VLChatProcessor,Lw=$.VLMImageProcessor,Rw=$.ViTFeatureExtractor,zw=$.ViTForImageClassification,Bw=$.ViTImageProcessor,Vw=$.ViTMAEModel,Hw=$.ViTMAEPreTrainedModel,Uw=$.ViTMSNForImageClassification,Ww=$.ViTMSNModel,Gw=$.ViTMSNPreTrainedModel,Kw=$.ViTModel,qw=$.ViTPreTrainedModel,Jw=$.VisionEncoderDecoderModel,Yw=$.VitMatteForImageMatting,Xw=$.VitMatteImageProcessor,Zw=$.VitMattePreTrainedModel,Qw=$.VitPoseForPoseEstimation,$w=$.VitPoseImageProcessor,eT=$.VitPosePreTrainedModel,tT=$.VitsModel,nT=$.VitsModelOutput,rT=$.VitsPreTrainedModel,iT=$.VitsTokenizer,aT=$.Wav2Vec2BertForCTC,oT=$.Wav2Vec2BertForSequenceClassification,sT=$.Wav2Vec2BertModel,cT=$.Wav2Vec2BertPreTrainedModel,lT=$.Wav2Vec2CTCTokenizer,uT=$.Wav2Vec2FeatureExtractor,dT=$.Wav2Vec2ForAudioFrameClassification,fT=$.Wav2Vec2ForCTC,pT=$.Wav2Vec2ForSequenceClassification,mT=$.Wav2Vec2Model,hT=$.Wav2Vec2PreTrainedModel,gT=$.Wav2Vec2Processor,_T=$.Wav2Vec2ProcessorWithLM,vT=$.WavLMForAudioFrameClassification,yT=$.WavLMForCTC,bT=$.WavLMForSequenceClassification,xT=$.WavLMForXVector,ST=$.WavLMModel,CT=$.WavLMPreTrainedModel,wT=$.WeSpeakerFeatureExtractor,TT=$.WeSpeakerResNetModel,ET=$.WeSpeakerResNetPreTrainedModel,DT=$.WhisperFeatureExtractor,OT=$.WhisperForConditionalGeneration,kT=$.WhisperModel,AT=$.WhisperPreTrainedModel,jT=$.WhisperProcessor,MT=$.WhisperTextStreamer,NT=$.WhisperTimeStampLogitsProcessor,PT=$.WhisperTokenizer,FT=$.XLMForQuestionAnswering,IT=$.XLMForSequenceClassification,LT=$.XLMForTokenClassification,RT=$.XLMModel,zT=$.XLMPreTrainedModel,BT=$.XLMRobertaForMaskedLM,VT=$.XLMRobertaForQuestionAnswering,HT=$.XLMRobertaForSequenceClassification,UT=$.XLMRobertaForTokenClassification,WT=$.XLMRobertaModel,GT=$.XLMRobertaPreTrainedModel,KT=$.XLMRobertaTokenizer,qT=$.XLMTokenizer,JT=$.XLMWithLMHeadModel,YT=$.XVectorOutput,XT=$.YolosFeatureExtractor,ZT=$.YolosForObjectDetection,QT=$.YolosImageProcessor,$T=$.YolosModel,eE=$.YolosObjectDetectionOutput,tE=$.YolosPreTrainedModel,nE=$.ZeroShotAudioClassificationPipeline,rE=$.ZeroShotClassificationPipeline,iE=$.ZeroShotImageClassificationPipeline,aE=$.ZeroShotObjectDetectionPipeline,oE=$.bankers_round,sE=$.cat,cE=$.cos_sim,lE=$.dot,uE=$.dynamic_time_warping,dE=$.env,fE=$.full,pE=$.full_like,mE=$.getKeyValueShapes,hE=$.hamming,gE=$.hanning,_E=$.interpolate,vE=$.interpolate_4d,yE=$.interpolate_data,bE=$.is_chinese_char,xE=$.layer_norm,SE=$.load_image,CE=$.load_video,wE=$.log_softmax,TE=$.magnitude,EE=$.matmul,DE=$.max,OE=$.mean,kE=$.mean_pooling,AE=$.medianFilter,jE=$.mel_filter_bank,ME=$.min,NE=$.ones,PE=$.ones_like,FE=$.permute,IE=$.permute_data,LE=$.pipeline,RE=$.quantize_embeddings,zE=$.rand,BE=$.read_audio,VE=$.rfft,HE=$.round,UE=$.slice,WE=$.softmax,GE=$.spectrogram,KE=$.stack,qE=$.std_mean,JE=$.topk,YE=$.window_function,XE=$.zeros,ZE=$.zeros_like;export{uw as b,dE as c,ep as d,Cf as e,SS as f}; \ No newline at end of file +`./src/generation/logits_process.js`)})();var lf=$.ASTFeatureExtractor,uf=$.ASTForAudioClassification,df=$.ASTModel,ff=$.ASTPreTrainedModel,pf=$.AlbertForMaskedLM,mf=$.AlbertForQuestionAnswering,hf=$.AlbertForSequenceClassification,gf=$.AlbertModel,_f=$.AlbertPreTrainedModel,vf=$.AlbertTokenizer,yf=$.AudioClassificationPipeline,bf=$.AutoConfig,xf=$.AutoFeatureExtractor,Sf=$.AutoImageProcessor,Cf=$.AutoModel,wf=$.AutoModelForAudioClassification,Tf=$.AutoModelForAudioFrameClassification,Ef=$.AutoModelForAudioTextToText,Df=$.AutoModelForCTC,Of=$.AutoModelForCausalLM,kf=$.AutoModelForDepthEstimation,Af=$.AutoModelForDocumentQuestionAnswering,jf=$.AutoModelForImageClassification,Mf=$.AutoModelForImageFeatureExtraction,Nf=$.AutoModelForImageMatting,Pf=$.AutoModelForImageSegmentation,Ff=$.AutoModelForImageTextToText,If=$.AutoModelForImageToImage,Lf=$.AutoModelForMaskGeneration,Rf=$.AutoModelForMaskedLM,zf=$.AutoModelForNormalEstimation,Bf=$.AutoModelForObjectDetection,Vf=$.AutoModelForPoseEstimation,Hf=$.AutoModelForQuestionAnswering,Uf=$.AutoModelForSemanticSegmentation,Wf=$.AutoModelForSeq2SeqLM,Gf=$.AutoModelForSequenceClassification,Kf=$.AutoModelForSpeechSeq2Seq,qf=$.AutoModelForTextToSpectrogram,Jf=$.AutoModelForTextToWaveform,Yf=$.AutoModelForTokenClassification,Xf=$.AutoModelForUniversalSegmentation,Zf=$.AutoModelForVision2Seq,Qf=$.AutoModelForXVector,$f=$.AutoModelForZeroShotObjectDetection,ep=$.AutoProcessor,tp=$.AutoTokenizer,np=$.AutomaticSpeechRecognitionPipeline,rp=$.BackgroundRemovalPipeline,ip=$.BartForConditionalGeneration,ap=$.BartForSequenceClassification,op=$.BartModel,sp=$.BartPretrainedModel,cp=$.BartTokenizer,lp=$.BaseModelOutput,up=$.BaseStreamer,dp=$.BeitFeatureExtractor,fp=$.BeitForImageClassification,pp=$.BeitModel,mp=$.BeitPreTrainedModel,hp=$.BertForMaskedLM,gp=$.BertForQuestionAnswering,_p=$.BertForSequenceClassification,vp=$.BertForTokenClassification,yp=$.BertModel,bp=$.BertPreTrainedModel,xp=$.BertTokenizer,Sp=$.BitImageProcessor,Cp=$.BlenderbotForConditionalGeneration,wp=$.BlenderbotModel,Tp=$.BlenderbotPreTrainedModel,Ep=$.BlenderbotSmallForConditionalGeneration,Dp=$.BlenderbotSmallModel,Op=$.BlenderbotSmallPreTrainedModel,kp=$.BlenderbotSmallTokenizer,Ap=$.BlenderbotTokenizer,jp=$.BloomForCausalLM,Mp=$.BloomModel,Np=$.BloomPreTrainedModel,Pp=$.BloomTokenizer,Fp=$.CLIPFeatureExtractor,Ip=$.CLIPImageProcessor,Lp=$.CLIPModel,Rp=$.CLIPPreTrainedModel,zp=$.CLIPSegForImageSegmentation,Bp=$.CLIPSegModel,Vp=$.CLIPSegPreTrainedModel,Hp=$.CLIPTextModel,Up=$.CLIPTextModelWithProjection,Wp=$.CLIPTokenizer,Gp=$.CLIPVisionModel,Kp=$.CLIPVisionModelWithProjection,qp=$.CamembertForMaskedLM,Jp=$.CamembertForQuestionAnswering,Yp=$.CamembertForSequenceClassification,Xp=$.CamembertForTokenClassification,Zp=$.CamembertModel,Qp=$.CamembertPreTrainedModel,$p=$.CamembertTokenizer,em=$.CausalLMOutput,tm=$.CausalLMOutputWithPast,nm=$.ChineseCLIPFeatureExtractor,rm=$.ChineseCLIPModel,im=$.ChineseCLIPPreTrainedModel,am=$.ClapAudioModelWithProjection,om=$.ClapFeatureExtractor,sm=$.ClapModel,cm=$.ClapPreTrainedModel,lm=$.ClapTextModelWithProjection,um=$.ClassifierFreeGuidanceLogitsProcessor,dm=$.CodeGenForCausalLM,fm=$.CodeGenModel,pm=$.CodeGenPreTrainedModel,mm=$.CodeGenTokenizer,hm=$.CodeLlamaTokenizer,gm=$.CohereForCausalLM,_m=$.CohereModel,vm=$.CoherePreTrainedModel,ym=$.CohereTokenizer,bm=$.ConvBertForMaskedLM,xm=$.ConvBertForQuestionAnswering,Sm=$.ConvBertForSequenceClassification,Cm=$.ConvBertForTokenClassification,wm=$.ConvBertModel,Tm=$.ConvBertPreTrainedModel,Em=$.ConvBertTokenizer,Dm=$.ConvNextFeatureExtractor,Om=$.ConvNextForImageClassification,km=$.ConvNextImageProcessor,Am=$.ConvNextModel,jm=$.ConvNextPreTrainedModel,Mm=$.ConvNextV2ForImageClassification,Nm=$.ConvNextV2Model,Pm=$.ConvNextV2PreTrainedModel,Fm=$.DFineForObjectDetection,Im=$.DFineModel,Lm=$.DFinePreTrainedModel,Rm=$.DPTFeatureExtractor,zm=$.DPTForDepthEstimation,Bm=$.DPTImageProcessor,Vm=$.DPTModel,Hm=$.DPTPreTrainedModel,Um=$.DacDecoderModel,Wm=$.DacDecoderOutput,Gm=$.DacEncoderModel,Km=$.DacEncoderOutput,qm=$.DacFeatureExtractor,Jm=$.DacModel,Ym=$.DacPreTrainedModel,Xm=$.DataTypeMap,Zm=$.DebertaForMaskedLM,Qm=$.DebertaForQuestionAnswering,$m=$.DebertaForSequenceClassification,eh=$.DebertaForTokenClassification,th=$.DebertaModel,nh=$.DebertaPreTrainedModel,rh=$.DebertaTokenizer,ih=$.DebertaV2ForMaskedLM,ah=$.DebertaV2ForQuestionAnswering,oh=$.DebertaV2ForSequenceClassification,sh=$.DebertaV2ForTokenClassification,ch=$.DebertaV2Model,lh=$.DebertaV2PreTrainedModel,uh=$.DebertaV2Tokenizer,dh=$.DecisionTransformerModel,fh=$.DecisionTransformerPreTrainedModel,ph=$.DeiTFeatureExtractor,mh=$.DeiTForImageClassification,hh=$.DeiTImageProcessor,gh=$.DeiTModel,_h=$.DeiTPreTrainedModel,vh=$.DepthAnythingForDepthEstimation,yh=$.DepthAnythingPreTrainedModel,bh=$.DepthEstimationPipeline,xh=$.DepthProForDepthEstimation,Sh=$.DepthProPreTrainedModel,Ch=$.DetrFeatureExtractor,wh=$.DetrForObjectDetection,Th=$.DetrForSegmentation,Eh=$.DetrImageProcessor,Dh=$.DetrModel,Oh=$.DetrObjectDetectionOutput,kh=$.DetrPreTrainedModel,Ah=$.DetrSegmentationOutput,jh=$.Dinov2ForImageClassification,Mh=$.Dinov2Model,Nh=$.Dinov2PreTrainedModel,Ph=$.Dinov2WithRegistersForImageClassification,Fh=$.Dinov2WithRegistersModel,Ih=$.Dinov2WithRegistersPreTrainedModel,Lh=$.DistilBertForMaskedLM,Rh=$.DistilBertForQuestionAnswering,zh=$.DistilBertForSequenceClassification,Bh=$.DistilBertForTokenClassification,Vh=$.DistilBertModel,Hh=$.DistilBertPreTrainedModel,Uh=$.DistilBertTokenizer,Wh=$.DocumentQuestionAnsweringPipeline,Gh=$.DonutFeatureExtractor,Kh=$.DonutImageProcessor,qh=$.DonutSwinModel,Jh=$.DonutSwinPreTrainedModel,Yh=$.EfficientNetForImageClassification,Xh=$.EfficientNetImageProcessor,Zh=$.EfficientNetModel,Qh=$.EfficientNetPreTrainedModel,$h=$.ElectraForMaskedLM,eg=$.ElectraForQuestionAnswering,tg=$.ElectraForSequenceClassification,ng=$.ElectraForTokenClassification,rg=$.ElectraModel,ig=$.ElectraPreTrainedModel,ag=$.ElectraTokenizer,og=$.EncodecFeatureExtractor,sg=$.EosTokenCriteria,cg=$.EsmForMaskedLM,lg=$.EsmForSequenceClassification,ug=$.EsmForTokenClassification,dg=$.EsmModel,fg=$.EsmPreTrainedModel,pg=$.EsmTokenizer,mg=$.ExaoneForCausalLM,hg=$.ExaoneModel,gg=$.ExaonePreTrainedModel,_g=$.FFT,vg=$.FalconForCausalLM,yg=$.FalconModel,bg=$.FalconPreTrainedModel,xg=$.FalconTokenizer,Sg=$.FastViTForImageClassification,Cg=$.FastViTModel,wg=$.FastViTPreTrainedModel,Tg=$.FeatureExtractionPipeline,Eg=$.FeatureExtractor,Dg=$.FillMaskPipeline,Og=$.Florence2ForConditionalGeneration,kg=$.Florence2PreTrainedModel,Ag=$.Florence2Processor,jg=$.ForcedBOSTokenLogitsProcessor,Mg=$.ForcedEOSTokenLogitsProcessor,Ng=$.GLPNFeatureExtractor,Pg=$.GLPNForDepthEstimation,Fg=$.GLPNModel,Ig=$.GLPNPreTrainedModel,Lg=$.GPT2LMHeadModel,Rg=$.GPT2Model,zg=$.GPT2PreTrainedModel,Bg=$.GPT2Tokenizer,Vg=$.GPTBigCodeForCausalLM,Hg=$.GPTBigCodeModel,Ug=$.GPTBigCodePreTrainedModel,Wg=$.GPTJForCausalLM,Gg=$.GPTJModel,Kg=$.GPTJPreTrainedModel,qg=$.GPTNeoForCausalLM,Jg=$.GPTNeoModel,Yg=$.GPTNeoPreTrainedModel,Xg=$.GPTNeoXForCausalLM,Zg=$.GPTNeoXModel,Qg=$.GPTNeoXPreTrainedModel,$g=$.GPTNeoXTokenizer,e_=$.Gemma2ForCausalLM,t_=$.Gemma2Model,n_=$.Gemma2PreTrainedModel,r_=$.Gemma3ForCausalLM,i_=$.Gemma3Model,a_=$.Gemma3PreTrainedModel,o_=$.Gemma3nAudioFeatureExtractor,s_=$.Gemma3nForConditionalGeneration,c_=$.Gemma3nPreTrainedModel,l_=$.Gemma3nProcessor,u_=$.GemmaForCausalLM,d_=$.GemmaModel,f_=$.GemmaPreTrainedModel,p_=$.GemmaTokenizer,m_=$.GlmForCausalLM,h_=$.GlmModel,g_=$.GlmPreTrainedModel,__=$.GraniteForCausalLM,v_=$.GraniteModel,y_=$.GranitePreTrainedModel,b_=$.Grok1Tokenizer,x_=$.GroundingDinoForObjectDetection,S_=$.GroundingDinoImageProcessor,C_=$.GroundingDinoPreTrainedModel,w_=$.GroundingDinoProcessor,T_=$.GroupViTModel,E_=$.GroupViTPreTrainedModel,D_=$.HeliumForCausalLM,O_=$.HeliumModel,k_=$.HeliumPreTrainedModel,A_=$.HerbertTokenizer,j_=$.HieraForImageClassification,M_=$.HieraModel,N_=$.HieraPreTrainedModel,P_=$.HubertForCTC,F_=$.HubertForSequenceClassification,I_=$.HubertModel,L_=$.HubertPreTrainedModel,R_=$.IJepaForImageClassification,z_=$.IJepaModel,B_=$.IJepaPreTrainedModel,V_=$.Idefics3ForConditionalGeneration,H_=$.Idefics3ImageProcessor,U_=$.Idefics3PreTrainedModel,W_=$.Idefics3Processor,G_=$.ImageClassificationPipeline,K_=$.ImageFeatureExtractionPipeline,q_=$.ImageFeatureExtractor,J_=$.ImageMattingOutput,Y_=$.ImageProcessor,X_=$.ImageSegmentationPipeline,Z_=$.ImageToImagePipeline,Q_=$.ImageToTextPipeline,$_=$.InterruptableStoppingCriteria,ev=$.JAISLMHeadModel,tv=$.JAISModel,nv=$.JAISPreTrainedModel,rv=$.JinaCLIPImageProcessor,iv=$.JinaCLIPModel,av=$.JinaCLIPPreTrainedModel,ov=$.JinaCLIPProcessor,sv=$.JinaCLIPTextModel,cv=$.JinaCLIPVisionModel,lv=$.LiteWhisperForConditionalGeneration,uv=$.LlamaForCausalLM,dv=$.LlamaModel,fv=$.LlamaPreTrainedModel,pv=$.LlamaTokenizer,mv=$.LlavaForConditionalGeneration,hv=$.LlavaOnevisionForConditionalGeneration,gv=$.LlavaOnevisionImageProcessor,_v=$.LlavaPreTrainedModel,vv=$.LlavaProcessor,yv=$.LlavaQwen2ForCausalLM,bv=$.LogitsProcessor,xv=$.LogitsProcessorList,Sv=$.LogitsWarper,Cv=$.LongT5ForConditionalGeneration,wv=$.LongT5Model,Tv=$.LongT5PreTrainedModel,Ev=$.M2M100ForConditionalGeneration,Dv=$.M2M100Model,Ov=$.M2M100PreTrainedModel,kv=$.M2M100Tokenizer,Av=$.MBart50Tokenizer,jv=$.MBartForCausalLM,Mv=$.MBartForConditionalGeneration,Nv=$.MBartForSequenceClassification,Pv=$.MBartModel,Fv=$.MBartPreTrainedModel,Iv=$.MBartTokenizer,Lv=$.MPNetForMaskedLM,Rv=$.MPNetForQuestionAnswering,zv=$.MPNetForSequenceClassification,Bv=$.MPNetForTokenClassification,Vv=$.MPNetModel,Hv=$.MPNetPreTrainedModel,Uv=$.MPNetTokenizer,Wv=$.MT5ForConditionalGeneration,Gv=$.MT5Model,Kv=$.MT5PreTrainedModel,qv=$.MarianMTModel,Jv=$.MarianModel,Yv=$.MarianPreTrainedModel,Xv=$.MarianTokenizer,Zv=$.Mask2FormerImageProcessor,Qv=$.MaskFormerFeatureExtractor,$v=$.MaskFormerForInstanceSegmentation,ey=$.MaskFormerImageProcessor,ty=$.MaskFormerModel,ny=$.MaskFormerPreTrainedModel,ry=$.MaskedLMOutput,iy=$.MaxLengthCriteria,ay=$.Metric3DForDepthEstimation,oy=$.Metric3DPreTrainedModel,sy=$.Metric3Dv2ForDepthEstimation,cy=$.Metric3Dv2PreTrainedModel,ly=$.MgpstrForSceneTextRecognition,uy=$.MgpstrModelOutput,dy=$.MgpstrPreTrainedModel,fy=$.MgpstrProcessor,py=$.MgpstrTokenizer,my=$.MimiDecoderModel,hy=$.MimiDecoderOutput,gy=$.MimiEncoderModel,_y=$.MimiEncoderOutput,vy=$.MimiModel,yy=$.MimiPreTrainedModel,by=$.MinLengthLogitsProcessor,xy=$.MinNewTokensLengthLogitsProcessor,Sy=$.MistralForCausalLM,Cy=$.MistralModel,wy=$.MistralPreTrainedModel,Ty=$.MobileBertForMaskedLM,Ey=$.MobileBertForQuestionAnswering,Dy=$.MobileBertForSequenceClassification,Oy=$.MobileBertModel,ky=$.MobileBertPreTrainedModel,Ay=$.MobileBertTokenizer,jy=$.MobileLLMForCausalLM,My=$.MobileLLMModel,Ny=$.MobileLLMPreTrainedModel,Py=$.MobileNetV1FeatureExtractor,Fy=$.MobileNetV1ForImageClassification,Iy=$.MobileNetV1ForSemanticSegmentation,Ly=$.MobileNetV1ImageProcessor,Ry=$.MobileNetV1Model,zy=$.MobileNetV1PreTrainedModel,By=$.MobileNetV2FeatureExtractor,Vy=$.MobileNetV2ForImageClassification,Hy=$.MobileNetV2ForSemanticSegmentation,Uy=$.MobileNetV2ImageProcessor,Wy=$.MobileNetV2Model,Gy=$.MobileNetV2PreTrainedModel,Ky=$.MobileNetV3FeatureExtractor,qy=$.MobileNetV3ForImageClassification,Jy=$.MobileNetV3ForSemanticSegmentation,Yy=$.MobileNetV3ImageProcessor,Xy=$.MobileNetV3Model,Zy=$.MobileNetV3PreTrainedModel,Qy=$.MobileNetV4FeatureExtractor,$y=$.MobileNetV4ForImageClassification,eb=$.MobileNetV4ForSemanticSegmentation,tb=$.MobileNetV4ImageProcessor,nb=$.MobileNetV4Model,rb=$.MobileNetV4PreTrainedModel,ib=$.MobileViTFeatureExtractor,ab=$.MobileViTForImageClassification,ob=$.MobileViTImageProcessor,sb=$.MobileViTModel,cb=$.MobileViTPreTrainedModel,lb=$.MobileViTV2ForImageClassification,ub=$.MobileViTV2Model,db=$.MobileViTV2PreTrainedModel,fb=$.ModelOutput,pb=$.ModernBertForMaskedLM,mb=$.ModernBertForSequenceClassification,hb=$.ModernBertForTokenClassification,gb=$.ModernBertModel,_b=$.ModernBertPreTrainedModel,vb=$.Moondream1ForConditionalGeneration,yb=$.MoonshineFeatureExtractor,bb=$.MoonshineForConditionalGeneration,xb=$.MoonshineModel,Sb=$.MoonshinePreTrainedModel,Cb=$.MoonshineProcessor,wb=$.MptForCausalLM,Tb=$.MptModel,Eb=$.MptPreTrainedModel,Db=$.MultiModalityCausalLM,Ob=$.MultiModalityPreTrainedModel,kb=$.MusicgenForCausalLM,Ab=$.MusicgenForConditionalGeneration,jb=$.MusicgenModel,Mb=$.MusicgenPreTrainedModel,Nb=$.NeoBertForMaskedLM,Pb=$.NeoBertForQuestionAnswering,Fb=$.NeoBertForSequenceClassification,Ib=$.NeoBertForTokenClassification,Lb=$.NeoBertModel,Rb=$.NeoBertPreTrainedModel,zb=$.NllbTokenizer,Bb=$.NoBadWordsLogitsProcessor,Vb=$.NoRepeatNGramLogitsProcessor,Hb=$.NomicBertModel,Ub=$.NomicBertPreTrainedModel,Wb=$.NougatImageProcessor,Gb=$.NougatTokenizer,Kb=$.OPTForCausalLM,qb=$.OPTModel,Jb=$.OPTPreTrainedModel,Yb=$.ObjectDetectionPipeline,Xb=$.Olmo2ForCausalLM,Zb=$.Olmo2Model,Qb=$.Olmo2PreTrainedModel,$b=$.OlmoForCausalLM,ex=$.OlmoModel,tx=$.OlmoPreTrainedModel,nx=$.OpenELMForCausalLM,rx=$.OpenELMModel,ix=$.OpenELMPreTrainedModel,ax=$.OwlViTFeatureExtractor,ox=$.OwlViTForObjectDetection,sx=$.OwlViTImageProcessor,cx=$.OwlViTModel,lx=$.OwlViTPreTrainedModel,ux=$.OwlViTProcessor,dx=$.Owlv2ForObjectDetection,fx=$.Owlv2ImageProcessor,px=$.Owlv2Model,mx=$.Owlv2PreTrainedModel,hx=$.PaliGemmaForConditionalGeneration,gx=$.PaliGemmaPreTrainedModel,_x=$.PaliGemmaProcessor,vx=$.PatchTSMixerForPrediction,yx=$.PatchTSMixerModel,bx=$.PatchTSMixerPreTrainedModel,xx=$.PatchTSTForPrediction,Sx=$.PatchTSTModel,Cx=$.PatchTSTPreTrainedModel,wx=$.Phi3ForCausalLM,Tx=$.Phi3Model,Ex=$.Phi3PreTrainedModel,Dx=$.Phi3VForCausalLM,Ox=$.Phi3VImageProcessor,kx=$.Phi3VPreTrainedModel,Ax=$.Phi3VProcessor,jx=$.PhiForCausalLM,Mx=$.PhiModel,Nx=$.PhiPreTrainedModel,Px=$.Pipeline,Fx=$.PreTrainedModel,Ix=$.PreTrainedTokenizer,Lx=$.PretrainedConfig,Rx=$.PretrainedMixin,zx=$.Processor,Bx=$.PvtForImageClassification,Vx=$.PvtImageProcessor,Hx=$.PvtModel,Ux=$.PvtPreTrainedModel,Wx=$.PyAnnoteFeatureExtractor,Gx=$.PyAnnoteForAudioFrameClassification,Kx=$.PyAnnoteModel,qx=$.PyAnnotePreTrainedModel,Jx=$.PyAnnoteProcessor,Yx=$.QuestionAnsweringModelOutput,Xx=$.QuestionAnsweringPipeline,Zx=$.Qwen2ForCausalLM,Qx=$.Qwen2Model,$x=$.Qwen2PreTrainedModel,eS=$.Qwen2Tokenizer,tS=$.Qwen2VLForConditionalGeneration,nS=$.Qwen2VLImageProcessor,rS=$.Qwen2VLPreTrainedModel,iS=$.Qwen2VLProcessor,aS=$.Qwen3ForCausalLM,oS=$.Qwen3Model,sS=$.Qwen3PreTrainedModel,cS=$.RFDetrForObjectDetection,lS=$.RFDetrModel,uS=$.RFDetrObjectDetectionOutput,dS=$.RFDetrPreTrainedModel,fS=$.RTDetrForObjectDetection,pS=$.RTDetrImageProcessor,mS=$.RTDetrModel,hS=$.RTDetrObjectDetectionOutput,gS=$.RTDetrPreTrainedModel,_S=$.RTDetrV2ForObjectDetection,vS=$.RTDetrV2Model,yS=$.RTDetrV2ObjectDetectionOutput,bS=$.RTDetrV2PreTrainedModel,xS=$.RawAudio,SS=$.RawImage,CS=$.RawVideo,wS=$.RawVideoFrame,TS=$.RepetitionPenaltyLogitsProcessor,ES=$.ResNetForImageClassification,DS=$.ResNetModel,OS=$.ResNetPreTrainedModel,kS=$.RoFormerForMaskedLM,AS=$.RoFormerForQuestionAnswering,jS=$.RoFormerForSequenceClassification,MS=$.RoFormerForTokenClassification,NS=$.RoFormerModel,PS=$.RoFormerPreTrainedModel,FS=$.RoFormerTokenizer,IS=$.RobertaForMaskedLM,LS=$.RobertaForQuestionAnswering,RS=$.RobertaForSequenceClassification,zS=$.RobertaForTokenClassification,BS=$.RobertaModel,VS=$.RobertaPreTrainedModel,HS=$.RobertaTokenizer,US=$.SamImageProcessor,WS=$.SamImageSegmentationOutput,GS=$.SamModel,KS=$.SamPreTrainedModel,qS=$.SamProcessor,JS=$.SapiensForDepthEstimation,YS=$.SapiensForNormalEstimation,XS=$.SapiensForSemanticSegmentation,ZS=$.SapiensPreTrainedModel,QS=$.SeamlessM4TFeatureExtractor,$S=$.SegformerFeatureExtractor,eC=$.SegformerForImageClassification,tC=$.SegformerForSemanticSegmentation,nC=$.SegformerImageProcessor,rC=$.SegformerModel,iC=$.SegformerPreTrainedModel,aC=$.Seq2SeqLMOutput,oC=$.SequenceClassifierOutput,sC=$.SiglipImageProcessor,cC=$.SiglipModel,lC=$.SiglipPreTrainedModel,uC=$.SiglipTextModel,dC=$.SiglipTokenizer,fC=$.SiglipVisionModel,pC=$.SmolVLMForConditionalGeneration,mC=$.SmolVLMImageProcessor,hC=$.SmolVLMProcessor,gC=$.SnacDecoderModel,_C=$.SnacEncoderModel,vC=$.SnacFeatureExtractor,yC=$.SnacModel,bC=$.SnacPreTrainedModel,xC=$.SpeechT5FeatureExtractor,SC=$.SpeechT5ForSpeechToText,CC=$.SpeechT5ForTextToSpeech,wC=$.SpeechT5HifiGan,TC=$.SpeechT5Model,EC=$.SpeechT5PreTrainedModel,DC=$.SpeechT5Processor,OC=$.SpeechT5Tokenizer,kC=$.SqueezeBertForMaskedLM,AC=$.SqueezeBertForQuestionAnswering,jC=$.SqueezeBertForSequenceClassification,MC=$.SqueezeBertModel,NC=$.SqueezeBertPreTrainedModel,PC=$.SqueezeBertTokenizer,FC=$.StableLmForCausalLM,IC=$.StableLmModel,LC=$.StableLmPreTrainedModel,RC=$.Starcoder2ForCausalLM,zC=$.Starcoder2Model,BC=$.Starcoder2PreTrainedModel,VC=$.StoppingCriteria,HC=$.StoppingCriteriaList,UC=$.StyleTextToSpeech2Model,WC=$.StyleTextToSpeech2PreTrainedModel,GC=$.SummarizationPipeline,KC=$.SuppressTokensAtBeginLogitsProcessor,qC=$.Swin2SRForImageSuperResolution,JC=$.Swin2SRImageProcessor,YC=$.Swin2SRModel,XC=$.Swin2SRPreTrainedModel,ZC=$.SwinForImageClassification,QC=$.SwinForSemanticSegmentation,$C=$.SwinModel,ew=$.SwinPreTrainedModel,tw=$.T5ForConditionalGeneration,nw=$.T5Model,rw=$.T5PreTrainedModel,iw=$.T5Tokenizer,aw=$.TableTransformerForObjectDetection,ow=$.TableTransformerModel,sw=$.TableTransformerObjectDetectionOutput,cw=$.TableTransformerPreTrainedModel,lw=$.TemperatureLogitsWarper,uw=$.Tensor,dw=$.Text2TextGenerationPipeline,fw=$.TextClassificationPipeline,pw=$.TextGenerationPipeline,mw=$.TextStreamer,hw=$.TextToAudioPipeline,gw=$.TokenClassificationPipeline,_w=$.TokenClassifierOutput,vw=$.TokenizerModel,yw=$.TopKLogitsWarper,bw=$.TopPLogitsWarper,xw=$.TrOCRForCausalLM,Sw=$.TrOCRPreTrainedModel,Cw=$.TranslationPipeline,ww=$.UltravoxModel,Tw=$.UltravoxPreTrainedModel,Ew=$.UltravoxProcessor,Dw=$.UniSpeechForCTC,Ow=$.UniSpeechForSequenceClassification,kw=$.UniSpeechModel,Aw=$.UniSpeechPreTrainedModel,jw=$.UniSpeechSatForAudioFrameClassification,Mw=$.UniSpeechSatForCTC,Nw=$.UniSpeechSatForSequenceClassification,Pw=$.UniSpeechSatModel,Fw=$.UniSpeechSatPreTrainedModel,Iw=$.VLChatProcessor,Lw=$.VLMImageProcessor,Rw=$.ViTFeatureExtractor,zw=$.ViTForImageClassification,Bw=$.ViTImageProcessor,Vw=$.ViTMAEModel,Hw=$.ViTMAEPreTrainedModel,Uw=$.ViTMSNForImageClassification,Ww=$.ViTMSNModel,Gw=$.ViTMSNPreTrainedModel,Kw=$.ViTModel,qw=$.ViTPreTrainedModel,Jw=$.VisionEncoderDecoderModel,Yw=$.VitMatteForImageMatting,Xw=$.VitMatteImageProcessor,Zw=$.VitMattePreTrainedModel,Qw=$.VitPoseForPoseEstimation,$w=$.VitPoseImageProcessor,eT=$.VitPosePreTrainedModel,tT=$.VitsModel,nT=$.VitsModelOutput,rT=$.VitsPreTrainedModel,iT=$.VitsTokenizer,aT=$.Wav2Vec2BertForCTC,oT=$.Wav2Vec2BertForSequenceClassification,sT=$.Wav2Vec2BertModel,cT=$.Wav2Vec2BertPreTrainedModel,lT=$.Wav2Vec2CTCTokenizer,uT=$.Wav2Vec2FeatureExtractor,dT=$.Wav2Vec2ForAudioFrameClassification,fT=$.Wav2Vec2ForCTC,pT=$.Wav2Vec2ForSequenceClassification,mT=$.Wav2Vec2Model,hT=$.Wav2Vec2PreTrainedModel,gT=$.Wav2Vec2Processor,_T=$.Wav2Vec2ProcessorWithLM,vT=$.WavLMForAudioFrameClassification,yT=$.WavLMForCTC,bT=$.WavLMForSequenceClassification,xT=$.WavLMForXVector,ST=$.WavLMModel,CT=$.WavLMPreTrainedModel,wT=$.WeSpeakerFeatureExtractor,TT=$.WeSpeakerResNetModel,ET=$.WeSpeakerResNetPreTrainedModel,DT=$.WhisperFeatureExtractor,OT=$.WhisperForConditionalGeneration,kT=$.WhisperModel,AT=$.WhisperPreTrainedModel,jT=$.WhisperProcessor,MT=$.WhisperTextStreamer,NT=$.WhisperTimeStampLogitsProcessor,PT=$.WhisperTokenizer,FT=$.XLMForQuestionAnswering,IT=$.XLMForSequenceClassification,LT=$.XLMForTokenClassification,RT=$.XLMModel,zT=$.XLMPreTrainedModel,BT=$.XLMRobertaForMaskedLM,VT=$.XLMRobertaForQuestionAnswering,HT=$.XLMRobertaForSequenceClassification,UT=$.XLMRobertaForTokenClassification,WT=$.XLMRobertaModel,GT=$.XLMRobertaPreTrainedModel,KT=$.XLMRobertaTokenizer,qT=$.XLMTokenizer,JT=$.XLMWithLMHeadModel,YT=$.XVectorOutput,XT=$.YolosFeatureExtractor,ZT=$.YolosForObjectDetection,QT=$.YolosImageProcessor,$T=$.YolosModel,eE=$.YolosObjectDetectionOutput,tE=$.YolosPreTrainedModel,nE=$.ZeroShotAudioClassificationPipeline,rE=$.ZeroShotClassificationPipeline,iE=$.ZeroShotImageClassificationPipeline,aE=$.ZeroShotObjectDetectionPipeline,oE=$.bankers_round,sE=$.cat,cE=$.cos_sim,lE=$.dot,uE=$.dynamic_time_warping,dE=$.env,fE=$.full,pE=$.full_like,mE=$.getKeyValueShapes,hE=$.hamming,gE=$.hanning,_E=$.interpolate,vE=$.interpolate_4d,yE=$.interpolate_data,bE=$.is_chinese_char,xE=$.layer_norm,SE=$.load_image,CE=$.load_video,wE=$.log_softmax,TE=$.magnitude,EE=$.matmul,DE=$.max,OE=$.mean,kE=$.mean_pooling,AE=$.medianFilter,jE=$.mel_filter_bank,ME=$.min,NE=$.ones,PE=$.ones_like,FE=$.permute,IE=$.permute_data,LE=$.pipeline,RE=$.quantize_embeddings,zE=$.rand,BE=$.read_audio,VE=$.rfft,HE=$.round,UE=$.slice,WE=$.softmax,GE=$.spectrogram,KE=$.stack,qE=$.std_mean,JE=$.topk,YE=$.window_function,XE=$.zeros,ZE=$.zeros_like;export{dE as b,ep as c,Cf as d,SS as e,uw as f}; \ No newline at end of file diff --git a/assets/valibot-CbgwcZn_-DF-kgftH.js b/assets/valibot-CbgwcZn_-BuwxpHVF.js similarity index 69% rename from assets/valibot-CbgwcZn_-DF-kgftH.js rename to assets/valibot-CbgwcZn_-BuwxpHVF.js index 7dc1b21115bd70d7452da8b5c6721965f1f052af..cd9ea9662a5c39349646bdc9701cb9371104119a 100644 --- a/assets/valibot-CbgwcZn_-DF-kgftH.js +++ b/assets/valibot-CbgwcZn_-BuwxpHVF.js @@ -1 +1 @@ -import{D as e,aK as t}from"./index-BOKBAzT0.js";const n=async()=>{let{toJsonSchema:n}=await e(t(()=>import(`./dist-BevHBv1q.js`),[]),`@valibot/to-json-schema`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{A as e,aK as t}from"./index-K-hxNScn.js";const n=async()=>{let{toJsonSchema:n}=await e(t(()=>import(`./dist-BevHBv1q.js`),[]),`@valibot/to-json-schema`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/vibrant-B9whP1_s.js b/assets/vibrant-DJTnlypI.js similarity index 50% rename from assets/vibrant-B9whP1_s.js rename to assets/vibrant-DJTnlypI.js index 0a3d4b2266364911447bebe86752b5bd756536d1..2f61b4b6dfe47bc47f4c33855f08294be2e071c4 100644 --- a/assets/vibrant-B9whP1_s.js +++ b/assets/vibrant-DJTnlypI.js @@ -1 +1 @@ -import{b as e}from"./InputFile-BBWEWJbr.js";import{d0 as t,d2 as n,d4 as r,d8 as i,d9 as a,dD as o,dE as s,dG as c,db as l,df as u,dg as d,do as f,dy as p}from"./index-BOKBAzT0.js";import{b as m}from"./browser-CJhr0Svl.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=i({__name:`vibrant`,setup(i){let x=o([]),S=o(),C=o([]),w=o([]);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 n(x,e=>{T(e[0])},{deep:!0}),(n,i)=>(r(),l(`div`,h,[u(`div`,g,[(r(!0),l(f,null,d(C.value,(e,t)=>(r(),l(`div`,{key:t,style:c({backgroundColor:e}),"size-20":``,"rounded-full":``},null,4))),128))]),u(`div`,_,s(w.value),1),u(`div`,v,[t(p(e),{modelValue:x.value,"onUpdate:modelValue":i[0]||=e=>x.value=e,"h-60":``,"w-full":``},null,8,[`modelValue`])]),u(`div`,y,[S.value?(r(),l(`img`,{key:0,src:S.value.src,"h-full":``,"w-full":``,"object-contain":``},null,8,b)):a(``,!0)])]))}}),S=x;export{S as default}; \ No newline at end of file +import{b as e}from"./InputFile-CrE3SFMy.js";import{d3 as t,d4 as n,d6 as r,dA as i,dG as a,dI as o,da as s,db as c,dj as l,do as u,dq as d,ds as f,dv as p}from"./index-K-hxNScn.js";import{b as m}from"./browser-CJhr0Svl.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=t({__name:`vibrant`,setup(t){let x=i([]),S=i(),C=i([]),w=i([]);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 d(x,e=>{T(e[0])},{deep:!0}),(t,i)=>(f(),r(`div`,h,[s(`div`,g,[(f(!0),r(l,null,c(C.value,(e,t)=>(f(),r(`div`,{key:t,style:o({backgroundColor:e}),"size-20":``,"rounded-full":``},null,4))),128))]),s(`div`,_,a(w.value),1),s(`div`,v,[u(p(e),{modelValue:x.value,"onUpdate:modelValue":i[0]||=e=>x.value=e,"h-60":``,"w-full":``},null,8,[`modelValue`])]),s(`div`,y,[S.value?(f(),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-0NaQ_0q9.js b/assets/volcengine-CNYLf4lq.js similarity index 63% rename from assets/volcengine-0NaQ_0q9.js rename to assets/volcengine-CNYLf4lq.js index eb0d727fc8ce14adb58961b9738e9cd15a73aa92..02b0dab98b7abf250867d9342245e8fecad529f9 100644 --- a/assets/volcengine-0NaQ_0q9.js +++ b/assets/volcengine-CNYLf4lq.js @@ -1 +1 @@ -import{$ as e,a6 as t,aL as n,ap as r,ar as i,d0 as a,d2 as o,d4 as s,d6 as c,d8 as l,dD as u,da as d,df as f,di as p,dp as m,dy as h,s as g,x as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b={flex:`~ col gap-4`},x=`volcengine`,S=`v1`;var C=l({__name:`volcengine`,setup(l){let y=u(1),C=_(),w=v(),{providers:T}=n(w),{t:E}=t(),D=m({get:()=>(T.value[x]?.app)?.appId||``,set:e=>{T.value[x]||(T.value[x]={}),T.value[x].app={appId:e}}}),O=m(()=>!!T.value[x]?.apiKey),k=m(()=>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 c(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)}),o(y,async()=>{let e=w.getProviderConfig(x);e.audio||={},e.audio.speedRatio=y.value}),o([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}),(t,n)=>(s(),p(h(g),{"provider-id":x,"default-model":S},{"basic-settings":d(()=>[f(`div`,b,[a(h(i),{modelValue:D.value,"onUpdate:modelValue":n[0]||=e=>D.value=e,label:h(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.label`),description:h(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.description`),required:``},null,8,[`modelValue`,`label`,`description`])])]),"voice-settings":d(()=>[a(h(r),{modelValue:y.value,"onUpdate:modelValue":n[1]||=e=>y.value=e,label:h(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:d(()=>[a(h(e),{"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{Y as e,a3 as t,aL as n,am as r,ao as i,d1 as a,d3 as o,d5 as s,dA as c,da as l,dd as u,dk as d,do as f,dq as p,ds as m,dv as h,p as g,u as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b={flex:`~ col gap-4`},x=`volcengine`,S=`v1`;var C=o({__name:`volcengine`,setup(o){let y=c(1),C=_(),w=v(),{providers:T}=n(w),{t:E}=t(),D=d({get:()=>(T.value[x]?.app)?.appId||``,set:e=>{T.value[x]||(T.value[x]={}),T.value[x].app={appId:e}}}),O=d(()=>!!T.value[x]?.apiKey),k=d(()=>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)}),p(y,async()=>{let e=w.getProviderConfig(x);e.audio||={},e.audio.speedRatio=y.value}),p([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}),(t,n)=>(m(),u(h(g),{"provider-id":x,"default-model":S},{"basic-settings":s(()=>[l(`div`,b,[f(h(i),{modelValue:D.value,"onUpdate:modelValue":n[0]||=e=>D.value=e,label:h(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.label`),description:h(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.description`),required:``},null,8,[`modelValue`,`label`,`description`])])]),"voice-settings":s(()=>[f(h(r),{modelValue:y.value,"onUpdate:modelValue":n[1]||=e=>y.value=e,label:h(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:s(()=>[f(h(e),{"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-DnEbqAHv.js b/assets/xai-DnEbqAHv.js deleted file mode 100644 index 89f213f22d9de4e2a847a24dfa7e557f11048844..0000000000000000000000000000000000000000 --- a/assets/xai-DnEbqAHv.js +++ /dev/null @@ -1 +0,0 @@ -import{a1 as e,a2 as t,a3 as n,a4 as r,a5 as i,a6 as a,a7 as o,aG as s,aL as c,d0 as l,d2 as u,d4 as d,d6 as f,d8 as p,da as m,di as h,dp as g,dy as _,z as v}from"./index-BOKBAzT0.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`xai`;var x=p({__name:`xai`,setup(p){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=g(()=>S.getProviderMetadata(b)),T=g({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=g({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});f(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(d(),h(_(e),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:m(()=>[l(_(t),null,{default:m(()=>[l(_(n),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:m(()=>[l(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`xai-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),l(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[l(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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/xai-tmPQgTKt.js b/assets/xai-tmPQgTKt.js new file mode 100644 index 0000000000000000000000000000000000000000..b2f7fa8680e3598fde3fd0fa140de2c385d95e56 --- /dev/null +++ b/assets/xai-tmPQgTKt.js @@ -0,0 +1 @@ +import{$ as e,Z as t,_ as n,a1 as r,a2 as i,a3 as a,a4 as o,aG as s,aL as c,d1 as l,d3 as u,d5 as d,dd as f,dk as p,do as m,dq as h,ds as g,dv as _,w as v}from"./index-K-hxNScn.js";import{b as y}from"./route-block-D_qNAUXY.js";const b=`xai`;var x=u({__name:`xai`,setup(u){let{t:y}=a(),x=s(),S=v(),{providers:C}=c(S),w=p(()=>S.getProviderMetadata(b)),T=p({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=p({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});l(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),h([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(a,s)=>(g(),f(_(t),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>_(x).back()},{default:d(()=>[m(_(n),null,{default:d(()=>[m(_(e),{title:_(y)(`settings.pages.providers.common.section.basic.title`),description:_(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[m(_(i),{modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`xai-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(_(o),{title:_(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[m(_(r),{modelValue:E.value,"onUpdate:modelValue":s[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-CD8IEU5z-BtqngZG1.js b/assets/zod-CD8IEU5z-BtqngZG1.js deleted file mode 100644 index 06ffe673a8f4780f5fdfa5c1ccd08a88e59688c4..0000000000000000000000000000000000000000 --- a/assets/zod-CD8IEU5z-BtqngZG1.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-BSZm-ZjW.js","assets/index-BOKBAzT0.js","assets/index-CsNim-Yi.css"])))=>i.map(i=>d[i]); -import{C as e,aK as t}from"./index-BOKBAzT0.js";const n=async()=>{let n=t=>{throw Error(`xsschema: Missing zod v4 dependencies "zod". see ${e}`)},r=t=>{throw Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${e}`)};try{let{toJSONSchema:e}=await t(async()=>{let{toJSONSchema:e}=await import(`./core-Ab2YLnjr.js`);return{toJSONSchema:e}},[]);n=e}catch(e){e instanceof Error&&console.error(e.message)}try{let{zodToJsonSchema:e}=await t(async()=>{let{zodToJsonSchema:e}=await import(`./esm-BSZm-ZjW.js`);return{zodToJsonSchema:e}},__vite__mapDeps([0,1,2]));r=e}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/assets/zod-CD8IEU5z-D4TCz3Sz.js b/assets/zod-CD8IEU5z-D4TCz3Sz.js new file mode 100644 index 0000000000000000000000000000000000000000..574fd8cb72f09d1a9cf7e34ca25fb999f7868f78 --- /dev/null +++ b/assets/zod-CD8IEU5z-D4TCz3Sz.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-tBbs2cmY.js","assets/index-K-hxNScn.js","assets/index-DMI81gkc.css"])))=>i.map(i=>d[i]); +import{aK as e,z as t}from"./index-K-hxNScn.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-Ab2YLnjr.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-tBbs2cmY.js`);return{zodToJsonSchema:e}},__vite__mapDeps([0,1,2]));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 498b0d895b4714fe3ed05e125ea4f1e5b6e95a61..7064a8dc163fcc3c2a41631c72914a526efec9a8 100644 --- a/index.html +++ b/index.html @@ -32,8 +32,8 @@ src="/remote-assets/page-external-data/js/script.js" > - - + +
diff --git a/sw.js b/sw.js index f8a73bab989c042f5aed08e2ccc23ca3fd01fce3..556effb7b5124e2edfe272107895118ae9eeddfb 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 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-Dcc0vk0T.js",revision:null},{url:"assets/__vite-optional-peer-dep_effect_xsschema-Cr0zYJs-.js",revision:null},{url:"assets/__vite-optional-peer-dep_sury_xsschema-YrGlhVoU.js",revision:null},{url:"assets/_...all_-kEGASjnp.js",revision:null},{url:"assets/airi-card-CSjKA-0V.js",revision:null},{url:"assets/alibaba-cloud-model-studio-CCuOI-7V.js",revision:null},{url:"assets/AnimatedWave-Ba4PQcRS.css",revision:null},{url:"assets/AnimatedWave-DOvVQHan.js",revision:null},{url:"assets/anthropic-BxJBcQ5t.js",revision:null},{url:"assets/appearance-CxlToFOV.js",revision:null},{url:"assets/arktype-C-GObzDh-o7JLSWxh.js",revision:null},{url:"assets/audio-5XV-uIzq.js",revision:null},{url:"assets/audio-record-k6DJ-iI-.js",revision:null},{url:"assets/background-remove-CYdik4Zi.js",revision:null},{url:"assets/Basic-6PI1-eSd.js",revision:null},{url:"assets/browser-CJhr0Svl.js",revision:null},{url:"assets/browser-DAWwZmxu.js",revision:null},{url:"assets/CardCreate-BjA7840r.js",revision:null},{url:"assets/CardCreate-DrdA498D.js",revision:null},{url:"assets/CardCreationDialog-Bazp-7BG.js",revision:null},{url:"assets/CardCreationDialog-Bz0WGMbk.js",revision:null},{url:"assets/CardCreationDialog-CG2KLbdk.css",revision:null},{url:"assets/CardDetailDialog-CJ2uO9ec.js",revision:null},{url:"assets/CardDetailDialog-DErJoDp8.js",revision:null},{url:"assets/CardListItem-0f3nWl-J.js",revision:null},{url:"assets/CardListItem-BkR5V785.js",revision:null},{url:"assets/chat-ChmJywFT.js",revision:null},{url:"assets/cloudflare-workers-ai-MVAb5rND.js",revision:null},{url:"assets/color-scheme-CwgGX5qJ.js",revision:null},{url:"assets/color-scheme-ZSHYHslH.css",revision:null},{url:"assets/consciousness-Em-15uM5.js",revision:null},{url:"assets/core-Ab2YLnjr.js",revision:null},{url:"assets/deepseek-BlRSY_Z0.js",revision:null},{url:"assets/default-browser-CICL74Rl.js",revision:null},{url:"assets/default-Bwh18mCX.js",revision:null},{url:"assets/default-node-C2t2tqcG.js",revision:null},{url:"assets/delays-BYTPS79J.js",revision:null},{url:"assets/DeleteCardDialog-Ba7jKdc6.js",revision:null},{url:"assets/DeleteCardDialog-DWd1lG7D.js",revision:null},{url:"assets/developer-BQaCIb5y.js",revision:null},{url:"assets/dist-BevHBv1q.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-CIsUbAtz.js",revision:null},{url:"assets/effect-DBSVVF8G-CH9BzHgp.js",revision:null},{url:"assets/elevenlabs-C8CGb9J2.js",revision:null},{url:"assets/emotions-CYtEYKmx.js",revision:null},{url:"assets/esm-BSZm-ZjW.js",revision:null},{url:"assets/featherless-ai-CvwPAVKd.js",revision:null},{url:"assets/filter-message-CpQpJgpb.js",revision:null},{url:"assets/fireworks-ai-uxjeby9e.js",revision:null},{url:"assets/general-DBEEvfiB.js",revision:null},{url:"assets/gesture-circle-n22RrPkv.js",revision:null},{url:"assets/google-generative-ai-CKximfd-.js",revision:null},{url:"assets/HeaderLink-Bxs3yYEi.css",revision:null},{url:"assets/HeaderLink-DoEHmasi.js",revision:null},{url:"assets/hearing-M0TBmueY.js",revision:null},{url:"assets/home-DfltP_SY.js",revision:null},{url:"assets/icon-animation-Cj5BOBLD.js",revision:null},{url:"assets/IconAnimation-CJRikR53.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-drp9yoeo.js",revision:null},{url:"assets/import-url-browser-CXhM7gkL.js",revision:null},{url:"assets/import-url-browser-VKajNDYM.js",revision:null},{url:"assets/import-url-node-DcfQpSzu.js",revision:null},{url:"assets/index-BOKBAzT0.js",revision:null},{url:"assets/index-CsNim-Yi.css",revision:null},{url:"assets/InputFile-BBWEWJbr.js",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.3/Core/live2dcubismcore.min.js",revision:null},{url:"assets/memory-D3FghKqR.js",revision:null},{url:"assets/memory-long-term-w8foiIis.js",revision:null},{url:"assets/memory-short-term-D1hd1P4O.js",revision:null},{url:"assets/messages-Cg3q0Woa.js",revision:null},{url:"assets/microsoft-speech-CEMk_Y1p.js",revision:null},{url:"assets/mistral-ai-DeCG1zpj.js",revision:null},{url:"assets/models-Dfsy0OC4.js",revision:null},{url:"assets/modules-DRy6wkoH.js",revision:null},{url:"assets/moonshot-ai-CH0UaQqy.js",revision:null},{url:"assets/novita-ai-CI0eK_Uz.js",revision:null},{url:"assets/ollama-3XcXtIkW.js",revision:null},{url:"assets/openai-audio-speech-CKZ4rtwU.js",revision:null},{url:"assets/openai-audio-transcription-DC9rP5fb.js",revision:null},{url:"assets/openai-DDftvili.js",revision:null},{url:"assets/openrouter-ai-BUmol1WC.js",revision:null},{url:"assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",revision:null},{url:"assets/pages-bFQliyEp.js",revision:null},{url:"assets/plain-Ch0w-BYR.js",revision:null},{url:"assets/player2-9goZ4jBJ.js",revision:null},{url:"assets/player2-speech-YsXUM2wN.js",revision:null},{url:"assets/polaroid-CCOPCJYT.js",revision:null},{url:"assets/process.worklet-CF6Ao8XG.js",revision:null},{url:"assets/providers-DAWTpKmJ.js",revision:null},{url:"assets/queue-BhuYf-bb.js",revision:null},{url:"assets/route-block-D_qNAUXY.js",revision:null},{url:"assets/scene-CjpP1VIb.js",revision:null},{url:"assets/Scenes-B8GWuxOy.js",revision:null},{url:"assets/settings-BRiQ-TKp.js",revision:null},{url:"assets/settings-XLQSFV-w.js",revision:null},{url:"assets/speech-DWhc1XoS.js",revision:null},{url:"assets/stage-C0Idwk1_.js",revision:null},{url:"assets/stage-GlmzKUmw.js",revision:null},{url:"assets/sury-GtnkadyM-BJxUNG_3.js",revision:null},{url:"assets/Textarea-vIof96sl.js",revision:null},{url:"assets/theme-color-aSfOfY8M.js",revision:null},{url:"assets/together-ai-DhK_y0lS.js",revision:null},{url:"assets/transformers.web-DzAoitZd.js",revision:null},{url:"assets/valibot-CbgwcZn_-DF-kgftH.js",revision:null},{url:"assets/vibrant-B9whP1_s.js",revision:null},{url:"assets/volcengine-0NaQ_0q9.js",revision:null},{url:"assets/worker-Bv82ofgX.js",revision:null},{url:"assets/xai-DnEbqAHv.js",revision:null},{url:"assets/zod-CD8IEU5z-BtqngZG1.js",revision:null},{url:"index.html",revision:"475eafbcd0ffcbf3a528f5fa386df53b"},{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:"0a5a207cc5b76af4bd35f0b587dd1902"}],{}),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 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-Dm87haFe.js",revision:null},{url:"assets/__vite-optional-peer-dep_effect_xsschema-Cr0zYJs-.js",revision:null},{url:"assets/__vite-optional-peer-dep_sury_xsschema-YrGlhVoU.js",revision:null},{url:"assets/_...all_-CBSDUE9n.js",revision:null},{url:"assets/airi-card-mY7qwyzh.js",revision:null},{url:"assets/alibaba-cloud-model-studio-NFHP1r1x.js",revision:null},{url:"assets/AnimatedWave-Ba4PQcRS.css",revision:null},{url:"assets/AnimatedWave-CMIzOsja.js",revision:null},{url:"assets/anthropic-Cu-QiXIM.js",revision:null},{url:"assets/appearance-BjGIfT8s.js",revision:null},{url:"assets/arktype-C-GObzDh-o7JLSWxh.js",revision:null},{url:"assets/audio-record-DsJ9pwd8.js",revision:null},{url:"assets/audio-YpvKX-Ak.js",revision:null},{url:"assets/background-remove-BBB0u_Hq.js",revision:null},{url:"assets/Basic-1H4d_HIg.js",revision:null},{url:"assets/browser-CJhr0Svl.js",revision:null},{url:"assets/browser-DAWwZmxu.js",revision:null},{url:"assets/CardCreate-CAbaTC1Z.js",revision:null},{url:"assets/CardCreate-CEdooQmC.js",revision:null},{url:"assets/CardCreationDialog-CG2KLbdk.css",revision:null},{url:"assets/CardCreationDialog-Dfq3gfrr.js",revision:null},{url:"assets/CardCreationDialog-DtkXvIwx.js",revision:null},{url:"assets/CardDetailDialog-B5sM5zj1.js",revision:null},{url:"assets/CardDetailDialog-CidehlMa.js",revision:null},{url:"assets/CardListItem-Bj3hdPXC.js",revision:null},{url:"assets/CardListItem-DTzfNndg.js",revision:null},{url:"assets/chat-DAlZ_Wc3.js",revision:null},{url:"assets/cloudflare-workers-ai-DvT5X7zi.js",revision:null},{url:"assets/color-scheme-jmrpTVHV.js",revision:null},{url:"assets/color-scheme-ZSHYHslH.css",revision:null},{url:"assets/consciousness-DOb7L0Yh.js",revision:null},{url:"assets/core-Ab2YLnjr.js",revision:null},{url:"assets/deepseek-BrvbO56H.js",revision:null},{url:"assets/default-BcIEAl0a.js",revision:null},{url:"assets/default-browser-CICL74Rl.js",revision:null},{url:"assets/default-node-me4M3cN3.js",revision:null},{url:"assets/delays-hZ_G3T9g.js",revision:null},{url:"assets/DeleteCardDialog-82b70cIC.js",revision:null},{url:"assets/DeleteCardDialog-CTir2p4h.js",revision:null},{url:"assets/developer-CCqYxIcY.js",revision:null},{url:"assets/dist-BevHBv1q.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-CIsUbAtz.js",revision:null},{url:"assets/effect-DBSVVF8G-BdFsO4ps.js",revision:null},{url:"assets/elevenlabs-B1MqPQr8.js",revision:null},{url:"assets/emotions-pdqefEJH.js",revision:null},{url:"assets/esm-tBbs2cmY.js",revision:null},{url:"assets/featherless-ai-DTyndR9W.js",revision:null},{url:"assets/filter-message-DCHgw6K5.js",revision:null},{url:"assets/fireworks-ai-DvpnBa6B.js",revision:null},{url:"assets/general-xGijmv9Q.js",revision:null},{url:"assets/gesture-circle-BhrbgQjT.js",revision:null},{url:"assets/google-generative-ai-A9AGUM2m.js",revision:null},{url:"assets/HeaderLink-Bxs3yYEi.css",revision:null},{url:"assets/HeaderLink-DJwpVSTp.js",revision:null},{url:"assets/hearing-BRaBstPb.js",revision:null},{url:"assets/home-PWxm5mNd.js",revision:null},{url:"assets/icon-animation-DYW3c7je.js",revision:null},{url:"assets/IconAnimation-DBKHapUf.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-Drq3BS_B.js",revision:null},{url:"assets/import-url-browser-CXhM7gkL.js",revision:null},{url:"assets/import-url-browser-VKajNDYM.js",revision:null},{url:"assets/import-url-node-DcfQpSzu.js",revision:null},{url:"assets/index-DMI81gkc.css",revision:null},{url:"assets/index-K-hxNScn.js",revision:null},{url:"assets/InputFile-CrE3SFMy.js",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.3/Core/live2dcubismcore.min.js",revision:null},{url:"assets/memory-BnX_YReY.js",revision:null},{url:"assets/memory-long-term-B5wEjqtq.js",revision:null},{url:"assets/memory-short-term-CxN60U-L.js",revision:null},{url:"assets/messages-DxJEqeNl.js",revision:null},{url:"assets/microsoft-speech-CRIYmLXG.js",revision:null},{url:"assets/mistral-ai-Cp_MAH4V.js",revision:null},{url:"assets/models-BdKy7BTu.js",revision:null},{url:"assets/modules-B091BuDn.js",revision:null},{url:"assets/moonshot-ai-bUFSVmPQ.js",revision:null},{url:"assets/novita-ai-DCJo9fcm.js",revision:null},{url:"assets/ollama-xKcCpTx0.js",revision:null},{url:"assets/openai-audio-speech-DW1QrfRq.js",revision:null},{url:"assets/openai-audio-transcription-CavrcyBE.js",revision:null},{url:"assets/openai-CQAVgiMk.js",revision:null},{url:"assets/openrouter-ai-CnYjoQlp.js",revision:null},{url:"assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",revision:null},{url:"assets/pages-BAul_h40.js",revision:null},{url:"assets/plain-DljYvhWl.js",revision:null},{url:"assets/player2-speech-rSa7i7tK.js",revision:null},{url:"assets/player2-Vrjn9guG.js",revision:null},{url:"assets/polaroid-Bs31_N5q.js",revision:null},{url:"assets/process.worklet-CF6Ao8XG.js",revision:null},{url:"assets/providers-CVExW2Kb.js",revision:null},{url:"assets/queue-xOIEiTzT.js",revision:null},{url:"assets/route-block-D_qNAUXY.js",revision:null},{url:"assets/scene-DsHsIafe.js",revision:null},{url:"assets/Scenes-D5Bedj_D.js",revision:null},{url:"assets/settings-DlFH7AgC.js",revision:null},{url:"assets/settings-FSKP6s04.js",revision:null},{url:"assets/speech-Dm3KkONO.js",revision:null},{url:"assets/stage-B5qiz8AC.js",revision:null},{url:"assets/stage-LDOg1gBu.js",revision:null},{url:"assets/sury-GtnkadyM-DKj7Iepm.js",revision:null},{url:"assets/Textarea-Bzx3P1JU.js",revision:null},{url:"assets/theme-color-B66QzWnt.js",revision:null},{url:"assets/together-ai-CFPLADAy.js",revision:null},{url:"assets/transformers.web-D42P8ZMr.js",revision:null},{url:"assets/valibot-CbgwcZn_-BuwxpHVF.js",revision:null},{url:"assets/vibrant-DJTnlypI.js",revision:null},{url:"assets/volcengine-CNYLf4lq.js",revision:null},{url:"assets/worker-Bv82ofgX.js",revision:null},{url:"assets/xai-tmPQgTKt.js",revision:null},{url:"assets/zod-CD8IEU5z-D4TCz3Sz.js",revision:null},{url:"index.html",revision:"7906e77d32fb9d76334e75c5f8a4e411"},{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:"0a5a207cc5b76af4bd35f0b587dd1902"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/docs\//,/^\/ui\//,/^\/remote-assets\//,/^\/api\//]}))});