ymy-components 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +14 -13
  2. package/dist/index.js +229 -228
  3. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),w=require("react"),$n=require("react-dom"),M=require("styled-components"),Ct=require("@reduxjs/toolkit"),jn=e=>e&&e.__esModule?e:{default:e};function Ln(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const N=Ln(w),_=jn(M);var Ot=je(),T=e=>$e(e,Ot),Rt=je();T.write=e=>$e(e,Rt);var et=je();T.onStart=e=>$e(e,et);var Dt=je();T.onFrame=e=>$e(e,Dt);var It=je();T.onFinish=e=>$e(e,It);var ae=[];T.setTimeout=(e,t)=>{const r=T.now()+t,n=()=>{const s=ae.findIndex(o=>o.cancel==n);~s&&ae.splice(s,1),Z-=~s?1:0},i={time:r,handler:e,cancel:n};return ae.splice(Or(r),0,i),Z+=1,Rr(),i};var Or=e=>~(~ae.findIndex(t=>t.time>e)||~ae.length);T.cancel=e=>{et.delete(e),Dt.delete(e),It.delete(e),Ot.delete(e),Rt.delete(e)};T.sync=e=>{vt=!0,T.batchedUpdates(e),vt=!1};T.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...i){t=i,T.onStart(r)}return n.handler=e,n.cancel=()=>{et.delete(r),t=null},n};var $t=typeof window<"u"?window.requestAnimationFrame:()=>{};T.use=e=>$t=e;T.now=typeof performance<"u"?()=>performance.now():Date.now;T.batchedUpdates=e=>e();T.catch=console.error;T.frameLoop="always";T.advance=()=>{T.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ir()};var X=-1,Z=0,vt=!1;function $e(e,t){vt?(t.delete(e),e(0)):(t.add(e),Rr())}function Rr(){X<0&&(X=0,T.frameLoop!=="demand"&&$t(Dr))}function Mn(){X=-1}function Dr(){~X&&($t(Dr),T.batchedUpdates(Ir))}function Ir(){const e=X;X=T.now();const t=Or(X);if(t&&($r(ae.splice(0,t),r=>r.handler()),Z-=t),!Z){Mn();return}et.flush(),Ot.flush(e?Math.min(64,X-e):16.667),Dt.flush(),Rt.flush(),It.flush()}function je(){let e=new Set,t=e;return{add(r){Z+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return Z-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,Z-=t.size,$r(t,n=>n(r)&&e.add(n)),Z+=e.size,t=e)}}}function $r(e,t){e.forEach(r=>{try{t(r)}catch(n){T.catch(n)}})}var Nn=Object.defineProperty,Vn=(e,t)=>{for(var r in t)Nn(e,r,{get:t[r],enumerable:!0})},U={};Vn(U,{assign:()=>zn,colors:()=>J,createStringInterpolator:()=>Lt,skipAnimation:()=>Lr,to:()=>jr,willAdvance:()=>Mt});function wt(){}var Fn=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),p={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Q(e,t){if(p.arr(e)){if(!p.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var E=(e,t)=>e.forEach(t);function q(e,t,r){if(p.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(const n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}var L=e=>p.und(e)?[]:p.arr(e)?e:[e];function ve(e,t){if(e.size){const r=Array.from(e);e.clear(),E(r,t)}}var be=(e,...t)=>ve(e,r=>r(...t)),jt=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Lt,jr,J=null,Lr=!1,Mt=wt,zn=e=>{e.to&&(jr=e.to),e.now&&(T.now=e.now),e.colors!==void 0&&(J=e.colors),e.skipAnimation!=null&&(Lr=e.skipAnimation),e.createStringInterpolator&&(Lt=e.createStringInterpolator),e.requestAnimationFrame&&T.use(e.requestAnimationFrame),e.batchedUpdates&&(T.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Mt=e.willAdvance),e.frameLoop&&(T.frameLoop=e.frameLoop)},we=new Set,z=[],dt=[],qe=0,tt={get idle(){return!we.size&&!z.length},start(e){qe>e.priority?(we.add(e),T.onStart(Bn)):(Mr(e),T(xt))},advance:xt,sort(e){if(qe)T.onFrame(()=>tt.sort(e));else{const t=z.indexOf(e);~t&&(z.splice(t,1),Nr(e))}},clear(){z=[],we.clear()}};function Bn(){we.forEach(Mr),we.clear(),T(xt)}function Mr(e){z.includes(e)||Nr(e)}function Nr(e){z.splice(Hn(z,t=>t.priority>e.priority),0,e)}function xt(e){const t=dt;for(let r=0;r<z.length;r++){const n=z[r];qe=n.priority,n.idle||(Mt(n),n.advance(e),n.idle||t.push(n))}return qe=0,dt=z,dt.length=0,z=t,z.length>0}function Hn(e,t){const r=e.findIndex(t);return r<0?e.length:r}var Un={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},H="[-+]?\\d*\\.?\\d+",We=H+"%";function rt(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Gn=new RegExp("rgb"+rt(H,H,H)),qn=new RegExp("rgba"+rt(H,H,H,H)),Wn=new RegExp("hsl"+rt(H,We,We)),Qn=new RegExp("hsla"+rt(H,We,We,H)),Yn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Kn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Xn=/^#([0-9a-fA-F]{6})$/,Zn=/^#([0-9a-fA-F]{8})$/;function Jn(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Xn.exec(e))?parseInt(t[1]+"ff",16)>>>0:J&&J[e]!==void 0?J[e]:(t=Gn.exec(e))?(se(t[1])<<24|se(t[2])<<16|se(t[3])<<8|255)>>>0:(t=qn.exec(e))?(se(t[1])<<24|se(t[2])<<16|se(t[3])<<8|Yt(t[4]))>>>0:(t=Yn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Zn.exec(e))?parseInt(t[1],16)>>>0:(t=Kn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Wn.exec(e))?(Wt(Qt(t[1]),ze(t[2]),ze(t[3]))|255)>>>0:(t=Qn.exec(e))?(Wt(Qt(t[1]),ze(t[2]),ze(t[3]))|Yt(t[4]))>>>0:null}function ft(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Wt(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,i=2*r-n,s=ft(i,n,e+1/3),o=ft(i,n,e),a=ft(i,n,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function se(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Qt(e){return(parseFloat(e)%360+360)%360/360}function Yt(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ze(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Kt(e){let t=Jn(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,n=(t&16711680)>>>16,i=(t&65280)>>>8,s=(t&255)/255;return`rgba(${r}, ${n}, ${i}, ${s})`}var ke=(e,t,r)=>{if(p.fun(e))return e;if(p.arr(e))return ke({range:e,output:t,extrapolate:r});if(p.str(e.output[0]))return Lt(e);const n=e,i=n.output,s=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",a=n.extrapolateRight||n.extrapolate||"extend",l=n.easing||(c=>c);return c=>{const u=ti(c,s);return ei(c,s[u],s[u+1],i[u],i[u+1],l,o,a,n.map)}};function ei(e,t,r,n,i,s,o,a,l){let c=l?l(e):e;if(c<t){if(o==="identity")return c;o==="clamp"&&(c=t)}if(c>r){if(a==="identity")return c;a==="clamp"&&(c=r)}return n===i?n:t===r?e<=t?n:i:(t===-1/0?c=-c:r===1/0?c=c-t:c=(c-t)/(r-t),c=s(c),n===-1/0?c=-c:i===1/0?c=c+n:c=c*(i-n)+n,c)}function ti(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var ri={linear:e=>e},Se=Symbol.for("FluidValue.get"),ue=Symbol.for("FluidValue.observers"),V=e=>!!(e&&e[Se]),$=e=>e&&e[Se]?e[Se]():e,Xt=e=>e[ue]||null;function ni(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Te(e,t){const r=e[ue];r&&r.forEach(n=>{ni(n,t)})}var Vr=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");ii(this,e)}},ii=(e,t)=>Fr(e,Se,t);function de(e,t){if(e[Se]){let r=e[ue];r||Fr(e,ue,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Pe(e,t){const r=e[ue];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[ue]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var Fr=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),He=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,si=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Zt=new RegExp(`(${He.source})(%|[a-z]+)`,"i"),oi=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,nt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,zr=e=>{const[t,r]=ai(e);if(!t||jt())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);return i||e}else{if(r&&nt.test(r))return zr(r);if(r)return r}return e},ai=e=>{const t=nt.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]},ht,ci=(e,t,r,n,i)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${i})`,Br=e=>{ht||(ht=J?new RegExp(`(${Object.keys(J).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>$(s).replace(nt,zr).replace(si,Kt).replace(ht,Kt)),r=t.map(s=>s.match(He).map(Number)),i=r[0].map((s,o)=>r.map(a=>{if(!(o in a))throw Error('The arity of each "output" value must be equal');return a[o]})).map(s=>ke({...e,output:s}));return s=>{var l;const o=!Zt.test(t[0])&&((l=t.find(c=>Zt.test(c)))==null?void 0:l.replace(He,""));let a=0;return t[0].replace(He,()=>`${i[a++](s)}${o||""}`).replace(oi,ci)}},Nt="react-spring: ",Hr=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${Nt}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},ui=Hr(console.warn);function li(){ui(`${Nt}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var di=Hr(console.warn);function fi(){di(`${Nt}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function it(e){return p.str(e)&&(e[0]=="#"||/\d/.test(e)||!jt()&&nt.test(e)||e in(J||{}))}var Vt=jt()?w.useEffect:w.useLayoutEffect,hi=()=>{const e=w.useRef(!1);return Vt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ur(){const e=w.useState()[1],t=hi();return()=>{t.current&&e(Math.random())}}function pi(e,t){const[r]=w.useState(()=>({inputs:t,result:e()})),n=w.useRef(),i=n.current;let s=i;return s?t&&s.inputs&&gi(t,s.inputs)||(s={inputs:t,result:e()}):s=r,w.useEffect(()=>{n.current=s,i==r&&(r.inputs=r.result=void 0)},[s]),s.result}function gi(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var Gr=e=>w.useEffect(e,mi),mi=[];function Jt(e){const t=w.useRef();return w.useEffect(()=>{t.current=e}),t.current}var Ee=Symbol.for("Animated:node"),yi=e=>!!e&&e[Ee]===e,G=e=>e&&e[Ee],Ft=(e,t)=>Fn(e,Ee,t),st=e=>e&&e[Ee]&&e[Ee].getPayload(),qr=class{constructor(){Ft(this,this)}getPayload(){return this.payload||[]}},Le=class extends qr{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,p.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Le(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return p.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,p.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Ae=class extends Le{constructor(e){super(0),this._string=null,this._toString=ke({output:[e,e]})}static create(e){return new Ae(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(p.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=ke({output:[this.getValue(),e]})),this._value=0,super.reset()}},Qe={dependencies:null},ot=class extends qr{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return q(this.source,(r,n)=>{yi(r)?t[n]=r.getValue(e):V(r)?t[n]=$(r):e||(t[n]=r)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&E(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return q(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Qe.dependencies&&V(e)&&Qe.dependencies.add(e);const t=st(e);t&&E(t,r=>this.add(r))}},Wr=class extends ot{constructor(e){super(e)}static create(e){return new Wr(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((r,n)=>r.setValue(e[n])).some(Boolean):(super.setValue(e.map(bi)),!0)}};function bi(e){return(it(e)?Ae:Le).create(e)}function _t(e){const t=G(e);return t?t.constructor:p.arr(e)?Wr:it(e)?Ae:Le}var er=(e,t)=>{const r=!p.fun(e)||e.prototype&&e.prototype.isReactComponent;return w.forwardRef((n,i)=>{const s=w.useRef(null),o=r&&w.useCallback(b=>{s.current=xi(i,b)},[i]),[a,l]=wi(n,t),c=Ur(),u=()=>{const b=s.current;if(r&&!b)return;(b?t.applyAnimatedValues(b,a.getValue(!0)):!1)===!1&&c()},d=new vi(u,l),f=w.useRef();Vt(()=>(f.current=d,E(l,b=>de(b,d)),()=>{f.current&&(E(f.current.deps,b=>Pe(b,f.current)),T.cancel(f.current.update))})),w.useEffect(u,[]),Gr(()=>()=>{const b=f.current;E(b.deps,m=>Pe(m,b))});const g=t.getComponentProps(a.getValue());return N.createElement(e,{...g,ref:o})})},vi=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&T.write(this.update)}};function wi(e,t){const r=new Set;return Qe.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ot(e),Qe.dependencies=null,[e,r]}function xi(e,t){return e&&(p.fun(e)?e(t):e.current=t),t}var tr=Symbol.for("AnimatedComponent"),_i=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=i=>new ot(i),getComponentProps:n=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},s=o=>{const a=rr(o)||"Anonymous";return p.str(o)?o=s[o]||(s[o]=er(o,i)):o=o[tr]||(o[tr]=er(o,i)),o.displayName=`Animated(${a})`,o};return q(e,(o,a)=>{p.arr(e)&&(a=rr(o)),s[a]=s(o)}),{animated:s}},rr=e=>p.str(e)?e:e&&p.str(e.displayName)?e.displayName:p.fun(e)&&e.name||null;function re(e,...t){return p.fun(e)?e(...t):e}var xe=(e,t)=>e===!0||!!(t&&e&&(p.fun(e)?e(t):L(e).includes(t))),Qr=(e,t)=>p.obj(e)?t&&e[t]:e,Yr=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,ki=e=>e,zt=(e,t=ki)=>{let r=Si;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const i of r){const s=t(e[i],i);p.und(s)||(n[i]=s)}return n},Si=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Ti={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Pi(e){const t={};let r=0;if(q(e,(n,i)=>{Ti[i]||(t[i]=n,r++)}),r)return t}function Kr(e){const t=Pi(e);if(t){const r={to:t};return q(e,(n,i)=>i in t||(r[i]=n)),r}return{...e}}function Ce(e){return e=$(e),p.arr(e)?e.map(Ce):it(e)?U.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ei(e){for(const t in e)return!0;return!1}function kt(e){return p.fun(e)||p.arr(e)&&p.obj(e[0])}function Ai(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function Ci(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var Oi={default:{tension:170,friction:26}},St={...Oi.default,mass:1,damping:1,easing:ri.linear,clamp:!1},Ri=class{constructor(){this.velocity=0,Object.assign(this,St)}};function Di(e,t,r){r&&(r={...r},nr(r,t),t={...r,...t}),nr(e,t),Object.assign(e,t);for(const o in St)e[o]==null&&(e[o]=St[o]);let{frequency:n,damping:i}=e;const{mass:s}=e;return p.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*s,e.friction=4*Math.PI*i*s/n),e}function nr(e,t){if(!p.und(t.decay))e.duration=void 0;else{const r=!p.und(t.tension)||!p.und(t.friction);(r||!p.und(t.frequency)||!p.und(t.damping)||!p.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var ir=[],Ii=class{constructor(){this.changed=!1,this.values=ir,this.toValues=null,this.fromValues=ir,this.config=new Ri,this.immediate=!1}};function Xr(e,{key:t,props:r,defaultProps:n,state:i,actions:s}){return new Promise((o,a)=>{let l,c,u=xe(r.cancel??(n==null?void 0:n.cancel),t);if(u)g();else{p.und(r.pause)||(i.paused=xe(r.pause,t));let b=n==null?void 0:n.pause;b!==!0&&(b=i.paused||xe(b,t)),l=re(r.delay||0,t),b?(i.resumeQueue.add(f),s.pause()):(s.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(c),c.cancel(),l=c.time-T.now()}function f(){l>0&&!U.skipAnimation?(i.delayed=!0,c=T.setTimeout(g,l),i.pauseQueue.add(d),i.timeouts.add(c)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{s.start({...r,callId:e,cancel:u},o)}catch(b){a(b)}}})}var Bt=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?ce(e.get()):t.every(r=>r.noop)?Zr(e.get()):B(e.get(),t.every(r=>r.finished)),Zr=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),B=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),ce=e=>({value:e,cancelled:!0,finished:!1});function Jr(e,t,r,n){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:a,promise:l}=r;return!s&&e===a&&!t.reset?l:r.promise=(async()=>{r.asyncId=i,r.asyncTo=e;const c=zt(t,(v,y)=>y==="onRest"?void 0:v);let u,d;const f=new Promise((v,y)=>(u=v,d=y)),g=v=>{const y=i<=(r.cancelId||0)&&ce(n)||i!==r.asyncId&&B(n,!1);if(y)throw v.result=y,d(v),v},b=(v,y)=>{const k=new sr,x=new or;return(async()=>{if(U.skipAnimation)throw Oe(r),x.result=B(n,!1),d(x),x;g(k);const P=p.obj(v)?{...v}:{...y,to:v};P.parentId=i,q(c,(C,O)=>{p.und(P[O])&&(P[O]=C)});const S=await n.start(P);return g(k),r.paused&&await new Promise(C=>{r.resumeQueue.add(C)}),S})()};let m;if(U.skipAnimation)return Oe(r),B(n,!1);try{let v;p.arr(e)?v=(async y=>{for(const k of y)await b(k)})(e):v=Promise.resolve(e(b,n.stop.bind(n))),await Promise.all([v.then(u),f]),m=B(n.get(),!0,!1)}catch(v){if(v instanceof sr)m=v.result;else if(v instanceof or)m=v.result;else throw v}finally{i==r.asyncId&&(r.asyncId=s,r.asyncTo=s?a:void 0,r.promise=s?l:void 0)}return p.fun(o)&&T.batchedUpdates(()=>{o(m,n,n.item)}),m})()}function Oe(e,t){ve(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var sr=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},or=class extends Error{constructor(){super("SkipAnimationSignal")}},Tt=e=>e instanceof Ht,$i=1,Ht=class extends Vr{constructor(){super(...arguments),this.id=$i++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=G(this);return e&&e.getValue()}to(...e){return U.to(this,e)}interpolate(...e){return li(),U.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Te(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||tt.sort(this),Te(this,{type:"priority",parent:this,priority:e})}},ne=Symbol.for("SpringPhase"),en=1,tn=2,rn=4,pt=e=>(e[ne]&en)>0,K=e=>(e[ne]&tn)>0,fe=e=>(e[ne]&rn)>0,ar=(e,t)=>t?e[ne]|=tn|en:e[ne]&=-3,cr=(e,t)=>t?e[ne]|=rn:e[ne]&=-5,ji=class extends Ht{constructor(e,t){if(super(),this.animation=new Ii,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!p.und(e)||!p.und(t)){const r=p.obj(e)?{...e}:{...t,from:e};p.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(K(this)||this._state.asyncTo)||fe(this)}get goal(){return $(this.animation.to)}get velocity(){const e=G(this);return e instanceof Le?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return pt(this)}get isAnimating(){return K(this)}get isPaused(){return fe(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const n=this.animation;let{toValues:i}=n;const{config:s}=n,o=st(n.to);!o&&V(n.to)&&(i=L($(n.to))),n.values.forEach((c,u)=>{if(c.done)return;const d=c.constructor==Ae?1:o?o[u].lastPosition:i[u];let f=n.immediate,g=d;if(!f){if(g=c.lastPosition,s.tension<=0){c.done=!0;return}let b=c.elapsedTime+=e;const m=n.fromValues[u],v=c.v0!=null?c.v0:c.v0=p.arr(s.velocity)?s.velocity[u]:s.velocity;let y;const k=s.precision||(m==d?.005:Math.min(1,Math.abs(d-m)*.001));if(p.und(s.duration))if(s.decay){const x=s.decay===!0?.998:s.decay,P=Math.exp(-(1-x)*b);g=m+v/(1-x)*(1-P),f=Math.abs(c.lastPosition-g)<=k,y=v*P}else{y=c.lastVelocity==null?v:c.lastVelocity;const x=s.restVelocity||k/10,P=s.clamp?0:s.bounce,S=!p.und(P),C=m==d?c.v0>0:m<d;let O,ie=!1;const D=1,te=Math.ceil(e/D);for(let j=0;j<te&&(O=Math.abs(y)>x,!(!O&&(f=Math.abs(d-g)<=k,f)));++j){S&&(ie=g==d||g>d==C,ie&&(y=-y*P,g=d));const W=-s.tension*1e-6*(g-d),Y=-s.friction*.001*y,ut=(W+Y)/s.mass;y=y+ut*D,g=g+y*D}}else{let x=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,c.durationProgress>0&&(c.elapsedTime=s.duration*c.durationProgress,b=c.elapsedTime+=e)),x=(s.progress||0)+b/this._memoizedDuration,x=x>1?1:x<0?0:x,c.durationProgress=x),g=m+s.easing(x)*(d-m),y=(g-c.lastPosition)/e,f=x==1}c.lastVelocity=y,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[u].done&&(f=!1),f?c.done=!0:t=!1,c.setValue(g,s.round)&&(r=!0)});const a=G(this),l=a.getValue();if(t){const c=$(n.to);(l!==c||r)&&!s.decay?(a.setValue(c),this._onChange(c)):r&&s.decay&&this._onChange(l),this._stop()}else r&&this._onChange(l)}set(e){return T.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(K(this)){const{to:e,config:t}=this.animation;T.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let r;return p.und(e)?(r=this.queue||[],this.queue=[]):r=[p.obj(e)?e:{...t,to:e}],Promise.all(r.map(n=>this._update(n))).then(n=>Bt(this,n))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Oe(this._state,e&&this._lastCallId),T.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:r,from:n}=e;r=p.obj(r)?r[t]:r,(r==null||kt(r))&&(r=void 0),n=p.obj(n)?n[t]:n,n==null&&(n=void 0);const i={to:r,from:n};return pt(this)||(e.reverse&&([r,n]=[n,r]),n=$(n),p.und(n)?G(this)||this._set(r):this._set(n)),i}_update({...e},t){const{key:r,defaultProps:n}=this;e.default&&Object.assign(n,zt(e,(o,a)=>/^on/.test(a)?Qr(o,r):o)),lr(this,e,"onProps"),pe(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return Xr(++this._lastCallId,{key:r,props:e,defaultProps:n,state:s,actions:{pause:()=>{fe(this)||(cr(this,!0),be(s.pauseQueue),pe(this,"onPause",B(this,he(this,this.animation.to)),this))},resume:()=>{fe(this)&&(cr(this,!1),K(this)&&this._resume(),be(s.resumeQueue),pe(this,"onResume",B(this,he(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const a=nn(e);if(a)return this._update(a,!0)}return o})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(ce(this));const n=!p.und(e.to),i=!p.und(e.from);if(n||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(ce(this));const{key:s,defaultProps:o,animation:a}=this,{to:l,from:c}=a;let{to:u=l,from:d=c}=e;i&&!n&&(!t.default||p.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);const f=!Q(d,c);f&&(a.from=d),d=$(d);const g=!Q(u,l);g&&this._focus(u);const b=kt(t.to),{config:m}=a,{decay:v,velocity:y}=m;(n||i)&&(m.velocity=0),t.config&&!b&&Di(m,re(t.config,s),t.config!==o.config?re(o.config,s):void 0);let k=G(this);if(!k||p.und(u))return r(B(this,!0));const x=p.und(t.reset)?i&&!t.default:!p.und(d)&&xe(t.reset,s),P=x?d:this.get(),S=Ce(u),C=p.num(S)||p.arr(S)||it(S),O=!b&&(!C||xe(o.immediate||t.immediate,s));if(g){const j=_t(u);if(j!==k.constructor)if(O)k=this._set(S);else throw Error(`Cannot animate between ${k.constructor.name} and ${j.name}, as the "to" prop suggests`)}const ie=k.constructor;let D=V(u),te=!1;if(!D){const j=x||!pt(this)&&f;(g||j)&&(te=Q(Ce(P),S),D=!te),(!Q(a.immediate,O)&&!O||!Q(m.decay,v)||!Q(m.velocity,y))&&(D=!0)}if(te&&K(this)&&(a.changed&&!x?D=!0:D||this._stop(l)),!b&&((D||V(l))&&(a.values=k.getPayload(),a.toValues=V(u)?null:ie==Ae?[1]:L(S)),a.immediate!=O&&(a.immediate=O,!O&&!x&&this._set(l)),D)){const{onRest:j}=a;E(Mi,Y=>lr(this,t,Y));const W=B(this,he(this,l));be(this._pendingCalls,W),this._pendingCalls.add(r),a.changed&&T.batchedUpdates(()=>{var Y;a.changed=!x,j==null||j(W,this),x?re(o.onRest,W):(Y=a.onStart)==null||Y.call(a,W,this)})}x&&this._set(P),b?r(Jr(t.to,t,this._state,this)):D?this._start():K(this)&&!g?this._pendingCalls.add(r):r(Zr(P))}_focus(e){const t=this.animation;e!==t.to&&(Xt(this)&&this._detach(),t.to=e,Xt(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;V(t)&&(de(t,this),Tt(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;V(e)&&Pe(e,this)}_set(e,t=!0){const r=$(e);if(!p.und(r)){const n=G(this);if(!n||!Q(r,n.getValue())){const i=_t(r);!n||n.constructor!=i?Ft(this,i.create(r)):n.setValue(r),n&&T.batchedUpdates(()=>{this._onChange(r,t)})}}return G(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,pe(this,"onStart",B(this,he(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),re(this.animation.onChange,e,this)),re(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;G(this).reset($(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),K(this)||(ar(this,!0),fe(this)||this._resume())}_resume(){U.skipAnimation?this.finish():tt.start(this)}_stop(e,t){if(K(this)){ar(this,!1);const r=this.animation;E(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Te(this,{type:"idle",parent:this});const n=t?ce(this.get()):B(this.get(),he(this,e??r.to));be(this._pendingCalls,n),r.changed&&(r.changed=!1,pe(this,"onRest",n,this))}}};function he(e,t){const r=Ce(t),n=Ce(e.get());return Q(n,r)}function nn(e,t=e.loop,r=e.to){const n=re(t);if(n){const i=n!==!0&&Kr(n),s=(i||e).reverse,o=!i||i.reset;return Re({...e,loop:t,default:!1,pause:void 0,to:!s||kt(r)?r:void 0,from:o?e.from:void 0,reset:o,...i})}}function Re(e){const{to:t,from:r}=e=Kr(e),n=new Set;return p.obj(t)&&ur(t,n),p.obj(r)&&ur(r,n),e.keys=n.size?Array.from(n):null,e}function Li(e){const t=Re(e);return p.und(t.default)&&(t.default=zt(t)),t}function ur(e,t){q(e,(r,n)=>r!=null&&t.add(n))}var Mi=["onStart","onRest","onChange","onPause","onResume"];function lr(e,t,r){e.animation[r]=t[r]!==Yr(t,r)?Qr(t[r],e.key):void 0}function pe(e,t,...r){var n,i,s,o;(i=(n=e.animation)[t])==null||i.call(n,...r),(o=(s=e.defaultProps)[t])==null||o.call(s,...r)}var Ni=["onStart","onChange","onRest"],Vi=1,Fi=class{constructor(t,r){this.id=Vi++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((r,n)=>t[n]=r.get()),t}set(t){for(const r in t){const n=t[r];p.und(n)||this.springs[r].set(n)}}update(t){return t&&this.queue.push(Re(t)),this}start(t){let{queue:r}=this;return t?r=L(t).map(Re):this.queue=[],this._flush?this._flush(this,r):(un(this,r),Pt(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){const n=this.springs;E(L(r),i=>n[i].stop(!!t))}else Oe(this._state,this._lastAsyncId),this.each(n=>n.stop(!!t));return this}pause(t){if(p.und(t))this.start({pause:!0});else{const r=this.springs;E(L(t),n=>r[n].pause())}return this}resume(t){if(p.und(t))this.start({pause:!1});else{const r=this.springs;E(L(t),n=>r[n].resume())}return this}each(t){q(this.springs,t)}_onFrame(){const{onStart:t,onChange:r,onRest:n}=this._events,i=this._active.size>0,s=this._changed.size>0;(i&&!this._started||s&&!this._started)&&(this._started=!0,ve(t,([l,c])=>{c.value=this.get(),l(c,this,this._item)}));const o=!i&&this._started,a=s||o&&n.size?this.get():null;s&&r.size&&ve(r,([l,c])=>{c.value=a,l(c,this,this._item)}),o&&(this._started=!1,ve(n,([l,c])=>{c.value=a,l(c,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;T.onFrame(this._onFrame)}};function Pt(e,t){return Promise.all(t.map(r=>sn(e,r))).then(r=>Bt(e,r))}async function sn(e,t,r){const{keys:n,to:i,from:s,loop:o,onRest:a,onResolve:l}=t,c=p.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const u=p.arr(i)||p.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):E(Ni,m=>{const v=t[m];if(p.fun(v)){const y=e._events[m];t[m]=({finished:k,cancelled:x})=>{const P=y.get(v);P?(k||(P.finished=!1),x&&(P.cancelled=!0)):y.set(v,{value:null,finished:k||!1,cancelled:x||!1})},c&&(c[m]=t[m])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,be(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(n||Object.keys(e.springs)).map(m=>e.springs[m].start(t)),g=t.cancel===!0||Yr(t,"cancel")===!0;(u||g&&d.asyncId)&&f.push(Xr(++e._lastAsyncId,{props:t,state:d,actions:{pause:wt,resume:wt,start(m,v){g?(Oe(d,e._lastAsyncId),v(ce(e))):(m.onRest=a,v(Jr(u,m,d,e)))}}})),d.paused&&await new Promise(m=>{d.resumeQueue.add(m)});const b=Bt(e,await Promise.all(f));if(o&&b.finished&&!(r&&b.noop)){const m=nn(t,o,i);if(m)return un(e,[m]),sn(e,m,!0)}return l&&T.batchedUpdates(()=>l(b,e,e.item)),b}function dr(e,t){const r={...e.springs};return t&&E(L(t),n=>{p.und(n.keys)&&(n=Re(n)),p.obj(n.to)||(n={...n,to:void 0}),cn(r,n,i=>an(i))}),on(e,r),r}function on(e,t){q(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,de(r,e))})}function an(e,t){const r=new ji;return r.key=e,t&&de(r,t),r}function cn(e,t,r){t.keys&&E(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function un(e,t){E(t,r=>{cn(e.springs,r,n=>an(n,e))})}var at=({children:e,...t})=>{const r=w.useContext(Ye),n=t.pause||!!r.pause,i=t.immediate||!!r.immediate;t=pi(()=>({pause:n,immediate:i}),[n,i]);const{Provider:s}=Ye;return N.createElement(s,{value:t},e)},Ye=zi(at,{});at.Provider=Ye.Provider;at.Consumer=Ye.Consumer;function zi(e,t){return Object.assign(e,N.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Bi=()=>{const e=[],t=function(n){fi();const i=[];return E(e,(s,o)=>{if(p.und(n))i.push(s.start());else{const a=r(n,s,o);a&&i.push(s.start(a))}}),i};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const i=e.indexOf(n);~i&&e.splice(i,1)},t.pause=function(){return E(e,n=>n.pause(...arguments)),this},t.resume=function(){return E(e,n=>n.resume(...arguments)),this},t.set=function(n){E(e,(i,s)=>{const o=p.fun(n)?n(s,i):n;o&&i.set(o)})},t.start=function(n){const i=[];return E(e,(s,o)=>{if(p.und(n))i.push(s.start());else{const a=this._getProps(n,s,o);a&&i.push(s.start(a))}}),i},t.stop=function(){return E(e,n=>n.stop(...arguments)),this},t.update=function(n){return E(e,(i,s)=>i.update(this._getProps(n,i,s))),this};const r=function(n,i,s){return p.fun(n)?n(s,i):n};return t._getProps=r,t};function Hi(e,t,r){const n=p.fun(t)&&t;n&&!r&&(r=[]);const i=w.useMemo(()=>n||arguments.length==3?Bi():void 0,[]),s=w.useRef(0),o=Ur(),a=w.useMemo(()=>({ctrls:[],queue:[],flush(y,k){const x=dr(y,k);return s.current>0&&!a.queue.length&&!Object.keys(x).some(S=>!y.springs[S])?Pt(y,k):new Promise(S=>{on(y,x),a.queue.push(()=>{S(Pt(y,k))}),o()})}}),[]),l=w.useRef([...a.ctrls]),c=[],u=Jt(e)||0;w.useMemo(()=>{E(l.current.slice(e,u),y=>{Ai(y,i),y.stop(!0)}),l.current.length=e,d(u,e)},[e]),w.useMemo(()=>{d(0,Math.min(u,e))},r);function d(y,k){for(let x=y;x<k;x++){const P=l.current[x]||(l.current[x]=new Fi(null,a.flush)),S=n?n(x,P):t[x];S&&(c[x]=Li(S))}}const f=l.current.map((y,k)=>dr(y,c[k])),g=w.useContext(at),b=Jt(g),m=g!==b&&Ei(g);Vt(()=>{s.current++,a.ctrls=l.current;const{queue:y}=a;y.length&&(a.queue=[],E(y,k=>k())),E(l.current,(k,x)=>{i==null||i.add(k),m&&k.start({default:g});const P=c[x];P&&(Ci(k,P.ref),k.ref?k.queue.push(P):k.start(P))})}),Gr(()=>()=>{E(a.ctrls,y=>y.stop(!0))});const v=f.map(y=>({...y}));return i?[v,i]:v}function Me(e,t){const r=p.fun(e),[[n],i]=Hi(1,r?e:[e],r?[]:t);return r||arguments.length==2?[n,i]:n}var Ui=class extends Ht{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=ke(...t);const r=this._get(),n=_t(r);Ft(this,n.create(r))}advance(e){const t=this._get(),r=this.get();Q(t,r)||(G(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&fr(this._active)&&gt(this)}_get(){const e=p.arr(this.source)?this.source.map($):L($(this.source));return this.calc(...e)}_start(){this.idle&&!fr(this._active)&&(this.idle=!1,E(st(this),e=>{e.done=!1}),U.skipAnimation?(T.batchedUpdates(()=>this.advance()),gt(this)):tt.start(this))}_attach(){let e=1;E(L(this.source),t=>{V(t)&&de(t,this),Tt(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){E(L(this.source),e=>{V(e)&&Pe(e,this)}),this._active.clear(),gt(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=L(this.source).reduce((t,r)=>Math.max(t,(Tt(r)?r.priority:0)+1),0))}};function Gi(e){return e.idle!==!1}function fr(e){return!e.size||Array.from(e).every(Gi)}function gt(e){e.idle||(e.idle=!0,E(st(e),t=>{t.done=!0}),Te(e,{type:"idle",parent:e}))}U.assign({createStringInterpolator:Br,to:(e,t)=>new Ui(e,t)});var ln=/^--/;function qi(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!ln.test(e)&&!(_e.hasOwnProperty(e)&&_e[e])?t+"px":(""+t).trim()}var hr={};function Wi(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:n,style:i,children:s,scrollTop:o,scrollLeft:a,viewBox:l,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:hr[f]||(hr[f]=f.replace(/([A-Z])/g,g=>"-"+g.toLowerCase())));s!==void 0&&(e.textContent=s);for(const f in i)if(i.hasOwnProperty(f)){const g=qi(f,i[f]);ln.test(f)?e.style.setProperty(f,g):e.style[f]=g}d.forEach((f,g)=>{e.setAttribute(f,u[g])}),n!==void 0&&(e.className=n),o!==void 0&&(e.scrollTop=o),a!==void 0&&(e.scrollLeft=a),l!==void 0&&e.setAttribute("viewBox",l)}var _e={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qi=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Yi=["Webkit","Ms","Moz","O"];_e=Object.keys(_e).reduce((e,t)=>(Yi.forEach(r=>e[Qi(r,t)]=e[t]),e),_e);var Ki=/^(matrix|translate|scale|rotate|skew)/,Xi=/^(translate)/,Zi=/^(rotate|skew)/,mt=(e,t)=>p.num(e)&&e!==0?e+t:e,Ue=(e,t)=>p.arr(e)?e.every(r=>Ue(r,t)):p.num(e)?e===t:parseFloat(e)===t,Ji=class extends ot{constructor({x:e,y:t,z:r,...n}){const i=[],s=[];(e||t||r)&&(i.push([e||0,t||0,r||0]),s.push(o=>[`translate3d(${o.map(a=>mt(a,"px")).join(",")})`,Ue(o,0)])),q(n,(o,a)=>{if(a==="transform")i.push([o||""]),s.push(l=>[l,l===""]);else if(Ki.test(a)){if(delete n[a],p.und(o))return;const l=Xi.test(a)?"px":Zi.test(a)?"deg":"";i.push(L(o)),s.push(a==="rotate3d"?([c,u,d,f])=>[`rotate3d(${c},${u},${d},${mt(f,l)})`,Ue(f,0)]:c=>[`${a}(${c.map(u=>mt(u,l)).join(",")})`,Ue(c,a.startsWith("scale")?1:0)])}}),i.length&&(n.transform=new es(i,s)),super(n)}},es=class extends Vr{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return E(this.inputs,(r,n)=>{const i=$(r[0]),[s,o]=this.transforms[n](p.arr(i)?i:r.map($));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&E(this.inputs,t=>E(t,r=>V(r)&&de(r,this)))}observerRemoved(e){e==0&&E(this.inputs,t=>E(t,r=>V(r)&&Pe(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Te(this,e)}},ts=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];U.assign({batchedUpdates:$n.unstable_batchedUpdates,createStringInterpolator:Br,colors:Un});var rs=_i(ts,{applyAnimatedValues:Wi,createAnimatedStyle:e=>new Ji(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),le=rs.animated;const dn=w.createContext({});function ns({children:e,...t}){return h.jsx(dn.Provider,{value:t,children:e})}function is(){return w.useContext(dn)}function Ut({animate:e,content:t,textStyles:r,htmlElement:n,fadeIn:i,characterPreference:s,maxDelay:o=15e3,staticLanguage:a}){const l=is(),c=e??l.animate??!0,u=s??l.characterPreference??"simplified",d=a??l.staticLanguage??"english",f=n??"div",[g,b]=w.useState(!1),[m,v]=Me(()=>({opacity:i?0:1,config:{duration:600}})),y=w.useRef(c);w.useEffect(()=>{if(!c){y.current=c;return}const On=!y.current&&c;y.current=c;const Rn=On?500:Math.floor(Math.random()*(o-3500+1))+3500,Dn=setTimeout(()=>{v.start({opacity:0,onRest:()=>{b(In=>!In),v.start({opacity:1})}})},Rn);return()=>clearTimeout(Dn)},[g,c,v,o]);const k=u==="traditional"?t.traditional:t.simplified,x=d==="chinese"?k:t.english,P=c?g?k:t.english:x,{fontSize:S,fontFamily:C,fontWeight:O,fontStyle:ie,letterSpacing:D,lineHeight:te,...j}=r||{},W={fontSize:S,fontFamily:C,fontWeight:O,fontStyle:ie,letterSpacing:D,lineHeight:te},Y={...j,display:"inline-grid",alignContent:"center"},ut={...W,gridArea:"1 / 1"},lt={...W,gridArea:"1 / 1",visibility:"hidden"};return h.jsx(le.div,{style:{...m,display:"inline-block"},children:h.jsxs(f,{style:Y,children:[h.jsx("span",{style:ut,children:P}),h.jsx("span",{style:lt,children:t.english}),h.jsx("span",{style:lt,children:t.simplified}),h.jsx("span",{style:lt,children:t.traditional})]})})}const ss=M.keyframes`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),w=require("react"),$n=require("react-dom"),M=require("styled-components"),At=require("@reduxjs/toolkit"),jn=e=>e&&e.__esModule?e:{default:e};function Ln(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const N=Ln(w),_=jn(M);var Ot=je(),T=e=>$e(e,Ot),Rt=je();T.write=e=>$e(e,Rt);var et=je();T.onStart=e=>$e(e,et);var Dt=je();T.onFrame=e=>$e(e,Dt);var It=je();T.onFinish=e=>$e(e,It);var ae=[];T.setTimeout=(e,t)=>{const r=T.now()+t,n=()=>{const s=ae.findIndex(o=>o.cancel==n);~s&&ae.splice(s,1),Z-=~s?1:0},i={time:r,handler:e,cancel:n};return ae.splice(Or(r),0,i),Z+=1,Rr(),i};var Or=e=>~(~ae.findIndex(t=>t.time>e)||~ae.length);T.cancel=e=>{et.delete(e),Dt.delete(e),It.delete(e),Ot.delete(e),Rt.delete(e)};T.sync=e=>{vt=!0,T.batchedUpdates(e),vt=!1};T.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...i){t=i,T.onStart(r)}return n.handler=e,n.cancel=()=>{et.delete(r),t=null},n};var $t=typeof window<"u"?window.requestAnimationFrame:()=>{};T.use=e=>$t=e;T.now=typeof performance<"u"?()=>performance.now():Date.now;T.batchedUpdates=e=>e();T.catch=console.error;T.frameLoop="always";T.advance=()=>{T.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ir()};var X=-1,Z=0,vt=!1;function $e(e,t){vt?(t.delete(e),e(0)):(t.add(e),Rr())}function Rr(){X<0&&(X=0,T.frameLoop!=="demand"&&$t(Dr))}function Mn(){X=-1}function Dr(){~X&&($t(Dr),T.batchedUpdates(Ir))}function Ir(){const e=X;X=T.now();const t=Or(X);if(t&&($r(ae.splice(0,t),r=>r.handler()),Z-=t),!Z){Mn();return}et.flush(),Ot.flush(e?Math.min(64,X-e):16.667),Dt.flush(),Rt.flush(),It.flush()}function je(){let e=new Set,t=e;return{add(r){Z+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return Z-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,Z-=t.size,$r(t,n=>n(r)&&e.add(n)),Z+=e.size,t=e)}}}function $r(e,t){e.forEach(r=>{try{t(r)}catch(n){T.catch(n)}})}var Nn=Object.defineProperty,Vn=(e,t)=>{for(var r in t)Nn(e,r,{get:t[r],enumerable:!0})},U={};Vn(U,{assign:()=>zn,colors:()=>J,createStringInterpolator:()=>Lt,skipAnimation:()=>Lr,to:()=>jr,willAdvance:()=>Mt});function wt(){}var Fn=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),p={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Q(e,t){if(p.arr(e)){if(!p.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var E=(e,t)=>e.forEach(t);function q(e,t,r){if(p.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(const n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}var L=e=>p.und(e)?[]:p.arr(e)?e:[e];function ve(e,t){if(e.size){const r=Array.from(e);e.clear(),E(r,t)}}var be=(e,...t)=>ve(e,r=>r(...t)),jt=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Lt,jr,J=null,Lr=!1,Mt=wt,zn=e=>{e.to&&(jr=e.to),e.now&&(T.now=e.now),e.colors!==void 0&&(J=e.colors),e.skipAnimation!=null&&(Lr=e.skipAnimation),e.createStringInterpolator&&(Lt=e.createStringInterpolator),e.requestAnimationFrame&&T.use(e.requestAnimationFrame),e.batchedUpdates&&(T.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Mt=e.willAdvance),e.frameLoop&&(T.frameLoop=e.frameLoop)},we=new Set,z=[],dt=[],qe=0,tt={get idle(){return!we.size&&!z.length},start(e){qe>e.priority?(we.add(e),T.onStart(Bn)):(Mr(e),T(xt))},advance:xt,sort(e){if(qe)T.onFrame(()=>tt.sort(e));else{const t=z.indexOf(e);~t&&(z.splice(t,1),Nr(e))}},clear(){z=[],we.clear()}};function Bn(){we.forEach(Mr),we.clear(),T(xt)}function Mr(e){z.includes(e)||Nr(e)}function Nr(e){z.splice(Hn(z,t=>t.priority>e.priority),0,e)}function xt(e){const t=dt;for(let r=0;r<z.length;r++){const n=z[r];qe=n.priority,n.idle||(Mt(n),n.advance(e),n.idle||t.push(n))}return qe=0,dt=z,dt.length=0,z=t,z.length>0}function Hn(e,t){const r=e.findIndex(t);return r<0?e.length:r}var Un={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},H="[-+]?\\d*\\.?\\d+",We=H+"%";function rt(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Gn=new RegExp("rgb"+rt(H,H,H)),qn=new RegExp("rgba"+rt(H,H,H,H)),Wn=new RegExp("hsl"+rt(H,We,We)),Qn=new RegExp("hsla"+rt(H,We,We,H)),Yn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Kn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Xn=/^#([0-9a-fA-F]{6})$/,Zn=/^#([0-9a-fA-F]{8})$/;function Jn(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Xn.exec(e))?parseInt(t[1]+"ff",16)>>>0:J&&J[e]!==void 0?J[e]:(t=Gn.exec(e))?(se(t[1])<<24|se(t[2])<<16|se(t[3])<<8|255)>>>0:(t=qn.exec(e))?(se(t[1])<<24|se(t[2])<<16|se(t[3])<<8|Yt(t[4]))>>>0:(t=Yn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Zn.exec(e))?parseInt(t[1],16)>>>0:(t=Kn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Wn.exec(e))?(Wt(Qt(t[1]),ze(t[2]),ze(t[3]))|255)>>>0:(t=Qn.exec(e))?(Wt(Qt(t[1]),ze(t[2]),ze(t[3]))|Yt(t[4]))>>>0:null}function ft(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Wt(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,i=2*r-n,s=ft(i,n,e+1/3),o=ft(i,n,e),a=ft(i,n,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function se(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Qt(e){return(parseFloat(e)%360+360)%360/360}function Yt(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ze(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Kt(e){let t=Jn(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,n=(t&16711680)>>>16,i=(t&65280)>>>8,s=(t&255)/255;return`rgba(${r}, ${n}, ${i}, ${s})`}var ke=(e,t,r)=>{if(p.fun(e))return e;if(p.arr(e))return ke({range:e,output:t,extrapolate:r});if(p.str(e.output[0]))return Lt(e);const n=e,i=n.output,s=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",a=n.extrapolateRight||n.extrapolate||"extend",l=n.easing||(c=>c);return c=>{const u=ti(c,s);return ei(c,s[u],s[u+1],i[u],i[u+1],l,o,a,n.map)}};function ei(e,t,r,n,i,s,o,a,l){let c=l?l(e):e;if(c<t){if(o==="identity")return c;o==="clamp"&&(c=t)}if(c>r){if(a==="identity")return c;a==="clamp"&&(c=r)}return n===i?n:t===r?e<=t?n:i:(t===-1/0?c=-c:r===1/0?c=c-t:c=(c-t)/(r-t),c=s(c),n===-1/0?c=-c:i===1/0?c=c+n:c=c*(i-n)+n,c)}function ti(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var ri={linear:e=>e},Se=Symbol.for("FluidValue.get"),ue=Symbol.for("FluidValue.observers"),V=e=>!!(e&&e[Se]),$=e=>e&&e[Se]?e[Se]():e,Xt=e=>e[ue]||null;function ni(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Te(e,t){const r=e[ue];r&&r.forEach(n=>{ni(n,t)})}var Vr=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");ii(this,e)}},ii=(e,t)=>Fr(e,Se,t);function de(e,t){if(e[Se]){let r=e[ue];r||Fr(e,ue,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Pe(e,t){const r=e[ue];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[ue]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var Fr=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),He=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,si=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Zt=new RegExp(`(${He.source})(%|[a-z]+)`,"i"),oi=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,nt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,zr=e=>{const[t,r]=ai(e);if(!t||jt())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);return i||e}else{if(r&&nt.test(r))return zr(r);if(r)return r}return e},ai=e=>{const t=nt.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]},ht,ci=(e,t,r,n,i)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${i})`,Br=e=>{ht||(ht=J?new RegExp(`(${Object.keys(J).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>$(s).replace(nt,zr).replace(si,Kt).replace(ht,Kt)),r=t.map(s=>s.match(He).map(Number)),i=r[0].map((s,o)=>r.map(a=>{if(!(o in a))throw Error('The arity of each "output" value must be equal');return a[o]})).map(s=>ke({...e,output:s}));return s=>{var l;const o=!Zt.test(t[0])&&((l=t.find(c=>Zt.test(c)))==null?void 0:l.replace(He,""));let a=0;return t[0].replace(He,()=>`${i[a++](s)}${o||""}`).replace(oi,ci)}},Nt="react-spring: ",Hr=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${Nt}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},ui=Hr(console.warn);function li(){ui(`${Nt}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var di=Hr(console.warn);function fi(){di(`${Nt}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function it(e){return p.str(e)&&(e[0]=="#"||/\d/.test(e)||!jt()&&nt.test(e)||e in(J||{}))}var Vt=jt()?w.useEffect:w.useLayoutEffect,hi=()=>{const e=w.useRef(!1);return Vt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ur(){const e=w.useState()[1],t=hi();return()=>{t.current&&e(Math.random())}}function pi(e,t){const[r]=w.useState(()=>({inputs:t,result:e()})),n=w.useRef(),i=n.current;let s=i;return s?t&&s.inputs&&gi(t,s.inputs)||(s={inputs:t,result:e()}):s=r,w.useEffect(()=>{n.current=s,i==r&&(r.inputs=r.result=void 0)},[s]),s.result}function gi(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var Gr=e=>w.useEffect(e,mi),mi=[];function Jt(e){const t=w.useRef();return w.useEffect(()=>{t.current=e}),t.current}var Ee=Symbol.for("Animated:node"),yi=e=>!!e&&e[Ee]===e,G=e=>e&&e[Ee],Ft=(e,t)=>Fn(e,Ee,t),st=e=>e&&e[Ee]&&e[Ee].getPayload(),qr=class{constructor(){Ft(this,this)}getPayload(){return this.payload||[]}},Le=class extends qr{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,p.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Le(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return p.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,p.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Ce=class extends Le{constructor(e){super(0),this._string=null,this._toString=ke({output:[e,e]})}static create(e){return new Ce(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(p.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=ke({output:[this.getValue(),e]})),this._value=0,super.reset()}},Qe={dependencies:null},ot=class extends qr{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return q(this.source,(r,n)=>{yi(r)?t[n]=r.getValue(e):V(r)?t[n]=$(r):e||(t[n]=r)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&E(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return q(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Qe.dependencies&&V(e)&&Qe.dependencies.add(e);const t=st(e);t&&E(t,r=>this.add(r))}},Wr=class extends ot{constructor(e){super(e)}static create(e){return new Wr(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((r,n)=>r.setValue(e[n])).some(Boolean):(super.setValue(e.map(bi)),!0)}};function bi(e){return(it(e)?Ce:Le).create(e)}function _t(e){const t=G(e);return t?t.constructor:p.arr(e)?Wr:it(e)?Ce:Le}var er=(e,t)=>{const r=!p.fun(e)||e.prototype&&e.prototype.isReactComponent;return w.forwardRef((n,i)=>{const s=w.useRef(null),o=r&&w.useCallback(b=>{s.current=xi(i,b)},[i]),[a,l]=wi(n,t),c=Ur(),u=()=>{const b=s.current;if(r&&!b)return;(b?t.applyAnimatedValues(b,a.getValue(!0)):!1)===!1&&c()},d=new vi(u,l),f=w.useRef();Vt(()=>(f.current=d,E(l,b=>de(b,d)),()=>{f.current&&(E(f.current.deps,b=>Pe(b,f.current)),T.cancel(f.current.update))})),w.useEffect(u,[]),Gr(()=>()=>{const b=f.current;E(b.deps,m=>Pe(m,b))});const g=t.getComponentProps(a.getValue());return N.createElement(e,{...g,ref:o})})},vi=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&T.write(this.update)}};function wi(e,t){const r=new Set;return Qe.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ot(e),Qe.dependencies=null,[e,r]}function xi(e,t){return e&&(p.fun(e)?e(t):e.current=t),t}var tr=Symbol.for("AnimatedComponent"),_i=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=i=>new ot(i),getComponentProps:n=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},s=o=>{const a=rr(o)||"Anonymous";return p.str(o)?o=s[o]||(s[o]=er(o,i)):o=o[tr]||(o[tr]=er(o,i)),o.displayName=`Animated(${a})`,o};return q(e,(o,a)=>{p.arr(e)&&(a=rr(o)),s[a]=s(o)}),{animated:s}},rr=e=>p.str(e)?e:e&&p.str(e.displayName)?e.displayName:p.fun(e)&&e.name||null;function re(e,...t){return p.fun(e)?e(...t):e}var xe=(e,t)=>e===!0||!!(t&&e&&(p.fun(e)?e(t):L(e).includes(t))),Qr=(e,t)=>p.obj(e)?t&&e[t]:e,Yr=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,ki=e=>e,zt=(e,t=ki)=>{let r=Si;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const i of r){const s=t(e[i],i);p.und(s)||(n[i]=s)}return n},Si=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Ti={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Pi(e){const t={};let r=0;if(q(e,(n,i)=>{Ti[i]||(t[i]=n,r++)}),r)return t}function Kr(e){const t=Pi(e);if(t){const r={to:t};return q(e,(n,i)=>i in t||(r[i]=n)),r}return{...e}}function Ae(e){return e=$(e),p.arr(e)?e.map(Ae):it(e)?U.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ei(e){for(const t in e)return!0;return!1}function kt(e){return p.fun(e)||p.arr(e)&&p.obj(e[0])}function Ci(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function Ai(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var Oi={default:{tension:170,friction:26}},St={...Oi.default,mass:1,damping:1,easing:ri.linear,clamp:!1},Ri=class{constructor(){this.velocity=0,Object.assign(this,St)}};function Di(e,t,r){r&&(r={...r},nr(r,t),t={...r,...t}),nr(e,t),Object.assign(e,t);for(const o in St)e[o]==null&&(e[o]=St[o]);let{frequency:n,damping:i}=e;const{mass:s}=e;return p.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*s,e.friction=4*Math.PI*i*s/n),e}function nr(e,t){if(!p.und(t.decay))e.duration=void 0;else{const r=!p.und(t.tension)||!p.und(t.friction);(r||!p.und(t.frequency)||!p.und(t.damping)||!p.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var ir=[],Ii=class{constructor(){this.changed=!1,this.values=ir,this.toValues=null,this.fromValues=ir,this.config=new Ri,this.immediate=!1}};function Xr(e,{key:t,props:r,defaultProps:n,state:i,actions:s}){return new Promise((o,a)=>{let l,c,u=xe(r.cancel??(n==null?void 0:n.cancel),t);if(u)g();else{p.und(r.pause)||(i.paused=xe(r.pause,t));let b=n==null?void 0:n.pause;b!==!0&&(b=i.paused||xe(b,t)),l=re(r.delay||0,t),b?(i.resumeQueue.add(f),s.pause()):(s.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(c),c.cancel(),l=c.time-T.now()}function f(){l>0&&!U.skipAnimation?(i.delayed=!0,c=T.setTimeout(g,l),i.pauseQueue.add(d),i.timeouts.add(c)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{s.start({...r,callId:e,cancel:u},o)}catch(b){a(b)}}})}var Bt=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?ce(e.get()):t.every(r=>r.noop)?Zr(e.get()):B(e.get(),t.every(r=>r.finished)),Zr=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),B=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),ce=e=>({value:e,cancelled:!0,finished:!1});function Jr(e,t,r,n){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:a,promise:l}=r;return!s&&e===a&&!t.reset?l:r.promise=(async()=>{r.asyncId=i,r.asyncTo=e;const c=zt(t,(v,y)=>y==="onRest"?void 0:v);let u,d;const f=new Promise((v,y)=>(u=v,d=y)),g=v=>{const y=i<=(r.cancelId||0)&&ce(n)||i!==r.asyncId&&B(n,!1);if(y)throw v.result=y,d(v),v},b=(v,y)=>{const k=new sr,x=new or;return(async()=>{if(U.skipAnimation)throw Oe(r),x.result=B(n,!1),d(x),x;g(k);const P=p.obj(v)?{...v}:{...y,to:v};P.parentId=i,q(c,(A,O)=>{p.und(P[O])&&(P[O]=A)});const S=await n.start(P);return g(k),r.paused&&await new Promise(A=>{r.resumeQueue.add(A)}),S})()};let m;if(U.skipAnimation)return Oe(r),B(n,!1);try{let v;p.arr(e)?v=(async y=>{for(const k of y)await b(k)})(e):v=Promise.resolve(e(b,n.stop.bind(n))),await Promise.all([v.then(u),f]),m=B(n.get(),!0,!1)}catch(v){if(v instanceof sr)m=v.result;else if(v instanceof or)m=v.result;else throw v}finally{i==r.asyncId&&(r.asyncId=s,r.asyncTo=s?a:void 0,r.promise=s?l:void 0)}return p.fun(o)&&T.batchedUpdates(()=>{o(m,n,n.item)}),m})()}function Oe(e,t){ve(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var sr=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},or=class extends Error{constructor(){super("SkipAnimationSignal")}},Tt=e=>e instanceof Ht,$i=1,Ht=class extends Vr{constructor(){super(...arguments),this.id=$i++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=G(this);return e&&e.getValue()}to(...e){return U.to(this,e)}interpolate(...e){return li(),U.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Te(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||tt.sort(this),Te(this,{type:"priority",parent:this,priority:e})}},ne=Symbol.for("SpringPhase"),en=1,tn=2,rn=4,pt=e=>(e[ne]&en)>0,K=e=>(e[ne]&tn)>0,fe=e=>(e[ne]&rn)>0,ar=(e,t)=>t?e[ne]|=tn|en:e[ne]&=-3,cr=(e,t)=>t?e[ne]|=rn:e[ne]&=-5,ji=class extends Ht{constructor(e,t){if(super(),this.animation=new Ii,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!p.und(e)||!p.und(t)){const r=p.obj(e)?{...e}:{...t,from:e};p.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(K(this)||this._state.asyncTo)||fe(this)}get goal(){return $(this.animation.to)}get velocity(){const e=G(this);return e instanceof Le?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return pt(this)}get isAnimating(){return K(this)}get isPaused(){return fe(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const n=this.animation;let{toValues:i}=n;const{config:s}=n,o=st(n.to);!o&&V(n.to)&&(i=L($(n.to))),n.values.forEach((c,u)=>{if(c.done)return;const d=c.constructor==Ce?1:o?o[u].lastPosition:i[u];let f=n.immediate,g=d;if(!f){if(g=c.lastPosition,s.tension<=0){c.done=!0;return}let b=c.elapsedTime+=e;const m=n.fromValues[u],v=c.v0!=null?c.v0:c.v0=p.arr(s.velocity)?s.velocity[u]:s.velocity;let y;const k=s.precision||(m==d?.005:Math.min(1,Math.abs(d-m)*.001));if(p.und(s.duration))if(s.decay){const x=s.decay===!0?.998:s.decay,P=Math.exp(-(1-x)*b);g=m+v/(1-x)*(1-P),f=Math.abs(c.lastPosition-g)<=k,y=v*P}else{y=c.lastVelocity==null?v:c.lastVelocity;const x=s.restVelocity||k/10,P=s.clamp?0:s.bounce,S=!p.und(P),A=m==d?c.v0>0:m<d;let O,ie=!1;const D=1,te=Math.ceil(e/D);for(let j=0;j<te&&(O=Math.abs(y)>x,!(!O&&(f=Math.abs(d-g)<=k,f)));++j){S&&(ie=g==d||g>d==A,ie&&(y=-y*P,g=d));const W=-s.tension*1e-6*(g-d),Y=-s.friction*.001*y,ut=(W+Y)/s.mass;y=y+ut*D,g=g+y*D}}else{let x=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,c.durationProgress>0&&(c.elapsedTime=s.duration*c.durationProgress,b=c.elapsedTime+=e)),x=(s.progress||0)+b/this._memoizedDuration,x=x>1?1:x<0?0:x,c.durationProgress=x),g=m+s.easing(x)*(d-m),y=(g-c.lastPosition)/e,f=x==1}c.lastVelocity=y,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[u].done&&(f=!1),f?c.done=!0:t=!1,c.setValue(g,s.round)&&(r=!0)});const a=G(this),l=a.getValue();if(t){const c=$(n.to);(l!==c||r)&&!s.decay?(a.setValue(c),this._onChange(c)):r&&s.decay&&this._onChange(l),this._stop()}else r&&this._onChange(l)}set(e){return T.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(K(this)){const{to:e,config:t}=this.animation;T.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let r;return p.und(e)?(r=this.queue||[],this.queue=[]):r=[p.obj(e)?e:{...t,to:e}],Promise.all(r.map(n=>this._update(n))).then(n=>Bt(this,n))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Oe(this._state,e&&this._lastCallId),T.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:r,from:n}=e;r=p.obj(r)?r[t]:r,(r==null||kt(r))&&(r=void 0),n=p.obj(n)?n[t]:n,n==null&&(n=void 0);const i={to:r,from:n};return pt(this)||(e.reverse&&([r,n]=[n,r]),n=$(n),p.und(n)?G(this)||this._set(r):this._set(n)),i}_update({...e},t){const{key:r,defaultProps:n}=this;e.default&&Object.assign(n,zt(e,(o,a)=>/^on/.test(a)?Qr(o,r):o)),lr(this,e,"onProps"),pe(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return Xr(++this._lastCallId,{key:r,props:e,defaultProps:n,state:s,actions:{pause:()=>{fe(this)||(cr(this,!0),be(s.pauseQueue),pe(this,"onPause",B(this,he(this,this.animation.to)),this))},resume:()=>{fe(this)&&(cr(this,!1),K(this)&&this._resume(),be(s.resumeQueue),pe(this,"onResume",B(this,he(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const a=nn(e);if(a)return this._update(a,!0)}return o})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(ce(this));const n=!p.und(e.to),i=!p.und(e.from);if(n||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(ce(this));const{key:s,defaultProps:o,animation:a}=this,{to:l,from:c}=a;let{to:u=l,from:d=c}=e;i&&!n&&(!t.default||p.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);const f=!Q(d,c);f&&(a.from=d),d=$(d);const g=!Q(u,l);g&&this._focus(u);const b=kt(t.to),{config:m}=a,{decay:v,velocity:y}=m;(n||i)&&(m.velocity=0),t.config&&!b&&Di(m,re(t.config,s),t.config!==o.config?re(o.config,s):void 0);let k=G(this);if(!k||p.und(u))return r(B(this,!0));const x=p.und(t.reset)?i&&!t.default:!p.und(d)&&xe(t.reset,s),P=x?d:this.get(),S=Ae(u),A=p.num(S)||p.arr(S)||it(S),O=!b&&(!A||xe(o.immediate||t.immediate,s));if(g){const j=_t(u);if(j!==k.constructor)if(O)k=this._set(S);else throw Error(`Cannot animate between ${k.constructor.name} and ${j.name}, as the "to" prop suggests`)}const ie=k.constructor;let D=V(u),te=!1;if(!D){const j=x||!pt(this)&&f;(g||j)&&(te=Q(Ae(P),S),D=!te),(!Q(a.immediate,O)&&!O||!Q(m.decay,v)||!Q(m.velocity,y))&&(D=!0)}if(te&&K(this)&&(a.changed&&!x?D=!0:D||this._stop(l)),!b&&((D||V(l))&&(a.values=k.getPayload(),a.toValues=V(u)?null:ie==Ce?[1]:L(S)),a.immediate!=O&&(a.immediate=O,!O&&!x&&this._set(l)),D)){const{onRest:j}=a;E(Mi,Y=>lr(this,t,Y));const W=B(this,he(this,l));be(this._pendingCalls,W),this._pendingCalls.add(r),a.changed&&T.batchedUpdates(()=>{var Y;a.changed=!x,j==null||j(W,this),x?re(o.onRest,W):(Y=a.onStart)==null||Y.call(a,W,this)})}x&&this._set(P),b?r(Jr(t.to,t,this._state,this)):D?this._start():K(this)&&!g?this._pendingCalls.add(r):r(Zr(P))}_focus(e){const t=this.animation;e!==t.to&&(Xt(this)&&this._detach(),t.to=e,Xt(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;V(t)&&(de(t,this),Tt(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;V(e)&&Pe(e,this)}_set(e,t=!0){const r=$(e);if(!p.und(r)){const n=G(this);if(!n||!Q(r,n.getValue())){const i=_t(r);!n||n.constructor!=i?Ft(this,i.create(r)):n.setValue(r),n&&T.batchedUpdates(()=>{this._onChange(r,t)})}}return G(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,pe(this,"onStart",B(this,he(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),re(this.animation.onChange,e,this)),re(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;G(this).reset($(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),K(this)||(ar(this,!0),fe(this)||this._resume())}_resume(){U.skipAnimation?this.finish():tt.start(this)}_stop(e,t){if(K(this)){ar(this,!1);const r=this.animation;E(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Te(this,{type:"idle",parent:this});const n=t?ce(this.get()):B(this.get(),he(this,e??r.to));be(this._pendingCalls,n),r.changed&&(r.changed=!1,pe(this,"onRest",n,this))}}};function he(e,t){const r=Ae(t),n=Ae(e.get());return Q(n,r)}function nn(e,t=e.loop,r=e.to){const n=re(t);if(n){const i=n!==!0&&Kr(n),s=(i||e).reverse,o=!i||i.reset;return Re({...e,loop:t,default:!1,pause:void 0,to:!s||kt(r)?r:void 0,from:o?e.from:void 0,reset:o,...i})}}function Re(e){const{to:t,from:r}=e=Kr(e),n=new Set;return p.obj(t)&&ur(t,n),p.obj(r)&&ur(r,n),e.keys=n.size?Array.from(n):null,e}function Li(e){const t=Re(e);return p.und(t.default)&&(t.default=zt(t)),t}function ur(e,t){q(e,(r,n)=>r!=null&&t.add(n))}var Mi=["onStart","onRest","onChange","onPause","onResume"];function lr(e,t,r){e.animation[r]=t[r]!==Yr(t,r)?Qr(t[r],e.key):void 0}function pe(e,t,...r){var n,i,s,o;(i=(n=e.animation)[t])==null||i.call(n,...r),(o=(s=e.defaultProps)[t])==null||o.call(s,...r)}var Ni=["onStart","onChange","onRest"],Vi=1,Fi=class{constructor(t,r){this.id=Vi++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((r,n)=>t[n]=r.get()),t}set(t){for(const r in t){const n=t[r];p.und(n)||this.springs[r].set(n)}}update(t){return t&&this.queue.push(Re(t)),this}start(t){let{queue:r}=this;return t?r=L(t).map(Re):this.queue=[],this._flush?this._flush(this,r):(un(this,r),Pt(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){const n=this.springs;E(L(r),i=>n[i].stop(!!t))}else Oe(this._state,this._lastAsyncId),this.each(n=>n.stop(!!t));return this}pause(t){if(p.und(t))this.start({pause:!0});else{const r=this.springs;E(L(t),n=>r[n].pause())}return this}resume(t){if(p.und(t))this.start({pause:!1});else{const r=this.springs;E(L(t),n=>r[n].resume())}return this}each(t){q(this.springs,t)}_onFrame(){const{onStart:t,onChange:r,onRest:n}=this._events,i=this._active.size>0,s=this._changed.size>0;(i&&!this._started||s&&!this._started)&&(this._started=!0,ve(t,([l,c])=>{c.value=this.get(),l(c,this,this._item)}));const o=!i&&this._started,a=s||o&&n.size?this.get():null;s&&r.size&&ve(r,([l,c])=>{c.value=a,l(c,this,this._item)}),o&&(this._started=!1,ve(n,([l,c])=>{c.value=a,l(c,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;T.onFrame(this._onFrame)}};function Pt(e,t){return Promise.all(t.map(r=>sn(e,r))).then(r=>Bt(e,r))}async function sn(e,t,r){const{keys:n,to:i,from:s,loop:o,onRest:a,onResolve:l}=t,c=p.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const u=p.arr(i)||p.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):E(Ni,m=>{const v=t[m];if(p.fun(v)){const y=e._events[m];t[m]=({finished:k,cancelled:x})=>{const P=y.get(v);P?(k||(P.finished=!1),x&&(P.cancelled=!0)):y.set(v,{value:null,finished:k||!1,cancelled:x||!1})},c&&(c[m]=t[m])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,be(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(n||Object.keys(e.springs)).map(m=>e.springs[m].start(t)),g=t.cancel===!0||Yr(t,"cancel")===!0;(u||g&&d.asyncId)&&f.push(Xr(++e._lastAsyncId,{props:t,state:d,actions:{pause:wt,resume:wt,start(m,v){g?(Oe(d,e._lastAsyncId),v(ce(e))):(m.onRest=a,v(Jr(u,m,d,e)))}}})),d.paused&&await new Promise(m=>{d.resumeQueue.add(m)});const b=Bt(e,await Promise.all(f));if(o&&b.finished&&!(r&&b.noop)){const m=nn(t,o,i);if(m)return un(e,[m]),sn(e,m,!0)}return l&&T.batchedUpdates(()=>l(b,e,e.item)),b}function dr(e,t){const r={...e.springs};return t&&E(L(t),n=>{p.und(n.keys)&&(n=Re(n)),p.obj(n.to)||(n={...n,to:void 0}),cn(r,n,i=>an(i))}),on(e,r),r}function on(e,t){q(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,de(r,e))})}function an(e,t){const r=new ji;return r.key=e,t&&de(r,t),r}function cn(e,t,r){t.keys&&E(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function un(e,t){E(t,r=>{cn(e.springs,r,n=>an(n,e))})}var at=({children:e,...t})=>{const r=w.useContext(Ye),n=t.pause||!!r.pause,i=t.immediate||!!r.immediate;t=pi(()=>({pause:n,immediate:i}),[n,i]);const{Provider:s}=Ye;return N.createElement(s,{value:t},e)},Ye=zi(at,{});at.Provider=Ye.Provider;at.Consumer=Ye.Consumer;function zi(e,t){return Object.assign(e,N.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Bi=()=>{const e=[],t=function(n){fi();const i=[];return E(e,(s,o)=>{if(p.und(n))i.push(s.start());else{const a=r(n,s,o);a&&i.push(s.start(a))}}),i};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const i=e.indexOf(n);~i&&e.splice(i,1)},t.pause=function(){return E(e,n=>n.pause(...arguments)),this},t.resume=function(){return E(e,n=>n.resume(...arguments)),this},t.set=function(n){E(e,(i,s)=>{const o=p.fun(n)?n(s,i):n;o&&i.set(o)})},t.start=function(n){const i=[];return E(e,(s,o)=>{if(p.und(n))i.push(s.start());else{const a=this._getProps(n,s,o);a&&i.push(s.start(a))}}),i},t.stop=function(){return E(e,n=>n.stop(...arguments)),this},t.update=function(n){return E(e,(i,s)=>i.update(this._getProps(n,i,s))),this};const r=function(n,i,s){return p.fun(n)?n(s,i):n};return t._getProps=r,t};function Hi(e,t,r){const n=p.fun(t)&&t;n&&!r&&(r=[]);const i=w.useMemo(()=>n||arguments.length==3?Bi():void 0,[]),s=w.useRef(0),o=Ur(),a=w.useMemo(()=>({ctrls:[],queue:[],flush(y,k){const x=dr(y,k);return s.current>0&&!a.queue.length&&!Object.keys(x).some(S=>!y.springs[S])?Pt(y,k):new Promise(S=>{on(y,x),a.queue.push(()=>{S(Pt(y,k))}),o()})}}),[]),l=w.useRef([...a.ctrls]),c=[],u=Jt(e)||0;w.useMemo(()=>{E(l.current.slice(e,u),y=>{Ci(y,i),y.stop(!0)}),l.current.length=e,d(u,e)},[e]),w.useMemo(()=>{d(0,Math.min(u,e))},r);function d(y,k){for(let x=y;x<k;x++){const P=l.current[x]||(l.current[x]=new Fi(null,a.flush)),S=n?n(x,P):t[x];S&&(c[x]=Li(S))}}const f=l.current.map((y,k)=>dr(y,c[k])),g=w.useContext(at),b=Jt(g),m=g!==b&&Ei(g);Vt(()=>{s.current++,a.ctrls=l.current;const{queue:y}=a;y.length&&(a.queue=[],E(y,k=>k())),E(l.current,(k,x)=>{i==null||i.add(k),m&&k.start({default:g});const P=c[x];P&&(Ai(k,P.ref),k.ref?k.queue.push(P):k.start(P))})}),Gr(()=>()=>{E(a.ctrls,y=>y.stop(!0))});const v=f.map(y=>({...y}));return i?[v,i]:v}function Me(e,t){const r=p.fun(e),[[n],i]=Hi(1,r?e:[e],r?[]:t);return r||arguments.length==2?[n,i]:n}var Ui=class extends Ht{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=ke(...t);const r=this._get(),n=_t(r);Ft(this,n.create(r))}advance(e){const t=this._get(),r=this.get();Q(t,r)||(G(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&fr(this._active)&&gt(this)}_get(){const e=p.arr(this.source)?this.source.map($):L($(this.source));return this.calc(...e)}_start(){this.idle&&!fr(this._active)&&(this.idle=!1,E(st(this),e=>{e.done=!1}),U.skipAnimation?(T.batchedUpdates(()=>this.advance()),gt(this)):tt.start(this))}_attach(){let e=1;E(L(this.source),t=>{V(t)&&de(t,this),Tt(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){E(L(this.source),e=>{V(e)&&Pe(e,this)}),this._active.clear(),gt(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=L(this.source).reduce((t,r)=>Math.max(t,(Tt(r)?r.priority:0)+1),0))}};function Gi(e){return e.idle!==!1}function fr(e){return!e.size||Array.from(e).every(Gi)}function gt(e){e.idle||(e.idle=!0,E(st(e),t=>{t.done=!0}),Te(e,{type:"idle",parent:e}))}U.assign({createStringInterpolator:Br,to:(e,t)=>new Ui(e,t)});var ln=/^--/;function qi(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!ln.test(e)&&!(_e.hasOwnProperty(e)&&_e[e])?t+"px":(""+t).trim()}var hr={};function Wi(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:n,style:i,children:s,scrollTop:o,scrollLeft:a,viewBox:l,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:hr[f]||(hr[f]=f.replace(/([A-Z])/g,g=>"-"+g.toLowerCase())));s!==void 0&&(e.textContent=s);for(const f in i)if(i.hasOwnProperty(f)){const g=qi(f,i[f]);ln.test(f)?e.style.setProperty(f,g):e.style[f]=g}d.forEach((f,g)=>{e.setAttribute(f,u[g])}),n!==void 0&&(e.className=n),o!==void 0&&(e.scrollTop=o),a!==void 0&&(e.scrollLeft=a),l!==void 0&&e.setAttribute("viewBox",l)}var _e={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qi=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Yi=["Webkit","Ms","Moz","O"];_e=Object.keys(_e).reduce((e,t)=>(Yi.forEach(r=>e[Qi(r,t)]=e[t]),e),_e);var Ki=/^(matrix|translate|scale|rotate|skew)/,Xi=/^(translate)/,Zi=/^(rotate|skew)/,mt=(e,t)=>p.num(e)&&e!==0?e+t:e,Ue=(e,t)=>p.arr(e)?e.every(r=>Ue(r,t)):p.num(e)?e===t:parseFloat(e)===t,Ji=class extends ot{constructor({x:e,y:t,z:r,...n}){const i=[],s=[];(e||t||r)&&(i.push([e||0,t||0,r||0]),s.push(o=>[`translate3d(${o.map(a=>mt(a,"px")).join(",")})`,Ue(o,0)])),q(n,(o,a)=>{if(a==="transform")i.push([o||""]),s.push(l=>[l,l===""]);else if(Ki.test(a)){if(delete n[a],p.und(o))return;const l=Xi.test(a)?"px":Zi.test(a)?"deg":"";i.push(L(o)),s.push(a==="rotate3d"?([c,u,d,f])=>[`rotate3d(${c},${u},${d},${mt(f,l)})`,Ue(f,0)]:c=>[`${a}(${c.map(u=>mt(u,l)).join(",")})`,Ue(c,a.startsWith("scale")?1:0)])}}),i.length&&(n.transform=new es(i,s)),super(n)}},es=class extends Vr{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return E(this.inputs,(r,n)=>{const i=$(r[0]),[s,o]=this.transforms[n](p.arr(i)?i:r.map($));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&E(this.inputs,t=>E(t,r=>V(r)&&de(r,this)))}observerRemoved(e){e==0&&E(this.inputs,t=>E(t,r=>V(r)&&Pe(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Te(this,e)}},ts=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];U.assign({batchedUpdates:$n.unstable_batchedUpdates,createStringInterpolator:Br,colors:Un});var rs=_i(ts,{applyAnimatedValues:Wi,createAnimatedStyle:e=>new Ji(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),le=rs.animated;const dn=w.createContext({});function ns({children:e,...t}){return h.jsx(dn.Provider,{value:t,children:e})}function is(){return w.useContext(dn)}function Ut({animate:e,content:t,textStyles:r,htmlElement:n,fadeIn:i,characterPreference:s,maxDelay:o=15e3,staticLanguage:a}){const l=is(),c=e??l.animate??!0,u=s??l.characterPreference??"simplified",d=a??l.staticLanguage??"english",f=n??"div",[g,b]=w.useState(!1),[m,v]=Me(()=>({opacity:i?0:1,config:{duration:600}})),y=w.useRef(c);w.useEffect(()=>{if(!c){y.current=c;return}const On=!y.current&&c;y.current=c;const Rn=On?500:Math.floor(Math.random()*(o-3500+1))+3500,Dn=setTimeout(()=>{v.start({opacity:0,onRest:()=>{b(In=>!In),v.start({opacity:1})}})},Rn);return()=>clearTimeout(Dn)},[g,c,v,o]);const k=u==="traditional"?t.traditional:t.simplified,x=d==="chinese"?k:t.english,P=c?g?k:t.english:x,{fontSize:S,fontFamily:A,fontWeight:O,fontStyle:ie,letterSpacing:D,lineHeight:te,...j}=r||{},W={fontSize:S,fontFamily:A,fontWeight:O,fontStyle:ie,letterSpacing:D,lineHeight:te},Y={...j,display:"inline-grid",alignContent:"center"},ut={...W,gridArea:"1 / 1"},lt={...W,gridArea:"1 / 1",visibility:"hidden"};return h.jsx(le.div,{style:{...m,display:"inline-block"},children:h.jsxs(f,{style:Y,children:[h.jsx("span",{style:ut,children:P}),h.jsx("span",{style:lt,children:t.english}),h.jsx("span",{style:lt,children:t.simplified}),h.jsx("span",{style:lt,children:t.traditional})]})})}const ss=M.keyframes`
2
2
  0% {
3
3
  transform: scale(1);
4
4
  }
@@ -109,13 +109,13 @@
109
109
  overflow: hidden;
110
110
  -webkit-tap-highlight-color: transparent;
111
111
  border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.scrimLight)||"rgba(0, 0, 0, 0.3)"}};
112
- `,As=_.default.div`
112
+ `,Cs=_.default.div`
113
113
  display: flex;
114
114
  flex-direction: row;
115
115
  justify-content: space-between;
116
116
  align-items: center;
117
117
  padding: 0.5rem 0.75rem;
118
- `,Cs=_.default.div`
118
+ `,As=_.default.div`
119
119
  display: flex;
120
120
  flex-direction: row;
121
121
  gap: 2rem;
@@ -141,7 +141,7 @@
141
141
  border-radius: 50%;
142
142
  background-color: transparent;
143
143
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
144
- left 150ms cubic-bezier(0.4, 0, 0.2, 1);
144
+ left 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
145
145
  pointer-events: none;
146
146
  `,js=_.default.label`
147
147
  position: relative;
@@ -169,7 +169,7 @@
169
169
  position: absolute;
170
170
  top: 50%;
171
171
  left: ${({$checked:e})=>e?"14px":"0px"};
172
- transform: translateY(-50%);
172
+ transform: translateY(-50%) scale(${({$checked:e})=>e?1.1:1});
173
173
  width: 20px;
174
174
  height: 20px;
175
175
  background-color: ${({$checked:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.toggleThumbOn)||"#489fb5":((n=t.colors)==null?void 0:n.toggleThumbOff)||"#fafafa"}};
@@ -177,10 +177,11 @@
177
177
  box-shadow: 0px 2px 1px -1px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadowLight)||"rgba(0, 0, 0, 0.2)"}},
178
178
  0px 1px 1px 0px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadowLighter)||"rgba(0, 0, 0, 0.14)"}},
