@functionalui/functionalui 0.1.0 → 0.1.1

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.
package/dist/main.cjs CHANGED
@@ -1,3 +1,3 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),E=require("react"),In=require("react-dom"),r=require("./types-B-Wi5X54.cjs");function vi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ue=vi(E);var xn=it(),z=e=>st(e,xn),Rn=it();z.write=e=>st(e,Rn);var vt=it();z.onStart=e=>st(e,vt);var wn=it();z.onFrame=e=>st(e,wn);var Nn=it();z.onFinish=e=>st(e,Nn);var De=[];z.setTimeout=(e,t)=>{const n=z.now()+t,s=()=>{const o=De.findIndex(a=>a.cancel==s);~o&&De.splice(o,1),Oe-=~o?1:0},i={time:n,handler:e,cancel:s};return De.splice(ts(n),0,i),Oe+=1,ns(),i};var ts=e=>~(~De.findIndex(t=>t.time>e)||~De.length);z.cancel=e=>{vt.delete(e),wn.delete(e),Nn.delete(e),xn.delete(e),Rn.delete(e)};z.sync=e=>{fn=!0,z.batchedUpdates(e),fn=!1};z.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function s(...i){t=i,z.onStart(n)}return s.handler=e,s.cancel=()=>{vt.delete(n),t=null},s};var Dn=typeof window<"u"?window.requestAnimationFrame:()=>{};z.use=e=>Dn=e;z.now=typeof performance<"u"?()=>performance.now():Date.now;z.batchedUpdates=e=>e();z.catch=console.error;z.frameLoop="always";z.advance=()=>{z.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):ss()};var Ce=-1,Oe=0,fn=!1;function st(e,t){fn?(t.delete(e),e(0)):(t.add(e),ns())}function ns(){Ce<0&&(Ce=0,z.frameLoop!=="demand"&&Dn(rs))}function bi(){Ce=-1}function rs(){~Ce&&(Dn(rs),z.batchedUpdates(ss))}function ss(){const e=Ce;Ce=z.now();const t=ts(Ce);if(t&&(is(De.splice(0,t),n=>n.handler()),Oe-=t),!Oe){bi();return}vt.flush(),xn.flush(e?Math.min(64,Ce-e):16.667),wn.flush(),Rn.flush(),Nn.flush()}function it(){let e=new Set,t=e;return{add(n){Oe+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Oe-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Oe-=t.size,is(t,s=>s(n)&&e.add(s)),Oe+=e.size,t=e)}}}function is(e,t){e.forEach(n=>{try{t(n)}catch(s){z.catch(s)}})}var Ii=Object.defineProperty,xi=(e,t)=>{for(var n in t)Ii(e,n,{get:t[n],enumerable:!0})},de={};xi(de,{assign:()=>wi,colors:()=>Le,createStringInterpolator:()=>Mn,skipAnimation:()=>as,to:()=>os,willAdvance:()=>Pn});function dn(){}var Ri=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),v={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 Ee(e,t){if(v.arr(e)){if(!v.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var F=(e,t)=>e.forEach(t);function pe(e,t,n){if(v.arr(e)){for(let s=0;s<e.length;s++)t.call(n,e[s],`${s}`);return}for(const s in e)e.hasOwnProperty(s)&&t.call(n,e[s],s)}var ee=e=>v.und(e)?[]:v.arr(e)?e:[e];function He(e,t){if(e.size){const n=Array.from(e);e.clear(),F(n,t)}}var Ge=(e,...t)=>He(e,n=>n(...t)),jn=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Mn,os,Le=null,as=!1,Pn=dn,wi=e=>{e.to&&(os=e.to),e.now&&(z.now=e.now),e.colors!==void 0&&(Le=e.colors),e.skipAnimation!=null&&(as=e.skipAnimation),e.createStringInterpolator&&(Mn=e.createStringInterpolator),e.requestAnimationFrame&&z.use(e.requestAnimationFrame),e.batchedUpdates&&(z.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Pn=e.willAdvance),e.frameLoop&&(z.frameLoop=e.frameLoop)},$e=new Set,ce=[],Gt=[],Tt=0,bt={get idle(){return!$e.size&&!ce.length},start(e){Tt>e.priority?($e.add(e),z.onStart(Ni)):(cs(e),z(hn))},advance:hn,sort(e){if(Tt)z.onFrame(()=>bt.sort(e));else{const t=ce.indexOf(e);~t&&(ce.splice(t,1),us(e))}},clear(){ce=[],$e.clear()}};function Ni(){$e.forEach(cs),$e.clear(),z(hn)}function cs(e){ce.includes(e)||us(e)}function us(e){ce.splice(Di(ce,t=>t.priority>e.priority),0,e)}function hn(e){const t=Gt;for(let n=0;n<ce.length;n++){const s=ce[n];Tt=s.priority,s.idle||(Pn(s),s.advance(e),s.idle||t.push(s))}return Tt=0,Gt=ce,Gt.length=0,ce=t,ce.length>0}function Di(e,t){const n=e.findIndex(t);return n<0?e.length:n}var ji=(e,t,n)=>Math.min(Math.max(n,e),t),Mi={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},fe="[-+]?\\d*\\.?\\d+",yt=fe+"%";function It(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Pi=new RegExp("rgb"+It(fe,fe,fe)),ki=new RegExp("rgba"+It(fe,fe,fe,fe)),Fi=new RegExp("hsl"+It(fe,yt,yt)),Bi=new RegExp("hsla"+It(fe,yt,yt,fe)),zi=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Gi=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ui=/^#([0-9a-fA-F]{6})$/,Hi=/^#([0-9a-fA-F]{8})$/;function $i(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ui.exec(e))?parseInt(t[1]+"ff",16)>>>0:Le&&Le[e]!==void 0?Le[e]:(t=Pi.exec(e))?(Re(t[1])<<24|Re(t[2])<<16|Re(t[3])<<8|255)>>>0:(t=ki.exec(e))?(Re(t[1])<<24|Re(t[2])<<16|Re(t[3])<<8|nr(t[4]))>>>0:(t=zi.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Hi.exec(e))?parseInt(t[1],16)>>>0:(t=Gi.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Fi.exec(e))?(er(tr(t[1]),lt(t[2]),lt(t[3]))|255)>>>0:(t=Bi.exec(e))?(er(tr(t[1]),lt(t[2]),lt(t[3]))|nr(t[4]))>>>0:null}function Ut(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function er(e,t,n){const s=n<.5?n*(1+t):n+t-n*t,i=2*n-s,o=Ut(i,s,e+1/3),a=Ut(i,s,e),l=Ut(i,s,e-1/3);return Math.round(o*255)<<24|Math.round(a*255)<<16|Math.round(l*255)<<8}function Re(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function tr(e){return(parseFloat(e)%360+360)%360/360}function nr(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function lt(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function rr(e){let t=$i(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,s=(t&16711680)>>>16,i=(t&65280)>>>8,o=(t&255)/255;return`rgba(${n}, ${s}, ${i}, ${o})`}var We=(e,t,n)=>{if(v.fun(e))return e;if(v.arr(e))return We({range:e,output:t,extrapolate:n});if(v.str(e.output[0]))return Mn(e);const s=e,i=s.output,o=s.range||[0,1],a=s.extrapolateLeft||s.extrapolate||"extend",l=s.extrapolateRight||s.extrapolate||"extend",c=s.easing||(u=>u);return u=>{const f=Yi(u,o);return Zi(u,o[f],o[f+1],i[f],i[f+1],c,a,l,s.map)}};function Zi(e,t,n,s,i,o,a,l,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>n){if(l==="identity")return u;l==="clamp"&&(u=n)}return s===i?s:t===n?e<=t?s:i:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=o(u),s===-1/0?u=-u:i===1/0?u=u+s:u=u*(i-s)+s,u)}function Yi(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Vi=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const s=n*e,i=t==="end"?Math.floor(s):Math.ceil(s);return ji(0,1,i/e)},At=1.70158,ft=At*1.525,sr=At+1,ir=2*Math.PI/3,or=2*Math.PI/4.5,dt=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Xi={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>sr*e*e*e-At*e*e,easeOutBack:e=>1+sr*Math.pow(e-1,3)+At*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ft+1)*2*e-ft)/2:(Math.pow(2*e-2,2)*((ft+1)*(e*2-2)+ft)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*ir),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*ir)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*or))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*or)/2+1,easeInBounce:e=>1-dt(1-e),easeOutBounce:dt,easeInOutBounce:e=>e<.5?(1-dt(1-2*e))/2:(1+dt(2*e-1))/2,steps:Vi},qe=Symbol.for("FluidValue.get"),Me=Symbol.for("FluidValue.observers"),oe=e=>!!(e&&e[qe]),re=e=>e&&e[qe]?e[qe]():e,ar=e=>e[Me]||null;function Wi(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Ke(e,t){const n=e[Me];n&&n.forEach(s=>{Wi(s,t)})}var ls=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");qi(this,e)}},qi=(e,t)=>fs(e,qe,t);function Pe(e,t){if(e[qe]){let n=e[Me];n||fs(e,Me,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Qe(e,t){const n=e[Me];if(n&&n.has(t)){const s=n.size-1;s?n.delete(t):e[Me]=null,e.observerRemoved&&e.observerRemoved(s,t)}}var fs=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),gt=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ki=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,cr=new RegExp(`(${gt.source})(%|[a-z]+)`,"i"),Qi=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,xt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ds=e=>{const[t,n]=Ji(e);if(!t||jn())return e;const s=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(s)return s.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&xt.test(n))return ds(n);if(n)return n}return e},Ji=e=>{const t=xt.exec(e);if(!t)return[,];const[,n,s]=t;return[n,s]},Ht,eo=(e,t,n,s,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(s)}, ${i})`,hs=e=>{Ht||(Ht=Le?new RegExp(`(${Object.keys(Le).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(o=>re(o).replace(xt,ds).replace(Ki,rr).replace(Ht,rr)),n=t.map(o=>o.match(gt).map(Number)),i=n[0].map((o,a)=>n.map(l=>{if(!(a in l))throw Error('The arity of each "output" value must be equal');return l[a]})).map(o=>We({...e,output:o}));return o=>{var c;const a=!cr.test(t[0])&&((c=t.find(u=>cr.test(u)))==null?void 0:c.replace(gt,""));let l=0;return t[0].replace(gt,()=>`${i[l++](o)}${a||""}`).replace(Qi,eo)}},kn="react-spring: ",Ss=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${kn}once requires a function parameter`);return(...s)=>{n||(t(...s),n=!0)}},to=Ss(console.warn);function no(){to(`${kn}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var ro=Ss(console.warn);function so(){ro(`${kn}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 Rt(e){return v.str(e)&&(e[0]=="#"||/\d/.test(e)||!jn()&&xt.test(e)||e in(Le||{}))}var be=jn()?E.useEffect:E.useLayoutEffect,io=()=>{const e=E.useRef(!1);return be(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Fn(){const e=E.useState()[1],t=io();return()=>{t.current&&e(Math.random())}}var Bn=e=>E.useEffect(e,oo),oo=[];function Sn(e){const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e}),t.current}var Je=Symbol.for("Animated:node"),ao=e=>!!e&&e[Je]===e,_e=e=>e&&e[Je],zn=(e,t)=>Ri(e,Je,t),wt=e=>e&&e[Je]&&e[Je].getPayload(),_s=class{constructor(){zn(this,this)}getPayload(){return this.payload||[]}},Nt=class ps extends _s{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,v.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new ps(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,n){return v.num(t)&&(this.lastPosition=t,n&&(t=Math.round(t/n)*n,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,v.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Ct=class gs extends Nt{constructor(t){super(0),this._string=null,this._toString=We({output:[t,t]})}static create(t){return new gs(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(v.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=We({output:[this.getValue(),t]})),this._value=0,super.reset()}},Ot={dependencies:null},Dt=class extends _s{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return pe(this.source,(n,s)=>{ao(n)?t[s]=n.getValue(e):oe(n)?t[s]=re(n):e||(t[s]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&F(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return pe(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ot.dependencies&&oe(e)&&Ot.dependencies.add(e);const t=wt(e);t&&F(t,n=>this.add(n))}},co=class ms extends Dt{constructor(t){super(t)}static create(t){return new ms(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const n=this.getPayload();return t.length==n.length?n.map((s,i)=>s.setValue(t[i])).some(Boolean):(super.setValue(t.map(uo)),!0)}};function uo(e){return(Rt(e)?Ct:Nt).create(e)}function _n(e){const t=_e(e);return t?t.constructor:v.arr(e)?co:Rt(e)?Ct:Nt}var ur=(e,t)=>{const n=!v.fun(e)||e.prototype&&e.prototype.isReactComponent;return E.forwardRef((s,i)=>{const o=E.useRef(null),a=n&&E.useCallback(p=>{o.current=ho(i,p)},[i]),[l,c]=fo(s,t),u=Fn(),f=()=>{const p=o.current;if(n&&!p)return;(p?t.applyAnimatedValues(p,l.getValue(!0)):!1)===!1&&u()},S=new lo(f,c),d=E.useRef(void 0);be(()=>(d.current=S,F(c,p=>Pe(p,S)),()=>{d.current&&(F(d.current.deps,p=>Qe(p,d.current)),z.cancel(d.current.update))})),E.useEffect(f,[]),Bn(()=>()=>{const p=d.current;F(p.deps,g=>Qe(g,p))});const _=t.getComponentProps(l.getValue());return Ue.createElement(e,{..._,ref:a})})},lo=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&z.write(this.update)}};function fo(e,t){const n=new Set;return Ot.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Dt(e),Ot.dependencies=null,[e,n]}function ho(e,t){return e&&(v.fun(e)?e(t):e.current=t),t}var lr=Symbol.for("AnimatedComponent"),So=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Dt(i),getComponentProps:s=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:s},o=a=>{const l=fr(a)||"Anonymous";return v.str(a)?a=o[a]||(o[a]=ur(a,i)):a=a[lr]||(a[lr]=ur(a,i)),a.displayName=`Animated(${l})`,a};return pe(e,(a,l)=>{v.arr(e)&&(l=fr(a)),o[l]=o(a)}),{animated:o}},fr=e=>v.str(e)?e:e&&v.str(e.displayName)?e.displayName:v.fun(e)&&e.name||null;function se(e,...t){return v.fun(e)?e(...t):e}var Ze=(e,t)=>e===!0||!!(t&&e&&(v.fun(e)?e(t):ee(e).includes(t))),Es=(e,t)=>v.obj(e)?t&&e[t]:e,Ts=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,_o=e=>e,jt=(e,t=_o)=>{let n=po;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const s={};for(const i of n){const o=t(e[i],i);v.und(o)||(s[i]=o)}return s},po=["config","onProps","onStart","onChange","onPause","onResume","onRest"],go={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 mo(e){const t={};let n=0;if(pe(e,(s,i)=>{go[i]||(t[i]=s,n++)}),n)return t}function Gn(e){const t=mo(e);if(t){const n={to:t};return pe(e,(s,i)=>i in t||(n[i]=s)),n}return{...e}}function et(e){return e=re(e),v.arr(e)?e.map(et):Rt(e)?de.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function ys(e){for(const t in e)return!0;return!1}function pn(e){return v.fun(e)||v.arr(e)&&v.obj(e[0])}function gn(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function As(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Un={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},mn={...Un.default,mass:1,damping:1,easing:Xi.linear,clamp:!1},Eo=class{constructor(){this.velocity=0,Object.assign(this,mn)}};function To(e,t,n){n&&(n={...n},dr(n,t),t={...n,...t}),dr(e,t),Object.assign(e,t);for(const a in mn)e[a]==null&&(e[a]=mn[a]);let{frequency:s,damping:i}=e;const{mass:o}=e;return v.und(s)||(s<.01&&(s=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/s,2)*o,e.friction=4*Math.PI*i*o/s),e}function dr(e,t){if(!v.und(t.decay))e.duration=void 0;else{const n=!v.und(t.tension)||!v.und(t.friction);(n||!v.und(t.frequency)||!v.und(t.damping)||!v.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var hr=[],yo=class{constructor(){this.changed=!1,this.values=hr,this.toValues=null,this.fromValues=hr,this.config=new Eo,this.immediate=!1}};function Cs(e,{key:t,props:n,defaultProps:s,state:i,actions:o}){return new Promise((a,l)=>{let c,u,f=Ze(n.cancel??(s==null?void 0:s.cancel),t);if(f)_();else{v.und(n.pause)||(i.paused=Ze(n.pause,t));let p=s==null?void 0:s.pause;p!==!0&&(p=i.paused||Ze(p,t)),c=se(n.delay||0,t),p?(i.resumeQueue.add(d),o.pause()):(o.resume(),d())}function S(){i.resumeQueue.add(d),i.timeouts.delete(u),u.cancel(),c=u.time-z.now()}function d(){c>0&&!de.skipAnimation?(i.delayed=!0,u=z.setTimeout(_,c),i.pauseQueue.add(S),i.timeouts.add(u)):_()}function _(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(S),i.timeouts.delete(u),e<=(i.cancelId||0)&&(f=!0);try{o.start({...n,callId:e,cancel:f},a)}catch(p){l(p)}}})}var Hn=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?je(e.get()):t.every(n=>n.noop)?Os(e.get()):le(e.get(),t.every(n=>n.finished)),Os=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),le=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),je=e=>({value:e,cancelled:!0,finished:!1});function Ls(e,t,n,s){const{callId:i,parentId:o,onRest:a}=t,{asyncTo:l,promise:c}=n;return!o&&e===l&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const u=jt(t,(m,T)=>T==="onRest"?void 0:m);let f,S;const d=new Promise((m,T)=>(f=m,S=T)),_=m=>{const T=i<=(n.cancelId||0)&&je(s)||i!==n.asyncId&&le(s,!1);if(T)throw m.result=T,S(m),m},p=(m,T)=>{const C=new Sr,O=new _r;return(async()=>{if(de.skipAnimation)throw tt(n),O.result=le(s,!1),S(O),O;_(C);const b=v.obj(m)?{...m}:{...T,to:m};b.parentId=i,pe(u,(R,N)=>{v.und(b[N])&&(b[N]=R)});const L=await s.start(b);return _(C),n.paused&&await new Promise(R=>{n.resumeQueue.add(R)}),L})()};let g;if(de.skipAnimation)return tt(n),le(s,!1);try{let m;v.arr(e)?m=(async T=>{for(const C of T)await p(C)})(e):m=Promise.resolve(e(p,s.stop.bind(s))),await Promise.all([m.then(f),d]),g=le(s.get(),!0,!1)}catch(m){if(m instanceof Sr)g=m.result;else if(m instanceof _r)g=m.result;else throw m}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?l:void 0,n.promise=o?c:void 0)}return v.fun(a)&&z.batchedUpdates(()=>{a(g,s,s.item)}),g})()}function tt(e,t){He(e.timeouts,n=>n.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.")}},_r=class extends Error{constructor(){super("SkipAnimationSignal")}},En=e=>e instanceof $n,Ao=1,$n=class extends ls{constructor(){super(...arguments),this.id=Ao++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=_e(this);return e&&e.getValue()}to(...e){return de.to(this,e)}interpolate(...e){return no(),de.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){Ke(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||bt.sort(this),Ke(this,{type:"priority",parent:this,priority:e})}},Ie=Symbol.for("SpringPhase"),vs=1,bs=2,Is=4,$t=e=>(e[Ie]&vs)>0,Ae=e=>(e[Ie]&bs)>0,Fe=e=>(e[Ie]&Is)>0,pr=(e,t)=>t?e[Ie]|=bs|vs:e[Ie]&=-3,gr=(e,t)=>t?e[Ie]|=Is:e[Ie]&=-5,Co=class extends $n{constructor(e,t){if(super(),this.animation=new yo,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,!v.und(e)||!v.und(t)){const n=v.obj(e)?{...e}:{...t,from:e};v.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ae(this)||this._state.asyncTo)||Fe(this)}get goal(){return re(this.animation.to)}get velocity(){const e=_e(this);return e instanceof Nt?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return $t(this)}get isAnimating(){return Ae(this)}get isPaused(){return Fe(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const s=this.animation;let{toValues:i}=s;const{config:o}=s,a=wt(s.to);!a&&oe(s.to)&&(i=ee(re(s.to))),s.values.forEach((u,f)=>{if(u.done)return;const S=u.constructor==Ct?1:a?a[f].lastPosition:i[f];let d=s.immediate,_=S;if(!d){if(_=u.lastPosition,o.tension<=0){u.done=!0;return}let p=u.elapsedTime+=e;const g=s.fromValues[f],m=u.v0!=null?u.v0:u.v0=v.arr(o.velocity)?o.velocity[f]:o.velocity;let T;const C=o.precision||(g==S?.005:Math.min(1,Math.abs(S-g)*.001));if(v.und(o.duration))if(o.decay){const O=o.decay===!0?.998:o.decay,b=Math.exp(-(1-O)*p);_=g+m/(1-O)*(1-b),d=Math.abs(u.lastPosition-_)<=C,T=m*b}else{T=u.lastVelocity==null?m:u.lastVelocity;const O=o.restVelocity||C/10,b=o.clamp?0:o.bounce,L=!v.und(b),R=g==S?u.v0>0:g<S;let N,j=!1;const M=1,P=Math.ceil(e/M);for(let D=0;D<P&&(N=Math.abs(T)>O,!(!N&&(d=Math.abs(S-_)<=C,d)));++D){L&&(j=_==S||_>S==R,j&&(T=-T*b,_=S));const G=-o.tension*1e-6*(_-S),H=-o.friction*.001*T,x=(G+H)/o.mass;T=T+x*M,_=_+T*M}}else{let O=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,u.durationProgress>0&&(u.elapsedTime=o.duration*u.durationProgress,p=u.elapsedTime+=e)),O=(o.progress||0)+p/this._memoizedDuration,O=O>1?1:O<0?0:O,u.durationProgress=O),_=g+o.easing(O)*(S-g),T=(_-u.lastPosition)/e,d=O==1}u.lastVelocity=T,Number.isNaN(_)&&(console.warn("Got NaN while animating:",this),d=!0)}a&&!a[f].done&&(d=!1),d?u.done=!0:t=!1,u.setValue(_,o.round)&&(n=!0)});const l=_e(this),c=l.getValue();if(t){const u=re(s.to);(c!==u||n)&&!o.decay?(l.setValue(u),this._onChange(u)):n&&o.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return z.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ae(this)){const{to:e,config:t}=this.animation;z.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 n;return v.und(e)?(n=this.queue||[],this.queue=[]):n=[v.obj(e)?e:{...t,to:e}],Promise.all(n.map(s=>this._update(s))).then(s=>Hn(this,s))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),tt(this._state,e&&this._lastCallId),z.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:n,from:s}=e;n=v.obj(n)?n[t]:n,(n==null||pn(n))&&(n=void 0),s=v.obj(s)?s[t]:s,s==null&&(s=void 0);const i={to:n,from:s};return $t(this)||(e.reverse&&([n,s]=[s,n]),s=re(s),v.und(s)?_e(this)||this._set(n):this._set(s)),i}_update({...e},t){const{key:n,defaultProps:s}=this;e.default&&Object.assign(s,jt(e,(a,l)=>/^on/.test(l)?Es(a,n):a)),Er(this,e,"onProps"),ze(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 o=this._state;return Cs(++this._lastCallId,{key:n,props:e,defaultProps:s,state:o,actions:{pause:()=>{Fe(this)||(gr(this,!0),Ge(o.pauseQueue),ze(this,"onPause",le(this,Be(this,this.animation.to)),this))},resume:()=>{Fe(this)&&(gr(this,!1),Ae(this)&&this._resume(),Ge(o.resumeQueue),ze(this,"onResume",le(this,Be(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const l=xs(e);if(l)return this._update(l,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(je(this));const s=!v.und(e.to),i=!v.und(e.from);if(s||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(je(this));const{key:o,defaultProps:a,animation:l}=this,{to:c,from:u}=l;let{to:f=c,from:S=u}=e;i&&!s&&(!t.default||v.und(f))&&(f=S),t.reverse&&([f,S]=[S,f]);const d=!Ee(S,u);d&&(l.from=S),S=re(S);const _=!Ee(f,c);_&&this._focus(f);const p=pn(t.to),{config:g}=l,{decay:m,velocity:T}=g;(s||i)&&(g.velocity=0),t.config&&!p&&To(g,se(t.config,o),t.config!==a.config?se(a.config,o):void 0);let C=_e(this);if(!C||v.und(f))return n(le(this,!0));const O=v.und(t.reset)?i&&!t.default:!v.und(S)&&Ze(t.reset,o),b=O?S:this.get(),L=et(f),R=v.num(L)||v.arr(L)||Rt(L),N=!p&&(!R||Ze(a.immediate||t.immediate,o));if(_){const D=_n(f);if(D!==C.constructor)if(N)C=this._set(L);else throw Error(`Cannot animate between ${C.constructor.name} and ${D.name}, as the "to" prop suggests`)}const j=C.constructor;let M=oe(f),P=!1;if(!M){const D=O||!$t(this)&&d;(_||D)&&(P=Ee(et(b),L),M=!P),(!Ee(l.immediate,N)&&!N||!Ee(g.decay,m)||!Ee(g.velocity,T))&&(M=!0)}if(P&&Ae(this)&&(l.changed&&!O?M=!0:M||this._stop(c)),!p&&((M||oe(c))&&(l.values=C.getPayload(),l.toValues=oe(f)?null:j==Ct?[1]:ee(L)),l.immediate!=N&&(l.immediate=N,!N&&!O&&this._set(c)),M)){const{onRest:D}=l;F(Lo,H=>Er(this,t,H));const G=le(this,Be(this,c));Ge(this._pendingCalls,G),this._pendingCalls.add(n),l.changed&&z.batchedUpdates(()=>{var H;l.changed=!O,D==null||D(G,this),O?se(a.onRest,G):(H=l.onStart)==null||H.call(l,G,this)})}O&&this._set(b),p?n(Ls(t.to,t,this._state,this)):M?this._start():Ae(this)&&!_?this._pendingCalls.add(n):n(Os(b))}_focus(e){const t=this.animation;e!==t.to&&(ar(this)&&this._detach(),t.to=e,ar(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;oe(t)&&(Pe(t,this),En(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;oe(e)&&Qe(e,this)}_set(e,t=!0){const n=re(e);if(!v.und(n)){const s=_e(this);if(!s||!Ee(n,s.getValue())){const i=_n(n);!s||s.constructor!=i?zn(this,i.create(n)):s.setValue(n),s&&z.batchedUpdates(()=>{this._onChange(n,t)})}}return _e(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,ze(this,"onStart",le(this,Be(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),se(this.animation.onChange,e,this)),se(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;_e(this).reset(re(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Ae(this)||(pr(this,!0),Fe(this)||this._resume())}_resume(){de.skipAnimation?this.finish():bt.start(this)}_stop(e,t){if(Ae(this)){pr(this,!1);const n=this.animation;F(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ke(this,{type:"idle",parent:this});const s=t?je(this.get()):le(this.get(),Be(this,e??n.to));Ge(this._pendingCalls,s),n.changed&&(n.changed=!1,ze(this,"onRest",s,this))}}};function Be(e,t){const n=et(t),s=et(e.get());return Ee(s,n)}function xs(e,t=e.loop,n=e.to){const s=se(t);if(s){const i=s!==!0&&Gn(s),o=(i||e).reverse,a=!i||i.reset;return nt({...e,loop:t,default:!1,pause:void 0,to:!o||pn(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function nt(e){const{to:t,from:n}=e=Gn(e),s=new Set;return v.obj(t)&&mr(t,s),v.obj(n)&&mr(n,s),e.keys=s.size?Array.from(s):null,e}function Oo(e){const t=nt(e);return v.und(t.default)&&(t.default=jt(t)),t}function mr(e,t){pe(e,(n,s)=>n!=null&&t.add(s))}var Lo=["onStart","onRest","onChange","onPause","onResume"];function Er(e,t,n){e.animation[n]=t[n]!==Ts(t,n)?Es(t[n],e.key):void 0}function ze(e,t,...n){var s,i,o,a;(i=(s=e.animation)[t])==null||i.call(s,...n),(a=(o=e.defaultProps)[t])==null||a.call(o,...n)}var vo=["onStart","onChange","onRest"],bo=1,Rs=class{constructor(t,n){this.id=bo++,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),n&&(this._flush=n),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((n,s)=>t[s]=n.get()),t}set(t){for(const n in t){const s=t[n];v.und(s)||this.springs[n].set(s)}}update(t){return t&&this.queue.push(nt(t)),this}start(t){let{queue:n}=this;return t?n=ee(t).map(nt):this.queue=[],this._flush?this._flush(this,n):(Ms(this,n),Tn(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const s=this.springs;F(ee(n),i=>s[i].stop(!!t))}else tt(this._state,this._lastAsyncId),this.each(s=>s.stop(!!t));return this}pause(t){if(v.und(t))this.start({pause:!0});else{const n=this.springs;F(ee(t),s=>n[s].pause())}return this}resume(t){if(v.und(t))this.start({pause:!1});else{const n=this.springs;F(ee(t),s=>n[s].resume())}return this}each(t){pe(this.springs,t)}_onFrame(){const{onStart:t,onChange:n,onRest:s}=this._events,i=this._active.size>0,o=this._changed.size>0;(i&&!this._started||o&&!this._started)&&(this._started=!0,He(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const a=!i&&this._started,l=o||a&&s.size?this.get():null;o&&n.size&&He(n,([c,u])=>{u.value=l,c(u,this,this._item)}),a&&(this._started=!1,He(s,([c,u])=>{u.value=l,c(u,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;z.onFrame(this._onFrame)}};function Tn(e,t){return Promise.all(t.map(n=>ws(e,n))).then(n=>Hn(e,n))}async function ws(e,t,n){const{keys:s,to:i,from:o,loop:a,onRest:l,onResolve:c}=t,u=v.obj(t.default)&&t.default;a&&(t.loop=!1),i===!1&&(t.to=null),o===!1&&(t.from=null);const f=v.arr(i)||v.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):F(vo,g=>{const m=t[g];if(v.fun(m)){const T=e._events[g];t[g]=({finished:C,cancelled:O})=>{const b=T.get(m);b?(C||(b.finished=!1),O&&(b.cancelled=!0)):T.set(m,{value:null,finished:C||!1,cancelled:O||!1})},u&&(u[g]=t[g])}});const S=e._state;t.pause===!S.paused?(S.paused=t.pause,Ge(t.pause?S.pauseQueue:S.resumeQueue)):S.paused&&(t.pause=!0);const d=(s||Object.keys(e.springs)).map(g=>e.springs[g].start(t)),_=t.cancel===!0||Ts(t,"cancel")===!0;(f||_&&S.asyncId)&&d.push(Cs(++e._lastAsyncId,{props:t,state:S,actions:{pause:dn,resume:dn,start(g,m){_?(tt(S,e._lastAsyncId),m(je(e))):(g.onRest=l,m(Ls(f,g,S,e)))}}})),S.paused&&await new Promise(g=>{S.resumeQueue.add(g)});const p=Hn(e,await Promise.all(d));if(a&&p.finished&&!(n&&p.noop)){const g=xs(t,a,i);if(g)return Ms(e,[g]),ws(e,g,!0)}return c&&z.batchedUpdates(()=>c(p,e,e.item)),p}function yn(e,t){const n={...e.springs};return t&&F(ee(t),s=>{v.und(s.keys)&&(s=nt(s)),v.obj(s.to)||(s={...s,to:void 0}),js(n,s,i=>Ds(i))}),Ns(e,n),n}function Ns(e,t){pe(t,(n,s)=>{e.springs[s]||(e.springs[s]=n,Pe(n,e))})}function Ds(e,t){const n=new Co;return n.key=e,t&&Pe(n,t),n}function js(e,t,n){t.keys&&F(t.keys,s=>{(e[s]||(e[s]=n(s)))._prepareNode(t)})}function Ms(e,t){F(t,n=>{js(e.springs,n,s=>Ds(s,e))})}var Ps=Ue.createContext({pause:!1,immediate:!1}),ks=()=>{const e=[],t=function(s){so();const i=[];return F(e,(o,a)=>{if(v.und(s))i.push(o.start());else{const l=n(s,o,a);l&&i.push(o.start(l))}}),i};t.current=e,t.add=function(s){e.includes(s)||e.push(s)},t.delete=function(s){const i=e.indexOf(s);~i&&e.splice(i,1)},t.pause=function(){return F(e,s=>s.pause(...arguments)),this},t.resume=function(){return F(e,s=>s.resume(...arguments)),this},t.set=function(s){F(e,(i,o)=>{const a=v.fun(s)?s(o,i):s;a&&i.set(a)})},t.start=function(s){const i=[];return F(e,(o,a)=>{if(v.und(s))i.push(o.start());else{const l=this._getProps(s,o,a);l&&i.push(o.start(l))}}),i},t.stop=function(){return F(e,s=>s.stop(...arguments)),this},t.update=function(s){return F(e,(i,o)=>i.update(this._getProps(s,i,o))),this};const n=function(s,i,o){return v.fun(s)?s(o,i):s};return t._getProps=n,t};function Zn(e,t,n){const s=v.fun(t)&&t;s&&!n&&(n=[]);const i=E.useMemo(()=>s||arguments.length==3?ks():void 0,[]),o=E.useRef(0),a=Fn(),l=E.useMemo(()=>({ctrls:[],queue:[],flush(T,C){const O=yn(T,C);return o.current>0&&!l.queue.length&&!Object.keys(O).some(L=>!T.springs[L])?Tn(T,C):new Promise(L=>{Ns(T,O),l.queue.push(()=>{L(Tn(T,C))}),a()})}}),[]),c=E.useRef([...l.ctrls]),u=E.useRef([]),f=Sn(e)||0;E.useMemo(()=>{F(c.current.slice(e,f),T=>{gn(T,i),T.stop(!0)}),c.current.length=e,S(f,e)},[e]),E.useMemo(()=>{S(0,Math.min(f,e))},n);function S(T,C){for(let O=T;O<C;O++){const b=c.current[O]||(c.current[O]=new Rs(null,l.flush)),L=s?s(O,b):t[O];L&&(u.current[O]=Oo(L))}}const d=c.current.map((T,C)=>yn(T,u.current[C])),_=E.useContext(Ps),p=Sn(_),g=_!==p&&ys(_);be(()=>{o.current++,l.ctrls=c.current;const{queue:T}=l;T.length&&(l.queue=[],F(T,C=>C())),F(c.current,(C,O)=>{i==null||i.add(C),g&&C.start({default:_});const b=u.current[O];b&&(As(C,b.ref),C.ref?C.queue.push(b):C.start(b))})}),Bn(()=>()=>{F(l.ctrls,T=>T.stop(!0))});const m=d.map(T=>({...T}));return i?[m,i]:m}function W(e,t){const n=v.fun(e),[[s],i]=Zn(1,n?e:[e],n?[]:t);return n||arguments.length==2?[s,i]:s}function ue(e,t,n){const s=v.fun(t)&&t,{reset:i,sort:o,trail:a=0,expires:l=!0,exitBeforeEnter:c=!1,onDestroyed:u,ref:f,config:S}=s?s():t,d=E.useMemo(()=>s||arguments.length==3?ks():void 0,[]),_=ee(e),p=[],g=E.useRef(null),m=i?null:g.current;be(()=>{g.current=p}),Bn(()=>(F(p,x=>{d==null||d.add(x.ctrl),x.ctrl.ref=d}),()=>{F(g.current,x=>{x.expired&&clearTimeout(x.expirationId),gn(x.ctrl,d),x.ctrl.stop(!0)})}));const T=xo(_,s?s():t,m),C=i&&g.current||[];be(()=>F(C,({ctrl:x,item:w,key:U})=>{gn(x,d),se(u,w,U)}));const O=[];if(m&&F(m,(x,w)=>{x.expired?(clearTimeout(x.expirationId),C.push(x)):(w=O[w]=T.indexOf(x.key),~w&&(p[w]=x))}),F(_,(x,w)=>{p[w]||(p[w]={key:T[w],item:x,phase:"mount",ctrl:new Rs},p[w].ctrl.item=x)}),O.length){let x=-1;const{leave:w}=s?s():t;F(O,(U,B)=>{const $=m[B];~U?(x=p.indexOf($),p[x]={...$,item:_[U]}):w&&p.splice(++x,0,$)})}v.fun(o)&&p.sort((x,w)=>o(x.item,w.item));let b=-a;const L=Fn(),R=jt(t),N=new Map,j=E.useRef(new Map),M=E.useRef(!1);F(p,(x,w)=>{const U=x.key,B=x.phase,$=s?s():t;let A,y;const Z=se($.delay||0,U);if(B=="mount")A=$.enter,y="enter";else{const te=T.indexOf(U)<0;if(B!="leave")if(te)A=$.leave,y="leave";else if(A=$.update)y="update";else return;else if(!te)A=$.enter,y="enter";else return}if(A=se(A,x.item,w),A=v.obj(A)?Gn(A):{to:A},!A.config){const te=S||R.config;A.config=se(te,x.item,w,y)}b+=a;const he={...R,delay:Z+b,ref:f,immediate:$.immediate,reset:!1,...A};if(y=="enter"&&v.und(he.from)){const te=s?s():t,Te=v.und(te.initial)||m?te.from:te.initial;he.from=se(Te,x.item,w)}const{onResolve:ct}=he;he.onResolve=te=>{se(ct,te);const Te=g.current,ye=Te.find(ut=>ut.key===U);if(ye&&!(te.cancelled&&ye.phase!="update")&&ye.ctrl.idle){const ut=Te.every(ve=>ve.ctrl.idle);if(ye.phase=="leave"){const ve=se(l,ye.item);if(ve!==!1){const zt=ve===!0?0:ve;if(ye.expired=!0,!ut&&zt>0){zt<=2147483647&&(ye.expirationId=setTimeout(L,zt));return}}}ut&&Te.some(ve=>ve.expired)&&(j.current.delete(ye),c&&(M.current=!0),L())}};const ke=yn(x.ctrl,he);y==="leave"&&c?j.current.set(x,{phase:y,springs:ke,payload:he}):N.set(x,{phase:y,springs:ke,payload:he})});const P=E.useContext(Ps),D=Sn(P),G=P!==D&&ys(P);be(()=>{G&&F(p,x=>{x.ctrl.start({default:P})})},[P]),F(N,(x,w)=>{if(j.current.size){const U=p.findIndex(B=>B.key===w.key);p.splice(U,1)}}),be(()=>{F(j.current.size?j.current:N,({phase:x,payload:w},U)=>{const{ctrl:B}=U;U.phase=x,d==null||d.add(B),G&&x=="enter"&&B.start({default:P}),w&&(As(B,w.ref),(B.ref||d)&&!M.current?B.update(w):(B.start(w),M.current&&(M.current=!1)))})},i?void 0:n);const H=x=>Ue.createElement(Ue.Fragment,null,p.map((w,U)=>{const{springs:B}=N.get(w)||w.ctrl,$=x({...B},w.item,w,U);return $&&$.type?Ue.createElement($.type,{...$.props,key:v.str(w.key)||v.num(w.key)?w.key:w.ctrl.id,ref:$.ref}):$}));return d?[H,d]:H}var Io=1;function xo(e,{key:t,keys:n=t},s){if(n===null){const i=new Set;return e.map(o=>{const a=s&&s.find(l=>l.item===o&&l.phase!=="leave"&&!i.has(l));return a?(i.add(a),a.key):Io++})}return v.und(n)?e:v.fun(n)?e.map(n):ee(n)}var Ro=class extends $n{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=We(...t);const n=this._get(),s=_n(n);zn(this,s.create(n))}advance(e){const t=this._get(),n=this.get();Ee(t,n)||(_e(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Tr(this._active)&&Zt(this)}_get(){const e=v.arr(this.source)?this.source.map(re):ee(re(this.source));return this.calc(...e)}_start(){this.idle&&!Tr(this._active)&&(this.idle=!1,F(wt(this),e=>{e.done=!1}),de.skipAnimation?(z.batchedUpdates(()=>this.advance()),Zt(this)):bt.start(this))}_attach(){let e=1;F(ee(this.source),t=>{oe(t)&&Pe(t,this),En(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){F(ee(this.source),e=>{oe(e)&&Qe(e,this)}),this._active.clear(),Zt(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=ee(this.source).reduce((t,n)=>Math.max(t,(En(n)?n.priority:0)+1),0))}};function wo(e){return e.idle!==!1}function Tr(e){return!e.size||Array.from(e).every(wo)}function Zt(e){e.idle||(e.idle=!0,F(wt(e),t=>{t.done=!0}),Ke(e,{type:"idle",parent:e}))}de.assign({createStringInterpolator:hs,to:(e,t)=>new Ro(e,t)});var Fs=/^--/;function No(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Fs.test(e)&&!(Ye.hasOwnProperty(e)&&Ye[e])?t+"px":(""+t).trim()}var yr={};function Do(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:s,style:i,children:o,scrollTop:a,scrollLeft:l,viewBox:c,...u}=t,f=Object.values(u),S=Object.keys(u).map(d=>n||e.hasAttribute(d)?d:yr[d]||(yr[d]=d.replace(/([A-Z])/g,_=>"-"+_.toLowerCase())));o!==void 0&&(e.textContent=o);for(const d in i)if(i.hasOwnProperty(d)){const _=No(d,i[d]);Fs.test(d)?e.style.setProperty(d,_):e.style[d]=_}S.forEach((d,_)=>{e.setAttribute(d,f[_])}),s!==void 0&&(e.className=s),a!==void 0&&(e.scrollTop=a),l!==void 0&&(e.scrollLeft=l),c!==void 0&&e.setAttribute("viewBox",c)}var Ye={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},jo=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Mo=["Webkit","Ms","Moz","O"];Ye=Object.keys(Ye).reduce((e,t)=>(Mo.forEach(n=>e[jo(n,t)]=e[t]),e),Ye);var Po=/^(matrix|translate|scale|rotate|skew)/,ko=/^(translate)/,Fo=/^(rotate|skew)/,Yt=(e,t)=>v.num(e)&&e!==0?e+t:e,mt=(e,t)=>v.arr(e)?e.every(n=>mt(n,t)):v.num(e)?e===t:parseFloat(e)===t,Bo=class extends Dt{constructor({x:e,y:t,z:n,...s}){const i=[],o=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),o.push(a=>[`translate3d(${a.map(l=>Yt(l,"px")).join(",")})`,mt(a,0)])),pe(s,(a,l)=>{if(l==="transform")i.push([a||""]),o.push(c=>[c,c===""]);else if(Po.test(l)){if(delete s[l],v.und(a))return;const c=ko.test(l)?"px":Fo.test(l)?"deg":"";i.push(ee(a)),o.push(l==="rotate3d"?([u,f,S,d])=>[`rotate3d(${u},${f},${S},${Yt(d,c)})`,mt(d,0)]:u=>[`${l}(${u.map(f=>Yt(f,c)).join(",")})`,mt(u,l.startsWith("scale")?1:0)])}}),i.length&&(s.transform=new zo(i,o)),super(s)}},zo=class extends ls{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 F(this.inputs,(n,s)=>{const i=re(n[0]),[o,a]=this.transforms[s](v.arr(i)?i:n.map(re));e+=" "+o,t=t&&a}),t?"none":e}observerAdded(e){e==1&&F(this.inputs,t=>F(t,n=>oe(n)&&Pe(n,this)))}observerRemoved(e){e==0&&F(this.inputs,t=>F(t,n=>oe(n)&&Qe(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Ke(this,e)}},Go=["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"];de.assign({batchedUpdates:In.unstable_batchedUpdates,createStringInterpolator:hs,colors:Mi});var Uo=So(Go,{applyAnimatedValues:Do,createAnimatedStyle:e=>new Bo(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),k=Uo.animated;const I=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:b,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,children:U,className:B,...$})=>{const A={};return e&&(A[r.MARGIN_CLASSES[e]]=!0),t&&(A[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(A[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(A[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(A[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(A[r.PADDING_CLASSES[o]]=!0),a&&(A[r.PADDING_TOP_CLASSES[a]]=!0),l&&(A[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(A[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(A[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(A[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(A[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(A[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(A[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(A[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(A[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(A[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(A[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(A[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(A[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),b&&(A[r.BORDER_BOTTOM_STYLE_CLASSES[b]]=!0),L&&(A[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(A[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(A[r.COLOR_CLASSES[N]]=!0),j&&(A[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(A[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(A[r.BOX_SIZING_CLASSES[P]]=!0),D&&(A[r.POSITION_TOP_CLASSES[D]]=!0),G&&(A[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(A[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(A[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(A[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.div,{className:`${Object.keys(A).join(" ")} ${B||""}`,...$,children:U})},xe=E.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:b,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,children:U,className:B,...$},A)=>{const y={};return e&&(y[r.MARGIN_CLASSES[e]]=!0),t&&(y[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(y[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(y[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(y[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(y[r.PADDING_CLASSES[o]]=!0),a&&(y[r.PADDING_TOP_CLASSES[a]]=!0),l&&(y[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(y[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(y[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(y[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(y[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(y[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(y[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(y[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(y[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(y[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(y[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(y[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(y[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),b&&(y[r.BORDER_BOTTOM_STYLE_CLASSES[b]]=!0),L&&(y[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(y[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(y[r.COLOR_CLASSES[N]]=!0),j&&(y[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(y[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(y[r.BOX_SIZING_CLASSES[P]]=!0),D&&(y[r.POSITION_TOP_CLASSES[D]]=!0),G&&(y[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(y[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(y[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(y[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.div,{ref:A,className:`${Object.keys(y).join(" ")} ${B||""}`,...$,children:U})}),Y=({display:e,flexDirection:t,flexWrap:n,flexJustifyContent:s,flexAlignItem:i,flexAlignContent:o,gridGap:a,gridRowGap:l,gridColumnGap:c,gridJustifyContent:u,gridAlignContent:f,justifySelf:S,alignSelf:d,className:_,children:p,...g})=>{const m={};return e&&(m[r.DISPLAY_CLASSES[e]]=!0),t&&(m[r.FLEX_DIRECTION_CLASSES[t]]=!0),n&&(m[r.FLEX_WRAP_CLASSES[n]]=!0),s&&(m[r.FLEX_JUSTIFY_CONTENT_CLASSES[s]]=!0),i&&(m[r.FLEX_ALIGN_ITEMS_CLASSES[i]]=!0),o&&(m[r.FLEX_ALIGN_CONTENT_CLASSES[o]]=!0),a&&(m[r.GRID_GAP_CLASSES[a]]=!0),l&&(m[r.GRID_ROW_GAP_CLASSES[l]]=!0),c&&(m[r.GRID_COLUMN_GAP_CLASSES[c]]=!0),u&&(m[r.GRID_JUSTIFY_CONTENT_CLASSES[u]]=!0),f&&(m[r.GRID_ALIGN_CONTENT_CLASSES[f]]=!0),S&&(m[r.JUSTIFY_SELF_CLASSES[S]]=!0),d&&(m[r.ALIGN_SELF_CLASSES[d]]=!0),h.jsx(k.div,{className:`${Object.keys(m).join(" ")} ${_||""}`,...g,children:p})},Bs=E.forwardRef(({display:e,flexDirection:t,flexWrap:n,flexJustifyContent:s,flexAlignItem:i,flexAlignContent:o,gridGap:a,gridRowGap:l,gridColumnGap:c,gridJustifyContent:u,gridAlignContent:f,justifySelf:S,alignSelf:d,className:_,children:p,...g},m)=>{const T={};return e&&(T[r.DISPLAY_CLASSES[e]]=!0),t&&(T[r.FLEX_DIRECTION_CLASSES[t]]=!0),n&&(T[r.FLEX_WRAP_CLASSES[n]]=!0),s&&(T[r.FLEX_JUSTIFY_CONTENT_CLASSES[s]]=!0),i&&(T[r.FLEX_ALIGN_ITEMS_CLASSES[i]]=!0),o&&(T[r.FLEX_ALIGN_CONTENT_CLASSES[o]]=!0),a&&(T[r.GRID_GAP_CLASSES[a]]=!0),l&&(T[r.GRID_ROW_GAP_CLASSES[l]]=!0),c&&(T[r.GRID_COLUMN_GAP_CLASSES[c]]=!0),u&&(T[r.GRID_JUSTIFY_CONTENT_CLASSES[u]]=!0),f&&(T[r.GRID_ALIGN_CONTENT_CLASSES[f]]=!0),S&&(T[r.JUSTIFY_SELF_CLASSES[S]]=!0),d&&(T[r.ALIGN_SELF_CLASSES[d]]=!0),h.jsx(k.div,{ref:m,className:`${Object.keys(T).join(" ")} ${_||""}`,...g,children:p})}),zs=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:b,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,type:w,cursor:U,disabled:B,children:$,className:A,...y})=>{const Z={};return e&&(Z[r.MARGIN_CLASSES[e]]=!0),t&&(Z[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(Z[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(Z[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(Z[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(Z[r.PADDING_CLASSES[o]]=!0),a&&(Z[r.PADDING_TOP_CLASSES[a]]=!0),l&&(Z[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(Z[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(Z[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(Z[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(Z[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(Z[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(Z[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(Z[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(Z[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(Z[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(Z[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(Z[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(Z[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),b&&(Z[r.BORDER_BOTTOM_STYLE_CLASSES[b]]=!0),L&&(Z[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(Z[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(Z[r.COLOR_CLASSES[N]]=!0),j&&(Z[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(Z[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(Z[r.BOX_SIZING_CLASSES[P]]=!0),D&&(Z[r.POSITION_TOP_CLASSES[D]]=!0),G&&(Z[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(Z[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(Z[r.POSITION_RIGHT_CLASSES[x]]=!0),U&&(Z[r.CURSOR_CLASSES[U]]=!0),h.jsx(k.button,{type:w,disabled:B,className:`${Object.keys(Z).join(" ")} ${A||""}`,...y,children:$})},Ho=E.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:b,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,children:U,className:B,...$},A)=>{const y={};return e&&(y[r.MARGIN_CLASSES[e]]=!0),t&&(y[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(y[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(y[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(y[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(y[r.PADDING_CLASSES[o]]=!0),a&&(y[r.PADDING_TOP_CLASSES[a]]=!0),l&&(y[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(y[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(y[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(y[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(y[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(y[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(y[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(y[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(y[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(y[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(y[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(y[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(y[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),b&&(y[r.BORDER_BOTTOM_STYLE_CLASSES[b]]=!0),L&&(y[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(y[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(y[r.COLOR_CLASSES[N]]=!0),j&&(y[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(y[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(y[r.BOX_SIZING_CLASSES[P]]=!0),D&&(y[r.POSITION_TOP_CLASSES[D]]=!0),G&&(y[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(y[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(y[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(y[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.button,{ref:A,className:`${Object.keys(y).join(" ")} ${B||""}`,...$,children:U})}),$o=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.input,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},Gs=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.input,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),Zo=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,resize:a,className:l,children:c,...u})=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),a&&(f[r.ELEMENT_RESIZE_CLASSES[a]]=!0),h.jsx(k.textarea,{className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${l||""}`,...u,children:c})},Us=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,resize:a,outlineStyle:l,className:c,children:u,...f},S)=>{const d={},{theme:_}=V();return e&&(d[r.COLOR_CLASSES[e]]=!0),t&&(d[r.FONT_SIZE_CLASSES[t]]=!0),n&&(d[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(d[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(d[r.FONT_STYLE_CLASSES[i]]=!0),o&&(d[r.TEXT_ALIGN_CLASSES[o]]=!0),a&&(d[r.ELEMENT_RESIZE_CLASSES[a]]=!0),l&&(d[r.OUTLINE_STYLE_CLASSES[l]]=!0),h.jsx(k.textarea,{ref:S,className:`${r.THEME_CLASSES[_]} ${Object.keys(d).join(" ")} ${c||""}`,...f,children:u})}),Hs=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:b,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,className:U,children:B,...$})=>{const A={};return e&&(A[r.MARGIN_CLASSES[e]]=!0),t&&(A[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(A[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(A[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(A[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(A[r.PADDING_CLASSES[o]]=!0),a&&(A[r.PADDING_TOP_CLASSES[a]]=!0),l&&(A[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(A[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(A[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(A[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(A[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(A[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(A[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(A[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(A[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(A[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(A[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(A[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(A[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),b&&(A[r.BORDER_BOTTOM_STYLE_CLASSES[b]]=!0),L&&(A[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(A[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(A[r.COLOR_CLASSES[N]]=!0),j&&(A[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(A[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(A[r.BOX_SIZING_CLASSES[P]]=!0),D&&(A[r.POSITION_TOP_CLASSES[D]]=!0),G&&(A[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(A[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(A[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(A[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.li,{className:`${Object.keys(A).join(" ")} ${U||""}`,...$,children:B})},Yo=E.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:b,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,className:U,children:B,...$},A)=>{const y={};return e&&(y[r.MARGIN_CLASSES[e]]=!0),t&&(y[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(y[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(y[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(y[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(y[r.PADDING_CLASSES[o]]=!0),a&&(y[r.PADDING_TOP_CLASSES[a]]=!0),l&&(y[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(y[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(y[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(y[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(y[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(y[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(y[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(y[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(y[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(y[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(y[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(y[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(y[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),b&&(y[r.BORDER_BOTTOM_STYLE_CLASSES[b]]=!0),L&&(y[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(y[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(y[r.COLOR_CLASSES[N]]=!0),j&&(y[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(y[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(y[r.BOX_SIZING_CLASSES[P]]=!0),D&&(y[r.POSITION_TOP_CLASSES[D]]=!0),G&&(y[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(y[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(y[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(y[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.li,{ref:A,className:`${Object.keys(y).join(" ")} ${U||""}`,...$,children:B})}),Yn=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:b,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,className:w,cursor:U,children:B,...$})=>{const A={};return e&&(A[r.MARGIN_CLASSES[e]]=!0),t&&(A[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(A[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(A[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(A[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(A[r.PADDING_CLASSES[o]]=!0),a&&(A[r.PADDING_TOP_CLASSES[a]]=!0),l&&(A[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(A[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(A[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(A[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(A[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(A[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(A[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(A[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(A[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(A[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(A[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(A[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(A[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),b&&(A[r.BORDER_BOTTOM_STYLE_CLASSES[b]]=!0),L&&(A[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(A[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(A[r.COLOR_CLASSES[N]]=!0),j&&(A[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(A[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(A[r.BOX_SIZING_CLASSES[P]]=!0),D&&(A[r.POSITION_TOP_CLASSES[D]]=!0),G&&(A[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(A[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(A[r.POSITION_RIGHT_CLASSES[x]]=!0),U&&(A[r.CURSOR_CLASSES[U]]=!0),h.jsx(k.ul,{className:`${Object.keys(A).join(" ")} ${w||""}`,...$,children:B})},Vo=E.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:b,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,className:U,children:B,...$},A)=>{const y={};return e&&(y[r.MARGIN_CLASSES[e]]=!0),t&&(y[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(y[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(y[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(y[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(y[r.PADDING_CLASSES[o]]=!0),a&&(y[r.PADDING_TOP_CLASSES[a]]=!0),l&&(y[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(y[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(y[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(y[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(y[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(y[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(y[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(y[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(y[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(y[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(y[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(y[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(y[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),b&&(y[r.BORDER_BOTTOM_STYLE_CLASSES[b]]=!0),L&&(y[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(y[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(y[r.COLOR_CLASSES[N]]=!0),j&&(y[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(y[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(y[r.BOX_SIZING_CLASSES[P]]=!0),D&&(y[r.POSITION_TOP_CLASSES[D]]=!0),G&&(y[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(y[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(y[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(y[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.ul,{ref:A,className:`${Object.keys(y).join(" ")} ${U||""}`,...$,children:B})}),Xo=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h1,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},Wo=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h1,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),qo=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h2,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},Ko=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h2,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),Qo=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h3,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},Jo=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h3,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),ea=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h4,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},ta=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={};return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h4,{ref:u,className:`${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),na=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h5,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},ra=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h5,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),sa=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h6,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},ia=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h6,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})});function Mt(e,t){return e+t>8?r.FontSizes.Size8:e+t<1?r.FontSizes.Size1:e+t}const Pt=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f,baseFontSize:S}=V();return t?S!==r.BASE_FONT_SIZE?u[r.FONT_SIZE_CLASSES[Mt(t,S-r.BASE_FONT_SIZE)]]=!0:u[r.FONT_SIZE_CLASSES[t]]=!0:u[r.FONT_SIZE_CLASSES[S]]=!0,e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.p,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},oa=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S,baseFontSize:d}=V();return t?d!==r.BASE_FONT_SIZE?f[r.FONT_SIZE_CLASSES[Mt(t,d-r.BASE_FONT_SIZE)]]=!0:f[r.FONT_SIZE_CLASSES[t]]=!0:f[r.FONT_SIZE_CLASSES[d]]=!0,e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.p,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),q=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,cursor:l,children:c,...u})=>{const f={},{theme:S,baseFontSize:d}=V();return t?d!==r.BASE_FONT_SIZE?f[r.FONT_SIZE_CLASSES[Mt(t,d-r.BASE_FONT_SIZE)]]=!0:f[r.FONT_SIZE_CLASSES[t]]=!0:f[r.FONT_SIZE_CLASSES[d]]=!0,e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),l&&(f[r.CURSOR_CLASSES[l]]=!0),h.jsx(k.span,{className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...u,children:c})},aa=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,cursor:l,children:c,...u},f)=>{const S={},{theme:d,baseFontSize:_}=V();return t?_!==r.BASE_FONT_SIZE?S[r.FONT_SIZE_CLASSES[Mt(t,_-r.BASE_FONT_SIZE)]]=!0:S[r.FONT_SIZE_CLASSES[t]]=!0:S[r.FONT_SIZE_CLASSES[_]]=!0,e&&(S[r.COLOR_CLASSES[e]]=!0),t&&(S[r.FONT_SIZE_CLASSES[t]]=!0),n&&(S[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(S[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(S[r.FONT_STYLE_CLASSES[i]]=!0),o&&(S[r.TEXT_ALIGN_CLASSES[o]]=!0),l&&(S[r.CURSOR_CLASSES[l]]=!0),h.jsx(k.span,{ref:f,className:`${r.THEME_CLASSES[d]} ${Object.keys(S).join(" ")} ${a||""}`,...u,children:c})}),ca=({header:e,children:t,...n})=>{switch(e){case"h1":return h.jsx(k.h1,{...n,children:t});case"h2":return h.jsx(k.h2,{...n,children:t});case"h3":return h.jsx(k.h3,{...n,children:t});case"h4":return h.jsx(k.h4,{...n,children:t});case"h5":return h.jsx(k.h5,{...n,children:t});case"h6":return h.jsx(k.h6,{...n,children:t});default:return h.jsx(k.h6,{...n,children:t})}},ua=E.forwardRef(({header:e,children:t,...n},s)=>{switch(e){case"h1":return h.jsx(k.h1,{ref:s,...n,children:t});case"h2":return h.jsx(k.h2,{ref:s,...n,children:t});case"h3":return h.jsx(k.h3,{ref:s,...n,children:t});case"h4":return h.jsx(k.h4,{ref:s,...n,children:t});case"h5":return h.jsx(k.h5,{ref:s,...n,children:t});case"h6":return h.jsx(k.h6,{ref:s,...n,children:t});default:return h.jsx(k.h6,{ref:s,...n,children:t})}}),la=({header:e,paletteColor:t,fontSize:n,fontFamily:s,fontWeight:i,fontStyle:o,textAlign:a,className:l,children:c,...u})=>{const f={},{theme:S}=V();return t&&(f[r.COLOR_CLASSES[t]]=!0),n&&(f[r.FONT_SIZE_CLASSES[n]]=!0),s&&(f[r.FONT_FAMILY_CLASSES[s]]=!0),i&&(f[r.FONT_WEIGHT_CLASSES[i]]=!0),o&&(f[r.FONT_STYLE_CLASSES[o]]=!0),a&&(f[r.TEXT_ALIGN_CLASSES[a]]=!0),h.jsx(ca,{header:e,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${l||""}`,...u,children:c})},fa=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(ua,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})});function $s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vt,Ar;function da(){if(Ar)return Vt;Ar=1;function e(t,n,s){var i,o,a,l,c;n==null&&(n=100);function u(){var S=Date.now()-l;S<n&&S>=0?i=setTimeout(u,n-S):(i=null,s||(c=t.apply(a,o),a=o=null))}var f=function(){a=this,o=arguments,l=Date.now();var S=s&&!i;return i||(i=setTimeout(u,n)),S&&(c=t.apply(a,o),a=o=null),c};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(c=t.apply(a,o),a=o=null,clearTimeout(i),i=null)},f}return e.debounce=e,Vt=e,Vt}var ha=da();const Cr=$s(ha);function ge(e){let{debounce:t,scroll:n,polyfill:s,offsetSize:i}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const o=s||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,l]=E.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=E.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,S=E.useRef(!1);E.useEffect(()=>(S.current=!0,()=>void(S.current=!1)));const[d,_,p]=E.useMemo(()=>{const C=()=>{if(!c.current.element)return;const{left:O,top:b,width:L,height:R,bottom:N,right:j,x:M,y:P}=c.current.element.getBoundingClientRect(),D={left:O,top:b,width:L,height:R,bottom:N,right:j,x:M,y:P};c.current.element instanceof HTMLElement&&i&&(D.height=c.current.element.offsetHeight,D.width=c.current.element.offsetWidth),Object.freeze(D),S.current&&!ga(c.current.lastBounds,D)&&l(c.current.lastBounds=D)};return[C,f?Cr(C,f):C,u?Cr(C,u):C]},[l,i,u,f]);function g(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(C=>C.removeEventListener("scroll",p,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function m(){c.current.element&&(c.current.resizeObserver=new o(p),c.current.resizeObserver.observe(c.current.element),n&&c.current.scrollContainers&&c.current.scrollContainers.forEach(C=>C.addEventListener("scroll",p,{capture:!0,passive:!0})))}const T=C=>{!C||C===c.current.element||(g(),c.current.element=C,c.current.scrollContainers=Zs(C),m())};return _a(p,!!n),Sa(_),E.useEffect(()=>{g(),m()},[n,p,_]),E.useEffect(()=>g,[]),[T,a,d]}function Sa(e){E.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function _a(e,t){E.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function Zs(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:s,overflowY:i}=window.getComputedStyle(e);return[n,s,i].some(o=>o==="auto"||o==="scroll")&&t.push(e),[...t,...Zs(e.parentElement)]}const pa=["x","y","top","bottom","left","right","width","height"],ga=(e,t)=>pa.every(n=>e[n]===t[n]),ma=({children:e,inherit:t=!1,width:n="auto",height:s="auto"})=>{const[i,o]=ge(),a=E.useMemo(()=>o.height,[o.height]),l=E.useMemo(()=>o.width,[o.width]),c=E.Children.map(e,u=>E.isValidElement(u)?E.cloneElement(u,{width:l,height:a}):u);return h.jsx("div",{ref:i,style:{width:t?"inherit":n,height:t?"inherit":s},children:c})},ht={[r.Sizings.Size1]:{containerSize:8,size:4},[r.Sizings.Size2]:{containerSize:12,size:8},[r.Sizings.Size3]:{containerSize:16,size:12},[r.Sizings.Size4]:{containerSize:20,size:16},[r.Sizings.Size5]:{containerSize:24,size:20},[r.Sizings.Size6]:{containerSize:28,size:24},[r.Sizings.Size7]:{containerSize:32,size:28},[r.Sizings.Size8]:{containerSize:36,size:32},[r.Sizings.Size9]:{containerSize:44,size:40},[r.Sizings.Size10]:{containerSize:52,size:48},[r.Sizings.Size11]:{containerSize:60,size:54},[r.Sizings.Size12]:{containerSize:68,size:64},[r.Sizings.Size13]:{containerSize:76,size:72},[r.Sizings.Size14]:{containerSize:84,size:80},[r.Sizings.Size15]:{containerSize:92,size:88}};function Ys({size:e=r.Sizings.Size3}){return h.jsx("div",{className:"image-container",style:{width:`${ht[e].containerSize}px`,height:`${ht[e].containerSize}px`},children:h.jsx("svg",{className:"text-zinc-300",viewBox:"0 0 2400 2400",width:ht[e].size,height:ht[e].size,children:h.jsxs("g",{strokeWidth:200,strokeLinecap:"round",stroke:"currentColor",fill:"none",children:[h.jsx("path",{d:"M1200 600L1200 100"}),h.jsx("path",{opacity:.5,d:"M1200 2300L1200 1800"}),h.jsx("path",{opacity:.917,d:"M900 680.4L650 247.4"}),h.jsx("path",{opacity:.417,d:"M1750 2152.6L1500 1719.6"}),h.jsx("path",{opacity:.833,d:"M680.4 900L247.4 650"}),h.jsx("path",{opacity:.333,d:"M2152.6 1750L1719.6 1500"}),h.jsx("path",{opacity:.75,d:"M600 1200L100 1200"}),h.jsx("path",{opacity:.25,d:"M2300 1200L1800 1200"}),h.jsx("path",{opacity:.667,d:"M680.4 1500L247.4 1750"}),h.jsx("path",{opacity:.167,d:"M2152.6 650L1719.6 900"}),h.jsx("path",{opacity:.583,d:"M900 1719.6L650 2152.6"}),h.jsx("path",{opacity:.083,d:"M1750 247.4L1500 680.4"}),h.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",keyTimes:"0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667",values:"0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199",dur:"0.83333s",begin:"0s",repeatCount:"indefinite",calcMode:"discrete"})]})})})}const Ea=({isLoading:e,size:t=r.Sizings.Size3})=>ue(e,{from:{opacity:0,scale:.6,height:0},enter:{opacity:1,scale:1,height:30},leave:{opacity:0,scale:.6,height:0}})((s,i)=>i&&h.jsx(k.div,{style:{display:"flex",justifyContent:"center",alignItems:"center",...s},children:h.jsx(Ys,{size:t})})),Ta=({isOpen:e,children:t})=>{const[n,s]=ge(),i={height:e?s.height:0,width:"auto",overflow:"hidden",opacity:e?1:0};return h.jsx(I,{style:i,children:h.jsx("div",{ref:n,children:h.jsx(I,{style:{height:"max-content"},children:t})})})},Xt={horizontal:{from:{x:10},enter:{x:0},leave:{x:-10}},vertical:{from:{y:10},enter:{y:0},leave:{y:-10}},verticalInverted:{from:{y:-10},enter:{y:0},leave:{y:10}}},ya=({direction:e,isShown:t=!0,children:n})=>{const s=ue(t,{from:{...Xt[e].from,opacity:0,display:"none"},enter:{...Xt[e].enter,opacity:1,display:"block"},leave:{...Xt[e].leave,opacity:0,display:"none"}});return h.jsx(h.Fragment,{children:s((i,o)=>o&&h.jsx(I,{style:{...i,height:"inherit",width:"inherit",overflow:"hidden"},children:n}))})},Wt={horizontal:{from:e=>({x:10*e}),enter:e=>({x:0*e}),leave:e=>({x:-10*e})},vertical:{from:e=>({y:10*e}),enter:e=>({y:0*e}),leave:e=>({y:-10*e})}},Vs=({direction:e="horizontal",isShown:t=!0,enterOffsetBy:n=1,children:s})=>{const i=ue(t,{from:{...Wt[e].from(n),opacity:0,display:"none"},enter:{...Wt[e].enter(n),opacity:1,display:"block"},leave:{...Wt[e].leave(n),opacity:0,display:"none"}});return h.jsx(h.Fragment,{children:i((o,a)=>a&&h.jsx(I,{style:{height:"inherit",width:"inherit",overflow:"hidden",...o},children:s}))})},Aa=({isOpen:e,children:t})=>{const[n,s]=ge(),[i,o]=W(()=>({opacity:0,height:0,width:0}));return o.start({opacity:e?1:0,height:e?s.height:0,width:e?s.width:0}),h.jsx(I,{style:{position:"absolute",overflow:"hidden",...i},boxSizing:r.BoxSizings.BorderBox,children:h.jsx("div",{ref:n,style:{width:"max-content",height:"max-content",boxSizing:"border-box"},children:t})})},St={[r.Sizings.Size1]:{padding:r.Spacings.Size1,size:r.Sizings.Size1},[r.Sizings.Size2]:{padding:r.Spacings.Size1,size:r.Sizings.Size2},[r.Sizings.Size3]:{padding:r.Spacings.Size1,size:r.Sizings.Size3},[r.Sizings.Size4]:{padding:r.Spacings.Size1,size:r.Sizings.Size4},[r.Sizings.Size5]:{padding:r.Spacings.Size1,size:r.Sizings.Size5},[r.Sizings.Size6]:{padding:r.Spacings.Size2,size:r.Sizings.Size6},[r.Sizings.Size7]:{padding:r.Spacings.Size2,size:r.Sizings.Size7},[r.Sizings.Size8]:{padding:r.Spacings.Size3,size:r.Sizings.Size8},[r.Sizings.Size9]:{padding:r.Spacings.Size3,size:r.Sizings.Size9},[r.Sizings.Size10]:{padding:r.Spacings.Size4,size:r.Sizings.Size10},[r.Sizings.Size11]:{padding:r.Spacings.Size4,size:r.Sizings.Size11},[r.Sizings.Size12]:{padding:r.Spacings.Size5,size:r.Sizings.Size12},[r.Sizings.Size13]:{padding:r.Spacings.Size5,size:r.Sizings.Size13},[r.Sizings.Size14]:{padding:r.Spacings.Size6,size:r.Sizings.Size14},[r.Sizings.Size15]:{padding:r.Spacings.Size6,size:r.Sizings.Size15}};function Ca({size:e=r.Sizings.Size3,...t}){return h.jsx("div",{className:"icon-container",style:{width:`${e+4}px`,height:`${e+4}px`},children:h.jsx("svg",{className:"text-zinc-300",viewBox:"0 0 2400 2400",width:e,height:e,...t,children:h.jsxs("g",{strokeWidth:200,strokeLinecap:"round",stroke:"currentColor",fill:"none",children:[h.jsx("path",{d:"M1200 600L1200 100"}),h.jsx("path",{opacity:.5,d:"M1200 2300L1200 1800"}),h.jsx("path",{opacity:.917,d:"M900 680.4L650 247.4"}),h.jsx("path",{opacity:.417,d:"M1750 2152.6L1500 1719.6"}),h.jsx("path",{opacity:.833,d:"M680.4 900L247.4 650"}),h.jsx("path",{opacity:.333,d:"M2152.6 1750L1719.6 1500"}),h.jsx("path",{opacity:.75,d:"M600 1200L100 1200"}),h.jsx("path",{opacity:.25,d:"M2300 1200L1800 1200"}),h.jsx("path",{opacity:.667,d:"M680.4 1500L247.4 1750"}),h.jsx("path",{opacity:.167,d:"M2152.6 650L1719.6 900"}),h.jsx("path",{opacity:.583,d:"M900 1719.6L650 2152.6"}),h.jsx("path",{opacity:.083,d:"M1750 247.4L1500 680.4"}),h.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",keyTimes:"0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667",values:"0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199",dur:"0.83333s",begin:"0s",repeatCount:"indefinite",calcMode:"discrete"})]})})})}const ie=({name:e,size:t=r.Sizings.Size5,withMargin:n=!0,width:s,height:i,colorLight:o=r.ColorPalettes.Grey5,colorDark:a=r.ColorPalettes.Grey5,iconAction:l,cursor:c=r.Cursors.Default,animated:u=!0,overflow:f="hidden",borderRadius:S="50%"})=>{const{theme:d}=V(),[_,p]=W(()=>({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Transparent],scale:1})),g=d!==r.Themes.Light?r.COLOR_VALUES[a]:r.COLOR_VALUES[o],m=u&&typeof l<"u";return h.jsx(Y,{onClick:l,display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,style:{width:"max-content",color:g,cursor:m?"pointer":"default",borderRadius:S,overflow:f},onMouseEnter:()=>m&&p.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Primary3]}),onMouseLeave:()=>m&&p.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Transparent]}),onMouseDown:()=>m&&p.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Primary2],scale:.85}),onMouseUp:()=>m&&p.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Primary3],scale:1}),children:h.jsx(I,{padding:n?St[t].padding:void 0,cursor:c,style:m?{..._,borderRadius:S,display:"flex"}:{borderRadius:S,display:"flex"},children:e==="spinner"?h.jsx(Ca,{size:St[t].size,color:g}):h.jsx("svg",{width:s||St[t].size,height:i||St[t].size,fill:"none",stroke:g,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("use",{href:`/feather-sprite.svg#${e}`})})})})},Xs=E.createContext({theme:r.Themes.Default,baseFontSize:r.FontSizes.Size2||2,handleSetTheme:()=>{},onSetBaseFontSize:()=>{}});function Oa({children:e}){const t=La();return h.jsx(Xs.Provider,{value:t,children:e})}const V=()=>E.useContext(Xs);function La(){const[e,t]=E.useState(r.Themes.Default),n=a=>{t(a)},[s,i]=E.useState(r.FontSizes.Size2);return{theme:e,baseFontSize:s,handleSetTheme:n,onSetBaseFontSize:a=>{i(l=>l+a>8?r.FontSizes.Size8:l+a<1?r.FontSizes.Size1:l+a)}}}const Ws=E.createContext({globalEventRef:null,handleGlobalEventRef:()=>{},catchUserAxiosNextApiError:void 0,catchUserAxiosFetcherError:void 0});function va({children:e}){const t=ba();return h.jsx(Ws.Provider,{value:t,children:e})}const qs=()=>E.useContext(Ws);function ba(){const e=E.useRef(null),t=E.useCallback((i,o)=>{var a;(a=e.current)==null||a.call(e,i,r.TOAST_TYPE[o])},[]),n=E.useCallback(i=>{var o;if(i.response){const a=((o=i.response.data)==null?void 0:o.message)||"An error occurred";t(a,r.ToastTypes.Error)}else i.request?t("Could not reach server",r.ToastTypes.Error):t("Could not process your request",r.ToastTypes.Error)},[]),s=E.useCallback(i=>{var o;if(i.response){const a=((o=i.response.data)==null?void 0:o.message)||"An error occurred";t(a,r.ToastTypes.Error)}else i.request?t("Could not reach server",r.ToastTypes.Error):t("Could not process your request",r.ToastTypes.Error)},[]);return{globalEventRef:e,handleGlobalEventRef:t,catchUserAxiosNextApiError:n,catchUserAxiosFetcherError:s}}const Ia=({level:e,size:t=r.AdmonitionSizes.Medium,descriptionText:n,children:s})=>h.jsx(I,{borderRadius:r.Radiuses.Size4,borderColor:r.AdmonitionColors[e].borderColor,borderWidth:r.BorderWidths.Size2,bgColor:r.AdmonitionColors[e].bgColor,style:{width:"max-content"},children:h.jsxs(Y,{children:[h.jsx(I,{padding:r.ADMONITION_SIZE[t].title.padding,paddingBottom:r.ADMONITION_SIZE[t].title.paddingBottom,paddingLeft:r.ADMONITION_SIZE[t].title.paddingLeft,paddingRight:r.ADMONITION_SIZE[t].title.paddingRight,children:h.jsxs(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.FlexStart,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(ie,{name:r.AdmonitionIcons[e].titleIcon,colorLight:r.AdmonitionColors[e].iconColor,colorDark:r.AdmonitionColors[e].iconColor,size:r.ADMONITION_SIZE[t].title.iconSize,withMargin:!1,borderRadius:void 0,overflow:""}),h.jsx(I,{marginLeft:r.ADMONITION_SIZE[t].title.iconMargin,children:h.jsx(q,{fontSize:r.ADMONITION_SIZE[t].title.fontSize,fontWeight:r.ADMONITION_SIZE[t].title.fontWeight,children:r.AdmonitionTitles[e]})})]})}),h.jsx(I,{padding:r.ADMONITION_SIZE[t].content.padding,paddingTop:r.ADMONITION_SIZE[t].content.paddingTop,paddingLeft:r.ADMONITION_SIZE[t].content.paddingLeft,paddingRight:r.ADMONITION_SIZE[t].title.paddingRight,children:h.jsx(Pt,{fontSize:r.ADMONITION_SIZE[t].content.fontSize,children:n})}),s&&h.jsx(I,{padding:r.ADMONITION_SIZE[t].content.padding,paddingTop:r.ADMONITION_SIZE[t].content.paddingTop,paddingLeft:r.ADMONITION_SIZE[t].content.paddingLeft,paddingRight:r.ADMONITION_SIZE[t].title.paddingRight,children:s})]})}),xa=({hoverAnimation:e,size:t=r.AvatarSizes.Size3,avatarName:n,withHover:s})=>s?n?h.jsx(I,{bgColor:r.ColorPalettes.Primary4,padding:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderRadius:r.Radiuses.Size4,boxShadow:r.BoxShadows.Size3,style:{position:"absolute",left:"50%",transform:"translateX(-50%)",width:"max-content",zIndex:1,...e},children:h.jsx(q,{fontSize:r.AVATAR_SIZE[t].fontSize,children:n})}):h.jsx(h.Fragment,{}):n?h.jsx(Ra,{children:h.jsx(q,{fontSize:r.AVATAR_SIZE[t].fontSize,children:n})}):h.jsx(h.Fragment,{}),Ra=({children:e})=>h.jsx(I,{style:{opacity:1},children:e});function Or(){for(var e="",t="0123456789abcdef",n=0;n<6;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return e}function wa(){var e=Math.floor(Math.random()*360),t="linear-gradient("+e+"deg, #"+Or()+", #"+Or()+")";return t}const Ks=({avatarName:e,size:t=r.AvatarSizes.Size2,withHover:n=!0,onClick:s,border:i=!0,borderColor:o,children:a})=>{const[l,c]=W(()=>({opacity:0,y:-5,scale:.7,transformOrigin:"top center",pointerEvents:"auto"}));return h.jsx(I,{style:{width:"max-content"},onMouseEnter:()=>c.start({opacity:1,y:3,scale:1}),onMouseLeave:()=>c.start({opacity:0,y:-5,scale:.7,pointerEvents:"none"}),onClick:s,children:h.jsxs(Y,{style:{width:"max-content",position:"relative"},children:[h.jsx(Y,{display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,style:{width:"100%"},children:h.jsx(I,{borderColor:i?o||r.ColorPalettes.Grey3:void 0,borderStyle:i?r.BorderStyles.Solid:void 0,borderWidth:i?r.BorderWidths.Size2:void 0,style:{overflow:"hidden",maxWidth:"100%",borderRadius:"50%",width:r.AVATAR_SIZE[t].image,height:r.AVATAR_SIZE[t].image},children:a?h.jsx(h.Fragment,{children:a}):h.jsx(I,{style:{width:"100%",height:"100%",background:wa()}})})}),h.jsx(xa,{hoverAnimation:l,avatarName:e,size:t,withHover:n})]})})},Na=({avatars:e,border:t,borderColor:n,withHover:s,size:i})=>{const[o,a]=Zn(e.length,l=>({y:0,x:l===0?0:l*-10}),[]);return h.jsx(Y,{display:r.Displays.Flex,children:o.map((l,c)=>h.jsx(k.div,{style:l,onMouseEnter:()=>a.start(u=>{if(u===c)return{y:-5}}),onMouseLeave:()=>a.start(u=>{if(u===c)return{y:0}}),children:h.jsx(Ks,{avatarName:e[c].name,border:t,borderColor:n,onClick:e[c].onClick,isLoading:e[c].isLoading,withHover:s,size:i,children:e[c].children})},c))})},kt=({labelName:e="",offsetX:t=0,y:n=50,x:s=0,hover:i=!1})=>{const[o,a]=ge(),l=W({opacity:i?1:0,x:s,y:n}),c=W({opacity:i?1:0,x:-(a.width/2)+t,y:n});return h.jsx(xe,{ref:o,style:t!==0?c:l,children:h.jsx(I,{children:h.jsx(Pt,{children:e})})})},Lr=({icon:e,iconSize:t,iconState:n,iconColor:s,iconPosition:i,iconMargin:o})=>{const[a,l]=E.useState(n);E.useEffect(()=>{l(n)},[n]);const c=ue(a,{from:{opacity:0,transform:"scale(0.6)"},enter:{opacity:1,transform:"scale(1)"},leave:{opacity:0,transform:"scale(0.6)"},onRest:()=>{(n===r.ButtonStates.Success||n!==r.ButtonStates.Error)&&setTimeout(()=>{(a===r.ButtonStates.Success||a!==r.ButtonStates.Error)&&l(r.ButtonStates.Icon)},3e3)}});return h.jsx(I,{marginRight:i===r.ButtonIconPositions.Left?o:void 0,marginLeft:i===r.ButtonIconPositions.Right?o:void 0,style:{position:"relative",[o===r.Spacings.Size0?i===r.ButtonIconPositions.Left?"marginRight":i===r.ButtonIconPositions.Right?"marginLeft":"":""]:2,minWidth:t,maxWidth:t,minHeight:t,maxHeight:t},children:c(u=>{var f,S,d,_,p,g,m,T,C;return h.jsx(q,{style:{...u,position:"absolute",top:"0",left:"0"},children:h.jsx(ie,{name:n!==r.ButtonStates.Icon?r.ButtonStateIcon[n]:e,colorLight:(S=(f=r.BUTTON_STATE[a])==null?void 0:f.icon)!=null&&S.iconColor?(_=(d=r.BUTTON_STATE[a])==null?void 0:d.icon)==null?void 0:_.iconColor:s,colorDark:(g=(p=r.BUTTON_STATE[a])==null?void 0:p.icon)!=null&&g.iconColor?(T=(m=r.BUTTON_STATE[a])==null?void 0:m.icon)==null?void 0:T.iconColor:s,size:t,withMargin:!1,cursor:(C=r.BUTTON_STATE[a])!=null&&C.cursor?r.BUTTON_STATE[a].cursor:r.Cursors.Pointer})})})})},Qs=({name:e,buttonSize:t=r.ButtonSizes.Medium,buttonColor:n=r.ButtonColors.Primary5,buttonState:s=r.ButtonStates.Icon,buttonType:i=r.ButtonTypes.Button,buttonStyle:o=r.ButtonStyles.Filled,buttonShadow:a=r.BoxShadows.Size2,icon:l,iconColor:c=r.ColorPalettes.Primary8,iconPosition:u=r.ButtonIconPositions.Left,animate:f=!0,hover:S,clickAction:d=()=>{}})=>{var L,R,N,j,M,P,D,G,H,x,w,U,B,$,A,y,Z,he,ct,ke,te,Te;var _=s===r.ButtonStates.Disabled;const[p,g]=E.useState(S),[m,T]=ge({debounce:500}),[C,O]=W(()=>({y:0,transform:"scale(1.0)"})),b=f&&!_&&typeof((L=r.BUTTON_STATE[s])==null?void 0:L.animation)>"u";return h.jsxs(xe,{style:{width:"max-content"},ref:m,onMouseEnter:()=>{g(!0)},onMouseLeave:()=>{g(!1)},onMouseDown:()=>b&&O.start({transform:"scale(0.9)"}),onMouseUp:()=>b&&O.start({transform:"scale(1.0)"}),onTouchStart:()=>b&&O.start({transform:"scale(0.9)"}),onTouchCancel:()=>b&&O.start({transform:"scale(1.0)"}),onTouchEnd:()=>b&&O.start({transform:"scale(1.0)"}),children:[S&&h.jsx(kt,{labelName:e,hover:p,offsetX:T.width/2,y:T.height}),h.jsx(I,{style:b?C:void 0,children:h.jsx(zs,{type:i,onClick:d,disabled:_,paddingTop:r.BUTTON_SIZE[t].paddingTop,paddingBottom:r.BUTTON_SIZE[t].paddingBottom,paddingLeft:r.BUTTON_SIZE[t].paddingLeft,paddingRight:r.BUTTON_SIZE[t].paddingRight,borderRadius:r.BUTTON_SIZE[t].borderRadius,borderWidth:r.BUTTON_STYLE[o].border.borderWidth,borderStyle:r.BUTTON_STYLE[o].border.borderStyle,boxShadow:o&&((R=r.BUTTON_STYLE[o])!=null&&R.shadow)?r.BUTTON_STYLE[o].shadow:a,bgColor:o===r.ButtonStyles.Gray&&s===r.ButtonStates.Error?r.BUTTON_STYLE[o].bgColor:(j=(N=r.BUTTON_STATE[s])==null?void 0:N.color)!=null&&j.bgColor&&o!==r.ButtonStyles.Outlined&&o!==r.ButtonStyles.Plain?(P=(M=r.BUTTON_STATE[s])==null?void 0:M.color)==null?void 0:P.bgColor:o&&((D=r.BUTTON_STYLE[o])!=null&&D.bgColor)?r.BUTTON_STYLE[o].bgColor:r.BUTTON_COLORS[n].background,borderColor:(H=(G=r.BUTTON_STATE[s])==null?void 0:G.color)!=null&&H.borderColor?(w=(x=r.BUTTON_STATE[s])==null?void 0:x.color)==null?void 0:w.borderColor:r.BUTTON_COLORS[n].borderColor,cursor:(U=r.BUTTON_STATE[s])!=null&&U.cursor?r.BUTTON_STATE[s].cursor:r.BUTTON_STYLE[o].cursor,children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:u===r.ButtonIconPositions.Left?h.jsxs(h.Fragment,{children:[l&&h.jsx(Lr,{icon:l,iconSize:r.BUTTON_SIZE[t].icon,iconState:s,iconColor:c,iconPosition:u,iconMargin:r.BUTTON_SIZE[t].iconMargin}),e!==""&&!S&&h.jsx(q,{fontSize:r.BUTTON_SIZE[t].text,fontWeight:r.FontWeights.Size3,paletteColor:($=(B=r.BUTTON_STATE[s])==null?void 0:B.text)!=null&&$.color?(y=(A=r.BUTTON_STATE[s])==null?void 0:A.text)==null?void 0:y.color:o&&((Z=r.BUTTON_STYLE[o])!=null&&Z.fontColor)?r.BUTTON_STYLE[o].fontColor:r.BUTTON_COLORS[n].text,className:`name ${l?"icon-left":""}`,children:e})]}):h.jsxs(h.Fragment,{children:[e!==""&&!S&&h.jsx(q,{fontSize:r.BUTTON_SIZE[t].text,fontWeight:r.FontWeights.Size3,paletteColor:(ct=(he=r.BUTTON_STATE[s])==null?void 0:he.text)!=null&&ct.color?(te=(ke=r.BUTTON_STATE[s])==null?void 0:ke.text)==null?void 0:te.color:o&&((Te=r.BUTTON_STYLE[o])!=null&&Te.fontColor)?r.BUTTON_STYLE[o].fontColor:r.BUTTON_COLORS[n].text,className:`name ${l?"icon-right":""}`,children:e}),l&&h.jsx(Lr,{icon:l,iconSize:r.BUTTON_SIZE[t].icon,iconState:s,iconColor:c,iconPosition:u,iconMargin:r.BUTTON_SIZE[t].iconMargin})]})})})})]})},Js=({isChecked:e,size:t,checkboxColor:n=r.CheckboxColors.Grey5,onClick:s})=>h.jsx(ja,{isChecked:e,checkboxColor:n,onClick:s,children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:h.jsx(Ma,{isChecked:e,checkboxColor:n,size:t})})}),Da={borderStyle:"solid"},ja=({isChecked:e,checkboxColor:t=r.CheckboxColors.Grey5,size:n=r.CheckboxSizes.Size3,children:s,onClick:i})=>{const[o,a]=W(()=>({borderColor:e?r.CHECKBOX_COLORS[t].borderColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].borderColor}));return a.start({borderColor:e?r.CHECKBOX_COLORS[t].borderColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].borderColor}),h.jsx(I,{onClick:i,borderRadius:r.CHECKBOX_SIZES[n].boxBorderRadius,style:{padding:r.CHECKBOX_SIZES[n].padding,borderWidth:r.CHECKBOX_SIZES[n].borderWidth,...Da,...o,width:"max-content",cursor:i?"pointer":"default"},children:s})},Ma=({isChecked:e,checkboxColor:t=r.CheckboxColors.Grey5,size:n=r.CheckboxSizes.Size3})=>{const[s,i]=W(()=>({backgroundColor:e?r.CHECKBOX_COLORS[t].checkedColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].checkedColor,scale:e?1:.8,opacity:e?1:0}));return i.start({backgroundColor:e?r.CHECKBOX_COLORS[t].checkedColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].checkedColor,scale:e?1:.8,opacity:e?1:0}),h.jsx(I,{style:{width:r.CHECKBOX_SIZES[n].checkedColor.w,height:r.CHECKBOX_SIZES[n].checkedColor.h},children:h.jsx(I,{borderRadius:r.CHECKBOX_SIZES[n].checkedBorderRadius,style:{width:r.CHECKBOX_SIZES[n].checkedColor.w,height:r.CHECKBOX_SIZES[n].checkedColor.h,...s},children:h.jsx(h.Fragment,{})})})},Pa=({options:e,multiselect:t=!1,checkboxColor:n=r.CheckboxColors.Primary5,size:s,handleClick:i})=>{const o=E.useCallback(a=>{if(t)i(a);else{let l=e.findIndex(u=>u.isChecked===!0),c=e.findIndex(u=>u.id===a);l!==-1&&(c===l||i(e[l].id)),i(a)}},[i,t,e]);return h.jsx(Y,{children:e.map((a,l)=>h.jsx(ka,{checkboxColor:n,id:a.id,name:a.name,isChecked:a.isChecked,size:s,value:a==null?void 0:a.value,handleClickBox:o},l))})},ka=({id:e,name:t,value:n,isChecked:s,checkboxColor:i,size:o,handleClickBox:a})=>h.jsx(I,{onClick:()=>a(e,n),style:{cursor:"pointer"},children:h.jsxs(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(Js,{isChecked:s,checkboxColor:i,size:o}),h.jsx(I,{marginLeft:r.Spacings.Size2,children:h.jsx(q,{children:t})})]})});var ei=(e=>(e[e.Tiny=1]="Tiny",e[e.Small=2]="Small",e[e.Medium=3]="Medium",e[e.Big=4]="Big",e))(ei||{});const Se={1:{fontSize:r.FontSizes.Size1,paddingTop:r.Spacings.Size0,paddingBottom:r.Spacings.Size0,paddingLeft:r.Spacings.Size1,paddingRight:r.Spacings.Size1,borderRadius:r.Radiuses.Size7},2:{fontSize:r.FontSizes.Size2,paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderRadius:r.Radiuses.Size7},3:{fontSize:r.FontSizes.Size3,paddingTop:r.Spacings.Size2,paddingBottom:r.Spacings.Size2,paddingLeft:r.Spacings.Size3,paddingRight:r.Spacings.Size3,borderRadius:r.Radiuses.Size7},4:{fontSize:r.FontSizes.Size4,paddingTop:r.Spacings.Size3,paddingBottom:r.Spacings.Size3,paddingLeft:r.Spacings.Size4,paddingRight:r.Spacings.Size4,borderRadius:r.Radiuses.Size7}};var ti=(e=>(e[e.Filled=1]="Filled",e[e.Outlined=2]="Outlined",e))(ti||{});const me={1:{bgColor:r.ColorPalettes.Primary5,font:{fontColor:r.ColorPalettes.Grey9}},2:{border:{borderColor:r.ColorPalettes.Primary5,borderStyle:r.BorderStyles.Solid,borderWidth:r.BorderWidths.Size2},font:{}}},Fa=({children:e,chipColor:t=r.ColorSets.Primarys,paddings:n="all",margin:s,marginTop:i,marginBottom:o,marginLeft:a,marginRight:l,fontSize:c,chipStyle:u=ti.Filled,size:f=ei.Medium})=>{var _,p,g,m,T,C,O,b,L,R,N,j,M;const{theme:S}=V(),d=W({backgroundColor:S!==r.Themes.Light?(_=me[u])!=null&&_.bgColor?r.COLOR_VALUES[r.ColorRanges[t][0]+2]:void 0:(p=me[u])!=null&&p.bgColor?r.COLOR_VALUES[r.ColorRanges[t][1]-2]:void 0,color:S!==r.Themes.Light?(m=(g=me[u])==null?void 0:g.font)!=null&&m.fontColor?(C=(T=me[u])==null?void 0:T.font)==null?void 0:C.fontColor:r.COLOR_VALUES[r.ColorRanges[t][0]+4]:(b=(O=me[u])==null?void 0:O.font)!=null&&b.fontColor?(R=(L=me[u])==null?void 0:L.font)==null?void 0:R.fontColor:r.COLOR_VALUES[r.ColorRanges[t][0]+4]});return h.jsx(Y,{display:r.Displays.Flex,children:h.jsx(I,{...Ba(n,f),margin:s,marginTop:i,marginBottom:o,marginLeft:a,marginRight:l,borderRadius:Se[f].borderRadius,borderColor:(N=me[u].border)==null?void 0:N.borderColor,borderStyle:(j=me[u].border)==null?void 0:j.borderStyle,borderWidth:(M=me[u].border)==null?void 0:M.borderWidth,style:{...d},children:h.jsx(q,{style:{display:"inline-block",transform:"translateY(-1px)",color:"inherit"},fontSize:c||Se[f].fontSize,fontWeight:r.FontWeights.Size3,children:e})})})},Ba=(e,t)=>{switch(e){case"all":return{paddingTop:Se[t].paddingTop,paddingBottom:Se[t].paddingBottom,paddingLeft:Se[t].paddingLeft,paddingRight:Se[t].paddingRight};case"left right":return{paddingLeft:Se[t].paddingLeft,paddingRight:Se[t].paddingRight};default:return{paddingTop:Se[t].paddingTop,paddingBottom:Se[t].paddingBottom}}};var qt={exports:{}},Kt,vr;function ni(){return vr||(vr=1,Kt={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Kt}var Qt={exports:{}},Jt,br;function za(){return br||(br=1,Jt=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}),Jt}var Ir;function Ga(){if(Ir)return Qt.exports;Ir=1;var e=za(),t=Array.prototype.concat,n=Array.prototype.slice,s=Qt.exports=function(o){for(var a=[],l=0,c=o.length;l<c;l++){var u=o[l];e(u)?a=t.call(a,n.call(u)):a.push(u)}return a};return s.wrap=function(i){return function(){return i(s(arguments))}},Qt.exports}var xr;function Ua(){if(xr)return qt.exports;xr=1;var e=ni(),t=Ga(),n=Object.hasOwnProperty,s=Object.create(null);for(var i in e)n.call(e,i)&&(s[e[i]]=i);var o=qt.exports={to:{},get:{}};o.get=function(c){var u=c.substring(0,3).toLowerCase(),f,S;switch(u){case"hsl":f=o.get.hsl(c),S="hsl";break;case"hwb":f=o.get.hwb(c),S="hwb";break;default:f=o.get.rgb(c),S="rgb";break}return f?{model:S,value:f}:null},o.get.rgb=function(c){if(!c)return null;var u=/^#([a-f0-9]{3,4})$/i,f=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,S=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,_=/^(\w+)$/,p=[0,0,0,1],g,m,T;if(g=c.match(f)){for(T=g[2],g=g[1],m=0;m<3;m++){var C=m*2;p[m]=parseInt(g.slice(C,C+2),16)}T&&(p[3]=parseInt(T,16)/255)}else if(g=c.match(u)){for(g=g[1],T=g[3],m=0;m<3;m++)p[m]=parseInt(g[m]+g[m],16);T&&(p[3]=parseInt(T+T,16)/255)}else if(g=c.match(S)){for(m=0;m<3;m++)p[m]=parseInt(g[m+1],0);g[4]&&(g[5]?p[3]=parseFloat(g[4])*.01:p[3]=parseFloat(g[4]))}else if(g=c.match(d)){for(m=0;m<3;m++)p[m]=Math.round(parseFloat(g[m+1])*2.55);g[4]&&(g[5]?p[3]=parseFloat(g[4])*.01:p[3]=parseFloat(g[4]))}else return(g=c.match(_))?g[1]==="transparent"?[0,0,0,0]:n.call(e,g[1])?(p=e[g[1]],p[3]=1,p):null:null;for(m=0;m<3;m++)p[m]=a(p[m],0,255);return p[3]=a(p[3],0,1),p},o.get.hsl=function(c){if(!c)return null;var u=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,f=c.match(u);if(f){var S=parseFloat(f[4]),d=(parseFloat(f[1])%360+360)%360,_=a(parseFloat(f[2]),0,100),p=a(parseFloat(f[3]),0,100),g=a(isNaN(S)?1:S,0,1);return[d,_,p,g]}return null},o.get.hwb=function(c){if(!c)return null;var u=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,f=c.match(u);if(f){var S=parseFloat(f[4]),d=(parseFloat(f[1])%360+360)%360,_=a(parseFloat(f[2]),0,100),p=a(parseFloat(f[3]),0,100),g=a(isNaN(S)?1:S,0,1);return[d,_,p,g]}return null},o.to.hex=function(){var c=t(arguments);return"#"+l(c[0])+l(c[1])+l(c[2])+(c[3]<1?l(Math.round(c[3]*255)):"")},o.to.rgb=function(){var c=t(arguments);return c.length<4||c[3]===1?"rgb("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+")":"rgba("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+", "+c[3]+")"},o.to.rgb.percent=function(){var c=t(arguments),u=Math.round(c[0]/255*100),f=Math.round(c[1]/255*100),S=Math.round(c[2]/255*100);return c.length<4||c[3]===1?"rgb("+u+"%, "+f+"%, "+S+"%)":"rgba("+u+"%, "+f+"%, "+S+"%, "+c[3]+")"},o.to.hsl=function(){var c=t(arguments);return c.length<4||c[3]===1?"hsl("+c[0]+", "+c[1]+"%, "+c[2]+"%)":"hsla("+c[0]+", "+c[1]+"%, "+c[2]+"%, "+c[3]+")"},o.to.hwb=function(){var c=t(arguments),u="";return c.length>=4&&c[3]!==1&&(u=", "+c[3]),"hwb("+c[0]+", "+c[1]+"%, "+c[2]+"%"+u+")"},o.to.keyword=function(c){return s[c.slice(0,3)]};function a(c,u,f){return Math.min(Math.max(u,c),f)}function l(c){var u=Math.round(c).toString(16).toUpperCase();return u.length<2?"0"+u:u}return qt.exports}var en,Rr;function ri(){if(Rr)return en;Rr=1;const e=ni(),t={};for(const i of Object.keys(e))t[e[i]]=i;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};en=n;for(const i of Object.keys(n)){if(!("channels"in n[i]))throw new Error("missing channels property: "+i);if(!("labels"in n[i]))throw new Error("missing channel labels property: "+i);if(n[i].labels.length!==n[i].channels)throw new Error("channel and label counts mismatch: "+i);const{channels:o,labels:a}=n[i];delete n[i].channels,delete n[i].labels,Object.defineProperty(n[i],"channels",{value:o}),Object.defineProperty(n[i],"labels",{value:a})}n.rgb.hsl=function(i){const o=i[0]/255,a=i[1]/255,l=i[2]/255,c=Math.min(o,a,l),u=Math.max(o,a,l),f=u-c;let S,d;u===c?S=0:o===u?S=(a-l)/f:a===u?S=2+(l-o)/f:l===u&&(S=4+(o-a)/f),S=Math.min(S*60,360),S<0&&(S+=360);const _=(c+u)/2;return u===c?d=0:_<=.5?d=f/(u+c):d=f/(2-u-c),[S,d*100,_*100]},n.rgb.hsv=function(i){let o,a,l,c,u;const f=i[0]/255,S=i[1]/255,d=i[2]/255,_=Math.max(f,S,d),p=_-Math.min(f,S,d),g=function(m){return(_-m)/6/p+1/2};return p===0?(c=0,u=0):(u=p/_,o=g(f),a=g(S),l=g(d),f===_?c=l-a:S===_?c=1/3+o-l:d===_&&(c=2/3+a-o),c<0?c+=1:c>1&&(c-=1)),[c*360,u*100,_*100]},n.rgb.hwb=function(i){const o=i[0],a=i[1];let l=i[2];const c=n.rgb.hsl(i)[0],u=1/255*Math.min(o,Math.min(a,l));return l=1-1/255*Math.max(o,Math.max(a,l)),[c,u*100,l*100]},n.rgb.cmyk=function(i){const o=i[0]/255,a=i[1]/255,l=i[2]/255,c=Math.min(1-o,1-a,1-l),u=(1-o-c)/(1-c)||0,f=(1-a-c)/(1-c)||0,S=(1-l-c)/(1-c)||0;return[u*100,f*100,S*100,c*100]};function s(i,o){return(i[0]-o[0])**2+(i[1]-o[1])**2+(i[2]-o[2])**2}return n.rgb.keyword=function(i){const o=t[i];if(o)return o;let a=1/0,l;for(const c of Object.keys(e)){const u=e[c],f=s(i,u);f<a&&(a=f,l=c)}return l},n.keyword.rgb=function(i){return e[i]},n.rgb.xyz=function(i){let o=i[0]/255,a=i[1]/255,l=i[2]/255;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,l=l>.04045?((l+.055)/1.055)**2.4:l/12.92;const c=o*.4124+a*.3576+l*.1805,u=o*.2126+a*.7152+l*.0722,f=o*.0193+a*.1192+l*.9505;return[c*100,u*100,f*100]},n.rgb.lab=function(i){const o=n.rgb.xyz(i);let a=o[0],l=o[1],c=o[2];a/=95.047,l/=100,c/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116,c=c>.008856?c**(1/3):7.787*c+16/116;const u=116*l-16,f=500*(a-l),S=200*(l-c);return[u,f,S]},n.hsl.rgb=function(i){const o=i[0]/360,a=i[1]/100,l=i[2]/100;let c,u,f;if(a===0)return f=l*255,[f,f,f];l<.5?c=l*(1+a):c=l+a-l*a;const S=2*l-c,d=[0,0,0];for(let _=0;_<3;_++)u=o+1/3*-(_-1),u<0&&u++,u>1&&u--,6*u<1?f=S+(c-S)*6*u:2*u<1?f=c:3*u<2?f=S+(c-S)*(2/3-u)*6:f=S,d[_]=f*255;return d},n.hsl.hsv=function(i){const o=i[0];let a=i[1]/100,l=i[2]/100,c=a;const u=Math.max(l,.01);l*=2,a*=l<=1?l:2-l,c*=u<=1?u:2-u;const f=(l+a)/2,S=l===0?2*c/(u+c):2*a/(l+a);return[o,S*100,f*100]},n.hsv.rgb=function(i){const o=i[0]/60,a=i[1]/100;let l=i[2]/100;const c=Math.floor(o)%6,u=o-Math.floor(o),f=255*l*(1-a),S=255*l*(1-a*u),d=255*l*(1-a*(1-u));switch(l*=255,c){case 0:return[l,d,f];case 1:return[S,l,f];case 2:return[f,l,d];case 3:return[f,S,l];case 4:return[d,f,l];case 5:return[l,f,S]}},n.hsv.hsl=function(i){const o=i[0],a=i[1]/100,l=i[2]/100,c=Math.max(l,.01);let u,f;f=(2-a)*l;const S=(2-a)*c;return u=a*c,u/=S<=1?S:2-S,u=u||0,f/=2,[o,u*100,f*100]},n.hwb.rgb=function(i){const o=i[0]/360;let a=i[1]/100,l=i[2]/100;const c=a+l;let u;c>1&&(a/=c,l/=c);const f=Math.floor(6*o),S=1-l;u=6*o-f,f&1&&(u=1-u);const d=a+u*(S-a);let _,p,g;switch(f){default:case 6:case 0:_=S,p=d,g=a;break;case 1:_=d,p=S,g=a;break;case 2:_=a,p=S,g=d;break;case 3:_=a,p=d,g=S;break;case 4:_=d,p=a,g=S;break;case 5:_=S,p=a,g=d;break}return[_*255,p*255,g*255]},n.cmyk.rgb=function(i){const o=i[0]/100,a=i[1]/100,l=i[2]/100,c=i[3]/100,u=1-Math.min(1,o*(1-c)+c),f=1-Math.min(1,a*(1-c)+c),S=1-Math.min(1,l*(1-c)+c);return[u*255,f*255,S*255]},n.xyz.rgb=function(i){const o=i[0]/100,a=i[1]/100,l=i[2]/100;let c,u,f;return c=o*3.2406+a*-1.5372+l*-.4986,u=o*-.9689+a*1.8758+l*.0415,f=o*.0557+a*-.204+l*1.057,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,c=Math.min(Math.max(0,c),1),u=Math.min(Math.max(0,u),1),f=Math.min(Math.max(0,f),1),[c*255,u*255,f*255]},n.xyz.lab=function(i){let o=i[0],a=i[1],l=i[2];o/=95.047,a/=100,l/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;const c=116*a-16,u=500*(o-a),f=200*(a-l);return[c,u,f]},n.lab.xyz=function(i){const o=i[0],a=i[1],l=i[2];let c,u,f;u=(o+16)/116,c=a/500+u,f=u-l/200;const S=u**3,d=c**3,_=f**3;return u=S>.008856?S:(u-16/116)/7.787,c=d>.008856?d:(c-16/116)/7.787,f=_>.008856?_:(f-16/116)/7.787,c*=95.047,u*=100,f*=108.883,[c,u,f]},n.lab.lch=function(i){const o=i[0],a=i[1],l=i[2];let c;c=Math.atan2(l,a)*360/2/Math.PI,c<0&&(c+=360);const f=Math.sqrt(a*a+l*l);return[o,f,c]},n.lch.lab=function(i){const o=i[0],a=i[1],c=i[2]/360*2*Math.PI,u=a*Math.cos(c),f=a*Math.sin(c);return[o,u,f]},n.rgb.ansi16=function(i,o=null){const[a,l,c]=i;let u=o===null?n.rgb.hsv(i)[2]:o;if(u=Math.round(u/50),u===0)return 30;let f=30+(Math.round(c/255)<<2|Math.round(l/255)<<1|Math.round(a/255));return u===2&&(f+=60),f},n.hsv.ansi16=function(i){return n.rgb.ansi16(n.hsv.rgb(i),i[2])},n.rgb.ansi256=function(i){const o=i[0],a=i[1],l=i[2];return o===a&&a===l?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(a/255*5)+Math.round(l/255*5)},n.ansi16.rgb=function(i){let o=i%10;if(o===0||o===7)return i>50&&(o+=3.5),o=o/10.5*255,[o,o,o];const a=(~~(i>50)+1)*.5,l=(o&1)*a*255,c=(o>>1&1)*a*255,u=(o>>2&1)*a*255;return[l,c,u]},n.ansi256.rgb=function(i){if(i>=232){const u=(i-232)*10+8;return[u,u,u]}i-=16;let o;const a=Math.floor(i/36)/5*255,l=Math.floor((o=i%36)/6)/5*255,c=o%6/5*255;return[a,l,c]},n.rgb.hex=function(i){const a=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(a.length)+a},n.hex.rgb=function(i){const o=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let a=o[0];o[0].length===3&&(a=a.split("").map(S=>S+S).join(""));const l=parseInt(a,16),c=l>>16&255,u=l>>8&255,f=l&255;return[c,u,f]},n.rgb.hcg=function(i){const o=i[0]/255,a=i[1]/255,l=i[2]/255,c=Math.max(Math.max(o,a),l),u=Math.min(Math.min(o,a),l),f=c-u;let S,d;return f<1?S=u/(1-f):S=0,f<=0?d=0:c===o?d=(a-l)/f%6:c===a?d=2+(l-o)/f:d=4+(o-a)/f,d/=6,d%=1,[d*360,f*100,S*100]},n.hsl.hcg=function(i){const o=i[1]/100,a=i[2]/100,l=a<.5?2*o*a:2*o*(1-a);let c=0;return l<1&&(c=(a-.5*l)/(1-l)),[i[0],l*100,c*100]},n.hsv.hcg=function(i){const o=i[1]/100,a=i[2]/100,l=o*a;let c=0;return l<1&&(c=(a-l)/(1-l)),[i[0],l*100,c*100]},n.hcg.rgb=function(i){const o=i[0]/360,a=i[1]/100,l=i[2]/100;if(a===0)return[l*255,l*255,l*255];const c=[0,0,0],u=o%1*6,f=u%1,S=1-f;let d=0;switch(Math.floor(u)){case 0:c[0]=1,c[1]=f,c[2]=0;break;case 1:c[0]=S,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=f;break;case 3:c[0]=0,c[1]=S,c[2]=1;break;case 4:c[0]=f,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=S}return d=(1-a)*l,[(a*c[0]+d)*255,(a*c[1]+d)*255,(a*c[2]+d)*255]},n.hcg.hsv=function(i){const o=i[1]/100,a=i[2]/100,l=o+a*(1-o);let c=0;return l>0&&(c=o/l),[i[0],c*100,l*100]},n.hcg.hsl=function(i){const o=i[1]/100,l=i[2]/100*(1-o)+.5*o;let c=0;return l>0&&l<.5?c=o/(2*l):l>=.5&&l<1&&(c=o/(2*(1-l))),[i[0],c*100,l*100]},n.hcg.hwb=function(i){const o=i[1]/100,a=i[2]/100,l=o+a*(1-o);return[i[0],(l-o)*100,(1-l)*100]},n.hwb.hcg=function(i){const o=i[1]/100,l=1-i[2]/100,c=l-o;let u=0;return c<1&&(u=(l-c)/(1-c)),[i[0],c*100,u*100]},n.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]},n.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]},n.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]},n.gray.hsl=function(i){return[0,0,i[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(i){return[0,100,i[0]]},n.gray.cmyk=function(i){return[0,0,0,i[0]]},n.gray.lab=function(i){return[i[0],0,0]},n.gray.hex=function(i){const o=Math.round(i[0]/100*255)&255,l=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(l.length)+l},n.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]},en}var tn,wr;function Ha(){if(wr)return tn;wr=1;const e=ri();function t(){const o={},a=Object.keys(e);for(let l=a.length,c=0;c<l;c++)o[a[c]]={distance:-1,parent:null};return o}function n(o){const a=t(),l=[o];for(a[o].distance=0;l.length;){const c=l.pop(),u=Object.keys(e[c]);for(let f=u.length,S=0;S<f;S++){const d=u[S],_=a[d];_.distance===-1&&(_.distance=a[c].distance+1,_.parent=c,l.unshift(d))}}return a}function s(o,a){return function(l){return a(o(l))}}function i(o,a){const l=[a[o].parent,o];let c=e[a[o].parent][o],u=a[o].parent;for(;a[u].parent;)l.unshift(a[u].parent),c=s(e[a[u].parent][u],c),u=a[u].parent;return c.conversion=l,c}return tn=function(o){const a=n(o),l={},c=Object.keys(a);for(let u=c.length,f=0;f<u;f++){const S=c[f];a[S].parent!==null&&(l[S]=i(S,a))}return l},tn}var nn,Nr;function $a(){if(Nr)return nn;Nr=1;const e=ri(),t=Ha(),n={},s=Object.keys(e);function i(a){const l=function(...c){const u=c[0];return u==null?u:(u.length>1&&(c=u),a(c))};return"conversion"in a&&(l.conversion=a.conversion),l}function o(a){const l=function(...c){const u=c[0];if(u==null)return u;u.length>1&&(c=u);const f=a(c);if(typeof f=="object")for(let S=f.length,d=0;d<S;d++)f[d]=Math.round(f[d]);return f};return"conversion"in a&&(l.conversion=a.conversion),l}return s.forEach(a=>{n[a]={},Object.defineProperty(n[a],"channels",{value:e[a].channels}),Object.defineProperty(n[a],"labels",{value:e[a].labels});const l=t(a);Object.keys(l).forEach(u=>{const f=l[u];n[a][u]=o(f),n[a][u].raw=i(f)})}),nn=n,nn}var rn,Dr;function Za(){if(Dr)return rn;Dr=1;const e=Ua(),t=$a(),n=["keyword","gray","hex"],s={};for(const d of Object.keys(t))s[[...t[d].labels].sort().join("")]=d;const i={};function o(d,_){if(!(this instanceof o))return new o(d,_);if(_&&_ in n&&(_=null),_&&!(_ in t))throw new Error("Unknown model: "+_);let p,g;if(d==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(d instanceof o)this.model=d.model,this.color=[...d.color],this.valpha=d.valpha;else if(typeof d=="string"){const m=e.get(d);if(m===null)throw new Error("Unable to parse color from string: "+d);this.model=m.model,g=t[this.model].channels,this.color=m.value.slice(0,g),this.valpha=typeof m.value[g]=="number"?m.value[g]:1}else if(d.length>0){this.model=_||"rgb",g=t[this.model].channels;const m=Array.prototype.slice.call(d,0,g);this.color=S(m,g),this.valpha=typeof d[g]=="number"?d[g]:1}else if(typeof d=="number")this.model="rgb",this.color=[d>>16&255,d>>8&255,d&255],this.valpha=1;else{this.valpha=1;const m=Object.keys(d);"alpha"in d&&(m.splice(m.indexOf("alpha"),1),this.valpha=typeof d.alpha=="number"?d.alpha:0);const T=m.sort().join("");if(!(T in s))throw new Error("Unable to parse color from object: "+JSON.stringify(d));this.model=s[T];const{labels:C}=t[this.model],O=[];for(p=0;p<C.length;p++)O.push(d[C[p]]);this.color=S(O)}if(i[this.model])for(g=t[this.model].channels,p=0;p<g;p++){const m=i[this.model][p];m&&(this.color[p]=m(this.color[p]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}o.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(d){let _=this.model in e.to?this:this.rgb();_=_.round(typeof d=="number"?d:1);const p=_.valpha===1?_.color:[..._.color,this.valpha];return e.to[_.model](p)},percentString(d){const _=this.rgb().round(typeof d=="number"?d:1),p=_.valpha===1?_.color:[..._.color,this.valpha];return e.to.rgb.percent(p)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const d={},{channels:_}=t[this.model],{labels:p}=t[this.model];for(let g=0;g<_;g++)d[p[g]]=this.color[g];return this.valpha!==1&&(d.alpha=this.valpha),d},unitArray(){const d=this.rgb().color;return d[0]/=255,d[1]/=255,d[2]/=255,this.valpha!==1&&d.push(this.valpha),d},unitObject(){const d=this.rgb().object();return d.r/=255,d.g/=255,d.b/=255,this.valpha!==1&&(d.alpha=this.valpha),d},round(d){return d=Math.max(d||0,0),new o([...this.color.map(l(d)),this.valpha],this.model)},alpha(d){return d!==void 0?new o([...this.color,Math.max(0,Math.min(1,d))],this.model):this.valpha},red:c("rgb",0,u(255)),green:c("rgb",1,u(255)),blue:c("rgb",2,u(255)),hue:c(["hsl","hsv","hsl","hwb","hcg"],0,d=>(d%360+360)%360),saturationl:c("hsl",1,u(100)),lightness:c("hsl",2,u(100)),saturationv:c("hsv",1,u(100)),value:c("hsv",2,u(100)),chroma:c("hcg",1,u(100)),gray:c("hcg",2,u(100)),white:c("hwb",1,u(100)),wblack:c("hwb",2,u(100)),cyan:c("cmyk",0,u(100)),magenta:c("cmyk",1,u(100)),yellow:c("cmyk",2,u(100)),black:c("cmyk",3,u(100)),x:c("xyz",0,u(95.047)),y:c("xyz",1,u(100)),z:c("xyz",2,u(108.833)),l:c("lab",0,u(100)),a:c("lab",1),b:c("lab",2),keyword(d){return d!==void 0?new o(d):t[this.model].keyword(this.color)},hex(d){return d!==void 0?new o(d):e.to.hex(this.rgb().round().color)},hexa(d){if(d!==void 0)return new o(d);const _=this.rgb().round().color;let p=Math.round(this.valpha*255).toString(16).toUpperCase();return p.length===1&&(p="0"+p),e.to.hex(_)+p},rgbNumber(){const d=this.rgb().color;return(d[0]&255)<<16|(d[1]&255)<<8|d[2]&255},luminosity(){const d=this.rgb().color,_=[];for(const[p,g]of d.entries()){const m=g/255;_[p]=m<=.04045?m/12.92:((m+.055)/1.055)**2.4}return .2126*_[0]+.7152*_[1]+.0722*_[2]},contrast(d){const _=this.luminosity(),p=d.luminosity();return _>p?(_+.05)/(p+.05):(p+.05)/(_+.05)},level(d){const _=this.contrast(d);return _>=7?"AAA":_>=4.5?"AA":""},isDark(){const d=this.rgb().color;return(d[0]*2126+d[1]*7152+d[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const d=this.rgb();for(let _=0;_<3;_++)d.color[_]=255-d.color[_];return d},lighten(d){const _=this.hsl();return _.color[2]+=_.color[2]*d,_},darken(d){const _=this.hsl();return _.color[2]-=_.color[2]*d,_},saturate(d){const _=this.hsl();return _.color[1]+=_.color[1]*d,_},desaturate(d){const _=this.hsl();return _.color[1]-=_.color[1]*d,_},whiten(d){const _=this.hwb();return _.color[1]+=_.color[1]*d,_},blacken(d){const _=this.hwb();return _.color[2]+=_.color[2]*d,_},grayscale(){const d=this.rgb().color,_=d[0]*.3+d[1]*.59+d[2]*.11;return o.rgb(_,_,_)},fade(d){return this.alpha(this.valpha-this.valpha*d)},opaquer(d){return this.alpha(this.valpha+this.valpha*d)},rotate(d){const _=this.hsl();let p=_.color[0];return p=(p+d)%360,p=p<0?360+p:p,_.color[0]=p,_},mix(d,_){if(!d||!d.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof d);const p=d.rgb(),g=this.rgb(),m=_===void 0?.5:_,T=2*m-1,C=p.alpha()-g.alpha(),O=((T*C===-1?T:(T+C)/(1+T*C))+1)/2,b=1-O;return o.rgb(O*p.red()+b*g.red(),O*p.green()+b*g.green(),O*p.blue()+b*g.blue(),p.alpha()*m+g.alpha()*(1-m))}};for(const d of Object.keys(t)){if(n.includes(d))continue;const{channels:_}=t[d];o.prototype[d]=function(...p){return this.model===d?new o(this):p.length>0?new o(p,d):new o([...f(t[this.model][d].raw(this.color)),this.valpha],d)},o[d]=function(...p){let g=p[0];return typeof g=="number"&&(g=S(p,_)),new o(g,d)}}function a(d,_){return Number(d.toFixed(_))}function l(d){return function(_){return a(_,d)}}function c(d,_,p){d=Array.isArray(d)?d:[d];for(const g of d)(i[g]||(i[g]=[]))[_]=p;return d=d[0],function(g){let m;return g!==void 0?(p&&(g=p(g)),m=this[d](),m.color[_]=g,m):(m=this[d]().color[_],p&&(m=p(m)),m)}}function u(d){return function(_){return Math.max(0,Math.min(d,_))}}function f(d){return Array.isArray(d)?d:[d]}function S(d,_){for(let p=0;p<_;p++)typeof d[p]!="number"&&(d[p]=0);return d}return rn=o,rn}var Ya=Za();const Va=$s(Ya),si=({size:e,color:t=r.ColorPalettes.Primary5,text:n})=>{let s=r.COLOR_VALUES[r.ColorPalettes.Grey10];if(n&&n!==""&&typeof t=="string"){const i=Va(t);i.luminosity()>.5?s=i.darken(.8).hex():s=i.lighten(.35).hex()}return h.jsx(Y,{children:n&&h.jsx(I,{marginTop:r.TAG_SIZE[e].margins.marginTop,marginBottom:r.TAG_SIZE[e].margins.marginBottom,marginLeft:r.TAG_SIZE[e].margins.marginLeft,marginRight:r.TAG_SIZE[e].margins.marginRight,style:{width:r.TAG_SIZE[e].width,height:r.TAG_SIZE[e].height,borderRadius:"50%",backgroundColor:typeof t=="number"?r.COLOR_VALUES[t]:t,color:s},children:h.jsx(q,{children:n})})})},Xa=(e,t)=>{const[n,s]=E.useState(e);return E.useEffect(()=>{const i=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(i)}},[e,t]),n};function Ft(){return(Ft=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}function ii(e,t){if(e==null)return{};var n,s,i={},o=Object.keys(e);for(s=0;s<o.length;s++)t.indexOf(n=o[s])>=0||(i[n]=e[n]);return i}function An(e){var t=E.useRef(e),n=E.useRef(function(s){t.current&&t.current(s)});return t.current=e,n.current}var rt=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},Ve=function(e){return"touches"in e},Cn=function(e){return e&&e.ownerDocument.defaultView||self},jr=function(e,t,n){var s=e.getBoundingClientRect(),i=Ve(t)?function(o,a){for(var l=0;l<o.length;l++)if(o[l].identifier===a)return o[l];return o[0]}(t.touches,n):t;return{left:rt((i.pageX-(s.left+Cn(e).pageXOffset))/s.width),top:rt((i.pageY-(s.top+Cn(e).pageYOffset))/s.height)}},Mr=function(e){!Ve(e)&&e.preventDefault()},oi=E.memo(function(e){var t=e.onMove,n=e.onKey,s=ii(e,["onMove","onKey"]),i=E.useRef(null),o=An(t),a=An(n),l=E.useRef(null),c=E.useRef(!1),u=E.useMemo(function(){var _=function(m){Mr(m),(Ve(m)?m.touches.length>0:m.buttons>0)&&i.current?o(jr(i.current,m,l.current)):g(!1)},p=function(){return g(!1)};function g(m){var T=c.current,C=Cn(i.current),O=m?C.addEventListener:C.removeEventListener;O(T?"touchmove":"mousemove",_),O(T?"touchend":"mouseup",p)}return[function(m){var T=m.nativeEvent,C=i.current;if(C&&(Mr(T),!function(b,L){return L&&!Ve(b)}(T,c.current)&&C)){if(Ve(T)){c.current=!0;var O=T.changedTouches||[];O.length&&(l.current=O[0].identifier)}C.focus(),o(jr(C,T,l.current)),g(!0)}},function(m){var T=m.which||m.keyCode;T<37||T>40||(m.preventDefault(),a({left:T===39?.05:T===37?-.05:0,top:T===40?.05:T===38?-.05:0}))},g]},[a,o]),f=u[0],S=u[1],d=u[2];return E.useEffect(function(){return d},[d]),E.createElement("div",Ft({},s,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:S,tabIndex:0,role:"slider"}))}),Vn=function(e){return e.filter(Boolean).join(" ")},ai=function(e){var t=e.color,n=e.left,s=e.top,i=s===void 0?.5:s,o=Vn(["react-colorful__pointer",e.className]);return E.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},E.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Q=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Wa=function(e){return ec(On(e))},On=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Q(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Q(parseInt(e.substring(6,8),16)/255,2):1}},qa=function(e){return Ja(Qa(e))},Ka=function(e){var t=e.s,n=e.v,s=e.a,i=(200-t)*n/100;return{h:Q(e.h),s:Q(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Q(i/2),a:Q(s,2)}},Ln=function(e){var t=Ka(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Qa=function(e){var t=e.h,n=e.s,s=e.v,i=e.a;t=t/360*6,n/=100,s/=100;var o=Math.floor(t),a=s*(1-n),l=s*(1-(t-o)*n),c=s*(1-(1-t+o)*n),u=o%6;return{r:Q(255*[s,l,a,a,c,s][u]),g:Q(255*[c,s,s,l,a,a][u]),b:Q(255*[a,a,c,s,s,l][u]),a:Q(i,2)}},_t=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ja=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,o=i<1?_t(Q(255*i)):"";return"#"+_t(t)+_t(n)+_t(s)+o},ec=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,o=Math.max(t,n,s),a=o-Math.min(t,n,s),l=a?o===t?(n-s)/a:o===n?2+(s-t)/a:4+(t-n)/a:0;return{h:Q(60*(l<0?l+6:l)),s:Q(o?a/o*100:0),v:Q(o/255*100),a:i}},tc=E.memo(function(e){var t=e.hue,n=e.onChange,s=Vn(["react-colorful__hue",e.className]);return E.createElement("div",{className:s},E.createElement(oi,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:rt(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Q(t),"aria-valuemax":"360","aria-valuemin":"0"},E.createElement(ai,{className:"react-colorful__hue-pointer",left:t/360,color:Ln({h:t,s:100,v:100,a:1})})))}),nc=E.memo(function(e){var t=e.hsva,n=e.onChange,s={backgroundColor:Ln({h:t.h,s:100,v:100,a:1})};return E.createElement("div",{className:"react-colorful__saturation",style:s},E.createElement(oi,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:rt(t.s+100*i.left,0,100),v:rt(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Q(t.s)+"%, Brightness "+Q(t.v)+"%"},E.createElement(ai,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Ln(t)})))}),ci=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},rc=function(e,t){return e.toLowerCase()===t.toLowerCase()||ci(On(e),On(t))};function sc(e,t,n){var s=An(n),i=E.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],l=E.useRef({color:t,hsva:o});E.useEffect(function(){if(!e.equal(t,l.current.color)){var u=e.toHsva(t);l.current={hsva:u,color:t},a(u)}},[t,e]),E.useEffect(function(){var u;ci(o,l.current.hsva)||e.equal(u=e.fromHsva(o),l.current.color)||(l.current={hsva:o,color:u},s(u))},[o,e,s]);var c=E.useCallback(function(u){a(function(f){return Object.assign({},f,u)})},[]);return[o,c]}var ic=typeof window<"u"?E.useLayoutEffect:E.useEffect,oc=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Pr=new Map,ac=function(e){ic(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Pr.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Pr.set(t,n);var s=oc();s&&n.setAttribute("nonce",s),t.head.appendChild(n)}},[])},cc=function(e){var t=e.className,n=e.colorModel,s=e.color,i=s===void 0?n.defaultColor:s,o=e.onChange,a=ii(e,["className","colorModel","color","onChange"]),l=E.useRef(null);ac(l);var c=sc(n,i,o),u=c[0],f=c[1],S=Vn(["react-colorful",t]);return E.createElement("div",Ft({},a,{ref:l,className:S}),E.createElement(nc,{hsva:u,onChange:f}),E.createElement(tc,{hue:u.h,onChange:f,className:"react-colorful__last-control"}))},uc={defaultColor:"000",toHsva:Wa,fromHsva:function(e){return qa({h:e.h,s:e.s,v:e.v,a:1})},equal:rc},lc=function(e){return E.createElement(cc,Ft({},e,{colorModel:uc}))};const Xn=e=>{const t=E.useRef();return E.useEffect(()=>{const n=s=>{t.current&&(t.current.contains(s.target)||e())};return document&&document.addEventListener("mousedown",n),()=>{document&&document.removeEventListener("mousedown",n)}}),t},fc="_colorfulcontainer_1kkrb_1",dc="_absolute_1kkrb_2",hc={colorfulcontainer:fc,absolute:dc,"react-colorful":"_react-colorful_1kkrb_8","react-colorful__saturation":"_react-colorful__saturation_1kkrb_13","react-colorful__hue":"_react-colorful__hue_1kkrb_18","react-colorful__hue-pointer":"_react-colorful__hue-pointer_1kkrb_25"},Sc=({position:e,selectColor:t,closePicker:n,handleColorChange:s})=>{const i=Xn(()=>{n&&n(!1)});return h.jsx("div",{ref:i,style:{position:e},children:h.jsx(Y,{display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,children:h.jsx(I,{children:h.jsx(I,{className:hc.colorfulcontainer,children:h.jsx(lc,{color:t,onChange:s})})})})})},_c=({defaultColor:e="#eeeeee",setInput:t,setColor:n,inputName:s=void 0,closePicker:i=void 0,position:o="absolute"})=>{const[a,l]=E.useState(e||"#eee");E.useEffect(()=>{l(e||"#eee")},[e]);const c=f=>{l(f)},u=Xa(a,250);return E.useEffect(()=>{n&&n(u),t&&t(f=>({...f,[`${s||"edit_color"}`]:u}))},[u,s,t,n]),h.jsxs("div",{children:[h.jsxs("div",{className:"title",children:[h.jsx("span",{children:"Choose color: "}),h.jsx(si,{color:a,size:r.TagColorSizes.Large})]}),h.jsx(Sc,{selectColor:a,handleColorChange:c,position:o,closePicker:i})]})};function pc(e,t=()=>{},n="keydown"){const s=i=>{i.key===e&&t()};E.useEffect(()=>(document&&document.addEventListener(n,s,!1),()=>{document&&document.removeEventListener(n,s,!1)}),[n])}const Wn={[r.Portals.GlobalEventNotification]:{id:"#papnot",html:h.jsx("div",{id:"papnot"})},[r.Portals.Modals]:{id:"#pmodmodify",html:h.jsx("div",{id:"pmodmodify"})}},gc=({children:e})=>{const[t,n]=E.useState(!1);return E.useEffect(()=>(n(!0),()=>{n(!1)}),[]),t?In.createPortal(e,document.querySelector(Wn[r.Portals.Modals].id)||document.body):null},mc="_modalBgAnimated_o2uzj_11",Ec="_modalCardCopyOriAnimated_o2uzj_18",Tc="_wrapperContainer_o2uzj_49",Xe={modalBgAnimated:mc,modalCardCopyOriAnimated:Ec,"no-card":"_no-card_o2uzj_38",wrapperContainer:Tc},yc=({isShown:e,modalBackground:t})=>ue(e,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}})((s,i)=>i&&h.jsx(I,{className:Xe.modalBgAnimated,style:{...s,backgroundColor:t?`${r.COLOR_VALUES[t]}${r.COLOR_RGBA_ALPHA[r.ColorRGBAAlphas.Dark3]}`:"#0000007f"}}));function Ac(e,t,n){return Math.max(t,Math.min(e,n))}const K={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 kr(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function Fr(e,t,n,s=.15){return s===0?Ac(e,t,n):e<t?-kr(t-e,n-t,s)+t:e>n?+kr(e-n,n-t,s)+n:e}function Cc(e,[t,n],[s,i]){const[[o,a],[l,c]]=e;return[Fr(t,o,a,s),Fr(n,l,c,i)]}function Oc(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lc(e){var t=Oc(e,"string");return typeof t=="symbol"?t:String(t)}function J(e,t,n){return t=Lc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,s)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Br(Object(n),!0).forEach(function(s){J(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Br(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}const ui={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 zr(e){return e?e[0].toUpperCase()+e.slice(1):""}const vc=["enter","leave"];function bc(e=!1,t){return e&&!vc.includes(t)}function Ic(e,t="",n=!1){const s=ui[e],i=s&&s[t]||t;return"on"+zr(e)+zr(i)+(bc(n,i)?"Capture":"")}const xc=["gotpointercapture","lostpointercapture"];function Rc(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const s=xc.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(s);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:n}}function wc(e,t=""){const n=ui[e],s=n&&n[t]||t;return e+s}function Bt(e){return"touches"in e}function li(e){return Bt(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function Nc(e){return Array.from(e.touches).filter(t=>{var n,s;return t.target===e.currentTarget||((n=e.currentTarget)===null||n===void 0||(s=n.contains)===null||s===void 0?void 0:s.call(n,t.target))})}function Dc(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function fi(e){return Bt(e)?Dc(e)[0]:e}function vn(e,t){try{const n=t.clientX-e.clientX,s=t.clientY-e.clientY,i=(t.clientX+e.clientX)/2,o=(t.clientY+e.clientY)/2,a=Math.hypot(n,s);return{angle:-(Math.atan2(n,s)*180)/Math.PI,distance:a,origin:[i,o]}}catch{}return null}function jc(e){return Nc(e).map(t=>t.identifier)}function Gr(e,t){const[n,s]=Array.from(e.touches).filter(i=>t.includes(i.identifier));return vn(n,s)}function sn(e){const t=fi(e);return Bt(e)?t.identifier:t.pointerId}function Ur(e){const t=fi(e);return[t.clientX,t.clientY]}const Hr=40,$r=800;function Mc(e){let{deltaX:t,deltaY:n,deltaMode:s}=e;return s===1?(t*=Hr,n*=Hr):s===2&&(t*=$r,n*=$r),[t,n]}function Pc(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:s,metaKey:i,ctrlKey:o}=e;Object.assign(t,{shiftKey:n,altKey:s,metaKey:i,ctrlKey:o})}return t}function Lt(e,...t){return typeof e=="function"?e(...t):e}function kc(){}function Fc(...e){return e.length===0?kc:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function Zr(e,t){return Object.assign({},t,e||{})}const Bc=32;class di{constructor(t,n,s){this.ctrl=t,this.args=n,this.key=s,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:n,ingKey:s,args:i}=this;n[s]=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 n=this.state,s=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=t.target,n.currentTarget=t.currentTarget,n.lastOffset=s.from?Lt(s.from,n):n.offset,n.offset=n.lastOffset,n.startTime=n.timeStamp=t.timeStamp)}computeValues(t){const n=this.state;n._values=t,n.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:n,config:s,shared:i}=this;n.args=this.args;let o=0;if(t&&(n.event=t,s.preventDefault&&t.cancelable&&n.event.preventDefault(),n.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,Pc(t)),i.down=i.pressed=i.buttons%2===1||i.touches>0,o=t.timeStamp-n.timeStamp,n.timeStamp=t.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const R=n._delta.map(Math.abs);K.addTo(n._distance,R)}this.axisIntent&&this.axisIntent(t);const[a,l]=n._movement,[c,u]=s.threshold,{_step:f,values:S}=n;if(s.hasCustomTransform?(f[0]===!1&&(f[0]=Math.abs(a)>=c&&S[0]),f[1]===!1&&(f[1]=Math.abs(l)>=u&&S[1])):(f[0]===!1&&(f[0]=Math.abs(a)>=c&&Math.sign(a)*c),f[1]===!1&&(f[1]=Math.abs(l)>=u&&Math.sign(l)*u)),n.intentional=f[0]!==!1||f[1]!==!1,!n.intentional)return;const d=[0,0];if(s.hasCustomTransform){const[R,N]=S;d[0]=f[0]!==!1?R-f[0]:0,d[1]=f[1]!==!1?N-f[1]:0}else d[0]=f[0]!==!1?a-f[0]:0,d[1]=f[1]!==!1?l-f[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(d);const _=n.offset,p=n._active&&!n._blocked||n.active;p&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=i[this.ingKey]=n._active,t&&(n.first&&("bounds"in s&&(n._bounds=Lt(s.bounds,n)),this.setup&&this.setup()),n.movement=d,this.computeOffset()));const[g,m]=n.offset,[[T,C],[O,b]]=n._bounds;n.overflow=[g<T?-1:g>C?1:0,m<O?-1:m>b?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const L=n._active?s.rubberband||[0,0]:[0,0];if(n.offset=Cc(n._bounds,n.offset,L),n.delta=K.sub(n.offset,_),this.computeMovement(),p&&(!n.last||o>Bc)){n.delta=K.sub(n.offset,_);const R=n.delta.map(Math.abs);K.addTo(n.distance,R),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&o>0&&(n.velocity=[R[0]/o,R[1]/o],n.timeDelta=o)}}emit(){const t=this.state,n=this.shared,s=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!s.triggerAllEvents)return;const i=this.handler(X(X(X({},n),t),{},{[this.aliasKey]:t.values}));i!==void 0&&(t.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function zc([e,t],n){const s=Math.abs(e),i=Math.abs(t);if(s>i&&s>n)return"x";if(i>s&&i>n)return"y"}class Gc extends di{constructor(...t){super(...t),J(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=K.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=K.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const n=this.state,s=this.config;if(!n.axis&&t){const i=typeof s.axisThreshold=="object"?s.axisThreshold[li(t)]:s.axisThreshold;n.axis=zc(n._movement,i)}n._blocked=(s.lockDirection||!!s.axis)&&!n.axis||!!s.axis&&s.axis!==n.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 Yr=e=>e,Vr=.15,qn={enabled(e=!0){return e},eventOptions(e,t,n){return X(X({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[Vr,Vr];case!1:return[0,0];default:return K.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return K.toVector(e)},transform(e,t,n){const s=e||n.shared.transform;if(this.hasCustomTransform=!!s,process.env.NODE_ENV==="development"){const i=s||Yr;return o=>{const a=i(o);return(!isFinite(a[0])||!isFinite(a[1]))&&console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${a[0]},${[1]}]`),a}}return s||Yr},threshold(e){return K.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(qn,{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 Uc=0,ot=X(X({},qn),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=Uc){return e},bounds(e={}){if(typeof e=="function")return o=>ot.bounds(e(o));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:s=-1/0,bottom:i=1/0}=e;return[[t,n],[s,i]]}}),Xr={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 Hc extends Gc{constructor(...t){super(...t),J(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 n=t._bounds.getBoundingClientRect(),s=t.currentTarget.getBoundingClientRect(),i={left:n.left-s.left+t.offset[0],right:n.right-s.right+t.offset[0],top:n.top-s.top+t.offset[1],bottom:n.bottom-s.bottom+t.offset[1]};t._bounds=ot.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 n=this.config,s=this.state;if(t.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(t.buttons):n.pointerButtons!==-1&&n.pointerButtons!==t.buttons))return;const i=this.ctrl.setEventIds(t);n.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(i&&i.size>1&&s._pointerActive)&&(this.start(t),this.setupPointer(t),s._pointerId=sn(t),s._pointerActive=!0,this.computeValues(Ur(t)),this.computeInitial(),n.preventScrollAxis&&li(t)!=="mouse"?(s._active=!1,this.setupScrollPrevention(t)):n.delay>0?(this.setupDelayTrigger(t),n.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const n=this.state,s=this.config;if(!n._pointerActive)return;const i=sn(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;const o=Ur(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=K.sub(o,n._values),this.computeValues(o)),K.addTo(n._movement,n._delta),this.compute(t),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(t);return}if(s.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===s.preventScrollAxis||s.preventScrollAxis==="xy"){n._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 n=this.state,s=this.config;if(!n._active||!n._pointerActive)return;const i=sn(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[o,a]=n._distance;if(n.tap=o<=s.tapsThreshold&&a<=s.tapsThreshold,n.tap&&s.filterTaps)n._force=!0;else{const[l,c]=n._delta,[u,f]=n._movement,[S,d]=s.swipe.velocity,[_,p]=s.swipe.distance,g=s.swipe.duration;if(n.elapsedTime<g){const m=Math.abs(l/n.timeDelta),T=Math.abs(c/n.timeDelta);m>S&&Math.abs(u)>_&&(n.swipe[0]=Math.sign(l)),T>d&&Math.abs(f)>p&&(n.swipe[1]=Math.sign(c))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const n=this.config,s=n.device;if(process.env.NODE_ENV==="development")try{if(s==="pointer"&&n.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{}n.pointerLock&&t.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,s,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,s,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,s,"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,$c(t);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),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 n=Xr[t.key];if(n){const s=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),s._delta=n(this.config.keyboardDisplacement,i),s._keyboardActive=!0,K.addTo(s._movement,s._delta),this.compute(t),this.emit()}}keyUp(t){t.key in Xr&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const n=this.config.device;t(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(n,"change",this.pointerMove.bind(this)),t(n,"end",this.pointerUp.bind(this)),t(n,"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 $c(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const at=typeof window<"u"&&window.document&&window.document.createElement;function hi(){return at&&"ontouchstart"in window}function Zc(){return hi()||at&&window.navigator.maxTouchPoints>1}function Yc(){return at&&"onpointerdown"in window}function Vc(){return at&&"exitPointerLock"in window.document}function Xc(){try{return"constructor"in GestureEvent}catch{return!1}}const ae={isBrowser:at,gesture:Xc(),touch:hi(),touchscreen:Zc(),pointer:Yc(),pointerLock:Vc()},Wc=250,qc=180,Kc=.5,Qc=50,Jc=250,eu=10,Wr={mouse:0,touch:0,pen:8},Si=X(X({},ot),{},{device(e,t,{pointer:{touch:n=!1,lock:s=!1,mouse:i=!1}={}}){return this.pointerLock=s&&ae.pointerLock,ae.touch&&n?"touch":this.pointerLock?"mouse":ae.pointer&&!i?"pointer":ae.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&e?Wc:void 0,!(!ae.touchscreen||n===!1))return e||(n!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:s=1,keys:i=!0}={}}){return this.pointerButtons=s,this.keys=i,!this.pointerLock&&this.device==="pointer"&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:s=3,axis:i=void 0}){const o=K.toVector(e,n?s:i?1:0);return this.filterTaps=n,this.tapsThreshold=s,o},swipe({velocity:e=Kc,distance:t=Qc,duration:n=Jc}={}){return{velocity:this.transform(K.toVector(e)),distance:this.transform(K.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return qc;case!1:return 0;default:return e}},axisThreshold(e){return e?X(X({},Wr),e):Wr},keyboardDisplacement(e=eu){return e}});process.env.NODE_ENV==="development"&&Object.assign(Si,{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}});function tu(e){const[t,n]=e.overflow,[s,i]=e._delta,[o,a]=e._direction;(t<0&&s>0&&o<0||t>0&&s<0&&o>0)&&(e._movement[0]=e._movementBound[0]),(n<0&&i>0&&a<0||n>0&&i<0&&a>0)&&(e._movement[1]=e._movementBound[1])}const nu=30,ru=100;class su extends di{constructor(...t){super(...t),J(this,"ingKey","pinching"),J(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const t=this.state;t._touchIds=[],t.canceled=!1,t.cancel=this.cancel.bind(this),t.turns=0}computeOffset(){const{type:t,movement:n,lastOffset:s}=this.state;t==="wheel"?this.state.offset=K.add(n,s):this.state.offset=[(1+n[0])*s[0],n[1]+s[1]]}computeMovement(){const{offset:t,lastOffset:n}=this.state;this.state.movement=[t[0]/n[0],t[1]-n[1]]}axisIntent(){const t=this.state,[n,s]=t._movement;if(!t.axis){const i=Math.abs(n)*nu-Math.abs(s);i<0?t.axis="angle":i>0&&(t.axis="scale")}}restrictToAxis(t){this.config.lockDirection&&(this.state.axis==="scale"?t[1]=0:this.state.axis==="angle"&&(t[0]=0))}cancel(){const t=this.state;t.canceled||setTimeout(()=>{t.canceled=!0,t._active=!1,this.compute(),this.emit()},0)}touchStart(t){this.ctrl.setEventIds(t);const n=this.state,s=this.ctrl.touchIds;if(n._active&&n._touchIds.every(o=>s.has(o))||s.size<2)return;this.start(t),n._touchIds=Array.from(s).slice(0,2);const i=Gr(t,n._touchIds);i&&this.pinchStart(t,i)}pointerStart(t){if(t.buttons!=null&&t.buttons%2!==1)return;this.ctrl.setEventIds(t),t.target.setPointerCapture(t.pointerId);const n=this.state,s=n._pointerEvents,i=this.ctrl.pointerIds;if(n._active&&Array.from(s.keys()).every(a=>i.has(a))||(s.size<2&&s.set(t.pointerId,t),n._pointerEvents.size<2))return;this.start(t);const o=vn(...Array.from(s.values()));o&&this.pinchStart(t,o)}pinchStart(t,n){const s=this.state;s.origin=n.origin,this.computeValues([n.distance,n.angle]),this.computeInitial(),this.compute(t),this.emit()}touchMove(t){if(!this.state._active)return;const n=Gr(t,this.state._touchIds);n&&this.pinchMove(t,n)}pointerMove(t){const n=this.state._pointerEvents;if(n.has(t.pointerId)&&n.set(t.pointerId,t),!this.state._active)return;const s=vn(...Array.from(n.values()));s&&this.pinchMove(t,s)}pinchMove(t,n){const s=this.state,i=s._values[1],o=n.angle-i;let a=0;Math.abs(o)>270&&(a+=Math.sign(o)),this.computeValues([n.distance,n.angle-360*a]),s.origin=n.origin,s.turns=a,s._movement=[s._values[0]/s._initial[0]-1,s._values[1]-s._initial[1]],this.compute(t),this.emit()}touchEnd(t){this.ctrl.setEventIds(t),this.state._active&&this.state._touchIds.some(n=>!this.ctrl.touchIds.has(n))&&(this.state._active=!1,this.compute(t),this.emit())}pointerEnd(t){const n=this.state;this.ctrl.setEventIds(t);try{t.target.releasePointerCapture(t.pointerId)}catch{}n._pointerEvents.has(t.pointerId)&&n._pointerEvents.delete(t.pointerId),n._active&&n._pointerEvents.size<2&&(n._active=!1,this.compute(t),this.emit())}gestureStart(t){t.cancelable&&t.preventDefault();const n=this.state;n._active||(this.start(t),this.computeValues([t.scale,t.rotation]),n.origin=[t.clientX,t.clientY],this.compute(t),this.emit())}gestureMove(t){if(t.cancelable&&t.preventDefault(),!this.state._active)return;const n=this.state;this.computeValues([t.scale,t.rotation]),n.origin=[t.clientX,t.clientY];const s=n._movement;n._movement=[t.scale-1,t.rotation],n._delta=K.sub(n._movement,s),this.compute(t),this.emit()}gestureEnd(t){this.state._active&&(this.state._active=!1,this.compute(t),this.emit())}wheel(t){const n=this.config.modifierKey;n&&(Array.isArray(n)?!n.find(s=>t[s]):!t[n])||(this.state._active?this.wheelChange(t):this.wheelStart(t),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(t){this.start(t),this.wheelChange(t)}wheelChange(t){"uv"in t||(t.cancelable&&t.preventDefault(),process.env.NODE_ENV==="development"&&!t.defaultPrevented&&console.warn("[@use-gesture]: To properly support zoom on trackpads, try using the `target` option.\n\nThis message will only appear in development mode."));const s=this.state;s._delta=[-Mc(t)[1]/ru*s.offset[0],0],K.addTo(s._movement,s._delta),tu(s),this.state.origin=[t.clientX,t.clientY],this.compute(t),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(t){const n=this.config.device;n&&(t(n,"start",this[n+"Start"].bind(this)),t(n,"change",this[n+"Move"].bind(this)),t(n,"end",this[n+"End"].bind(this)),t(n,"cancel",this[n+"End"].bind(this)),t("lostPointerCapture","",this[n+"End"].bind(this))),this.config.pinchOnWheel&&t("wheel","",this.wheel.bind(this),{passive:!1})}}const iu=X(X({},qn),{},{device(e,t,{shared:n,pointer:{touch:s=!1}={}}){if(n.target&&!ae.touch&&ae.gesture)return"gesture";if(ae.touch&&s)return"touch";if(ae.touchscreen){if(ae.pointer)return"pointer";if(ae.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:s={}}){const i=a=>{const l=Zr(Lt(n,a),{min:-1/0,max:1/0});return[l.min,l.max]},o=a=>{const l=Zr(Lt(s,a),{min:-1/0,max:1/0});return[l.min,l.max]};return typeof n!="function"&&typeof s!="function"?[i(),o()]:a=>[i(a),o(a)]},threshold(e,t,n){return this.lockDirection=n.axis==="lock",K.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});X(X({},ot),{},{mouseOnly:(e=!0)=>e});X(X({},ot),{},{mouseOnly:(e=!0)=>e});const Kn=new Map,bn=new Map;function _i(e){Kn.set(e.key,e.engine),bn.set(e.key,e.resolver)}const pi={key:"drag",engine:Hc,resolver:Si},ou={key:"pinch",engine:su,resolver:iu};function au(e,t){if(e==null)return{};var n={},s=Object.keys(e),i,o;for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function cu(e,t){if(e==null)return{};var n=au(e,t),s,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)s=o[i],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}const uu={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=ae.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},lu=["target","eventOptions","window","enabled","transform"];function Et(e={},t){const n={};for(const[s,i]of Object.entries(t))switch(typeof i){case"function":if(process.env.NODE_ENV==="development"){const o=i.call(n,e[s],s,e);Number.isNaN(o)||(n[s]=o)}else n[s]=i.call(n,e[s],s,e);break;case"object":n[s]=Et(e[s],i);break;case"boolean":i&&(n[s]=e[s]);break}return n}function fu(e,t,n={}){const s=e,{target:i,eventOptions:o,window:a,enabled:l,transform:c}=s,u=cu(s,lu);if(n.shared=Et({target:i,eventOptions:o,window:a,enabled:l,transform:c},uu),t){const f=bn.get(t);n[t]=Et(X({shared:n.shared},u),f)}else for(const f in u){const S=bn.get(f);if(S)n[f]=Et(X({shared:n.shared},u[f]),S);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(f)){if(f==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");console.warn(`[@use-gesture]: Unknown config key \`${f}\` was used. Please read the documentation for further information.`)}}return n}class gi{constructor(t,n){J(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,s,i,o){const a=this._listeners,l=wc(n,s),c=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},u=X(X({},c),o);t.addEventListener(l,i,u);const f=()=>{t.removeEventListener(l,i,u),a.delete(f)};return a.add(f),f}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class du{constructor(){J(this,"_timeouts",new Map)}add(t,n,s=140,...i){this.remove(t),this._timeouts.set(t,window.setTimeout(n,s,...i))}remove(t){const n=this._timeouts.get(t);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class hu{constructor(t){J(this,"gestures",new Set),J(this,"_targetEventStore",new gi(this)),J(this,"gestureEventStores",{}),J(this,"gestureTimeoutStores",{}),J(this,"handlers",{}),J(this,"config",{}),J(this,"pointerIds",new Set),J(this,"touchIds",new Set),J(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Su(this,t)}setEventIds(t){if(Bt(t))return this.touchIds=new Set(jc(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,n){this.handlers=t,this.nativeHandlers=n}applyConfig(t,n){this.config=fu(t,n,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 n=this.config.shared,s={};let i;if(!(n.target&&(i=n.target(),!i))){if(n.enabled){for(const a of this.gestures){const l=this.config[a],c=qr(s,l.eventOptions,!!i);if(l.enabled){const u=Kn.get(a);new u(this,t,a).bind(c)}}const o=qr(s,n.eventOptions,!!i);for(const a in this.nativeHandlers)o(a,"",l=>this.nativeHandlers[a](X(X({},this.state.shared),{},{event:l,args:t})),void 0,!0)}for(const o in s)s[o]=Fc(...s[o]);if(!i)return s;for(const o in s){const{device:a,capture:l,passive:c}=Rc(o);this._targetEventStore.add(i,a,"",s[o],{capture:l,passive:c})}}}}function we(e,t){e.gestures.add(t),e.gestureEventStores[t]=new gi(e,t),e.gestureTimeoutStores[t]=new du}function Su(e,t){t.drag&&we(e,"drag"),t.wheel&&we(e,"wheel"),t.scroll&&we(e,"scroll"),t.move&&we(e,"move"),t.pinch&&we(e,"pinch"),t.hover&&we(e,"hover")}const qr=(e,t,n)=>(s,i,o,a={},l=!1)=>{var c,u;const f=(c=a.capture)!==null&&c!==void 0?c:t.capture,S=(u=a.passive)!==null&&u!==void 0?u:t.passive;let d=l?s:Ic(s,i,f);n&&S&&(d+="Passive"),e[d]=e[d]||[],e[d].push(o)},_u=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function pu(e){const t={},n={},s=new Set;for(let i in e)_u.test(i)?(s.add(RegExp.lastMatch),n[i]=e[i]):t[i]=e[i];return[n,t,s]}function Ne(e,t,n,s,i,o){if(!e.has(n))return;if(!Kn.has(s)){process.env.NODE_ENV==="development"&&console.warn(`[@use-gesture]: You've created a custom handler that that uses the \`${s}\` gesture but isn't properly configured.
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),E=require("react"),bn=require("react-dom"),r=require("./types-B-Wi5X54.cjs");function vi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const He=vi(E);var xn=ot(),z=e=>it(e,xn),Rn=ot();z.write=e=>it(e,Rn);var vt=ot();z.onStart=e=>it(e,vt);var wn=ot();z.onFrame=e=>it(e,wn);var Nn=ot();z.onFinish=e=>it(e,Nn);var je=[];z.setTimeout=(e,t)=>{const n=z.now()+t,s=()=>{const o=je.findIndex(a=>a.cancel==s);~o&&je.splice(o,1),Le-=~o?1:0},i={time:n,handler:e,cancel:s};return je.splice(ts(n),0,i),Le+=1,ns(),i};var ts=e=>~(~je.findIndex(t=>t.time>e)||~je.length);z.cancel=e=>{vt.delete(e),wn.delete(e),Nn.delete(e),xn.delete(e),Rn.delete(e)};z.sync=e=>{fn=!0,z.batchedUpdates(e),fn=!1};z.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function s(...i){t=i,z.onStart(n)}return s.handler=e,s.cancel=()=>{vt.delete(n),t=null},s};var Dn=typeof window<"u"?window.requestAnimationFrame:()=>{};z.use=e=>Dn=e;z.now=typeof performance<"u"?()=>performance.now():Date.now;z.batchedUpdates=e=>e();z.catch=console.error;z.frameLoop="always";z.advance=()=>{z.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):ss()};var Oe=-1,Le=0,fn=!1;function it(e,t){fn?(t.delete(e),e(0)):(t.add(e),ns())}function ns(){Oe<0&&(Oe=0,z.frameLoop!=="demand"&&Dn(rs))}function Ii(){Oe=-1}function rs(){~Oe&&(Dn(rs),z.batchedUpdates(ss))}function ss(){const e=Oe;Oe=z.now();const t=ts(Oe);if(t&&(is(je.splice(0,t),n=>n.handler()),Le-=t),!Le){Ii();return}vt.flush(),xn.flush(e?Math.min(64,Oe-e):16.667),wn.flush(),Rn.flush(),Nn.flush()}function ot(){let e=new Set,t=e;return{add(n){Le+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Le-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Le-=t.size,is(t,s=>s(n)&&e.add(s)),Le+=e.size,t=e)}}}function is(e,t){e.forEach(n=>{try{t(n)}catch(s){z.catch(s)}})}var bi=Object.defineProperty,xi=(e,t)=>{for(var n in t)bi(e,n,{get:t[n],enumerable:!0})},de={};xi(de,{assign:()=>wi,colors:()=>ve,createStringInterpolator:()=>Mn,skipAnimation:()=>as,to:()=>os,willAdvance:()=>Pn});function dn(){}var Ri=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),v={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 Ee(e,t){if(v.arr(e)){if(!v.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var F=(e,t)=>e.forEach(t);function pe(e,t,n){if(v.arr(e)){for(let s=0;s<e.length;s++)t.call(n,e[s],`${s}`);return}for(const s in e)e.hasOwnProperty(s)&&t.call(n,e[s],s)}var ee=e=>v.und(e)?[]:v.arr(e)?e:[e];function $e(e,t){if(e.size){const n=Array.from(e);e.clear(),F(n,t)}}var Ue=(e,...t)=>$e(e,n=>n(...t)),jn=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Mn,os,ve=null,as=!1,Pn=dn,wi=e=>{e.to&&(os=e.to),e.now&&(z.now=e.now),e.colors!==void 0&&(ve=e.colors),e.skipAnimation!=null&&(as=e.skipAnimation),e.createStringInterpolator&&(Mn=e.createStringInterpolator),e.requestAnimationFrame&&z.use(e.requestAnimationFrame),e.batchedUpdates&&(z.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Pn=e.willAdvance),e.frameLoop&&(z.frameLoop=e.frameLoop)},Ze=new Set,ce=[],Gt=[],Tt=0,It={get idle(){return!Ze.size&&!ce.length},start(e){Tt>e.priority?(Ze.add(e),z.onStart(Ni)):(cs(e),z(hn))},advance:hn,sort(e){if(Tt)z.onFrame(()=>It.sort(e));else{const t=ce.indexOf(e);~t&&(ce.splice(t,1),us(e))}},clear(){ce=[],Ze.clear()}};function Ni(){Ze.forEach(cs),Ze.clear(),z(hn)}function cs(e){ce.includes(e)||us(e)}function us(e){ce.splice(Di(ce,t=>t.priority>e.priority),0,e)}function hn(e){const t=Gt;for(let n=0;n<ce.length;n++){const s=ce[n];Tt=s.priority,s.idle||(Pn(s),s.advance(e),s.idle||t.push(s))}return Tt=0,Gt=ce,Gt.length=0,ce=t,ce.length>0}function Di(e,t){const n=e.findIndex(t);return n<0?e.length:n}var ji=(e,t,n)=>Math.min(Math.max(n,e),t),Mi={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},fe="[-+]?\\d*\\.?\\d+",yt=fe+"%";function bt(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Pi=new RegExp("rgb"+bt(fe,fe,fe)),ki=new RegExp("rgba"+bt(fe,fe,fe,fe)),Fi=new RegExp("hsl"+bt(fe,yt,yt)),Bi=new RegExp("hsla"+bt(fe,yt,yt,fe)),zi=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Gi=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ui=/^#([0-9a-fA-F]{6})$/,Hi=/^#([0-9a-fA-F]{8})$/;function $i(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ui.exec(e))?parseInt(t[1]+"ff",16)>>>0:ve&&ve[e]!==void 0?ve[e]:(t=Pi.exec(e))?(we(t[1])<<24|we(t[2])<<16|we(t[3])<<8|255)>>>0:(t=ki.exec(e))?(we(t[1])<<24|we(t[2])<<16|we(t[3])<<8|nr(t[4]))>>>0:(t=zi.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Hi.exec(e))?parseInt(t[1],16)>>>0:(t=Gi.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Fi.exec(e))?(er(tr(t[1]),ft(t[2]),ft(t[3]))|255)>>>0:(t=Bi.exec(e))?(er(tr(t[1]),ft(t[2]),ft(t[3]))|nr(t[4]))>>>0:null}function Ut(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function er(e,t,n){const s=n<.5?n*(1+t):n+t-n*t,i=2*n-s,o=Ut(i,s,e+1/3),a=Ut(i,s,e),l=Ut(i,s,e-1/3);return Math.round(o*255)<<24|Math.round(a*255)<<16|Math.round(l*255)<<8}function we(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function tr(e){return(parseFloat(e)%360+360)%360/360}function nr(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ft(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function rr(e){let t=$i(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,s=(t&16711680)>>>16,i=(t&65280)>>>8,o=(t&255)/255;return`rgba(${n}, ${s}, ${i}, ${o})`}var qe=(e,t,n)=>{if(v.fun(e))return e;if(v.arr(e))return qe({range:e,output:t,extrapolate:n});if(v.str(e.output[0]))return Mn(e);const s=e,i=s.output,o=s.range||[0,1],a=s.extrapolateLeft||s.extrapolate||"extend",l=s.extrapolateRight||s.extrapolate||"extend",c=s.easing||(u=>u);return u=>{const f=Yi(u,o);return Zi(u,o[f],o[f+1],i[f],i[f+1],c,a,l,s.map)}};function Zi(e,t,n,s,i,o,a,l,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>n){if(l==="identity")return u;l==="clamp"&&(u=n)}return s===i?s:t===n?e<=t?s:i:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=o(u),s===-1/0?u=-u:i===1/0?u=u+s:u=u*(i-s)+s,u)}function Yi(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Vi=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const s=n*e,i=t==="end"?Math.floor(s):Math.ceil(s);return ji(0,1,i/e)},At=1.70158,dt=At*1.525,sr=At+1,ir=2*Math.PI/3,or=2*Math.PI/4.5,ht=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Xi={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>sr*e*e*e-At*e*e,easeOutBack:e=>1+sr*Math.pow(e-1,3)+At*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((dt+1)*2*e-dt)/2:(Math.pow(2*e-2,2)*((dt+1)*(e*2-2)+dt)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*ir),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*ir)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*or))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*or)/2+1,easeInBounce:e=>1-ht(1-e),easeOutBounce:ht,easeInOutBounce:e=>e<.5?(1-ht(1-2*e))/2:(1+ht(2*e-1))/2,steps:Vi},Ke=Symbol.for("FluidValue.get"),Pe=Symbol.for("FluidValue.observers"),oe=e=>!!(e&&e[Ke]),re=e=>e&&e[Ke]?e[Ke]():e,ar=e=>e[Pe]||null;function Wi(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Qe(e,t){const n=e[Pe];n&&n.forEach(s=>{Wi(s,t)})}var ls=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");qi(this,e)}},qi=(e,t)=>fs(e,Ke,t);function ke(e,t){if(e[Ke]){let n=e[Pe];n||fs(e,Pe,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Je(e,t){const n=e[Pe];if(n&&n.has(t)){const s=n.size-1;s?n.delete(t):e[Pe]=null,e.observerRemoved&&e.observerRemoved(s,t)}}var fs=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),gt=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ki=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,cr=new RegExp(`(${gt.source})(%|[a-z]+)`,"i"),Qi=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,xt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ds=e=>{const[t,n]=Ji(e);if(!t||jn())return e;const s=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(s)return s.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&xt.test(n))return ds(n);if(n)return n}return e},Ji=e=>{const t=xt.exec(e);if(!t)return[,];const[,n,s]=t;return[n,s]},Ht,eo=(e,t,n,s,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(s)}, ${i})`,hs=e=>{Ht||(Ht=ve?new RegExp(`(${Object.keys(ve).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(o=>re(o).replace(xt,ds).replace(Ki,rr).replace(Ht,rr)),n=t.map(o=>o.match(gt).map(Number)),i=n[0].map((o,a)=>n.map(l=>{if(!(a in l))throw Error('The arity of each "output" value must be equal');return l[a]})).map(o=>qe({...e,output:o}));return o=>{var c;const a=!cr.test(t[0])&&((c=t.find(u=>cr.test(u)))==null?void 0:c.replace(gt,""));let l=0;return t[0].replace(gt,()=>`${i[l++](o)}${a||""}`).replace(Qi,eo)}},kn="react-spring: ",Ss=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${kn}once requires a function parameter`);return(...s)=>{n||(t(...s),n=!0)}},to=Ss(console.warn);function no(){to(`${kn}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var ro=Ss(console.warn);function so(){ro(`${kn}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 Rt(e){return v.str(e)&&(e[0]=="#"||/\d/.test(e)||!jn()&&xt.test(e)||e in(ve||{}))}var be=jn()?E.useEffect:E.useLayoutEffect,io=()=>{const e=E.useRef(!1);return be(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Fn(){const e=E.useState()[1],t=io();return()=>{t.current&&e(Math.random())}}var Bn=e=>E.useEffect(e,oo),oo=[];function Sn(e){const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e}),t.current}var et=Symbol.for("Animated:node"),ao=e=>!!e&&e[et]===e,_e=e=>e&&e[et],zn=(e,t)=>Ri(e,et,t),wt=e=>e&&e[et]&&e[et].getPayload(),_s=class{constructor(){zn(this,this)}getPayload(){return this.payload||[]}},Nt=class ps extends _s{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,v.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new ps(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,n){return v.num(t)&&(this.lastPosition=t,n&&(t=Math.round(t/n)*n,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,v.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Ct=class gs extends Nt{constructor(t){super(0),this._string=null,this._toString=qe({output:[t,t]})}static create(t){return new gs(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(v.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=qe({output:[this.getValue(),t]})),this._value=0,super.reset()}},Ot={dependencies:null},Dt=class extends _s{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return pe(this.source,(n,s)=>{ao(n)?t[s]=n.getValue(e):oe(n)?t[s]=re(n):e||(t[s]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&F(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return pe(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ot.dependencies&&oe(e)&&Ot.dependencies.add(e);const t=wt(e);t&&F(t,n=>this.add(n))}},co=class ms extends Dt{constructor(t){super(t)}static create(t){return new ms(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const n=this.getPayload();return t.length==n.length?n.map((s,i)=>s.setValue(t[i])).some(Boolean):(super.setValue(t.map(uo)),!0)}};function uo(e){return(Rt(e)?Ct:Nt).create(e)}function _n(e){const t=_e(e);return t?t.constructor:v.arr(e)?co:Rt(e)?Ct:Nt}var ur=(e,t)=>{const n=!v.fun(e)||e.prototype&&e.prototype.isReactComponent;return E.forwardRef((s,i)=>{const o=E.useRef(null),a=n&&E.useCallback(p=>{o.current=ho(i,p)},[i]),[l,c]=fo(s,t),u=Fn(),f=()=>{const p=o.current;if(n&&!p)return;(p?t.applyAnimatedValues(p,l.getValue(!0)):!1)===!1&&u()},S=new lo(f,c),d=E.useRef(void 0);be(()=>(d.current=S,F(c,p=>ke(p,S)),()=>{d.current&&(F(d.current.deps,p=>Je(p,d.current)),z.cancel(d.current.update))})),E.useEffect(f,[]),Bn(()=>()=>{const p=d.current;F(p.deps,g=>Je(g,p))});const _=t.getComponentProps(l.getValue());return He.createElement(e,{..._,ref:a})})},lo=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&z.write(this.update)}};function fo(e,t){const n=new Set;return Ot.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Dt(e),Ot.dependencies=null,[e,n]}function ho(e,t){return e&&(v.fun(e)?e(t):e.current=t),t}var lr=Symbol.for("AnimatedComponent"),So=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Dt(i),getComponentProps:s=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:s},o=a=>{const l=fr(a)||"Anonymous";return v.str(a)?a=o[a]||(o[a]=ur(a,i)):a=a[lr]||(a[lr]=ur(a,i)),a.displayName=`Animated(${l})`,a};return pe(e,(a,l)=>{v.arr(e)&&(l=fr(a)),o[l]=o(a)}),{animated:o}},fr=e=>v.str(e)?e:e&&v.str(e.displayName)?e.displayName:v.fun(e)&&e.name||null;function se(e,...t){return v.fun(e)?e(...t):e}var Ye=(e,t)=>e===!0||!!(t&&e&&(v.fun(e)?e(t):ee(e).includes(t))),Es=(e,t)=>v.obj(e)?t&&e[t]:e,Ts=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,_o=e=>e,jt=(e,t=_o)=>{let n=po;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const s={};for(const i of n){const o=t(e[i],i);v.und(o)||(s[i]=o)}return s},po=["config","onProps","onStart","onChange","onPause","onResume","onRest"],go={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 mo(e){const t={};let n=0;if(pe(e,(s,i)=>{go[i]||(t[i]=s,n++)}),n)return t}function Gn(e){const t=mo(e);if(t){const n={to:t};return pe(e,(s,i)=>i in t||(n[i]=s)),n}return{...e}}function tt(e){return e=re(e),v.arr(e)?e.map(tt):Rt(e)?de.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function ys(e){for(const t in e)return!0;return!1}function pn(e){return v.fun(e)||v.arr(e)&&v.obj(e[0])}function gn(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function As(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Un={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},mn={...Un.default,mass:1,damping:1,easing:Xi.linear,clamp:!1},Eo=class{constructor(){this.velocity=0,Object.assign(this,mn)}};function To(e,t,n){n&&(n={...n},dr(n,t),t={...n,...t}),dr(e,t),Object.assign(e,t);for(const a in mn)e[a]==null&&(e[a]=mn[a]);let{frequency:s,damping:i}=e;const{mass:o}=e;return v.und(s)||(s<.01&&(s=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/s,2)*o,e.friction=4*Math.PI*i*o/s),e}function dr(e,t){if(!v.und(t.decay))e.duration=void 0;else{const n=!v.und(t.tension)||!v.und(t.friction);(n||!v.und(t.frequency)||!v.und(t.damping)||!v.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var hr=[],yo=class{constructor(){this.changed=!1,this.values=hr,this.toValues=null,this.fromValues=hr,this.config=new Eo,this.immediate=!1}};function Cs(e,{key:t,props:n,defaultProps:s,state:i,actions:o}){return new Promise((a,l)=>{let c,u,f=Ye(n.cancel??(s==null?void 0:s.cancel),t);if(f)_();else{v.und(n.pause)||(i.paused=Ye(n.pause,t));let p=s==null?void 0:s.pause;p!==!0&&(p=i.paused||Ye(p,t)),c=se(n.delay||0,t),p?(i.resumeQueue.add(d),o.pause()):(o.resume(),d())}function S(){i.resumeQueue.add(d),i.timeouts.delete(u),u.cancel(),c=u.time-z.now()}function d(){c>0&&!de.skipAnimation?(i.delayed=!0,u=z.setTimeout(_,c),i.pauseQueue.add(S),i.timeouts.add(u)):_()}function _(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(S),i.timeouts.delete(u),e<=(i.cancelId||0)&&(f=!0);try{o.start({...n,callId:e,cancel:f},a)}catch(p){l(p)}}})}var Hn=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Me(e.get()):t.every(n=>n.noop)?Os(e.get()):le(e.get(),t.every(n=>n.finished)),Os=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),le=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Me=e=>({value:e,cancelled:!0,finished:!1});function Ls(e,t,n,s){const{callId:i,parentId:o,onRest:a}=t,{asyncTo:l,promise:c}=n;return!o&&e===l&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const u=jt(t,(m,T)=>T==="onRest"?void 0:m);let f,S;const d=new Promise((m,T)=>(f=m,S=T)),_=m=>{const T=i<=(n.cancelId||0)&&Me(s)||i!==n.asyncId&&le(s,!1);if(T)throw m.result=T,S(m),m},p=(m,T)=>{const C=new Sr,O=new _r;return(async()=>{if(de.skipAnimation)throw nt(n),O.result=le(s,!1),S(O),O;_(C);const I=v.obj(m)?{...m}:{...T,to:m};I.parentId=i,pe(u,(R,N)=>{v.und(I[N])&&(I[N]=R)});const L=await s.start(I);return _(C),n.paused&&await new Promise(R=>{n.resumeQueue.add(R)}),L})()};let g;if(de.skipAnimation)return nt(n),le(s,!1);try{let m;v.arr(e)?m=(async T=>{for(const C of T)await p(C)})(e):m=Promise.resolve(e(p,s.stop.bind(s))),await Promise.all([m.then(f),d]),g=le(s.get(),!0,!1)}catch(m){if(m instanceof Sr)g=m.result;else if(m instanceof _r)g=m.result;else throw m}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?l:void 0,n.promise=o?c:void 0)}return v.fun(a)&&z.batchedUpdates(()=>{a(g,s,s.item)}),g})()}function nt(e,t){$e(e.timeouts,n=>n.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.")}},_r=class extends Error{constructor(){super("SkipAnimationSignal")}},En=e=>e instanceof $n,Ao=1,$n=class extends ls{constructor(){super(...arguments),this.id=Ao++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=_e(this);return e&&e.getValue()}to(...e){return de.to(this,e)}interpolate(...e){return no(),de.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){Qe(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||It.sort(this),Qe(this,{type:"priority",parent:this,priority:e})}},xe=Symbol.for("SpringPhase"),vs=1,Is=2,bs=4,$t=e=>(e[xe]&vs)>0,Ae=e=>(e[xe]&Is)>0,Be=e=>(e[xe]&bs)>0,pr=(e,t)=>t?e[xe]|=Is|vs:e[xe]&=-3,gr=(e,t)=>t?e[xe]|=bs:e[xe]&=-5,Co=class extends $n{constructor(e,t){if(super(),this.animation=new yo,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,!v.und(e)||!v.und(t)){const n=v.obj(e)?{...e}:{...t,from:e};v.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ae(this)||this._state.asyncTo)||Be(this)}get goal(){return re(this.animation.to)}get velocity(){const e=_e(this);return e instanceof Nt?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return $t(this)}get isAnimating(){return Ae(this)}get isPaused(){return Be(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const s=this.animation;let{toValues:i}=s;const{config:o}=s,a=wt(s.to);!a&&oe(s.to)&&(i=ee(re(s.to))),s.values.forEach((u,f)=>{if(u.done)return;const S=u.constructor==Ct?1:a?a[f].lastPosition:i[f];let d=s.immediate,_=S;if(!d){if(_=u.lastPosition,o.tension<=0){u.done=!0;return}let p=u.elapsedTime+=e;const g=s.fromValues[f],m=u.v0!=null?u.v0:u.v0=v.arr(o.velocity)?o.velocity[f]:o.velocity;let T;const C=o.precision||(g==S?.005:Math.min(1,Math.abs(S-g)*.001));if(v.und(o.duration))if(o.decay){const O=o.decay===!0?.998:o.decay,I=Math.exp(-(1-O)*p);_=g+m/(1-O)*(1-I),d=Math.abs(u.lastPosition-_)<=C,T=m*I}else{T=u.lastVelocity==null?m:u.lastVelocity;const O=o.restVelocity||C/10,I=o.clamp?0:o.bounce,L=!v.und(I),R=g==S?u.v0>0:g<S;let N,j=!1;const M=1,P=Math.ceil(e/M);for(let D=0;D<P&&(N=Math.abs(T)>O,!(!N&&(d=Math.abs(S-_)<=C,d)));++D){L&&(j=_==S||_>S==R,j&&(T=-T*I,_=S));const G=-o.tension*1e-6*(_-S),H=-o.friction*.001*T,x=(G+H)/o.mass;T=T+x*M,_=_+T*M}}else{let O=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,u.durationProgress>0&&(u.elapsedTime=o.duration*u.durationProgress,p=u.elapsedTime+=e)),O=(o.progress||0)+p/this._memoizedDuration,O=O>1?1:O<0?0:O,u.durationProgress=O),_=g+o.easing(O)*(S-g),T=(_-u.lastPosition)/e,d=O==1}u.lastVelocity=T,Number.isNaN(_)&&(console.warn("Got NaN while animating:",this),d=!0)}a&&!a[f].done&&(d=!1),d?u.done=!0:t=!1,u.setValue(_,o.round)&&(n=!0)});const l=_e(this),c=l.getValue();if(t){const u=re(s.to);(c!==u||n)&&!o.decay?(l.setValue(u),this._onChange(u)):n&&o.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return z.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ae(this)){const{to:e,config:t}=this.animation;z.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 n;return v.und(e)?(n=this.queue||[],this.queue=[]):n=[v.obj(e)?e:{...t,to:e}],Promise.all(n.map(s=>this._update(s))).then(s=>Hn(this,s))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),nt(this._state,e&&this._lastCallId),z.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:n,from:s}=e;n=v.obj(n)?n[t]:n,(n==null||pn(n))&&(n=void 0),s=v.obj(s)?s[t]:s,s==null&&(s=void 0);const i={to:n,from:s};return $t(this)||(e.reverse&&([n,s]=[s,n]),s=re(s),v.und(s)?_e(this)||this._set(n):this._set(s)),i}_update({...e},t){const{key:n,defaultProps:s}=this;e.default&&Object.assign(s,jt(e,(a,l)=>/^on/.test(l)?Es(a,n):a)),Er(this,e,"onProps"),Ge(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 o=this._state;return Cs(++this._lastCallId,{key:n,props:e,defaultProps:s,state:o,actions:{pause:()=>{Be(this)||(gr(this,!0),Ue(o.pauseQueue),Ge(this,"onPause",le(this,ze(this,this.animation.to)),this))},resume:()=>{Be(this)&&(gr(this,!1),Ae(this)&&this._resume(),Ue(o.resumeQueue),Ge(this,"onResume",le(this,ze(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const l=xs(e);if(l)return this._update(l,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Me(this));const s=!v.und(e.to),i=!v.und(e.from);if(s||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Me(this));const{key:o,defaultProps:a,animation:l}=this,{to:c,from:u}=l;let{to:f=c,from:S=u}=e;i&&!s&&(!t.default||v.und(f))&&(f=S),t.reverse&&([f,S]=[S,f]);const d=!Ee(S,u);d&&(l.from=S),S=re(S);const _=!Ee(f,c);_&&this._focus(f);const p=pn(t.to),{config:g}=l,{decay:m,velocity:T}=g;(s||i)&&(g.velocity=0),t.config&&!p&&To(g,se(t.config,o),t.config!==a.config?se(a.config,o):void 0);let C=_e(this);if(!C||v.und(f))return n(le(this,!0));const O=v.und(t.reset)?i&&!t.default:!v.und(S)&&Ye(t.reset,o),I=O?S:this.get(),L=tt(f),R=v.num(L)||v.arr(L)||Rt(L),N=!p&&(!R||Ye(a.immediate||t.immediate,o));if(_){const D=_n(f);if(D!==C.constructor)if(N)C=this._set(L);else throw Error(`Cannot animate between ${C.constructor.name} and ${D.name}, as the "to" prop suggests`)}const j=C.constructor;let M=oe(f),P=!1;if(!M){const D=O||!$t(this)&&d;(_||D)&&(P=Ee(tt(I),L),M=!P),(!Ee(l.immediate,N)&&!N||!Ee(g.decay,m)||!Ee(g.velocity,T))&&(M=!0)}if(P&&Ae(this)&&(l.changed&&!O?M=!0:M||this._stop(c)),!p&&((M||oe(c))&&(l.values=C.getPayload(),l.toValues=oe(f)?null:j==Ct?[1]:ee(L)),l.immediate!=N&&(l.immediate=N,!N&&!O&&this._set(c)),M)){const{onRest:D}=l;F(Lo,H=>Er(this,t,H));const G=le(this,ze(this,c));Ue(this._pendingCalls,G),this._pendingCalls.add(n),l.changed&&z.batchedUpdates(()=>{var H;l.changed=!O,D==null||D(G,this),O?se(a.onRest,G):(H=l.onStart)==null||H.call(l,G,this)})}O&&this._set(I),p?n(Ls(t.to,t,this._state,this)):M?this._start():Ae(this)&&!_?this._pendingCalls.add(n):n(Os(I))}_focus(e){const t=this.animation;e!==t.to&&(ar(this)&&this._detach(),t.to=e,ar(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;oe(t)&&(ke(t,this),En(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;oe(e)&&Je(e,this)}_set(e,t=!0){const n=re(e);if(!v.und(n)){const s=_e(this);if(!s||!Ee(n,s.getValue())){const i=_n(n);!s||s.constructor!=i?zn(this,i.create(n)):s.setValue(n),s&&z.batchedUpdates(()=>{this._onChange(n,t)})}}return _e(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Ge(this,"onStart",le(this,ze(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),se(this.animation.onChange,e,this)),se(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;_e(this).reset(re(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Ae(this)||(pr(this,!0),Be(this)||this._resume())}_resume(){de.skipAnimation?this.finish():It.start(this)}_stop(e,t){if(Ae(this)){pr(this,!1);const n=this.animation;F(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Qe(this,{type:"idle",parent:this});const s=t?Me(this.get()):le(this.get(),ze(this,e??n.to));Ue(this._pendingCalls,s),n.changed&&(n.changed=!1,Ge(this,"onRest",s,this))}}};function ze(e,t){const n=tt(t),s=tt(e.get());return Ee(s,n)}function xs(e,t=e.loop,n=e.to){const s=se(t);if(s){const i=s!==!0&&Gn(s),o=(i||e).reverse,a=!i||i.reset;return rt({...e,loop:t,default:!1,pause:void 0,to:!o||pn(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function rt(e){const{to:t,from:n}=e=Gn(e),s=new Set;return v.obj(t)&&mr(t,s),v.obj(n)&&mr(n,s),e.keys=s.size?Array.from(s):null,e}function Oo(e){const t=rt(e);return v.und(t.default)&&(t.default=jt(t)),t}function mr(e,t){pe(e,(n,s)=>n!=null&&t.add(s))}var Lo=["onStart","onRest","onChange","onPause","onResume"];function Er(e,t,n){e.animation[n]=t[n]!==Ts(t,n)?Es(t[n],e.key):void 0}function Ge(e,t,...n){var s,i,o,a;(i=(s=e.animation)[t])==null||i.call(s,...n),(a=(o=e.defaultProps)[t])==null||a.call(o,...n)}var vo=["onStart","onChange","onRest"],Io=1,Rs=class{constructor(t,n){this.id=Io++,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),n&&(this._flush=n),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((n,s)=>t[s]=n.get()),t}set(t){for(const n in t){const s=t[n];v.und(s)||this.springs[n].set(s)}}update(t){return t&&this.queue.push(rt(t)),this}start(t){let{queue:n}=this;return t?n=ee(t).map(rt):this.queue=[],this._flush?this._flush(this,n):(Ms(this,n),Tn(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const s=this.springs;F(ee(n),i=>s[i].stop(!!t))}else nt(this._state,this._lastAsyncId),this.each(s=>s.stop(!!t));return this}pause(t){if(v.und(t))this.start({pause:!0});else{const n=this.springs;F(ee(t),s=>n[s].pause())}return this}resume(t){if(v.und(t))this.start({pause:!1});else{const n=this.springs;F(ee(t),s=>n[s].resume())}return this}each(t){pe(this.springs,t)}_onFrame(){const{onStart:t,onChange:n,onRest:s}=this._events,i=this._active.size>0,o=this._changed.size>0;(i&&!this._started||o&&!this._started)&&(this._started=!0,$e(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const a=!i&&this._started,l=o||a&&s.size?this.get():null;o&&n.size&&$e(n,([c,u])=>{u.value=l,c(u,this,this._item)}),a&&(this._started=!1,$e(s,([c,u])=>{u.value=l,c(u,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;z.onFrame(this._onFrame)}};function Tn(e,t){return Promise.all(t.map(n=>ws(e,n))).then(n=>Hn(e,n))}async function ws(e,t,n){const{keys:s,to:i,from:o,loop:a,onRest:l,onResolve:c}=t,u=v.obj(t.default)&&t.default;a&&(t.loop=!1),i===!1&&(t.to=null),o===!1&&(t.from=null);const f=v.arr(i)||v.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):F(vo,g=>{const m=t[g];if(v.fun(m)){const T=e._events[g];t[g]=({finished:C,cancelled:O})=>{const I=T.get(m);I?(C||(I.finished=!1),O&&(I.cancelled=!0)):T.set(m,{value:null,finished:C||!1,cancelled:O||!1})},u&&(u[g]=t[g])}});const S=e._state;t.pause===!S.paused?(S.paused=t.pause,Ue(t.pause?S.pauseQueue:S.resumeQueue)):S.paused&&(t.pause=!0);const d=(s||Object.keys(e.springs)).map(g=>e.springs[g].start(t)),_=t.cancel===!0||Ts(t,"cancel")===!0;(f||_&&S.asyncId)&&d.push(Cs(++e._lastAsyncId,{props:t,state:S,actions:{pause:dn,resume:dn,start(g,m){_?(nt(S,e._lastAsyncId),m(Me(e))):(g.onRest=l,m(Ls(f,g,S,e)))}}})),S.paused&&await new Promise(g=>{S.resumeQueue.add(g)});const p=Hn(e,await Promise.all(d));if(a&&p.finished&&!(n&&p.noop)){const g=xs(t,a,i);if(g)return Ms(e,[g]),ws(e,g,!0)}return c&&z.batchedUpdates(()=>c(p,e,e.item)),p}function yn(e,t){const n={...e.springs};return t&&F(ee(t),s=>{v.und(s.keys)&&(s=rt(s)),v.obj(s.to)||(s={...s,to:void 0}),js(n,s,i=>Ds(i))}),Ns(e,n),n}function Ns(e,t){pe(t,(n,s)=>{e.springs[s]||(e.springs[s]=n,ke(n,e))})}function Ds(e,t){const n=new Co;return n.key=e,t&&ke(n,t),n}function js(e,t,n){t.keys&&F(t.keys,s=>{(e[s]||(e[s]=n(s)))._prepareNode(t)})}function Ms(e,t){F(t,n=>{js(e.springs,n,s=>Ds(s,e))})}var Ps=He.createContext({pause:!1,immediate:!1}),ks=()=>{const e=[],t=function(s){so();const i=[];return F(e,(o,a)=>{if(v.und(s))i.push(o.start());else{const l=n(s,o,a);l&&i.push(o.start(l))}}),i};t.current=e,t.add=function(s){e.includes(s)||e.push(s)},t.delete=function(s){const i=e.indexOf(s);~i&&e.splice(i,1)},t.pause=function(){return F(e,s=>s.pause(...arguments)),this},t.resume=function(){return F(e,s=>s.resume(...arguments)),this},t.set=function(s){F(e,(i,o)=>{const a=v.fun(s)?s(o,i):s;a&&i.set(a)})},t.start=function(s){const i=[];return F(e,(o,a)=>{if(v.und(s))i.push(o.start());else{const l=this._getProps(s,o,a);l&&i.push(o.start(l))}}),i},t.stop=function(){return F(e,s=>s.stop(...arguments)),this},t.update=function(s){return F(e,(i,o)=>i.update(this._getProps(s,i,o))),this};const n=function(s,i,o){return v.fun(s)?s(o,i):s};return t._getProps=n,t};function Zn(e,t,n){const s=v.fun(t)&&t;s&&!n&&(n=[]);const i=E.useMemo(()=>s||arguments.length==3?ks():void 0,[]),o=E.useRef(0),a=Fn(),l=E.useMemo(()=>({ctrls:[],queue:[],flush(T,C){const O=yn(T,C);return o.current>0&&!l.queue.length&&!Object.keys(O).some(L=>!T.springs[L])?Tn(T,C):new Promise(L=>{Ns(T,O),l.queue.push(()=>{L(Tn(T,C))}),a()})}}),[]),c=E.useRef([...l.ctrls]),u=E.useRef([]),f=Sn(e)||0;E.useMemo(()=>{F(c.current.slice(e,f),T=>{gn(T,i),T.stop(!0)}),c.current.length=e,S(f,e)},[e]),E.useMemo(()=>{S(0,Math.min(f,e))},n);function S(T,C){for(let O=T;O<C;O++){const I=c.current[O]||(c.current[O]=new Rs(null,l.flush)),L=s?s(O,I):t[O];L&&(u.current[O]=Oo(L))}}const d=c.current.map((T,C)=>yn(T,u.current[C])),_=E.useContext(Ps),p=Sn(_),g=_!==p&&ys(_);be(()=>{o.current++,l.ctrls=c.current;const{queue:T}=l;T.length&&(l.queue=[],F(T,C=>C())),F(c.current,(C,O)=>{i==null||i.add(C),g&&C.start({default:_});const I=u.current[O];I&&(As(C,I.ref),C.ref?C.queue.push(I):C.start(I))})}),Bn(()=>()=>{F(l.ctrls,T=>T.stop(!0))});const m=d.map(T=>({...T}));return i?[m,i]:m}function W(e,t){const n=v.fun(e),[[s],i]=Zn(1,n?e:[e],n?[]:t);return n||arguments.length==2?[s,i]:s}function ue(e,t,n){const s=v.fun(t)&&t,{reset:i,sort:o,trail:a=0,expires:l=!0,exitBeforeEnter:c=!1,onDestroyed:u,ref:f,config:S}=s?s():t,d=E.useMemo(()=>s||arguments.length==3?ks():void 0,[]),_=ee(e),p=[],g=E.useRef(null),m=i?null:g.current;be(()=>{g.current=p}),Bn(()=>(F(p,x=>{d==null||d.add(x.ctrl),x.ctrl.ref=d}),()=>{F(g.current,x=>{x.expired&&clearTimeout(x.expirationId),gn(x.ctrl,d),x.ctrl.stop(!0)})}));const T=xo(_,s?s():t,m),C=i&&g.current||[];be(()=>F(C,({ctrl:x,item:w,key:U})=>{gn(x,d),se(u,w,U)}));const O=[];if(m&&F(m,(x,w)=>{x.expired?(clearTimeout(x.expirationId),C.push(x)):(w=O[w]=T.indexOf(x.key),~w&&(p[w]=x))}),F(_,(x,w)=>{p[w]||(p[w]={key:T[w],item:x,phase:"mount",ctrl:new Rs},p[w].ctrl.item=x)}),O.length){let x=-1;const{leave:w}=s?s():t;F(O,(U,B)=>{const $=m[B];~U?(x=p.indexOf($),p[x]={...$,item:_[U]}):w&&p.splice(++x,0,$)})}v.fun(o)&&p.sort((x,w)=>o(x.item,w.item));let I=-a;const L=Fn(),R=jt(t),N=new Map,j=E.useRef(new Map),M=E.useRef(!1);F(p,(x,w)=>{const U=x.key,B=x.phase,$=s?s():t;let A,y;const Z=se($.delay||0,U);if(B=="mount")A=$.enter,y="enter";else{const te=T.indexOf(U)<0;if(B!="leave")if(te)A=$.leave,y="leave";else if(A=$.update)y="update";else return;else if(!te)A=$.enter,y="enter";else return}if(A=se(A,x.item,w),A=v.obj(A)?Gn(A):{to:A},!A.config){const te=S||R.config;A.config=se(te,x.item,w,y)}I+=a;const he={...R,delay:Z+I,ref:f,immediate:$.immediate,reset:!1,...A};if(y=="enter"&&v.und(he.from)){const te=s?s():t,Te=v.und(te.initial)||m?te.from:te.initial;he.from=se(Te,x.item,w)}const{onResolve:ut}=he;he.onResolve=te=>{se(ut,te);const Te=g.current,ye=Te.find(lt=>lt.key===U);if(ye&&!(te.cancelled&&ye.phase!="update")&&ye.ctrl.idle){const lt=Te.every(Ie=>Ie.ctrl.idle);if(ye.phase=="leave"){const Ie=se(l,ye.item);if(Ie!==!1){const zt=Ie===!0?0:Ie;if(ye.expired=!0,!lt&&zt>0){zt<=2147483647&&(ye.expirationId=setTimeout(L,zt));return}}}lt&&Te.some(Ie=>Ie.expired)&&(j.current.delete(ye),c&&(M.current=!0),L())}};const Fe=yn(x.ctrl,he);y==="leave"&&c?j.current.set(x,{phase:y,springs:Fe,payload:he}):N.set(x,{phase:y,springs:Fe,payload:he})});const P=E.useContext(Ps),D=Sn(P),G=P!==D&&ys(P);be(()=>{G&&F(p,x=>{x.ctrl.start({default:P})})},[P]),F(N,(x,w)=>{if(j.current.size){const U=p.findIndex(B=>B.key===w.key);p.splice(U,1)}}),be(()=>{F(j.current.size?j.current:N,({phase:x,payload:w},U)=>{const{ctrl:B}=U;U.phase=x,d==null||d.add(B),G&&x=="enter"&&B.start({default:P}),w&&(As(B,w.ref),(B.ref||d)&&!M.current?B.update(w):(B.start(w),M.current&&(M.current=!1)))})},i?void 0:n);const H=x=>He.createElement(He.Fragment,null,p.map((w,U)=>{const{springs:B}=N.get(w)||w.ctrl,$=x({...B},w.item,w,U);return $&&$.type?He.createElement($.type,{...$.props,key:v.str(w.key)||v.num(w.key)?w.key:w.ctrl.id,ref:$.ref}):$}));return d?[H,d]:H}var bo=1;function xo(e,{key:t,keys:n=t},s){if(n===null){const i=new Set;return e.map(o=>{const a=s&&s.find(l=>l.item===o&&l.phase!=="leave"&&!i.has(l));return a?(i.add(a),a.key):bo++})}return v.und(n)?e:v.fun(n)?e.map(n):ee(n)}var Ro=class extends $n{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=qe(...t);const n=this._get(),s=_n(n);zn(this,s.create(n))}advance(e){const t=this._get(),n=this.get();Ee(t,n)||(_e(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Tr(this._active)&&Zt(this)}_get(){const e=v.arr(this.source)?this.source.map(re):ee(re(this.source));return this.calc(...e)}_start(){this.idle&&!Tr(this._active)&&(this.idle=!1,F(wt(this),e=>{e.done=!1}),de.skipAnimation?(z.batchedUpdates(()=>this.advance()),Zt(this)):It.start(this))}_attach(){let e=1;F(ee(this.source),t=>{oe(t)&&ke(t,this),En(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){F(ee(this.source),e=>{oe(e)&&Je(e,this)}),this._active.clear(),Zt(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=ee(this.source).reduce((t,n)=>Math.max(t,(En(n)?n.priority:0)+1),0))}};function wo(e){return e.idle!==!1}function Tr(e){return!e.size||Array.from(e).every(wo)}function Zt(e){e.idle||(e.idle=!0,F(wt(e),t=>{t.done=!0}),Qe(e,{type:"idle",parent:e}))}de.assign({createStringInterpolator:hs,to:(e,t)=>new Ro(e,t)});var Fs=/^--/;function No(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Fs.test(e)&&!(Ve.hasOwnProperty(e)&&Ve[e])?t+"px":(""+t).trim()}var yr={};function Do(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:s,style:i,children:o,scrollTop:a,scrollLeft:l,viewBox:c,...u}=t,f=Object.values(u),S=Object.keys(u).map(d=>n||e.hasAttribute(d)?d:yr[d]||(yr[d]=d.replace(/([A-Z])/g,_=>"-"+_.toLowerCase())));o!==void 0&&(e.textContent=o);for(const d in i)if(i.hasOwnProperty(d)){const _=No(d,i[d]);Fs.test(d)?e.style.setProperty(d,_):e.style[d]=_}S.forEach((d,_)=>{e.setAttribute(d,f[_])}),s!==void 0&&(e.className=s),a!==void 0&&(e.scrollTop=a),l!==void 0&&(e.scrollLeft=l),c!==void 0&&e.setAttribute("viewBox",c)}var Ve={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},jo=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Mo=["Webkit","Ms","Moz","O"];Ve=Object.keys(Ve).reduce((e,t)=>(Mo.forEach(n=>e[jo(n,t)]=e[t]),e),Ve);var Po=/^(matrix|translate|scale|rotate|skew)/,ko=/^(translate)/,Fo=/^(rotate|skew)/,Yt=(e,t)=>v.num(e)&&e!==0?e+t:e,mt=(e,t)=>v.arr(e)?e.every(n=>mt(n,t)):v.num(e)?e===t:parseFloat(e)===t,Bo=class extends Dt{constructor({x:e,y:t,z:n,...s}){const i=[],o=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),o.push(a=>[`translate3d(${a.map(l=>Yt(l,"px")).join(",")})`,mt(a,0)])),pe(s,(a,l)=>{if(l==="transform")i.push([a||""]),o.push(c=>[c,c===""]);else if(Po.test(l)){if(delete s[l],v.und(a))return;const c=ko.test(l)?"px":Fo.test(l)?"deg":"";i.push(ee(a)),o.push(l==="rotate3d"?([u,f,S,d])=>[`rotate3d(${u},${f},${S},${Yt(d,c)})`,mt(d,0)]:u=>[`${l}(${u.map(f=>Yt(f,c)).join(",")})`,mt(u,l.startsWith("scale")?1:0)])}}),i.length&&(s.transform=new zo(i,o)),super(s)}},zo=class extends ls{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 F(this.inputs,(n,s)=>{const i=re(n[0]),[o,a]=this.transforms[s](v.arr(i)?i:n.map(re));e+=" "+o,t=t&&a}),t?"none":e}observerAdded(e){e==1&&F(this.inputs,t=>F(t,n=>oe(n)&&ke(n,this)))}observerRemoved(e){e==0&&F(this.inputs,t=>F(t,n=>oe(n)&&Je(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Qe(this,e)}},Go=["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"];de.assign({batchedUpdates:bn.unstable_batchedUpdates,createStringInterpolator:hs,colors:Mi});var Uo=So(Go,{applyAnimatedValues:Do,createAnimatedStyle:e=>new Bo(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),k=Uo.animated;const b=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:I,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,children:U,className:B,...$})=>{const A={};return e&&(A[r.MARGIN_CLASSES[e]]=!0),t&&(A[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(A[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(A[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(A[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(A[r.PADDING_CLASSES[o]]=!0),a&&(A[r.PADDING_TOP_CLASSES[a]]=!0),l&&(A[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(A[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(A[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(A[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(A[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(A[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(A[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(A[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(A[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(A[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(A[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(A[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(A[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),I&&(A[r.BORDER_BOTTOM_STYLE_CLASSES[I]]=!0),L&&(A[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(A[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(A[r.COLOR_CLASSES[N]]=!0),j&&(A[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(A[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(A[r.BOX_SIZING_CLASSES[P]]=!0),D&&(A[r.POSITION_TOP_CLASSES[D]]=!0),G&&(A[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(A[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(A[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(A[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.div,{className:`${Object.keys(A).join(" ")} ${B||""}`,...$,children:U})},Re=E.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:I,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,children:U,className:B,...$},A)=>{const y={};return e&&(y[r.MARGIN_CLASSES[e]]=!0),t&&(y[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(y[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(y[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(y[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(y[r.PADDING_CLASSES[o]]=!0),a&&(y[r.PADDING_TOP_CLASSES[a]]=!0),l&&(y[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(y[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(y[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(y[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(y[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(y[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(y[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(y[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(y[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(y[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(y[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(y[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(y[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),I&&(y[r.BORDER_BOTTOM_STYLE_CLASSES[I]]=!0),L&&(y[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(y[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(y[r.COLOR_CLASSES[N]]=!0),j&&(y[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(y[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(y[r.BOX_SIZING_CLASSES[P]]=!0),D&&(y[r.POSITION_TOP_CLASSES[D]]=!0),G&&(y[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(y[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(y[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(y[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.div,{ref:A,className:`${Object.keys(y).join(" ")} ${B||""}`,...$,children:U})}),Y=({display:e,flexDirection:t,flexWrap:n,flexJustifyContent:s,flexAlignItem:i,flexAlignContent:o,gridGap:a,gridRowGap:l,gridColumnGap:c,gridJustifyContent:u,gridAlignContent:f,justifySelf:S,alignSelf:d,className:_,children:p,...g})=>{const m={};return e&&(m[r.DISPLAY_CLASSES[e]]=!0),t&&(m[r.FLEX_DIRECTION_CLASSES[t]]=!0),n&&(m[r.FLEX_WRAP_CLASSES[n]]=!0),s&&(m[r.FLEX_JUSTIFY_CONTENT_CLASSES[s]]=!0),i&&(m[r.FLEX_ALIGN_ITEMS_CLASSES[i]]=!0),o&&(m[r.FLEX_ALIGN_CONTENT_CLASSES[o]]=!0),a&&(m[r.GRID_GAP_CLASSES[a]]=!0),l&&(m[r.GRID_ROW_GAP_CLASSES[l]]=!0),c&&(m[r.GRID_COLUMN_GAP_CLASSES[c]]=!0),u&&(m[r.GRID_JUSTIFY_CONTENT_CLASSES[u]]=!0),f&&(m[r.GRID_ALIGN_CONTENT_CLASSES[f]]=!0),S&&(m[r.JUSTIFY_SELF_CLASSES[S]]=!0),d&&(m[r.ALIGN_SELF_CLASSES[d]]=!0),h.jsx(k.div,{className:`${Object.keys(m).join(" ")} ${_||""}`,...g,children:p})},Bs=E.forwardRef(({display:e,flexDirection:t,flexWrap:n,flexJustifyContent:s,flexAlignItem:i,flexAlignContent:o,gridGap:a,gridRowGap:l,gridColumnGap:c,gridJustifyContent:u,gridAlignContent:f,justifySelf:S,alignSelf:d,className:_,children:p,...g},m)=>{const T={};return e&&(T[r.DISPLAY_CLASSES[e]]=!0),t&&(T[r.FLEX_DIRECTION_CLASSES[t]]=!0),n&&(T[r.FLEX_WRAP_CLASSES[n]]=!0),s&&(T[r.FLEX_JUSTIFY_CONTENT_CLASSES[s]]=!0),i&&(T[r.FLEX_ALIGN_ITEMS_CLASSES[i]]=!0),o&&(T[r.FLEX_ALIGN_CONTENT_CLASSES[o]]=!0),a&&(T[r.GRID_GAP_CLASSES[a]]=!0),l&&(T[r.GRID_ROW_GAP_CLASSES[l]]=!0),c&&(T[r.GRID_COLUMN_GAP_CLASSES[c]]=!0),u&&(T[r.GRID_JUSTIFY_CONTENT_CLASSES[u]]=!0),f&&(T[r.GRID_ALIGN_CONTENT_CLASSES[f]]=!0),S&&(T[r.JUSTIFY_SELF_CLASSES[S]]=!0),d&&(T[r.ALIGN_SELF_CLASSES[d]]=!0),h.jsx(k.div,{ref:m,className:`${Object.keys(T).join(" ")} ${_||""}`,...g,children:p})}),zs=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:I,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,type:w,cursor:U,disabled:B,children:$,className:A,...y})=>{const Z={};return e&&(Z[r.MARGIN_CLASSES[e]]=!0),t&&(Z[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(Z[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(Z[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(Z[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(Z[r.PADDING_CLASSES[o]]=!0),a&&(Z[r.PADDING_TOP_CLASSES[a]]=!0),l&&(Z[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(Z[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(Z[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(Z[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(Z[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(Z[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(Z[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(Z[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(Z[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(Z[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(Z[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(Z[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(Z[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),I&&(Z[r.BORDER_BOTTOM_STYLE_CLASSES[I]]=!0),L&&(Z[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(Z[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(Z[r.COLOR_CLASSES[N]]=!0),j&&(Z[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(Z[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(Z[r.BOX_SIZING_CLASSES[P]]=!0),D&&(Z[r.POSITION_TOP_CLASSES[D]]=!0),G&&(Z[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(Z[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(Z[r.POSITION_RIGHT_CLASSES[x]]=!0),U&&(Z[r.CURSOR_CLASSES[U]]=!0),h.jsx(k.button,{type:w,disabled:B,className:`${Object.keys(Z).join(" ")} ${A||""}`,...y,children:$})},Ho=E.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:I,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,children:U,className:B,...$},A)=>{const y={};return e&&(y[r.MARGIN_CLASSES[e]]=!0),t&&(y[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(y[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(y[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(y[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(y[r.PADDING_CLASSES[o]]=!0),a&&(y[r.PADDING_TOP_CLASSES[a]]=!0),l&&(y[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(y[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(y[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(y[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(y[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(y[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(y[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(y[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(y[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(y[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(y[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(y[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(y[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),I&&(y[r.BORDER_BOTTOM_STYLE_CLASSES[I]]=!0),L&&(y[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(y[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(y[r.COLOR_CLASSES[N]]=!0),j&&(y[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(y[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(y[r.BOX_SIZING_CLASSES[P]]=!0),D&&(y[r.POSITION_TOP_CLASSES[D]]=!0),G&&(y[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(y[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(y[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(y[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.button,{ref:A,className:`${Object.keys(y).join(" ")} ${B||""}`,...$,children:U})}),$o=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.input,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},Gs=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.input,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),Zo=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,resize:a,className:l,children:c,...u})=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),a&&(f[r.ELEMENT_RESIZE_CLASSES[a]]=!0),h.jsx(k.textarea,{className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${l||""}`,...u,children:c})},Us=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,resize:a,outlineStyle:l,className:c,children:u,...f},S)=>{const d={},{theme:_}=V();return e&&(d[r.COLOR_CLASSES[e]]=!0),t&&(d[r.FONT_SIZE_CLASSES[t]]=!0),n&&(d[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(d[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(d[r.FONT_STYLE_CLASSES[i]]=!0),o&&(d[r.TEXT_ALIGN_CLASSES[o]]=!0),a&&(d[r.ELEMENT_RESIZE_CLASSES[a]]=!0),l&&(d[r.OUTLINE_STYLE_CLASSES[l]]=!0),h.jsx(k.textarea,{ref:S,className:`${r.THEME_CLASSES[_]} ${Object.keys(d).join(" ")} ${c||""}`,...f,children:u})}),Hs=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:I,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,className:U,children:B,...$})=>{const A={};return e&&(A[r.MARGIN_CLASSES[e]]=!0),t&&(A[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(A[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(A[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(A[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(A[r.PADDING_CLASSES[o]]=!0),a&&(A[r.PADDING_TOP_CLASSES[a]]=!0),l&&(A[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(A[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(A[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(A[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(A[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(A[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(A[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(A[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(A[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(A[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(A[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(A[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(A[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),I&&(A[r.BORDER_BOTTOM_STYLE_CLASSES[I]]=!0),L&&(A[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(A[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(A[r.COLOR_CLASSES[N]]=!0),j&&(A[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(A[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(A[r.BOX_SIZING_CLASSES[P]]=!0),D&&(A[r.POSITION_TOP_CLASSES[D]]=!0),G&&(A[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(A[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(A[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(A[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.li,{className:`${Object.keys(A).join(" ")} ${U||""}`,...$,children:B})},Yo=E.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:I,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,className:U,children:B,...$},A)=>{const y={};return e&&(y[r.MARGIN_CLASSES[e]]=!0),t&&(y[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(y[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(y[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(y[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(y[r.PADDING_CLASSES[o]]=!0),a&&(y[r.PADDING_TOP_CLASSES[a]]=!0),l&&(y[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(y[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(y[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(y[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(y[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(y[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(y[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(y[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(y[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(y[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(y[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(y[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(y[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),I&&(y[r.BORDER_BOTTOM_STYLE_CLASSES[I]]=!0),L&&(y[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(y[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(y[r.COLOR_CLASSES[N]]=!0),j&&(y[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(y[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(y[r.BOX_SIZING_CLASSES[P]]=!0),D&&(y[r.POSITION_TOP_CLASSES[D]]=!0),G&&(y[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(y[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(y[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(y[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.li,{ref:A,className:`${Object.keys(y).join(" ")} ${U||""}`,...$,children:B})}),Yn=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:I,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,className:w,cursor:U,children:B,...$})=>{const A={};return e&&(A[r.MARGIN_CLASSES[e]]=!0),t&&(A[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(A[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(A[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(A[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(A[r.PADDING_CLASSES[o]]=!0),a&&(A[r.PADDING_TOP_CLASSES[a]]=!0),l&&(A[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(A[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(A[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(A[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(A[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(A[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(A[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(A[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(A[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(A[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(A[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(A[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(A[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),I&&(A[r.BORDER_BOTTOM_STYLE_CLASSES[I]]=!0),L&&(A[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(A[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(A[r.COLOR_CLASSES[N]]=!0),j&&(A[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(A[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(A[r.BOX_SIZING_CLASSES[P]]=!0),D&&(A[r.POSITION_TOP_CLASSES[D]]=!0),G&&(A[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(A[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(A[r.POSITION_RIGHT_CLASSES[x]]=!0),U&&(A[r.CURSOR_CLASSES[U]]=!0),h.jsx(k.ul,{className:`${Object.keys(A).join(" ")} ${w||""}`,...$,children:B})},Vo=E.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:p,borderTopRightRadius:g,borderStyle:m,borderLeftStyle:T,borderRightStyle:C,borderTopStyle:O,borderBottomStyle:I,borderWidth:L,bgColor:R,paletteColor:N,borderColor:j,outlineColor:M,boxSizing:P,top:D,bottom:G,left:H,right:x,cursor:w,className:U,children:B,...$},A)=>{const y={};return e&&(y[r.MARGIN_CLASSES[e]]=!0),t&&(y[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(y[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(y[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(y[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(y[r.PADDING_CLASSES[o]]=!0),a&&(y[r.PADDING_TOP_CLASSES[a]]=!0),l&&(y[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(y[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(y[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(y[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(y[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(y[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(y[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),p&&(y[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[p]]=!0),g&&(y[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[g]]=!0),m&&(y[r.BORDER_STYLE_CLASSES[m]]=!0),T&&(y[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),C&&(y[r.BORDER_RIGHT_STYLE_CLASSES[C]]=!0),O&&(y[r.BORDER_TOP_STYLE_CLASSES[O]]=!0),I&&(y[r.BORDER_BOTTOM_STYLE_CLASSES[I]]=!0),L&&(y[r.BORDER_WIDTH_CLASSES[L]]=!0),R&&(y[r.BACKGROUND_COLOR_CLASSES[R]]=!0),N&&(y[r.COLOR_CLASSES[N]]=!0),j&&(y[r.BORDER_COLOR_CLASSES[j]]=!0),M&&(y[r.OUTLINE_COLOR_CLASSES[M]]=!0),P&&(y[r.BOX_SIZING_CLASSES[P]]=!0),D&&(y[r.POSITION_TOP_CLASSES[D]]=!0),G&&(y[r.POSITION_BOTTOM_CLASSES[G]]=!0),H&&(y[r.POSITION_LEFT_CLASSES[H]]=!0),x&&(y[r.POSITION_RIGHT_CLASSES[x]]=!0),w&&(y[r.CURSOR_CLASSES[w]]=!0),h.jsx(k.ul,{ref:A,className:`${Object.keys(y).join(" ")} ${U||""}`,...$,children:B})}),Xo=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h1,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},Wo=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h1,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),qo=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h2,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},Ko=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h2,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),Qo=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h3,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},Jo=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h3,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),ea=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h4,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},ta=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={};return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h4,{ref:u,className:`${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),na=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h5,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},ra=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h5,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),sa=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h6,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},ia=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.h6,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})});function Mt(e,t){return e+t>8?r.FontSizes.Size8:e+t<1?r.FontSizes.Size1:e+t}const Pt=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f,baseFontSize:S}=V();return t?S!==r.BASE_FONT_SIZE?u[r.FONT_SIZE_CLASSES[Mt(t,S-r.BASE_FONT_SIZE)]]=!0:u[r.FONT_SIZE_CLASSES[t]]=!0:u[r.FONT_SIZE_CLASSES[S]]=!0,e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.p,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},oa=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S,baseFontSize:d}=V();return t?d!==r.BASE_FONT_SIZE?f[r.FONT_SIZE_CLASSES[Mt(t,d-r.BASE_FONT_SIZE)]]=!0:f[r.FONT_SIZE_CLASSES[t]]=!0:f[r.FONT_SIZE_CLASSES[d]]=!0,e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(k.p,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),q=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,cursor:l,children:c,...u})=>{const f={},{theme:S,baseFontSize:d}=V();return t?d!==r.BASE_FONT_SIZE?f[r.FONT_SIZE_CLASSES[Mt(t,d-r.BASE_FONT_SIZE)]]=!0:f[r.FONT_SIZE_CLASSES[t]]=!0:f[r.FONT_SIZE_CLASSES[d]]=!0,e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),l&&(f[r.CURSOR_CLASSES[l]]=!0),h.jsx(k.span,{className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...u,children:c})},aa=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,cursor:l,children:c,...u},f)=>{const S={},{theme:d,baseFontSize:_}=V();return t?_!==r.BASE_FONT_SIZE?S[r.FONT_SIZE_CLASSES[Mt(t,_-r.BASE_FONT_SIZE)]]=!0:S[r.FONT_SIZE_CLASSES[t]]=!0:S[r.FONT_SIZE_CLASSES[_]]=!0,e&&(S[r.COLOR_CLASSES[e]]=!0),t&&(S[r.FONT_SIZE_CLASSES[t]]=!0),n&&(S[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(S[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(S[r.FONT_STYLE_CLASSES[i]]=!0),o&&(S[r.TEXT_ALIGN_CLASSES[o]]=!0),l&&(S[r.CURSOR_CLASSES[l]]=!0),h.jsx(k.span,{ref:f,className:`${r.THEME_CLASSES[d]} ${Object.keys(S).join(" ")} ${a||""}`,...u,children:c})}),ca=({header:e,children:t,...n})=>{switch(e){case"h1":return h.jsx(k.h1,{...n,children:t});case"h2":return h.jsx(k.h2,{...n,children:t});case"h3":return h.jsx(k.h3,{...n,children:t});case"h4":return h.jsx(k.h4,{...n,children:t});case"h5":return h.jsx(k.h5,{...n,children:t});case"h6":return h.jsx(k.h6,{...n,children:t});default:return h.jsx(k.h6,{...n,children:t})}},ua=E.forwardRef(({header:e,children:t,...n},s)=>{switch(e){case"h1":return h.jsx(k.h1,{ref:s,...n,children:t});case"h2":return h.jsx(k.h2,{ref:s,...n,children:t});case"h3":return h.jsx(k.h3,{ref:s,...n,children:t});case"h4":return h.jsx(k.h4,{ref:s,...n,children:t});case"h5":return h.jsx(k.h5,{ref:s,...n,children:t});case"h6":return h.jsx(k.h6,{ref:s,...n,children:t});default:return h.jsx(k.h6,{ref:s,...n,children:t})}}),la=({header:e,paletteColor:t,fontSize:n,fontFamily:s,fontWeight:i,fontStyle:o,textAlign:a,className:l,children:c,...u})=>{const f={},{theme:S}=V();return t&&(f[r.COLOR_CLASSES[t]]=!0),n&&(f[r.FONT_SIZE_CLASSES[n]]=!0),s&&(f[r.FONT_FAMILY_CLASSES[s]]=!0),i&&(f[r.FONT_WEIGHT_CLASSES[i]]=!0),o&&(f[r.FONT_STYLE_CLASSES[o]]=!0),a&&(f[r.TEXT_ALIGN_CLASSES[a]]=!0),h.jsx(ca,{header:e,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${l||""}`,...u,children:c})},fa=E.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(ua,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})});function $s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vt,Ar;function da(){if(Ar)return Vt;Ar=1;function e(t,n,s){var i,o,a,l,c;n==null&&(n=100);function u(){var S=Date.now()-l;S<n&&S>=0?i=setTimeout(u,n-S):(i=null,s||(c=t.apply(a,o),a=o=null))}var f=function(){a=this,o=arguments,l=Date.now();var S=s&&!i;return i||(i=setTimeout(u,n)),S&&(c=t.apply(a,o),a=o=null),c};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(c=t.apply(a,o),a=o=null,clearTimeout(i),i=null)},f}return e.debounce=e,Vt=e,Vt}var ha=da();const Cr=$s(ha);function ge(e){let{debounce:t,scroll:n,polyfill:s,offsetSize:i}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const o=s||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,l]=E.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=E.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,S=E.useRef(!1);E.useEffect(()=>(S.current=!0,()=>void(S.current=!1)));const[d,_,p]=E.useMemo(()=>{const C=()=>{if(!c.current.element)return;const{left:O,top:I,width:L,height:R,bottom:N,right:j,x:M,y:P}=c.current.element.getBoundingClientRect(),D={left:O,top:I,width:L,height:R,bottom:N,right:j,x:M,y:P};c.current.element instanceof HTMLElement&&i&&(D.height=c.current.element.offsetHeight,D.width=c.current.element.offsetWidth),Object.freeze(D),S.current&&!ga(c.current.lastBounds,D)&&l(c.current.lastBounds=D)};return[C,f?Cr(C,f):C,u?Cr(C,u):C]},[l,i,u,f]);function g(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(C=>C.removeEventListener("scroll",p,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function m(){c.current.element&&(c.current.resizeObserver=new o(p),c.current.resizeObserver.observe(c.current.element),n&&c.current.scrollContainers&&c.current.scrollContainers.forEach(C=>C.addEventListener("scroll",p,{capture:!0,passive:!0})))}const T=C=>{!C||C===c.current.element||(g(),c.current.element=C,c.current.scrollContainers=Zs(C),m())};return _a(p,!!n),Sa(_),E.useEffect(()=>{g(),m()},[n,p,_]),E.useEffect(()=>g,[]),[T,a,d]}function Sa(e){E.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function _a(e,t){E.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function Zs(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:s,overflowY:i}=window.getComputedStyle(e);return[n,s,i].some(o=>o==="auto"||o==="scroll")&&t.push(e),[...t,...Zs(e.parentElement)]}const pa=["x","y","top","bottom","left","right","width","height"],ga=(e,t)=>pa.every(n=>e[n]===t[n]),ma=({children:e,inherit:t=!1,width:n="auto",height:s="auto"})=>{const[i,o]=ge(),a=E.useMemo(()=>o.height,[o.height]),l=E.useMemo(()=>o.width,[o.width]),c=E.Children.map(e,u=>E.isValidElement(u)?E.cloneElement(u,{width:l,height:a}):u);return h.jsx("div",{ref:i,style:{width:t?"inherit":n,height:t?"inherit":s},children:c})},St={[r.Sizings.Size1]:{containerSize:8,size:4},[r.Sizings.Size2]:{containerSize:12,size:8},[r.Sizings.Size3]:{containerSize:16,size:12},[r.Sizings.Size4]:{containerSize:20,size:16},[r.Sizings.Size5]:{containerSize:24,size:20},[r.Sizings.Size6]:{containerSize:28,size:24},[r.Sizings.Size7]:{containerSize:32,size:28},[r.Sizings.Size8]:{containerSize:36,size:32},[r.Sizings.Size9]:{containerSize:44,size:40},[r.Sizings.Size10]:{containerSize:52,size:48},[r.Sizings.Size11]:{containerSize:60,size:54},[r.Sizings.Size12]:{containerSize:68,size:64},[r.Sizings.Size13]:{containerSize:76,size:72},[r.Sizings.Size14]:{containerSize:84,size:80},[r.Sizings.Size15]:{containerSize:92,size:88}};function Ys({size:e=r.Sizings.Size3}){return h.jsx("div",{className:"image-container",style:{width:`${St[e].containerSize}px`,height:`${St[e].containerSize}px`},children:h.jsx("svg",{className:"text-zinc-300",viewBox:"0 0 2400 2400",width:St[e].size,height:St[e].size,children:h.jsxs("g",{strokeWidth:200,strokeLinecap:"round",stroke:"currentColor",fill:"none",children:[h.jsx("path",{d:"M1200 600L1200 100"}),h.jsx("path",{opacity:.5,d:"M1200 2300L1200 1800"}),h.jsx("path",{opacity:.917,d:"M900 680.4L650 247.4"}),h.jsx("path",{opacity:.417,d:"M1750 2152.6L1500 1719.6"}),h.jsx("path",{opacity:.833,d:"M680.4 900L247.4 650"}),h.jsx("path",{opacity:.333,d:"M2152.6 1750L1719.6 1500"}),h.jsx("path",{opacity:.75,d:"M600 1200L100 1200"}),h.jsx("path",{opacity:.25,d:"M2300 1200L1800 1200"}),h.jsx("path",{opacity:.667,d:"M680.4 1500L247.4 1750"}),h.jsx("path",{opacity:.167,d:"M2152.6 650L1719.6 900"}),h.jsx("path",{opacity:.583,d:"M900 1719.6L650 2152.6"}),h.jsx("path",{opacity:.083,d:"M1750 247.4L1500 680.4"}),h.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",keyTimes:"0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667",values:"0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199",dur:"0.83333s",begin:"0s",repeatCount:"indefinite",calcMode:"discrete"})]})})})}const Ea=({isLoading:e,size:t=r.Sizings.Size3})=>ue(e,{from:{opacity:0,scale:.6,height:0},enter:{opacity:1,scale:1,height:30},leave:{opacity:0,scale:.6,height:0}})((s,i)=>i&&h.jsx(k.div,{style:{display:"flex",justifyContent:"center",alignItems:"center",...s},children:h.jsx(Ys,{size:t})})),Ta=({isOpen:e,children:t})=>{const[n,s]=ge(),i={height:e?s.height:0,width:"auto",overflow:"hidden",opacity:e?1:0};return h.jsx(b,{style:i,children:h.jsx("div",{ref:n,children:h.jsx(b,{style:{height:"max-content"},children:t})})})},Xt={horizontal:{from:{x:10},enter:{x:0},leave:{x:-10}},vertical:{from:{y:10},enter:{y:0},leave:{y:-10}},verticalInverted:{from:{y:-10},enter:{y:0},leave:{y:10}}},ya=({direction:e,isShown:t=!0,children:n})=>{const s=ue(t,{from:{...Xt[e].from,opacity:0,display:"none"},enter:{...Xt[e].enter,opacity:1,display:"block"},leave:{...Xt[e].leave,opacity:0,display:"none"}});return h.jsx(h.Fragment,{children:s((i,o)=>o&&h.jsx(b,{style:{...i,height:"inherit",width:"inherit",overflow:"hidden"},children:n}))})},Wt={horizontal:{from:e=>({x:10*e}),enter:e=>({x:0*e}),leave:e=>({x:-10*e})},vertical:{from:e=>({y:10*e}),enter:e=>({y:0*e}),leave:e=>({y:-10*e})}},Vs=({direction:e="horizontal",isShown:t=!0,enterOffsetBy:n=1,children:s})=>{const i=ue(t,{from:{...Wt[e].from(n),opacity:0,display:"none"},enter:{...Wt[e].enter(n),opacity:1,display:"block"},leave:{...Wt[e].leave(n),opacity:0,display:"none"}});return h.jsx(h.Fragment,{children:i((o,a)=>a&&h.jsx(b,{style:{height:"inherit",width:"inherit",overflow:"hidden",...o},children:s}))})},Aa=({isOpen:e,children:t})=>{const[n,s]=ge(),[i,o]=W(()=>({opacity:0,height:0,width:0}));return o.start({opacity:e?1:0,height:e?s.height:0,width:e?s.width:0}),h.jsx(b,{style:{position:"absolute",overflow:"hidden",...i},boxSizing:r.BoxSizings.BorderBox,children:h.jsx("div",{ref:n,style:{width:"max-content",height:"max-content",boxSizing:"border-box"},children:t})})},Ce={[r.Sizings.Size1]:{padding:r.Spacings.Size1,size:r.Sizings.Size1},[r.Sizings.Size2]:{padding:r.Spacings.Size1,size:r.Sizings.Size2},[r.Sizings.Size3]:{padding:r.Spacings.Size1,size:r.Sizings.Size3},[r.Sizings.Size4]:{padding:r.Spacings.Size1,size:r.Sizings.Size4},[r.Sizings.Size5]:{padding:r.Spacings.Size1,size:r.Sizings.Size5},[r.Sizings.Size6]:{padding:r.Spacings.Size2,size:r.Sizings.Size6},[r.Sizings.Size7]:{padding:r.Spacings.Size2,size:r.Sizings.Size7},[r.Sizings.Size8]:{padding:r.Spacings.Size3,size:r.Sizings.Size8},[r.Sizings.Size9]:{padding:r.Spacings.Size3,size:r.Sizings.Size9},[r.Sizings.Size10]:{padding:r.Spacings.Size4,size:r.Sizings.Size10},[r.Sizings.Size11]:{padding:r.Spacings.Size4,size:r.Sizings.Size11},[r.Sizings.Size12]:{padding:r.Spacings.Size5,size:r.Sizings.Size12},[r.Sizings.Size13]:{padding:r.Spacings.Size5,size:r.Sizings.Size13},[r.Sizings.Size14]:{padding:r.Spacings.Size6,size:r.Sizings.Size14},[r.Sizings.Size15]:{padding:r.Spacings.Size6,size:r.Sizings.Size15}};function Ca({size:e=r.Sizings.Size3,...t}){return h.jsx("div",{className:"icon-container",style:{width:`${e+4}px`,height:`${e+4}px`},children:h.jsx("svg",{className:"text-zinc-300",viewBox:"0 0 2400 2400",width:e,height:e,...t,children:h.jsxs("g",{strokeWidth:200,strokeLinecap:"round",stroke:"currentColor",fill:"none",children:[h.jsx("path",{d:"M1200 600L1200 100"}),h.jsx("path",{opacity:.5,d:"M1200 2300L1200 1800"}),h.jsx("path",{opacity:.917,d:"M900 680.4L650 247.4"}),h.jsx("path",{opacity:.417,d:"M1750 2152.6L1500 1719.6"}),h.jsx("path",{opacity:.833,d:"M680.4 900L247.4 650"}),h.jsx("path",{opacity:.333,d:"M2152.6 1750L1719.6 1500"}),h.jsx("path",{opacity:.75,d:"M600 1200L100 1200"}),h.jsx("path",{opacity:.25,d:"M2300 1200L1800 1200"}),h.jsx("path",{opacity:.667,d:"M680.4 1500L247.4 1750"}),h.jsx("path",{opacity:.167,d:"M2152.6 650L1719.6 900"}),h.jsx("path",{opacity:.583,d:"M900 1719.6L650 2152.6"}),h.jsx("path",{opacity:.083,d:"M1750 247.4L1500 680.4"}),h.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",keyTimes:"0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667",values:"0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199",dur:"0.83333s",begin:"0s",repeatCount:"indefinite",calcMode:"discrete"})]})})})}const ie=({name:e,size:t=r.Sizings.Size5,withMargin:n=!0,width:s,height:i,colorLight:o=r.ColorPalettes.Grey5,colorDark:a=r.ColorPalettes.Grey5,iconAction:l,cursor:c=r.Cursors.Default,animated:u=!0,overflow:f="hidden",borderRadius:S="50%"})=>{const{theme:d}=V(),[_,p]=W(()=>({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Transparent],scale:1})),g=d!==r.Themes.Light?r.COLOR_VALUES[a]:r.COLOR_VALUES[o],m=u&&typeof l<"u";return h.jsx(Y,{onClick:l,display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,style:{width:"max-content",color:g,cursor:m?"pointer":"default",borderRadius:S,overflow:f},onMouseEnter:()=>m&&p.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Primary3]}),onMouseLeave:()=>m&&p.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Transparent]}),onMouseDown:()=>m&&p.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Primary2],scale:.85}),onMouseUp:()=>m&&p.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Primary3],scale:1}),children:h.jsx(b,{padding:n?Ce[t].padding:void 0,cursor:c,style:m?{..._,borderRadius:S,display:"flex",alignItems:"center",justifyContent:"center",minWidth:Ce[t].size+3,minHeight:Ce[t].size+3}:{borderRadius:S,display:"flex",alignItems:"center",justifyContent:"center",minWidth:Ce[t].size+3,minHeight:Ce[t].size+3},children:e==="spinner"?h.jsx(Ca,{size:Ce[t].size,color:g}):h.jsx("svg",{width:s||Ce[t].size,height:i||Ce[t].size,fill:"none",stroke:g,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("use",{href:`/feather-sprite.svg#${e}`})})})})},Xs=E.createContext({theme:r.Themes.Default,baseFontSize:r.FontSizes.Size2||2,handleSetTheme:()=>{},onSetBaseFontSize:()=>{}});function Oa({children:e}){const t=La();return h.jsx(Xs.Provider,{value:t,children:e})}const V=()=>E.useContext(Xs);function La(){const[e,t]=E.useState(r.Themes.Default),n=a=>{t(a)},[s,i]=E.useState(r.FontSizes.Size2);return{theme:e,baseFontSize:s,handleSetTheme:n,onSetBaseFontSize:a=>{i(l=>l+a>8?r.FontSizes.Size8:l+a<1?r.FontSizes.Size1:l+a)}}}const Ws=E.createContext({globalEventRef:null,handleGlobalEventRef:()=>{},catchUserAxiosNextApiError:void 0,catchUserAxiosFetcherError:void 0});function va({children:e}){const t=Ia();return h.jsx(Ws.Provider,{value:t,children:e})}const qs=()=>E.useContext(Ws);function Ia(){const e=E.useRef(null),t=E.useCallback((i,o)=>{var a;(a=e.current)==null||a.call(e,i,r.TOAST_TYPE[o])},[]),n=E.useCallback(i=>{var o;if(i.response){const a=((o=i.response.data)==null?void 0:o.message)||"An error occurred";t(a,r.ToastTypes.Error)}else i.request?t("Could not reach server",r.ToastTypes.Error):t("Could not process your request",r.ToastTypes.Error)},[]),s=E.useCallback(i=>{var o;if(i.response){const a=((o=i.response.data)==null?void 0:o.message)||"An error occurred";t(a,r.ToastTypes.Error)}else i.request?t("Could not reach server",r.ToastTypes.Error):t("Could not process your request",r.ToastTypes.Error)},[]);return{globalEventRef:e,handleGlobalEventRef:t,catchUserAxiosNextApiError:n,catchUserAxiosFetcherError:s}}const ba=({level:e,size:t=r.AdmonitionSizes.Medium,descriptionText:n,children:s})=>h.jsx(b,{borderRadius:r.Radiuses.Size4,borderColor:r.AdmonitionColors[e].borderColor,borderWidth:r.BorderWidths.Size2,bgColor:r.AdmonitionColors[e].bgColor,style:{width:"max-content"},children:h.jsxs(Y,{children:[h.jsx(b,{padding:r.ADMONITION_SIZE[t].title.padding,paddingBottom:r.ADMONITION_SIZE[t].title.paddingBottom,paddingLeft:r.ADMONITION_SIZE[t].title.paddingLeft,paddingRight:r.ADMONITION_SIZE[t].title.paddingRight,children:h.jsxs(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.FlexStart,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(ie,{name:r.AdmonitionIcons[e].titleIcon,colorLight:r.AdmonitionColors[e].iconColor,colorDark:r.AdmonitionColors[e].iconColor,size:r.ADMONITION_SIZE[t].title.iconSize,withMargin:!1,borderRadius:void 0,overflow:""}),h.jsx(b,{marginLeft:r.ADMONITION_SIZE[t].title.iconMargin,children:h.jsx(q,{fontSize:r.ADMONITION_SIZE[t].title.fontSize,fontWeight:r.ADMONITION_SIZE[t].title.fontWeight,children:r.AdmonitionTitles[e]})})]})}),h.jsx(b,{padding:r.ADMONITION_SIZE[t].content.padding,paddingTop:r.ADMONITION_SIZE[t].content.paddingTop,paddingLeft:r.ADMONITION_SIZE[t].content.paddingLeft,paddingRight:r.ADMONITION_SIZE[t].title.paddingRight,children:h.jsx(Pt,{fontSize:r.ADMONITION_SIZE[t].content.fontSize,children:n})}),s&&h.jsx(b,{padding:r.ADMONITION_SIZE[t].content.padding,paddingTop:r.ADMONITION_SIZE[t].content.paddingTop,paddingLeft:r.ADMONITION_SIZE[t].content.paddingLeft,paddingRight:r.ADMONITION_SIZE[t].title.paddingRight,children:s})]})}),xa=({hoverAnimation:e,size:t=r.AvatarSizes.Size3,avatarName:n,withHover:s})=>s?n?h.jsx(b,{bgColor:r.ColorPalettes.Primary4,padding:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderRadius:r.Radiuses.Size4,boxShadow:r.BoxShadows.Size3,style:{position:"absolute",left:"50%",transform:"translateX(-50%)",width:"max-content",zIndex:1,...e},children:h.jsx(q,{fontSize:r.AVATAR_SIZE[t].fontSize,children:n})}):h.jsx(h.Fragment,{}):n?h.jsx(Ra,{children:h.jsx(q,{fontSize:r.AVATAR_SIZE[t].fontSize,children:n})}):h.jsx(h.Fragment,{}),Ra=({children:e})=>h.jsx(b,{style:{opacity:1},children:e});function Or(){for(var e="",t="0123456789abcdef",n=0;n<6;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return e}function wa(){var e=Math.floor(Math.random()*360),t="linear-gradient("+e+"deg, #"+Or()+", #"+Or()+")";return t}const Ks=({avatarName:e,size:t=r.AvatarSizes.Size2,withHover:n=!0,onClick:s,border:i=!0,borderColor:o,children:a})=>{const[l,c]=W(()=>({opacity:0,y:-5,scale:.7,transformOrigin:"top center",pointerEvents:"auto"}));return h.jsx(b,{style:{width:"max-content"},onMouseEnter:()=>c.start({opacity:1,y:3,scale:1}),onMouseLeave:()=>c.start({opacity:0,y:-5,scale:.7,pointerEvents:"none"}),onClick:s,children:h.jsxs(Y,{style:{width:"max-content",position:"relative"},children:[h.jsx(Y,{display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,style:{width:"100%"},children:h.jsx(b,{borderColor:i?o||r.ColorPalettes.Grey3:void 0,borderStyle:i?r.BorderStyles.Solid:void 0,borderWidth:i?r.BorderWidths.Size2:void 0,style:{overflow:"hidden",maxWidth:"100%",borderRadius:"50%",width:r.AVATAR_SIZE[t].image,height:r.AVATAR_SIZE[t].image},children:a?h.jsx(h.Fragment,{children:a}):h.jsx(b,{style:{width:"100%",height:"100%",background:wa()}})})}),h.jsx(xa,{hoverAnimation:l,avatarName:e,size:t,withHover:n})]})})},Na=({avatars:e,border:t,borderColor:n,withHover:s,size:i})=>{const[o,a]=Zn(e.length,l=>({y:0,x:l===0?0:l*-10}),[]);return h.jsx(Y,{display:r.Displays.Flex,children:o.map((l,c)=>h.jsx(k.div,{style:l,onMouseEnter:()=>a.start(u=>{if(u===c)return{y:-5}}),onMouseLeave:()=>a.start(u=>{if(u===c)return{y:0}}),children:h.jsx(Ks,{avatarName:e[c].name,border:t,borderColor:n,onClick:e[c].onClick,isLoading:e[c].isLoading,withHover:s,size:i,children:e[c].children})},c))})},kt=({labelName:e="",offsetX:t=0,y:n=50,x:s=0,hover:i=!1})=>{const[o,a]=ge(),l=W({opacity:i?1:0,x:s,y:n}),c=W({opacity:i?1:0,x:-(a.width/2)+t,y:n});return h.jsx(Re,{ref:o,style:t!==0?c:l,children:h.jsx(b,{children:h.jsx(Pt,{children:e})})})},Lr=({icon:e,iconSize:t,iconState:n,iconColor:s,iconPosition:i,iconMargin:o})=>{const[a,l]=E.useState(n);E.useEffect(()=>{l(n)},[n]);const c=ue(a,{from:{opacity:0,transform:"scale(0.6)"},enter:{opacity:1,transform:"scale(1)"},leave:{opacity:0,transform:"scale(0.6)"},onRest:()=>{(n===r.ButtonStates.Success||n!==r.ButtonStates.Error)&&setTimeout(()=>{(a===r.ButtonStates.Success||a!==r.ButtonStates.Error)&&l(r.ButtonStates.Icon)},3e3)}});return h.jsx(b,{marginRight:i===r.ButtonIconPositions.Left?o:void 0,marginLeft:i===r.ButtonIconPositions.Right?o:void 0,style:{position:"relative",[o===r.Spacings.Size0?i===r.ButtonIconPositions.Left?"marginRight":i===r.ButtonIconPositions.Right?"marginLeft":"":""]:2,minWidth:t,maxWidth:t,minHeight:t,maxHeight:t},children:c(u=>{var f,S,d,_,p,g,m,T,C;return h.jsx(q,{style:{...u,position:"absolute",top:"0",left:"0"},children:h.jsx(ie,{name:n!==r.ButtonStates.Icon?r.ButtonStateIcon[n]:e,colorLight:(S=(f=r.BUTTON_STATE[a])==null?void 0:f.icon)!=null&&S.iconColor?(_=(d=r.BUTTON_STATE[a])==null?void 0:d.icon)==null?void 0:_.iconColor:s,colorDark:(g=(p=r.BUTTON_STATE[a])==null?void 0:p.icon)!=null&&g.iconColor?(T=(m=r.BUTTON_STATE[a])==null?void 0:m.icon)==null?void 0:T.iconColor:s,size:t,withMargin:!1,cursor:(C=r.BUTTON_STATE[a])!=null&&C.cursor?r.BUTTON_STATE[a].cursor:r.Cursors.Pointer})})})})},Qs=({name:e,buttonSize:t=r.ButtonSizes.Medium,buttonColor:n=r.ButtonColors.Primary5,buttonState:s=r.ButtonStates.Icon,buttonType:i=r.ButtonTypes.Button,buttonStyle:o=r.ButtonStyles.Filled,buttonShadow:a=r.BoxShadows.Size2,icon:l,iconColor:c=r.ColorPalettes.Primary8,iconPosition:u=r.ButtonIconPositions.Left,animate:f=!0,hover:S,clickAction:d=()=>{}})=>{var L,R,N,j,M,P,D,G,H,x,w,U,B,$,A,y,Z,he,ut,Fe,te,Te;var _=s===r.ButtonStates.Disabled;const[p,g]=E.useState(S),[m,T]=ge({debounce:500}),[C,O]=W(()=>({y:0,transform:"scale(1.0)"})),I=f&&!_&&typeof((L=r.BUTTON_STATE[s])==null?void 0:L.animation)>"u";return h.jsxs(Re,{style:{width:"max-content"},ref:m,onMouseEnter:()=>{g(!0)},onMouseLeave:()=>{g(!1)},onMouseDown:()=>I&&O.start({transform:"scale(0.9)"}),onMouseUp:()=>I&&O.start({transform:"scale(1.0)"}),onTouchStart:()=>I&&O.start({transform:"scale(0.9)"}),onTouchCancel:()=>I&&O.start({transform:"scale(1.0)"}),onTouchEnd:()=>I&&O.start({transform:"scale(1.0)"}),children:[S&&h.jsx(kt,{labelName:e,hover:p,offsetX:T.width/2,y:T.height}),h.jsx(b,{style:I?C:void 0,children:h.jsx(zs,{type:i,onClick:d,disabled:_,paddingTop:r.BUTTON_SIZE[t].paddingTop,paddingBottom:r.BUTTON_SIZE[t].paddingBottom,paddingLeft:r.BUTTON_SIZE[t].paddingLeft,paddingRight:r.BUTTON_SIZE[t].paddingRight,borderRadius:r.BUTTON_SIZE[t].borderRadius,borderWidth:r.BUTTON_STYLE[o].border.borderWidth,borderStyle:r.BUTTON_STYLE[o].border.borderStyle,boxShadow:o&&((R=r.BUTTON_STYLE[o])!=null&&R.shadow)?r.BUTTON_STYLE[o].shadow:a,bgColor:o===r.ButtonStyles.Gray&&s===r.ButtonStates.Error?r.BUTTON_STYLE[o].bgColor:(j=(N=r.BUTTON_STATE[s])==null?void 0:N.color)!=null&&j.bgColor&&o!==r.ButtonStyles.Outlined&&o!==r.ButtonStyles.Plain?(P=(M=r.BUTTON_STATE[s])==null?void 0:M.color)==null?void 0:P.bgColor:o&&((D=r.BUTTON_STYLE[o])!=null&&D.bgColor)?r.BUTTON_STYLE[o].bgColor:r.BUTTON_COLORS[n].background,borderColor:(H=(G=r.BUTTON_STATE[s])==null?void 0:G.color)!=null&&H.borderColor?(w=(x=r.BUTTON_STATE[s])==null?void 0:x.color)==null?void 0:w.borderColor:r.BUTTON_COLORS[n].borderColor,cursor:(U=r.BUTTON_STATE[s])!=null&&U.cursor?r.BUTTON_STATE[s].cursor:r.BUTTON_STYLE[o].cursor,children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:u===r.ButtonIconPositions.Left?h.jsxs(h.Fragment,{children:[l&&h.jsx(Lr,{icon:l,iconSize:r.BUTTON_SIZE[t].icon,iconState:s,iconColor:c,iconPosition:u,iconMargin:r.BUTTON_SIZE[t].iconMargin}),e!==""&&!S&&h.jsx(q,{fontSize:r.BUTTON_SIZE[t].text,fontWeight:r.FontWeights.Size3,paletteColor:($=(B=r.BUTTON_STATE[s])==null?void 0:B.text)!=null&&$.color?(y=(A=r.BUTTON_STATE[s])==null?void 0:A.text)==null?void 0:y.color:o&&((Z=r.BUTTON_STYLE[o])!=null&&Z.fontColor)?r.BUTTON_STYLE[o].fontColor:r.BUTTON_COLORS[n].text,className:`name ${l?"icon-left":""}`,children:e})]}):h.jsxs(h.Fragment,{children:[e!==""&&!S&&h.jsx(q,{fontSize:r.BUTTON_SIZE[t].text,fontWeight:r.FontWeights.Size3,paletteColor:(ut=(he=r.BUTTON_STATE[s])==null?void 0:he.text)!=null&&ut.color?(te=(Fe=r.BUTTON_STATE[s])==null?void 0:Fe.text)==null?void 0:te.color:o&&((Te=r.BUTTON_STYLE[o])!=null&&Te.fontColor)?r.BUTTON_STYLE[o].fontColor:r.BUTTON_COLORS[n].text,className:`name ${l?"icon-right":""}`,children:e}),l&&h.jsx(Lr,{icon:l,iconSize:r.BUTTON_SIZE[t].icon,iconState:s,iconColor:c,iconPosition:u,iconMargin:r.BUTTON_SIZE[t].iconMargin})]})})})})]})},Js=({isChecked:e,size:t,checkboxColor:n=r.CheckboxColors.Grey5,onClick:s})=>h.jsx(ja,{isChecked:e,checkboxColor:n,onClick:s,children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:h.jsx(Ma,{isChecked:e,checkboxColor:n,size:t})})}),Da={borderStyle:"solid"},ja=({isChecked:e,checkboxColor:t=r.CheckboxColors.Grey5,size:n=r.CheckboxSizes.Size3,children:s,onClick:i})=>{const[o,a]=W(()=>({borderColor:e?r.CHECKBOX_COLORS[t].borderColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].borderColor}));return a.start({borderColor:e?r.CHECKBOX_COLORS[t].borderColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].borderColor}),h.jsx(b,{onClick:i,borderRadius:r.CHECKBOX_SIZES[n].boxBorderRadius,style:{padding:r.CHECKBOX_SIZES[n].padding,borderWidth:r.CHECKBOX_SIZES[n].borderWidth,...Da,...o,width:"max-content",cursor:i?"pointer":"default"},children:s})},Ma=({isChecked:e,checkboxColor:t=r.CheckboxColors.Grey5,size:n=r.CheckboxSizes.Size3})=>{const[s,i]=W(()=>({backgroundColor:e?r.CHECKBOX_COLORS[t].checkedColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].checkedColor,scale:e?1:.8,opacity:e?1:0}));return i.start({backgroundColor:e?r.CHECKBOX_COLORS[t].checkedColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].checkedColor,scale:e?1:.8,opacity:e?1:0}),h.jsx(b,{style:{width:r.CHECKBOX_SIZES[n].checkedColor.w,height:r.CHECKBOX_SIZES[n].checkedColor.h},children:h.jsx(b,{borderRadius:r.CHECKBOX_SIZES[n].checkedBorderRadius,style:{width:r.CHECKBOX_SIZES[n].checkedColor.w,height:r.CHECKBOX_SIZES[n].checkedColor.h,...s},children:h.jsx(h.Fragment,{})})})},Pa=({options:e,multiselect:t=!1,checkboxColor:n=r.CheckboxColors.Primary5,size:s,handleClick:i})=>{const o=E.useCallback(a=>{if(t)i(a);else{let l=e.findIndex(u=>u.isChecked===!0),c=e.findIndex(u=>u.id===a);l!==-1&&(c===l||i(e[l].id)),i(a)}},[i,t,e]);return h.jsx(Y,{children:e.map((a,l)=>h.jsx(ka,{checkboxColor:n,id:a.id,name:a.name,isChecked:a.isChecked,size:s,value:a==null?void 0:a.value,handleClickBox:o},l))})},ka=({id:e,name:t,value:n,isChecked:s,checkboxColor:i,size:o,handleClickBox:a})=>h.jsx(b,{onClick:()=>a(e,n),style:{cursor:"pointer"},children:h.jsxs(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(Js,{isChecked:s,checkboxColor:i,size:o}),h.jsx(b,{marginLeft:r.Spacings.Size2,children:h.jsx(q,{children:t})})]})});var ei=(e=>(e[e.Tiny=1]="Tiny",e[e.Small=2]="Small",e[e.Medium=3]="Medium",e[e.Big=4]="Big",e))(ei||{});const Se={1:{fontSize:r.FontSizes.Size1,paddingTop:r.Spacings.Size0,paddingBottom:r.Spacings.Size0,paddingLeft:r.Spacings.Size1,paddingRight:r.Spacings.Size1,borderRadius:r.Radiuses.Size7},2:{fontSize:r.FontSizes.Size2,paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderRadius:r.Radiuses.Size7},3:{fontSize:r.FontSizes.Size3,paddingTop:r.Spacings.Size2,paddingBottom:r.Spacings.Size2,paddingLeft:r.Spacings.Size3,paddingRight:r.Spacings.Size3,borderRadius:r.Radiuses.Size7},4:{fontSize:r.FontSizes.Size4,paddingTop:r.Spacings.Size3,paddingBottom:r.Spacings.Size3,paddingLeft:r.Spacings.Size4,paddingRight:r.Spacings.Size4,borderRadius:r.Radiuses.Size7}};var ti=(e=>(e[e.Filled=1]="Filled",e[e.Outlined=2]="Outlined",e))(ti||{});const me={1:{bgColor:r.ColorPalettes.Primary5,font:{fontColor:r.ColorPalettes.Grey9}},2:{border:{borderColor:r.ColorPalettes.Primary5,borderStyle:r.BorderStyles.Solid,borderWidth:r.BorderWidths.Size2},font:{}}},Fa=({children:e,chipColor:t=r.ColorSets.Primarys,paddings:n="all",margin:s,marginTop:i,marginBottom:o,marginLeft:a,marginRight:l,fontSize:c,chipStyle:u=ti.Filled,size:f=ei.Medium})=>{var _,p,g,m,T,C,O,I,L,R,N,j,M;const{theme:S}=V(),d=W({backgroundColor:S!==r.Themes.Light?(_=me[u])!=null&&_.bgColor?r.COLOR_VALUES[r.ColorRanges[t][0]+2]:void 0:(p=me[u])!=null&&p.bgColor?r.COLOR_VALUES[r.ColorRanges[t][1]-2]:void 0,color:S!==r.Themes.Light?(m=(g=me[u])==null?void 0:g.font)!=null&&m.fontColor?(C=(T=me[u])==null?void 0:T.font)==null?void 0:C.fontColor:r.COLOR_VALUES[r.ColorRanges[t][0]+4]:(I=(O=me[u])==null?void 0:O.font)!=null&&I.fontColor?(R=(L=me[u])==null?void 0:L.font)==null?void 0:R.fontColor:r.COLOR_VALUES[r.ColorRanges[t][0]+4]});return h.jsx(Y,{display:r.Displays.Flex,children:h.jsx(b,{...Ba(n,f),margin:s,marginTop:i,marginBottom:o,marginLeft:a,marginRight:l,borderRadius:Se[f].borderRadius,borderColor:(N=me[u].border)==null?void 0:N.borderColor,borderStyle:(j=me[u].border)==null?void 0:j.borderStyle,borderWidth:(M=me[u].border)==null?void 0:M.borderWidth,style:{...d},children:h.jsx(q,{style:{display:"inline-block",transform:"translateY(-1px)",color:"inherit"},fontSize:c||Se[f].fontSize,fontWeight:r.FontWeights.Size3,children:e})})})},Ba=(e,t)=>{switch(e){case"all":return{paddingTop:Se[t].paddingTop,paddingBottom:Se[t].paddingBottom,paddingLeft:Se[t].paddingLeft,paddingRight:Se[t].paddingRight};case"left right":return{paddingLeft:Se[t].paddingLeft,paddingRight:Se[t].paddingRight};default:return{paddingTop:Se[t].paddingTop,paddingBottom:Se[t].paddingBottom}}};var qt={exports:{}},Kt,vr;function ni(){return vr||(vr=1,Kt={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Kt}var Qt={exports:{}},Jt,Ir;function za(){return Ir||(Ir=1,Jt=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}),Jt}var br;function Ga(){if(br)return Qt.exports;br=1;var e=za(),t=Array.prototype.concat,n=Array.prototype.slice,s=Qt.exports=function(o){for(var a=[],l=0,c=o.length;l<c;l++){var u=o[l];e(u)?a=t.call(a,n.call(u)):a.push(u)}return a};return s.wrap=function(i){return function(){return i(s(arguments))}},Qt.exports}var xr;function Ua(){if(xr)return qt.exports;xr=1;var e=ni(),t=Ga(),n=Object.hasOwnProperty,s=Object.create(null);for(var i in e)n.call(e,i)&&(s[e[i]]=i);var o=qt.exports={to:{},get:{}};o.get=function(c){var u=c.substring(0,3).toLowerCase(),f,S;switch(u){case"hsl":f=o.get.hsl(c),S="hsl";break;case"hwb":f=o.get.hwb(c),S="hwb";break;default:f=o.get.rgb(c),S="rgb";break}return f?{model:S,value:f}:null},o.get.rgb=function(c){if(!c)return null;var u=/^#([a-f0-9]{3,4})$/i,f=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,S=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,_=/^(\w+)$/,p=[0,0,0,1],g,m,T;if(g=c.match(f)){for(T=g[2],g=g[1],m=0;m<3;m++){var C=m*2;p[m]=parseInt(g.slice(C,C+2),16)}T&&(p[3]=parseInt(T,16)/255)}else if(g=c.match(u)){for(g=g[1],T=g[3],m=0;m<3;m++)p[m]=parseInt(g[m]+g[m],16);T&&(p[3]=parseInt(T+T,16)/255)}else if(g=c.match(S)){for(m=0;m<3;m++)p[m]=parseInt(g[m+1],0);g[4]&&(g[5]?p[3]=parseFloat(g[4])*.01:p[3]=parseFloat(g[4]))}else if(g=c.match(d)){for(m=0;m<3;m++)p[m]=Math.round(parseFloat(g[m+1])*2.55);g[4]&&(g[5]?p[3]=parseFloat(g[4])*.01:p[3]=parseFloat(g[4]))}else return(g=c.match(_))?g[1]==="transparent"?[0,0,0,0]:n.call(e,g[1])?(p=e[g[1]],p[3]=1,p):null:null;for(m=0;m<3;m++)p[m]=a(p[m],0,255);return p[3]=a(p[3],0,1),p},o.get.hsl=function(c){if(!c)return null;var u=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,f=c.match(u);if(f){var S=parseFloat(f[4]),d=(parseFloat(f[1])%360+360)%360,_=a(parseFloat(f[2]),0,100),p=a(parseFloat(f[3]),0,100),g=a(isNaN(S)?1:S,0,1);return[d,_,p,g]}return null},o.get.hwb=function(c){if(!c)return null;var u=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,f=c.match(u);if(f){var S=parseFloat(f[4]),d=(parseFloat(f[1])%360+360)%360,_=a(parseFloat(f[2]),0,100),p=a(parseFloat(f[3]),0,100),g=a(isNaN(S)?1:S,0,1);return[d,_,p,g]}return null},o.to.hex=function(){var c=t(arguments);return"#"+l(c[0])+l(c[1])+l(c[2])+(c[3]<1?l(Math.round(c[3]*255)):"")},o.to.rgb=function(){var c=t(arguments);return c.length<4||c[3]===1?"rgb("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+")":"rgba("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+", "+c[3]+")"},o.to.rgb.percent=function(){var c=t(arguments),u=Math.round(c[0]/255*100),f=Math.round(c[1]/255*100),S=Math.round(c[2]/255*100);return c.length<4||c[3]===1?"rgb("+u+"%, "+f+"%, "+S+"%)":"rgba("+u+"%, "+f+"%, "+S+"%, "+c[3]+")"},o.to.hsl=function(){var c=t(arguments);return c.length<4||c[3]===1?"hsl("+c[0]+", "+c[1]+"%, "+c[2]+"%)":"hsla("+c[0]+", "+c[1]+"%, "+c[2]+"%, "+c[3]+")"},o.to.hwb=function(){var c=t(arguments),u="";return c.length>=4&&c[3]!==1&&(u=", "+c[3]),"hwb("+c[0]+", "+c[1]+"%, "+c[2]+"%"+u+")"},o.to.keyword=function(c){return s[c.slice(0,3)]};function a(c,u,f){return Math.min(Math.max(u,c),f)}function l(c){var u=Math.round(c).toString(16).toUpperCase();return u.length<2?"0"+u:u}return qt.exports}var en,Rr;function ri(){if(Rr)return en;Rr=1;const e=ni(),t={};for(const i of Object.keys(e))t[e[i]]=i;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};en=n;for(const i of Object.keys(n)){if(!("channels"in n[i]))throw new Error("missing channels property: "+i);if(!("labels"in n[i]))throw new Error("missing channel labels property: "+i);if(n[i].labels.length!==n[i].channels)throw new Error("channel and label counts mismatch: "+i);const{channels:o,labels:a}=n[i];delete n[i].channels,delete n[i].labels,Object.defineProperty(n[i],"channels",{value:o}),Object.defineProperty(n[i],"labels",{value:a})}n.rgb.hsl=function(i){const o=i[0]/255,a=i[1]/255,l=i[2]/255,c=Math.min(o,a,l),u=Math.max(o,a,l),f=u-c;let S,d;u===c?S=0:o===u?S=(a-l)/f:a===u?S=2+(l-o)/f:l===u&&(S=4+(o-a)/f),S=Math.min(S*60,360),S<0&&(S+=360);const _=(c+u)/2;return u===c?d=0:_<=.5?d=f/(u+c):d=f/(2-u-c),[S,d*100,_*100]},n.rgb.hsv=function(i){let o,a,l,c,u;const f=i[0]/255,S=i[1]/255,d=i[2]/255,_=Math.max(f,S,d),p=_-Math.min(f,S,d),g=function(m){return(_-m)/6/p+1/2};return p===0?(c=0,u=0):(u=p/_,o=g(f),a=g(S),l=g(d),f===_?c=l-a:S===_?c=1/3+o-l:d===_&&(c=2/3+a-o),c<0?c+=1:c>1&&(c-=1)),[c*360,u*100,_*100]},n.rgb.hwb=function(i){const o=i[0],a=i[1];let l=i[2];const c=n.rgb.hsl(i)[0],u=1/255*Math.min(o,Math.min(a,l));return l=1-1/255*Math.max(o,Math.max(a,l)),[c,u*100,l*100]},n.rgb.cmyk=function(i){const o=i[0]/255,a=i[1]/255,l=i[2]/255,c=Math.min(1-o,1-a,1-l),u=(1-o-c)/(1-c)||0,f=(1-a-c)/(1-c)||0,S=(1-l-c)/(1-c)||0;return[u*100,f*100,S*100,c*100]};function s(i,o){return(i[0]-o[0])**2+(i[1]-o[1])**2+(i[2]-o[2])**2}return n.rgb.keyword=function(i){const o=t[i];if(o)return o;let a=1/0,l;for(const c of Object.keys(e)){const u=e[c],f=s(i,u);f<a&&(a=f,l=c)}return l},n.keyword.rgb=function(i){return e[i]},n.rgb.xyz=function(i){let o=i[0]/255,a=i[1]/255,l=i[2]/255;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,l=l>.04045?((l+.055)/1.055)**2.4:l/12.92;const c=o*.4124+a*.3576+l*.1805,u=o*.2126+a*.7152+l*.0722,f=o*.0193+a*.1192+l*.9505;return[c*100,u*100,f*100]},n.rgb.lab=function(i){const o=n.rgb.xyz(i);let a=o[0],l=o[1],c=o[2];a/=95.047,l/=100,c/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116,c=c>.008856?c**(1/3):7.787*c+16/116;const u=116*l-16,f=500*(a-l),S=200*(l-c);return[u,f,S]},n.hsl.rgb=function(i){const o=i[0]/360,a=i[1]/100,l=i[2]/100;let c,u,f;if(a===0)return f=l*255,[f,f,f];l<.5?c=l*(1+a):c=l+a-l*a;const S=2*l-c,d=[0,0,0];for(let _=0;_<3;_++)u=o+1/3*-(_-1),u<0&&u++,u>1&&u--,6*u<1?f=S+(c-S)*6*u:2*u<1?f=c:3*u<2?f=S+(c-S)*(2/3-u)*6:f=S,d[_]=f*255;return d},n.hsl.hsv=function(i){const o=i[0];let a=i[1]/100,l=i[2]/100,c=a;const u=Math.max(l,.01);l*=2,a*=l<=1?l:2-l,c*=u<=1?u:2-u;const f=(l+a)/2,S=l===0?2*c/(u+c):2*a/(l+a);return[o,S*100,f*100]},n.hsv.rgb=function(i){const o=i[0]/60,a=i[1]/100;let l=i[2]/100;const c=Math.floor(o)%6,u=o-Math.floor(o),f=255*l*(1-a),S=255*l*(1-a*u),d=255*l*(1-a*(1-u));switch(l*=255,c){case 0:return[l,d,f];case 1:return[S,l,f];case 2:return[f,l,d];case 3:return[f,S,l];case 4:return[d,f,l];case 5:return[l,f,S]}},n.hsv.hsl=function(i){const o=i[0],a=i[1]/100,l=i[2]/100,c=Math.max(l,.01);let u,f;f=(2-a)*l;const S=(2-a)*c;return u=a*c,u/=S<=1?S:2-S,u=u||0,f/=2,[o,u*100,f*100]},n.hwb.rgb=function(i){const o=i[0]/360;let a=i[1]/100,l=i[2]/100;const c=a+l;let u;c>1&&(a/=c,l/=c);const f=Math.floor(6*o),S=1-l;u=6*o-f,f&1&&(u=1-u);const d=a+u*(S-a);let _,p,g;switch(f){default:case 6:case 0:_=S,p=d,g=a;break;case 1:_=d,p=S,g=a;break;case 2:_=a,p=S,g=d;break;case 3:_=a,p=d,g=S;break;case 4:_=d,p=a,g=S;break;case 5:_=S,p=a,g=d;break}return[_*255,p*255,g*255]},n.cmyk.rgb=function(i){const o=i[0]/100,a=i[1]/100,l=i[2]/100,c=i[3]/100,u=1-Math.min(1,o*(1-c)+c),f=1-Math.min(1,a*(1-c)+c),S=1-Math.min(1,l*(1-c)+c);return[u*255,f*255,S*255]},n.xyz.rgb=function(i){const o=i[0]/100,a=i[1]/100,l=i[2]/100;let c,u,f;return c=o*3.2406+a*-1.5372+l*-.4986,u=o*-.9689+a*1.8758+l*.0415,f=o*.0557+a*-.204+l*1.057,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,c=Math.min(Math.max(0,c),1),u=Math.min(Math.max(0,u),1),f=Math.min(Math.max(0,f),1),[c*255,u*255,f*255]},n.xyz.lab=function(i){let o=i[0],a=i[1],l=i[2];o/=95.047,a/=100,l/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;const c=116*a-16,u=500*(o-a),f=200*(a-l);return[c,u,f]},n.lab.xyz=function(i){const o=i[0],a=i[1],l=i[2];let c,u,f;u=(o+16)/116,c=a/500+u,f=u-l/200;const S=u**3,d=c**3,_=f**3;return u=S>.008856?S:(u-16/116)/7.787,c=d>.008856?d:(c-16/116)/7.787,f=_>.008856?_:(f-16/116)/7.787,c*=95.047,u*=100,f*=108.883,[c,u,f]},n.lab.lch=function(i){const o=i[0],a=i[1],l=i[2];let c;c=Math.atan2(l,a)*360/2/Math.PI,c<0&&(c+=360);const f=Math.sqrt(a*a+l*l);return[o,f,c]},n.lch.lab=function(i){const o=i[0],a=i[1],c=i[2]/360*2*Math.PI,u=a*Math.cos(c),f=a*Math.sin(c);return[o,u,f]},n.rgb.ansi16=function(i,o=null){const[a,l,c]=i;let u=o===null?n.rgb.hsv(i)[2]:o;if(u=Math.round(u/50),u===0)return 30;let f=30+(Math.round(c/255)<<2|Math.round(l/255)<<1|Math.round(a/255));return u===2&&(f+=60),f},n.hsv.ansi16=function(i){return n.rgb.ansi16(n.hsv.rgb(i),i[2])},n.rgb.ansi256=function(i){const o=i[0],a=i[1],l=i[2];return o===a&&a===l?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(a/255*5)+Math.round(l/255*5)},n.ansi16.rgb=function(i){let o=i%10;if(o===0||o===7)return i>50&&(o+=3.5),o=o/10.5*255,[o,o,o];const a=(~~(i>50)+1)*.5,l=(o&1)*a*255,c=(o>>1&1)*a*255,u=(o>>2&1)*a*255;return[l,c,u]},n.ansi256.rgb=function(i){if(i>=232){const u=(i-232)*10+8;return[u,u,u]}i-=16;let o;const a=Math.floor(i/36)/5*255,l=Math.floor((o=i%36)/6)/5*255,c=o%6/5*255;return[a,l,c]},n.rgb.hex=function(i){const a=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(a.length)+a},n.hex.rgb=function(i){const o=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let a=o[0];o[0].length===3&&(a=a.split("").map(S=>S+S).join(""));const l=parseInt(a,16),c=l>>16&255,u=l>>8&255,f=l&255;return[c,u,f]},n.rgb.hcg=function(i){const o=i[0]/255,a=i[1]/255,l=i[2]/255,c=Math.max(Math.max(o,a),l),u=Math.min(Math.min(o,a),l),f=c-u;let S,d;return f<1?S=u/(1-f):S=0,f<=0?d=0:c===o?d=(a-l)/f%6:c===a?d=2+(l-o)/f:d=4+(o-a)/f,d/=6,d%=1,[d*360,f*100,S*100]},n.hsl.hcg=function(i){const o=i[1]/100,a=i[2]/100,l=a<.5?2*o*a:2*o*(1-a);let c=0;return l<1&&(c=(a-.5*l)/(1-l)),[i[0],l*100,c*100]},n.hsv.hcg=function(i){const o=i[1]/100,a=i[2]/100,l=o*a;let c=0;return l<1&&(c=(a-l)/(1-l)),[i[0],l*100,c*100]},n.hcg.rgb=function(i){const o=i[0]/360,a=i[1]/100,l=i[2]/100;if(a===0)return[l*255,l*255,l*255];const c=[0,0,0],u=o%1*6,f=u%1,S=1-f;let d=0;switch(Math.floor(u)){case 0:c[0]=1,c[1]=f,c[2]=0;break;case 1:c[0]=S,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=f;break;case 3:c[0]=0,c[1]=S,c[2]=1;break;case 4:c[0]=f,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=S}return d=(1-a)*l,[(a*c[0]+d)*255,(a*c[1]+d)*255,(a*c[2]+d)*255]},n.hcg.hsv=function(i){const o=i[1]/100,a=i[2]/100,l=o+a*(1-o);let c=0;return l>0&&(c=o/l),[i[0],c*100,l*100]},n.hcg.hsl=function(i){const o=i[1]/100,l=i[2]/100*(1-o)+.5*o;let c=0;return l>0&&l<.5?c=o/(2*l):l>=.5&&l<1&&(c=o/(2*(1-l))),[i[0],c*100,l*100]},n.hcg.hwb=function(i){const o=i[1]/100,a=i[2]/100,l=o+a*(1-o);return[i[0],(l-o)*100,(1-l)*100]},n.hwb.hcg=function(i){const o=i[1]/100,l=1-i[2]/100,c=l-o;let u=0;return c<1&&(u=(l-c)/(1-c)),[i[0],c*100,u*100]},n.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]},n.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]},n.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]},n.gray.hsl=function(i){return[0,0,i[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(i){return[0,100,i[0]]},n.gray.cmyk=function(i){return[0,0,0,i[0]]},n.gray.lab=function(i){return[i[0],0,0]},n.gray.hex=function(i){const o=Math.round(i[0]/100*255)&255,l=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(l.length)+l},n.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]},en}var tn,wr;function Ha(){if(wr)return tn;wr=1;const e=ri();function t(){const o={},a=Object.keys(e);for(let l=a.length,c=0;c<l;c++)o[a[c]]={distance:-1,parent:null};return o}function n(o){const a=t(),l=[o];for(a[o].distance=0;l.length;){const c=l.pop(),u=Object.keys(e[c]);for(let f=u.length,S=0;S<f;S++){const d=u[S],_=a[d];_.distance===-1&&(_.distance=a[c].distance+1,_.parent=c,l.unshift(d))}}return a}function s(o,a){return function(l){return a(o(l))}}function i(o,a){const l=[a[o].parent,o];let c=e[a[o].parent][o],u=a[o].parent;for(;a[u].parent;)l.unshift(a[u].parent),c=s(e[a[u].parent][u],c),u=a[u].parent;return c.conversion=l,c}return tn=function(o){const a=n(o),l={},c=Object.keys(a);for(let u=c.length,f=0;f<u;f++){const S=c[f];a[S].parent!==null&&(l[S]=i(S,a))}return l},tn}var nn,Nr;function $a(){if(Nr)return nn;Nr=1;const e=ri(),t=Ha(),n={},s=Object.keys(e);function i(a){const l=function(...c){const u=c[0];return u==null?u:(u.length>1&&(c=u),a(c))};return"conversion"in a&&(l.conversion=a.conversion),l}function o(a){const l=function(...c){const u=c[0];if(u==null)return u;u.length>1&&(c=u);const f=a(c);if(typeof f=="object")for(let S=f.length,d=0;d<S;d++)f[d]=Math.round(f[d]);return f};return"conversion"in a&&(l.conversion=a.conversion),l}return s.forEach(a=>{n[a]={},Object.defineProperty(n[a],"channels",{value:e[a].channels}),Object.defineProperty(n[a],"labels",{value:e[a].labels});const l=t(a);Object.keys(l).forEach(u=>{const f=l[u];n[a][u]=o(f),n[a][u].raw=i(f)})}),nn=n,nn}var rn,Dr;function Za(){if(Dr)return rn;Dr=1;const e=Ua(),t=$a(),n=["keyword","gray","hex"],s={};for(const d of Object.keys(t))s[[...t[d].labels].sort().join("")]=d;const i={};function o(d,_){if(!(this instanceof o))return new o(d,_);if(_&&_ in n&&(_=null),_&&!(_ in t))throw new Error("Unknown model: "+_);let p,g;if(d==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(d instanceof o)this.model=d.model,this.color=[...d.color],this.valpha=d.valpha;else if(typeof d=="string"){const m=e.get(d);if(m===null)throw new Error("Unable to parse color from string: "+d);this.model=m.model,g=t[this.model].channels,this.color=m.value.slice(0,g),this.valpha=typeof m.value[g]=="number"?m.value[g]:1}else if(d.length>0){this.model=_||"rgb",g=t[this.model].channels;const m=Array.prototype.slice.call(d,0,g);this.color=S(m,g),this.valpha=typeof d[g]=="number"?d[g]:1}else if(typeof d=="number")this.model="rgb",this.color=[d>>16&255,d>>8&255,d&255],this.valpha=1;else{this.valpha=1;const m=Object.keys(d);"alpha"in d&&(m.splice(m.indexOf("alpha"),1),this.valpha=typeof d.alpha=="number"?d.alpha:0);const T=m.sort().join("");if(!(T in s))throw new Error("Unable to parse color from object: "+JSON.stringify(d));this.model=s[T];const{labels:C}=t[this.model],O=[];for(p=0;p<C.length;p++)O.push(d[C[p]]);this.color=S(O)}if(i[this.model])for(g=t[this.model].channels,p=0;p<g;p++){const m=i[this.model][p];m&&(this.color[p]=m(this.color[p]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}o.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(d){let _=this.model in e.to?this:this.rgb();_=_.round(typeof d=="number"?d:1);const p=_.valpha===1?_.color:[..._.color,this.valpha];return e.to[_.model](p)},percentString(d){const _=this.rgb().round(typeof d=="number"?d:1),p=_.valpha===1?_.color:[..._.color,this.valpha];return e.to.rgb.percent(p)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const d={},{channels:_}=t[this.model],{labels:p}=t[this.model];for(let g=0;g<_;g++)d[p[g]]=this.color[g];return this.valpha!==1&&(d.alpha=this.valpha),d},unitArray(){const d=this.rgb().color;return d[0]/=255,d[1]/=255,d[2]/=255,this.valpha!==1&&d.push(this.valpha),d},unitObject(){const d=this.rgb().object();return d.r/=255,d.g/=255,d.b/=255,this.valpha!==1&&(d.alpha=this.valpha),d},round(d){return d=Math.max(d||0,0),new o([...this.color.map(l(d)),this.valpha],this.model)},alpha(d){return d!==void 0?new o([...this.color,Math.max(0,Math.min(1,d))],this.model):this.valpha},red:c("rgb",0,u(255)),green:c("rgb",1,u(255)),blue:c("rgb",2,u(255)),hue:c(["hsl","hsv","hsl","hwb","hcg"],0,d=>(d%360+360)%360),saturationl:c("hsl",1,u(100)),lightness:c("hsl",2,u(100)),saturationv:c("hsv",1,u(100)),value:c("hsv",2,u(100)),chroma:c("hcg",1,u(100)),gray:c("hcg",2,u(100)),white:c("hwb",1,u(100)),wblack:c("hwb",2,u(100)),cyan:c("cmyk",0,u(100)),magenta:c("cmyk",1,u(100)),yellow:c("cmyk",2,u(100)),black:c("cmyk",3,u(100)),x:c("xyz",0,u(95.047)),y:c("xyz",1,u(100)),z:c("xyz",2,u(108.833)),l:c("lab",0,u(100)),a:c("lab",1),b:c("lab",2),keyword(d){return d!==void 0?new o(d):t[this.model].keyword(this.color)},hex(d){return d!==void 0?new o(d):e.to.hex(this.rgb().round().color)},hexa(d){if(d!==void 0)return new o(d);const _=this.rgb().round().color;let p=Math.round(this.valpha*255).toString(16).toUpperCase();return p.length===1&&(p="0"+p),e.to.hex(_)+p},rgbNumber(){const d=this.rgb().color;return(d[0]&255)<<16|(d[1]&255)<<8|d[2]&255},luminosity(){const d=this.rgb().color,_=[];for(const[p,g]of d.entries()){const m=g/255;_[p]=m<=.04045?m/12.92:((m+.055)/1.055)**2.4}return .2126*_[0]+.7152*_[1]+.0722*_[2]},contrast(d){const _=this.luminosity(),p=d.luminosity();return _>p?(_+.05)/(p+.05):(p+.05)/(_+.05)},level(d){const _=this.contrast(d);return _>=7?"AAA":_>=4.5?"AA":""},isDark(){const d=this.rgb().color;return(d[0]*2126+d[1]*7152+d[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const d=this.rgb();for(let _=0;_<3;_++)d.color[_]=255-d.color[_];return d},lighten(d){const _=this.hsl();return _.color[2]+=_.color[2]*d,_},darken(d){const _=this.hsl();return _.color[2]-=_.color[2]*d,_},saturate(d){const _=this.hsl();return _.color[1]+=_.color[1]*d,_},desaturate(d){const _=this.hsl();return _.color[1]-=_.color[1]*d,_},whiten(d){const _=this.hwb();return _.color[1]+=_.color[1]*d,_},blacken(d){const _=this.hwb();return _.color[2]+=_.color[2]*d,_},grayscale(){const d=this.rgb().color,_=d[0]*.3+d[1]*.59+d[2]*.11;return o.rgb(_,_,_)},fade(d){return this.alpha(this.valpha-this.valpha*d)},opaquer(d){return this.alpha(this.valpha+this.valpha*d)},rotate(d){const _=this.hsl();let p=_.color[0];return p=(p+d)%360,p=p<0?360+p:p,_.color[0]=p,_},mix(d,_){if(!d||!d.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof d);const p=d.rgb(),g=this.rgb(),m=_===void 0?.5:_,T=2*m-1,C=p.alpha()-g.alpha(),O=((T*C===-1?T:(T+C)/(1+T*C))+1)/2,I=1-O;return o.rgb(O*p.red()+I*g.red(),O*p.green()+I*g.green(),O*p.blue()+I*g.blue(),p.alpha()*m+g.alpha()*(1-m))}};for(const d of Object.keys(t)){if(n.includes(d))continue;const{channels:_}=t[d];o.prototype[d]=function(...p){return this.model===d?new o(this):p.length>0?new o(p,d):new o([...f(t[this.model][d].raw(this.color)),this.valpha],d)},o[d]=function(...p){let g=p[0];return typeof g=="number"&&(g=S(p,_)),new o(g,d)}}function a(d,_){return Number(d.toFixed(_))}function l(d){return function(_){return a(_,d)}}function c(d,_,p){d=Array.isArray(d)?d:[d];for(const g of d)(i[g]||(i[g]=[]))[_]=p;return d=d[0],function(g){let m;return g!==void 0?(p&&(g=p(g)),m=this[d](),m.color[_]=g,m):(m=this[d]().color[_],p&&(m=p(m)),m)}}function u(d){return function(_){return Math.max(0,Math.min(d,_))}}function f(d){return Array.isArray(d)?d:[d]}function S(d,_){for(let p=0;p<_;p++)typeof d[p]!="number"&&(d[p]=0);return d}return rn=o,rn}var Ya=Za();const Va=$s(Ya),si=({size:e,color:t=r.ColorPalettes.Primary5,text:n})=>{let s=r.COLOR_VALUES[r.ColorPalettes.Grey10];if(n&&n!==""&&typeof t=="string"){const i=Va(t);i.luminosity()>.5?s=i.darken(.8).hex():s=i.lighten(.35).hex()}return h.jsx(Y,{children:n&&h.jsx(b,{marginTop:r.TAG_SIZE[e].margins.marginTop,marginBottom:r.TAG_SIZE[e].margins.marginBottom,marginLeft:r.TAG_SIZE[e].margins.marginLeft,marginRight:r.TAG_SIZE[e].margins.marginRight,style:{width:r.TAG_SIZE[e].width,height:r.TAG_SIZE[e].height,borderRadius:"50%",backgroundColor:typeof t=="number"?r.COLOR_VALUES[t]:t,color:s},children:h.jsx(q,{children:n})})})},Xa=(e,t)=>{const[n,s]=E.useState(e);return E.useEffect(()=>{const i=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(i)}},[e,t]),n};function Ft(){return(Ft=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}function ii(e,t){if(e==null)return{};var n,s,i={},o=Object.keys(e);for(s=0;s<o.length;s++)t.indexOf(n=o[s])>=0||(i[n]=e[n]);return i}function An(e){var t=E.useRef(e),n=E.useRef(function(s){t.current&&t.current(s)});return t.current=e,n.current}var st=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},Xe=function(e){return"touches"in e},Cn=function(e){return e&&e.ownerDocument.defaultView||self},jr=function(e,t,n){var s=e.getBoundingClientRect(),i=Xe(t)?function(o,a){for(var l=0;l<o.length;l++)if(o[l].identifier===a)return o[l];return o[0]}(t.touches,n):t;return{left:st((i.pageX-(s.left+Cn(e).pageXOffset))/s.width),top:st((i.pageY-(s.top+Cn(e).pageYOffset))/s.height)}},Mr=function(e){!Xe(e)&&e.preventDefault()},oi=E.memo(function(e){var t=e.onMove,n=e.onKey,s=ii(e,["onMove","onKey"]),i=E.useRef(null),o=An(t),a=An(n),l=E.useRef(null),c=E.useRef(!1),u=E.useMemo(function(){var _=function(m){Mr(m),(Xe(m)?m.touches.length>0:m.buttons>0)&&i.current?o(jr(i.current,m,l.current)):g(!1)},p=function(){return g(!1)};function g(m){var T=c.current,C=Cn(i.current),O=m?C.addEventListener:C.removeEventListener;O(T?"touchmove":"mousemove",_),O(T?"touchend":"mouseup",p)}return[function(m){var T=m.nativeEvent,C=i.current;if(C&&(Mr(T),!function(I,L){return L&&!Xe(I)}(T,c.current)&&C)){if(Xe(T)){c.current=!0;var O=T.changedTouches||[];O.length&&(l.current=O[0].identifier)}C.focus(),o(jr(C,T,l.current)),g(!0)}},function(m){var T=m.which||m.keyCode;T<37||T>40||(m.preventDefault(),a({left:T===39?.05:T===37?-.05:0,top:T===40?.05:T===38?-.05:0}))},g]},[a,o]),f=u[0],S=u[1],d=u[2];return E.useEffect(function(){return d},[d]),E.createElement("div",Ft({},s,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:S,tabIndex:0,role:"slider"}))}),Vn=function(e){return e.filter(Boolean).join(" ")},ai=function(e){var t=e.color,n=e.left,s=e.top,i=s===void 0?.5:s,o=Vn(["react-colorful__pointer",e.className]);return E.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},E.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Q=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Wa=function(e){return ec(On(e))},On=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Q(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Q(parseInt(e.substring(6,8),16)/255,2):1}},qa=function(e){return Ja(Qa(e))},Ka=function(e){var t=e.s,n=e.v,s=e.a,i=(200-t)*n/100;return{h:Q(e.h),s:Q(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Q(i/2),a:Q(s,2)}},Ln=function(e){var t=Ka(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Qa=function(e){var t=e.h,n=e.s,s=e.v,i=e.a;t=t/360*6,n/=100,s/=100;var o=Math.floor(t),a=s*(1-n),l=s*(1-(t-o)*n),c=s*(1-(1-t+o)*n),u=o%6;return{r:Q(255*[s,l,a,a,c,s][u]),g:Q(255*[c,s,s,l,a,a][u]),b:Q(255*[a,a,c,s,s,l][u]),a:Q(i,2)}},_t=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ja=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,o=i<1?_t(Q(255*i)):"";return"#"+_t(t)+_t(n)+_t(s)+o},ec=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,o=Math.max(t,n,s),a=o-Math.min(t,n,s),l=a?o===t?(n-s)/a:o===n?2+(s-t)/a:4+(t-n)/a:0;return{h:Q(60*(l<0?l+6:l)),s:Q(o?a/o*100:0),v:Q(o/255*100),a:i}},tc=E.memo(function(e){var t=e.hue,n=e.onChange,s=Vn(["react-colorful__hue",e.className]);return E.createElement("div",{className:s},E.createElement(oi,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:st(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Q(t),"aria-valuemax":"360","aria-valuemin":"0"},E.createElement(ai,{className:"react-colorful__hue-pointer",left:t/360,color:Ln({h:t,s:100,v:100,a:1})})))}),nc=E.memo(function(e){var t=e.hsva,n=e.onChange,s={backgroundColor:Ln({h:t.h,s:100,v:100,a:1})};return E.createElement("div",{className:"react-colorful__saturation",style:s},E.createElement(oi,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:st(t.s+100*i.left,0,100),v:st(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Q(t.s)+"%, Brightness "+Q(t.v)+"%"},E.createElement(ai,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Ln(t)})))}),ci=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},rc=function(e,t){return e.toLowerCase()===t.toLowerCase()||ci(On(e),On(t))};function sc(e,t,n){var s=An(n),i=E.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],l=E.useRef({color:t,hsva:o});E.useEffect(function(){if(!e.equal(t,l.current.color)){var u=e.toHsva(t);l.current={hsva:u,color:t},a(u)}},[t,e]),E.useEffect(function(){var u;ci(o,l.current.hsva)||e.equal(u=e.fromHsva(o),l.current.color)||(l.current={hsva:o,color:u},s(u))},[o,e,s]);var c=E.useCallback(function(u){a(function(f){return Object.assign({},f,u)})},[]);return[o,c]}var ic=typeof window<"u"?E.useLayoutEffect:E.useEffect,oc=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Pr=new Map,ac=function(e){ic(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Pr.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Pr.set(t,n);var s=oc();s&&n.setAttribute("nonce",s),t.head.appendChild(n)}},[])},cc=function(e){var t=e.className,n=e.colorModel,s=e.color,i=s===void 0?n.defaultColor:s,o=e.onChange,a=ii(e,["className","colorModel","color","onChange"]),l=E.useRef(null);ac(l);var c=sc(n,i,o),u=c[0],f=c[1],S=Vn(["react-colorful",t]);return E.createElement("div",Ft({},a,{ref:l,className:S}),E.createElement(nc,{hsva:u,onChange:f}),E.createElement(tc,{hue:u.h,onChange:f,className:"react-colorful__last-control"}))},uc={defaultColor:"000",toHsva:Wa,fromHsva:function(e){return qa({h:e.h,s:e.s,v:e.v,a:1})},equal:rc},lc=function(e){return E.createElement(cc,Ft({},e,{colorModel:uc}))};const Xn=e=>{const t=E.useRef(null);return E.useEffect(()=>{const n=s=>{t.current&&(t.current.contains(s.target)||e())};return document&&document.addEventListener("mousedown",n),()=>{document&&document.removeEventListener("mousedown",n)}}),t},fc="_colorfulcontainer_1kkrb_1",dc="_absolute_1kkrb_2",hc={colorfulcontainer:fc,absolute:dc,"react-colorful":"_react-colorful_1kkrb_8","react-colorful__saturation":"_react-colorful__saturation_1kkrb_13","react-colorful__hue":"_react-colorful__hue_1kkrb_18","react-colorful__hue-pointer":"_react-colorful__hue-pointer_1kkrb_25"},Sc=({position:e,selectColor:t,closePicker:n,handleColorChange:s})=>{const i=Xn(()=>{n&&n(!1)});return h.jsx("div",{ref:i,style:{position:e},children:h.jsx(Y,{display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,children:h.jsx(b,{children:h.jsx(b,{className:hc.colorfulcontainer,children:h.jsx(lc,{color:t,onChange:s})})})})})},_c=({defaultColor:e="#eeeeee",setInput:t,setColor:n,inputName:s=void 0,closePicker:i=void 0,position:o="absolute"})=>{const[a,l]=E.useState(e||"#eee");E.useEffect(()=>{l(e||"#eee")},[e]);const c=f=>{l(f)},u=Xa(a,250);return E.useEffect(()=>{n&&n(u),t&&t(f=>({...f,[`${s||"edit_color"}`]:u}))},[u,s,t,n]),h.jsxs("div",{children:[h.jsxs("div",{className:"title",children:[h.jsx("span",{children:"Choose color: "}),h.jsx(si,{color:a,size:r.TagColorSizes.Large})]}),h.jsx(Sc,{selectColor:a,handleColorChange:c,position:o,closePicker:i})]})};function pc(e,t=()=>{},n="keydown"){const s=i=>{i.key===e&&t()};E.useEffect(()=>(document&&document.addEventListener(n,s,!1),()=>{document&&document.removeEventListener(n,s,!1)}),[n])}const Wn={[r.Portals.GlobalEventNotification]:{id:"#papnot",html:h.jsx("div",{id:"papnot"})},[r.Portals.Modals]:{id:"#pmodmodify",html:h.jsx("div",{id:"pmodmodify"})}},gc=({children:e})=>{const[t,n]=E.useState(!1);return E.useEffect(()=>(n(!0),()=>{n(!1)}),[]),t?bn.createPortal(e,document.querySelector(Wn[r.Portals.Modals].id)||document.body):null},mc="_modalBgAnimated_o2uzj_11",Ec="_modalCardCopyOriAnimated_o2uzj_18",Tc="_wrapperContainer_o2uzj_49",We={modalBgAnimated:mc,modalCardCopyOriAnimated:Ec,"no-card":"_no-card_o2uzj_38",wrapperContainer:Tc},yc=({isShown:e,modalBackground:t})=>ue(e,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}})((s,i)=>i&&h.jsx(b,{className:We.modalBgAnimated,style:{...s,backgroundColor:t?`${r.COLOR_VALUES[t]}${r.COLOR_RGBA_ALPHA[r.ColorRGBAAlphas.Dark3]}`:"#0000007f"}}));function Ac(e,t,n){return Math.max(t,Math.min(e,n))}const K={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 kr(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function Fr(e,t,n,s=.15){return s===0?Ac(e,t,n):e<t?-kr(t-e,n-t,s)+t:e>n?+kr(e-n,n-t,s)+n:e}function Cc(e,[t,n],[s,i]){const[[o,a],[l,c]]=e;return[Fr(t,o,a,s),Fr(n,l,c,i)]}function Oc(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lc(e){var t=Oc(e,"string");return typeof t=="symbol"?t:String(t)}function J(e,t,n){return t=Lc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,s)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Br(Object(n),!0).forEach(function(s){J(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Br(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}const ui={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 zr(e){return e?e[0].toUpperCase()+e.slice(1):""}const vc=["enter","leave"];function Ic(e=!1,t){return e&&!vc.includes(t)}function bc(e,t="",n=!1){const s=ui[e],i=s&&s[t]||t;return"on"+zr(e)+zr(i)+(Ic(n,i)?"Capture":"")}const xc=["gotpointercapture","lostpointercapture"];function Rc(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const s=xc.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(s);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:n}}function wc(e,t=""){const n=ui[e],s=n&&n[t]||t;return e+s}function Bt(e){return"touches"in e}function li(e){return Bt(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function Nc(e){return Array.from(e.touches).filter(t=>{var n,s;return t.target===e.currentTarget||((n=e.currentTarget)===null||n===void 0||(s=n.contains)===null||s===void 0?void 0:s.call(n,t.target))})}function Dc(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function fi(e){return Bt(e)?Dc(e)[0]:e}function vn(e,t){try{const n=t.clientX-e.clientX,s=t.clientY-e.clientY,i=(t.clientX+e.clientX)/2,o=(t.clientY+e.clientY)/2,a=Math.hypot(n,s);return{angle:-(Math.atan2(n,s)*180)/Math.PI,distance:a,origin:[i,o]}}catch{}return null}function jc(e){return Nc(e).map(t=>t.identifier)}function Gr(e,t){const[n,s]=Array.from(e.touches).filter(i=>t.includes(i.identifier));return vn(n,s)}function sn(e){const t=fi(e);return Bt(e)?t.identifier:t.pointerId}function Ur(e){const t=fi(e);return[t.clientX,t.clientY]}const Hr=40,$r=800;function Mc(e){let{deltaX:t,deltaY:n,deltaMode:s}=e;return s===1?(t*=Hr,n*=Hr):s===2&&(t*=$r,n*=$r),[t,n]}function Pc(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:s,metaKey:i,ctrlKey:o}=e;Object.assign(t,{shiftKey:n,altKey:s,metaKey:i,ctrlKey:o})}return t}function Lt(e,...t){return typeof e=="function"?e(...t):e}function kc(){}function Fc(...e){return e.length===0?kc:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function Zr(e,t){return Object.assign({},t,e||{})}const Bc=32;class di{constructor(t,n,s){this.ctrl=t,this.args=n,this.key=s,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:n,ingKey:s,args:i}=this;n[s]=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 n=this.state,s=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=t.target,n.currentTarget=t.currentTarget,n.lastOffset=s.from?Lt(s.from,n):n.offset,n.offset=n.lastOffset,n.startTime=n.timeStamp=t.timeStamp)}computeValues(t){const n=this.state;n._values=t,n.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:n,config:s,shared:i}=this;n.args=this.args;let o=0;if(t&&(n.event=t,s.preventDefault&&t.cancelable&&n.event.preventDefault(),n.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,Pc(t)),i.down=i.pressed=i.buttons%2===1||i.touches>0,o=t.timeStamp-n.timeStamp,n.timeStamp=t.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const R=n._delta.map(Math.abs);K.addTo(n._distance,R)}this.axisIntent&&this.axisIntent(t);const[a,l]=n._movement,[c,u]=s.threshold,{_step:f,values:S}=n;if(s.hasCustomTransform?(f[0]===!1&&(f[0]=Math.abs(a)>=c&&S[0]),f[1]===!1&&(f[1]=Math.abs(l)>=u&&S[1])):(f[0]===!1&&(f[0]=Math.abs(a)>=c&&Math.sign(a)*c),f[1]===!1&&(f[1]=Math.abs(l)>=u&&Math.sign(l)*u)),n.intentional=f[0]!==!1||f[1]!==!1,!n.intentional)return;const d=[0,0];if(s.hasCustomTransform){const[R,N]=S;d[0]=f[0]!==!1?R-f[0]:0,d[1]=f[1]!==!1?N-f[1]:0}else d[0]=f[0]!==!1?a-f[0]:0,d[1]=f[1]!==!1?l-f[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(d);const _=n.offset,p=n._active&&!n._blocked||n.active;p&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=i[this.ingKey]=n._active,t&&(n.first&&("bounds"in s&&(n._bounds=Lt(s.bounds,n)),this.setup&&this.setup()),n.movement=d,this.computeOffset()));const[g,m]=n.offset,[[T,C],[O,I]]=n._bounds;n.overflow=[g<T?-1:g>C?1:0,m<O?-1:m>I?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const L=n._active?s.rubberband||[0,0]:[0,0];if(n.offset=Cc(n._bounds,n.offset,L),n.delta=K.sub(n.offset,_),this.computeMovement(),p&&(!n.last||o>Bc)){n.delta=K.sub(n.offset,_);const R=n.delta.map(Math.abs);K.addTo(n.distance,R),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&o>0&&(n.velocity=[R[0]/o,R[1]/o],n.timeDelta=o)}}emit(){const t=this.state,n=this.shared,s=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!s.triggerAllEvents)return;const i=this.handler(X(X(X({},n),t),{},{[this.aliasKey]:t.values}));i!==void 0&&(t.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function zc([e,t],n){const s=Math.abs(e),i=Math.abs(t);if(s>i&&s>n)return"x";if(i>s&&i>n)return"y"}class Gc extends di{constructor(...t){super(...t),J(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=K.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=K.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const n=this.state,s=this.config;if(!n.axis&&t){const i=typeof s.axisThreshold=="object"?s.axisThreshold[li(t)]:s.axisThreshold;n.axis=zc(n._movement,i)}n._blocked=(s.lockDirection||!!s.axis)&&!n.axis||!!s.axis&&s.axis!==n.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 Yr=e=>e,Vr=.15,qn={enabled(e=!0){return e},eventOptions(e,t,n){return X(X({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[Vr,Vr];case!1:return[0,0];default:return K.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return K.toVector(e)},transform(e,t,n){const s=e||n.shared.transform;if(this.hasCustomTransform=!!s,process.env.NODE_ENV==="development"){const i=s||Yr;return o=>{const a=i(o);return(!isFinite(a[0])||!isFinite(a[1]))&&console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${a[0]},${[1]}]`),a}}return s||Yr},threshold(e){return K.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(qn,{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 Uc=0,at=X(X({},qn),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=Uc){return e},bounds(e={}){if(typeof e=="function")return o=>at.bounds(e(o));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:s=-1/0,bottom:i=1/0}=e;return[[t,n],[s,i]]}}),Xr={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 Hc extends Gc{constructor(...t){super(...t),J(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 n=t._bounds.getBoundingClientRect(),s=t.currentTarget.getBoundingClientRect(),i={left:n.left-s.left+t.offset[0],right:n.right-s.right+t.offset[0],top:n.top-s.top+t.offset[1],bottom:n.bottom-s.bottom+t.offset[1]};t._bounds=at.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 n=this.config,s=this.state;if(t.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(t.buttons):n.pointerButtons!==-1&&n.pointerButtons!==t.buttons))return;const i=this.ctrl.setEventIds(t);n.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(i&&i.size>1&&s._pointerActive)&&(this.start(t),this.setupPointer(t),s._pointerId=sn(t),s._pointerActive=!0,this.computeValues(Ur(t)),this.computeInitial(),n.preventScrollAxis&&li(t)!=="mouse"?(s._active=!1,this.setupScrollPrevention(t)):n.delay>0?(this.setupDelayTrigger(t),n.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const n=this.state,s=this.config;if(!n._pointerActive)return;const i=sn(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;const o=Ur(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=K.sub(o,n._values),this.computeValues(o)),K.addTo(n._movement,n._delta),this.compute(t),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(t);return}if(s.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===s.preventScrollAxis||s.preventScrollAxis==="xy"){n._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 n=this.state,s=this.config;if(!n._active||!n._pointerActive)return;const i=sn(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[o,a]=n._distance;if(n.tap=o<=s.tapsThreshold&&a<=s.tapsThreshold,n.tap&&s.filterTaps)n._force=!0;else{const[l,c]=n._delta,[u,f]=n._movement,[S,d]=s.swipe.velocity,[_,p]=s.swipe.distance,g=s.swipe.duration;if(n.elapsedTime<g){const m=Math.abs(l/n.timeDelta),T=Math.abs(c/n.timeDelta);m>S&&Math.abs(u)>_&&(n.swipe[0]=Math.sign(l)),T>d&&Math.abs(f)>p&&(n.swipe[1]=Math.sign(c))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const n=this.config,s=n.device;if(process.env.NODE_ENV==="development")try{if(s==="pointer"&&n.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{}n.pointerLock&&t.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,s,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,s,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,s,"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,$c(t);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),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 n=Xr[t.key];if(n){const s=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),s._delta=n(this.config.keyboardDisplacement,i),s._keyboardActive=!0,K.addTo(s._movement,s._delta),this.compute(t),this.emit()}}keyUp(t){t.key in Xr&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const n=this.config.device;t(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(n,"change",this.pointerMove.bind(this)),t(n,"end",this.pointerUp.bind(this)),t(n,"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 $c(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const ct=typeof window<"u"&&window.document&&window.document.createElement;function hi(){return ct&&"ontouchstart"in window}function Zc(){return hi()||ct&&window.navigator.maxTouchPoints>1}function Yc(){return ct&&"onpointerdown"in window}function Vc(){return ct&&"exitPointerLock"in window.document}function Xc(){try{return"constructor"in GestureEvent}catch{return!1}}const ae={isBrowser:ct,gesture:Xc(),touch:hi(),touchscreen:Zc(),pointer:Yc(),pointerLock:Vc()},Wc=250,qc=180,Kc=.5,Qc=50,Jc=250,eu=10,Wr={mouse:0,touch:0,pen:8},Si=X(X({},at),{},{device(e,t,{pointer:{touch:n=!1,lock:s=!1,mouse:i=!1}={}}){return this.pointerLock=s&&ae.pointerLock,ae.touch&&n?"touch":this.pointerLock?"mouse":ae.pointer&&!i?"pointer":ae.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&e?Wc:void 0,!(!ae.touchscreen||n===!1))return e||(n!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:s=1,keys:i=!0}={}}){return this.pointerButtons=s,this.keys=i,!this.pointerLock&&this.device==="pointer"&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:s=3,axis:i=void 0}){const o=K.toVector(e,n?s:i?1:0);return this.filterTaps=n,this.tapsThreshold=s,o},swipe({velocity:e=Kc,distance:t=Qc,duration:n=Jc}={}){return{velocity:this.transform(K.toVector(e)),distance:this.transform(K.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return qc;case!1:return 0;default:return e}},axisThreshold(e){return e?X(X({},Wr),e):Wr},keyboardDisplacement(e=eu){return e}});process.env.NODE_ENV==="development"&&Object.assign(Si,{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}});function tu(e){const[t,n]=e.overflow,[s,i]=e._delta,[o,a]=e._direction;(t<0&&s>0&&o<0||t>0&&s<0&&o>0)&&(e._movement[0]=e._movementBound[0]),(n<0&&i>0&&a<0||n>0&&i<0&&a>0)&&(e._movement[1]=e._movementBound[1])}const nu=30,ru=100;class su extends di{constructor(...t){super(...t),J(this,"ingKey","pinching"),J(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const t=this.state;t._touchIds=[],t.canceled=!1,t.cancel=this.cancel.bind(this),t.turns=0}computeOffset(){const{type:t,movement:n,lastOffset:s}=this.state;t==="wheel"?this.state.offset=K.add(n,s):this.state.offset=[(1+n[0])*s[0],n[1]+s[1]]}computeMovement(){const{offset:t,lastOffset:n}=this.state;this.state.movement=[t[0]/n[0],t[1]-n[1]]}axisIntent(){const t=this.state,[n,s]=t._movement;if(!t.axis){const i=Math.abs(n)*nu-Math.abs(s);i<0?t.axis="angle":i>0&&(t.axis="scale")}}restrictToAxis(t){this.config.lockDirection&&(this.state.axis==="scale"?t[1]=0:this.state.axis==="angle"&&(t[0]=0))}cancel(){const t=this.state;t.canceled||setTimeout(()=>{t.canceled=!0,t._active=!1,this.compute(),this.emit()},0)}touchStart(t){this.ctrl.setEventIds(t);const n=this.state,s=this.ctrl.touchIds;if(n._active&&n._touchIds.every(o=>s.has(o))||s.size<2)return;this.start(t),n._touchIds=Array.from(s).slice(0,2);const i=Gr(t,n._touchIds);i&&this.pinchStart(t,i)}pointerStart(t){if(t.buttons!=null&&t.buttons%2!==1)return;this.ctrl.setEventIds(t),t.target.setPointerCapture(t.pointerId);const n=this.state,s=n._pointerEvents,i=this.ctrl.pointerIds;if(n._active&&Array.from(s.keys()).every(a=>i.has(a))||(s.size<2&&s.set(t.pointerId,t),n._pointerEvents.size<2))return;this.start(t);const o=vn(...Array.from(s.values()));o&&this.pinchStart(t,o)}pinchStart(t,n){const s=this.state;s.origin=n.origin,this.computeValues([n.distance,n.angle]),this.computeInitial(),this.compute(t),this.emit()}touchMove(t){if(!this.state._active)return;const n=Gr(t,this.state._touchIds);n&&this.pinchMove(t,n)}pointerMove(t){const n=this.state._pointerEvents;if(n.has(t.pointerId)&&n.set(t.pointerId,t),!this.state._active)return;const s=vn(...Array.from(n.values()));s&&this.pinchMove(t,s)}pinchMove(t,n){const s=this.state,i=s._values[1],o=n.angle-i;let a=0;Math.abs(o)>270&&(a+=Math.sign(o)),this.computeValues([n.distance,n.angle-360*a]),s.origin=n.origin,s.turns=a,s._movement=[s._values[0]/s._initial[0]-1,s._values[1]-s._initial[1]],this.compute(t),this.emit()}touchEnd(t){this.ctrl.setEventIds(t),this.state._active&&this.state._touchIds.some(n=>!this.ctrl.touchIds.has(n))&&(this.state._active=!1,this.compute(t),this.emit())}pointerEnd(t){const n=this.state;this.ctrl.setEventIds(t);try{t.target.releasePointerCapture(t.pointerId)}catch{}n._pointerEvents.has(t.pointerId)&&n._pointerEvents.delete(t.pointerId),n._active&&n._pointerEvents.size<2&&(n._active=!1,this.compute(t),this.emit())}gestureStart(t){t.cancelable&&t.preventDefault();const n=this.state;n._active||(this.start(t),this.computeValues([t.scale,t.rotation]),n.origin=[t.clientX,t.clientY],this.compute(t),this.emit())}gestureMove(t){if(t.cancelable&&t.preventDefault(),!this.state._active)return;const n=this.state;this.computeValues([t.scale,t.rotation]),n.origin=[t.clientX,t.clientY];const s=n._movement;n._movement=[t.scale-1,t.rotation],n._delta=K.sub(n._movement,s),this.compute(t),this.emit()}gestureEnd(t){this.state._active&&(this.state._active=!1,this.compute(t),this.emit())}wheel(t){const n=this.config.modifierKey;n&&(Array.isArray(n)?!n.find(s=>t[s]):!t[n])||(this.state._active?this.wheelChange(t):this.wheelStart(t),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(t){this.start(t),this.wheelChange(t)}wheelChange(t){"uv"in t||(t.cancelable&&t.preventDefault(),process.env.NODE_ENV==="development"&&!t.defaultPrevented&&console.warn("[@use-gesture]: To properly support zoom on trackpads, try using the `target` option.\n\nThis message will only appear in development mode."));const s=this.state;s._delta=[-Mc(t)[1]/ru*s.offset[0],0],K.addTo(s._movement,s._delta),tu(s),this.state.origin=[t.clientX,t.clientY],this.compute(t),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(t){const n=this.config.device;n&&(t(n,"start",this[n+"Start"].bind(this)),t(n,"change",this[n+"Move"].bind(this)),t(n,"end",this[n+"End"].bind(this)),t(n,"cancel",this[n+"End"].bind(this)),t("lostPointerCapture","",this[n+"End"].bind(this))),this.config.pinchOnWheel&&t("wheel","",this.wheel.bind(this),{passive:!1})}}const iu=X(X({},qn),{},{device(e,t,{shared:n,pointer:{touch:s=!1}={}}){if(n.target&&!ae.touch&&ae.gesture)return"gesture";if(ae.touch&&s)return"touch";if(ae.touchscreen){if(ae.pointer)return"pointer";if(ae.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:s={}}){const i=a=>{const l=Zr(Lt(n,a),{min:-1/0,max:1/0});return[l.min,l.max]},o=a=>{const l=Zr(Lt(s,a),{min:-1/0,max:1/0});return[l.min,l.max]};return typeof n!="function"&&typeof s!="function"?[i(),o()]:a=>[i(a),o(a)]},threshold(e,t,n){return this.lockDirection=n.axis==="lock",K.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});X(X({},at),{},{mouseOnly:(e=!0)=>e});X(X({},at),{},{mouseOnly:(e=!0)=>e});const Kn=new Map,In=new Map;function _i(e){Kn.set(e.key,e.engine),In.set(e.key,e.resolver)}const pi={key:"drag",engine:Hc,resolver:Si},ou={key:"pinch",engine:su,resolver:iu};function au(e,t){if(e==null)return{};var n={},s=Object.keys(e),i,o;for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function cu(e,t){if(e==null)return{};var n=au(e,t),s,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)s=o[i],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}const uu={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=ae.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},lu=["target","eventOptions","window","enabled","transform"];function Et(e={},t){const n={};for(const[s,i]of Object.entries(t))switch(typeof i){case"function":if(process.env.NODE_ENV==="development"){const o=i.call(n,e[s],s,e);Number.isNaN(o)||(n[s]=o)}else n[s]=i.call(n,e[s],s,e);break;case"object":n[s]=Et(e[s],i);break;case"boolean":i&&(n[s]=e[s]);break}return n}function fu(e,t,n={}){const s=e,{target:i,eventOptions:o,window:a,enabled:l,transform:c}=s,u=cu(s,lu);if(n.shared=Et({target:i,eventOptions:o,window:a,enabled:l,transform:c},uu),t){const f=In.get(t);n[t]=Et(X({shared:n.shared},u),f)}else for(const f in u){const S=In.get(f);if(S)n[f]=Et(X({shared:n.shared},u[f]),S);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(f)){if(f==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");console.warn(`[@use-gesture]: Unknown config key \`${f}\` was used. Please read the documentation for further information.`)}}return n}class gi{constructor(t,n){J(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,s,i,o){const a=this._listeners,l=wc(n,s),c=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},u=X(X({},c),o);t.addEventListener(l,i,u);const f=()=>{t.removeEventListener(l,i,u),a.delete(f)};return a.add(f),f}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class du{constructor(){J(this,"_timeouts",new Map)}add(t,n,s=140,...i){this.remove(t),this._timeouts.set(t,window.setTimeout(n,s,...i))}remove(t){const n=this._timeouts.get(t);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class hu{constructor(t){J(this,"gestures",new Set),J(this,"_targetEventStore",new gi(this)),J(this,"gestureEventStores",{}),J(this,"gestureTimeoutStores",{}),J(this,"handlers",{}),J(this,"config",{}),J(this,"pointerIds",new Set),J(this,"touchIds",new Set),J(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Su(this,t)}setEventIds(t){if(Bt(t))return this.touchIds=new Set(jc(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,n){this.handlers=t,this.nativeHandlers=n}applyConfig(t,n){this.config=fu(t,n,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 n=this.config.shared,s={};let i;if(!(n.target&&(i=n.target(),!i))){if(n.enabled){for(const a of this.gestures){const l=this.config[a],c=qr(s,l.eventOptions,!!i);if(l.enabled){const u=Kn.get(a);new u(this,t,a).bind(c)}}const o=qr(s,n.eventOptions,!!i);for(const a in this.nativeHandlers)o(a,"",l=>this.nativeHandlers[a](X(X({},this.state.shared),{},{event:l,args:t})),void 0,!0)}for(const o in s)s[o]=Fc(...s[o]);if(!i)return s;for(const o in s){const{device:a,capture:l,passive:c}=Rc(o);this._targetEventStore.add(i,a,"",s[o],{capture:l,passive:c})}}}}function Ne(e,t){e.gestures.add(t),e.gestureEventStores[t]=new gi(e,t),e.gestureTimeoutStores[t]=new du}function Su(e,t){t.drag&&Ne(e,"drag"),t.wheel&&Ne(e,"wheel"),t.scroll&&Ne(e,"scroll"),t.move&&Ne(e,"move"),t.pinch&&Ne(e,"pinch"),t.hover&&Ne(e,"hover")}const qr=(e,t,n)=>(s,i,o,a={},l=!1)=>{var c,u;const f=(c=a.capture)!==null&&c!==void 0?c:t.capture,S=(u=a.passive)!==null&&u!==void 0?u:t.passive;let d=l?s:bc(s,i,f);n&&S&&(d+="Passive"),e[d]=e[d]||[],e[d].push(o)},_u=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function pu(e){const t={},n={},s=new Set;for(let i in e)_u.test(i)?(s.add(RegExp.lastMatch),n[i]=e[i]):t[i]=e[i];return[n,t,s]}function De(e,t,n,s,i,o){if(!e.has(n))return;if(!Kn.has(s)){process.env.NODE_ENV==="development"&&console.warn(`[@use-gesture]: You've created a custom handler that that uses the \`${s}\` gesture but isn't properly configured.
2
2
 
3
- Please add \`${s}Action\` when creating your handler.`);return}const a=n+"Start",l=n+"End",c=u=>{let f;return u.first&&a in t&&t[a](u),n in t&&(f=t[n](u)),u.last&&l in t&&t[l](u),f};i[s]=c,o[s]=o[s]||{}}function gu(e,t){const[n,s,i]=pu(e),o={};return Ne(i,n,"onDrag","drag",o,t),Ne(i,n,"onWheel","wheel",o,t),Ne(i,n,"onScroll","scroll",o,t),Ne(i,n,"onPinch","pinch",o,t),Ne(i,n,"onMove","move",o,t),Ne(i,n,"onHover","hover",o,t),{handlers:o,config:t,nativeHandlers:s}}function mi(e,t={},n,s){const i=E.useMemo(()=>new hu(e),[]);if(i.applyHandlers(e,s),i.applyConfig(t,n),E.useEffect(i.effect.bind(i)),E.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function Ei(e,t){return _i(pi),mi({drag:e},t||{},"drag")}function mu(e){return e.forEach(_i),function(n,s){const{handlers:i,nativeHandlers:o,config:a}=gu(n,s||{});return mi(i,a,void 0,o)}}const Eu=({closeModal:e,modalStyles:t,children:n})=>{const s=Xn(()=>e()),[i,o]=W(()=>({y:0})),a=Ei(({velocity:[,l],last:c,down:u,movement:[,f],cancel:S,type:d})=>{typeof d=="string"&&(d.includes("pointer")||d.includes("mouse"))||(c&&l<.3?S():c&&l>.3&&e(),f<-.001?S():f>450&&e(),o.start({y:u?f:0,immediate:u}))},{axis:"y",filterTaps:!0,pointer:{touch:!0}});return h.jsx(xe,{className:t===r.ModalStyles.Nocard?`${Xe.modalCardCopyOriAnimated} ${Xe["no-card"]}`:`${Xe.modalCardCopyOriAnimated}`,...a(),style:{...i,touchAction:"none"},ref:s,children:n})},Tu=({isShown:e,children:t})=>ue(e,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}})((s,i)=>i&&h.jsx(I,{className:Xe.wrapperContainer,style:s,children:t})),Ti=({showModal:e,closeModal:t,modalStyles:n=r.ModalStyles.Default,modalBackground:s,children:i})=>(pc("Escape",()=>{t()}),h.jsx(yu,{closeModal:t,showModal:e,modalStyles:n,modalBackground:s,children:i})),yu=({showModal:e,closeModal:t,children:n,modalStyles:s=r.ModalStyles.Default,modalBackground:i})=>h.jsx(gc,{children:h.jsxs(Tu,{isShown:e,children:[h.jsx(yc,{isShown:e,modalBackground:i}),h.jsx(Vs,{direction:"vertical",isShown:e,enterOffsetBy:3,children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.FlexStart,style:{position:"absolute",minHeight:"100vh",minWidth:"100%",top:0},children:h.jsx(Eu,{closeModal:t,modalStyles:s,children:n})})})]})}),Au=({handleCloseGallery:e})=>{const t=ue(!0,{from:{opacity:0,y:-100,x:-50},enter:{opacity:1,y:25,x:-50},leave:{opacity:0,y:-100,x:-50}});return h.jsx(Y,{style:{width:"100%"},display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.FlexEnd,flexAlignItem:r.FlexAlignItems.Center,children:t((n,s)=>s&&h.jsx(I,{style:n,children:h.jsx(ie,{name:"x",iconAction:()=>e(),size:r.Sizings.Size5})}))})};var Kr=NaN,Cu="[object Symbol]",Ou=/^\s+|\s+$/g,Lu=/^[-+]0x[0-9a-f]+$/i,vu=/^0b[01]+$/i,bu=/^0o[0-7]+$/i,Iu=parseInt,xu=Object.prototype,Ru=xu.toString;function wu(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Qr(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Nu(e){return!!e&&typeof e=="object"}function Du(e){return typeof e=="symbol"||Nu(e)&&Ru.call(e)==Cu}function on(e){if(typeof e=="number")return e;if(Du(e))return Kr;if(Qr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Qr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Ou,"");var n=vu.test(e);return n||bu.test(e)?Iu(e.slice(2),n?2:8):Lu.test(e)?Kr:+e}function ju(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=on(n),n=n===n?n:0),t!==void 0&&(t=on(t),t=t===t?t:0),wu(on(e),t,n)}var ne;const yi=E.createContext({galleryImages:ne,imgIndex:0,props:ne,ref:ne,bind:ne,isZooming:ne,manualZoomScale:ne,handleSetImages:ne,handleCloseGallery:ne,handleIncrease:ne,handleDecrease:ne,handleSetIsZooming:ne,handleZoomIn:ne,handleZoomOut:ne,handleZoomReset:ne}),Mu=({children:e})=>{const t=Pu();return h.jsx(yi.Provider,{value:t,children:e})},Qn=()=>E.useContext(yi);function Pu(){const[e,t]=E.useState([]),[n,s]=E.useState(0),[i,{width:o}]=ge(),[a,l]=E.useState(!1),[c,u]=Zn(e.length,L=>({x:L*o,scale:o===0?0:1,display:"block"}),[o]),f=Ei(({active:L,movement:[R],velocity:[N],direction:[j],distance:[M],cancel:P})=>{a||(L&&(M>o/3||N>1)&&(s(D=>ju(D+(j>0?-1:1),0,e.length-1)),P()),u.start(D=>{if(D<n-1||D>n+1)return{display:"none"};const G=(D-n)*o+(L?R:0),H=L?1-M/o/2:1;return{x:G,scale:H,display:"block"}}))}),S=L=>{t(L)},d=L=>{s(0),L&&L()};function _(){s(L=>L+1>e.length-1?L:(u.start(R=>R<L+1-1||R>L+1+1?{display:"none"}:{x:(R-(L+1))*o,scale:1,display:"block"}),L+1))}function p(){s(L=>L-1<0?L:(u.start(R=>R<L-1-1||R>L-1+1?{display:"none"}:{x:(R-(L-1))*o,scale:1,display:"block"}),L-1))}const g=L=>{l(L)},[m,T]=E.useState(1);function C(){T(L=>L+.25>2?2:L+.25)}function O(){T(L=>L-.25<.5?1:L-.25)}function b(){T(1)}return{imgIndex:n,galleryImages:e,props:c,ref:i,bind:f,isZooming:a,manualZoomScale:m,handleSetImages:S,handleCloseGallery:d,handleIncrease:_,handleDecrease:p,handleSetIsZooming:g,handleZoomIn:C,handleZoomOut:O,handleZoomReset:b}}const ku=({openMenu:e=!0})=>{const{handleIncrease:t,handleDecrease:n,galleryImages:s,imgIndex:i,handleZoomIn:o,handleZoomOut:a}=Qn();return ue(e,{from:{opacity:0,y:100},enter:{opacity:1,y:-50},leave:{opacity:0,y:100}})((c,u)=>u&&h.jsx(I,{style:{width:"100%",...c},children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,style:{minWidth:350,maxWidth:500,width:400},children:[h.jsx(pt,{icon:"chevron-left",marginLeft:r.Spacings.Size4,marginRight:r.Spacings.Size1,clickAction:()=>n(),disabled:i<=0&&!0}),h.jsx(Y,{children:h.jsx(I,{children:h.jsx(q,{fontSize:r.FontSizes.Size4,children:`${i+1} / ${s.length}`})})}),h.jsx(pt,{icon:"chevron-right",marginLeft:r.Spacings.Size1,clickAction:()=>t(),disabled:i>=s.length-1&&!0}),h.jsx(pt,{icon:"zoom-in",marginLeft:r.Spacings.Auto,marginRight:r.Spacings.Size1,clickAction:()=>{o()}}),h.jsx(pt,{icon:"zoom-out",marginLeft:r.Spacings.Size1,marginRight:r.Spacings.Size4,clickAction:()=>{a()}})]})})}))},pt=({icon:e,clickAction:t,marginLeft:n,marginRight:s})=>h.jsx(I,{marginLeft:n,marginRight:s,children:h.jsx(Qs,{name:"",icon:e,buttonSize:r.ButtonSizes.Big,clickAction:t})}),Fu="_ZAnimated_10d05_1",Bu={ZAnimated:Fu},zu=mu([pi,ou]),Gu=({children:e})=>{const{imgIndex:t,isZooming:n,handleSetIsZooming:s,manualZoomScale:i}=Qn();E.useEffect(()=>{const c=u=>u.preventDefault();return document&&(document.addEventListener("gesturestart",c),document.addEventListener("gesturechange",c),document.addEventListener("gestureend",c)),()=>{document&&(document.removeEventListener("gesturestart",c),document.removeEventListener("gesturechange",c),document.removeEventListener("gestureend",c))}},[]);const[o,a]=W(()=>({x:0,y:0,scale:1,rotateZ:0})),l=E.useRef(null);return E.useEffect(()=>{t!==0&&a.start(c=>({...c,x:0,y:0,scale:1}))},[a,t]),E.useEffect(()=>{a.start(c=>({...c,scale:i}))},[a,i]),zu({onDrag:({pinching:c,cancel:u,offset:[f,S]})=>{if(n){if(c)return u();a.start({x:f,y:S})}},onPinch:({origin:[c,u],first:f,last:S,movement:[d],offset:[_],memo:p})=>{if(f){const{width:T,height:C,x:O,y:b}=l.current&&l.current.getBoundingClientRect(),L=c-(O+T/2),R=u-(b+C/2);p=[o.x.get(),o.y.get(),L,R]}if(S&&_===1&&c!==0)return s&&s(!1),a.start({scale:1,x:0,y:0}),p;const g=p[0]-(d-1)*p[2],m=p[1]-(d-1)*p[3];return s&&s(!0),a.start({scale:_,x:g,y:m}),p}},{target:l,drag:{from:()=>[o.x.get(),o.y.get()],bounds:{left:-100,right:100,top:-100,bottom:100}},pinch:{scaleBounds:{min:1,max:2},rubberband:!0},wheel:{axis:"y"}}),h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,style:{height:"100%"},children:h.jsx(xe,{ref:l,className:Bu.ZAnimated,style:{...o,backgroundColor:"transparent"},children:e})})},Uu="_imageContainer_zngaq_11",Hu="_desktop_zngaq_20",$u="_galleryMenuContainer_zngaq_34",an={imageContainer:Uu,desktop:Hu,"big-tablet":"_big-tablet_zngaq_26",galleryMenuContainer:$u},Zu=({showModal:e,closeModal:t,images:n=[]})=>h.jsx(Vu,{children:h.jsx(Yu,{showModal:e,closeModal:t,images:n})}),Yu=({showModal:e,closeModal:t,images:n=[]})=>{const{bind:s,props:i,ref:o,handleCloseGallery:a,handleSetImages:l}=Qn();E.useEffect(()=>{l(n)},[l,n]);const c=()=>{a(t)};return h.jsx(Ti,{showModal:e,closeModal:c,modalStyles:r.ModalStyles.Nocard,modalBackground:r.ColorPalettes.Grey1,children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,flexJustifyContent:r.FlexJustifyContents.Center,style:{height:"100%",maxWidth:"100%"},children:[h.jsx("div",{ref:o,style:{overflow:"hidden",width:"100%",height:"100vh",position:"relative"},children:i.map(({x:u,display:f,scale:S},d)=>E.createElement(I,{...s(),key:d,style:{display:f,x:u,position:"absolute",width:"100%",height:"100%",willChange:"transform"}},h.jsx(I,{style:{scale:S,touchAction:"none",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",width:"100%",height:"100%",willChange:"transform"},children:h.jsxs(Gu,{children:[h.jsx(I,{className:`${an.imageContainer} desktop`,children:n[d]}),h.jsx(I,{className:`${an.imageContainer} big-tablet`,children:n[d]})]})})))}),h.jsx(I,{className:an.galleryMenuContainer,style:{position:"absolute",bottom:0,left:0,right:0},children:h.jsx(ku,{openMenu:!0})}),h.jsx("div",{style:{position:"absolute",top:0,left:0,right:0},children:h.jsx(Au,{handleCloseGallery:c})})]})})},Vu=({children:e})=>h.jsx(Mu,{children:e}),Ai=({children:e})=>h.jsx(Xu,{children:e}),Xu=({children:e})=>{const[t,n]=E.useState(!1);return E.useEffect(()=>(n(!0),()=>{n(!1)}),[]),t?In.createPortal(e,document.querySelector(Wn[r.Portals.GlobalEventNotification].id)||document.body):null},Wu="_iconContainer_1wxn3_12",qu="_desktop_1wxn3_13",Ku="_mobile_1wxn3_18",Qu="_iconContainerDesktop_1wxn3_25",Ju="_iconContainerMobile_1wxn3_34",Jr={iconContainer:Wu,desktop:qu,mobile:Ku,iconContainerDesktop:Qu,iconContainerMobile:Ju},el=({id:e,name:t,handleImageChange:n,labelname:s,defaultValue:i,width:o="100%",height:a})=>{const[l,c]=E.useState(),[u,f]=E.useState(i);E.useEffect(()=>{if(i&&i!==""){f(i);return}else if(!l)return;const _=URL.createObjectURL(l);return f(_),()=>{var p;if(_!=="")p=_;else if(l&&u)p=u;else return;try{URL.revokeObjectURL(p)}catch{}}},[i,l]);const S=async _=>{if(!_.target.files||_.target.files.length===0)return;c(_.target.files[0]);const p=URL.createObjectURL(_.target.files[0]);f(p),n&&n(_.target.files[0])},d=()=>{c(void 0),f(void 0),n&&n(void 0)};return h.jsxs(I,{children:[h.jsx("input",{id:e,type:"file",name:t,onChange:S,accept:"image/png, image/jpeg, image/webp, image/jpg",style:{opacity:0,pointerEvents:"none",width:0,height:0,position:"absolute"}}),h.jsx("label",{htmlFor:e,onMouseEnter:()=>{},onMouseLeave:()=>{},style:{width:o,height:a,cursor:"pointer"},children:u?h.jsx(tl,{src:u,width:o,handleCancel:d}):h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(I,{marginRight:r.Spacings.Size1,children:h.jsx(q,{children:s||"Upload image"})}),h.jsx(I,{className:`${Jr.iconContainerDesktop}`,children:h.jsx(ie,{name:"image"})}),h.jsx(I,{className:`${Jr.iconContainerMobile}`,children:h.jsx(ie,{name:"camera"})})]})})]})},tl=({src:e,width:t,handleCancel:n})=>h.jsxs(Y,{children:[h.jsx(I,{children:h.jsx("img",{alt:"preview",src:e,width:t})}),h.jsx(I,{children:h.jsx(ie,{name:"x",iconAction:()=>n()})})]}),nl=({id:e,checked:t,size:n=r.Sizings.Size3,handleChange:s=()=>{},vertigo:i,children:o})=>{const[a,l]=E.useState(t),[c,u]=E.useState(!1),f=S=>{l(S),s(e,S)};return E.useEffect(()=>{const S=d=>{!c||a||d.key===" "&&f(!0)};return document&&document.addEventListener("keydown",S,!1),()=>{document&&document.removeEventListener("keydown",S,!1)}},[c,a]),E.useEffect(()=>{l(t)},[t]),h.jsx(I,{onClick:()=>{i&&a||(l(!a),s(e,a))},style:{cursor:"pointer"},tabIndex:0,role:"button",onFocus:()=>u(!0),onBlur:()=>u(!1),children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(rl,{checked:a,size:n}),h.jsx(I,{marginLeft:r.Spacings.Size1,style:{transform:"translateY(-1px)",userSelect:"none"},children:o}),h.jsx("input",{id:e,checked:a,onChange:()=>{},type:"radio",style:{appearance:"none",backgroundColor:"transparent",margin:0,display:"none"}})]})})},rl=({checked:e,size:t})=>{const n=ue(e,{from:{opacity:0,scale:.6},enter:{opacity:1,scale:1},leave:{opacity:0,scale:.6},config:{...Un.stiff}}),s=W({borderColor:e?r.COLOR_VALUES[r.ColorPalettes.Primary5]:r.COLOR_VALUES[r.ColorPalettes.Grey5]});return h.jsx(I,{style:{...s,width:t,height:t,borderRadius:"50%",borderWidth:2,borderStyle:"solid",display:"flex",justifyContent:"center",alignItems:"center"},children:n((i,o)=>o&&h.jsx(I,{style:{...i,width:t-10,height:t-10,borderRadius:"50%",backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Primary5]}}))})},sl=({inputHelper:e})=>{const[t,n]=E.useState(!1);return h.jsxs(I,{style:{position:"absolute",top:"50%",right:-10,transform:"translateY(-25%)"},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[h.jsx(ie,{name:"info",size:r.Sizings.Size2,colorLight:r.ColorPalettes.Primary5,colorDark:r.ColorPalettes.Primary5}),h.jsx(I,{style:{position:"relative",pointerEvents:"none"},children:h.jsx(kt,{labelName:e,hover:t,x:0,y:0})})]})},il="_inputtext_rg89u_1",ol="_inputLabel_rg89u_9",al="_showHidePassword_rg89u_41",Ci={inputtext:il,inputLabel:ol,showHidePassword:al},cl=({isShow:e,handleShowHideText:t})=>h.jsx(I,{className:Ci.showHidePassword,style:{position:"absolute",bottom:".75rem",left:"88%",zIndex:4,cursor:"pointer"},onClick:()=>t(),children:h.jsx(ie,{name:e?r.Icons.EyeOff:r.Icons.Eye,size:r.Sizings.Size3,colorLight:r.ColorPalettes.Primary5,colorDark:r.ColorPalettes.Primary5,cursor:r.Cursors.Pointer})}),ul=({id:e,label:t,size:n,labelTextColor:s,inputColor:i})=>h.jsx(I,{paddingLeft:r.INPUT_TEXT_SIZE[n].paddings.left,paddingBottom:r.INPUT_TEXT_SIZE[n].paddings.bottom,children:h.jsx("label",{htmlFor:e,children:h.jsx(q,{fontWeight:r.FontWeights.Size3,paletteColor:s&&typeof s=="boolean"?r.INPUT_TEXT_COLOR[i].labelColor:r.ColorPalettes.Grey10,fontSize:r.INPUT_TEXT_SIZE[n].font.size,children:t})})}),ll=({id:e,name:t,type:n=r.InputTextTypes.Text,value:s,modes:i=r.InputTextModes.Default,label:o,focus:a,required:l,width:c,fullWidth:u,helperText:f,placeholder:S="Insert text",step:d,min:_,handleChange:p,handleFocus:g,handleBlur:m,handleCheck:T,size:C=r.InputTextSizes.Default,inputStyle:O=r.InputTextStyles.Default,inputColor:b=r.ColorSets.Primarys,labelTextColor:L=!0,transparent:R,...N})=>{const j=E.useRef(null);E.useEffect(()=>{if(i!==r.InputTextModes.Disabled){if(a){j.current&&j.current.focus();return}s!==""&&j.current&&j.current.value}},[a,i,s]);const[M,P]=E.useState(n),[D,G]=E.useState(!1),H=()=>{G(B=>!B)};E.useEffect(()=>{n===r.InputTextTypes.Password&&P(D?r.InputTextTypes.Text:r.InputTextTypes.Password)},[D]);const x=B=>{p&&p(B)},w=E.useCallback(async B=>{B.preventDefault();const $=B.target.value.trim();if(!(!$||$!=="")){m&&m(),T&&await T();return}},[m,T]),U=E.useCallback(()=>{if(i!==r.InputTextModes.Disabled)return j.current&&j.current.focus(),g&&g(),!0},[g,i]);return h.jsxs(I,{style:{width:u?"100%":c||350,position:"relative"},children:[!R&&h.jsx(ul,{id:e,label:o,inputColor:b,size:C,labelTextColor:L}),h.jsxs(I,{boxSizing:r.BoxSizings.BorderBox,...fl(O,R),borderColor:r.INPUT_TEXT_COLOR[b].borderColor,paddingLeft:r.INPUT_TEXT_SIZE[C].paddings.left,paddingRight:r.INPUT_TEXT_SIZE[C].paddings.right,paddingTop:r.INPUT_TEXT_SIZE[C].paddings.top,paddingBottom:r.INPUT_TEXT_SIZE[C].paddings.bottom,style:{paddingTop:O!==r.InputTextStyles.Outlined?1:"",paddingBottom:O!==r.InputTextStyles.Outlined?r.SPACING_VALUES[r.INPUT_TEXT_SIZE[C].paddings.bottom]:"",display:O!==r.InputTextStyles.Outlined?"flex":"block",cursor:"text"},onClick:()=>U(),children:[h.jsx(Gs,{ref:j,type:M,required:l,disabled:i!==r.InputTextModes.Disabled?void 0:!0,fontSize:r.INPUT_TEXT_SIZE[C].font.size,fontWeight:r.INPUT_TEXT_SIZE[C].font.weight,color:r.INPUT_TEXT_COLOR[b].fontColor,placeholder:S,id:e,name:t,value:s,min:_,step:d,onChange:p?x:void 0,onFocus:U,onBlur:w,className:Ci.inputtext,...N}),n===r.InputTextTypes.Password&&h.jsx(cl,{isShow:D,handleShowHideText:H}),f&&h.jsx(sl,{inputHelper:f})]})]})},fl=(e,t=!1)=>{var n,s,i,o,a,l,c,u,f,S;return t?{}:{borderBottomStyle:(i=(s=(n=r.INPUT_TEXT_STYLE[e])==null?void 0:n.borders)==null?void 0:s.bottom)==null?void 0:i.style,borderWidth:(a=(o=r.INPUT_TEXT_STYLE[e])==null?void 0:o.borders)==null?void 0:a.width,borderRadius:(c=(l=r.INPUT_TEXT_STYLE[e])==null?void 0:l.borders)==null?void 0:c.radius,borderStyle:(S=(f=(u=r.INPUT_TEXT_STYLE[e])==null?void 0:u.borders)==null?void 0:f.borders)==null?void 0:S.style}},dl=(e,t)=>{E.useEffect(()=>{if(e){e.style.height="0px";const n=e.scrollHeight;e.style.height=n+"px"}},[e,t])},hl=({id:e,label:t,size:n,textAreaColor:s,labelTextColor:i})=>h.jsx(I,{paddingLeft:r.TEXT_AREA_SIZE[n].paddings.left,paddingBottom:r.TEXT_AREA_SIZE[n].paddings.bottom,children:h.jsx("label",{htmlFor:e,children:h.jsx(q,{fontWeight:r.FontWeights.Size3,paletteColor:i&&typeof i=="boolean"?r.TEXT_AREA_COLOR[s].labelColor:r.ColorPalettes.Grey10,fontSize:r.TEXT_AREA_SIZE[n].font.size,children:t})})}),Sl="_textareaBare_1yf3j_1",_l={textareaBare:Sl},pl=({id:e,name:t,value:n,modes:s=r.TextAreaModes.Default,label:i,required:o=!1,rows:a=1,width:l,fullWidth:c,placeholder:u="Insert text",onChange:f,handleBlur:S,handleFocus:d,handleCheck:_,size:p=r.TextAreaSizes.Default,textAreaStyle:g=r.TextAreaStyles.Default,textAreaColor:m=r.ColorSets.Primarys,labelTextColor:T,noLabel:C,...O})=>{const b=E.useRef(null);dl(b.current,n);const L=E.useCallback(async N=>{N.preventDefault();const j=N.target.value.trim();if(!(!j||j!=="")){S&&S(),_&&await _();return}},[S,_]),R=E.useCallback(()=>{if(s!==r.TextAreaModes.Disabled)return b.current&&b.current.focus(),d&&d(),!0},[d,s]);return h.jsxs(I,{style:{width:c?"100%":l||350},children:[!C&&h.jsx(hl,{id:e,label:i,textAreaColor:m,size:p,labelTextColor:T}),h.jsx(I,{boxSizing:r.BoxSizings.BorderBox,paddingLeft:r.TEXT_AREA_SIZE[p].paddings.left,paddingRight:r.TEXT_AREA_SIZE[p].paddings.right,paddingTop:r.TEXT_AREA_SIZE[p].paddings.top,paddingBottom:r.TEXT_AREA_SIZE[p].paddings.bottom,borderColor:r.ColorPalettes.Primary5,...gl(g),style:{paddingTop:g!==r.TextAreaStyles.Outlined&&g!==r.TextAreaStyles.Default?1:"",paddingBottom:g!==r.TextAreaStyles.Outlined&&g!==r.TextAreaStyles.Default?1:"",cursor:"text"},onClick:()=>R(),children:h.jsx(Us,{ref:b,id:e,name:t,value:n,required:o,outlineStyle:r.OutlineStyles.None,resize:r.ElementResizes.None,onChange:f,onFocus:R,onBlur:L,placeholder:u,rows:a,fontSize:r.TEXT_AREA_SIZE[p].font.size,fontWeight:r.TEXT_AREA_SIZE[p].font.weight,className:_l.textareaBare,...O})})]})},gl=e=>{var t,n,s,i,o,a,l,c,u;return{borderBottomStyle:(s=(n=(t=r.TEXT_AREA_STYLE[e])==null?void 0:t.borders)==null?void 0:n.bottom)==null?void 0:s.style,borderWidth:(o=(i=r.TEXT_AREA_STYLE[e])==null?void 0:i.borders)==null?void 0:o.width,borderRadius:(l=(a=r.TEXT_AREA_STYLE[e])==null?void 0:a.borders)==null?void 0:l.radius,borderStyle:(u=(c=r.TEXT_AREA_STYLE[e])==null?void 0:c.borders)==null?void 0:u.style}},ml=({text:e,idx:t,handleSelectInset:n,isSelected:s,insetColor:i=r.ColorSets.Primarys,borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:l,borderBottomRightRadius:c})=>{const u=W({backgroundColor:s?r.COLOR_VALUES[r.ColorRanges[i][0]+3]:r.COLOR_VALUES[r.ColorRanges[r.ColorSets.Greys][0]+2],color:s?r.COLOR_VALUES[r.ColorRanges[r.ColorSets.Greys][1]-1]:r.COLOR_VALUES[r.ColorRanges[r.ColorSets.Greys][1]-4],boxShadow:s?"inset 0 0px 0 hsla(0, 0%, 0%, 0), inset 0 0px 0px hsla(0, 0%, 0%, 0)":"inset 0 -2px 0 hsla(0, 0%, 100%, .055), inset 0 2px 2px hsla(0, 0%, 0%, 0.1)"}),f=W({fontWeight:s?500:300});return h.jsx(I,{style:{...u,cursor:"pointer"},paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:l,borderBottomRightRadius:c,onClick:()=>n(t),children:h.jsx(I,{style:f,children:h.jsx(q,{style:{color:"inherit",transform:"translateY(-1px)",display:"inline-block"},children:e})})})},El=({options:e=[],valueIndex:t=0,id:n,setInput:s,setSelect:i,insetColor:o})=>{const[a,l]=E.useState(t);E.useEffect(()=>{typeof t=="number"&&l(t)},[t]);const c=u=>{l(u),s&&s(f=>({...f,[n]:e[u]})),i&&i(e[u])};return h.jsx(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:e.map((u,f)=>h.jsx(ml,{text:u.text,value:u.value,idx:f,id:u.id,handleSelectInset:c,isSelected:f===a,insetColor:o,borderTopLeftRadius:f===0?r.Radiuses.Size4:void 0,borderTopRightRadius:f===e.length-1?r.Radiuses.Size4:void 0,borderBottomLeftRadius:f===0?r.Radiuses.Size4:void 0,borderBottomRightRadius:f===e.length-1?r.Radiuses.Size4:void 0},f))})},Tl="_message_1i7cn_1",yl="_disabled_1i7cn_7",Al="_life_1i7cn_12",Cl="_red_1i7cn_19",Ol="_blue_1i7cn_22",Ll="_green_1i7cn_25",vl="_orange_1i7cn_28",cn={message:Tl,disabled:yl,life:Al,red:Cl,blue:Ol,green:Ll,orange:vl},bl=()=>{const{globalEventRef:e}=qs();return h.jsx(Ai,{children:h.jsx(xl,{children:t=>{e.current=t}})})};let Il=0;function xl({config:e={tension:125,friction:20,precision:.1},timeout:t=3e3,children:n}){const s=E.useMemo(()=>new WeakMap,[]),i=E.useMemo(()=>new WeakMap,[]),[o,a]=E.useState([]),l=ue(o,{from:{opacity:0,height:0,life:"100%",y:0},keys:c=>c.key,enter:c=>async(u,f)=>{i.set(c,f),await u({opacity:1,height:s.get(c).offsetHeight+10,y:30}),await u({life:"0%"})},leave:[{opacity:0,y:50},{height:0}],onRest:(c,u,f)=>{a(S=>S.filter(d=>d.key!==f.key))},config:(c,u,f)=>S=>f==="enter"&&S==="life"?{duration:c.type.isTimeout?t:1e3*60*60*24}:e});return E.useEffect(()=>{n((c,u)=>{a(f=>[...f,{key:Il++,msg:c,type:u}])})},[n]),h.jsx(Y,{display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,flexAlignItem:r.FlexAlignItems.FlexEnd,style:{position:"fixed",zIndex:1e3,bottom:"30px",right:"30px"},children:l(({life:c,...u},f)=>h.jsx(Rl,{style:u,refMap:s,cancelMap:i,type:f.type,msg:f.msg,life:c,item:f}))})}const Rl=({style:e,refMap:t,cancelMap:n,type:s,msg:i,life:o,item:a})=>{const[l,c]=E.useState(!1);return h.jsx(I,{style:e,className:l?`${cn.message} disabled`:cn.message,children:h.jsx("div",{ref:u=>u&&t.set(a,u),children:h.jsx(I,{bgColor:r.ColorPalettes.Secondary2,borderRadius:r.Radiuses.Size4,padding:r.Spacings.Size3,boxShadow:r.BoxShadows.Size5,style:{borderBottom:"none"},children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,style:{position:"relative",minWidth:"200px"},children:[h.jsx(I,{marginRight:r.Spacings.Size2,children:h.jsx(ie,{name:s.icon,size:r.Sizings.Size6,colorLight:s.color,colorDark:s.color,withMargin:!1})}),h.jsx(Pt,{fontSize:r.FontSizes.Size4,children:i||s.default}),h.jsx(I,{marginLeft:r.Spacings.Auto,paddingLeft:r.Spacings.Size3,children:h.jsx(ie,{name:"x-circle",size:r.Sizings.Size4,iconAction:()=>{l||(n.has(a)&&o.get()!=="0%"&&n.get(a)(),c(!0))},withMargin:!1})}),(s==null?void 0:s.isTimeout)&&h.jsx(I,{className:`${cn.life} ${s.classname}`,style:{right:o,transform:"translateY(8px)"}})]})})})})},wl=()=>h.jsx(h.Fragment,{children:h.jsx(bl,{})}),Nl="_ul_5jv7w_1",Dl="_li_5jv7w_5",Jn={ul:Nl,li:Dl},un={[r.DropdownPositions.Top]:{from:{y:-10},enter:{y:-1},leave:{y:-10}},[r.DropdownPositions.Bottom]:{from:{y:10},enter:{y:-1},leave:{y:10}}},jl=({dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o})=>{switch(e){case r.DropdownHeightStyles.Default:return h.jsx(es,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o});case r.DropdownHeightStyles.AutoHeight:return h.jsx(Ml,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o});default:return h.jsx(es,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o})}},es=({isOpen:e,dropdownPosition:t,position:n,children:s})=>ue(e,{from:{opacity:0,...un[t].from},enter:{opacity:1,...un[t].enter},leave:{opacity:0,...un[t].leave}})((o,a)=>a&&h.jsx(Yn,{style:{...o,transformOrigin:t===r.DropdownPositions.Top?"bottom center":t===r.DropdownPositions.Bottom?"top center":n<0?"bottom center":"top center"},className:Jn.ul,children:s})),Ml=({isOpen:e,dropdownPosition:t,position:n,children:s})=>ue(e,{from:{opacity:0,scaleY:0},enter:{opacity:1,scaleY:1},leave:{opacity:0,scaleY:.5},config(o,a,l){return l==="leave"?{duration:100}:Un.default}})((o,a)=>a&&h.jsx(Yn,{style:{...o,transformOrigin:t===r.DropdownPositions.Top?"bottom center":t===r.DropdownPositions.Bottom?"top center":n<0?"bottom center":"top center"},className:Jn.ul,children:s})),Pl=({handleSelectItem:e,id:t,idx:n,children:s,colorSet:i})=>{const[o,a]=W(()=>({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Grey2]}));return h.jsx(Hs,{className:Jn.li,paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,marginTop:r.Spacings.Size0,style:{listStyle:"none",cursor:"pointer",userSelect:"none",...o},onMouseEnter:()=>{a.start({backgroundColor:r.COLOR_VALUES[r.ColorRanges[i][0]+2]})},onMouseLeave:()=>{a.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Grey2]})},onMouseDown:()=>{a.start({backgroundColor:r.COLOR_VALUES[r.ColorRanges[i][0]+3]})},onClick:()=>e(t,n),children:s})},kl=(e,t)=>{const[n,s]=E.useState({width:0,height:0});return E.useEffect(()=>{const o=()=>{s({width:window?window.innerWidth:0,height:window?window.innerHeight:0})};return window&&window.addEventListener("resize",o),()=>{window&&window.removeEventListener("resize",o)}},[]),e.height+10+e.top>n.height?-1:1},Fl=({isSelectOpen:e,selectOptions:t,handleSelectItem:n,selectState:s,dropdownHeightStyle:i,dropdownPosition:o=r.DropdownPositions.Bottom,colorSet:a,headerHeight:l,w:c})=>{const[u,f]=ge(),S=kl(f),d=S>0?l-1:-f.height;return h.jsx(xe,{ref:u,borderRadius:r.SELECT_STATES[s].dropdown.borderRadius,borderBottomLeftRadius:r.Radiuses.Size0,borderBottomRightRadius:r.Radiuses.Size0,borderWidth:r.SELECT_STATES[s].header.borderWidth,borderColor:r.SELECT_STATES[s].header.borderColor,style:{maxHeight:250,width:c,overflowY:"scroll",position:"absolute",transform:`translateY(${d}px)`,overscrollBehaviorY:"none"},children:h.jsx(jl,{dropdownHeightStyle:i,isOpen:e,dropdownPosition:o,selectState:s,position:S,children:t.map((_,p)=>h.jsx(Pl,{handleSelectItem:n,id:_.id,idx:p,colorSet:a,children:h.jsx(I,{paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,children:h.jsx(q,{children:_.text})})},_.id))})})},Bl=({selectedValues:e,doubleZero:t,title:n,selectedValueStyles:s=r.SelectedValuesStyles.Text,sizes:i=r.SelectSizes.Medium})=>(e.length===1&&e[0].text,e.length<1?h.jsx(zl,{sizes:i,title:n}):s===r.SelectedValuesStyles.Text?h.jsx(h.Fragment,{children:e.map((o,a)=>h.jsx(q,{fontSize:r.SELECT_SIZES[i].font.size,children:o.text},a))}):h.jsx(h.Fragment,{children:e.map((o,a)=>h.jsx(q,{fontSize:r.SELECT_SIZES[i].font.size,children:o.text},a))})),zl=({title:e,sizes:t})=>h.jsx(q,{fontSize:r.SELECT_SIZES[t].font.size,children:e}),Gl=({setOpenDropdown:e,openDropdown:t,title:n,doubleZero:s,selectState:i,selectedValues:o,selectedValueStyles:a,sizes:l=r.SelectSizes.Medium})=>h.jsx(I,{style:{cursor:"pointer"},paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderRadius:r.SELECT_STATES[i].header.borderRadius,borderWidth:r.SELECT_STATES[i].header.borderWidth,borderColor:r.SELECT_STATES[i].header.borderColor,borderTopLeftRadius:t?r.Radiuses.Size0:void 0,borderTopRightRadius:t?r.Radiuses.Size0:void 0,bgColor:r.SELECT_STATES[i].header.bgColor,onClick:()=>e(c=>!c),children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,flexJustifyContent:r.FlexJustifyContents.SpaceBetween,children:[h.jsx(Bl,{sizes:l,selectedValues:o,doubleZero:s,title:n,selectedValueStyles:a}),h.jsx("div",{className:"icon",children:h.jsx(Ul,{isSelectOpen:t,sizes:l})})]})}),Ul=({isSelectOpen:e,sizes:t,cursor:n=r.Cursors.Pointer})=>{const s=W({rotateX:e?180:0});return h.jsx(I,{style:s,children:h.jsx(ie,{name:"chevron-down",colorLight:r.ColorPalettes.Grey5,colorDark:r.ColorPalettes.Grey5,size:r.SELECT_SIZES[t].icon.size,cursor:n})})};function Hl(e,t){switch(t.type){case"field":return{...e,[t.field]:t.value};case"select":return{...e,selectedItemIdx:t.value,selectOptions:e.selectOptions.map((n,s)=>t.value===s?{...n,selected:!0}:{...n,selected:!1}),openDropdown:!1,selectState:r.SelectStates.Selected};case"open":return{...e,openDropdown:!0};case"close":return{...e,openDropdown:!1};case"open-close":return{...e,openDropdown:!e.openDropdown};case"parent-update-selected":return{...e,selectedItemIdx:t.value,selectOptions:e.selectOptions.map((n,s)=>({...n,selected:s===t.value}))};default:return e}}const $l=({id:e,title:t,options:n,selectedIdx:s=null,w:i=225,doubleZero:o=!1,required:a=!1,dropdownHeightStyle:l=r.DropdownHeightStyles.AutoHeight,state:c=r.SelectStates.Default,selectedValuesStyle:u=r.SelectedValuesStyles.Text,colorSet:f=r.ColorSets.Primarys,dropdownPosition:S=r.DropdownPositions.Bottom,setSelectedIdx:d,setInput:_})=>{const[p,g]=E.useState(!1),[m,T]=E.useReducer(Hl,{selectState:c,openDropdown:!1,selectedItemIdx:s,selectOptions:n}),{openDropdown:C,selectedItemIdx:O,selectOptions:b,selectState:L}=m;E.useEffect(()=>{g(!0),typeof s=="number"&&(d&&d(s),_&&_(P=>({...P,[e]:n[s]})))},[]),E.useEffect(()=>{typeof s=="number"&&T({type:"parent-update-selected",value:s})},[s]),E.useEffect(()=>{a&&p&&!C&&T(typeof O=="number"&&O!==-1?{type:"field",field:"selectState",value:r.SelectStates.Default}:{type:"field",field:"selectState",value:r.SelectStates.Error})},[p,C,a,O]);const R=(P,D)=>{T({type:"select",value:D}),d&&d(D),_&&_(G=>({...G,[P]:b[D]}))},N=Xn(()=>{T({type:"close"})}),[j,M]=ge();return h.jsxs(Bs,{ref:N,display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,style:{width:i,maxWidth:i},children:[h.jsx("div",{ref:j,children:h.jsx(Gl,{w:i,setOpenDropdown:()=>T({type:"open-close"}),selectState:L,setSelectState:P=>T({type:"field",field:"selectState",value:P}),openDropdown:C,title:t,doubleZero:o,selectedValues:b.filter(P=>P.selected===!0),selectedValueStyles:u,options:n})}),h.jsx(Fl,{isSelectOpen:C,closeSelect:()=>T({type:"close"}),selectOptions:b,handleSelectItem:R,selectState:L,dropdownHeightStyle:l,dropdownPosition:S,colorSet:f,headerHeight:M.height,w:M.width})]})},Zl=({headerId:e,element:t,styles:n,sortable:s=!1,onClickHeaderCell:i,columnIndex:o,setTableRows:a})=>{const l=E.useCallback(S=>{i&&i(e,S)},[e,i]),c=E.useCallback(()=>{s&&a&&a(S=>{const d=[...S];try{d[0].cells[o].cellId<d[d.length-1].cells[o].cellId?d.sort((_,p)=>{const g=_.cells[o].cellId,m=p.cells[o].cellId;return g<m?1:g>m?-1:0}):d.sort((_,p)=>{const g=_.cells[o].cellId,m=p.cells[o].cellId;return g<m?-1:g>m?1:0})}catch(_){return console.error(_),S}return d})},[o,a,s]),[u,f]=W(()=>({opacity:0}));return h.jsx(Y,{justifySelf:n.position.justifySelf,alignSelf:n.position.alignSelf,style:{width:"100%"},children:h.jsx(I,{onClick:l,onMouseEnter:()=>{f.start({opacity:1})},onMouseLeave:()=>{f.start({opacity:0})},children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:[t,s&&h.jsx(I,{marginLeft:r.Spacings.Size3,style:u,children:h.jsx(ie,{name:"arrow-up",size:r.Sizings.Size3,iconAction:()=>c()})})]})})})},Yl="_gridTableHeader_nombk_1",Vl={gridTableHeader:Yl},Oi=({headers:e=[],templateColumns:t,setTableRows:n})=>h.jsx(I,{paddingLeft:r.Spacings.Size1,paddingRight:r.Spacings.Size1,children:h.jsx(Y,{display:r.Displays.Grid,className:Vl.gridTableHeader,style:{gridTemplateColumns:t.join(" ")},children:e.map((s,i)=>h.jsx(Zl,{headerId:s.headerId,element:s.element,styles:s.styles,onClickHeaderCell:s.onClickHeaderCell,setTableRows:n,columnIndex:i,sortable:s.sortable},s.headerId))})}),Xl=({hover:e,onHover:t,isClicked:n,children:s})=>{const i=W({backgroundColor:t?"rgba(255,255,255, .1)":"rgba(255,255,255,0)",borderRadius:"10px"}),o=W({backgroundColor:n?"rgba(255,255,255, .15)":"rgba(255,255,255,0)",borderRadius:"10px"});return h.jsx(I,{style:e?o:void 0,children:h.jsx(I,{style:e?i:void 0,paddingLeft:r.Spacings.Size1,paddingRight:r.Spacings.Size1,children:s})})},Wl=({cellId:e,element:t,styles:n,onClickCell:s})=>h.jsx(Y,{justifySelf:n.position.justifySelf,alignSelf:n.position.alignSelf,children:h.jsx(I,{onClick:i=>{s&&s(e,i)},children:t})}),ql="_gridTableRow_1mdn2_1",Kl="_cellData_1mdn2_18",Ql="_date_1mdn2_23",Jl="_time_1mdn2_27",ef="_serial_1mdn2_32",tf="_image_1mdn2_36",nf="_absolute_1mdn2_45",rf="_start_1mdn2_54",sf="_center_1mdn2_57",of="_end_1mdn2_60",af={gridTableRow:ql,cellData:Kl,date:Ql,time:Jl,serial:ef,image:tf,"button-option":"_button-option_1mdn2_41",absolute:nf,start:rf,center:sf,end:of},Li=({rowId:e,templateColumns:t=[],cells:n=[],hover:s,onClickRow:i})=>{const[o,a]=E.useState(!1),[l,c]=E.useState(!1);return h.jsx(Xl,{hover:s,onHover:o,isClicked:l,children:h.jsx(Y,{className:af.gridTableRow,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onMouseDown:()=>c(!0),onMouseUp:()=>c(!1),onClick:u=>{i&&i(e,u)},display:r.Displays.Grid,style:{gridTemplateColumns:t.join(" ")},children:n.map((u,f)=>h.jsx(Wl,{cellId:u.cellId,element:u.element,styles:u.styles,onClickCell:u.onClickCell},u.cellId||f))})})},cf=({headers:e=[],rows:t=[],templateColumns:n,emptyPlaceholder:s,hover:i=!0})=>{const[o,a]=E.useState(t);return h.jsxs(I,{style:{flex:1,width:"100%",maxWidth:"100%"},children:[h.jsx(Oi,{headers:e,templateColumns:n,setTableRows:a}),o.length!==0?h.jsx(h.Fragment,{children:o.map((l,c)=>h.jsx(Li,{rowId:l.rowId,templateColumns:n,cells:l.cells,hover:i,onClickRow:l.onClickRow},l.rowId||c))}):s?h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,style:{width:"100%"},children:s}):h.jsx(h.Fragment,{})]})},uf=({menu:e,setActiveItem:t,idx:n,menuWrapper:s,route:i})=>{const o=()=>{t(n)};return h.jsx(lf,{Wrapper:s,route:i,children:h.jsx(I,{onClick:()=>o(),paddingLeft:r.Spacings.Size3,paddingRight:r.Spacings.Size3,paddingTop:r.Spacings.Size2,paddingBottom:r.Spacings.Size2,style:{zIndex:11,cursor:"pointer",userSelect:"none"},children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:h.jsx(q,{style:{zIndex:12},children:e.name})})})})};function lf({Wrapper:e,route:t,children:n}){if(typeof e<"u")return h.jsx(e,{href:t,children:n})}const ff=({height:e,tabRoomWidth:t,activeItem:n})=>{const[s,i]=W(()=>({from:{x:0}}));return i.start({x:t*n}),h.jsx(I,{borderRadius:r.Radiuses.Size5,boxShadow:r.BoxShadows.Size1,padding:r.Spacings.Size1,boxSizing:r.BoxSizings.BorderBox,style:{position:"absolute",height:e,width:t,zIndex:10,...s},children:h.jsx(I,{borderRadius:r.Radiuses.Size4,bgColor:r.ColorPalettes.Grey2,style:{width:"100%",height:"100%"},children:h.jsx(h.Fragment,{})})})},df=({tabMenu:e,tab:t,setTab:n})=>{const[s,i]=E.useState(t||0);E.useEffect(()=>{i(t)},[t]);const o=u=>{n&&n(u),i(u)},[a,l]=ge(),c=l.width/e.length;return h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:h.jsx("div",{ref:a,style:{boxSizing:"border-box"},children:h.jsx(I,{borderRadius:r.Radiuses.Size5,bgColor:r.ColorPalettes.Grey1,style:{width:"max-content",height:"max-content",position:"relative",zIndex:9},children:h.jsxs(Y,{display:r.Displays.Grid,style:{gridTemplateColumns:`repeat(${e.length}, 1fr)`,position:"relative"},children:[h.jsx(ff,{height:l.height,width:l.width,activeItem:s,tabRoomWidth:c}),e.map((u,f)=>h.jsx(uf,{idx:f,menu:u,active:s===f,setActiveItem:o,menuWrapper:u.menuWrapper,route:u.route},f))]})})})})},hf="_toggleContainer_15eps_1",Sf="_toggleBg_15eps_15",_f="_toggleThumb_15eps_33",ln={toggleContainer:hf,toggleBg:Sf,toggleThumb:_f},pf=({isTrue:e,setIsTrue:t,size:n=r.ToggleSizes.Medium,icon:s="",toggleState:i=r.ToggleStates.Icon,description:o=""})=>{var _,p;const a=W({backgroundColor:e?"#4BD763":"#cccccc"}),[l,c]=W(()=>({x:0}));c.start({x:e?26:0});const[u,f]=E.useState(!1),[S,d]=ge();return h.jsxs(I,{className:ln.toggleContainer,tabIndex:1,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onClick:()=>t(g=>!g),style:{width:r.TOGGLE_SIZE[n].container.w,height:r.TOGGLE_SIZE[n].container.h},children:[h.jsx(I,{style:{...a,position:"relative"},children:h.jsx(I,{className:ln.toggleBg,style:{width:r.TOGGLE_SIZE[n].bg.w,height:r.TOGGLE_SIZE[n].bg.h}})}),h.jsx(I,{style:{position:"relative",...l},children:h.jsxs(xe,{className:ln.toggleThumb,ref:S,style:{width:r.TOGGLE_SIZE[n].thumb.w,height:r.TOGGLE_SIZE[n].thumb.h},children:[o!==""&&h.jsx(kt,{labelName:o,hover:u,offsetX:d.width/2,y:d.height+5}),s!==""&&h.jsx(ie,{name:i===r.ToggleStates.Icon?s:r.TOGGLE_STATE_ICON[i],width:(_=r.TOGGLE_SIZE[n].icon)==null?void 0:_.w,height:(p=r.TOGGLE_SIZE[n].icon)==null?void 0:p.h})]})})]})};exports.Admonition=Ia;exports.Avatar=Ks;exports.AvatarGroup=Na;exports.Button=Qs;exports.Checkbox=Js;exports.Checkboxes=Pa;exports.Chip=Fa;exports.ColorPicker=_c;exports.Container=I;exports.ContainerRef=xe;exports.DivMeasure=ma;exports.F__Button=zs;exports.F__ButtonRef=Ho;exports.F__Li=Hs;exports.F__LiRef=Yo;exports.F__TextArea=Zo;exports.F__TextAreaRef=Us;exports.F__TextInput=$o;exports.F__TextInputRef=Gs;exports.F__Ul=Yn;exports.F__UlRef=Vo;exports.FunctionalUiPortals=Wn;exports.GalleryModal=Zu;exports.GlobalEventPortal=Ai;exports.InputImage=el;exports.InputText=ll;exports.InsetGroup=El;exports.LabelText=kt;exports.Layout=Y;exports.LayoutRef=Bs;exports.LoadingSpinner=Ea;exports.Modal=Ti;exports.NotificationSystem=wl;exports.ProvideGlobalEventContext=va;exports.ProvideUiContext=Oa;exports.Radio=nl;exports.SelectSpring=$l;exports.Spinner=Ys;exports.SpringEnter=ya;exports.SpringEnterOffsetBy=Vs;exports.SpringMenuTransition=Aa;exports.SpringOpenCloseHeight=Ta;exports.TableGrid=cf;exports.TableHeader=Oi;exports.TableRow=Li;exports.Tabs=df;exports.TagColor=si;exports.TextArea=pl;exports.Text_H1=Xo;exports.Text_H1Ref=Wo;exports.Text_H2=qo;exports.Text_H2Ref=Ko;exports.Text_H3=Qo;exports.Text_H3Ref=Jo;exports.Text_H4=ea;exports.Text_H4Ref=ta;exports.Text_H5=na;exports.Text_H5Ref=ra;exports.Text_H6=sa;exports.Text_H6Ref=ia;exports.Text_Header=la;exports.Text_HeaderRef=fa;exports.Text_P=Pt;exports.Text_PRef=oa;exports.Text_Span=q;exports.Text_SpanRef=aa;exports.ToggleSwitch=pf;exports.UIcon=ie;exports.useGlobalEventContext=qs;exports.useUiContext=V;
3
+ Please add \`${s}Action\` when creating your handler.`);return}const a=n+"Start",l=n+"End",c=u=>{let f;return u.first&&a in t&&t[a](u),n in t&&(f=t[n](u)),u.last&&l in t&&t[l](u),f};i[s]=c,o[s]=o[s]||{}}function gu(e,t){const[n,s,i]=pu(e),o={};return De(i,n,"onDrag","drag",o,t),De(i,n,"onWheel","wheel",o,t),De(i,n,"onScroll","scroll",o,t),De(i,n,"onPinch","pinch",o,t),De(i,n,"onMove","move",o,t),De(i,n,"onHover","hover",o,t),{handlers:o,config:t,nativeHandlers:s}}function mi(e,t={},n,s){const i=E.useMemo(()=>new hu(e),[]);if(i.applyHandlers(e,s),i.applyConfig(t,n),E.useEffect(i.effect.bind(i)),E.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function Ei(e,t){return _i(pi),mi({drag:e},t||{},"drag")}function mu(e){return e.forEach(_i),function(n,s){const{handlers:i,nativeHandlers:o,config:a}=gu(n,s||{});return mi(i,a,void 0,o)}}const Eu=({closeModal:e,modalStyles:t,children:n})=>{const s=Xn(()=>e()),[i,o]=W(()=>({y:0})),a=Ei(({velocity:[,l],last:c,down:u,movement:[,f],cancel:S,type:d})=>{typeof d=="string"&&(d.includes("pointer")||d.includes("mouse"))||(c&&l<.3?S():c&&l>.3&&e(),f<-.001?S():f>450&&e(),o.start({y:u?f:0,immediate:u}))},{axis:"y",filterTaps:!0,pointer:{touch:!0}});return h.jsx(Re,{className:t===r.ModalStyles.Nocard?`${We.modalCardCopyOriAnimated} ${We["no-card"]}`:`${We.modalCardCopyOriAnimated}`,...a(),style:{...i,touchAction:"none"},ref:s,children:n})},Tu=({isShown:e,children:t})=>ue(e,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}})((s,i)=>i&&h.jsx(b,{className:We.wrapperContainer,style:s,children:t})),Ti=({showModal:e,closeModal:t,modalStyles:n=r.ModalStyles.Default,modalBackground:s,children:i})=>(pc("Escape",()=>{t()}),h.jsx(yu,{closeModal:t,showModal:e,modalStyles:n,modalBackground:s,children:i})),yu=({showModal:e,closeModal:t,children:n,modalStyles:s=r.ModalStyles.Default,modalBackground:i})=>h.jsx(gc,{children:h.jsxs(Tu,{isShown:e,children:[h.jsx(yc,{isShown:e,modalBackground:i}),h.jsx(Vs,{direction:"vertical",isShown:e,enterOffsetBy:3,children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.FlexStart,style:{position:"absolute",minHeight:"100vh",minWidth:"100%",top:0},children:h.jsx(Eu,{closeModal:t,modalStyles:s,children:n})})})]})}),Au=({handleCloseGallery:e})=>{const t=ue(!0,{from:{opacity:0,y:-100,x:-50},enter:{opacity:1,y:25,x:-50},leave:{opacity:0,y:-100,x:-50}});return h.jsx(Y,{style:{width:"100%"},display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.FlexEnd,flexAlignItem:r.FlexAlignItems.Center,children:t((n,s)=>s&&h.jsx(b,{style:n,children:h.jsx(ie,{name:"x",iconAction:()=>e(),size:r.Sizings.Size5})}))})};var Kr=NaN,Cu="[object Symbol]",Ou=/^\s+|\s+$/g,Lu=/^[-+]0x[0-9a-f]+$/i,vu=/^0b[01]+$/i,Iu=/^0o[0-7]+$/i,bu=parseInt,xu=Object.prototype,Ru=xu.toString;function wu(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Qr(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Nu(e){return!!e&&typeof e=="object"}function Du(e){return typeof e=="symbol"||Nu(e)&&Ru.call(e)==Cu}function on(e){if(typeof e=="number")return e;if(Du(e))return Kr;if(Qr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Qr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Ou,"");var n=vu.test(e);return n||Iu.test(e)?bu(e.slice(2),n?2:8):Lu.test(e)?Kr:+e}function ju(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=on(n),n=n===n?n:0),t!==void 0&&(t=on(t),t=t===t?t:0),wu(on(e),t,n)}var ne;const yi=E.createContext({galleryImages:ne,imgIndex:0,props:ne,ref:ne,bind:ne,isZooming:ne,manualZoomScale:ne,handleSetImages:ne,handleCloseGallery:ne,handleIncrease:ne,handleDecrease:ne,handleSetIsZooming:ne,handleZoomIn:ne,handleZoomOut:ne,handleZoomReset:ne}),Mu=({children:e})=>{const t=Pu();return h.jsx(yi.Provider,{value:t,children:e})},Qn=()=>E.useContext(yi);function Pu(){const[e,t]=E.useState([]),[n,s]=E.useState(0),[i,{width:o}]=ge(),[a,l]=E.useState(!1),[c,u]=Zn(e.length,L=>({x:L*o,scale:o===0?0:1,display:"block"}),[o]),f=Ei(({active:L,movement:[R],velocity:[N],direction:[j],distance:[M],cancel:P})=>{a||(L&&(M>o/3||N>1)&&(s(D=>ju(D+(j>0?-1:1),0,e.length-1)),P()),u.start(D=>{if(D<n-1||D>n+1)return{display:"none"};const G=(D-n)*o+(L?R:0),H=L?1-M/o/2:1;return{x:G,scale:H,display:"block"}}))}),S=L=>{t(L)},d=L=>{s(0),L&&L()};function _(){s(L=>L+1>e.length-1?L:(u.start(R=>R<L+1-1||R>L+1+1?{display:"none"}:{x:(R-(L+1))*o,scale:1,display:"block"}),L+1))}function p(){s(L=>L-1<0?L:(u.start(R=>R<L-1-1||R>L-1+1?{display:"none"}:{x:(R-(L-1))*o,scale:1,display:"block"}),L-1))}const g=L=>{l(L)},[m,T]=E.useState(1);function C(){T(L=>L+.25>2?2:L+.25)}function O(){T(L=>L-.25<.5?1:L-.25)}function I(){T(1)}return{imgIndex:n,galleryImages:e,props:c,ref:i,bind:f,isZooming:a,manualZoomScale:m,handleSetImages:S,handleCloseGallery:d,handleIncrease:_,handleDecrease:p,handleSetIsZooming:g,handleZoomIn:C,handleZoomOut:O,handleZoomReset:I}}const ku=({openMenu:e=!0})=>{const{handleIncrease:t,handleDecrease:n,galleryImages:s,imgIndex:i,handleZoomIn:o,handleZoomOut:a}=Qn();return ue(e,{from:{opacity:0,y:100},enter:{opacity:1,y:-50},leave:{opacity:0,y:100}})((c,u)=>u&&h.jsx(b,{style:{width:"100%",...c},children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,style:{minWidth:350,maxWidth:500,width:400},children:[h.jsx(pt,{icon:"chevron-left",marginLeft:r.Spacings.Size4,marginRight:r.Spacings.Size1,clickAction:()=>n(),disabled:i<=0&&!0}),h.jsx(Y,{children:h.jsx(b,{children:h.jsx(q,{fontSize:r.FontSizes.Size4,children:`${i+1} / ${s.length}`})})}),h.jsx(pt,{icon:"chevron-right",marginLeft:r.Spacings.Size1,clickAction:()=>t(),disabled:i>=s.length-1&&!0}),h.jsx(pt,{icon:"zoom-in",marginLeft:r.Spacings.Auto,marginRight:r.Spacings.Size1,clickAction:()=>{o()}}),h.jsx(pt,{icon:"zoom-out",marginLeft:r.Spacings.Size1,marginRight:r.Spacings.Size4,clickAction:()=>{a()}})]})})}))},pt=({icon:e,clickAction:t,marginLeft:n,marginRight:s})=>h.jsx(b,{marginLeft:n,marginRight:s,children:h.jsx(Qs,{name:"",icon:e,buttonSize:r.ButtonSizes.Big,clickAction:t})}),Fu="_ZAnimated_10d05_1",Bu={ZAnimated:Fu},zu=mu([pi,ou]),Gu=({children:e})=>{const{imgIndex:t,isZooming:n,handleSetIsZooming:s,manualZoomScale:i}=Qn();E.useEffect(()=>{const c=u=>u.preventDefault();return document&&(document.addEventListener("gesturestart",c),document.addEventListener("gesturechange",c),document.addEventListener("gestureend",c)),()=>{document&&(document.removeEventListener("gesturestart",c),document.removeEventListener("gesturechange",c),document.removeEventListener("gestureend",c))}},[]);const[o,a]=W(()=>({x:0,y:0,scale:1,rotateZ:0})),l=E.useRef(null);return E.useEffect(()=>{t!==0&&a.start(c=>({...c,x:0,y:0,scale:1}))},[a,t]),E.useEffect(()=>{a.start(c=>({...c,scale:i}))},[a,i]),zu({onDrag:({pinching:c,cancel:u,offset:[f,S]})=>{if(n){if(c)return u();a.start({x:f,y:S})}},onPinch:({origin:[c,u],first:f,last:S,movement:[d],offset:[_],memo:p})=>{if(f){const{width:T,height:C,x:O,y:I}=l.current&&l.current.getBoundingClientRect(),L=c-(O+T/2),R=u-(I+C/2);p=[o.x.get(),o.y.get(),L,R]}if(S&&_===1&&c!==0)return s&&s(!1),a.start({scale:1,x:0,y:0}),p;const g=p[0]-(d-1)*p[2],m=p[1]-(d-1)*p[3];return s&&s(!0),a.start({scale:_,x:g,y:m}),p}},{target:l,drag:{from:()=>[o.x.get(),o.y.get()],bounds:{left:-100,right:100,top:-100,bottom:100}},pinch:{scaleBounds:{min:1,max:2},rubberband:!0},wheel:{axis:"y"}}),h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,style:{height:"100%"},children:h.jsx(Re,{ref:l,className:Bu.ZAnimated,style:{...o,backgroundColor:"transparent"},children:e})})},Uu="_imageContainer_zngaq_11",Hu="_desktop_zngaq_20",$u="_galleryMenuContainer_zngaq_34",an={imageContainer:Uu,desktop:Hu,"big-tablet":"_big-tablet_zngaq_26",galleryMenuContainer:$u},Zu=({showModal:e,closeModal:t,images:n=[]})=>h.jsx(Vu,{children:h.jsx(Yu,{showModal:e,closeModal:t,images:n})}),Yu=({showModal:e,closeModal:t,images:n=[]})=>{const{bind:s,props:i,ref:o,handleCloseGallery:a,handleSetImages:l}=Qn();E.useEffect(()=>{l(n)},[l,n]);const c=()=>{a(t)};return h.jsx(Ti,{showModal:e,closeModal:c,modalStyles:r.ModalStyles.Nocard,modalBackground:r.ColorPalettes.Grey1,children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,flexJustifyContent:r.FlexJustifyContents.Center,style:{height:"100%",maxWidth:"100%"},children:[h.jsx("div",{ref:o,style:{overflow:"hidden",width:"100%",height:"100vh",position:"relative"},children:i.map(({x:u,display:f,scale:S},d)=>E.createElement(b,{...s(),key:d,style:{display:f,x:u,position:"absolute",width:"100%",height:"100%",willChange:"transform"}},h.jsx(b,{style:{scale:S,touchAction:"none",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",width:"100%",height:"100%",willChange:"transform"},children:h.jsxs(Gu,{children:[h.jsx(b,{className:`${an.imageContainer} desktop`,children:n[d]}),h.jsx(b,{className:`${an.imageContainer} big-tablet`,children:n[d]})]})})))}),h.jsx(b,{className:an.galleryMenuContainer,style:{position:"absolute",bottom:0,left:0,right:0},children:h.jsx(ku,{openMenu:!0})}),h.jsx("div",{style:{position:"absolute",top:0,left:0,right:0},children:h.jsx(Au,{handleCloseGallery:c})})]})})},Vu=({children:e})=>h.jsx(Mu,{children:e}),Ai=({children:e})=>h.jsx(Xu,{children:e}),Xu=({children:e})=>{const[t,n]=E.useState(!1);return E.useEffect(()=>(n(!0),()=>{n(!1)}),[]),t?bn.createPortal(e,document.querySelector(Wn[r.Portals.GlobalEventNotification].id)||document.body):null},Wu="_iconContainer_1wxn3_12",qu="_desktop_1wxn3_13",Ku="_mobile_1wxn3_18",Qu="_iconContainerDesktop_1wxn3_25",Ju="_iconContainerMobile_1wxn3_34",Jr={iconContainer:Wu,desktop:qu,mobile:Ku,iconContainerDesktop:Qu,iconContainerMobile:Ju},el=({id:e,name:t,handleImageChange:n,labelname:s,defaultValue:i,width:o="100%",height:a})=>{const[l,c]=E.useState(),[u,f]=E.useState(i);E.useEffect(()=>{if(i&&i!==""){f(i);return}else if(!l)return;const _=URL.createObjectURL(l);return f(_),()=>{var p;if(_!=="")p=_;else if(l&&u)p=u;else return;try{URL.revokeObjectURL(p)}catch{}}},[i,l]);const S=async _=>{if(!_.target.files||_.target.files.length===0)return;c(_.target.files[0]);const p=URL.createObjectURL(_.target.files[0]);f(p),n&&n(_.target.files[0])},d=()=>{c(void 0),f(void 0),n&&n(void 0)};return h.jsxs(b,{children:[h.jsx("input",{id:e,type:"file",name:t,onChange:S,accept:"image/png, image/jpeg, image/webp, image/jpg",style:{opacity:0,pointerEvents:"none",width:0,height:0,position:"absolute"}}),h.jsx("label",{htmlFor:e,onMouseEnter:()=>{},onMouseLeave:()=>{},style:{width:o,height:a,cursor:"pointer"},children:u?h.jsx(tl,{src:u,width:o,handleCancel:d}):h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(b,{marginRight:r.Spacings.Size1,children:h.jsx(q,{children:s||"Upload image"})}),h.jsx(b,{className:`${Jr.iconContainerDesktop}`,children:h.jsx(ie,{name:"image"})}),h.jsx(b,{className:`${Jr.iconContainerMobile}`,children:h.jsx(ie,{name:"camera"})})]})})]})},tl=({src:e,width:t,handleCancel:n})=>h.jsxs(Y,{children:[h.jsx(b,{children:h.jsx("img",{alt:"preview",src:e,width:t})}),h.jsx(b,{children:h.jsx(ie,{name:"x",iconAction:()=>n()})})]}),nl=({id:e,checked:t,size:n=r.Sizings.Size3,handleChange:s=()=>{},vertigo:i,children:o})=>{const[a,l]=E.useState(t),[c,u]=E.useState(!1),f=S=>{l(S),s(e,S)};return E.useEffect(()=>{const S=d=>{!c||a||d.key===" "&&f(!0)};return document&&document.addEventListener("keydown",S,!1),()=>{document&&document.removeEventListener("keydown",S,!1)}},[c,a]),E.useEffect(()=>{l(t)},[t]),h.jsx(b,{onClick:()=>{i&&a||(l(!a),s(e,a))},style:{cursor:"pointer"},tabIndex:0,role:"button",onFocus:()=>u(!0),onBlur:()=>u(!1),children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(rl,{checked:a,size:n}),h.jsx(b,{marginLeft:r.Spacings.Size1,style:{transform:"translateY(-1px)",userSelect:"none"},children:o}),h.jsx("input",{id:e,checked:a,onChange:()=>{},type:"radio",style:{appearance:"none",backgroundColor:"transparent",margin:0,display:"none"}})]})})},rl=({checked:e,size:t})=>{const n=ue(e,{from:{opacity:0,scale:.6},enter:{opacity:1,scale:1},leave:{opacity:0,scale:.6},config:{...Un.stiff}}),s=W({borderColor:e?r.COLOR_VALUES[r.ColorPalettes.Primary5]:r.COLOR_VALUES[r.ColorPalettes.Grey5]});return h.jsx(b,{style:{...s,width:t,height:t,borderRadius:"50%",borderWidth:2,borderStyle:"solid",display:"flex",justifyContent:"center",alignItems:"center"},children:n((i,o)=>o&&h.jsx(b,{style:{...i,width:t-10,height:t-10,borderRadius:"50%",backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Primary5]}}))})},sl=({inputHelper:e})=>{const[t,n]=E.useState(!1);return h.jsxs(b,{style:{position:"absolute",top:"50%",right:-10,transform:"translateY(-25%)"},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[h.jsx(ie,{name:"info",size:r.Sizings.Size2,colorLight:r.ColorPalettes.Primary5,colorDark:r.ColorPalettes.Primary5}),h.jsx(b,{style:{position:"relative",pointerEvents:"none"},children:h.jsx(kt,{labelName:e,hover:t,x:0,y:0})})]})},il="_inputtext_rg89u_1",ol="_inputLabel_rg89u_9",al="_showHidePassword_rg89u_41",Ci={inputtext:il,inputLabel:ol,showHidePassword:al},cl=({isShow:e,handleShowHideText:t})=>h.jsx(b,{className:Ci.showHidePassword,style:{position:"absolute",bottom:".75rem",left:"88%",zIndex:4,cursor:"pointer"},onClick:()=>t(),children:h.jsx(ie,{name:e?r.Icons.EyeOff:r.Icons.Eye,size:r.Sizings.Size3,colorLight:r.ColorPalettes.Primary5,colorDark:r.ColorPalettes.Primary5,cursor:r.Cursors.Pointer})}),ul=({id:e,label:t,size:n,labelTextColor:s,inputColor:i})=>h.jsx(b,{paddingLeft:r.INPUT_TEXT_SIZE[n].paddings.left,paddingBottom:r.INPUT_TEXT_SIZE[n].paddings.bottom,children:h.jsx("label",{htmlFor:e,children:h.jsx(q,{fontWeight:r.FontWeights.Size3,paletteColor:s&&typeof s=="boolean"?r.INPUT_TEXT_COLOR[i].labelColor:r.ColorPalettes.Grey10,fontSize:r.INPUT_TEXT_SIZE[n].font.size,children:t})})}),ll=({id:e,name:t,type:n=r.InputTextTypes.Text,value:s,modes:i=r.InputTextModes.Default,label:o,focus:a,required:l,width:c,fullWidth:u,helperText:f,placeholder:S="Insert text",step:d,min:_,handleChange:p,handleFocus:g,handleBlur:m,handleCheck:T,size:C=r.InputTextSizes.Default,inputStyle:O=r.InputTextStyles.Default,inputColor:I=r.ColorSets.Primarys,labelTextColor:L=!0,transparent:R,...N})=>{const j=E.useRef(null);E.useEffect(()=>{if(i!==r.InputTextModes.Disabled){if(a){j.current&&j.current.focus();return}s!==""&&j.current&&j.current.value}},[a,i,s]);const[M,P]=E.useState(n),[D,G]=E.useState(!1),H=()=>{G(B=>!B)};E.useEffect(()=>{n===r.InputTextTypes.Password&&P(D?r.InputTextTypes.Text:r.InputTextTypes.Password)},[D]);const x=B=>{p&&p(B)},w=E.useCallback(async B=>{B.preventDefault();const $=B.target.value.trim();if(!(!$||$!=="")){m&&m(),T&&await T();return}},[m,T]),U=E.useCallback(()=>{if(i!==r.InputTextModes.Disabled)return j.current&&j.current.focus(),g&&g(),!0},[g,i]);return h.jsxs(b,{style:{width:u?"100%":c||350,position:"relative"},children:[!R&&h.jsx(ul,{id:e,label:o,inputColor:I,size:C,labelTextColor:L}),h.jsxs(b,{boxSizing:r.BoxSizings.BorderBox,...fl(O,R),borderColor:r.INPUT_TEXT_COLOR[I].borderColor,paddingLeft:r.INPUT_TEXT_SIZE[C].paddings.left,paddingRight:r.INPUT_TEXT_SIZE[C].paddings.right,paddingTop:r.INPUT_TEXT_SIZE[C].paddings.top,paddingBottom:r.INPUT_TEXT_SIZE[C].paddings.bottom,style:{paddingTop:O!==r.InputTextStyles.Outlined?1:"",paddingBottom:O!==r.InputTextStyles.Outlined?r.SPACING_VALUES[r.INPUT_TEXT_SIZE[C].paddings.bottom]:"",display:O!==r.InputTextStyles.Outlined?"flex":"block",cursor:"text"},onClick:()=>U(),children:[h.jsx(Gs,{ref:j,type:M,required:l,disabled:i!==r.InputTextModes.Disabled?void 0:!0,fontSize:r.INPUT_TEXT_SIZE[C].font.size,fontWeight:r.INPUT_TEXT_SIZE[C].font.weight,color:r.INPUT_TEXT_COLOR[I].fontColor,placeholder:S,id:e,name:t,value:s,min:_,step:d,onChange:p?x:void 0,onFocus:U,onBlur:w,className:Ci.inputtext,...N}),n===r.InputTextTypes.Password&&h.jsx(cl,{isShow:D,handleShowHideText:H}),f&&h.jsx(sl,{inputHelper:f})]})]})},fl=(e,t=!1)=>{var n,s,i,o,a,l,c,u,f,S;return t?{}:{borderBottomStyle:(i=(s=(n=r.INPUT_TEXT_STYLE[e])==null?void 0:n.borders)==null?void 0:s.bottom)==null?void 0:i.style,borderWidth:(a=(o=r.INPUT_TEXT_STYLE[e])==null?void 0:o.borders)==null?void 0:a.width,borderRadius:(c=(l=r.INPUT_TEXT_STYLE[e])==null?void 0:l.borders)==null?void 0:c.radius,borderStyle:(S=(f=(u=r.INPUT_TEXT_STYLE[e])==null?void 0:u.borders)==null?void 0:f.borders)==null?void 0:S.style}},dl=(e,t)=>{E.useEffect(()=>{if(e){e.style.height="0px";const n=e.scrollHeight;e.style.height=n+"px"}},[e,t])},hl=({id:e,label:t,size:n,textAreaColor:s,labelTextColor:i})=>h.jsx(b,{paddingLeft:r.TEXT_AREA_SIZE[n].paddings.left,paddingBottom:r.TEXT_AREA_SIZE[n].paddings.bottom,children:h.jsx("label",{htmlFor:e,children:h.jsx(q,{fontWeight:r.FontWeights.Size3,paletteColor:i&&typeof i=="boolean"?r.TEXT_AREA_COLOR[s].labelColor:r.ColorPalettes.Grey10,fontSize:r.TEXT_AREA_SIZE[n].font.size,children:t})})}),Sl="_textareaBare_1yf3j_1",_l={textareaBare:Sl},pl=({id:e,name:t,value:n,modes:s=r.TextAreaModes.Default,label:i,required:o=!1,rows:a=1,width:l,fullWidth:c,placeholder:u="Insert text",onChange:f,handleBlur:S,handleFocus:d,handleCheck:_,size:p=r.TextAreaSizes.Default,textAreaStyle:g=r.TextAreaStyles.Default,textAreaColor:m=r.ColorSets.Primarys,labelTextColor:T,noLabel:C,...O})=>{const I=E.useRef(null);dl(I.current,n);const L=E.useCallback(async N=>{N.preventDefault();const j=N.target.value.trim();if(!(!j||j!=="")){S&&S(),_&&await _();return}},[S,_]),R=E.useCallback(()=>{if(s!==r.TextAreaModes.Disabled)return I.current&&I.current.focus(),d&&d(),!0},[d,s]);return h.jsxs(b,{style:{width:c?"100%":l||350},children:[!C&&h.jsx(hl,{id:e,label:i,textAreaColor:m,size:p,labelTextColor:T}),h.jsx(b,{boxSizing:r.BoxSizings.BorderBox,paddingLeft:r.TEXT_AREA_SIZE[p].paddings.left,paddingRight:r.TEXT_AREA_SIZE[p].paddings.right,paddingTop:r.TEXT_AREA_SIZE[p].paddings.top,paddingBottom:r.TEXT_AREA_SIZE[p].paddings.bottom,borderColor:r.ColorPalettes.Primary5,...gl(g),style:{paddingTop:g!==r.TextAreaStyles.Outlined&&g!==r.TextAreaStyles.Default?1:"",paddingBottom:g!==r.TextAreaStyles.Outlined&&g!==r.TextAreaStyles.Default?1:"",cursor:"text"},onClick:()=>R(),children:h.jsx(Us,{ref:I,id:e,name:t,value:n,required:o,outlineStyle:r.OutlineStyles.None,resize:r.ElementResizes.None,onChange:f,onFocus:R,onBlur:L,placeholder:u,rows:a,fontSize:r.TEXT_AREA_SIZE[p].font.size,fontWeight:r.TEXT_AREA_SIZE[p].font.weight,className:_l.textareaBare,...O})})]})},gl=e=>{var t,n,s,i,o,a,l,c,u;return{borderBottomStyle:(s=(n=(t=r.TEXT_AREA_STYLE[e])==null?void 0:t.borders)==null?void 0:n.bottom)==null?void 0:s.style,borderWidth:(o=(i=r.TEXT_AREA_STYLE[e])==null?void 0:i.borders)==null?void 0:o.width,borderRadius:(l=(a=r.TEXT_AREA_STYLE[e])==null?void 0:a.borders)==null?void 0:l.radius,borderStyle:(u=(c=r.TEXT_AREA_STYLE[e])==null?void 0:c.borders)==null?void 0:u.style}},ml=({text:e,idx:t,handleSelectInset:n,isSelected:s,insetColor:i=r.ColorSets.Primarys,borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:l,borderBottomRightRadius:c})=>{const u=W({backgroundColor:s?r.COLOR_VALUES[r.ColorRanges[i][0]+3]:r.COLOR_VALUES[r.ColorRanges[r.ColorSets.Greys][0]+2],color:s?r.COLOR_VALUES[r.ColorRanges[r.ColorSets.Greys][1]-1]:r.COLOR_VALUES[r.ColorRanges[r.ColorSets.Greys][1]-4],boxShadow:s?"inset 0 0px 0 hsla(0, 0%, 0%, 0), inset 0 0px 0px hsla(0, 0%, 0%, 0)":"inset 0 -2px 0 hsla(0, 0%, 100%, .055), inset 0 2px 2px hsla(0, 0%, 0%, 0.1)"}),f=W({fontWeight:s?500:300});return h.jsx(b,{style:{...u,cursor:"pointer"},paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:l,borderBottomRightRadius:c,onClick:()=>n(t),children:h.jsx(b,{style:f,children:h.jsx(q,{style:{color:"inherit",transform:"translateY(-1px)",display:"inline-block"},children:e})})})},El=({options:e=[],valueIndex:t=0,id:n,setInput:s,setSelect:i,insetColor:o})=>{const[a,l]=E.useState(t);E.useEffect(()=>{typeof t=="number"&&l(t)},[t]);const c=u=>{l(u),s&&s(f=>({...f,[n]:e[u]})),i&&i(e[u])};return h.jsx(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:e.map((u,f)=>h.jsx(ml,{text:u.text,value:u.value,idx:f,id:u.id,handleSelectInset:c,isSelected:f===a,insetColor:o,borderTopLeftRadius:f===0?r.Radiuses.Size4:void 0,borderTopRightRadius:f===e.length-1?r.Radiuses.Size4:void 0,borderBottomLeftRadius:f===0?r.Radiuses.Size4:void 0,borderBottomRightRadius:f===e.length-1?r.Radiuses.Size4:void 0},f))})},Tl="_message_1i7cn_1",yl="_disabled_1i7cn_7",Al="_life_1i7cn_12",Cl="_red_1i7cn_19",Ol="_blue_1i7cn_22",Ll="_green_1i7cn_25",vl="_orange_1i7cn_28",cn={message:Tl,disabled:yl,life:Al,red:Cl,blue:Ol,green:Ll,orange:vl},Il=()=>{const{globalEventRef:e}=qs();return h.jsx(Ai,{children:h.jsx(xl,{children:t=>{e.current=t}})})};let bl=0;function xl({config:e={tension:125,friction:20,precision:.1},timeout:t=3e3,children:n}){const s=E.useMemo(()=>new WeakMap,[]),i=E.useMemo(()=>new WeakMap,[]),[o,a]=E.useState([]),l=ue(o,{from:{opacity:0,height:0,life:"100%",y:0},keys:c=>c.key,enter:c=>async(u,f)=>{i.set(c,f),await u({opacity:1,height:s.get(c).offsetHeight+10,y:30}),await u({life:"0%"})},leave:[{opacity:0,y:50},{height:0}],onRest:(c,u,f)=>{a(S=>S.filter(d=>d.key!==f.key))},config:(c,u,f)=>S=>f==="enter"&&S==="life"?{duration:c.type.isTimeout?t:1e3*60*60*24}:e});return E.useEffect(()=>{n((c,u)=>{a(f=>[...f,{key:bl++,msg:c,type:u}])})},[n]),h.jsx(Y,{display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,flexAlignItem:r.FlexAlignItems.FlexEnd,style:{position:"fixed",zIndex:1e3,bottom:"30px",right:"30px"},children:l(({life:c,...u},f)=>h.jsx(Rl,{style:u,refMap:s,cancelMap:i,type:f.type,msg:f.msg,life:c,item:f}))})}const Rl=({style:e,refMap:t,cancelMap:n,type:s,msg:i,life:o,item:a})=>{const[l,c]=E.useState(!1);return h.jsx(b,{style:e,className:l?`${cn.message} disabled`:cn.message,children:h.jsx("div",{ref:u=>u&&t.set(a,u),children:h.jsx(b,{bgColor:r.ColorPalettes.Secondary2,borderRadius:r.Radiuses.Size4,padding:r.Spacings.Size3,boxShadow:r.BoxShadows.Size5,style:{borderBottom:"none"},children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,style:{position:"relative",minWidth:"200px"},children:[h.jsx(b,{marginRight:r.Spacings.Size2,children:h.jsx(ie,{name:s.icon,size:r.Sizings.Size6,colorLight:s.color,colorDark:s.color,withMargin:!1})}),h.jsx(Pt,{fontSize:r.FontSizes.Size4,children:i||s.default}),h.jsx(b,{marginLeft:r.Spacings.Auto,paddingLeft:r.Spacings.Size3,children:h.jsx(ie,{name:"x-circle",size:r.Sizings.Size4,iconAction:()=>{l||(n.has(a)&&o.get()!=="0%"&&n.get(a)(),c(!0))},withMargin:!1})}),(s==null?void 0:s.isTimeout)&&h.jsx(b,{className:`${cn.life} ${s.classname}`,style:{right:o,transform:"translateY(8px)"}})]})})})})},wl=()=>h.jsx(h.Fragment,{children:h.jsx(Il,{})}),Nl="_ul_5jv7w_1",Dl="_li_5jv7w_5",Jn={ul:Nl,li:Dl},un={[r.DropdownPositions.Top]:{from:{y:-10},enter:{y:-1},leave:{y:-10}},[r.DropdownPositions.Bottom]:{from:{y:10},enter:{y:-1},leave:{y:10}}},jl=({dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o})=>{switch(e){case r.DropdownHeightStyles.Default:return h.jsx(es,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o});case r.DropdownHeightStyles.AutoHeight:return h.jsx(Ml,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o});default:return h.jsx(es,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o})}},es=({isOpen:e,dropdownPosition:t,position:n,children:s})=>ue(e,{from:{opacity:0,...un[t].from},enter:{opacity:1,...un[t].enter},leave:{opacity:0,...un[t].leave}})((o,a)=>a&&h.jsx(Yn,{style:{...o,transformOrigin:t===r.DropdownPositions.Top?"bottom center":t===r.DropdownPositions.Bottom?"top center":n<0?"bottom center":"top center"},className:Jn.ul,children:s})),Ml=({isOpen:e,dropdownPosition:t,position:n,children:s})=>ue(e,{from:{opacity:0,scaleY:0},enter:{opacity:1,scaleY:1},leave:{opacity:0,scaleY:.5},config(o,a,l){return l==="leave"?{duration:100}:Un.default}})((o,a)=>a&&h.jsx(Yn,{style:{...o,transformOrigin:t===r.DropdownPositions.Top?"bottom center":t===r.DropdownPositions.Bottom?"top center":n<0?"bottom center":"top center"},className:Jn.ul,children:s})),Pl=({handleSelectItem:e,id:t,idx:n,children:s,colorSet:i})=>{const[o,a]=W(()=>({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Grey2]}));return h.jsx(Hs,{className:Jn.li,paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,marginTop:r.Spacings.Size0,style:{listStyle:"none",cursor:"pointer",userSelect:"none",...o},onMouseEnter:()=>{a.start({backgroundColor:r.COLOR_VALUES[r.ColorRanges[i][0]+2]})},onMouseLeave:()=>{a.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Grey2]})},onMouseDown:()=>{a.start({backgroundColor:r.COLOR_VALUES[r.ColorRanges[i][0]+3]})},onClick:()=>e(t,n),children:s})},kl=(e,t)=>{const[n,s]=E.useState(null);E.useEffect(()=>{const o=()=>{s({width:window?window.innerWidth:0,height:window?window.innerHeight:0})};return window&&window.addEventListener("resize",o),()=>{window&&window.removeEventListener("resize",o)}},[]);const i=e.height+10;return n&&i+e.top>n.height?-1:1},Fl=({isSelectOpen:e,selectOptions:t,handleSelectItem:n,selectState:s,dropdownHeightStyle:i,dropdownPosition:o=r.DropdownPositions.Bottom,colorSet:a,headerHeight:l,w:c})=>{const[u,f]=ge(),S=kl(f),d=S>0?l-1:-f.height;return h.jsx(Re,{ref:u,borderRadius:r.SELECT_STATES[s].dropdown.borderRadius,borderBottomLeftRadius:r.Radiuses.Size0,borderBottomRightRadius:r.Radiuses.Size0,borderWidth:r.SELECT_STATES[s].header.borderWidth,borderColor:r.SELECT_STATES[s].header.borderColor,style:{maxHeight:250,width:c,overflowY:"scroll",position:"absolute",transform:`translateY(${d}px)`,overscrollBehaviorY:"none"},children:h.jsx(jl,{dropdownHeightStyle:i,isOpen:e,dropdownPosition:o,selectState:s,position:S,children:t.map((_,p)=>h.jsx(Pl,{handleSelectItem:n,id:_.id,idx:p,colorSet:a,children:h.jsx(b,{paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,children:h.jsx(q,{children:_.text})})},_.id))})})},Bl=({selectedValues:e,doubleZero:t,title:n,selectedValueStyles:s=r.SelectedValuesStyles.Text,sizes:i=r.SelectSizes.Medium})=>(e.length===1&&e[0].text,e.length<1?h.jsx(zl,{sizes:i,title:n}):s===r.SelectedValuesStyles.Text?h.jsx(h.Fragment,{children:e.map((o,a)=>h.jsx(q,{fontSize:r.SELECT_SIZES[i].font.size,children:o.text},a))}):h.jsx(h.Fragment,{children:e.map((o,a)=>h.jsx(q,{fontSize:r.SELECT_SIZES[i].font.size,children:o.text},a))})),zl=({title:e,sizes:t})=>h.jsx(q,{fontSize:r.SELECT_SIZES[t].font.size,children:e}),Gl=({setOpenDropdown:e,openDropdown:t,title:n,doubleZero:s,selectState:i,selectedValues:o,selectedValueStyles:a,sizes:l=r.SelectSizes.Medium})=>h.jsx(b,{style:{cursor:"pointer"},paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderRadius:r.SELECT_STATES[i].header.borderRadius,borderWidth:r.SELECT_STATES[i].header.borderWidth,borderColor:r.SELECT_STATES[i].header.borderColor,borderTopLeftRadius:t?r.Radiuses.Size0:void 0,borderTopRightRadius:t?r.Radiuses.Size0:void 0,bgColor:r.SELECT_STATES[i].header.bgColor,onClick:()=>e(c=>!c),children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,flexJustifyContent:r.FlexJustifyContents.SpaceBetween,children:[h.jsx(Bl,{sizes:l,selectedValues:o,doubleZero:s,title:n,selectedValueStyles:a}),h.jsx("div",{className:"icon",children:h.jsx(Ul,{isSelectOpen:t,sizes:l})})]})}),Ul=({isSelectOpen:e,sizes:t,cursor:n=r.Cursors.Pointer})=>{const s=W({rotateX:e?180:0});return h.jsx(b,{style:s,children:h.jsx(ie,{name:"chevron-down",colorLight:r.ColorPalettes.Grey5,colorDark:r.ColorPalettes.Grey5,size:r.SELECT_SIZES[t].icon.size,cursor:n})})};function Hl(e,t){switch(t.type){case"field":return{...e,[t.field]:t.value};case"select":return{...e,selectedItemIdx:t.value,selectOptions:e.selectOptions.map((n,s)=>t.value===s?{...n,selected:!0}:{...n,selected:!1}),openDropdown:!1,selectState:r.SelectStates.Selected};case"open":return{...e,openDropdown:!0};case"close":return{...e,openDropdown:!1};case"open-close":return{...e,openDropdown:!e.openDropdown};case"parent-update-selected":return{...e,selectedItemIdx:t.value,selectOptions:e.selectOptions.map((n,s)=>({...n,selected:s===t.value}))};default:return e}}const $l=({id:e,title:t,options:n,selectedIdx:s=null,w:i=225,doubleZero:o=!1,required:a=!1,dropdownHeightStyle:l=r.DropdownHeightStyles.AutoHeight,state:c=r.SelectStates.Default,selectedValuesStyle:u=r.SelectedValuesStyles.Text,colorSet:f=r.ColorSets.Primarys,dropdownPosition:S=r.DropdownPositions.Bottom,setSelectedIdx:d,setInput:_})=>{const[p,g]=E.useState(!1),[m,T]=E.useReducer(Hl,{selectState:c,openDropdown:!1,selectedItemIdx:s,selectOptions:n}),{openDropdown:C,selectedItemIdx:O,selectOptions:I,selectState:L}=m;E.useEffect(()=>{g(!0),typeof s=="number"&&(d&&d(s),_&&_(P=>({...P,[e]:n[s]})))},[]),E.useEffect(()=>{typeof s=="number"&&T({type:"parent-update-selected",value:s})},[s]),E.useEffect(()=>{a&&p&&!C&&T(typeof O=="number"&&O!==-1?{type:"field",field:"selectState",value:r.SelectStates.Default}:{type:"field",field:"selectState",value:r.SelectStates.Error})},[p,C,a,O]);const R=(P,D)=>{T({type:"select",value:D}),d&&d(D),_&&_(G=>({...G,[P]:I[D]}))},N=Xn(()=>{T({type:"close"})}),[j,M]=ge();return h.jsxs(Bs,{ref:N,display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,style:{width:i,maxWidth:i},children:[h.jsx("div",{ref:j,children:h.jsx(Gl,{w:i,setOpenDropdown:()=>T({type:"open-close"}),selectState:L,setSelectState:P=>T({type:"field",field:"selectState",value:P}),openDropdown:C,title:t,doubleZero:o,selectedValues:I.filter(P=>P.selected===!0),selectedValueStyles:u,options:n})}),h.jsx(Fl,{isSelectOpen:C,closeSelect:()=>T({type:"close"}),selectOptions:I,handleSelectItem:R,selectState:L,dropdownHeightStyle:l,dropdownPosition:S,colorSet:f,headerHeight:M.height,w:M.width})]})},Zl=({headerId:e,element:t,styles:n,sortable:s=!1,onClickHeaderCell:i,columnIndex:o,setTableRows:a})=>{const l=E.useCallback(S=>{i&&i(e,S)},[e,i]),c=E.useCallback(()=>{s&&a&&a(S=>{const d=[...S];try{d[0].cells[o].cellId<d[d.length-1].cells[o].cellId?d.sort((_,p)=>{const g=_.cells[o].cellId,m=p.cells[o].cellId;return g<m?1:g>m?-1:0}):d.sort((_,p)=>{const g=_.cells[o].cellId,m=p.cells[o].cellId;return g<m?-1:g>m?1:0})}catch(_){return console.error(_),S}return d})},[o,a,s]),[u,f]=W(()=>({opacity:0}));return h.jsx(Y,{justifySelf:n.position.justifySelf,alignSelf:n.position.alignSelf,style:{width:"100%"},children:h.jsx(b,{onClick:l,onMouseEnter:()=>{f.start({opacity:1})},onMouseLeave:()=>{f.start({opacity:0})},children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:[t,s&&h.jsx(b,{marginLeft:r.Spacings.Size3,style:u,children:h.jsx(ie,{name:"arrow-up",size:r.Sizings.Size3,iconAction:()=>c()})})]})})})},Yl="_gridTableHeader_nombk_1",Vl={gridTableHeader:Yl},Oi=({headers:e=[],templateColumns:t,setTableRows:n})=>h.jsx(b,{paddingLeft:r.Spacings.Size1,paddingRight:r.Spacings.Size1,children:h.jsx(Y,{display:r.Displays.Grid,className:Vl.gridTableHeader,style:{gridTemplateColumns:t.join(" ")},children:e.map((s,i)=>h.jsx(Zl,{headerId:s.headerId,element:s.element,styles:s.styles,onClickHeaderCell:s.onClickHeaderCell,setTableRows:n,columnIndex:i,sortable:s.sortable},s.headerId))})}),Xl=({hover:e,onHover:t,isClicked:n,children:s})=>{const i=W({backgroundColor:t?"rgba(255,255,255, .1)":"rgba(255,255,255,0)",borderRadius:"10px"}),o=W({backgroundColor:n?"rgba(255,255,255, .15)":"rgba(255,255,255,0)",borderRadius:"10px"});return h.jsx(b,{style:e?o:void 0,children:h.jsx(b,{style:e?i:void 0,paddingLeft:r.Spacings.Size1,paddingRight:r.Spacings.Size1,children:s})})},Wl=({cellId:e,element:t,styles:n,onClickCell:s})=>h.jsx(Y,{justifySelf:n.position.justifySelf,alignSelf:n.position.alignSelf,children:h.jsx(b,{onClick:i=>{s&&s(e,i)},children:t})}),ql="_gridTableRow_1mdn2_1",Kl="_cellData_1mdn2_18",Ql="_date_1mdn2_23",Jl="_time_1mdn2_27",ef="_serial_1mdn2_32",tf="_image_1mdn2_36",nf="_absolute_1mdn2_45",rf="_start_1mdn2_54",sf="_center_1mdn2_57",of="_end_1mdn2_60",af={gridTableRow:ql,cellData:Kl,date:Ql,time:Jl,serial:ef,image:tf,"button-option":"_button-option_1mdn2_41",absolute:nf,start:rf,center:sf,end:of},Li=({rowId:e,templateColumns:t=[],cells:n=[],hover:s,onClickRow:i})=>{const[o,a]=E.useState(!1),[l,c]=E.useState(!1);return h.jsx(Xl,{hover:s,onHover:o,isClicked:l,children:h.jsx(Y,{className:af.gridTableRow,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onMouseDown:()=>c(!0),onMouseUp:()=>c(!1),onClick:u=>{i&&i(e,u)},display:r.Displays.Grid,style:{gridTemplateColumns:t.join(" ")},children:n.map((u,f)=>h.jsx(Wl,{cellId:u.cellId,element:u.element,styles:u.styles,onClickCell:u.onClickCell},u.cellId||f))})})},cf=({headers:e=[],rows:t=[],templateColumns:n,emptyPlaceholder:s,hover:i=!0})=>{const[o,a]=E.useState(t);return h.jsxs(b,{style:{flex:1,width:"100%",maxWidth:"100%"},children:[h.jsx(Oi,{headers:e,templateColumns:n,setTableRows:a}),o.length!==0?h.jsx(h.Fragment,{children:o.map((l,c)=>h.jsx(Li,{rowId:l.rowId,templateColumns:n,cells:l.cells,hover:i,onClickRow:l.onClickRow},l.rowId||c))}):s?h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,style:{width:"100%"},children:s}):h.jsx(h.Fragment,{})]})},uf=({menu:e,setActiveItem:t,idx:n,menuWrapper:s,route:i})=>{const o=()=>{t(n)};return h.jsx(lf,{Wrapper:s,route:i,children:h.jsx(b,{onClick:()=>o(),paddingLeft:r.Spacings.Size3,paddingRight:r.Spacings.Size3,paddingTop:r.Spacings.Size2,paddingBottom:r.Spacings.Size2,style:{zIndex:11,cursor:"pointer",userSelect:"none"},children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:h.jsx(q,{style:{zIndex:12},children:e.name})})})})};function lf({Wrapper:e,route:t,children:n}){if(typeof e<"u")return h.jsx(e,{href:t,children:n})}const ff=({height:e,tabRoomWidth:t,activeItem:n})=>{const[s,i]=W(()=>({from:{x:0}}));return i.start({x:t*n}),h.jsx(b,{borderRadius:r.Radiuses.Size5,boxShadow:r.BoxShadows.Size1,padding:r.Spacings.Size1,boxSizing:r.BoxSizings.BorderBox,style:{position:"absolute",height:e,width:t,zIndex:10,...s},children:h.jsx(b,{borderRadius:r.Radiuses.Size4,bgColor:r.ColorPalettes.Grey2,style:{width:"100%",height:"100%"},children:h.jsx(h.Fragment,{})})})},df=({tabMenu:e,tab:t,setTab:n})=>{const[s,i]=E.useState(t||0);E.useEffect(()=>{i(t)},[t]);const o=u=>{n&&n(u),i(u)},[a,l]=ge(),c=l.width/e.length;return h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:h.jsx("div",{ref:a,style:{boxSizing:"border-box"},children:h.jsx(b,{borderRadius:r.Radiuses.Size5,bgColor:r.ColorPalettes.Grey1,style:{width:"max-content",height:"max-content",position:"relative",zIndex:9},children:h.jsxs(Y,{display:r.Displays.Grid,style:{gridTemplateColumns:`repeat(${e.length}, 1fr)`,position:"relative"},children:[h.jsx(ff,{height:l.height,width:l.width,activeItem:s,tabRoomWidth:c}),e.map((u,f)=>h.jsx(uf,{idx:f,menu:u,active:s===f,setActiveItem:o,menuWrapper:u.menuWrapper,route:u.route},f))]})})})})},hf="_toggleContainer_15eps_1",Sf="_toggleBg_15eps_15",_f="_toggleThumb_15eps_33",ln={toggleContainer:hf,toggleBg:Sf,toggleThumb:_f},pf=({isTrue:e,setIsTrue:t,size:n=r.ToggleSizes.Medium,icon:s="",toggleState:i=r.ToggleStates.Icon,description:o=""})=>{var _,p;const a=W({backgroundColor:e?"#4BD763":"#cccccc"}),[l,c]=W(()=>({x:0}));c.start({x:e?26:0});const[u,f]=E.useState(!1),[S,d]=ge();return h.jsxs(b,{className:ln.toggleContainer,tabIndex:1,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onClick:()=>t(g=>!g),style:{width:r.TOGGLE_SIZE[n].container.w,height:r.TOGGLE_SIZE[n].container.h},children:[h.jsx(b,{style:{...a,position:"relative"},children:h.jsx(b,{className:ln.toggleBg,style:{width:r.TOGGLE_SIZE[n].bg.w,height:r.TOGGLE_SIZE[n].bg.h}})}),h.jsx(b,{style:{position:"relative",...l},children:h.jsxs(Re,{className:ln.toggleThumb,ref:S,style:{width:r.TOGGLE_SIZE[n].thumb.w,height:r.TOGGLE_SIZE[n].thumb.h},children:[o!==""&&h.jsx(kt,{labelName:o,hover:u,offsetX:d.width/2,y:d.height+5}),s!==""&&h.jsx(ie,{name:i===r.ToggleStates.Icon?s:r.TOGGLE_STATE_ICON[i],width:(_=r.TOGGLE_SIZE[n].icon)==null?void 0:_.w,height:(p=r.TOGGLE_SIZE[n].icon)==null?void 0:p.h})]})})]})};exports.Admonition=ba;exports.Avatar=Ks;exports.AvatarGroup=Na;exports.Button=Qs;exports.Checkbox=Js;exports.Checkboxes=Pa;exports.Chip=Fa;exports.ColorPicker=_c;exports.Container=b;exports.ContainerRef=Re;exports.DivMeasure=ma;exports.F__Button=zs;exports.F__ButtonRef=Ho;exports.F__Li=Hs;exports.F__LiRef=Yo;exports.F__TextArea=Zo;exports.F__TextAreaRef=Us;exports.F__TextInput=$o;exports.F__TextInputRef=Gs;exports.F__Ul=Yn;exports.F__UlRef=Vo;exports.FunctionalUiPortals=Wn;exports.GalleryModal=Zu;exports.GlobalEventPortal=Ai;exports.InputImage=el;exports.InputText=ll;exports.InsetGroup=El;exports.LabelText=kt;exports.Layout=Y;exports.LayoutRef=Bs;exports.LoadingSpinner=Ea;exports.Modal=Ti;exports.NotificationSystem=wl;exports.ProvideGlobalEventContext=va;exports.ProvideUiContext=Oa;exports.Radio=nl;exports.SelectSpring=$l;exports.Spinner=Ys;exports.SpringEnter=ya;exports.SpringEnterOffsetBy=Vs;exports.SpringMenuTransition=Aa;exports.SpringOpenCloseHeight=Ta;exports.TableGrid=cf;exports.TableHeader=Oi;exports.TableRow=Li;exports.Tabs=df;exports.TagColor=si;exports.TextArea=pl;exports.Text_H1=Xo;exports.Text_H1Ref=Wo;exports.Text_H2=qo;exports.Text_H2Ref=Ko;exports.Text_H3=Qo;exports.Text_H3Ref=Jo;exports.Text_H4=ea;exports.Text_H4Ref=ta;exports.Text_H5=na;exports.Text_H5Ref=ra;exports.Text_H6=sa;exports.Text_H6Ref=ia;exports.Text_Header=la;exports.Text_HeaderRef=fa;exports.Text_P=Pt;exports.Text_PRef=oa;exports.Text_Span=q;exports.Text_SpanRef=aa;exports.ToggleSwitch=pf;exports.UIcon=ie;exports.useGlobalEventContext=qs;exports.useUiContext=V;