179
179
  0px 1px 3px 0px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadowLighter)||"rgba(0, 0, 0, 0.12)"}};
180
- transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1),
180
+ transition: left 400ms cubic-bezier(0.34, 1.56, 0.64, 1),
181
+ transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1),
181
182
  background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
182
183
  pointer-events: none;
183
- `,gn=({checked:e,defaultChecked:t=!1,onChange:r,disabled:n=!1})=>{const[i,s]=w.useState(t),o=e!==void 0,a=o?e:i,l=c=>{if(n)return;c.target.blur();const u=!a;o||s(u),r==null||r(u)};return h.jsxs(js,{$checked:a,onClick:c=>c.stopPropagation(),children:[h.jsx($s,{type:"checkbox",checked:a,onChange:l,disabled:n}),h.jsx(Ls,{$checked:a}),h.jsx(Et,{$checked:a}),h.jsx(Ms,{$checked:a})]})},Ns={translate:Rs,sunny:Is,character:({size:e})=>h.jsx("span",{style:{fontSize:e||"1rem",height:e||"1rem",lineHeight:e||"1rem",display:"inline-flex",alignItems:"center"},children:"字"})},Vs=({icon:e,text:t,textContent:r,characterPreference:n,animate:i=!0,maxDelay:s,actionIcon:o="chevron",onClick:a,styles:l,switchChecked:c,onSwitchChange:u,staticLanguage:d})=>{const f=Ns[e],[g,b]=w.useState(null),m=y=>{const k=y.currentTarget.getBoundingClientRect(),x=y.clientX-k.left,P=y.clientY-k.top;b({x,y:P,key:Date.now()}),o==="switch"&&u?u(!c):a&&a()},v=()=>o==="switch"?h.jsx(gn,{checked:c,onChange:u}):h.jsx(Ds,{});return h.jsxs(Es,{onClick:m,style:l,children:[g&&h.jsx(De,{$x:g.x,$y:g.y},g.key),h.jsxs(As,{children:[h.jsxs(Cs,{children:[h.jsx(mr,{children:h.jsx(f,{size:"1rem"})}),h.jsx(Os,{children:r?h.jsx(Ut,{content:r,characterPreference:n,animate:i,maxDelay:s,staticLanguage:d}):t})]}),h.jsx(mr,{children:v()})]})]})},Ze={tension:200,friction:25},Fs={tension:150,friction:25},zs={tension:Ze.tension+125,friction:Ze.friction+5},Ie={tension:300,friction:30},Bs={tension:Ie.tension*2.5,friction:Ie.friction},Hs={tension:Ie.tension*3,friction:Ie.friction},Us={tension:185,friction:25},Gs={tension:50,friction:20},qs={tension:280,friction:22,mass:1},Ws={tension:220,friction:26,mass:1},Ne="cubic-bezier(0.4, 0.0, 0.2, 1)",Qs=M.keyframes`
184
+ `,gn=({checked:e,defaultChecked:t=!1,onChange:r,disabled:n=!1})=>{const[i,s]=w.useState(t),o=e!==void 0,a=o?e:i,l=c=>{if(n)return;c.target.blur();const u=!a;o||s(u),r==null||r(u)};return h.jsxs(js,{$checked:a,onClick:c=>c.stopPropagation(),children:[h.jsx($s,{type:"checkbox",checked:a,onChange:l,disabled:n}),h.jsx(Ls,{$checked:a}),h.jsx(Et,{$checked:a}),h.jsx(Ms,{$checked:a})]})},Ns={translate:Rs,sunny:Is,character:({size:e})=>h.jsx("span",{style:{fontSize:e||"1rem",height:e||"1rem",lineHeight:e||"1rem",display:"inline-flex",alignItems:"center"},children:"字"})},Vs=({icon:e,text:t,textContent:r,characterPreference:n,animate:i=!0,maxDelay:s,actionIcon:o="chevron",onClick:a,styles:l,switchChecked:c,onSwitchChange:u,staticLanguage:d})=>{const f=Ns[e],[g,b]=w.useState(null),m=y=>{const k=y.currentTarget.getBoundingClientRect(),x=y.clientX-k.left,P=y.clientY-k.top;b({x,y:P,key:Date.now()}),o==="switch"&&u?u(!c):a&&a()},v=()=>o==="switch"?h.jsx(gn,{checked:c,onChange:u}):h.jsx(Ds,{});return h.jsxs(Es,{onClick:m,style:l,children:[g&&h.jsx(De,{$x:g.x,$y:g.y},g.key),h.jsxs(Cs,{children:[h.jsxs(As,{children:[h.jsx(mr,{children:h.jsx(f,{size:"1rem"})}),h.jsx(Os,{children:r?h.jsx(Ut,{content:r,characterPreference:n,animate:i,maxDelay:s,staticLanguage:d}):t})]}),h.jsx(mr,{children:v()})]})]})},Ze={tension:200,friction:25},Fs={tension:150,friction:25},zs={tension:Ze.tension+125,friction:Ze.friction+5},Ie={tension:300,friction:30},Bs={tension:Ie.tension*2.5,friction:Ie.friction},Hs={tension:Ie.tension*3,friction:Ie.friction},Us={tension:185,friction:25},Gs={tension:50,friction:20},qs={tension:280,friction:22,mass:1},Ws={tension:220,friction:26,mass:1},Ne="cubic-bezier(0.4, 0.0, 0.2, 1)",Qs=M.keyframes`
184
185
  0% {
185
186
  transform: translate(-50%, -50%) rotate(0deg);
186
187
  }
@@ -395,7 +396,7 @@
395
396
  letter-spacing: 0.1em;
396
397
  opacity: ${({$visible:e})=>e?1:0};
397
398
  transition: opacity 0.1s ease;
398
- `,lo=new Set(["ˇ","ˋ","ˊ","˙","ˉ"," "]),yt=0,fo=2.5,ho=3.5,po=le(co),Be={row1:["ㄅ","ㄉ","ˇ","ˋ","ㄓ","ˊ","˙","ㄚ","ㄞ","ㄢ"],row2:["ㄆ","ㄊ","ㄍ","ㄐ","ㄔ","ㄗ","ㄧ","ㄛ","ㄟ","ㄣ"],row3:["ㄇ","ㄋ","ㄎ","ㄑ","ㄕ","ㄘ","ㄨ","ㄜ","ㄠ","ㄤ"],row4:["ㄈ","ㄌ","ㄏ","ㄒ","ㄖ","ㄙ","ㄩ","ㄝ","ㄡ","ㄥ"]},go=400,yn=w.memo(({onKeyPress:e,onBackspace:t,onSubmit:r,disabled:n=!1,currentInput:i="",disabledKeys:s,correctKeys:o,incorrectKeys:a,shaking:l=!1})=>{const[c,u]=w.useState(""),d=w.useRef(null),f=S=>S?lo.has(S)?fo:ho:yt,[g,b]=Me(()=>({height:yt,config:{tension:300,friction:26}}));w.useEffect(()=>(i?(d.current&&(clearTimeout(d.current),d.current=null),u(i),b.start({height:f(i)})):c&&(d.current=setTimeout(()=>{b.start({height:yt}),setTimeout(()=>u(""),250)},go)),()=>{d.current&&clearTimeout(d.current)}),[i,c,b]);const m=w.useCallback(S=>{!n&&!(s!=null&&s.has(S))&&e(S)},[e,n,s]),v=w.useCallback(()=>{!n&&t&&t()},[t,n]),y=w.useCallback(()=>{!n&&r&&r()},[r,n]),k=w.useCallback(S=>n?!0:(s==null?void 0:s.has(S))??!1,[n,s]),x=w.useCallback(S=>o!=null&&o.has(S)?"correct":a!=null&&a.has(S)?"incorrect":null,[o,a]),P=(S,C)=>h.jsx(me,{onClick:()=>m(S),disabled:k(S),$status:x(S),children:h.jsx(ye,{children:S})},`${S}-${C}`);return h.jsxs(ao,{$shaking:l,children:[h.jsx(po,{style:{height:g.height.to(S=>`${S}rem`)},children:h.jsx(uo,{$visible:!!i,children:c})}),h.jsx(ge,{children:Be.row1.map(P)}),h.jsx(ge,{children:Be.row2.map(P)}),h.jsx(ge,{children:Be.row3.map(P)}),h.jsx(ge,{children:Be.row4.map(P)}),h.jsxs(ge,{$justify:"flex-start",children:[h.jsx(me,{$variant:"backspace",$width:"wide",$muted:!i,onClick:v,disabled:n,children:h.jsx(ye,{children:"⌫"})}),h.jsx(me,{$variant:"tone",$width:"space",onClick:()=>m("ˉ"),disabled:k("ˉ"),$status:x("ˉ"),children:h.jsx(ye,{children:"ˉ"})}),h.jsx(me,{onClick:()=>m("ㄦ"),disabled:k("ㄦ"),$status:x("ㄦ"),children:h.jsx(ye,{children:"ㄦ"})}),r&&h.jsx(me,{$variant:"enter",$width:"extra-wide",$muted:!i,onClick:y,disabled:n,children:h.jsx(ye,{children:"⏎"})})]})]})});yn.displayName="ZhuyinKeyboard";const mo=_.default.div`
399
+ `,lo=new Set(["ˇ","ˋ","ˊ","˙","ˉ"," "]),yt=0,fo=2.5,ho=3.5,po=le(co),Be={row1:["ㄅ","ㄉ","ˇ","ˋ","ㄓ","ˊ","˙","ㄚ","ㄞ","ㄢ"],row2:["ㄆ","ㄊ","ㄍ","ㄐ","ㄔ","ㄗ","ㄧ","ㄛ","ㄟ","ㄣ"],row3:["ㄇ","ㄋ","ㄎ","ㄑ","ㄕ","ㄘ","ㄨ","ㄜ","ㄠ","ㄤ"],row4:["ㄈ","ㄌ","ㄏ","ㄒ","ㄖ","ㄙ","ㄩ","ㄝ","ㄡ","ㄥ"]},go=400,yn=w.memo(({onKeyPress:e,onBackspace:t,onSubmit:r,disabled:n=!1,currentInput:i="",disabledKeys:s,correctKeys:o,incorrectKeys:a,shaking:l=!1})=>{const[c,u]=w.useState(""),d=w.useRef(null),f=S=>S?lo.has(S)?fo:ho:yt,[g,b]=Me(()=>({height:yt,config:{tension:300,friction:26}}));w.useEffect(()=>(i?(d.current&&(clearTimeout(d.current),d.current=null),u(i),b.start({height:f(i)})):c&&(d.current=setTimeout(()=>{b.start({height:yt}),setTimeout(()=>u(""),250)},go)),()=>{d.current&&clearTimeout(d.current)}),[i,c,b]);const m=w.useCallback(S=>{!n&&!(s!=null&&s.has(S))&&e(S)},[e,n,s]),v=w.useCallback(()=>{!n&&t&&t()},[t,n]),y=w.useCallback(()=>{!n&&r&&r()},[r,n]),k=w.useCallback(S=>n?!0:(s==null?void 0:s.has(S))??!1,[n,s]),x=w.useCallback(S=>o!=null&&o.has(S)?"correct":a!=null&&a.has(S)?"incorrect":null,[o,a]),P=(S,A)=>h.jsx(me,{onClick:()=>m(S),disabled:k(S),$status:x(S),children:h.jsx(ye,{children:S})},`${S}-${A}`);return h.jsxs(ao,{$shaking:l,children:[h.jsx(po,{style:{height:g.height.to(S=>`${S}rem`)},children:h.jsx(uo,{$visible:!!i,children:c})}),h.jsx(ge,{children:Be.row1.map(P)}),h.jsx(ge,{children:Be.row2.map(P)}),h.jsx(ge,{children:Be.row3.map(P)}),h.jsx(ge,{children:Be.row4.map(P)}),h.jsxs(ge,{$justify:"flex-start",children:[h.jsx(me,{$variant:"backspace",$width:"wide",$muted:!i,onClick:v,disabled:n,children:h.jsx(ye,{children:"⌫"})}),h.jsx(me,{$variant:"tone",$width:"space",onClick:()=>m("ˉ"),disabled:k("ˉ"),$status:x("ˉ"),children:h.jsx(ye,{children:"ˉ"})}),h.jsx(me,{onClick:()=>m("ㄦ"),disabled:k("ㄦ"),$status:x("ㄦ"),children:h.jsx(ye,{children:"ㄦ"})}),r&&h.jsx(me,{$variant:"enter",$width:"extra-wide",$muted:!i,onClick:y,disabled:n,children:h.jsx(ye,{children:"⏎"})})]})]})});yn.displayName="ZhuyinKeyboard";const mo=_.default.div`
399
400
  position: relative;
400
401
  display: flex;
401
402
  flex-direction: column;
@@ -431,7 +432,7 @@
431
432
  transition:
432
433
  color 0.2s ease,
433
434
  font-weight 0.2s ease;
434
- `,vo=_.default.span``;function wo({options:e,value:t,onChange:r,onClose:n,closeOnSameValue:i=!0}){const s=w.useRef(null),[o,a]=w.useState(null),l=e.findIndex(u=>u.value===t),c=(u,d)=>{const f=u.currentTarget.getBoundingClientRect(),g=u.clientX-f.left,b=u.clientY-f.top;if(a({x:g,y:b,key:Date.now(),target:d.value}),d.value===t){i&&n&&n();return}if(r(d.value),n){const m=s.current;if(m){const v=()=>{m.removeEventListener("transitionend",v),n()};m.addEventListener("transitionend",v)}else n()}};return h.jsxs(mo,{children:[h.jsx(yo,{ref:s,$index:l}),e.map(u=>h.jsxs(bo,{$isSelected:t===u.value,onClick:d=>c(d,u),children:[o&&o.target===u.value&&h.jsx(De,{$x:o.x,$y:o.y},o.key),h.jsx(vo,{children:u.label})]},u.value))]})}function xo(e,t,r){return Math.max(t,Math.min(e,r))}const R={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function br(e,t,r){return t===0||Math.abs(t)===1/0?Math.pow(e,r*5):e*t*r/(t+r*e)}function vr(e,t,r,n=.15){return n===0?xo(e,t,r):e<t?-br(t-e,r-t,n)+t:e>r?+br(e-r,r-t,n)+r:e}function _o(e,[t,r],[n,i]){const[[s,o],[a,l]]=e;return[vr(t,s,o,n),vr(r,a,l,i)]}function ko(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function So(e){var t=ko(e,"string");return typeof t=="symbol"?t:String(t)}function I(e,t,r){return t=So(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wr(Object(r),!0).forEach(function(n){I(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const bn={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function xr(e){return e?e[0].toUpperCase()+e.slice(1):""}const To=["enter","leave"];function Po(e=!1,t){return e&&!To.includes(t)}function Eo(e,t="",r=!1){const n=bn[e],i=n&&n[t]||t;return"on"+xr(e)+xr(i)+(Po(r,i)?"Capture":"")}const Ao=["gotpointercapture","lostpointercapture"];function Co(e){let t=e.substring(2).toLowerCase();const r=!!~t.indexOf("passive");r&&(t=t.replace("passive",""));const n=Ao.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(n);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:r}}function Oo(e,t=""){const r=bn[e],n=r&&r[t]||t;return e+n}function ct(e){return"touches"in e}function vn(e){return ct(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function Ro(e){return Array.from(e.touches).filter(t=>{var r,n;return t.target===e.currentTarget||((r=e.currentTarget)===null||r===void 0||(n=r.contains)===null||n===void 0?void 0:n.call(r,t.target))})}function Do(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function wn(e){return ct(e)?Do(e)[0]:e}function Io(e){return Ro(e).map(t=>t.identifier)}function bt(e){const t=wn(e);return ct(e)?t.identifier:t.pointerId}function _r(e){const t=wn(e);return[t.clientX,t.clientY]}function $o(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:r,altKey:n,metaKey:i,ctrlKey:s}=e;Object.assign(t,{shiftKey:r,altKey:n,metaKey:i,ctrlKey:s})}return t}function Je(e,...t){return typeof e=="function"?e(...t):e}function jo(){}function Lo(...e){return e.length===0?jo:e.length===1?e[0]:function(){let t;for(const r of e)t=r.apply(this,arguments)||t;return t}}function kr(e,t){return Object.assign({},t,e||{})}const Mo=32;class No{constructor(t,r,n){this.ctrl=t,this.args=r,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:r,ingKey:n,args:i}=this;r[n]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=i,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const r=this.state,n=this.config;r._active||(this.reset(),this.computeInitial(),r._active=!0,r.target=t.target,r.currentTarget=t.currentTarget,r.lastOffset=n.from?Je(n.from,r):r.offset,r.offset=r.lastOffset,r.startTime=r.timeStamp=t.timeStamp)}computeValues(t){const r=this.state;r._values=t,r.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:r,config:n,shared:i}=this;r.args=this.args;let s=0;if(t&&(r.event=t,n.preventDefault&&t.cancelable&&r.event.preventDefault(),r.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,$o(t)),i.down=i.pressed=i.buttons%2===1||i.touches>0,s=t.timeStamp-r.timeStamp,r.timeStamp=t.timeStamp,r.elapsedTime=r.timeStamp-r.startTime),r._active){const C=r._delta.map(Math.abs);R.addTo(r._distance,C)}this.axisIntent&&this.axisIntent(t);const[o,a]=r._movement,[l,c]=n.threshold,{_step:u,values:d}=r;if(n.hasCustomTransform?(u[0]===!1&&(u[0]=Math.abs(o)>=l&&d[0]),u[1]===!1&&(u[1]=Math.abs(a)>=c&&d[1])):(u[0]===!1&&(u[0]=Math.abs(o)>=l&&Math.sign(o)*l),u[1]===!1&&(u[1]=Math.abs(a)>=c&&Math.sign(a)*c)),r.intentional=u[0]!==!1||u[1]!==!1,!r.intentional)return;const f=[0,0];if(n.hasCustomTransform){const[C,O]=d;f[0]=u[0]!==!1?C-u[0]:0,f[1]=u[1]!==!1?O-u[1]:0}else f[0]=u[0]!==!1?o-u[0]:0,f[1]=u[1]!==!1?a-u[1]:0;this.restrictToAxis&&!r._blocked&&this.restrictToAxis(f);const g=r.offset,b=r._active&&!r._blocked||r.active;b&&(r.first=r._active&&!r.active,r.last=!r._active&&r.active,r.active=i[this.ingKey]=r._active,t&&(r.first&&("bounds"in n&&(r._bounds=Je(n.bounds,r)),this.setup&&this.setup()),r.movement=f,this.computeOffset()));const[m,v]=r.offset,[[y,k],[x,P]]=r._bounds;r.overflow=[m<y?-1:m>k?1:0,v<x?-1:v>P?1:0],r._movementBound[0]=r.overflow[0]?r._movementBound[0]===!1?r._movement[0]:r._movementBound[0]:!1,r._movementBound[1]=r.overflow[1]?r._movementBound[1]===!1?r._movement[1]:r._movementBound[1]:!1;const S=r._active?n.rubberband||[0,0]:[0,0];if(r.offset=_o(r._bounds,r.offset,S),r.delta=R.sub(r.offset,g),this.computeMovement(),b&&(!r.last||s>Mo)){r.delta=R.sub(r.offset,g);const C=r.delta.map(Math.abs);R.addTo(r.distance,C),r.direction=r.delta.map(Math.sign),r._direction=r._delta.map(Math.sign),!r.first&&s>0&&(r.velocity=[C[0]/s,C[1]/s],r.timeDelta=s)}}emit(){const t=this.state,r=this.shared,n=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!n.triggerAllEvents)return;const i=this.handler(A(A(A({},r),t),{},{[this.aliasKey]:t.values}));i!==void 0&&(t.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function Vo([e,t],r){const n=Math.abs(e),i=Math.abs(t);if(n>i&&n>r)return"x";if(i>n&&i>r)return"y"}class Fo extends No{constructor(...t){super(...t),I(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=R.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=R.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const r=this.state,n=this.config;if(!r.axis&&t){const i=typeof n.axisThreshold=="object"?n.axisThreshold[vn(t)]:n.axisThreshold;r.axis=Vo(r._movement,i)}r._blocked=(n.lockDirection||!!n.axis)&&!r.axis||!!n.axis&&n.axis!==r.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const Sr=e=>e,Tr=.15,Gt={enabled(e=!0){return e},eventOptions(e,t,r){return A(A({},r.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[Tr,Tr];case!1:return[0,0];default:return R.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return R.toVector(e)},transform(e,t,r){const n=e||r.shared.transform;if(this.hasCustomTransform=!!n,process.env.NODE_ENV==="development"){const i=n||Sr;return s=>{const o=i(s);return(!isFinite(o[0])||!isFinite(o[1]))&&console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${o[0]},${[1]}]`),o}}return n||Sr},threshold(e){return R.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(Gt,{domTarget(e){if(e!==void 0)throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");return NaN},lockDirection(e){if(e!==void 0)throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");return NaN},initial(e){if(e!==void 0)throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");return NaN}});const zo=0,Ve=A(A({},Gt),{},{axis(e,t,{axis:r}){if(this.lockDirection=r==="lock",!this.lockDirection)return r},axisThreshold(e=zo){return e},bounds(e={}){if(typeof e=="function")return s=>Ve.bounds(e(s));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:r=1/0,top:n=-1/0,bottom:i=1/0}=e;return[[t,r],[n,i]]}}),Pr={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};class Bo extends Fo{constructor(...t){super(...t),I(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const r=t._bounds.getBoundingClientRect(),n=t.currentTarget.getBoundingClientRect(),i={left:r.left-n.left+t.offset[0],right:r.right-n.right+t.offset[0],top:r.top-n.top+t.offset[1],bottom:r.bottom-n.bottom+t.offset[1]};t._bounds=Ve.bounds(i)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const r=this.config,n=this.state;if(t.buttons!=null&&(Array.isArray(r.pointerButtons)?!r.pointerButtons.includes(t.buttons):r.pointerButtons!==-1&&r.pointerButtons!==t.buttons))return;const i=this.ctrl.setEventIds(t);r.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(i&&i.size>1&&n._pointerActive)&&(this.start(t),this.setupPointer(t),n._pointerId=bt(t),n._pointerActive=!0,this.computeValues(_r(t)),this.computeInitial(),r.preventScrollAxis&&vn(t)!=="mouse"?(n._active=!1,this.setupScrollPrevention(t)):r.delay>0?(this.setupDelayTrigger(t),r.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const r=this.state;r._active=!0,r._preventScroll=!0,r._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const r=this.state,n=this.config;if(!r._pointerActive)return;const i=bt(t);if(r._pointerId!==void 0&&i!==r._pointerId)return;const s=_r(t);if(document.pointerLockElement===t.target?r._delta=[t.movementX,t.movementY]:(r._delta=R.sub(s,r._values),this.computeValues(s)),R.addTo(r._movement,r._delta),this.compute(t),r._delayed&&r.intentional){this.timeoutStore.remove("dragDelay"),r.active=!1,this.startPointerDrag(t);return}if(n.preventScrollAxis&&!r._preventScroll)if(r.axis)if(r.axis===n.preventScrollAxis||n.preventScrollAxis==="xy"){r._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{process.env.NODE_ENV==="development"&&console.warn("[@use-gesture]: If you see this message, it's likely that you're using an outdated version of `@react-three/fiber`. \n\nPlease upgrade to the latest version.")}const r=this.state,n=this.config;if(!r._active||!r._pointerActive)return;const i=bt(t);if(r._pointerId!==void 0&&i!==r._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[s,o]=r._distance;if(r.tap=s<=n.tapsThreshold&&o<=n.tapsThreshold,r.tap&&n.filterTaps)r._force=!0;else{const[a,l]=r._delta,[c,u]=r._movement,[d,f]=n.swipe.velocity,[g,b]=n.swipe.distance,m=n.swipe.duration;if(r.elapsedTime<m){const v=Math.abs(a/r.timeDelta),y=Math.abs(l/r.timeDelta);v>d&&Math.abs(c)>g&&(r.swipe[0]=Math.sign(a)),y>f&&Math.abs(u)>b&&(r.swipe[1]=Math.sign(l))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const r=this.config,n=r.device;if(process.env.NODE_ENV==="development")try{if(n==="pointer"&&r.preventScrollDelay===void 0){const i="uv"in t?t.sourceEvent.currentTarget:t.currentTarget;window.getComputedStyle(i).touchAction==="auto"&&console.warn("[@use-gesture]: The drag target has its `touch-action` style property set to `auto`. It is recommended to add `touch-action: 'none'` so that the drag gesture behaves correctly on touch-enabled devices. For more information read this: https://use-gesture.netlify.app/docs/extras/#touch-action.\n\nThis message will only show in development mode. It won't appear in production. If this is intended, you can ignore it.",i)}}catch{}r.pointerLock&&t.currentTarget.requestPointerLock(),r.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,Ho(t);const r=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",r),this.eventStore.add(this.sharedConfig.window,"touch","cancel",r),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const r=Pr[t.key];if(r){const n=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),n._delta=r(this.config.keyboardDisplacement,i),n._keyboardActive=!0,R.addTo(n._movement,n._delta),this.compute(t),this.emit()}}keyUp(t){t.key in Pr&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const r=this.config.device;t(r,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(r,"change",this.pointerMove.bind(this)),t(r,"end",this.pointerUp.bind(this)),t(r,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function Ho(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const Fe=typeof window<"u"&&window.document&&window.document.createElement;function xn(){return Fe&&"ontouchstart"in window}function Uo(){return xn()||Fe&&window.navigator.maxTouchPoints>1}function Go(){return Fe&&"onpointerdown"in window}function qo(){return Fe&&"exitPointerLock"in window.document}function Wo(){try{return"constructor"in GestureEvent}catch{return!1}}const F={isBrowser:Fe,gesture:Wo(),touch:xn(),touchscreen:Uo(),pointer:Go(),pointerLock:qo()},Qo=250,Yo=180,Ko=.5,Xo=50,Zo=250,Jo=10,Er={mouse:0,touch:0,pen:8},_n=A(A({},Ve),{},{device(e,t,{pointer:{touch:r=!1,lock:n=!1,mouse:i=!1}={}}){return this.pointerLock=n&&F.pointerLock,F.touch&&r?"touch":this.pointerLock?"mouse":F.pointer&&!i?"pointer":F.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:r}){if(this.preventScrollDelay=typeof r=="number"?r:r||r===void 0&&e?Qo:void 0,!(!F.touchscreen||r===!1))return e||(r!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:r=!0,buttons:n=1,keys:i=!0}={}}){return this.pointerButtons=n,this.keys=i,!this.pointerLock&&this.device==="pointer"&&r},threshold(e,t,{filterTaps:r=!1,tapsThreshold:n=3,axis:i=void 0}){const s=R.toVector(e,r?n:i?1:0);return this.filterTaps=r,this.tapsThreshold=n,s},swipe({velocity:e=Ko,distance:t=Xo,duration:r=Zo}={}){return{velocity:this.transform(R.toVector(e)),distance:this.transform(R.toVector(t)),duration:r}},delay(e=0){switch(e){case!0:return Yo;case!1:return 0;default:return e}},axisThreshold(e){return e?A(A({},Er),e):Er},keyboardDisplacement(e=Jo){return e}});process.env.NODE_ENV==="development"&&Object.assign(_n,{useTouch(e){if(e!==void 0)throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");return NaN},experimental_preventWindowScrollY(e){if(e!==void 0)throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");return NaN},swipeVelocity(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");return NaN},swipeDistance(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");return NaN},swipeDuration(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");return NaN}});A(A({},Gt),{},{device(e,t,{shared:r,pointer:{touch:n=!1}={}}){if(r.target&&!F.touch&&F.gesture)return"gesture";if(F.touch&&n)return"touch";if(F.touchscreen){if(F.pointer)return"pointer";if(F.touch)return"touch"}},bounds(e,t,{scaleBounds:r={},angleBounds:n={}}){const i=o=>{const a=kr(Je(r,o),{min:-1/0,max:1/0});return[a.min,a.max]},s=o=>{const a=kr(Je(n,o),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof r!="function"&&typeof n!="function"?[i(),s()]:o=>[i(o),s(o)]},threshold(e,t,r){return this.lockDirection=r.axis==="lock",R.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});A(A({},Ve),{},{mouseOnly:(e=!0)=>e});A(A({},Ve),{},{mouseOnly:(e=!0)=>e});const kn=new Map,At=new Map;function ea(e){kn.set(e.key,e.engine),At.set(e.key,e.resolver)}const ta={key:"drag",engine:Bo,resolver:_n};function ra(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function na(e,t){if(e==null)return{};var r=ra(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const ia={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=F.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},sa=["target","eventOptions","window","enabled","transform"];function Ge(e={},t){const r={};for(const[n,i]of Object.entries(t))switch(typeof i){case"function":if(process.env.NODE_ENV==="development"){const s=i.call(r,e[n],n,e);Number.isNaN(s)||(r[n]=s)}else r[n]=i.call(r,e[n],n,e);break;case"object":r[n]=Ge(e[n],i);break;case"boolean":i&&(r[n]=e[n]);break}return r}function oa(e,t,r={}){const n=e,{target:i,eventOptions:s,window:o,enabled:a,transform:l}=n,c=na(n,sa);if(r.shared=Ge({target:i,eventOptions:s,window:o,enabled:a,transform:l},ia),t){const u=At.get(t);r[t]=Ge(A({shared:r.shared},c),u)}else for(const u in c){const d=At.get(u);if(d)r[u]=Ge(A({shared:r.shared},c[u]),d);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(u)){if(u==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");console.warn(`[@use-gesture]: Unknown config key \`${u}\` was used. Please read the documentation for further information.`)}}return r}class Sn{constructor(t,r){I(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=r}add(t,r,n,i,s){const o=this._listeners,a=Oo(r,n),l=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},c=A(A({},l),s);t.addEventListener(a,i,c);const u=()=>{t.removeEventListener(a,i,c),o.delete(u)};return o.add(u),u}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class aa{constructor(){I(this,"_timeouts",new Map)}add(t,r,n=140,...i){this.remove(t),this._timeouts.set(t,window.setTimeout(r,n,...i))}remove(t){const r=this._timeouts.get(t);r&&window.clearTimeout(r)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class ca{constructor(t){I(this,"gestures",new Set),I(this,"_targetEventStore",new Sn(this)),I(this,"gestureEventStores",{}),I(this,"gestureTimeoutStores",{}),I(this,"handlers",{}),I(this,"config",{}),I(this,"pointerIds",new Set),I(this,"touchIds",new Set),I(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),ua(this,t)}setEventIds(t){if(ct(t))return this.touchIds=new Set(Io(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,r){this.handlers=t,this.nativeHandlers=r}applyConfig(t,r){this.config=oa(t,r,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const r=this.config.shared,n={};let i;if(!(r.target&&(i=r.target(),!i))){if(r.enabled){for(const o of this.gestures){const a=this.config[o],l=Ar(n,a.eventOptions,!!i);if(a.enabled){const c=kn.get(o);new c(this,t,o).bind(l)}}const s=Ar(n,r.eventOptions,!!i);for(const o in this.nativeHandlers)s(o,"",a=>this.nativeHandlers[o](A(A({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const s in n)n[s]=Lo(...n[s]);if(!i)return n;for(const s in n){const{device:o,capture:a,passive:l}=Co(s);this._targetEventStore.add(i,o,"",n[s],{capture:a,passive:l})}}}}function oe(e,t){e.gestures.add(t),e.gestureEventStores[t]=new Sn(e,t),e.gestureTimeoutStores[t]=new aa}function ua(e,t){t.drag&&oe(e,"drag"),t.wheel&&oe(e,"wheel"),t.scroll&&oe(e,"scroll"),t.move&&oe(e,"move"),t.pinch&&oe(e,"pinch"),t.hover&&oe(e,"hover")}const Ar=(e,t,r)=>(n,i,s,o={},a=!1)=>{var l,c;const u=(l=o.capture)!==null&&l!==void 0?l:t.capture,d=(c=o.passive)!==null&&c!==void 0?c:t.passive;let f=a?n:Eo(n,i,u);r&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(s)};function la(e,t={},r,n){const i=N.default.useMemo(()=>new ca(e),[]);if(i.applyHandlers(e,n),i.applyConfig(t,r),N.default.useEffect(i.effect.bind(i)),N.default.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function da(e,t){return ea(ta),la({drag:e},t||{},"drag")}const fa=_.default.div`
435
+ `,vo=_.default.span``;function wo({options:e,value:t,onChange:r,onClose:n,closeOnSameValue:i=!0}){const s=w.useRef(null),[o,a]=w.useState(null),l=e.findIndex(u=>u.value===t),c=(u,d)=>{const f=u.currentTarget.getBoundingClientRect(),g=u.clientX-f.left,b=u.clientY-f.top;if(a({x:g,y:b,key:Date.now(),target:d.value}),d.value===t){i&&n&&n();return}if(r(d.value),n){const m=s.current;if(m){const v=()=>{m.removeEventListener("transitionend",v),n()};m.addEventListener("transitionend",v)}else n()}};return h.jsxs(mo,{children:[h.jsx(yo,{ref:s,$index:l}),e.map(u=>h.jsxs(bo,{$isSelected:t===u.value,onClick:d=>c(d,u),children:[o&&o.target===u.value&&h.jsx(De,{$x:o.x,$y:o.y},o.key),h.jsx(vo,{children:u.label})]},u.value))]})}function xo(e,t,r){return Math.max(t,Math.min(e,r))}const R={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function br(e,t,r){return t===0||Math.abs(t)===1/0?Math.pow(e,r*5):e*t*r/(t+r*e)}function vr(e,t,r,n=.15){return n===0?xo(e,t,r):e<t?-br(t-e,r-t,n)+t:e>r?+br(e-r,r-t,n)+r:e}function _o(e,[t,r],[n,i]){const[[s,o],[a,l]]=e;return[vr(t,s,o,n),vr(r,a,l,i)]}function ko(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function So(e){var t=ko(e,"string");return typeof t=="symbol"?t:String(t)}function I(e,t,r){return t=So(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wr(Object(r),!0).forEach(function(n){I(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const bn={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function xr(e){return e?e[0].toUpperCase()+e.slice(1):""}const To=["enter","leave"];function Po(e=!1,t){return e&&!To.includes(t)}function Eo(e,t="",r=!1){const n=bn[e],i=n&&n[t]||t;return"on"+xr(e)+xr(i)+(Po(r,i)?"Capture":"")}const Co=["gotpointercapture","lostpointercapture"];function Ao(e){let t=e.substring(2).toLowerCase();const r=!!~t.indexOf("passive");r&&(t=t.replace("passive",""));const n=Co.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(n);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:r}}function Oo(e,t=""){const r=bn[e],n=r&&r[t]||t;return e+n}function ct(e){return"touches"in e}function vn(e){return ct(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function Ro(e){return Array.from(e.touches).filter(t=>{var r,n;return t.target===e.currentTarget||((r=e.currentTarget)===null||r===void 0||(n=r.contains)===null||n===void 0?void 0:n.call(r,t.target))})}function Do(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function wn(e){return ct(e)?Do(e)[0]:e}function Io(e){return Ro(e).map(t=>t.identifier)}function bt(e){const t=wn(e);return ct(e)?t.identifier:t.pointerId}function _r(e){const t=wn(e);return[t.clientX,t.clientY]}function $o(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:r,altKey:n,metaKey:i,ctrlKey:s}=e;Object.assign(t,{shiftKey:r,altKey:n,metaKey:i,ctrlKey:s})}return t}function Je(e,...t){return typeof e=="function"?e(...t):e}function jo(){}function Lo(...e){return e.length===0?jo:e.length===1?e[0]:function(){let t;for(const r of e)t=r.apply(this,arguments)||t;return t}}function kr(e,t){return Object.assign({},t,e||{})}const Mo=32;class No{constructor(t,r,n){this.ctrl=t,this.args=r,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:r,ingKey:n,args:i}=this;r[n]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=i,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const r=this.state,n=this.config;r._active||(this.reset(),this.computeInitial(),r._active=!0,r.target=t.target,r.currentTarget=t.currentTarget,r.lastOffset=n.from?Je(n.from,r):r.offset,r.offset=r.lastOffset,r.startTime=r.timeStamp=t.timeStamp)}computeValues(t){const r=this.state;r._values=t,r.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:r,config:n,shared:i}=this;r.args=this.args;let s=0;if(t&&(r.event=t,n.preventDefault&&t.cancelable&&r.event.preventDefault(),r.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,$o(t)),i.down=i.pressed=i.buttons%2===1||i.touches>0,s=t.timeStamp-r.timeStamp,r.timeStamp=t.timeStamp,r.elapsedTime=r.timeStamp-r.startTime),r._active){const A=r._delta.map(Math.abs);R.addTo(r._distance,A)}this.axisIntent&&this.axisIntent(t);const[o,a]=r._movement,[l,c]=n.threshold,{_step:u,values:d}=r;if(n.hasCustomTransform?(u[0]===!1&&(u[0]=Math.abs(o)>=l&&d[0]),u[1]===!1&&(u[1]=Math.abs(a)>=c&&d[1])):(u[0]===!1&&(u[0]=Math.abs(o)>=l&&Math.sign(o)*l),u[1]===!1&&(u[1]=Math.abs(a)>=c&&Math.sign(a)*c)),r.intentional=u[0]!==!1||u[1]!==!1,!r.intentional)return;const f=[0,0];if(n.hasCustomTransform){const[A,O]=d;f[0]=u[0]!==!1?A-u[0]:0,f[1]=u[1]!==!1?O-u[1]:0}else f[0]=u[0]!==!1?o-u[0]:0,f[1]=u[1]!==!1?a-u[1]:0;this.restrictToAxis&&!r._blocked&&this.restrictToAxis(f);const g=r.offset,b=r._active&&!r._blocked||r.active;b&&(r.first=r._active&&!r.active,r.last=!r._active&&r.active,r.active=i[this.ingKey]=r._active,t&&(r.first&&("bounds"in n&&(r._bounds=Je(n.bounds,r)),this.setup&&this.setup()),r.movement=f,this.computeOffset()));const[m,v]=r.offset,[[y,k],[x,P]]=r._bounds;r.overflow=[m<y?-1:m>k?1:0,v<x?-1:v>P?1:0],r._movementBound[0]=r.overflow[0]?r._movementBound[0]===!1?r._movement[0]:r._movementBound[0]:!1,r._movementBound[1]=r.overflow[1]?r._movementBound[1]===!1?r._movement[1]:r._movementBound[1]:!1;const S=r._active?n.rubberband||[0,0]:[0,0];if(r.offset=_o(r._bounds,r.offset,S),r.delta=R.sub(r.offset,g),this.computeMovement(),b&&(!r.last||s>Mo)){r.delta=R.sub(r.offset,g);const A=r.delta.map(Math.abs);R.addTo(r.distance,A),r.direction=r.delta.map(Math.sign),r._direction=r._delta.map(Math.sign),!r.first&&s>0&&(r.velocity=[A[0]/s,A[1]/s],r.timeDelta=s)}}emit(){const t=this.state,r=this.shared,n=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!n.triggerAllEvents)return;const i=this.handler(C(C(C({},r),t),{},{[this.aliasKey]:t.values}));i!==void 0&&(t.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function Vo([e,t],r){const n=Math.abs(e),i=Math.abs(t);if(n>i&&n>r)return"x";if(i>n&&i>r)return"y"}class Fo extends No{constructor(...t){super(...t),I(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=R.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=R.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const r=this.state,n=this.config;if(!r.axis&&t){const i=typeof n.axisThreshold=="object"?n.axisThreshold[vn(t)]:n.axisThreshold;r.axis=Vo(r._movement,i)}r._blocked=(n.lockDirection||!!n.axis)&&!r.axis||!!n.axis&&n.axis!==r.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const Sr=e=>e,Tr=.15,Gt={enabled(e=!0){return e},eventOptions(e,t,r){return C(C({},r.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[Tr,Tr];case!1:return[0,0];default:return R.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return R.toVector(e)},transform(e,t,r){const n=e||r.shared.transform;if(this.hasCustomTransform=!!n,process.env.NODE_ENV==="development"){const i=n||Sr;return s=>{const o=i(s);return(!isFinite(o[0])||!isFinite(o[1]))&&console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${o[0]},${[1]}]`),o}}return n||Sr},threshold(e){return R.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(Gt,{domTarget(e){if(e!==void 0)throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");return NaN},lockDirection(e){if(e!==void 0)throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");return NaN},initial(e){if(e!==void 0)throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");return NaN}});const zo=0,Ve=C(C({},Gt),{},{axis(e,t,{axis:r}){if(this.lockDirection=r==="lock",!this.lockDirection)return r},axisThreshold(e=zo){return e},bounds(e={}){if(typeof e=="function")return s=>Ve.bounds(e(s));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:r=1/0,top:n=-1/0,bottom:i=1/0}=e;return[[t,r],[n,i]]}}),Pr={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};class Bo extends Fo{constructor(...t){super(...t),I(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const r=t._bounds.getBoundingClientRect(),n=t.currentTarget.getBoundingClientRect(),i={left:r.left-n.left+t.offset[0],right:r.right-n.right+t.offset[0],top:r.top-n.top+t.offset[1],bottom:r.bottom-n.bottom+t.offset[1]};t._bounds=Ve.bounds(i)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const r=this.config,n=this.state;if(t.buttons!=null&&(Array.isArray(r.pointerButtons)?!r.pointerButtons.includes(t.buttons):r.pointerButtons!==-1&&r.pointerButtons!==t.buttons))return;const i=this.ctrl.setEventIds(t);r.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(i&&i.size>1&&n._pointerActive)&&(this.start(t),this.setupPointer(t),n._pointerId=bt(t),n._pointerActive=!0,this.computeValues(_r(t)),this.computeInitial(),r.preventScrollAxis&&vn(t)!=="mouse"?(n._active=!1,this.setupScrollPrevention(t)):r.delay>0?(this.setupDelayTrigger(t),r.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const r=this.state;r._active=!0,r._preventScroll=!0,r._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const r=this.state,n=this.config;if(!r._pointerActive)return;const i=bt(t);if(r._pointerId!==void 0&&i!==r._pointerId)return;const s=_r(t);if(document.pointerLockElement===t.target?r._delta=[t.movementX,t.movementY]:(r._delta=R.sub(s,r._values),this.computeValues(s)),R.addTo(r._movement,r._delta),this.compute(t),r._delayed&&r.intentional){this.timeoutStore.remove("dragDelay"),r.active=!1,this.startPointerDrag(t);return}if(n.preventScrollAxis&&!r._preventScroll)if(r.axis)if(r.axis===n.preventScrollAxis||n.preventScrollAxis==="xy"){r._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{process.env.NODE_ENV==="development"&&console.warn("[@use-gesture]: If you see this message, it's likely that you're using an outdated version of `@react-three/fiber`. \n\nPlease upgrade to the latest version.")}const r=this.state,n=this.config;if(!r._active||!r._pointerActive)return;const i=bt(t);if(r._pointerId!==void 0&&i!==r._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[s,o]=r._distance;if(r.tap=s<=n.tapsThreshold&&o<=n.tapsThreshold,r.tap&&n.filterTaps)r._force=!0;else{const[a,l]=r._delta,[c,u]=r._movement,[d,f]=n.swipe.velocity,[g,b]=n.swipe.distance,m=n.swipe.duration;if(r.elapsedTime<m){const v=Math.abs(a/r.timeDelta),y=Math.abs(l/r.timeDelta);v>d&&Math.abs(c)>g&&(r.swipe[0]=Math.sign(a)),y>f&&Math.abs(u)>b&&(r.swipe[1]=Math.sign(l))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const r=this.config,n=r.device;if(process.env.NODE_ENV==="development")try{if(n==="pointer"&&r.preventScrollDelay===void 0){const i="uv"in t?t.sourceEvent.currentTarget:t.currentTarget;window.getComputedStyle(i).touchAction==="auto"&&console.warn("[@use-gesture]: The drag target has its `touch-action` style property set to `auto`. It is recommended to add `touch-action: 'none'` so that the drag gesture behaves correctly on touch-enabled devices. For more information read this: https://use-gesture.netlify.app/docs/extras/#touch-action.\n\nThis message will only show in development mode. It won't appear in production. If this is intended, you can ignore it.",i)}}catch{}r.pointerLock&&t.currentTarget.requestPointerLock(),r.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,Ho(t);const r=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",r),this.eventStore.add(this.sharedConfig.window,"touch","cancel",r),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const r=Pr[t.key];if(r){const n=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),n._delta=r(this.config.keyboardDisplacement,i),n._keyboardActive=!0,R.addTo(n._movement,n._delta),this.compute(t),this.emit()}}keyUp(t){t.key in Pr&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const r=this.config.device;t(r,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(r,"change",this.pointerMove.bind(this)),t(r,"end",this.pointerUp.bind(this)),t(r,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function Ho(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const Fe=typeof window<"u"&&window.document&&window.document.createElement;function xn(){return Fe&&"ontouchstart"in window}function Uo(){return xn()||Fe&&window.navigator.maxTouchPoints>1}function Go(){return Fe&&"onpointerdown"in window}function qo(){return Fe&&"exitPointerLock"in window.document}function Wo(){try{return"constructor"in GestureEvent}catch{return!1}}const F={isBrowser:Fe,gesture:Wo(),touch:xn(),touchscreen:Uo(),pointer:Go(),pointerLock:qo()},Qo=250,Yo=180,Ko=.5,Xo=50,Zo=250,Jo=10,Er={mouse:0,touch:0,pen:8},_n=C(C({},Ve),{},{device(e,t,{pointer:{touch:r=!1,lock:n=!1,mouse:i=!1}={}}){return this.pointerLock=n&&F.pointerLock,F.touch&&r?"touch":this.pointerLock?"mouse":F.pointer&&!i?"pointer":F.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:r}){if(this.preventScrollDelay=typeof r=="number"?r:r||r===void 0&&e?Qo:void 0,!(!F.touchscreen||r===!1))return e||(r!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:r=!0,buttons:n=1,keys:i=!0}={}}){return this.pointerButtons=n,this.keys=i,!this.pointerLock&&this.device==="pointer"&&r},threshold(e,t,{filterTaps:r=!1,tapsThreshold:n=3,axis:i=void 0}){const s=R.toVector(e,r?n:i?1:0);return this.filterTaps=r,this.tapsThreshold=n,s},swipe({velocity:e=Ko,distance:t=Xo,duration:r=Zo}={}){return{velocity:this.transform(R.toVector(e)),distance:this.transform(R.toVector(t)),duration:r}},delay(e=0){switch(e){case!0:return Yo;case!1:return 0;default:return e}},axisThreshold(e){return e?C(C({},Er),e):Er},keyboardDisplacement(e=Jo){return e}});process.env.NODE_ENV==="development"&&Object.assign(_n,{useTouch(e){if(e!==void 0)throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");return NaN},experimental_preventWindowScrollY(e){if(e!==void 0)throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");return NaN},swipeVelocity(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");return NaN},swipeDistance(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");return NaN},swipeDuration(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");return NaN}});C(C({},Gt),{},{device(e,t,{shared:r,pointer:{touch:n=!1}={}}){if(r.target&&!F.touch&&F.gesture)return"gesture";if(F.touch&&n)return"touch";if(F.touchscreen){if(F.pointer)return"pointer";if(F.touch)return"touch"}},bounds(e,t,{scaleBounds:r={},angleBounds:n={}}){const i=o=>{const a=kr(Je(r,o),{min:-1/0,max:1/0});return[a.min,a.max]},s=o=>{const a=kr(Je(n,o),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof r!="function"&&typeof n!="function"?[i(),s()]:o=>[i(o),s(o)]},threshold(e,t,r){return this.lockDirection=r.axis==="lock",R.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});C(C({},Ve),{},{mouseOnly:(e=!0)=>e});C(C({},Ve),{},{mouseOnly:(e=!0)=>e});const kn=new Map,Ct=new Map;function ea(e){kn.set(e.key,e.engine),Ct.set(e.key,e.resolver)}const ta={key:"drag",engine:Bo,resolver:_n};function ra(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function na(e,t){if(e==null)return{};var r=ra(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const ia={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=F.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},sa=["target","eventOptions","window","enabled","transform"];function Ge(e={},t){const r={};for(const[n,i]of Object.entries(t))switch(typeof i){case"function":if(process.env.NODE_ENV==="development"){const s=i.call(r,e[n],n,e);Number.isNaN(s)||(r[n]=s)}else r[n]=i.call(r,e[n],n,e);break;case"object":r[n]=Ge(e[n],i);break;case"boolean":i&&(r[n]=e[n]);break}return r}function oa(e,t,r={}){const n=e,{target:i,eventOptions:s,window:o,enabled:a,transform:l}=n,c=na(n,sa);if(r.shared=Ge({target:i,eventOptions:s,window:o,enabled:a,transform:l},ia),t){const u=Ct.get(t);r[t]=Ge(C({shared:r.shared},c),u)}else for(const u in c){const d=Ct.get(u);if(d)r[u]=Ge(C({shared:r.shared},c[u]),d);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(u)){if(u==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");console.warn(`[@use-gesture]: Unknown config key \`${u}\` was used. Please read the documentation for further information.`)}}return r}class Sn{constructor(t,r){I(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=r}add(t,r,n,i,s){const o=this._listeners,a=Oo(r,n),l=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},c=C(C({},l),s);t.addEventListener(a,i,c);const u=()=>{t.removeEventListener(a,i,c),o.delete(u)};return o.add(u),u}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class aa{constructor(){I(this,"_timeouts",new Map)}add(t,r,n=140,...i){this.remove(t),this._timeouts.set(t,window.setTimeout(r,n,...i))}remove(t){const r=this._timeouts.get(t);r&&window.clearTimeout(r)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class ca{constructor(t){I(this,"gestures",new Set),I(this,"_targetEventStore",new Sn(this)),I(this,"gestureEventStores",{}),I(this,"gestureTimeoutStores",{}),I(this,"handlers",{}),I(this,"config",{}),I(this,"pointerIds",new Set),I(this,"touchIds",new Set),I(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),ua(this,t)}setEventIds(t){if(ct(t))return this.touchIds=new Set(Io(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,r){this.handlers=t,this.nativeHandlers=r}applyConfig(t,r){this.config=oa(t,r,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const r=this.config.shared,n={};let i;if(!(r.target&&(i=r.target(),!i))){if(r.enabled){for(const o of this.gestures){const a=this.config[o],l=Cr(n,a.eventOptions,!!i);if(a.enabled){const c=kn.get(o);new c(this,t,o).bind(l)}}const s=Cr(n,r.eventOptions,!!i);for(const o in this.nativeHandlers)s(o,"",a=>this.nativeHandlers[o](C(C({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const s in n)n[s]=Lo(...n[s]);if(!i)return n;for(const s in n){const{device:o,capture:a,passive:l}=Ao(s);this._targetEventStore.add(i,o,"",n[s],{capture:a,passive:l})}}}}function oe(e,t){e.gestures.add(t),e.gestureEventStores[t]=new Sn(e,t),e.gestureTimeoutStores[t]=new aa}function ua(e,t){t.drag&&oe(e,"drag"),t.wheel&&oe(e,"wheel"),t.scroll&&oe(e,"scroll"),t.move&&oe(e,"move"),t.pinch&&oe(e,"pinch"),t.hover&&oe(e,"hover")}const Cr=(e,t,r)=>(n,i,s,o={},a=!1)=>{var l,c;const u=(l=o.capture)!==null&&l!==void 0?l:t.capture,d=(c=o.passive)!==null&&c!==void 0?c:t.passive;let f=a?n:Eo(n,i,u);r&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(s)};function la(e,t={},r,n){const i=N.default.useMemo(()=>new ca(e),[]);if(i.applyHandlers(e,n),i.applyConfig(t,r),N.default.useEffect(i.effect.bind(i)),N.default.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function da(e,t){return ea(ta),la({drag:e},t||{},"drag")}const fa=_.default.div`
435
436
  position: absolute;
436
437
  inset: 0;
437
438
  background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.scrim)||"rgba(0, 0, 0, 0.4)"}};
@@ -459,7 +460,7 @@
459
460
  clip: rect(0, 0, 0, 0);
460
461
  white-space: nowrap;
461
462
  border: 0;
462
- `;function ya(e){return 8*(Math.log(e+1)-2)}function ba({isOpen:e,onClose:t,children:r,title:n="Bottom Sheet",maxHeight:i=300,velocityThreshold:s=.4,closeThreshold:o=.25,onExitComplete:a}){const l=w.useRef(null),[c,u]=w.useState(e),[d,f]=Me(()=>({y:i,opacity:0,config:{tension:300,friction:30}}));w.useEffect(()=>{var m,v;if(e){u(!0);const y=((m=l.current)==null?void 0:m.offsetHeight)||i;f.set({y,opacity:0}),f.start({y:0,opacity:1})}else{const y=((v=l.current)==null?void 0:v.offsetHeight)||i;f.start({y,opacity:0,onRest:()=>{u(!1),a==null||a()}})}},[e,f,i,a]);const g=w.useCallback(()=>{t()},[t]),b=da(({active:m,movement:[,v],velocity:[,y],direction:[,k],cancel:x})=>{if(v<-10){x();return}const P=Math.max(0,v);if(m){const S=v<0?ya(-v)*-.5:P;f.start({y:S,immediate:!0});const C=Math.min(P/i,1);f.start({opacity:1-C*.5,immediate:!0})}else y>s&&k>0||P>i*o?g():f.start({y:0,opacity:1})},{from:()=>[0,d.y.get()],filterTaps:!0,axis:"y",pointer:{touch:!0},preventDefault:!0,eventOptions:{passive:!1}});return c?h.jsxs(h.Fragment,{children:[h.jsx(le.div,{style:{position:"fixed",inset:0,zIndex:49,opacity:d.opacity,pointerEvents:e?"auto":"none"},onClick:g,children:h.jsx(fa,{})}),h.jsx(le.div,{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:50,transform:d.y.to(m=>`translateY(${m}px)`)},children:h.jsxs(ha,{ref:l,children:[h.jsx(ma,{children:n}),h.jsx("div",{...b(),style:{touchAction:"none",cursor:"grab",padding:"8px 0"},children:h.jsx(pa,{})}),h.jsx(ga,{children:r})]})})]}):h.jsx(h.Fragment,{})}function Tn(){const[e,t]=w.useState(null),r=w.useCallback((i,s)=>{const o=i.currentTarget.getBoundingClientRect();t({x:i.clientX-o.left,y:i.clientY-o.top,key:Date.now(),target:s})},[]),n=w.useCallback(i=>e!==null&&e.target===i,[e]);return{ripple:e,trigger:r,isTarget:n}}const va=_.default.div`
463
+ `;function ya(e){return 8*(Math.log(e+1)-2)}function ba({isOpen:e,onClose:t,children:r,title:n="Bottom Sheet",maxHeight:i=300,velocityThreshold:s=.4,closeThreshold:o=.25,onExitComplete:a}){const l=w.useRef(null),[c,u]=w.useState(e),[d,f]=Me(()=>({y:i,opacity:0,config:{tension:300,friction:30}}));w.useEffect(()=>{var m,v;if(e){u(!0);const y=((m=l.current)==null?void 0:m.offsetHeight)||i;f.set({y,opacity:0}),f.start({y:0,opacity:1})}else{const y=((v=l.current)==null?void 0:v.offsetHeight)||i;f.start({y,opacity:0,onRest:()=>{u(!1),a==null||a()}})}},[e,f,i,a]);const g=w.useCallback(()=>{t()},[t]),b=da(({active:m,movement:[,v],velocity:[,y],direction:[,k],cancel:x})=>{if(v<-10){x();return}const P=Math.max(0,v);if(m){const S=v<0?ya(-v)*-.5:P;f.start({y:S,immediate:!0});const A=Math.min(P/i,1);f.start({opacity:1-A*.5,immediate:!0})}else y>s&&k>0||P>i*o?g():f.start({y:0,opacity:1})},{from:()=>[0,d.y.get()],filterTaps:!0,axis:"y",pointer:{touch:!0},preventDefault:!0,eventOptions:{passive:!1}});return c?h.jsxs(h.Fragment,{children:[h.jsx(le.div,{style:{position:"fixed",inset:0,zIndex:49,opacity:d.opacity,pointerEvents:e?"auto":"none"},onClick:g,children:h.jsx(fa,{})}),h.jsx(le.div,{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:50,transform:d.y.to(m=>`translateY(${m}px)`)},children:h.jsxs(ha,{ref:l,children:[h.jsx(ma,{children:n}),h.jsx("div",{...b(),style:{touchAction:"none",cursor:"grab",padding:"8px 0"},children:h.jsx(pa,{})}),h.jsx(ga,{children:r})]})})]}):h.jsx(h.Fragment,{})}function Tn(){const[e,t]=w.useState(null),r=w.useCallback((i,s)=>{const o=i.currentTarget.getBoundingClientRect();t({x:i.clientX-o.left,y:i.clientY-o.top,key:Date.now(),target:s})},[]),n=w.useCallback(i=>e!==null&&e.target===i,[e]);return{ripple:e,trigger:r,isTarget:n}}const va=_.default.div`
463
464
  display: flex;
464
465
  flex-direction: column;
465
466
  gap: 0.5rem;
@@ -472,7 +473,7 @@
472
473
  padding: 0 1rem 1rem;
473
474
  font-size: 0.875rem;
474
475
  opacity: 0.7;
475
- `,Cr=_.default.button`
476
+ `,Ar=_.default.button`
476
477
  position: relative;
477
478
  z-index: 1;
478
479
  display: flex;
@@ -490,7 +491,7 @@
490
491
  outline: none;
491
492
  overflow: hidden;
492
493
  -webkit-tap-highlight-color: transparent;
493
- `;function _a({message:e,description:t,confirmLabel:r,cancelLabel:n,destructive:i=!1,onConfirm:s,onCancel:o}){const{ripple:a,trigger:l,isTarget:c}=Tn(),u=f=>{l(f,"confirm"),s()},d=f=>{l(f,"cancel"),o()};return h.jsxs(va,{children:[h.jsx(wa,{children:e}),t&&h.jsx(xa,{children:t}),h.jsxs(Cr,{$destructive:i,onClick:u,children:[c("confirm")&&a&&h.jsx(De,{$x:a.x,$y:a.y},a.key),r]}),h.jsxs(Cr,{onClick:d,children:[c("cancel")&&a&&h.jsx(De,{$x:a.x,$y:a.y},a.key),n]})]})}const ka={primary:M.css`
494
+ `;function _a({message:e,description:t,confirmLabel:r,cancelLabel:n,destructive:i=!1,onConfirm:s,onCancel:o}){const{ripple:a,trigger:l,isTarget:c}=Tn(),u=f=>{l(f,"confirm"),s()},d=f=>{l(f,"cancel"),o()};return h.jsxs(va,{children:[h.jsx(wa,{children:e}),t&&h.jsx(xa,{children:t}),h.jsxs(Ar,{$destructive:i,onClick:u,children:[c("confirm")&&a&&h.jsx(De,{$x:a.x,$y:a.y},a.key),r]}),h.jsxs(Ar,{onClick:d,children:[c("cancel")&&a&&h.jsx(De,{$x:a.x,$y:a.y},a.key),n]})]})}const ka={primary:M.css`
494
495
  background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.whiteLow)||"rgba(255, 255, 255, 0.2)"}};
495
496
  `,muted:M.css`
496
497
  background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.surfaceVariant)||"rgba(0, 0, 0, 0.06)"}};
@@ -516,4 +517,4 @@
516
517
  color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.onSurface)||"#333"}};
517
518
  text-transform: uppercase;
518
519
  letter-spacing: 0.05em;
519
- `;function Ea({value:e,label:t,variant:r="primary"}){return h.jsxs(Sa,{$variant:r,children:[h.jsx(Ta,{$variant:r,children:e}),t&&h.jsx(Pa,{children:t})]})}const Aa={cardPosition:"transit-to-home"},qt=Ct.createSlice({name:"navigation",initialState:Aa,reducers:{setCardState:(e,t)=>(e.cardPosition=t.payload.state,e)}}),{setCardState:Na}=qt.actions;qt.reducer;const Ca=Ct.combineReducers({navigation:qt.reducer}),Oa=Ct.configureStore({reducer:Ca});function Ra(){const[e,t]=w.useState(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return w.useEffect(()=>{const r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=i=>t(i.matches);return r.addEventListener("change",n),()=>r.removeEventListener("change",n)},[]),e}function Da(e=100){const[t,r]=w.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});return w.useEffect(()=>{let n;const i=()=>{clearTimeout(n),n=setTimeout(()=>{r({width:window.innerWidth,height:window.innerHeight})},e)};return window.addEventListener("resize",i),window.addEventListener("orientationchange",i),()=>{clearTimeout(n),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i)}},[e]),t}function Pn(e,t){let r=0,n=null;const i=(...s)=>{const o=Date.now(),a=o-r;a>=t?(r=o,e(...s)):n||(n=setTimeout(()=>{r=Date.now(),n=null,e(...s)},t-a))};return i.cancel=()=>{n&&(clearTimeout(n),n=null)},i}function Ia(e,t={}){const{enabled:r=!0,includeMargins:n=!0,throttleMs:i=16}=t,s=w.useRef(null),o=w.useRef(null),a=w.useRef(null),l=w.useRef(e);w.useEffect(()=>{l.current=e},[e]);const c=w.useCallback(()=>{if(!s.current||!r)return;const d=s.current.getBoundingClientRect();let f=0,g=0;if(n){const m=getComputedStyle(s.current);f=parseFloat(m.marginTop)||0,g=parseFloat(m.marginBottom)||0}const b={top:d.top-f,left:d.left,width:d.width,height:d.height+f+g,right:d.right,bottom:d.bottom+g,x:d.x,y:d.y-f};if(a.current){const m=Math.abs(b.top-a.current.top),v=Math.abs(b.height-a.current.height),y=Math.abs(b.width-a.current.width);if(m<.5&&v<.5&&y<.5)return}a.current=b,l.current(b)},[r,n]);return w.useEffect(()=>{if(!s.current||!r)return;const d=Pn(c,i),f=requestAnimationFrame(c),g=new ResizeObserver(d);g.observe(s.current),o.current=g;const b=m=>{const v=m.target;v!==document&&v!==document.documentElement||d()};return window.addEventListener("scroll",b,{passive:!0,capture:!0}),window.addEventListener("resize",d),()=>{cancelAnimationFrame(f),g.disconnect(),d.cancel(),window.removeEventListener("scroll",b,{capture:!0}),window.removeEventListener("resize",d)}},[c,r,i]),d=>{s.current=d}}const En={primary:"#0D47A1",onPrimary:"#ffffff",primaryContainer:"#BBDEFB",onPrimaryContainer:"#0D3B70",primaryDark:"#0A3A86",primaryDarker:"#08306B",secondary:"#E8C840",onSecondary:"#1A1A1A",secondaryContainer:"#FFF8E0",onSecondaryContainer:"#1A1A1A",secondaryLight:"#E8C840",success:"#4ade80",onSuccess:"#0D3B70",successContainer:"#bbf7d0",onSuccessContainer:"#166534",successSurface:"#f0fdf4",successDark:"#22c55e",successMuted:"#3d6b56",error:"#BF4B3E",onError:"#ffffff",errorMuted:"#6b4a46",surface:"#ffffff",onSurface:"#1A1A1A",surfaceVariant:"#FFF9F2",onSurfaceVariant:"#5A5550",surfaceContainer:"#F8F6F4",surfaceContainerHigh:"#F0EEEC",background:"#64B5F6",onBackground:"#0A0A0A",outline:"#9E9E9E",outlineVariant:"#D0D0D0",shadow:"rgba(0, 0, 0, 0.28)",shadowLight:"rgba(0, 0, 0, 0.15)",shadowLighter:"rgba(0, 0, 0, 0.10)",shadowSubtle:"rgba(0, 0, 0, 0.08)",shadowFaint:"rgba(0, 0, 0, 0.05)",scrim:"rgba(0, 0, 0, 0.4)",scrimLight:"rgba(0, 0, 0, 0.3)",ripple:"rgba(0, 0, 0, 0.1)",whiteHigh:"rgba(255, 255, 255, 0.9)",whiteMedium:"rgba(255, 255, 255, 0.5)",whiteLow:"rgba(255, 255, 255, 0.4)",whiteHover:"rgba(255, 255, 255, 0.08)",keyboardSurface:"#D5D3D0",keyCharacter:"#ffffff",keyCharacterText:"#1A1A1A",keyDefault:"#B5B2AE",keyDefaultText:"#1A1A1A",keyWrong:"#B5B2AE",keyWrongMuted:"#B5B2AE",keyCorrect:"#0D47A1",keyCorrectMuted:"#0A3A86",keyAccentText:"#ffffff",keyDisabled:"#6E6E6E",keyDisabledText:"#9E9E9E",toggleTrackOn:"rgba(13, 71, 161, 0.5)",toggleTrackOff:"rgba(0, 0, 0, 0.38)",toggleThumbOn:"#0D47A1",toggleThumbOff:"#FAFAFA",toggleHoverOn:"rgba(13, 71, 161, 0.08)",toggleHoverOff:"rgba(0, 0, 0, 0.04)",toggleFocusOn:"rgba(13, 71, 161, 0.12)",toggleFocusOff:"rgba(0, 0, 0, 0.06)",textShadowDark:"#505050",textShadow1:"#E0E0E0",textShadow2:"#D0D0D0",textShadow3:"#B8B8B8",primaryRgb:"13, 71, 161",backgroundRgb:"100, 181, 246",surfaceRgb:"255, 255, 255",primaryDarkerRgb:"8, 48, 107"},An={primary:"#81c784",onPrimary:"#1a4f2e",primaryContainer:"#1b5e20",onPrimaryContainer:"#c8e6c9",primaryDark:"#4caf50",primaryDarker:"#2e7d32",secondary:"#E8C840",onSecondary:"#161616",secondaryContainer:"#2A3A2A",onSecondaryContainer:"#FFF5E0",secondaryLight:"#D4A520",success:"#4ade80",onSuccess:"#166534",successContainer:"#243d2f",onSuccessContainer:"#bbf7d0",successSurface:"#1a3022",successDark:"#4ade80",successMuted:"#22c55e",error:"#f28078",onError:"#161616",errorMuted:"#8b5a55",surface:"#282C28",onSurface:"#eeeeee",surfaceVariant:"#1C201C",onSurfaceVariant:"#d0d0d0",surfaceContainer:"#323632",surfaceContainerHigh:"#3C403C",background:"#0E110E",onBackground:"#eeeeee",outline:"#858885",outlineVariant:"#656865",shadow:"rgba(0, 0, 0, 0.4)",shadowLight:"rgba(0, 0, 0, 0.25)",shadowLighter:"rgba(0, 0, 0, 0.15)",shadowSubtle:"rgba(0, 0, 0, 0.1)",shadowFaint:"rgba(0, 0, 0, 0.06)",scrim:"rgba(0, 0, 0, 0.6)",scrimLight:"rgba(0, 0, 0, 0.45)",ripple:"rgba(255, 255, 255, 0.1)",whiteHigh:"rgba(255, 255, 255, 0.87)",whiteMedium:"rgba(255, 255, 255, 0.5)",whiteLow:"rgba(255, 255, 255, 0.2)",whiteHover:"rgba(255, 255, 255, 0.08)",keyboardSurface:"#1e241e",keyCharacter:"#383e38",keyCharacterText:"#eeeeee",keyDefault:"#2a302a",keyDefaultText:"#d0d0d0",keyWrong:"#2a302a",keyWrongMuted:"#2a302a",keyCorrect:"#4caf50",keyCorrectMuted:"#2e7d32",keyAccentText:"#eeeeee",keyDisabled:"#505050",keyDisabledText:"#6E6E6E",toggleTrackOn:"rgba(129, 199, 132, 0.5)",toggleTrackOff:"rgba(255, 255, 255, 0.3)",toggleThumbOn:"#81c784",toggleThumbOff:"#6E6E6E",toggleHoverOn:"rgba(129, 199, 132, 0.08)",toggleHoverOff:"rgba(255, 255, 255, 0.04)",toggleFocusOn:"rgba(129, 199, 132, 0.12)",toggleFocusOff:"rgba(255, 255, 255, 0.06)",textShadowDark:"#000000",textShadow1:"#2A2A2A",textShadow2:"#161616",textShadow3:"#000000",primaryRgb:"129, 199, 132",backgroundRgb:"14, 17, 14",surfaceRgb:"40, 44, 40",primaryDarkerRgb:"46, 125, 50"};function $a(e){const t=e.replace("#",""),r=parseInt(t.substring(0,2),16),n=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);return`${r}, ${n}, ${i}`}function ja(e){return{spacing:{appStandardPadding:"1rem"},colors:{primary:e.primary,onPrimary:e.onPrimary,primaryContainer:e.primaryContainer,onPrimaryContainer:e.onPrimaryContainer,primaryDark:e.primaryDark,primaryDarker:e.primaryDarker,secondary:e.secondary,onSecondary:e.onSecondary,secondaryContainer:e.secondaryContainer,onSecondaryContainer:e.onSecondaryContainer,secondaryLight:e.secondaryLight,success:e.success,onSuccess:e.onSuccess,successContainer:e.successContainer,onSuccessContainer:e.onSuccessContainer,successSurface:e.successSurface,successDark:e.successDark,successMuted:e.successMuted,error:e.error,onError:e.onError,errorMuted:e.errorMuted,surface:e.surface,onSurface:e.onSurface,surfaceVariant:e.surfaceVariant,onSurfaceVariant:e.onSurfaceVariant,surfaceContainer:e.surfaceContainer,surfaceContainerHigh:e.surfaceContainerHigh,background:e.background,onBackground:e.onBackground,outline:e.outline,outlineVariant:e.outlineVariant,shadow:e.shadow,shadowLight:e.shadowLight,shadowLighter:e.shadowLighter,shadowSubtle:e.shadowSubtle,shadowFaint:e.shadowFaint,scrim:e.scrim,scrimLight:e.scrimLight,ripple:e.ripple,whiteHigh:e.whiteHigh,whiteMedium:e.whiteMedium,whiteLow:e.whiteLow,whiteHover:e.whiteHover,keyboardSurface:e.keyboardSurface,keyCharacter:e.keyCharacter,keyCharacterText:e.keyCharacterText,keyDefault:e.keyDefault,keyDefaultText:e.keyDefaultText,keyWrong:e.keyWrong,keyWrongMuted:e.keyWrongMuted,keyCorrect:e.keyCorrect,keyCorrectMuted:e.keyCorrectMuted,keyAccentText:e.keyAccentText,keyDisabled:e.keyDisabled,keyDisabledText:e.keyDisabledText,toggleTrackOn:e.toggleTrackOn,toggleTrackOff:e.toggleTrackOff,toggleThumbOn:e.toggleThumbOn,toggleThumbOff:e.toggleThumbOff,toggleHoverOn:e.toggleHoverOn,toggleHoverOff:e.toggleHoverOff,toggleFocusOn:e.toggleFocusOn,toggleFocusOff:e.toggleFocusOff,textShadowDark:e.textShadowDark,textShadow1:e.textShadow1,textShadow2:e.textShadow2,textShadow3:e.textShadow3,primaryRgb:e.primaryRgb,backgroundRgb:e.backgroundRgb,surfaceRgb:e.surfaceRgb,primaryDarkerRgb:e.primaryDarkerRgb,primaryLight:e.primaryContainer,backgroundHex:e.background,bottomNavBarBackgroundRgb:e.primaryRgb,settingsBackgroundRgb:e.surfaceRgb,text:e.onSurface},styling:{borderRadiusPixel:32},palette:e}}function Cn(e){return ja(e==="dark"?An:En)}const La=Cn("light");exports.AnimatedText=Ut;exports.AnimatedTextProvider=ns;exports.BackButton=Ts;exports.Badge=Ea;exports.BannerButton=bs;exports.BottomSheet=ba;exports.CircleIconButton=ks;exports.ConfirmDialog=_a;exports.ListItem=Vs;exports.LoadingScreen=so;exports.OptionPicker=wo;exports.Ripple=De;exports.SPRING_COMFORTABLE=Ze;exports.SPRING_COMFORTABLE_SLOW=Fs;exports.SPRING_GENTLE=Us;exports.SPRING_INSTANT=Hs;exports.SPRING_LANDING=qs;exports.SPRING_RESPONSIVE=Ie;exports.SPRING_RISING=Ws;exports.SPRING_SNAPPY=zs;exports.SPRING_STAGGERED=Bs;exports.SPRING_VERY_SLOW=Gs;exports.ToggleSwitch=gn;exports.UnorderedListItemContainer=Ps;exports.ZhuyinKeyboard=yn;exports.buildTheme=Cn;exports.darkPalette=An;exports.hexToRgb=$a;exports.lightPalette=En;exports.rippleAnimation=pn;exports.theme=La;exports.throttle=Pn;exports.useReducedMotion=Ra;exports.useReportPosition=Ia;exports.useRipple=Tn;exports.useViewportSize=Da;exports.ymyStore=Oa;
520
+ `;function Ea({value:e,label:t,variant:r="primary"}){return h.jsxs(Sa,{$variant:r,children:[h.jsx(Ta,{$variant:r,children:e}),t&&h.jsx(Pa,{children:t})]})}const Ca={cardPosition:"transit-to-home"},qt=At.createSlice({name:"navigation",initialState:Ca,reducers:{setCardState:(e,t)=>(e.cardPosition=t.payload.state,e)}}),{setCardState:Na}=qt.actions;qt.reducer;const Aa=At.combineReducers({navigation:qt.reducer}),Oa=At.configureStore({reducer:Aa});function Ra(){const[e,t]=w.useState(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return w.useEffect(()=>{const r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=i=>t(i.matches);return r.addEventListener("change",n),()=>r.removeEventListener("change",n)},[]),e}function Da(e=100){const[t,r]=w.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});return w.useEffect(()=>{let n;const i=()=>{clearTimeout(n),n=setTimeout(()=>{r({width:window.innerWidth,height:window.innerHeight})},e)};return window.addEventListener("resize",i),window.addEventListener("orientationchange",i),()=>{clearTimeout(n),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i)}},[e]),t}function Pn(e,t){let r=0,n=null;const i=(...s)=>{const o=Date.now(),a=o-r;a>=t?(r=o,e(...s)):n||(n=setTimeout(()=>{r=Date.now(),n=null,e(...s)},t-a))};return i.cancel=()=>{n&&(clearTimeout(n),n=null)},i}function Ia(e,t={}){const{enabled:r=!0,includeMargins:n=!0,throttleMs:i=16}=t,s=w.useRef(null),o=w.useRef(null),a=w.useRef(null),l=w.useRef(e);w.useEffect(()=>{l.current=e},[e]);const c=w.useCallback(()=>{if(!s.current||!r)return;const d=s.current.getBoundingClientRect();let f=0,g=0;if(n){const m=getComputedStyle(s.current);f=parseFloat(m.marginTop)||0,g=parseFloat(m.marginBottom)||0}const b={top:d.top-f,left:d.left,width:d.width,height:d.height+f+g,right:d.right,bottom:d.bottom+g,x:d.x,y:d.y-f};if(a.current){const m=Math.abs(b.top-a.current.top),v=Math.abs(b.height-a.current.height),y=Math.abs(b.width-a.current.width);if(m<.5&&v<.5&&y<.5)return}a.current=b,l.current(b)},[r,n]);return w.useEffect(()=>{if(!s.current||!r)return;const d=Pn(c,i),f=requestAnimationFrame(c),g=new ResizeObserver(d);g.observe(s.current),o.current=g;const b=m=>{const v=m.target;v!==document&&v!==document.documentElement||d()};return window.addEventListener("scroll",b,{passive:!0,capture:!0}),window.addEventListener("resize",d),()=>{cancelAnimationFrame(f),g.disconnect(),d.cancel(),window.removeEventListener("scroll",b,{capture:!0}),window.removeEventListener("resize",d)}},[c,r,i]),d=>{s.current=d}}const En={primary:"#2E7D8C",onPrimary:"#ffffff",primaryContainer:"#B2EBF2",onPrimaryContainer:"#1A5C68",primaryDark:"#256A77",primaryDarker:"#1C5561",secondary:"#E8C840",onSecondary:"#1A1A1A",secondaryContainer:"#FFF8E0",onSecondaryContainer:"#1A1A1A",secondaryLight:"#E8C840",success:"#4ade80",onSuccess:"#0D3B70",successContainer:"#bbf7d0",onSuccessContainer:"#166534",successSurface:"#f0fdf4",successDark:"#22c55e",successMuted:"#3d6b56",error:"#BF4B3E",onError:"#ffffff",errorMuted:"#6b4a46",surface:"#ffffff",onSurface:"#1A1A1A",surfaceVariant:"#FFF9F2",onSurfaceVariant:"#5A5550",surfaceContainer:"#F8F6F4",surfaceContainerHigh:"#F0EEEC",background:"#64B5F6",onBackground:"#0A0A0A",outline:"#9E9E9E",outlineVariant:"#D0D0D0",shadow:"rgba(0, 0, 0, 0.28)",shadowLight:"rgba(0, 0, 0, 0.15)",shadowLighter:"rgba(0, 0, 0, 0.10)",shadowSubtle:"rgba(0, 0, 0, 0.08)",shadowFaint:"rgba(0, 0, 0, 0.05)",scrim:"rgba(0, 0, 0, 0.4)",scrimLight:"rgba(0, 0, 0, 0.3)",ripple:"rgba(0, 0, 0, 0.1)",whiteHigh:"rgba(255, 255, 255, 0.9)",whiteMedium:"rgba(255, 255, 255, 0.5)",whiteLow:"rgba(255, 255, 255, 0.4)",whiteHover:"rgba(255, 255, 255, 0.08)",keyboardSurface:"#D5D3D0",keyCharacter:"#ffffff",keyCharacterText:"#1A1A1A",keyDefault:"#B5B2AE",keyDefaultText:"#1A1A1A",keyWrong:"#B5B2AE",keyWrongMuted:"#B5B2AE",keyCorrect:"#2E7D8C",keyCorrectMuted:"#256A77",keyAccentText:"#ffffff",keyDisabled:"#6E6E6E",keyDisabledText:"#9E9E9E",toggleTrackOn:"rgba(46, 125, 140, 0.5)",toggleTrackOff:"rgba(0, 0, 0, 0.38)",toggleThumbOn:"#2E7D8C",toggleThumbOff:"#FAFAFA",toggleHoverOn:"rgba(46, 125, 140, 0.08)",toggleHoverOff:"rgba(0, 0, 0, 0.04)",toggleFocusOn:"rgba(46, 125, 140, 0.12)",toggleFocusOff:"rgba(0, 0, 0, 0.06)",textShadowDark:"#505050",textShadow1:"#E0E0E0",textShadow2:"#D0D0D0",textShadow3:"#B8B8B8",primaryRgb:"46, 125, 140",backgroundRgb:"100, 181, 246",surfaceRgb:"255, 255, 255",primaryDarkerRgb:"28, 85, 97"},Cn={primary:"#81c784",onPrimary:"#1a4f2e",primaryContainer:"#1b5e20",onPrimaryContainer:"#c8e6c9",primaryDark:"#4caf50",primaryDarker:"#2e7d32",secondary:"#E8C840",onSecondary:"#161616",secondaryContainer:"#2A3A2A",onSecondaryContainer:"#FFF5E0",secondaryLight:"#D4A520",success:"#4ade80",onSuccess:"#166534",successContainer:"#243d2f",onSuccessContainer:"#bbf7d0",successSurface:"#1a3022",successDark:"#4ade80",successMuted:"#22c55e",error:"#f28078",onError:"#161616",errorMuted:"#8b5a55",surface:"#282C28",onSurface:"#eeeeee",surfaceVariant:"#1C201C",onSurfaceVariant:"#d0d0d0",surfaceContainer:"#323632",surfaceContainerHigh:"#3C403C",background:"#0E110E",onBackground:"#eeeeee",outline:"#858885",outlineVariant:"#656865",shadow:"rgba(0, 0, 0, 0.4)",shadowLight:"rgba(0, 0, 0, 0.25)",shadowLighter:"rgba(0, 0, 0, 0.15)",shadowSubtle:"rgba(0, 0, 0, 0.1)",shadowFaint:"rgba(0, 0, 0, 0.06)",scrim:"rgba(0, 0, 0, 0.6)",scrimLight:"rgba(0, 0, 0, 0.45)",ripple:"rgba(255, 255, 255, 0.1)",whiteHigh:"rgba(255, 255, 255, 0.87)",whiteMedium:"rgba(255, 255, 255, 0.5)",whiteLow:"rgba(255, 255, 255, 0.2)",whiteHover:"rgba(255, 255, 255, 0.08)",keyboardSurface:"#1e241e",keyCharacter:"#383e38",keyCharacterText:"#eeeeee",keyDefault:"#2a302a",keyDefaultText:"#d0d0d0",keyWrong:"#2a302a",keyWrongMuted:"#2a302a",keyCorrect:"#4caf50",keyCorrectMuted:"#2e7d32",keyAccentText:"#eeeeee",keyDisabled:"#505050",keyDisabledText:"#6E6E6E",toggleTrackOn:"rgba(129, 199, 132, 0.5)",toggleTrackOff:"rgba(255, 255, 255, 0.3)",toggleThumbOn:"#81c784",toggleThumbOff:"#6E6E6E",toggleHoverOn:"rgba(129, 199, 132, 0.08)",toggleHoverOff:"rgba(255, 255, 255, 0.04)",toggleFocusOn:"rgba(129, 199, 132, 0.12)",toggleFocusOff:"rgba(255, 255, 255, 0.06)",textShadowDark:"#000000",textShadow1:"#2A2A2A",textShadow2:"#161616",textShadow3:"#000000",primaryRgb:"129, 199, 132",backgroundRgb:"14, 17, 14",surfaceRgb:"40, 44, 40",primaryDarkerRgb:"46, 125, 50"};function $a(e){const t=e.replace("#",""),r=parseInt(t.substring(0,2),16),n=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);return`${r}, ${n}, ${i}`}function ja(e){return{spacing:{appStandardPadding:"1rem"},colors:{primary:e.primary,onPrimary:e.onPrimary,primaryContainer:e.primaryContainer,onPrimaryContainer:e.onPrimaryContainer,primaryDark:e.primaryDark,primaryDarker:e.primaryDarker,secondary:e.secondary,onSecondary:e.onSecondary,secondaryContainer:e.secondaryContainer,onSecondaryContainer:e.onSecondaryContainer,secondaryLight:e.secondaryLight,success:e.success,onSuccess:e.onSuccess,successContainer:e.successContainer,onSuccessContainer:e.onSuccessContainer,successSurface:e.successSurface,successDark:e.successDark,successMuted:e.successMuted,error:e.error,onError:e.onError,errorMuted:e.errorMuted,surface:e.surface,onSurface:e.onSurface,surfaceVariant:e.surfaceVariant,onSurfaceVariant:e.onSurfaceVariant,surfaceContainer:e.surfaceContainer,surfaceContainerHigh:e.surfaceContainerHigh,background:e.background,onBackground:e.onBackground,outline:e.outline,outlineVariant:e.outlineVariant,shadow:e.shadow,shadowLight:e.shadowLight,shadowLighter:e.shadowLighter,shadowSubtle:e.shadowSubtle,shadowFaint:e.shadowFaint,scrim:e.scrim,scrimLight:e.scrimLight,ripple:e.ripple,whiteHigh:e.whiteHigh,whiteMedium:e.whiteMedium,whiteLow:e.whiteLow,whiteHover:e.whiteHover,keyboardSurface:e.keyboardSurface,keyCharacter:e.keyCharacter,keyCharacterText:e.keyCharacterText,keyDefault:e.keyDefault,keyDefaultText:e.keyDefaultText,keyWrong:e.keyWrong,keyWrongMuted:e.keyWrongMuted,keyCorrect:e.keyCorrect,keyCorrectMuted:e.keyCorrectMuted,keyAccentText:e.keyAccentText,keyDisabled:e.keyDisabled,keyDisabledText:e.keyDisabledText,toggleTrackOn:e.toggleTrackOn,toggleTrackOff:e.toggleTrackOff,toggleThumbOn:e.toggleThumbOn,toggleThumbOff:e.toggleThumbOff,toggleHoverOn:e.toggleHoverOn,toggleHoverOff:e.toggleHoverOff,toggleFocusOn:e.toggleFocusOn,toggleFocusOff:e.toggleFocusOff,textShadowDark:e.textShadowDark,textShadow1:e.textShadow1,textShadow2:e.textShadow2,textShadow3:e.textShadow3,primaryRgb:e.primaryRgb,backgroundRgb:e.backgroundRgb,surfaceRgb:e.surfaceRgb,primaryDarkerRgb:e.primaryDarkerRgb,primaryLight:e.primaryContainer,backgroundHex:e.background,bottomNavBarBackgroundRgb:e.primaryRgb,settingsBackgroundRgb:e.surfaceRgb,text:e.onSurface},styling:{borderRadiusPixel:32},palette:e}}function An(e){return ja(e==="dark"?Cn:En)}const La=An("light");exports.AnimatedText=Ut;exports.AnimatedTextProvider=ns;exports.BackButton=Ts;exports.Badge=Ea;exports.BannerButton=bs;exports.BottomSheet=ba;exports.CircleIconButton=ks;exports.ConfirmDialog=_a;exports.ListItem=Vs;exports.LoadingScreen=so;exports.OptionPicker=wo;exports.Ripple=De;exports.SPRING_COMFORTABLE=Ze;exports.SPRING_COMFORTABLE_SLOW=Fs;exports.SPRING_GENTLE=Us;exports.SPRING_INSTANT=Hs;exports.SPRING_LANDING=qs;exports.SPRING_RESPONSIVE=Ie;exports.SPRING_RISING=Ws;exports.SPRING_SNAPPY=zs;exports.SPRING_STAGGERED=Bs;exports.SPRING_VERY_SLOW=Gs;exports.ToggleSwitch=gn;exports.UnorderedListItemContainer=Ps;exports.ZhuyinKeyboard=yn;exports.buildTheme=An;exports.darkPalette=Cn;exports.hexToRgb=$a;exports.lightPalette=En;exports.rippleAnimation=pn;exports.theme=La;exports.throttle=Pn;exports.useReducedMotion=Ra;exports.useReportPosition=Ia;exports.useRipple=Tn;exports.useViewportSize=Da;exports.ymyStore=Oa;